@comfyorg/comfyui-frontend-types 1.59.0 → 1.60.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.d.ts +903 -216
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1,17 +1,18 @@
1
1
  import { BillingCycle } from '@comfyorg/account-core/billing';
2
2
  import { BillingSource } from '@comfyorg/billing-contract';
3
3
  import { BillingTierKey } from '@comfyorg/account-core/billing';
4
+ import { BlendFn } from '@comfyorg/layer-editor/mode';
5
+ import { ClassValue } from 'cva';
6
+ import { ComfyDesktop2AuthBridge } from '@comfyorg/comfyui-desktop-bridge-types';
4
7
  import { ComfyDesktop2Bridge } from '@comfyorg/comfyui-desktop-bridge-types';
5
8
  import { ComfyNodeDef } from '@comfyorg/object-info-parser';
6
9
  import { Component } from 'vue';
7
10
  import { ComponentAttrs } from 'vue-component-type-helpers';
8
- import { ConfirmationDialogType } from '../components/dialog/content/confirmationDialogTypes';
9
- import { CurveData } from '../../../../components/curve/types';
10
- import { DialogContentSize } from '../components/ui/dialog/dialog.variants';
11
11
  import { GetEmbeddingsResponse as EmbeddingsResponse } from '@comfyorg/ingest-types';
12
12
  import { GetExtensionsResponse as ExtensionsResponse } from '@comfyorg/ingest-types';
13
13
  import { GetI18nResponse } from '@comfyorg/ingest-types';
14
14
  import { InputSpec } from '@comfyorg/object-info-parser';
15
+ import { LightInfoEntry } from '@comfyorg/viewport3d/lightInfo/types';
15
16
  import { NodeBadgeMode } from '@comfyorg/object-info-parser';
16
17
  import { PostAssetsFromWorkflowResponse } from '@comfyorg/ingest-types';
17
18
  import { PreviewSubscribeResponse } from '@comfyorg/ingest-types';
@@ -22,7 +23,9 @@ import { Ref } from 'vue';
22
23
  import { ShallowRef } from 'vue';
23
24
  import { SubscribeResponse } from '@comfyorg/ingest-types';
24
25
  import { SystemStatsResponse } from '@comfyorg/ingest-types';
26
+ import { Transform } from '@comfyorg/layer-editor/node';
25
27
  import { UserDataResponseFull } from '@comfyorg/ingest-types';
28
+ import { VariantProps } from 'cva';
26
29
  import { z } from 'zod';
27
30
 
28
31
  declare interface AboutPageBadge {
@@ -240,7 +243,7 @@ declare interface BaseDOMWidget<V extends object | string = object | string> ext
240
243
  /** The unique ID of the widget. */
241
244
  readonly id: string;
242
245
  /** The node that the widget belongs to. */
243
- readonly node: LGraphNode;
246
+ readonly node: RegisteredLGraphNode;
244
247
  /** Whether the widget is visible. */
245
248
  isVisible(): boolean;
246
249
  /** The margin of the widget. */
@@ -327,6 +330,9 @@ declare abstract class BaseSteppedWidget<TWidget extends IBaseWidget = IBaseWidg
327
330
  drawWidget(ctx: CanvasRenderingContext2D, options: DrawWidgetOptions): void;
328
331
  }
329
332
 
333
+ declare interface BaseWidget extends IBaseWidget {
334
+ }
335
+
330
336
  declare abstract class BaseWidget<TWidget extends IBaseWidget = IBaseWidget> implements IBaseWidget, NodeBindable {
331
337
  /** From node edge to widget edge */
332
338
  static margin: number;
@@ -485,8 +491,6 @@ declare abstract class BaseWidget<TWidget extends IBaseWidget = IBaseWidget> imp
485
491
 
486
492
  declare type BasicReadonlyNetwork = Pick<ReadonlyLinkNetwork, 'getNodeById' | 'links' | 'getLink' | 'inputNode' | 'outputNode'>;
487
493
 
488
- declare type BlendFn = 'normal' | 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten' | 'color-dodge' | 'color-burn' | 'hard-light' | 'soft-light' | 'difference' | 'exclusion' | 'linear-dodge' | 'linear-burn' | 'vivid-light' | 'pin-light' | 'linear-light' | 'hard-mix' | 'subtract' | 'divide' | 'grain-extract' | 'grain-merge' | 'hue' | 'saturation' | 'color' | 'luminosity';
489
-
490
494
  declare type BookmarkCustomization = {
491
495
  icon?: string;
492
496
  color?: string;
@@ -554,7 +558,7 @@ declare type ButtonWidgetSource = Omit<IButtonWidget, 'options'> & {
554
558
  options?: IButtonWidget['options'];
555
559
  };
556
560
 
557
- declare type CanvasColour = string | CanvasGradient | CanvasPattern;
561
+ export declare type CanvasColour = string | CanvasGradient | CanvasPattern;
558
562
 
559
563
  /**
560
564
  * Tells the canvas which interactions the host application allows right now.
@@ -792,7 +796,7 @@ declare class CanvasPointer {
792
796
  }
793
797
 
794
798
  /** PointerEvent with canvasX/Y and deltaX/Y properties */
795
- declare interface CanvasPointerEvent extends PointerEvent, CanvasMouseEvent {
799
+ export declare interface CanvasPointerEvent extends PointerEvent, CanvasMouseEvent {
796
800
  }
797
801
 
798
802
  /** All properties added when converting a pointer event to a CanvasPointerEvent (via {@link LGraphCanvas.adjustMouseEvent}). */
@@ -842,7 +846,7 @@ declare type ColorFormat = 'hex' | 'rgb' | 'hsb';
842
846
  * A color option to customize the color of {@link LGraphNode} or {@link LGraphGroup}.
843
847
  * @see {@link LGraphCanvas.node_colors}
844
848
  */
845
- declare interface ColorOption {
849
+ export declare interface ColorOption {
846
850
  color: string;
847
851
  bgcolor: string;
848
852
  groupcolor: string;
@@ -889,12 +893,12 @@ declare class ComboWidget extends BaseSteppedWidget<IStringComboWidget | IComboW
889
893
  onClick({ e, node, canvas }: WidgetEventOptions): void;
890
894
  }
891
895
 
892
- declare type ComboWidgetValues = (string | number)[] | Record<string, string> | ((widget?: IComboWidget, node?: RegisteredLGraphNode) => (string | number)[]);
896
+ export declare type ComboWidgetValues = (string | number)[] | Record<string, string> | ((widget?: IComboWidget, node?: RegisteredLGraphNode) => (string | number)[]);
893
897
 
894
898
  /** EventTarget typing has no generic capability. */
895
899
  export declare interface ComfyApi extends EventTarget {
896
- addEventListener<TEvent extends keyof ApiEvents>(type: TEvent, callback: ((event: ApiEvents[TEvent]) => void) | null, options?: AddEventListenerOptions | boolean): void;
897
- removeEventListener<TEvent extends keyof ApiEvents>(type: TEvent, callback: ((event: ApiEvents[TEvent]) => void) | null, options?: EventListenerOptions | boolean): void;
900
+ addEventListener<TEvent extends keyof ApiEvents>(type: TEvent, callback: ((event: ApiEvents[TEvent]) => void) | EventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
901
+ removeEventListener<TEvent extends keyof ApiEvents>(type: TEvent, callback: ((event: ApiEvents[TEvent]) => void) | EventListenerObject | null, options?: EventListenerOptions | boolean): void;
898
902
  }
899
903
 
900
904
  export declare class ComfyApi extends EventTarget {
@@ -905,12 +909,7 @@ export declare class ComfyApi extends EventTarget {
905
909
  * {@link addEventListener}. Keyed weakly so wrappers are GC'd with listeners.
906
910
  */
907
911
  private _listenerWrappers;
908
- api_host: string;
909
- api_base: string;
910
- /**
911
- * The client id from the initial session storage.
912
- */
913
- initialClientId: string | null;
912
+ private launchContext?;
914
913
  /**
915
914
  * The current client id from websocket status updates.
916
915
  */
@@ -968,6 +967,19 @@ export declare class ComfyApi extends EventTarget {
968
967
  */
969
968
  apiKey?: string;
970
969
  constructor();
970
+ /**
971
+ * Snapshots the page host, base path, and stored client id. Runs on first
972
+ * use; the bootstrap calls it before routing can change the location.
973
+ */
974
+ captureLaunchContext(): void;
975
+ private get capturedLaunchContext();
976
+ get api_host(): string;
977
+ set api_host(host: string);
978
+ get api_base(): string;
979
+ set api_base(base: string);
980
+ /** The client id from the initial session storage. */
981
+ get initialClientId(): string | null;
982
+ set initialClientId(initialClientId: string | null);
971
983
  internalURL(route: string): string;
972
984
  apiURL(route: string): string;
973
985
  /** For requests whose headers already name the workspace. */
@@ -1080,6 +1092,11 @@ export declare class ComfyApi extends EventTarget {
1080
1092
  * Loads node object definitions for the graph
1081
1093
  * @returns The node definitions
1082
1094
  */
1095
+ private nodeDefsPrefetch?;
1096
+ /** Start fetching `/object_info` so the next `getNodeDefs()` can reuse it. */
1097
+ prefetchNodeDefs(): void;
1098
+ /** The `/object_info` response, the prefetched one when there is one, whatever its HTTP status. */
1099
+ fetchNodeDefs(): Promise<Response>;
1083
1100
  getNodeDefs(): Promise<Record<string, ComfyNodeDef>>;
1084
1101
  /**
1085
1102
  * Queues a prompt to be executed
@@ -1148,7 +1165,7 @@ export declare class ComfyApi extends EventTarget {
1148
1165
  * @param jobId The job ID
1149
1166
  * @returns Full job details or undefined if not found
1150
1167
  */
1151
- getJobDetail(jobId: string): Promise<JobDetail | undefined>;
1168
+ getJobDetail(jobId: string, signal?: AbortSignal): Promise<JobDetail | undefined>;
1152
1169
  /**
1153
1170
  * Gets a job's output assets, each resolved to a real asset entity with
1154
1171
  * per-output node context. Returns an empty list when the endpoint is
@@ -1229,7 +1246,7 @@ export declare class ComfyApi extends EventTarget {
1229
1246
  /**
1230
1247
  * Stores a setting for the current user
1231
1248
  */
1232
- storeSetting(id: keyof Settings, value: Settings[keyof Settings]): Promise<Response>;
1249
+ storeSetting(id: keyof Settings, value: Settings[keyof Settings], options?: Pick<RequestInit, 'keepalive'>): Promise<Response>;
1233
1250
  /**
1234
1251
  * Gets a user data file for the current user
1235
1252
  */
@@ -1298,12 +1315,6 @@ export declare class ComfyApi extends EventTarget {
1298
1315
 
1299
1316
  declare type ComfyApiWorkflow = z.infer<typeof zComfyApiWorkflow>;
1300
1317
 
1301
- /**
1302
- * The public surface of the application singleton created in
1303
- * `@/scripts/app`. Modules that the app itself imports reach the running
1304
- * instance through `useApp()` from `@/scripts/appInstance`; only the
1305
- * composition root imports the class.
1306
- */
1307
1318
  export declare interface ComfyApp {
1308
1319
  vueAppReady: boolean;
1309
1320
  readonly api: ComfyApi;
@@ -1358,6 +1369,7 @@ export declare interface ComfyApp {
1358
1369
  getRandParam(): string;
1359
1370
  setup(canvasEl: HTMLCanvasElement): Promise<void>;
1360
1371
  getNodeDefs(): Promise<Record<string, ComfyNodeDef>>;
1372
+ fetchNodeDefs(): Promise<NodeDefsFetch>;
1361
1373
  registerNodes(): Promise<void>;
1362
1374
  registerNodeDef(nodeId: string, nodeDef: ComfyNodeDef): Promise<void>;
1363
1375
  registerNodesFromDefs(defs: Record<string, ComfyNodeDef>): Promise<void>;
@@ -1395,7 +1407,7 @@ export declare interface ComfyApp {
1395
1407
  registerExtension(extension: ComfyExtension): void;
1396
1408
  collectCanvasMenuItems(canvas: LGraphCanvas): IContextMenuValue[];
1397
1409
  collectNodeMenuItems(node: LGraphNode): IContextMenuValue[];
1398
- reloadNodeDefs(): Promise<void>;
1410
+ reloadNodeDefs(defs?: Record<string, ComfyNodeDef>): Promise<boolean>;
1399
1411
  refreshComboInNodes(): Promise<void>;
1400
1412
  clean(): void;
1401
1413
  clientPosToCanvasPos(pos: Vector2): Vector2;
@@ -1500,6 +1512,7 @@ export declare interface ComfyExtension {
1500
1512
  * The name of the extension
1501
1513
  */
1502
1514
  name: string;
1515
+ provenance?: ExtensionProvenance;
1503
1516
  /**
1504
1517
  * The commands defined by the extension
1505
1518
  */
@@ -1662,6 +1675,8 @@ declare class ComfyList {
1662
1675
 
1663
1676
  export { ComfyNodeDef }
1664
1677
 
1678
+ declare type ComfyNodeDef_2 = z.infer<typeof zComfyNodeDef>;
1679
+
1665
1680
  declare class ComfyPopup extends EventTarget {
1666
1681
  element: HTMLElement;
1667
1682
  open: boolean;
@@ -1762,7 +1777,11 @@ declare class ComfyUI {
1762
1777
  queueSize: Element;
1763
1778
  restoreMenuPosition: () => void;
1764
1779
  loadFile: () => void;
1780
+ private readonly lifetime;
1781
+ private fileInput;
1765
1782
  constructor(app: LegacyUIApp, host: LegacyMenuHost);
1783
+ /** Removes the legacy menu and dialogs and stops their listeners. */
1784
+ dispose(): void;
1766
1785
  setup(containerElement: HTMLElement): void;
1767
1786
  setStatus(status: StatusWsMessageStatus | null): void;
1768
1787
  }
@@ -2444,15 +2463,22 @@ declare class CompositorWidget extends VueOnlyWidget<ICompositorWidget> implemen
2444
2463
 
2445
2464
  declare type CompositorWidgetValue = Partial<CompositorLayerState>;
2446
2465
 
2466
+ declare const CONFIG: unique symbol;
2467
+
2468
+ declare type ConfirmationDialogType = 'default' | 'overwrite' | 'overwriteBlueprint' | 'delete' | 'dirtyClose' | 'reinstall' | 'info';
2469
+
2447
2470
  declare type ConfirmOptions = BaseConfirmOptions & ({
2448
2471
  /** Pre-configured dialog type */
2449
2472
  type: 'dirtyClose';
2450
2473
  /** Override the deny button label. Defaults to `g.no`. */
2451
2474
  denyLabel?: string;
2475
+ /** Override the save button label. Defaults to `g.save`. */
2476
+ confirmLabel?: string;
2452
2477
  } | {
2453
2478
  /** Pre-configured dialog type */
2454
2479
  type?: Exclude<ConfirmationDialogType, 'dirtyClose'>;
2455
2480
  denyLabel?: never;
2481
+ confirmLabel?: never;
2456
2482
  });
2457
2483
 
2458
2484
  declare interface ConnectByTypeOptions {
@@ -2466,7 +2492,7 @@ declare interface ConnectByTypeOptions {
2466
2492
  afterRerouteId?: RerouteId;
2467
2493
  }
2468
2494
 
2469
- declare interface ConnectingLink extends IInputOrOutput {
2495
+ export declare interface ConnectingLink extends IInputOrOutput {
2470
2496
  node: RegisteredLGraphNode;
2471
2497
  slot: SlotIndex;
2472
2498
  pos: Point;
@@ -2508,14 +2534,14 @@ declare class ConstrainedSize {
2508
2534
  toSize(): Size;
2509
2535
  }
2510
2536
 
2511
- declare interface ContextMenu<TValue = unknown> {
2537
+ export declare interface ContextMenu<TValue = unknown> {
2512
2538
  constructor: new (...args: ConstructorParameters<typeof ContextMenu<TValue>>) => ContextMenu<TValue>;
2513
2539
  }
2514
2540
 
2515
2541
  /**
2516
2542
  * ContextMenu from LiteGUI
2517
2543
  */
2518
- declare class ContextMenu<TValue = unknown> {
2544
+ export declare class ContextMenu<TValue = unknown> {
2519
2545
  options: IContextMenuOptions<TValue>;
2520
2546
  parentMenu?: ContextMenu<TValue>;
2521
2547
  root: ContextMenuDivElement<TValue>;
@@ -2604,7 +2630,7 @@ export declare function createNodeExecutionId(nodeIds: readonly SerializedNodeId
2604
2630
  export declare function createNodeLocatorId(subgraphUuid: string | null, localNodeId: SerializedNodeId): NodeLocatorId;
2605
2631
 
2606
2632
  /** Options for {@link LiteGraphGlobal.createNode}. Shallow-copied onto the new node. */
2607
- declare interface CreateNodeOptions {
2633
+ export declare interface CreateNodeOptions {
2608
2634
  pos?: Point;
2609
2635
  size?: Size;
2610
2636
  properties?: Dictionary<NodeProperty | undefined>;
@@ -2632,6 +2658,13 @@ declare interface CreateNodeOptions {
2632
2658
  */
2633
2659
  declare function createUuidv4(): UUID;
2634
2660
 
2661
+ declare const CURVE_INTERPOLATIONS: readonly ["monotone_cubic", "linear"];
2662
+
2663
+ declare interface CurveData {
2664
+ points: CurvePoint[];
2665
+ interpolation: CurveInterpolation;
2666
+ }
2667
+
2635
2668
  declare class CurveEditor {
2636
2669
  points: Point[];
2637
2670
  selected: number;
@@ -2649,6 +2682,10 @@ declare class CurveEditor {
2649
2682
  getCloserPoint(pos: Point, max_dist: number): number;
2650
2683
  }
2651
2684
 
2685
+ declare type CurveInterpolation = (typeof CURVE_INTERPOLATIONS)[number];
2686
+
2687
+ declare type CurvePoint = [x: number, y: number];
2688
+
2652
2689
  declare class CurveWidget extends BaseWidget<ICurveWidget> implements ICurveWidget {
2653
2690
  drawWidget(ctx: CanvasRenderingContext2D, options: DrawWidgetOptions): void;
2654
2691
  onClick(_options: WidgetEventOptions): void;
@@ -2736,6 +2773,14 @@ declare interface DefaultConnectionColors {
2736
2773
  getDisconnectedColor(type: ISlotType): CanvasColour;
2737
2774
  }
2738
2775
 
2776
+ declare interface DeselectAllOptions {
2777
+ keepSelected?: Positionable;
2778
+ notify?: boolean;
2779
+ }
2780
+
2781
+ /** `switchWorkspace` is absent on Desktop builds before Comfy-Desktop #1671. */
2782
+ export declare type DesktopHostAuthBridge = Omit<ComfyDesktop2AuthBridge, 'switchWorkspace'> & Partial<Pick<ComfyDesktop2AuthBridge, 'switchWorkspace'>>;
2783
+
2739
2784
  export declare type DeviceStats = Required<SystemStatsResponse['devices'][number]> & {
2740
2785
  index: number;
2741
2786
  torch_vram_total: number;
@@ -2771,6 +2816,22 @@ declare interface DialogComponentProps {
2771
2816
  size?: DialogContentSize;
2772
2817
  }
2773
2818
 
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
+
2774
2835
  declare interface DialogInstance {
2775
2836
  key: string;
2776
2837
  visible: boolean;
@@ -2833,8 +2894,8 @@ export declare interface DOMWidgetOptions<V extends object | string> extends IWi
2833
2894
  * The resize logic has been upstreamed to litegraph in
2834
2895
  * https://github.com/Comfy-Org/ComfyUI_frontend/pull/2557
2835
2896
  */
2836
- beforeResize?: (this: BaseDOMWidget<V>, node: LGraphNode) => void;
2837
- afterResize?: (this: BaseDOMWidget<V>, node: LGraphNode) => void;
2897
+ beforeResize?: (this: BaseDOMWidget<V>, node: RegisteredLGraphNode) => void;
2898
+ afterResize?: (this: BaseDOMWidget<V>, node: RegisteredLGraphNode) => void;
2838
2899
  }
2839
2900
 
2840
2901
  declare interface DowngradeToPersonalResult {
@@ -2842,7 +2903,7 @@ declare interface DowngradeToPersonalResult {
2842
2903
  response: SettledSubscribeResponse;
2843
2904
  }
2844
2905
 
2845
- declare class DragAndScale {
2906
+ export declare class DragAndScale {
2846
2907
  /**
2847
2908
  * The state of this DragAndScale instance.
2848
2909
  *
@@ -2954,7 +3015,7 @@ declare interface DrawWidgetsOptions {
2954
3015
  editorAlpha?: number;
2955
3016
  }
2956
3017
 
2957
- declare enum EaseFunction {
3018
+ export declare enum EaseFunction {
2958
3019
  EASE_IN_OUT_QUAD = "easeInOutQuad"
2959
3020
  }
2960
3021
 
@@ -2989,7 +3050,7 @@ declare type EventListeners<T> = {
2989
3050
  /**
2990
3051
  * Interface describing the data transfer objects used when compiling a graph for execution.
2991
3052
  */
2992
- declare type ExecutableLGraphNode = Omit<ExecutableNodeDTO, 'graph' | 'node' | 'subgraphNode'>;
3053
+ export declare type ExecutableLGraphNode = Omit<ExecutableNodeDTO, 'graph' | 'node' | 'subgraphNode'>;
2993
3054
 
2994
3055
  /**
2995
3056
  * Concrete implementation of {@link ExecutableLGraphNode}.
@@ -3004,7 +3065,7 @@ declare class ExecutableNodeDTO implements ExecutableLGraphNode {
3004
3065
  readonly nodesByExecutionId: Map<ExecutionId, ExecutableLGraphNode>;
3005
3066
  /** The actual subgraph instance that contains this node, otherwise undefined. */
3006
3067
  readonly subgraphNode?: RegisteredSubgraphNode | undefined;
3007
- applyToGraph?(...args: Parameters<NonNullable<typeof ExecutableNodeDTO.node.applyToGraph>>): ReturnType<NonNullable<typeof ExecutableNodeDTO.node.applyToGraph>>;
3068
+ applyToGraph?(...args: Parameters<NonNullable<RegisteredLGraphNode['applyToGraph']>>): ReturnType<NonNullable<RegisteredLGraphNode['applyToGraph']>>;
3008
3069
  /** The graph that this node is a part of. */
3009
3070
  readonly graph: RegisteredLGraph | RegisteredSubgraph;
3010
3071
  inputs: {
@@ -3117,7 +3178,7 @@ declare interface ExecutionErrorWsMessage extends ExecutionWsMessageBase {
3117
3178
  current_outputs?: unknown;
3118
3179
  }
3119
3180
 
3120
- declare type ExecutionId = string;
3181
+ export declare type ExecutionId = string;
3121
3182
 
3122
3183
  declare interface ExecutionInterruptedWsMessage extends ExecutionWsMessageBase {
3123
3184
  node_id: NodeId_2;
@@ -3142,7 +3203,7 @@ declare interface ExecutionWsMessageBase {
3142
3203
  * Defines a subgraph and its contents.
3143
3204
  * Can be referenced multiple times in a schema.
3144
3205
  */
3145
- declare interface ExportedSubgraph extends SerialisableGraph {
3206
+ export declare interface ExportedSubgraph extends SerialisableGraph {
3146
3207
  /** The display name of the subgraph. */
3147
3208
  name: string;
3148
3209
  /** Optional category for organizing subgraph blueprints in the node library. */
@@ -3160,7 +3221,7 @@ declare interface ExportedSubgraph extends SerialisableGraph {
3160
3221
  }
3161
3222
 
3162
3223
  /** A single instance of a subgraph; where it is used on a graph, any customisation to shape / colour etc. */
3163
- declare interface ExportedSubgraphInstance extends NodeSubgraphSharedProps {
3224
+ export declare interface ExportedSubgraphInstance extends NodeSubgraphSharedProps {
3164
3225
  /**
3165
3226
  * The ID of the actual subgraph definition.
3166
3227
  * @see {@link ExportedSubgraph.subgraphs}
@@ -3259,6 +3320,13 @@ export declare interface ExtensionManager {
3259
3320
 
3260
3321
  declare type ExtensionPayload = Record<string, unknown>;
3261
3322
 
3323
+ declare interface ExtensionProvenance {
3324
+ createdBy: 'comfy-agent';
3325
+ threadId?: string;
3326
+ createdAt?: string;
3327
+ summary?: string;
3328
+ }
3329
+
3262
3330
  export { ExtensionsResponse }
3263
3331
 
3264
3332
  declare type FeatureFlagsWsMessage = Record<string, unknown>;
@@ -3389,6 +3457,8 @@ declare interface GesturePolicy {
3389
3457
  readonly doubleClickTime: number;
3390
3458
  }
3391
3459
 
3460
+ declare const GET_CONFIG: unique symbol;
3461
+
3392
3462
  declare type GlobalSubgraphData = {
3393
3463
  name: string;
3394
3464
  info: {
@@ -3466,7 +3536,7 @@ declare interface Hoverable extends HasBoundingRect {
3466
3536
  onPointerLeave?(e?: CanvasPointerEvent): void;
3467
3537
  }
3468
3538
 
3469
- declare interface IAssetWidget extends IBaseWidget<string, 'asset', IWidgetAssetOptions> {
3539
+ export declare interface IAssetWidget extends IBaseWidget<string, 'asset', IWidgetAssetOptions> {
3470
3540
  type: 'asset';
3471
3541
  value: string;
3472
3542
  }
@@ -3478,7 +3548,7 @@ declare interface IAssetWidget extends IBaseWidget<string, 'asset', IWidgetAsset
3478
3548
  * @template TOptions The options for this widget.
3479
3549
  * @see IWidget
3480
3550
  */
3481
- declare interface IBaseWidget<TValue = WidgetValue, TType extends string = string, TOptions extends IWidgetOptions = IWidgetOptions> {
3551
+ export declare interface IBaseWidget<TValue = WidgetValue, TType extends string = string, TOptions extends IWidgetOptions = IWidgetOptions> {
3482
3552
  [symbol: symbol]: boolean;
3483
3553
  linkedWidgets?: IBaseWidget[];
3484
3554
  readonly widgetId?: WidgetId;
@@ -3606,9 +3676,18 @@ declare interface IBaseWidget<TValue = WidgetValue, TType extends string = strin
3606
3676
  * not process it any further.
3607
3677
  */
3608
3678
  onPointerDown?(pointer: CanvasPointer, node: RegisteredLGraphNode, canvas: RegisteredLGraphCanvas): boolean;
3679
+ onRemove?(): void;
3680
+ beforeQueued?(options?: WidgetCallbackOptions): unknown;
3681
+ afterQueued?(options?: WidgetCallbackOptions): unknown;
3682
+ serializeValue?(node: RegisteredExecutableLGraphNode | RegisteredLGraphNode, index: number): unknown;
3683
+ /**
3684
+ * Refreshes the widget's value or options from its remote source.
3685
+ */
3686
+ refresh?(): unknown;
3687
+ dynamicPrompts?: boolean;
3609
3688
  }
3610
3689
 
3611
- declare interface IBooleanWidget extends IBaseWidget<boolean, 'toggle'> {
3690
+ export declare interface IBooleanWidget extends IBaseWidget<boolean, 'toggle'> {
3612
3691
  type: 'toggle';
3613
3692
  value: boolean;
3614
3693
  }
@@ -3620,18 +3699,18 @@ declare interface IBoundaryNodes {
3620
3699
  left: RegisteredLGraphNode;
3621
3700
  }
3622
3701
 
3623
- declare interface IBoundingBoxesWidget extends IBaseWidget<BoundingBox[], 'boundingboxes'> {
3702
+ export declare interface IBoundingBoxesWidget extends IBaseWidget<BoundingBox[], 'boundingboxes'> {
3624
3703
  type: 'boundingboxes';
3625
3704
  value: BoundingBox[];
3626
3705
  }
3627
3706
 
3628
3707
  /** Bounding box widget for defining regions with numeric inputs */
3629
- declare interface IBoundingBoxWidget extends IBaseWidget<Bounds, 'boundingbox'> {
3708
+ export declare interface IBoundingBoxWidget extends IBaseWidget<Bounds, 'boundingbox'> {
3630
3709
  type: 'boundingbox';
3631
3710
  value: Bounds;
3632
3711
  }
3633
3712
 
3634
- declare interface IButtonWidget extends IBaseWidget<string | undefined, 'button'> {
3713
+ export declare interface IButtonWidget extends IBaseWidget<string | undefined, 'button'> {
3635
3714
  type: 'button';
3636
3715
  value: string | undefined;
3637
3716
  clicked: boolean;
@@ -3646,7 +3725,7 @@ declare interface ICanvasPosition {
3646
3725
  }
3647
3726
 
3648
3727
  /** Chart widget for displaying data visualizations */
3649
- declare interface IChartWidget extends IBaseWidget<object, 'chart'> {
3728
+ export declare interface IChartWidget extends IBaseWidget<object, 'chart'> {
3650
3729
  type: 'chart';
3651
3730
  value: object;
3652
3731
  }
@@ -3658,33 +3737,33 @@ declare interface ICloseable {
3658
3737
  /**
3659
3738
  * An object that can be colored with a {@link ColorOption}.
3660
3739
  */
3661
- declare interface IColorable {
3740
+ export declare interface IColorable {
3662
3741
  setColorOption(colorOption: ColorOption | null): void;
3663
3742
  getColorOption(): ColorOption | null;
3664
3743
  }
3665
3744
 
3666
- declare interface IColorsWidget extends IBaseWidget<string[], 'colors'> {
3745
+ export declare interface IColorsWidget extends IBaseWidget<string[], 'colors'> {
3667
3746
  type: 'colors';
3668
3747
  value: string[];
3669
3748
  }
3670
3749
 
3671
- declare interface IColorWidget extends IBaseWidget<string | number, 'color', IColorWidgetOptions> {
3750
+ export declare interface IColorWidget extends IBaseWidget<string | number, 'color', IColorWidgetOptions> {
3672
3751
  type: 'color';
3673
3752
  value: string | number;
3674
3753
  }
3675
3754
 
3676
3755
  /** Color picker widget for selecting colors */
3677
- declare interface IColorWidgetOptions extends IWidgetOptions {
3756
+ export declare interface IColorWidgetOptions extends IWidgetOptions {
3678
3757
  format?: ColorFormat | 'int';
3679
3758
  }
3680
3759
 
3681
3760
  /** A combo-box widget (dropdown, select, etc) */
3682
- declare interface IComboWidget extends IBaseWidget<string | number, 'combo', RequiredProps<IWidgetOptions<ComboWidgetValues>, 'values'>> {
3761
+ export declare interface IComboWidget extends IBaseWidget<string | number, 'combo', RequiredProps<IWidgetOptions<ComboWidgetValues>, 'values'>> {
3683
3762
  type: 'combo';
3684
3763
  value: string | number;
3685
3764
  }
3686
3765
 
3687
- declare interface ICompositorWidget extends IBaseWidget<CompositorWidgetValue, 'compositor'> {
3766
+ export declare interface ICompositorWidget extends IBaseWidget<CompositorWidgetValue, 'compositor'> {
3688
3767
  type: 'compositor';
3689
3768
  value: CompositorWidgetValue;
3690
3769
  }
@@ -3694,7 +3773,7 @@ declare interface IContextMenuBase {
3694
3773
  className?: string;
3695
3774
  }
3696
3775
 
3697
- declare interface IContextMenuOptions<TValue = unknown, TExtra = unknown> extends IContextMenuBase {
3776
+ export declare interface IContextMenuOptions<TValue = unknown, TExtra = unknown> extends IContextMenuBase {
3698
3777
  ignore_item_callbacks?: boolean;
3699
3778
  parentMenu?: RegisteredContextMenu<TValue>;
3700
3779
  event?: MouseEvent;
@@ -3714,7 +3793,7 @@ declare interface IContextMenuSubmenu<TValue = unknown> extends IContextMenuOpti
3714
3793
  options: ConstructorParameters<RegisteredContextMenu<TValue>['constructor']>[0];
3715
3794
  }
3716
3795
 
3717
- declare interface IContextMenuValue<TValue = unknown, TExtra = unknown, TCallbackValue = unknown> extends IContextMenuBase {
3796
+ export declare interface IContextMenuValue<TValue = unknown, TExtra = unknown, TCallbackValue = unknown> extends IContextMenuBase {
3718
3797
  value?: TValue;
3719
3798
  content: string | undefined;
3720
3799
  has_submenu?: boolean;
@@ -3762,7 +3841,7 @@ declare interface ICreatePanelOptions {
3762
3841
  height?: number | string;
3763
3842
  }
3764
3843
 
3765
- declare interface ICurveWidget extends IBaseWidget<CurveData, 'curve'> {
3844
+ export declare interface ICurveWidget extends IBaseWidget<CurveData, 'curve'> {
3766
3845
  type: 'curve';
3767
3846
  value: CurveData;
3768
3847
  }
@@ -3825,7 +3904,7 @@ declare interface IDrawBoundingOptions {
3825
3904
  }
3826
3905
 
3827
3906
  /** File upload widget for selecting and uploading files */
3828
- declare interface IFileUploadWidget extends IBaseWidget<string, 'fileupload'> {
3907
+ export declare interface IFileUploadWidget extends IBaseWidget<string, 'fileupload'> {
3829
3908
  type: 'fileupload';
3830
3909
  value: string;
3831
3910
  label?: string;
@@ -3837,12 +3916,12 @@ declare interface IFoundSlot extends IInputOrOutput {
3837
3916
  }
3838
3917
 
3839
3918
  /** Gallery widget for displaying multiple images */
3840
- declare interface IGalleriaWidget extends IBaseWidget<string[], 'galleria'> {
3919
+ export declare interface IGalleriaWidget extends IBaseWidget<string[], 'galleria'> {
3841
3920
  type: 'galleria';
3842
3921
  value: string[];
3843
3922
  }
3844
3923
 
3845
- declare interface IGradientSliderWidget extends IBaseWidget<number, 'gradientslider', IWidgetGradientSliderOptions> {
3924
+ export declare interface IGradientSliderWidget extends IBaseWidget<number, 'gradientslider', IWidgetGradientSliderOptions> {
3846
3925
  type: 'gradientslider';
3847
3926
  value: number;
3848
3927
  }
@@ -3852,13 +3931,13 @@ declare interface IGraphGroupFlags extends Record<string, unknown> {
3852
3931
  }
3853
3932
 
3854
3933
  /** Image comparison widget for comparing two images side by side */
3855
- declare interface IImageCompareWidget extends IBaseWidget<string[], 'imagecompare'> {
3934
+ export declare interface IImageCompareWidget extends IBaseWidget<string[], 'imagecompare'> {
3856
3935
  type: 'imagecompare';
3857
3936
  value: string[];
3858
3937
  }
3859
3938
 
3860
3939
  /** Image crop widget for cropping image */
3861
- declare interface IImageCropWidget extends IBaseWidget<Bounds, 'imagecrop'> {
3940
+ export declare interface IImageCropWidget extends IBaseWidget<Bounds, 'imagecrop'> {
3862
3941
  type: 'imagecrop';
3863
3942
  value: Bounds;
3864
3943
  }
@@ -3874,7 +3953,7 @@ declare interface IInputOrOutput {
3874
3953
  output?: INodeOutputSlot | null;
3875
3954
  }
3876
3955
 
3877
- declare interface IKnobWidget extends IBaseWidget<number, 'knob', IWidgetKnobOptions> {
3956
+ export declare interface IKnobWidget extends IBaseWidget<number, 'knob', IWidgetKnobOptions> {
3878
3957
  type: 'knob';
3879
3958
  value: number;
3880
3959
  options: IWidgetKnobOptions;
@@ -3903,7 +3982,7 @@ declare class ImageCropWidget extends BaseWidget<IImageCropWidget> implements II
3903
3982
  }
3904
3983
 
3905
3984
  /** Markdown widget for displaying formatted text */
3906
- declare interface IMarkdownWidget extends IBaseWidget<string, 'markdown'> {
3985
+ export declare interface IMarkdownWidget extends IBaseWidget<string, 'markdown'> {
3907
3986
  type: 'markdown';
3908
3987
  value: string;
3909
3988
  }
@@ -3915,12 +3994,12 @@ declare interface IMouseOverData {
3915
3994
  }
3916
3995
 
3917
3996
  /** Multi-select widget for selecting multiple options */
3918
- declare interface IMultiSelectWidget extends IBaseWidget<string[], 'multiselect'> {
3997
+ export declare interface IMultiSelectWidget extends IBaseWidget<string[], 'multiselect'> {
3919
3998
  type: 'multiselect';
3920
3999
  value: string[];
3921
4000
  }
3922
4001
 
3923
- declare interface INodeFlags {
4002
+ export declare interface INodeFlags {
3924
4003
  skip_repeated_outputs?: boolean;
3925
4004
  allow_interaction?: boolean;
3926
4005
  pinned?: boolean;
@@ -3931,7 +4010,7 @@ declare interface INodeFlags {
3931
4010
  ghost?: boolean;
3932
4011
  }
3933
4012
 
3934
- declare interface INodeInputSlot extends INodeSlot {
4013
+ export declare interface INodeInputSlot extends INodeSlot {
3935
4014
  /**
3936
4015
  * @deprecated Id of the link targeting this slot, derived from the link
3937
4016
  * store by a warning getter. Read via `node.isInputConnected(slot)` /
@@ -3954,7 +4033,7 @@ declare interface INodeInputSlot extends INodeSlot {
3954
4033
  _pendingDemotionToken?: symbol;
3955
4034
  }
3956
4035
 
3957
- declare interface INodeOutputSlot extends INodeSlot {
4036
+ export declare interface INodeOutputSlot extends INodeSlot {
3958
4037
  /**
3959
4038
  * @deprecated Ids of the links leaving this slot, derived from the link
3960
4039
  * store by a warning getter. Read via `node.isOutputConnected(slot)` /
@@ -3963,6 +4042,8 @@ declare interface INodeOutputSlot extends INodeSlot {
3963
4042
  */
3964
4043
  links?: LinkId[] | null;
3965
4044
  _data?: unknown;
4045
+ /** Widget config stored on its output by the Primitive node. */
4046
+ widget?: IWidgetLocator;
3966
4047
  }
3967
4048
 
3968
4049
  declare interface INodePropertyInfo {
@@ -3974,7 +4055,7 @@ declare interface INodePropertyInfo {
3974
4055
  values?: string[] | Record<string, TWidgetValue>;
3975
4056
  }
3976
4057
 
3977
- declare interface INodeSlot extends HasBoundingRect {
4058
+ export declare interface INodeSlot extends HasBoundingRect {
3978
4059
  /**
3979
4060
  * The name of the slot in English.
3980
4061
  * Will be included in the serialized data.
@@ -4078,7 +4159,7 @@ declare interface InputMapSetValue {
4078
4159
  export { InputSpec }
4079
4160
 
4080
4161
  /** Any widget that uses a numeric backing */
4081
- declare interface INumericWidget extends IBaseWidget<number, 'number'> {
4162
+ export declare interface INumericWidget extends IBaseWidget<number, 'number'> {
4082
4163
  type: 'number';
4083
4164
  value: number;
4084
4165
  }
@@ -4094,7 +4175,7 @@ declare interface IOffsetWorkaround {
4094
4175
  safeOffsetY: number;
4095
4176
  }
4096
4177
 
4097
- declare interface IPainterWidget extends IBaseWidget<string, 'painter'> {
4178
+ export declare interface IPainterWidget extends IBaseWidget<string, 'painter'> {
4098
4179
  type: 'painter';
4099
4180
  value: string;
4100
4181
  }
@@ -4118,30 +4199,30 @@ declare interface IPinnable {
4118
4199
  unpin(): void;
4119
4200
  }
4120
4201
 
4121
- declare interface IRangeWidget extends IBaseWidget<RangeValue, 'range', IWidgetRangeOptions> {
4202
+ export declare interface IRangeWidget extends IBaseWidget<RangeValue, 'range', IWidgetRangeOptions> {
4122
4203
  type: 'range';
4123
4204
  value: RangeValue;
4124
4205
  }
4125
4206
 
4126
- declare interface IResolutionPreviewWidget extends IBaseWidget<null, 'resolutionpreview', IWidgetResolutionPreviewOptions> {
4207
+ export declare interface IResolutionPreviewWidget extends IBaseWidget<null, 'resolutionpreview', IWidgetResolutionPreviewOptions> {
4127
4208
  type: 'resolutionpreview';
4128
4209
  value: null;
4129
4210
  }
4130
4211
 
4131
4212
  /** Select button widget for selecting from a group of buttons */
4132
- declare interface ISelectButtonWidget extends IBaseWidget<string, 'selectbutton', RequiredProps<IWidgetOptions<string[]>, 'values'>> {
4213
+ export declare interface ISelectButtonWidget extends IBaseWidget<string, 'selectbutton', RequiredProps<IWidgetOptions<string[]>, 'values'>> {
4133
4214
  type: 'selectbutton';
4134
4215
  value: string;
4135
4216
  }
4136
4217
 
4137
- declare type ISerialisableNodeInput = Omit<INodeInputSlot, 'boundingRect' | 'widget' | 'link'> & {
4218
+ export declare type ISerialisableNodeInput = Omit<INodeInputSlot, 'boundingRect' | 'widget' | 'link'> & {
4138
4219
  link?: number | null;
4139
4220
  widget?: {
4140
4221
  name: string;
4141
4222
  };
4142
4223
  };
4143
4224
 
4144
- declare type ISerialisableNodeOutput = Omit<INodeOutputSlot, 'boundingRect' | '_data' | 'links'> & {
4225
+ export declare type ISerialisableNodeOutput = Omit<INodeOutputSlot, 'boundingRect' | '_data' | 'links'> & {
4145
4226
  links?: number[] | null;
4146
4227
  widget?: {
4147
4228
  name: string;
@@ -4152,7 +4233,7 @@ declare type ISerialisableNodeOutput = Omit<INodeOutputSlot, 'boundingRect' | '_
4152
4233
  * Original implementation from static litegraph.d.ts
4153
4234
  * Maintained for backwards compat
4154
4235
  */
4155
- declare interface ISerialisedGraph extends BaseExportedGraph {
4236
+ export declare interface ISerialisedGraph extends BaseExportedGraph {
4156
4237
  last_node_id: SerializedNodeId;
4157
4238
  last_link_id: number;
4158
4239
  nodes: ISerialisedNode[];
@@ -4164,7 +4245,7 @@ declare interface ISerialisedGraph extends BaseExportedGraph {
4164
4245
  }
4165
4246
 
4166
4247
  /** Serialised LGraphGroup */
4167
- declare interface ISerialisedGroup {
4248
+ export declare interface ISerialisedGroup {
4168
4249
  id: number;
4169
4250
  title: string;
4170
4251
  bounding: number[];
@@ -4174,7 +4255,7 @@ declare interface ISerialisedGroup {
4174
4255
  }
4175
4256
 
4176
4257
  /** Serialised LGraphNode */
4177
- declare interface ISerialisedNode {
4258
+ export declare interface ISerialisedNode {
4178
4259
  title?: string;
4179
4260
  id: SerializedNodeId;
4180
4261
  type: string;
@@ -4233,7 +4314,7 @@ declare interface IShowSearchOptions {
4233
4314
  */
4234
4315
  declare function isInsideRectangle(x: number, y: number, left: number, top: number, width: number, height: number): boolean;
4235
4316
 
4236
- declare interface ISliderWidget extends IBaseWidget<number, 'slider', IWidgetSliderOptions> {
4317
+ export declare interface ISliderWidget extends IBaseWidget<number, 'slider', IWidgetSliderOptions> {
4237
4318
  type: 'slider';
4238
4319
  value: number;
4239
4320
  marker?: number;
@@ -4244,7 +4325,7 @@ declare interface ISliderWidget extends IBaseWidget<number, 'slider', IWidgetSli
4244
4325
  *
4245
4326
  * Multiple allowed types may be comma-delimited or stored as an array.
4246
4327
  */
4247
- declare type ISlotType = number | string | string[];
4328
+ export declare type ISlotType = number | string | string[];
4248
4329
 
4249
4330
  /**
4250
4331
  * Type guard to check if a value is a NodeExecutionId
@@ -4257,13 +4338,13 @@ export declare function isNodeExecutionId(value: unknown): value is NodeExecutio
4257
4338
  export declare function isNodeLocatorId(value: unknown): value is NodeLocatorId;
4258
4339
 
4259
4340
  /** Avoids the type issues with the legacy IComboWidget type */
4260
- declare interface IStringComboWidget extends IBaseWidget<string, 'combo', RequiredProps<IWidgetOptions<string[]>, 'values'>> {
4341
+ export declare interface IStringComboWidget extends IBaseWidget<string, 'combo', RequiredProps<IWidgetOptions<string[]>, 'values'>> {
4261
4342
  type: 'combo';
4262
4343
  value: string;
4263
4344
  }
4264
4345
 
4265
4346
  /** A widget with a string value */
4266
- declare interface IStringWidget extends IBaseWidget<string, 'string' | 'text', IWidgetOptions<string[]>> {
4347
+ export declare interface IStringWidget extends IBaseWidget<string, 'string' | 'text', IWidgetOptions<string[]>> {
4267
4348
  type: 'string' | 'text';
4268
4349
  value: string;
4269
4350
  }
@@ -4283,18 +4364,18 @@ declare interface ItemLocator {
4283
4364
  }
4284
4365
 
4285
4366
  /** Textarea widget for multi-line text input */
4286
- declare interface ITextareaWidget extends IBaseWidget<string, 'textarea'> {
4367
+ export declare interface ITextareaWidget extends IBaseWidget<string, 'textarea'> {
4287
4368
  type: 'textarea';
4288
4369
  value: string;
4289
4370
  }
4290
4371
 
4291
4372
  /** Tree select widget for hierarchical selection */
4292
- declare interface ITreeSelectWidget extends IBaseWidget<string | string[], 'treeselect'> {
4373
+ export declare interface ITreeSelectWidget extends IBaseWidget<string | string[], 'treeselect'> {
4293
4374
  type: 'treeselect';
4294
4375
  value: string | string[];
4295
4376
  }
4296
4377
 
4297
- declare interface IVideoEditWidget extends IBaseWidget<VideoEditValue, 'videoedit', IWidgetVideoEditOptions> {
4378
+ export declare interface IVideoEditWidget extends IBaseWidget<VideoEditValue, 'videoedit', IWidgetVideoEditOptions> {
4298
4379
  type: 'videoedit';
4299
4380
  value: VideoEditValue;
4300
4381
  }
@@ -4307,13 +4388,13 @@ declare interface IVideoEditWidget extends IBaseWidget<VideoEditValue, 'videoedi
4307
4388
  * Recommend declaration merging any properties that use IWidget (e.g. {@link LGraphNode.widgets}) with a new type alias.
4308
4389
  * @see ICustomWidget
4309
4390
  */
4310
- 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;
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;
4311
4392
 
4312
- declare interface IWidgetAssetOptions extends IWidgetOptions {
4393
+ export declare interface IWidgetAssetOptions extends IWidgetOptions {
4313
4394
  openModal: (widget: IBaseWidget) => void;
4314
4395
  }
4315
4396
 
4316
- declare interface IWidgetGradientSliderOptions extends IWidgetOptions<number[]> {
4397
+ export declare interface IWidgetGradientSliderOptions extends IWidgetOptions<number[]> {
4317
4398
  min: number;
4318
4399
  max: number;
4319
4400
  step2: number;
@@ -4329,18 +4410,15 @@ declare interface IWidgetKnobOptions extends IWidgetOptions<number[]> {
4329
4410
  gradient_stops?: string;
4330
4411
  }
4331
4412
 
4332
- /**
4333
- * A widget that is linked to a slot.
4334
- *
4335
- * This is set by the ComfyUI_frontend logic. See
4336
- * https://github.com/Comfy-Org/ComfyUI_frontend/blob/b80e0e1a3c74040f328c4e344326c969c97f67e0/src/extensions/core/widgetInputs.ts#L659
4337
- */
4338
- declare interface IWidgetLocator {
4413
+ /** Identifies the widget a slot is linked to. */
4414
+ export declare interface IWidgetLocator {
4339
4415
  name: string;
4340
4416
  type?: string;
4417
+ [CONFIG]?: InputSpec;
4418
+ [GET_CONFIG]?: () => InputSpec | undefined;
4341
4419
  }
4342
4420
 
4343
- declare interface IWidgetOptions<TValues = unknown> {
4421
+ export declare interface IWidgetOptions<TValues = unknown> {
4344
4422
  on?: string;
4345
4423
  off?: string;
4346
4424
  max?: number;
@@ -4386,6 +4464,15 @@ declare interface IWidgetOptions<TValues = unknown> {
4386
4464
  * @see IBaseWidget.serialize — workflow persistence
4387
4465
  */
4388
4466
  serialize?: boolean;
4467
+ /**
4468
+ * Rounding value for numeric float widgets.
4469
+ */
4470
+ round?: number;
4471
+ /**
4472
+ * The minimum size of the node if the widget is present.
4473
+ */
4474
+ minNodeSize?: Size;
4475
+ advanced?: boolean;
4389
4476
  values?: TValues;
4390
4477
  /** Optional function to format values for display (e.g., hash → human-readable name) */
4391
4478
  getOptionLabel?: (value?: string | null) => string;
@@ -4397,7 +4484,7 @@ declare interface IWidgetOptions<TValues = unknown> {
4397
4484
  hidden?: boolean;
4398
4485
  }
4399
4486
 
4400
- declare interface IWidgetRangeOptions extends IWidgetOptions {
4487
+ export declare interface IWidgetRangeOptions extends IWidgetOptions {
4401
4488
  display?: 'plain' | 'gradient' | 'histogram';
4402
4489
  gradient_stops?: ColorStop[];
4403
4490
  show_midpoint?: boolean;
@@ -4406,7 +4493,7 @@ declare interface IWidgetRangeOptions extends IWidgetOptions {
4406
4493
  value_max?: number;
4407
4494
  }
4408
4495
 
4409
- declare interface IWidgetResolutionPreviewOptions extends IWidgetOptions {
4496
+ export declare interface IWidgetResolutionPreviewOptions extends IWidgetOptions {
4410
4497
  ratio_widget?: string;
4411
4498
  megapixels_widget?: string;
4412
4499
  multiple_widget?: string;
@@ -4420,7 +4507,7 @@ declare interface IWidgetSliderOptions extends IWidgetOptions<number[]> {
4420
4507
  marker_color?: CanvasColour;
4421
4508
  }
4422
4509
 
4423
- declare interface IWidgetVideoEditOptions extends IWidgetOptions {
4510
+ export declare interface IWidgetVideoEditOptions extends IWidgetOptions {
4424
4511
  features?: VideoEditFeature[];
4425
4512
  }
4426
4513
 
@@ -4517,7 +4604,7 @@ declare class LegacyWidget<TWidget extends IBaseWidget = IBaseWidget> extends Ba
4517
4604
  onClick(): void;
4518
4605
  }
4519
4606
 
4520
- declare class LGraph implements LinkNetwork, BaseLGraph, Serialisable<SerialisableGraph> {
4607
+ export declare class LGraph implements LinkNetwork, BaseLGraph, Serialisable<SerialisableGraph> {
4521
4608
  static serialisedSchemaVersion: 1;
4522
4609
  static STATUS_STOPPED: number;
4523
4610
  static STATUS_RUNNING: number;
@@ -4554,7 +4641,7 @@ declare class LGraph implements LinkNetwork, BaseLGraph, Serialisable<Serialisab
4554
4641
  status: number;
4555
4642
  get state(): LGraphState;
4556
4643
  set state(value: LGraphState);
4557
- readonly events: CustomEventTarget<LGraphEventMap, "configured" | "configuring" | "subgraph-created" | "convert-to-subgraph" | "open-subgraph" | "node:added" | "node:before-removed" | "node:removed" | "node:property:changed" | "node:slot-label:changed">;
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">;
4558
4645
  readonly _subgraphs: Map<SubgraphId, Subgraph>;
4559
4646
  _nodes: (LGraphNode | SubgraphNode)[];
4560
4647
  _nodes_by_id: Partial<Record<NodeId, LGraphNode>>;
@@ -4953,7 +5040,7 @@ declare class LGraph implements LinkNetwork, BaseLGraph, Serialisable<Serialisab
4953
5040
  load(url: string | Blob | URL | File, callback?: () => void): void;
4954
5041
  }
4955
5042
 
4956
- declare class LGraphBadge_2 {
5043
+ export declare class LGraphBadge {
4957
5044
  text: string;
4958
5045
  fgColor: string;
4959
5046
  bgColor: string;
@@ -4965,9 +5052,10 @@ declare class LGraphBadge_2 {
4965
5052
  onClick?: (e: MouseEvent) => void;
4966
5053
  xOffset: number;
4967
5054
  yOffset: number;
5055
+ centerOnCapHeight: boolean;
4968
5056
  readonly _boundingRect: [number, number, number, number];
4969
5057
  get boundingRect(): ReadOnlyRect;
4970
- constructor({ text, fgColor, bgColor, fontSize, padding, height, cornerRadius, iconOptions, onClick, xOffset, yOffset }: LGraphBadgeOptions);
5058
+ constructor({ text, fgColor, bgColor, fontSize, padding, height, cornerRadius, iconOptions, onClick, xOffset, yOffset, centerOnCapHeight }: LGraphBadgeOptions);
4971
5059
  get visible(): boolean;
4972
5060
  getWidth(ctx: CanvasRenderingContext2D): number;
4973
5061
  draw(ctx: CanvasRenderingContext2D, x: number, y: number): void;
@@ -4985,9 +5073,11 @@ declare interface LGraphBadgeOptions {
4985
5073
  onClick?: (e: MouseEvent) => void;
4986
5074
  xOffset?: number;
4987
5075
  yOffset?: number;
5076
+ /** Centres the text on its cap height instead of the em box. */
5077
+ centerOnCapHeight?: boolean;
4988
5078
  }
4989
5079
 
4990
- declare class LGraphButton extends LGraphBadge_2 {
5080
+ declare class LGraphButton extends LGraphBadge {
4991
5081
  name?: string;
4992
5082
  _last_area: Rectangle;
4993
5083
  constructor(options: LGraphButtonOptions);
@@ -5010,7 +5100,7 @@ declare interface LGraphButtonOptions extends LGraphBadgeOptions {
5010
5100
  * This class is in charge of rendering one graph inside a canvas. And provides all the interaction required.
5011
5101
  * Valid callbacks are: onNodeSelected, onNodeDeselected, onShowNodePanel, onNodeDblClicked
5012
5102
  */
5013
- declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasEventMap> {
5103
+ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasEventMap> {
5014
5104
  static DEFAULT_BACKGROUND_IMAGE: string;
5015
5105
  static DEFAULT_EVENT_LINK_COLOR: string;
5016
5106
  /** Link type to colour dictionary. */
@@ -5317,6 +5407,9 @@ declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasEventMap
5317
5407
  onNodeMoved?: (node_dragged: LGraphNode | undefined) => void;
5318
5408
  /** @deprecated Called with the deprecated {@link selected_nodes} when the selection changes. Replacement not yet impl. */
5319
5409
  onSelectionChange?: (selected: Dictionary<Positionable>) => void;
5410
+ private selectionNotificationDepth;
5411
+ private withSelectionNotificationsSuppressed;
5412
+ private notifySelectionChange;
5320
5413
  /** called when rendering a tooltip */
5321
5414
  onDrawLinkTooltip?: (ctx: CanvasRenderingContext2D, link: LLink | null, canvas?: LGraphCanvas) => boolean;
5322
5415
  /** to render foreground objects not affected by transform (for GUIs) */
@@ -5604,15 +5697,20 @@ declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasEventMap
5604
5697
  /**
5605
5698
  * Selects a {@link Positionable} item.
5606
5699
  * @param item The canvas item to add to the selection.
5700
+ * @param options.notify `false` skips the {@link onSelectionChange} report; selection hooks still run.
5607
5701
  */
5608
- select<TPositionable extends Positionable = LGraphNode>(item: TPositionable, { selectGroupChildren }?: {
5702
+ select<TPositionable extends Positionable = LGraphNode>(item: TPositionable, { notify, selectGroupChildren }?: {
5703
+ notify?: boolean;
5609
5704
  selectGroupChildren?: boolean;
5610
5705
  }): void;
5611
5706
  /**
5612
5707
  * Deselects a {@link Positionable} item.
5613
5708
  * @param item The canvas item to remove from the selection.
5709
+ * @param options.notify `false` skips the {@link onSelectionChange} report; selection hooks still run.
5614
5710
  */
5615
- deselect<TPositionable extends Positionable = LGraphNode>(item: TPositionable): void;
5711
+ deselect<TPositionable extends Positionable = LGraphNode>(item: TPositionable, { notify }?: {
5712
+ notify?: boolean;
5713
+ }): void;
5616
5714
  /** @deprecated See {@link LGraphCanvas.processSelect} */
5617
5715
  processNodeSelected(item: LGraphNode, e: CanvasPointerEvent): void;
5618
5716
  /** @deprecated See {@link LGraphCanvas.select} */
@@ -5632,17 +5730,11 @@ declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasEventMap
5632
5730
  selectNodes(nodes?: LGraphNode[], add_to_current_selection?: boolean): void;
5633
5731
  /** @deprecated See {@link LGraphCanvas.deselect} */
5634
5732
  deselectNode(node: LGraphNode): void;
5635
- /**
5636
- * Deselects all items on the canvas.
5637
- * @param keepSelected If set, this item will not be removed from the selection.
5638
- */
5733
+ deselectAll(options?: DeselectAllOptions): void;
5734
+ /** @deprecated Pass `{ keepSelected }` instead. */
5639
5735
  deselectAll(keepSelected?: Positionable): void;
5640
5736
  /** @deprecated See {@link LGraphCanvas.deselectAll} */
5641
5737
  deselectAllNodes(): void;
5642
- /**
5643
- * Deletes all selected items from the graph.
5644
- * @todo Refactor deletion task to LGraph. Selection is a canvas property, delete is a graph action.
5645
- */
5646
5738
  deleteSelected(): void;
5647
5739
  /**
5648
5740
  * deletes all nodes in the current selection from the graph
@@ -5759,6 +5851,7 @@ declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasEventMap
5759
5851
  drawConnections(ctx: CanvasRenderingContext2D, nodesInFrameOrder?: LGraphNode[], nodesGraph?: RegisteredLGraph | RegisteredSubgraph | null): void;
5760
5852
  private getNodeModeAlpha;
5761
5853
  private _renderFloatingLinks;
5854
+ private _renderSnappingLink;
5762
5855
  private _renderAllLinkSegments;
5763
5856
  /**
5764
5857
  * Build LinkRenderContext from canvas properties
@@ -5826,7 +5919,7 @@ declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasEventMap
5826
5919
  showShowNodePanel(node: LGraphNode): void;
5827
5920
  checkPanels(): void;
5828
5921
  getCanvasMenuOptions(): (IContextMenuValue | null)[];
5829
- 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)[];
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)[];
5830
5923
  /** @deprecated */
5831
5924
  getGroupMenuOptions(group: LGraphGroup): (IContextMenuValue<string | null, unknown, unknown> | IContextMenuValue<string, unknown, unknown> | null)[];
5832
5925
  processContextMenu(node: LGraphNode | undefined, event: CanvasPointerEvent): void;
@@ -5854,12 +5947,12 @@ declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasEventMap
5854
5947
  };
5855
5948
  }
5856
5949
 
5857
- declare interface LGraphCanvas {
5950
+ export declare interface LGraphCanvas {
5858
5951
  /** @deprecated Use {@link LGraphCanvas.applyNodePositions} instead. */
5859
5952
  repositionNodesVueMode(positions: NewNodePosition[]): void;
5860
5953
  }
5861
5954
 
5862
- declare interface LGraphCanvasEventMap {
5955
+ export declare interface LGraphCanvasEventMap {
5863
5956
  /** The active graph has changed. */
5864
5957
  'litegraph:set-graph': {
5865
5958
  /** The new active graph. */
@@ -5943,7 +6036,7 @@ declare interface LGraphConfig {
5943
6036
  links_ontop?: boolean;
5944
6037
  }
5945
6038
 
5946
- declare interface LGraphEventMap {
6039
+ export declare interface LGraphEventMap {
5947
6040
  configuring: {
5948
6041
  /** The data that was used to configure the graph. */
5949
6042
  data: ISerialisedGraph | SerialisableGraph;
@@ -6014,7 +6107,7 @@ declare interface LGraphEventMap {
6014
6107
  };
6015
6108
  }
6016
6109
 
6017
- declare enum LGraphEventMode {
6110
+ export declare enum LGraphEventMode {
6018
6111
  ALWAYS = 0,
6019
6112
  ON_EVENT = 1,
6020
6113
  NEVER = 2,
@@ -6033,7 +6126,7 @@ declare interface LGraphExtra extends Dictionary<unknown> {
6033
6126
  workflowRendererVersion?: RendererType;
6034
6127
  }
6035
6128
 
6036
- declare class LGraphGroup implements Positionable, IPinnable, IColorable {
6129
+ export declare class LGraphGroup implements Positionable, IPinnable, IColorable {
6037
6130
  static minWidth: number;
6038
6131
  static minHeight: number;
6039
6132
  static resizeLength: number;
@@ -6163,11 +6256,12 @@ declare interface LGraphIconOptions {
6163
6256
  yOffset?: number;
6164
6257
  }
6165
6258
 
6166
- declare interface LGraphNode {
6259
+ export declare interface LGraphNode {
6167
6260
  constructor: LGraphNodeConstructor;
6261
+ addDOMWidget<T extends HTMLElement = HTMLElement, V extends object | string = string>(name: string, type: string, element: T, options?: DOMWidgetOptions<V>): DOMWidget<T, V>;
6168
6262
  }
6169
6263
 
6170
- declare class LGraphNode implements NodeLike, Positionable, IPinnable, IColorable {
6264
+ export declare class LGraphNode implements NodeLike, Positionable, IPinnable, IColorable {
6171
6265
  static title?: string;
6172
6266
  static MAX_CONSOLE?: number;
6173
6267
  static type?: string;
@@ -6293,7 +6387,7 @@ declare class LGraphNode implements NodeLike, Positionable, IPinnable, IColorabl
6293
6387
  * Extension-provided badges, drawn after the derived rows from
6294
6388
  * {@link badgeRows}. Thunks are re-evaluated every frame.
6295
6389
  */
6296
- badges: (LGraphBadge_2 | (() => LGraphBadge_2))[];
6390
+ badges: (LGraphBadge | (() => LGraphBadge))[];
6297
6391
  /** @deprecated Badges always render top-right; assignment is ignored. */
6298
6392
  get badgePosition(): string;
6299
6393
  set badgePosition(_value: string);
@@ -6331,8 +6425,50 @@ declare class LGraphNode implements NodeLike, Positionable, IPinnable, IColorabl
6331
6425
  set showAdvanced(value: boolean | undefined);
6332
6426
  comfyDynamic?: Record<string, object>;
6333
6427
  comfyClass?: string;
6428
+ /**
6429
+ * If the node is a frontend only node and should not be serialized into the prompt.
6430
+ */
6334
6431
  isVirtualNode?: boolean;
6432
+ /**
6433
+ * @deprecated Lets virtual nodes such as primitives write their values into
6434
+ * the graph before queueing.
6435
+ */
6335
6436
  applyToGraph?(extraLinks?: LLink[]): void;
6437
+ animatedImages?: boolean;
6438
+ imgs?: HTMLImageElement[];
6439
+ images?: ResultItem[];
6440
+ videoContainer?: HTMLElement;
6441
+ /** Whether the node's preview media is loading */
6442
+ isLoading?: boolean;
6443
+ isUploading?: boolean;
6444
+ previewMediaType?: 'image' | 'video' | 'audio' | 'model';
6445
+ /** If true, output images are stored but not rendered below the node */
6446
+ hideOutputImages?: boolean;
6447
+ preview?: string[];
6448
+ /** Index of the currently selected image on a multi-image node such as Preview Image */
6449
+ imageIndex?: number | null;
6450
+ imageRects?: Rect[];
6451
+ overIndex?: number | null;
6452
+ pointerDown?: {
6453
+ index: number | null;
6454
+ pos: Point;
6455
+ } | null;
6456
+ /** @deprecated Image previews size themselves. */
6457
+ setSizeForImage?(force?: boolean): void;
6458
+ /** @deprecated Unused */
6459
+ inputHeight?: unknown;
6460
+ /** The y offset of the image preview to the top of the node body. */
6461
+ imageOffset?: number;
6462
+ canvasHeight?: number;
6463
+ index?: number;
6464
+ runningInternalNodeId?: SerializedNodeId;
6465
+ /** Used internally for sizing the node during creation */
6466
+ _initialMinSize?: {
6467
+ width: number;
6468
+ height: number;
6469
+ };
6470
+ /** Raw widget values from the last `configure`; litegraph does not read it. */
6471
+ widgets_values?: TWidgetValue[];
6336
6472
  isSubgraphNode(): this is RegisteredSubgraphNode;
6337
6473
  /** @inheritdoc {@link renderArea} */
6338
6474
  private _renderArea;
@@ -6396,6 +6532,27 @@ declare class LGraphNode implements NodeLike, Positionable, IPinnable, IColorabl
6396
6532
  setTrigger?(this: LGraphNode, func?: () => void): void;
6397
6533
  onDrawBackground?(this: LGraphNode, ctx: CanvasRenderingContext2D): void;
6398
6534
  onNodeCreated?(this: LGraphNode): void;
6535
+ /**
6536
+ * Callback fired on each node after the graph is configured
6537
+ */
6538
+ onAfterGraphConfigured?(): void;
6539
+ onGraphConfigured?(): void;
6540
+ /** Called with the node's execution output, which may carry custom keys. */
6541
+ onExecuted?(output: NodeExecutionOutput): void;
6542
+ onExecutionStart?(): unknown;
6543
+ refreshComboInNode?(defs?: Record<string, ComfyNodeDef>): void;
6544
+ /** Flattens a subgraph node into its executable inner nodes. */
6545
+ getInnerNodes?(nodesByExecutionId: Map<RegisteredExecutionId, RegisteredExecutableLGraphNode>, subgraphNodePath?: readonly SerializedNodeId[], nodes?: RegisteredExecutableLGraphNode[], subgraphs?: Set<LGraphNode>): RegisteredExecutableLGraphNode[];
6546
+ recreate?(): Promise<LGraphNode>;
6547
+ /** Returns true if this node handles an external drag (file or element). */
6548
+ onDragOver?(e: DragEvent): boolean;
6549
+ /** Returns true if this node handled an external drop (file or element). */
6550
+ onDragDrop?(e: DragEvent): Promise<boolean> | boolean;
6551
+ convertWidgetToInput?(): boolean;
6552
+ /** Callback for pasting an image file into the node */
6553
+ pasteFile?(file: File): void;
6554
+ /** Callback for pasting multiple files into the node */
6555
+ pasteFiles?(files: File[]): void;
6399
6556
  /**
6400
6557
  * Callback invoked by {@link connect} to override the target slot index.
6401
6558
  * Its return value overrides the target index selection.
@@ -7110,7 +7267,7 @@ declare class LGraphNode implements NodeLike, Positionable, IPinnable, IColorabl
7110
7267
  drawProgressBar(ctx: CanvasRenderingContext2D): void;
7111
7268
  }
7112
7269
 
7113
- declare interface LGraphNodeConstructor<T extends RegisteredLGraphNode = RegisteredLGraphNode> {
7270
+ export declare interface LGraphNodeConstructor<T extends RegisteredLGraphNode = RegisteredLGraphNode> {
7114
7271
  new (title: string, type?: string): T;
7115
7272
  title?: string;
7116
7273
  desc?: string;
@@ -7130,6 +7287,11 @@ declare interface LGraphNodeConstructor<T extends RegisteredLGraphNode = Registe
7130
7287
  keepAllLinksOnBypass: boolean;
7131
7288
  resizeHandleSize?: number;
7132
7289
  resizeEdgeSize?: number;
7290
+ comfyClass?: string;
7291
+ nodeData?: ComfyNodeDef & ComfyNodeDef_2 & {
7292
+ [key: symbol]: unknown;
7293
+ };
7294
+ category?: string;
7133
7295
  }
7134
7296
 
7135
7297
  declare interface LGraphState {
@@ -7152,27 +7314,6 @@ declare type LGraphTriggerParam<A extends LGraphTriggerAction> = Extract<LGraphT
7152
7314
  type: A;
7153
7315
  }>;
7154
7316
 
7155
- declare interface LightInfoEntry {
7156
- type: LightInfoType;
7157
- color: string;
7158
- intensity: number;
7159
- position: LightInfoVec3;
7160
- target?: LightInfoVec3;
7161
- range?: number;
7162
- innerConeAngle?: number;
7163
- outerConeAngle?: number;
7164
- radius?: number;
7165
- castShadow?: boolean;
7166
- }
7167
-
7168
- declare type LightInfoType = 'directional' | 'point' | 'spot';
7169
-
7170
- declare interface LightInfoVec3 {
7171
- x: number;
7172
- y: number;
7173
- z: number;
7174
- }
7175
-
7176
7317
  declare class LightInfoWidget extends BaseWidget<ILightInfoWidget> implements ILightInfoWidget {
7177
7318
  drawWidget(ctx: CanvasRenderingContext2D, options: DrawWidgetOptions): void;
7178
7319
  onClick(_options: WidgetEventOptions): void;
@@ -7295,7 +7436,7 @@ declare class LinkConnector {
7295
7436
  * @param eventName The event to listen for.
7296
7437
  * @param listener The listener to call when the event is fired.
7297
7438
  */
7298
- listenUntilReset<K extends keyof LinkConnectorEventMap>(eventName: K, listener: Parameters<typeof LinkConnector.events.addEventListener<K>>[1], options?: Parameters<typeof LinkConnector.events.addEventListener<K>>[2]): void;
7439
+ listenUntilReset<K extends keyof LinkConnectorEventMap>(eventName: K, listener: EventListeners<LinkConnectorEventMap>[K], options?: boolean | AddEventListenerOptions): void;
7299
7440
  /**
7300
7441
  * Resets everything to its initial state.
7301
7442
  *
@@ -7368,7 +7509,7 @@ declare interface LinkConnectorState {
7368
7509
  }
7369
7510
 
7370
7511
  /** The direction that a link point will flow towards - e.g. horizontal outputs are right by default */
7371
- declare enum LinkDirection {
7512
+ export declare enum LinkDirection {
7372
7513
  NONE = 0,
7373
7514
  UP = 1,
7374
7515
  DOWN = 2,
@@ -7382,7 +7523,7 @@ export declare type LinkId = number & {
7382
7523
  };
7383
7524
 
7384
7525
  /** The marker in the middle of a link */
7385
- declare enum LinkMarkerShape {
7526
+ export declare enum LinkMarkerShape {
7386
7527
  /** Do not display markers */
7387
7528
  None = 0,
7388
7529
  /** Circles (default) */
@@ -7394,7 +7535,7 @@ declare enum LinkMarkerShape {
7394
7535
  /**
7395
7536
  * Contains a list of links, reroutes, and nodes.
7396
7537
  */
7397
- declare interface LinkNetwork extends ReadonlyLinkNetwork {
7538
+ export declare interface LinkNetwork extends ReadonlyLinkNetwork {
7398
7539
  readonly links: Map<LinkId, RegisteredLLink>;
7399
7540
  readonly reroutes: Map<RerouteId, RegisteredReroute>;
7400
7541
  addFloatingLink(link: RegisteredLLink): RegisteredLLink | undefined;
@@ -7431,7 +7572,7 @@ declare interface LinkRenderContext {
7431
7572
  }
7432
7573
 
7433
7574
  /** The path calculation that links follow */
7434
- declare enum LinkRenderType {
7575
+ export declare enum LinkRenderType {
7435
7576
  HIDDEN_LINK = -1,
7436
7577
  /** Juts out from the input & output a little @see LinkDirection, then a straight line between them */
7437
7578
  STRAIGHT_LINK = 0,
@@ -7483,7 +7624,7 @@ declare let LiteGraph_2: RegisteredLiteGraphGlobal;
7483
7624
  /**
7484
7625
  * The Global Scope. It contains all the registered node classes.
7485
7626
  */
7486
- declare class LiteGraphGlobal {
7627
+ export declare class LiteGraphGlobal {
7487
7628
  SlotShape: typeof SlotShape;
7488
7629
  SlotDirection: typeof SlotDirection_2;
7489
7630
  SlotType: typeof SlotType;
@@ -7532,7 +7673,7 @@ declare class LiteGraphGlobal {
7532
7673
  /** default node position */
7533
7674
  DEFAULT_POSITION: number[];
7534
7675
  /** ,"circle" */
7535
- VALID_SHAPES: ("default" | "round" | "card" | "box")[];
7676
+ VALID_SHAPES: ("round" | "default" | "card" | "box")[];
7536
7677
  ROUND_RADIUS: number;
7537
7678
  BOX_SHAPE: RenderShape;
7538
7679
  ROUND_SHAPE: RenderShape;
@@ -7637,28 +7778,47 @@ declare class LiteGraphGlobal {
7637
7778
  * if dont want this, calculate once and set registered_slot_[in/out]_types and slot_types_[in/out]
7638
7779
  */
7639
7780
  auto_load_slot_types: boolean;
7781
+ private registeredSlotInTypes;
7782
+ private registeredSlotOutTypes;
7783
+ private slotTypesOut;
7784
+ private slotTypesDefaultIn;
7785
+ private slotTypesDefaultOut;
7786
+ private fillSlotTypeTables?;
7640
7787
  /** slot types for nodeclass */
7641
- registered_slot_in_types: Record<string, {
7788
+ get registered_slot_in_types(): Record<string, {
7642
7789
  nodes: string[];
7643
7790
  }>;
7791
+ set registered_slot_in_types(value: Record<string, {
7792
+ nodes: string[];
7793
+ }>);
7644
7794
  /** slot types for nodeclass */
7645
- registered_slot_out_types: Record<string, {
7795
+ get registered_slot_out_types(): Record<string, {
7646
7796
  nodes: string[];
7647
7797
  }>;
7798
+ set registered_slot_out_types(value: Record<string, {
7799
+ nodes: string[];
7800
+ }>);
7648
7801
  /** slot types IN */
7649
7802
  slot_types_in: string[];
7650
7803
  /** slot types OUT */
7651
- slot_types_out: string[];
7804
+ get slot_types_out(): string[];
7805
+ set slot_types_out(value: string[]);
7652
7806
  /**
7653
7807
  * specify for each IN slot type a(/many) default node(s), use single string, array, or object
7654
7808
  * (with node, title, parameters, ..) like for search
7655
7809
  */
7656
- slot_types_default_in: Record<string, SlotTypeDefault>;
7810
+ get slot_types_default_in(): Record<string, SlotTypeDefault>;
7811
+ set slot_types_default_in(value: Record<string, SlotTypeDefault>);
7657
7812
  /**
7658
7813
  * specify for each OUT slot type a(/many) default node(s), use single string, array, or object
7659
7814
  * (with node, title, parameters, ..) like for search
7660
7815
  */
7661
- slot_types_default_out: Record<string, SlotTypeDefault>;
7816
+ get slot_types_default_out(): Record<string, SlotTypeDefault>;
7817
+ set slot_types_default_out(value: Record<string, SlotTypeDefault>);
7818
+ /** Defers filling the slot type tables until one is read or {@link flushSlotTypeTables} runs. */
7819
+ deferSlotTypeTables(fill: () => void): void;
7820
+ /** Runs the fill passed to {@link deferSlotTypeTables}, if it has not run yet. */
7821
+ flushSlotTypeTables(): void;
7662
7822
  /** [true!] very handy, ALT click to clone and drag the new node */
7663
7823
  alt_drag_do_clone_nodes: boolean;
7664
7824
  /**
@@ -7899,7 +8059,7 @@ declare class LitegraphLinkAdapter {
7899
8059
  private calculateLinkBounds;
7900
8060
  }
7901
8061
 
7902
- declare class LLink implements LinkSegment, Serialisable<SerialisableLLink> {
8062
+ export declare class LLink implements LinkSegment, Serialisable<SerialisableLLink> {
7903
8063
  static _drawDebug: boolean;
7904
8064
  /**
7905
8065
  * The link's topology state. Once registered with {@link useLinkStore},
@@ -8361,6 +8521,21 @@ declare interface NodeBindable {
8361
8521
  setNodeId(nodeId: NodeId): void;
8362
8522
  }
8363
8523
 
8524
+ /**
8525
+ * The public surface of the application singleton created in
8526
+ * `@/scripts/app`. Modules that the app itself imports reach the running
8527
+ * instance through `useApp()` from `@/scripts/appInstance`; only the
8528
+ * composition root imports the class.
8529
+ */
8530
+ /** The node definitions, or the HTTP status of the server's refusal. */
8531
+ declare type NodeDefsFetch = {
8532
+ ok: true;
8533
+ defs: Record<string, ComfyNodeDef>;
8534
+ } | {
8535
+ ok: false;
8536
+ status: number;
8537
+ };
8538
+
8364
8539
  export declare type NodeError = {
8365
8540
  errors: (PromptError & {
8366
8541
  extra_info?: {
@@ -8450,7 +8625,7 @@ declare interface NodeSlotLabelChangedEvent {
8450
8625
  }
8451
8626
 
8452
8627
  /** Node slot type - input or output */
8453
- declare enum NodeSlotType {
8628
+ export declare enum NodeSlotType {
8454
8629
  INPUT = 1,
8455
8630
  OUTPUT = 2
8456
8631
  }
@@ -8749,7 +8924,7 @@ declare type PickNevers_2<T> = {
8749
8924
  };
8750
8925
 
8751
8926
  /** A point represented as `[x, y]` co-ordinates */
8752
- declare type Point = [x: number, y: number];
8927
+ export declare type Point = [x: number, y: number];
8753
8928
 
8754
8929
  /**
8755
8930
  * An object that can be positioned, selected, and moved.
@@ -8866,7 +9041,7 @@ declare interface QueuePromptOptions_2 {
8866
9041
  intent?: WorkflowQueueIntent;
8867
9042
  }
8868
9043
 
8869
- declare interface RangeValue {
9044
+ export declare interface RangeValue {
8870
9045
  min: number;
8871
9046
  max: number;
8872
9047
  midpoint?: number;
@@ -8879,7 +9054,7 @@ declare class RangeWidget extends BaseWidget<IRangeWidget> implements IRangeWidg
8879
9054
 
8880
9055
  declare type RawJobListItem = z.infer<typeof zRawJobListItem>;
8881
9056
 
8882
- declare interface ReadonlyLinkNetwork {
9057
+ export declare interface ReadonlyLinkNetwork {
8883
9058
  readonly rootGraph: {
8884
9059
  readonly id: UUID;
8885
9060
  };
@@ -8896,14 +9071,14 @@ declare interface ReadonlyLinkNetwork {
8896
9071
  }
8897
9072
 
8898
9073
  /** A rectangle starting at top-left coordinates `[x, y, width, height]` that will not be modified */
8899
- declare type ReadOnlyRect = readonly [x: number, y: number, width: number, height: number] | ReadOnlyTypedArray<Float64Array>;
9074
+ export declare type ReadOnlyRect = readonly [x: number, y: number, width: number, height: number] | ReadOnlyTypedArray<Float64Array>;
8900
9075
 
8901
9076
  declare type ReadOnlyRectangle = Omit<ReadOnlyTypedArray<Rectangle>, 'setHeightBottomAnchored' | 'setWidthRightAnchored' | 'resizeTopLeft' | 'resizeBottomLeft' | 'resizeTopRight' | 'resizeBottomRight' | 'updateTo'>;
8902
9077
 
8903
9078
  declare type ReadOnlyTypedArray<T extends Float64Array> = Omit<Readonly<T>, 'fill' | 'copyWithin' | 'reverse' | 'set' | 'sort' | 'subarray'>;
8904
9079
 
8905
9080
  /** A rectangle starting at top-left coordinates `[x, y, width, height]` */
8906
- declare type Rect = [x: number, y: number, width: number, height: number] | Float64Array;
9081
+ export declare type Rect = [x: number, y: number, width: number, height: number] | Float64Array;
8907
9082
 
8908
9083
  /**
8909
9084
  * A rectangle, represented as a float64 array of 4 numbers: [x, y, width, height].
@@ -8916,7 +9091,7 @@ declare type Rect = [x: number, y: number, width: number, height: number] | Floa
8916
9091
  * - {@link pos}: The position of the top-left corner of the rectangle.
8917
9092
  * - {@link size}: The size of the rectangle.
8918
9093
  */
8919
- declare class Rectangle extends Float64Array {
9094
+ export declare class Rectangle extends Float64Array {
8920
9095
  private _pos;
8921
9096
  private _size;
8922
9097
  constructor(x?: number, y?: number, width?: number, height?: number);
@@ -9070,6 +9245,10 @@ declare type RegisteredBaseLGraph = BaseLGraph;
9070
9245
 
9071
9246
  declare type RegisteredContextMenu<TValue = unknown> = ContextMenu<TValue>;
9072
9247
 
9248
+ declare type RegisteredExecutableLGraphNode = ExecutableLGraphNode;
9249
+
9250
+ declare type RegisteredExecutionId = ExecutionId;
9251
+
9073
9252
  declare type RegisteredFloatingRenderLink = FloatingRenderLink;
9074
9253
 
9075
9254
  declare type RegisteredGraphOrSubgraph = GraphOrSubgraph;
@@ -9176,7 +9355,7 @@ declare interface RenderLink {
9176
9355
  declare type RenderLinkUnion = MovingInputLink | MovingOutputLink | FloatingRenderLink | ToInputRenderLink | ToOutputRenderLink | ToInputFromIoNodeLink | ToOutputFromIoNodeLink;
9177
9356
 
9178
9357
  /** Shape that an object will render as - used by nodes and slots */
9179
- declare enum RenderShape {
9358
+ export declare enum RenderShape {
9180
9359
  /** Rectangle with square corners */
9181
9360
  BOX = 1,
9182
9361
  /** Rounded rectangle */
@@ -9205,7 +9384,7 @@ declare type RequiredProps<T, Properties extends keyof T> = Omit<T, Properties>
9205
9384
  * Stores only primitive values (IDs) to reference other items in its network,
9206
9385
  * and a `WeakRef` to a {@link LinkNetwork} to resolve them.
9207
9386
  */
9208
- declare class Reroute implements Positionable, LinkSegment, Serialisable<SerialisableReroute> {
9387
+ export declare class Reroute implements Positionable, LinkSegment, Serialisable<SerialisableReroute> {
9209
9388
  static radius: number;
9210
9389
  /** Maximum distance from reroutes to their bezier curve control points. */
9211
9390
  static maxSplineOffset: number;
@@ -9445,6 +9624,8 @@ declare interface ResolvedSubgraphOutput {
9445
9624
  subgraphInput: RegisteredSubgraphInput;
9446
9625
  }
9447
9626
 
9627
+ declare type ResultItem = z.infer<typeof zResultItem>;
9628
+
9448
9629
  declare interface RetrySignalLifecycle {
9449
9630
  clearInitialTimeout: () => void;
9450
9631
  createSignal: () => AbortSignal | undefined;
@@ -9480,7 +9661,7 @@ declare interface Serialisable<SerialisableObject> {
9480
9661
  asSerialisable(): SerialisableObject;
9481
9662
  }
9482
9663
 
9483
- declare interface SerialisableGraph extends BaseExportedGraph {
9664
+ export declare interface SerialisableGraph extends BaseExportedGraph {
9484
9665
  /** Schema version. @remarks Version bump should add to const union, which is used to narrow type during deserialise. */
9485
9666
  version: 0 | 1;
9486
9667
  state: SerialisableGraphState;
@@ -9500,7 +9681,7 @@ declare interface SerialisableGraphState {
9500
9681
  lastRerouteId: number;
9501
9682
  }
9502
9683
 
9503
- declare interface SerialisableLLink extends LinkPresentation {
9684
+ export declare interface SerialisableLLink extends LinkPresentation {
9504
9685
  /** Link ID */
9505
9686
  id: number;
9506
9687
  /** Output node ID */
@@ -9517,7 +9698,7 @@ declare interface SerialisableLLink extends LinkPresentation {
9517
9698
  parentId?: number;
9518
9699
  }
9519
9700
 
9520
- declare interface SerialisableReroute {
9701
+ export declare interface SerialisableReroute {
9521
9702
  id: number;
9522
9703
  parentId?: number;
9523
9704
  pos: Point;
@@ -9567,6 +9748,7 @@ declare interface SettingParams<TValue = unknown> extends FormItem {
9567
9748
  }
9568
9749
 
9569
9750
  export declare type Settings = {
9751
+ 'Comfy.AgentPanel.ConsentOfferDeclined': boolean;
9570
9752
  'Comfy.ColorPalette': string;
9571
9753
  'Comfy.CustomColorPalettes': ColorPalettes;
9572
9754
  'Comfy.Canvas.BackgroundImage'?: string;
@@ -9777,7 +9959,7 @@ export declare type SidebarTabExtension = VueSidebarTabExtension | CustomSidebar
9777
9959
  declare type SimpleApiEvents = keyof PickNevers<ApiEventTypes>;
9778
9960
 
9779
9961
  /** A size represented as `[width, height]` */
9780
- declare type Size = [width: number, height: number];
9962
+ export declare type Size = [width: number, height: number];
9781
9963
 
9782
9964
  declare class SliderWidget extends BaseWidget<ISliderWidget> implements ISliderWidget {
9783
9965
  marker?: number;
@@ -9810,7 +9992,7 @@ declare abstract class SlotBase implements INodeSlot {
9810
9992
  color_on?: CanvasColour;
9811
9993
  locked?: boolean;
9812
9994
  nameLocked?: boolean;
9813
- widget?: IWidgetLocator;
9995
+ widget?: INodeInputSlot['widget'];
9814
9996
  hasErrors?: boolean;
9815
9997
  /** The centre point of the slot. */
9816
9998
  abstract pos?: Point;
@@ -9835,7 +10017,7 @@ export declare function slotId(nodeId: NodeId, direction: SlotDirection, index:
9835
10017
  export declare type SlotIndex = number;
9836
10018
 
9837
10019
  /** @see RenderShape */
9838
- declare enum SlotShape {
10020
+ export declare enum SlotShape {
9839
10021
  Box = 1,
9840
10022
  Arrow = 5,
9841
10023
  Grid = 6,
@@ -9843,7 +10025,7 @@ declare enum SlotShape {
9843
10025
  HollowCircle = 7
9844
10026
  }
9845
10027
 
9846
- declare enum SlotType {
10028
+ export declare enum SlotType {
9847
10029
  Array = "array",
9848
10030
  Event = -1
9849
10031
  }
@@ -9869,8 +10051,8 @@ declare interface StatusWsMessage {
9869
10051
  declare type StatusWsMessageStatus = PromptInfo;
9870
10052
 
9871
10053
  /** A subgraph definition. */
9872
- declare class Subgraph extends LGraph implements BaseLGraph, Serialisable<ExportedSubgraph> {
9873
- readonly events: CustomEventTarget<SubgraphEventMap, "configured" | "configuring" | "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">;
10054
+ 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">;
9874
10056
  /** Limits the number of levels / depth that subgraphs may be nested. Prevents uncontrolled programmatic nesting. */
9875
10057
  static MAX_NESTED_SUBGRAPHS: number;
9876
10058
  /** The display name of the subgraph. */
@@ -10002,7 +10184,7 @@ declare interface SubgraphEventMap extends LGraphEventMap {
10002
10184
  * Unique identifier for a subgraph definition. Structurally a {@link UUID};
10003
10185
  * provided as a domain-specific alias for clarity at adoption sites.
10004
10186
  */
10005
- declare type SubgraphId = UUID;
10187
+ export declare type SubgraphId = UUID;
10006
10188
 
10007
10189
  /**
10008
10190
  * An input "slot" from a parent graph into a subgraph.
@@ -10015,9 +10197,9 @@ declare type SubgraphId = UUID;
10015
10197
  *
10016
10198
  * Functionally, however, when editing a subgraph, that "subgraph input" is the "origin" or "output side" of a link.
10017
10199
  */
10018
- declare class SubgraphInput extends SubgraphSlot {
10200
+ export declare class SubgraphInput extends SubgraphSlot {
10019
10201
  parent: RegisteredSubgraphInputNode;
10020
- events: CustomEventTarget<SubgraphInputEventMap, "configured" | "configuring" | "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">;
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">;
10021
10203
  /** The linked widget that this slot is connected to. */
10022
10204
  private _widgetRef?;
10023
10205
  get _widget(): IBaseWidget< WidgetValue, string, IWidgetOptions<unknown>> | undefined;
@@ -10182,7 +10364,7 @@ declare abstract class SubgraphIONodeBase<TSlot extends RegisteredSubgraphInput
10182
10364
  /** Properties shared by subgraph and node I/O slots. */
10183
10365
  declare type SubgraphIOShared = Omit<INodeSlot, 'boundingRect' | 'nameLocked' | 'locked' | 'removable'>;
10184
10366
 
10185
- declare class SubgraphNode extends LGraphNode implements RegisteredBaseLGraph {
10367
+ export declare class SubgraphNode extends LGraphNode implements RegisteredBaseLGraph {
10186
10368
  readonly subgraph: RegisteredSubgraph;
10187
10369
  get inputs(): (INodeInputSlot & Partial<ISubgraphInput>)[];
10188
10370
  set inputs(value: (INodeInputSlot & Partial<ISubgraphInput>)[]);
@@ -10277,7 +10459,7 @@ declare class SubgraphNode extends LGraphNode implements RegisteredBaseLGraph {
10277
10459
  *
10278
10460
  * Functionally, however, when editing a subgraph, that "subgraph output" is the "target" or "input side" of a link.
10279
10461
  */
10280
- declare class SubgraphOutput extends SubgraphSlot {
10462
+ export declare class SubgraphOutput extends SubgraphSlot {
10281
10463
  parent: RegisteredSubgraphOutputNode;
10282
10464
  connect(slot: INodeOutputSlot, node: RegisteredLGraphNode, afterRerouteId?: RerouteId): LLink | undefined;
10283
10465
  get labelPos(): Point;
@@ -10412,6 +10594,11 @@ declare interface TeamPlanSelection {
10412
10594
  credits: number;
10413
10595
  /** Cycle-adjusted discounted monthly price in USD — what the user actually pays. */
10414
10596
  discountedUsd: number;
10597
+ /** What the server bills for one period of each cycle, in USD. */
10598
+ periodChargeUsd?: {
10599
+ monthly: number;
10600
+ yearly: number;
10601
+ };
10415
10602
  }
10416
10603
 
10417
10604
  declare enum TemplateIncludeOnDistributionEnum {
@@ -10518,7 +10705,7 @@ declare class TextWidget extends BaseWidget<IStringWidget> implements IStringWid
10518
10705
 
10519
10706
  declare type TierKey = BillingTierKey;
10520
10707
 
10521
- declare enum TitleMode {
10708
+ export declare enum TitleMode {
10522
10709
  NORMAL_TITLE = 0,
10523
10710
  NO_TITLE = 1,
10524
10711
  TRANSPARENT_TITLE = 2,
@@ -10713,14 +10900,6 @@ declare type TopUpCreditsDialogOptions = {
10713
10900
 
10714
10901
  export declare function toRerouteId(value: number): RerouteId;
10715
10902
 
10716
- declare interface Transform {
10717
- x: number;
10718
- y: number;
10719
- w: number;
10720
- h: number;
10721
- rotation: number;
10722
- }
10723
-
10724
10903
  /**
10725
10904
  * Widget for hierarchical tree selection.
10726
10905
  * This widget only has a Vue implementation.
@@ -10735,9 +10914,9 @@ declare class TreeSelectWidget extends BaseWidget<ITreeSelectWidget> implements
10735
10914
  * Override linkedWidgets[]
10736
10915
  * Values not in this list will not result in litegraph errors, however they will be treated the same as "custom".
10737
10916
  */
10738
- declare type TWidgetType = IWidget['type'];
10917
+ export declare type TWidgetType = IWidget['type'];
10739
10918
 
10740
- declare type TWidgetValue = WidgetValue;
10919
+ export declare type TWidgetValue = WidgetValue;
10741
10920
 
10742
10921
  export declare type User = {
10743
10922
  storage: 'server';
@@ -10837,14 +11016,14 @@ declare type UUID = string;
10837
11016
  /** @deprecated Use {@link Point} instead. */
10838
11017
  declare type Vector2 = Point;
10839
11018
 
10840
- declare type VideoEditFeature = 'trim' | 'crop';
11019
+ export declare type VideoEditFeature = 'trim' | 'crop';
10841
11020
 
10842
- declare interface VideoEditTrim {
11021
+ export declare interface VideoEditTrim {
10843
11022
  start_time: number;
10844
11023
  duration: number;
10845
11024
  }
10846
11025
 
10847
- declare interface VideoEditValue {
11026
+ export declare interface VideoEditValue {
10848
11027
  trim?: VideoEditTrim;
10849
11028
  crop?: Bounds;
10850
11029
  }
@@ -10891,6 +11070,10 @@ declare const WIDGET_SURFACE_TIERS: readonly ["shown", "advanced", "never"];
10891
11070
  */
10892
11071
  declare const WIDGET_SURFACES: readonly ["canvas", "vueNode", "panel"];
10893
11072
 
11073
+ export declare interface WidgetCallbackOptions {
11074
+ isPartialExecution?: boolean;
11075
+ }
11076
+
10894
11077
  declare interface WidgetEventOptions {
10895
11078
  e: CanvasPointerEvent;
10896
11079
  node: RegisteredLGraphNode;
@@ -10919,7 +11102,7 @@ declare type WidgetSurfaces = Record<WidgetSurface, WidgetSurfaceTier>;
10919
11102
 
10920
11103
  declare type WidgetSurfaceTier = (typeof WIDGET_SURFACE_TIERS)[number];
10921
11104
 
10922
- declare type WidgetTypeMap = {
11105
+ export declare type WidgetTypeMap = {
10923
11106
  button: ButtonWidget;
10924
11107
  toggle: BooleanWidget;
10925
11108
  slider: SliderWidget;
@@ -11153,11 +11336,501 @@ declare const zComfyNode: z.ZodObject<{
11153
11336
  directory: z.ZodString;
11154
11337
  }, z.core.$strip>>>;
11155
11338
  }, z.core.$catchall<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodUnknown>]>>>>;
11156
- widgets_values: z.ZodOptional<z.ZodType<Record<string, WidgetValue> | WidgetValue[], unknown, z.core.$ZodTypeInternals<Record<string, WidgetValue> | WidgetValue[], unknown>>>;
11339
+ widgets_values: z.ZodOptional<z.ZodType< WidgetValue[] | Record<string, WidgetValue>, unknown, z.core.$ZodTypeInternals< WidgetValue[] | Record<string, WidgetValue>, unknown>>>;
11157
11340
  color: z.ZodOptional<z.ZodString>;
11158
11341
  bgcolor: z.ZodOptional<z.ZodString>;
11159
11342
  }, z.core.$loose>;
11160
11343
 
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
+
11161
11834
  /** Schema version 0.4 */
11162
11835
  declare const zComfyWorkflow: z.ZodObject<{
11163
11836
  subgraphs: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -11204,7 +11877,7 @@ declare const zComfyWorkflow: z.ZodObject<{
11204
11877
  type: z.ZodString;
11205
11878
  linkIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
11206
11879
  }, z.core.$loose>>>;
11207
- widgets_values: z.ZodOptional<z.ZodType<Record<string, WidgetValue> | WidgetValue[], unknown, z.core.$ZodTypeInternals<Record<string, WidgetValue> | WidgetValue[], unknown>>>;
11880
+ widgets_values: z.ZodOptional<z.ZodType< WidgetValue[] | Record<string, WidgetValue>, unknown, z.core.$ZodTypeInternals< WidgetValue[] | Record<string, WidgetValue>, unknown>>>;
11208
11881
  color: z.ZodOptional<z.ZodString>;
11209
11882
  bgcolor: z.ZodOptional<z.ZodString>;
11210
11883
  }, z.core.$loose>>>;
@@ -11265,7 +11938,7 @@ declare const zComfyWorkflow: z.ZodObject<{
11265
11938
  directory: z.ZodString;
11266
11939
  }, z.core.$strip>>>;
11267
11940
  }, z.core.$catchall<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodUnknown>]>>>>;
11268
- widgets_values: z.ZodOptional<z.ZodType<Record<string, WidgetValue> | WidgetValue[], unknown, z.core.$ZodTypeInternals<Record<string, WidgetValue> | WidgetValue[], unknown>>>;
11941
+ widgets_values: z.ZodOptional<z.ZodType< WidgetValue[] | Record<string, WidgetValue>, unknown, z.core.$ZodTypeInternals< WidgetValue[] | Record<string, WidgetValue>, unknown>>>;
11269
11942
  color: z.ZodOptional<z.ZodString>;
11270
11943
  bgcolor: z.ZodOptional<z.ZodString>;
11271
11944
  }, z.core.$loose>>;
@@ -11402,7 +12075,7 @@ declare const zComfyWorkflow: z.ZodObject<{
11402
12075
  type: z.ZodString;
11403
12076
  linkIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
11404
12077
  }, z.core.$loose>>>;
11405
- widgets_values: z.ZodOptional<z.ZodType<Record<string, WidgetValue> | WidgetValue[], unknown, z.core.$ZodTypeInternals<Record<string, WidgetValue> | WidgetValue[], unknown>>>;
12078
+ widgets_values: z.ZodOptional<z.ZodType< WidgetValue[] | Record<string, WidgetValue>, unknown, z.core.$ZodTypeInternals< WidgetValue[] | Record<string, WidgetValue>, unknown>>>;
11406
12079
  color: z.ZodOptional<z.ZodString>;
11407
12080
  bgcolor: z.ZodOptional<z.ZodString>;
11408
12081
  }, z.core.$loose>>>;
@@ -11478,7 +12151,7 @@ declare const zComfyWorkflow: z.ZodObject<{
11478
12151
  directory: z.ZodString;
11479
12152
  }, z.core.$strip>>>;
11480
12153
  }, z.core.$catchall<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodUnknown>]>>>>;
11481
- widgets_values: z.ZodOptional<z.ZodType<Record<string, WidgetValue> | WidgetValue[], unknown, z.core.$ZodTypeInternals<Record<string, WidgetValue> | WidgetValue[], unknown>>>;
12154
+ widgets_values: z.ZodOptional<z.ZodType< WidgetValue[] | Record<string, WidgetValue>, unknown, z.core.$ZodTypeInternals< WidgetValue[] | Record<string, WidgetValue>, unknown>>>;
11482
12155
  color: z.ZodOptional<z.ZodString>;
11483
12156
  bgcolor: z.ZodOptional<z.ZodString>;
11484
12157
  }, z.core.$loose>>;
@@ -11674,7 +12347,7 @@ declare const zComfyWorkflow1: z.ZodObject<{
11674
12347
  type: z.ZodString;
11675
12348
  linkIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
11676
12349
  }, z.core.$loose>>>;
11677
- widgets_values: z.ZodOptional<z.ZodType<Record<string, WidgetValue> | WidgetValue[], unknown, z.core.$ZodTypeInternals<Record<string, WidgetValue> | WidgetValue[], unknown>>>;
12350
+ widgets_values: z.ZodOptional<z.ZodType< WidgetValue[] | Record<string, WidgetValue>, unknown, z.core.$ZodTypeInternals< WidgetValue[] | Record<string, WidgetValue>, unknown>>>;
11678
12351
  color: z.ZodOptional<z.ZodString>;
11679
12352
  bgcolor: z.ZodOptional<z.ZodString>;
11680
12353
  }, z.core.$loose>>>;
@@ -11752,7 +12425,7 @@ declare const zComfyWorkflow1: z.ZodObject<{
11752
12425
  directory: z.ZodString;
11753
12426
  }, z.core.$strip>>>;
11754
12427
  }, z.core.$catchall<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodUnknown>]>>>>;
11755
- widgets_values: z.ZodOptional<z.ZodType<Record<string, WidgetValue> | WidgetValue[], unknown, z.core.$ZodTypeInternals<Record<string, WidgetValue> | WidgetValue[], unknown>>>;
12428
+ widgets_values: z.ZodOptional<z.ZodType< WidgetValue[] | Record<string, WidgetValue>, unknown, z.core.$ZodTypeInternals< WidgetValue[] | Record<string, WidgetValue>, unknown>>>;
11756
12429
  color: z.ZodOptional<z.ZodString>;
11757
12430
  bgcolor: z.ZodOptional<z.ZodString>;
11758
12431
  }, z.core.$loose>>;
@@ -11954,9 +12627,9 @@ declare const zGroup: z.ZodObject<{
11954
12627
  declare const zJobDetail: z.ZodObject<{
11955
12628
  id: z.ZodString;
11956
12629
  status: z.ZodEnum<{
12630
+ cancelled: "cancelled";
11957
12631
  completed: "completed";
11958
12632
  failed: "failed";
11959
- cancelled: "cancelled";
11960
12633
  pending: "pending";
11961
12634
  in_progress: "in_progress";
11962
12635
  }>;
@@ -12132,9 +12805,9 @@ declare const zOutputs: z.ZodObject<{
12132
12805
  declare const zRawJobListItem: z.ZodObject<{
12133
12806
  id: z.ZodString;
12134
12807
  status: z.ZodEnum<{
12808
+ cancelled: "cancelled";
12135
12809
  completed: "completed";
12136
12810
  failed: "failed";
12137
- cancelled: "cancelled";
12138
12811
  pending: "pending";
12139
12812
  in_progress: "in_progress";
12140
12813
  }>;
@@ -12192,6 +12865,19 @@ declare const zReroute: z.ZodObject<{
12192
12865
  }, z.core.$strip>>;
12193
12866
  }, z.core.$loose>;
12194
12867
 
12868
+ declare const zResultItem: z.ZodObject<{
12869
+ filename: z.ZodOptional<z.ZodString>;
12870
+ subfolder: z.ZodOptional<z.ZodString>;
12871
+ type: z.ZodOptional<z.ZodEnum<{
12872
+ input: "input";
12873
+ output: "output";
12874
+ temp: "temp";
12875
+ }>>;
12876
+ display_name: z.ZodOptional<z.ZodString>;
12877
+ id: z.ZodOptional<z.ZodString>;
12878
+ preview_id: z.ZodOptional<z.ZodString>;
12879
+ }, z.core.$strip>;
12880
+
12195
12881
  declare const zSubgraphIO: z.ZodObject<{
12196
12882
  name: z.ZodString;
12197
12883
  link: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -12238,7 +12924,7 @@ declare global {
12238
12924
  app?: ComfyApp;
12239
12925
  /** For use by extensions and in the browser console. Where possible, import `app` and access via `app.graph` instead. */
12240
12926
  graph?: unknown;
12241
- LiteGraph?: typeof LiteGraph;
12927
+ LiteGraph?: LiteGraphGlobal;
12242
12928
  LGraph?: typeof LGraph;
12243
12929
  LLink?: typeof LLink;
12244
12930
  LGraphNode?: typeof LGraphNode;
@@ -12247,10 +12933,6 @@ declare global {
12247
12933
  LGraphCanvas?: typeof LGraphCanvas;
12248
12934
  ContextMenu?: typeof ContextMenu;
12249
12935
  LGraphBadge?: typeof LGraphBadge;
12250
- /** For use in tests to capture WebSocket messages */
12251
- __capturedMessages?: CapturedMessages;
12252
- /** For use in tests to track app initialization state */
12253
- __appReadiness?: AppReadiness;
12254
12936
  /**
12255
12937
  * Set to `true` by Desktop builds predating the bridge's `isRemote()`;
12256
12938
  * local installs of those builds leave it unset.
@@ -12265,19 +12947,24 @@ declare global {
12265
12947
 
12266
12948
 
12267
12949
  declare global {
12268
- const __DISTRIBUTION__: Distribution;
12269
- const __IS_NIGHTLY__: boolean;
12950
+ var __COMFY_LITEGRAPH_INSTANCE__: LiteGraphGlobal | undefined;
12270
12951
  }
12271
12952
 
12272
-
12953
+ /**
12954
+ * Distribution types and compile-time constants for managing
12955
+ * multi-distribution builds (Desktop, Localhost, Cloud)
12956
+ */
12273
12957
  declare global {
12274
- var __COMFY_LITEGRAPH_INSTANCE__: LiteGraphGlobal | undefined;
12958
+ const __DISTRIBUTION__: 'desktop' | 'localhost' | 'cloud';
12959
+ const __IS_NIGHTLY__: boolean;
12275
12960
  }
12276
12961
 
12277
12962
 
12278
12963
  declare global {
12279
12964
  interface Window {
12280
- tf?: TypeformGlobal;
12965
+ tf?: {
12966
+ load?: () => void;
12967
+ };
12281
12968
  }
12282
12969
  }
12283
12970