@soederpop/luca 0.0.20 → 0.0.21
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.
- package/docs/bootstrap/SKILL.md +16 -0
- package/package.json +1 -1
- package/src/bootstrap/generated.ts +17 -1
- package/src/commands/chat.ts +14 -0
- package/src/commands/prompt.ts +204 -64
- package/src/introspection/generated.agi.ts +454 -454
- package/src/introspection/generated.node.ts +509 -509
- package/src/introspection/generated.web.ts +1 -1
- package/src/node/container.ts +4 -0
- package/src/scaffolds/generated.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { setBuildTimeData, setContainerBuildTimeData } from './index.js';
|
|
2
2
|
|
|
3
3
|
// Auto-generated introspection registry data
|
|
4
|
-
// Generated at: 2026-03-
|
|
4
|
+
// Generated at: 2026-03-21T05:24:15.146Z
|
|
5
5
|
|
|
6
6
|
setBuildTimeData('features.googleDocs', {
|
|
7
7
|
"id": "features.googleDocs",
|
|
@@ -9787,258 +9787,6 @@ setBuildTimeData('clients.openai', {
|
|
|
9787
9787
|
]
|
|
9788
9788
|
});
|
|
9789
9789
|
|
|
9790
|
-
setBuildTimeData('clients.comfyui', {
|
|
9791
|
-
"id": "clients.comfyui",
|
|
9792
|
-
"description": "ComfyUI client — execute Stable Diffusion workflows via the ComfyUI API. Connects to a ComfyUI instance to queue prompts, track execution via WebSocket or polling, and download generated images. Supports both UI-format and API-format workflows with automatic conversion.",
|
|
9793
|
-
"shortcut": "clients.comfyui",
|
|
9794
|
-
"className": "ComfyUIClient",
|
|
9795
|
-
"methods": {
|
|
9796
|
-
"queuePrompt": {
|
|
9797
|
-
"description": "Queue a prompt (API-format workflow) for execution.",
|
|
9798
|
-
"parameters": {
|
|
9799
|
-
"prompt": {
|
|
9800
|
-
"type": "Record<string, any>",
|
|
9801
|
-
"description": "The API-format workflow object"
|
|
9802
|
-
},
|
|
9803
|
-
"clientId": {
|
|
9804
|
-
"type": "string",
|
|
9805
|
-
"description": "Override the client ID for this request"
|
|
9806
|
-
}
|
|
9807
|
-
},
|
|
9808
|
-
"required": [
|
|
9809
|
-
"prompt"
|
|
9810
|
-
],
|
|
9811
|
-
"returns": "Promise<{ prompt_id: string; number: number }>",
|
|
9812
|
-
"examples": [
|
|
9813
|
-
{
|
|
9814
|
-
"language": "ts",
|
|
9815
|
-
"code": "const { prompt_id } = await comfy.queuePrompt(apiWorkflow)"
|
|
9816
|
-
}
|
|
9817
|
-
]
|
|
9818
|
-
},
|
|
9819
|
-
"getQueue": {
|
|
9820
|
-
"description": "Get the current prompt queue status.",
|
|
9821
|
-
"parameters": {},
|
|
9822
|
-
"required": [],
|
|
9823
|
-
"returns": "Promise<{ queue_running: any[]; queue_pending: any[] }>"
|
|
9824
|
-
},
|
|
9825
|
-
"getHistory": {
|
|
9826
|
-
"description": "Get execution history, optionally for a specific prompt.",
|
|
9827
|
-
"parameters": {
|
|
9828
|
-
"promptId": {
|
|
9829
|
-
"type": "string",
|
|
9830
|
-
"description": "If provided, returns history for this prompt only"
|
|
9831
|
-
}
|
|
9832
|
-
},
|
|
9833
|
-
"required": [],
|
|
9834
|
-
"returns": "Promise<Record<string, any>>"
|
|
9835
|
-
},
|
|
9836
|
-
"getSystemStats": {
|
|
9837
|
-
"description": "Get system stats including GPU memory and queue info.",
|
|
9838
|
-
"parameters": {},
|
|
9839
|
-
"required": [],
|
|
9840
|
-
"returns": "Promise<any>"
|
|
9841
|
-
},
|
|
9842
|
-
"getObjectInfo": {
|
|
9843
|
-
"description": "Get node type info with input/output schemas.",
|
|
9844
|
-
"parameters": {
|
|
9845
|
-
"nodeClass": {
|
|
9846
|
-
"type": "string",
|
|
9847
|
-
"description": "If provided, returns info for this node type only"
|
|
9848
|
-
}
|
|
9849
|
-
},
|
|
9850
|
-
"required": [],
|
|
9851
|
-
"returns": "Promise<any>"
|
|
9852
|
-
},
|
|
9853
|
-
"interrupt": {
|
|
9854
|
-
"description": "Interrupt the currently executing prompt.",
|
|
9855
|
-
"parameters": {},
|
|
9856
|
-
"required": [],
|
|
9857
|
-
"returns": "Promise<void>"
|
|
9858
|
-
},
|
|
9859
|
-
"getModels": {
|
|
9860
|
-
"description": "List available models, optionally filtered by type.",
|
|
9861
|
-
"parameters": {
|
|
9862
|
-
"type": {
|
|
9863
|
-
"type": "string",
|
|
9864
|
-
"description": "Model type filter (e.g., 'checkpoints', 'loras')"
|
|
9865
|
-
}
|
|
9866
|
-
},
|
|
9867
|
-
"required": [],
|
|
9868
|
-
"returns": "Promise<string[]>"
|
|
9869
|
-
},
|
|
9870
|
-
"getEmbeddings": {
|
|
9871
|
-
"description": "List available embedding models.",
|
|
9872
|
-
"parameters": {},
|
|
9873
|
-
"required": [],
|
|
9874
|
-
"returns": "Promise<string[]>"
|
|
9875
|
-
},
|
|
9876
|
-
"uploadImage": {
|
|
9877
|
-
"description": "Upload an image to ComfyUI's input directory.",
|
|
9878
|
-
"parameters": {
|
|
9879
|
-
"file": {
|
|
9880
|
-
"type": "Buffer | Blob",
|
|
9881
|
-
"description": "The image data as Buffer or Blob"
|
|
9882
|
-
},
|
|
9883
|
-
"filename": {
|
|
9884
|
-
"type": "string",
|
|
9885
|
-
"description": "File name for the upload"
|
|
9886
|
-
},
|
|
9887
|
-
"opts": {
|
|
9888
|
-
"type": "{ subfolder?: string; type?: string; overwrite?: boolean }",
|
|
9889
|
-
"description": "Upload options (subfolder, type, overwrite)"
|
|
9890
|
-
}
|
|
9891
|
-
},
|
|
9892
|
-
"required": [
|
|
9893
|
-
"file",
|
|
9894
|
-
"filename"
|
|
9895
|
-
],
|
|
9896
|
-
"returns": "Promise<any>"
|
|
9897
|
-
},
|
|
9898
|
-
"viewImage": {
|
|
9899
|
-
"description": "Download a generated image from ComfyUI as a Buffer.",
|
|
9900
|
-
"parameters": {
|
|
9901
|
-
"filename": {
|
|
9902
|
-
"type": "string",
|
|
9903
|
-
"description": "The image filename"
|
|
9904
|
-
},
|
|
9905
|
-
"subfolder": {
|
|
9906
|
-
"type": "any",
|
|
9907
|
-
"description": "Subfolder within the output directory"
|
|
9908
|
-
},
|
|
9909
|
-
"type": {
|
|
9910
|
-
"type": "any",
|
|
9911
|
-
"description": "Image type ('output', 'input', 'temp')"
|
|
9912
|
-
}
|
|
9913
|
-
},
|
|
9914
|
-
"required": [
|
|
9915
|
-
"filename"
|
|
9916
|
-
],
|
|
9917
|
-
"returns": "Promise<Buffer>"
|
|
9918
|
-
},
|
|
9919
|
-
"connectWs": {
|
|
9920
|
-
"description": "Open a WebSocket connection to ComfyUI for real-time execution tracking. Events emitted: `execution_start`, `executing`, `progress`, `executed`, `execution_cached`, `execution_error`, `execution_complete`.",
|
|
9921
|
-
"parameters": {},
|
|
9922
|
-
"required": [],
|
|
9923
|
-
"returns": "Promise<void>"
|
|
9924
|
-
},
|
|
9925
|
-
"disconnectWs": {
|
|
9926
|
-
"description": "Close the WebSocket connection.",
|
|
9927
|
-
"parameters": {},
|
|
9928
|
-
"required": [],
|
|
9929
|
-
"returns": "void"
|
|
9930
|
-
},
|
|
9931
|
-
"toApiFormat": {
|
|
9932
|
-
"description": "Convert a UI-format workflow to the API format that /prompt expects. Requires a running ComfyUI instance to fetch `object_info` so we can map positional `widgets_values` to their named input fields. If the workflow is already in API format, it's returned as-is.",
|
|
9933
|
-
"parameters": {
|
|
9934
|
-
"workflow": {
|
|
9935
|
-
"type": "Record<string, any>",
|
|
9936
|
-
"description": "Parameter workflow"
|
|
9937
|
-
}
|
|
9938
|
-
},
|
|
9939
|
-
"required": [
|
|
9940
|
-
"workflow"
|
|
9941
|
-
],
|
|
9942
|
-
"returns": "Promise<Record<string, any>>"
|
|
9943
|
-
},
|
|
9944
|
-
"runWorkflow": {
|
|
9945
|
-
"description": "Run a ComfyUI workflow with optional runtime input overrides. Inputs can be provided in two forms: **Direct node mapping** (when no `inputMap` in options): ``` { '3': { seed: 42 }, '6': { text: 'a cat' } } ``` **Named inputs** (when `inputMap` is provided in options): ``` inputs: { positive_prompt: 'a cat', seed: 42 } options.inputMap: { positive_prompt: { nodeId: '6', field: 'text' }, seed: { nodeId: '3', field: 'seed' } } ```",
|
|
9946
|
-
"parameters": {
|
|
9947
|
-
"workflow": {
|
|
9948
|
-
"type": "Record<string, any>",
|
|
9949
|
-
"description": "Parameter workflow"
|
|
9950
|
-
},
|
|
9951
|
-
"inputs": {
|
|
9952
|
-
"type": "Record<string, any>",
|
|
9953
|
-
"description": "Parameter inputs"
|
|
9954
|
-
},
|
|
9955
|
-
"options": {
|
|
9956
|
-
"type": "WorkflowRunOptions",
|
|
9957
|
-
"description": "Parameter options",
|
|
9958
|
-
"properties": {
|
|
9959
|
-
"poll": {
|
|
9960
|
-
"type": "boolean",
|
|
9961
|
-
"description": "Use polling instead of WebSocket for tracking execution"
|
|
9962
|
-
},
|
|
9963
|
-
"pollInterval": {
|
|
9964
|
-
"type": "number",
|
|
9965
|
-
"description": "Polling interval in ms (default 1000)"
|
|
9966
|
-
},
|
|
9967
|
-
"inputMap": {
|
|
9968
|
-
"type": "InputMapping",
|
|
9969
|
-
"description": "Named input mapping: semantic name -> { nodeId, field }"
|
|
9970
|
-
},
|
|
9971
|
-
"outputDir": {
|
|
9972
|
-
"type": "string",
|
|
9973
|
-
"description": "If provided, output images are downloaded to this directory"
|
|
9974
|
-
}
|
|
9975
|
-
}
|
|
9976
|
-
}
|
|
9977
|
-
},
|
|
9978
|
-
"required": [
|
|
9979
|
-
"workflow"
|
|
9980
|
-
],
|
|
9981
|
-
"returns": "Promise<WorkflowResult>"
|
|
9982
|
-
}
|
|
9983
|
-
},
|
|
9984
|
-
"getters": {
|
|
9985
|
-
"clientId": {
|
|
9986
|
-
"description": "The unique client ID used for WebSocket session tracking.",
|
|
9987
|
-
"returns": "string"
|
|
9988
|
-
},
|
|
9989
|
-
"wsURL": {
|
|
9990
|
-
"description": "The WebSocket URL derived from baseURL or overridden via options.",
|
|
9991
|
-
"returns": "string"
|
|
9992
|
-
}
|
|
9993
|
-
},
|
|
9994
|
-
"events": {
|
|
9995
|
-
"execution_start": {
|
|
9996
|
-
"name": "execution_start",
|
|
9997
|
-
"description": "Event emitted by ComfyUIClient",
|
|
9998
|
-
"arguments": {}
|
|
9999
|
-
},
|
|
10000
|
-
"execution_complete": {
|
|
10001
|
-
"name": "execution_complete",
|
|
10002
|
-
"description": "Event emitted by ComfyUIClient",
|
|
10003
|
-
"arguments": {}
|
|
10004
|
-
},
|
|
10005
|
-
"executing": {
|
|
10006
|
-
"name": "executing",
|
|
10007
|
-
"description": "Event emitted by ComfyUIClient",
|
|
10008
|
-
"arguments": {}
|
|
10009
|
-
},
|
|
10010
|
-
"progress": {
|
|
10011
|
-
"name": "progress",
|
|
10012
|
-
"description": "Event emitted by ComfyUIClient",
|
|
10013
|
-
"arguments": {}
|
|
10014
|
-
},
|
|
10015
|
-
"executed": {
|
|
10016
|
-
"name": "executed",
|
|
10017
|
-
"description": "Event emitted by ComfyUIClient",
|
|
10018
|
-
"arguments": {}
|
|
10019
|
-
},
|
|
10020
|
-
"execution_cached": {
|
|
10021
|
-
"name": "execution_cached",
|
|
10022
|
-
"description": "Event emitted by ComfyUIClient",
|
|
10023
|
-
"arguments": {}
|
|
10024
|
-
},
|
|
10025
|
-
"execution_error": {
|
|
10026
|
-
"name": "execution_error",
|
|
10027
|
-
"description": "Event emitted by ComfyUIClient",
|
|
10028
|
-
"arguments": {}
|
|
10029
|
-
}
|
|
10030
|
-
},
|
|
10031
|
-
"state": {},
|
|
10032
|
-
"options": {},
|
|
10033
|
-
"envVars": [],
|
|
10034
|
-
"examples": [
|
|
10035
|
-
{
|
|
10036
|
-
"language": "ts",
|
|
10037
|
-
"code": "const comfy = container.client('comfyui', { baseURL: 'http://localhost:8188' })\nconst result = await comfy.runWorkflow(workflow, {\n '6': { text: 'a beautiful sunset' }\n})\nconsole.log(result.images)"
|
|
10038
|
-
}
|
|
10039
|
-
]
|
|
10040
|
-
});
|
|
10041
|
-
|
|
10042
9790
|
setBuildTimeData('clients.elevenlabs', {
|
|
10043
9791
|
"id": "clients.elevenlabs",
|
|
10044
9792
|
"description": "ElevenLabs client — text-to-speech synthesis via the ElevenLabs REST API. Provides methods for listing voices, listing models, and generating speech audio. Audio is returned as a Buffer; use `say()` for a convenience method that writes to disk.",
|
|
@@ -10432,7 +10180,259 @@ setBuildTimeData('clients.supabase', {
|
|
|
10432
10180
|
"examples": [
|
|
10433
10181
|
{
|
|
10434
10182
|
"language": "ts",
|
|
10435
|
-
"code": "const supabase = container.client('supabase', {\n supabaseUrl: 'https://xyz.supabase.co',\n supabaseKey: 'your-anon-key',\n})\n\n// Query data\nconst { data } = await supabase.from('users').select('*')\n\n// Auth\nawait supabase.signInWithPassword('user@example.com', 'password')\n\n// Realtime\nsupabase.subscribe('changes', 'users', (payload) => {\n console.log('Change:', payload)\n})"
|
|
10183
|
+
"code": "const supabase = container.client('supabase', {\n supabaseUrl: 'https://xyz.supabase.co',\n supabaseKey: 'your-anon-key',\n})\n\n// Query data\nconst { data } = await supabase.from('users').select('*')\n\n// Auth\nawait supabase.signInWithPassword('user@example.com', 'password')\n\n// Realtime\nsupabase.subscribe('changes', 'users', (payload) => {\n console.log('Change:', payload)\n})"
|
|
10184
|
+
}
|
|
10185
|
+
]
|
|
10186
|
+
});
|
|
10187
|
+
|
|
10188
|
+
setBuildTimeData('clients.comfyui', {
|
|
10189
|
+
"id": "clients.comfyui",
|
|
10190
|
+
"description": "ComfyUI client — execute Stable Diffusion workflows via the ComfyUI API. Connects to a ComfyUI instance to queue prompts, track execution via WebSocket or polling, and download generated images. Supports both UI-format and API-format workflows with automatic conversion.",
|
|
10191
|
+
"shortcut": "clients.comfyui",
|
|
10192
|
+
"className": "ComfyUIClient",
|
|
10193
|
+
"methods": {
|
|
10194
|
+
"queuePrompt": {
|
|
10195
|
+
"description": "Queue a prompt (API-format workflow) for execution.",
|
|
10196
|
+
"parameters": {
|
|
10197
|
+
"prompt": {
|
|
10198
|
+
"type": "Record<string, any>",
|
|
10199
|
+
"description": "The API-format workflow object"
|
|
10200
|
+
},
|
|
10201
|
+
"clientId": {
|
|
10202
|
+
"type": "string",
|
|
10203
|
+
"description": "Override the client ID for this request"
|
|
10204
|
+
}
|
|
10205
|
+
},
|
|
10206
|
+
"required": [
|
|
10207
|
+
"prompt"
|
|
10208
|
+
],
|
|
10209
|
+
"returns": "Promise<{ prompt_id: string; number: number }>",
|
|
10210
|
+
"examples": [
|
|
10211
|
+
{
|
|
10212
|
+
"language": "ts",
|
|
10213
|
+
"code": "const { prompt_id } = await comfy.queuePrompt(apiWorkflow)"
|
|
10214
|
+
}
|
|
10215
|
+
]
|
|
10216
|
+
},
|
|
10217
|
+
"getQueue": {
|
|
10218
|
+
"description": "Get the current prompt queue status.",
|
|
10219
|
+
"parameters": {},
|
|
10220
|
+
"required": [],
|
|
10221
|
+
"returns": "Promise<{ queue_running: any[]; queue_pending: any[] }>"
|
|
10222
|
+
},
|
|
10223
|
+
"getHistory": {
|
|
10224
|
+
"description": "Get execution history, optionally for a specific prompt.",
|
|
10225
|
+
"parameters": {
|
|
10226
|
+
"promptId": {
|
|
10227
|
+
"type": "string",
|
|
10228
|
+
"description": "If provided, returns history for this prompt only"
|
|
10229
|
+
}
|
|
10230
|
+
},
|
|
10231
|
+
"required": [],
|
|
10232
|
+
"returns": "Promise<Record<string, any>>"
|
|
10233
|
+
},
|
|
10234
|
+
"getSystemStats": {
|
|
10235
|
+
"description": "Get system stats including GPU memory and queue info.",
|
|
10236
|
+
"parameters": {},
|
|
10237
|
+
"required": [],
|
|
10238
|
+
"returns": "Promise<any>"
|
|
10239
|
+
},
|
|
10240
|
+
"getObjectInfo": {
|
|
10241
|
+
"description": "Get node type info with input/output schemas.",
|
|
10242
|
+
"parameters": {
|
|
10243
|
+
"nodeClass": {
|
|
10244
|
+
"type": "string",
|
|
10245
|
+
"description": "If provided, returns info for this node type only"
|
|
10246
|
+
}
|
|
10247
|
+
},
|
|
10248
|
+
"required": [],
|
|
10249
|
+
"returns": "Promise<any>"
|
|
10250
|
+
},
|
|
10251
|
+
"interrupt": {
|
|
10252
|
+
"description": "Interrupt the currently executing prompt.",
|
|
10253
|
+
"parameters": {},
|
|
10254
|
+
"required": [],
|
|
10255
|
+
"returns": "Promise<void>"
|
|
10256
|
+
},
|
|
10257
|
+
"getModels": {
|
|
10258
|
+
"description": "List available models, optionally filtered by type.",
|
|
10259
|
+
"parameters": {
|
|
10260
|
+
"type": {
|
|
10261
|
+
"type": "string",
|
|
10262
|
+
"description": "Model type filter (e.g., 'checkpoints', 'loras')"
|
|
10263
|
+
}
|
|
10264
|
+
},
|
|
10265
|
+
"required": [],
|
|
10266
|
+
"returns": "Promise<string[]>"
|
|
10267
|
+
},
|
|
10268
|
+
"getEmbeddings": {
|
|
10269
|
+
"description": "List available embedding models.",
|
|
10270
|
+
"parameters": {},
|
|
10271
|
+
"required": [],
|
|
10272
|
+
"returns": "Promise<string[]>"
|
|
10273
|
+
},
|
|
10274
|
+
"uploadImage": {
|
|
10275
|
+
"description": "Upload an image to ComfyUI's input directory.",
|
|
10276
|
+
"parameters": {
|
|
10277
|
+
"file": {
|
|
10278
|
+
"type": "Buffer | Blob",
|
|
10279
|
+
"description": "The image data as Buffer or Blob"
|
|
10280
|
+
},
|
|
10281
|
+
"filename": {
|
|
10282
|
+
"type": "string",
|
|
10283
|
+
"description": "File name for the upload"
|
|
10284
|
+
},
|
|
10285
|
+
"opts": {
|
|
10286
|
+
"type": "{ subfolder?: string; type?: string; overwrite?: boolean }",
|
|
10287
|
+
"description": "Upload options (subfolder, type, overwrite)"
|
|
10288
|
+
}
|
|
10289
|
+
},
|
|
10290
|
+
"required": [
|
|
10291
|
+
"file",
|
|
10292
|
+
"filename"
|
|
10293
|
+
],
|
|
10294
|
+
"returns": "Promise<any>"
|
|
10295
|
+
},
|
|
10296
|
+
"viewImage": {
|
|
10297
|
+
"description": "Download a generated image from ComfyUI as a Buffer.",
|
|
10298
|
+
"parameters": {
|
|
10299
|
+
"filename": {
|
|
10300
|
+
"type": "string",
|
|
10301
|
+
"description": "The image filename"
|
|
10302
|
+
},
|
|
10303
|
+
"subfolder": {
|
|
10304
|
+
"type": "any",
|
|
10305
|
+
"description": "Subfolder within the output directory"
|
|
10306
|
+
},
|
|
10307
|
+
"type": {
|
|
10308
|
+
"type": "any",
|
|
10309
|
+
"description": "Image type ('output', 'input', 'temp')"
|
|
10310
|
+
}
|
|
10311
|
+
},
|
|
10312
|
+
"required": [
|
|
10313
|
+
"filename"
|
|
10314
|
+
],
|
|
10315
|
+
"returns": "Promise<Buffer>"
|
|
10316
|
+
},
|
|
10317
|
+
"connectWs": {
|
|
10318
|
+
"description": "Open a WebSocket connection to ComfyUI for real-time execution tracking. Events emitted: `execution_start`, `executing`, `progress`, `executed`, `execution_cached`, `execution_error`, `execution_complete`.",
|
|
10319
|
+
"parameters": {},
|
|
10320
|
+
"required": [],
|
|
10321
|
+
"returns": "Promise<void>"
|
|
10322
|
+
},
|
|
10323
|
+
"disconnectWs": {
|
|
10324
|
+
"description": "Close the WebSocket connection.",
|
|
10325
|
+
"parameters": {},
|
|
10326
|
+
"required": [],
|
|
10327
|
+
"returns": "void"
|
|
10328
|
+
},
|
|
10329
|
+
"toApiFormat": {
|
|
10330
|
+
"description": "Convert a UI-format workflow to the API format that /prompt expects. Requires a running ComfyUI instance to fetch `object_info` so we can map positional `widgets_values` to their named input fields. If the workflow is already in API format, it's returned as-is.",
|
|
10331
|
+
"parameters": {
|
|
10332
|
+
"workflow": {
|
|
10333
|
+
"type": "Record<string, any>",
|
|
10334
|
+
"description": "Parameter workflow"
|
|
10335
|
+
}
|
|
10336
|
+
},
|
|
10337
|
+
"required": [
|
|
10338
|
+
"workflow"
|
|
10339
|
+
],
|
|
10340
|
+
"returns": "Promise<Record<string, any>>"
|
|
10341
|
+
},
|
|
10342
|
+
"runWorkflow": {
|
|
10343
|
+
"description": "Run a ComfyUI workflow with optional runtime input overrides. Inputs can be provided in two forms: **Direct node mapping** (when no `inputMap` in options): ``` { '3': { seed: 42 }, '6': { text: 'a cat' } } ``` **Named inputs** (when `inputMap` is provided in options): ``` inputs: { positive_prompt: 'a cat', seed: 42 } options.inputMap: { positive_prompt: { nodeId: '6', field: 'text' }, seed: { nodeId: '3', field: 'seed' } } ```",
|
|
10344
|
+
"parameters": {
|
|
10345
|
+
"workflow": {
|
|
10346
|
+
"type": "Record<string, any>",
|
|
10347
|
+
"description": "Parameter workflow"
|
|
10348
|
+
},
|
|
10349
|
+
"inputs": {
|
|
10350
|
+
"type": "Record<string, any>",
|
|
10351
|
+
"description": "Parameter inputs"
|
|
10352
|
+
},
|
|
10353
|
+
"options": {
|
|
10354
|
+
"type": "WorkflowRunOptions",
|
|
10355
|
+
"description": "Parameter options",
|
|
10356
|
+
"properties": {
|
|
10357
|
+
"poll": {
|
|
10358
|
+
"type": "boolean",
|
|
10359
|
+
"description": "Use polling instead of WebSocket for tracking execution"
|
|
10360
|
+
},
|
|
10361
|
+
"pollInterval": {
|
|
10362
|
+
"type": "number",
|
|
10363
|
+
"description": "Polling interval in ms (default 1000)"
|
|
10364
|
+
},
|
|
10365
|
+
"inputMap": {
|
|
10366
|
+
"type": "InputMapping",
|
|
10367
|
+
"description": "Named input mapping: semantic name -> { nodeId, field }"
|
|
10368
|
+
},
|
|
10369
|
+
"outputDir": {
|
|
10370
|
+
"type": "string",
|
|
10371
|
+
"description": "If provided, output images are downloaded to this directory"
|
|
10372
|
+
}
|
|
10373
|
+
}
|
|
10374
|
+
}
|
|
10375
|
+
},
|
|
10376
|
+
"required": [
|
|
10377
|
+
"workflow"
|
|
10378
|
+
],
|
|
10379
|
+
"returns": "Promise<WorkflowResult>"
|
|
10380
|
+
}
|
|
10381
|
+
},
|
|
10382
|
+
"getters": {
|
|
10383
|
+
"clientId": {
|
|
10384
|
+
"description": "The unique client ID used for WebSocket session tracking.",
|
|
10385
|
+
"returns": "string"
|
|
10386
|
+
},
|
|
10387
|
+
"wsURL": {
|
|
10388
|
+
"description": "The WebSocket URL derived from baseURL or overridden via options.",
|
|
10389
|
+
"returns": "string"
|
|
10390
|
+
}
|
|
10391
|
+
},
|
|
10392
|
+
"events": {
|
|
10393
|
+
"execution_start": {
|
|
10394
|
+
"name": "execution_start",
|
|
10395
|
+
"description": "Event emitted by ComfyUIClient",
|
|
10396
|
+
"arguments": {}
|
|
10397
|
+
},
|
|
10398
|
+
"execution_complete": {
|
|
10399
|
+
"name": "execution_complete",
|
|
10400
|
+
"description": "Event emitted by ComfyUIClient",
|
|
10401
|
+
"arguments": {}
|
|
10402
|
+
},
|
|
10403
|
+
"executing": {
|
|
10404
|
+
"name": "executing",
|
|
10405
|
+
"description": "Event emitted by ComfyUIClient",
|
|
10406
|
+
"arguments": {}
|
|
10407
|
+
},
|
|
10408
|
+
"progress": {
|
|
10409
|
+
"name": "progress",
|
|
10410
|
+
"description": "Event emitted by ComfyUIClient",
|
|
10411
|
+
"arguments": {}
|
|
10412
|
+
},
|
|
10413
|
+
"executed": {
|
|
10414
|
+
"name": "executed",
|
|
10415
|
+
"description": "Event emitted by ComfyUIClient",
|
|
10416
|
+
"arguments": {}
|
|
10417
|
+
},
|
|
10418
|
+
"execution_cached": {
|
|
10419
|
+
"name": "execution_cached",
|
|
10420
|
+
"description": "Event emitted by ComfyUIClient",
|
|
10421
|
+
"arguments": {}
|
|
10422
|
+
},
|
|
10423
|
+
"execution_error": {
|
|
10424
|
+
"name": "execution_error",
|
|
10425
|
+
"description": "Event emitted by ComfyUIClient",
|
|
10426
|
+
"arguments": {}
|
|
10427
|
+
}
|
|
10428
|
+
},
|
|
10429
|
+
"state": {},
|
|
10430
|
+
"options": {},
|
|
10431
|
+
"envVars": [],
|
|
10432
|
+
"examples": [
|
|
10433
|
+
{
|
|
10434
|
+
"language": "ts",
|
|
10435
|
+
"code": "const comfy = container.client('comfyui', { baseURL: 'http://localhost:8188' })\nconst result = await comfy.runWorkflow(workflow, {\n '6': { text: 'a beautiful sunset' }\n})\nconsole.log(result.images)"
|
|
10436
10436
|
}
|
|
10437
10437
|
]
|
|
10438
10438
|
});
|
|
@@ -20961,260 +20961,9 @@ export const introspectionData = [
|
|
|
20961
20961
|
"description": "Event emitted by OpenAIClient",
|
|
20962
20962
|
"arguments": {}
|
|
20963
20963
|
},
|
|
20964
|
-
"models": {
|
|
20965
|
-
"name": "models",
|
|
20966
|
-
"description": "Event emitted by OpenAIClient",
|
|
20967
|
-
"arguments": {}
|
|
20968
|
-
}
|
|
20969
|
-
},
|
|
20970
|
-
"state": {},
|
|
20971
|
-
"options": {},
|
|
20972
|
-
"envVars": [],
|
|
20973
|
-
"examples": [
|
|
20974
|
-
{
|
|
20975
|
-
"language": "ts",
|
|
20976
|
-
"code": "const openai = container.client('openai', { defaultModel: 'gpt-4o' })\nconst answer = await openai.ask('What is the meaning of life?')\nconsole.log(answer)"
|
|
20977
|
-
}
|
|
20978
|
-
]
|
|
20979
|
-
},
|
|
20980
|
-
{
|
|
20981
|
-
"id": "clients.comfyui",
|
|
20982
|
-
"description": "ComfyUI client — execute Stable Diffusion workflows via the ComfyUI API. Connects to a ComfyUI instance to queue prompts, track execution via WebSocket or polling, and download generated images. Supports both UI-format and API-format workflows with automatic conversion.",
|
|
20983
|
-
"shortcut": "clients.comfyui",
|
|
20984
|
-
"className": "ComfyUIClient",
|
|
20985
|
-
"methods": {
|
|
20986
|
-
"queuePrompt": {
|
|
20987
|
-
"description": "Queue a prompt (API-format workflow) for execution.",
|
|
20988
|
-
"parameters": {
|
|
20989
|
-
"prompt": {
|
|
20990
|
-
"type": "Record<string, any>",
|
|
20991
|
-
"description": "The API-format workflow object"
|
|
20992
|
-
},
|
|
20993
|
-
"clientId": {
|
|
20994
|
-
"type": "string",
|
|
20995
|
-
"description": "Override the client ID for this request"
|
|
20996
|
-
}
|
|
20997
|
-
},
|
|
20998
|
-
"required": [
|
|
20999
|
-
"prompt"
|
|
21000
|
-
],
|
|
21001
|
-
"returns": "Promise<{ prompt_id: string; number: number }>",
|
|
21002
|
-
"examples": [
|
|
21003
|
-
{
|
|
21004
|
-
"language": "ts",
|
|
21005
|
-
"code": "const { prompt_id } = await comfy.queuePrompt(apiWorkflow)"
|
|
21006
|
-
}
|
|
21007
|
-
]
|
|
21008
|
-
},
|
|
21009
|
-
"getQueue": {
|
|
21010
|
-
"description": "Get the current prompt queue status.",
|
|
21011
|
-
"parameters": {},
|
|
21012
|
-
"required": [],
|
|
21013
|
-
"returns": "Promise<{ queue_running: any[]; queue_pending: any[] }>"
|
|
21014
|
-
},
|
|
21015
|
-
"getHistory": {
|
|
21016
|
-
"description": "Get execution history, optionally for a specific prompt.",
|
|
21017
|
-
"parameters": {
|
|
21018
|
-
"promptId": {
|
|
21019
|
-
"type": "string",
|
|
21020
|
-
"description": "If provided, returns history for this prompt only"
|
|
21021
|
-
}
|
|
21022
|
-
},
|
|
21023
|
-
"required": [],
|
|
21024
|
-
"returns": "Promise<Record<string, any>>"
|
|
21025
|
-
},
|
|
21026
|
-
"getSystemStats": {
|
|
21027
|
-
"description": "Get system stats including GPU memory and queue info.",
|
|
21028
|
-
"parameters": {},
|
|
21029
|
-
"required": [],
|
|
21030
|
-
"returns": "Promise<any>"
|
|
21031
|
-
},
|
|
21032
|
-
"getObjectInfo": {
|
|
21033
|
-
"description": "Get node type info with input/output schemas.",
|
|
21034
|
-
"parameters": {
|
|
21035
|
-
"nodeClass": {
|
|
21036
|
-
"type": "string",
|
|
21037
|
-
"description": "If provided, returns info for this node type only"
|
|
21038
|
-
}
|
|
21039
|
-
},
|
|
21040
|
-
"required": [],
|
|
21041
|
-
"returns": "Promise<any>"
|
|
21042
|
-
},
|
|
21043
|
-
"interrupt": {
|
|
21044
|
-
"description": "Interrupt the currently executing prompt.",
|
|
21045
|
-
"parameters": {},
|
|
21046
|
-
"required": [],
|
|
21047
|
-
"returns": "Promise<void>"
|
|
21048
|
-
},
|
|
21049
|
-
"getModels": {
|
|
21050
|
-
"description": "List available models, optionally filtered by type.",
|
|
21051
|
-
"parameters": {
|
|
21052
|
-
"type": {
|
|
21053
|
-
"type": "string",
|
|
21054
|
-
"description": "Model type filter (e.g., 'checkpoints', 'loras')"
|
|
21055
|
-
}
|
|
21056
|
-
},
|
|
21057
|
-
"required": [],
|
|
21058
|
-
"returns": "Promise<string[]>"
|
|
21059
|
-
},
|
|
21060
|
-
"getEmbeddings": {
|
|
21061
|
-
"description": "List available embedding models.",
|
|
21062
|
-
"parameters": {},
|
|
21063
|
-
"required": [],
|
|
21064
|
-
"returns": "Promise<string[]>"
|
|
21065
|
-
},
|
|
21066
|
-
"uploadImage": {
|
|
21067
|
-
"description": "Upload an image to ComfyUI's input directory.",
|
|
21068
|
-
"parameters": {
|
|
21069
|
-
"file": {
|
|
21070
|
-
"type": "Buffer | Blob",
|
|
21071
|
-
"description": "The image data as Buffer or Blob"
|
|
21072
|
-
},
|
|
21073
|
-
"filename": {
|
|
21074
|
-
"type": "string",
|
|
21075
|
-
"description": "File name for the upload"
|
|
21076
|
-
},
|
|
21077
|
-
"opts": {
|
|
21078
|
-
"type": "{ subfolder?: string; type?: string; overwrite?: boolean }",
|
|
21079
|
-
"description": "Upload options (subfolder, type, overwrite)"
|
|
21080
|
-
}
|
|
21081
|
-
},
|
|
21082
|
-
"required": [
|
|
21083
|
-
"file",
|
|
21084
|
-
"filename"
|
|
21085
|
-
],
|
|
21086
|
-
"returns": "Promise<any>"
|
|
21087
|
-
},
|
|
21088
|
-
"viewImage": {
|
|
21089
|
-
"description": "Download a generated image from ComfyUI as a Buffer.",
|
|
21090
|
-
"parameters": {
|
|
21091
|
-
"filename": {
|
|
21092
|
-
"type": "string",
|
|
21093
|
-
"description": "The image filename"
|
|
21094
|
-
},
|
|
21095
|
-
"subfolder": {
|
|
21096
|
-
"type": "any",
|
|
21097
|
-
"description": "Subfolder within the output directory"
|
|
21098
|
-
},
|
|
21099
|
-
"type": {
|
|
21100
|
-
"type": "any",
|
|
21101
|
-
"description": "Image type ('output', 'input', 'temp')"
|
|
21102
|
-
}
|
|
21103
|
-
},
|
|
21104
|
-
"required": [
|
|
21105
|
-
"filename"
|
|
21106
|
-
],
|
|
21107
|
-
"returns": "Promise<Buffer>"
|
|
21108
|
-
},
|
|
21109
|
-
"connectWs": {
|
|
21110
|
-
"description": "Open a WebSocket connection to ComfyUI for real-time execution tracking. Events emitted: `execution_start`, `executing`, `progress`, `executed`, `execution_cached`, `execution_error`, `execution_complete`.",
|
|
21111
|
-
"parameters": {},
|
|
21112
|
-
"required": [],
|
|
21113
|
-
"returns": "Promise<void>"
|
|
21114
|
-
},
|
|
21115
|
-
"disconnectWs": {
|
|
21116
|
-
"description": "Close the WebSocket connection.",
|
|
21117
|
-
"parameters": {},
|
|
21118
|
-
"required": [],
|
|
21119
|
-
"returns": "void"
|
|
21120
|
-
},
|
|
21121
|
-
"toApiFormat": {
|
|
21122
|
-
"description": "Convert a UI-format workflow to the API format that /prompt expects. Requires a running ComfyUI instance to fetch `object_info` so we can map positional `widgets_values` to their named input fields. If the workflow is already in API format, it's returned as-is.",
|
|
21123
|
-
"parameters": {
|
|
21124
|
-
"workflow": {
|
|
21125
|
-
"type": "Record<string, any>",
|
|
21126
|
-
"description": "Parameter workflow"
|
|
21127
|
-
}
|
|
21128
|
-
},
|
|
21129
|
-
"required": [
|
|
21130
|
-
"workflow"
|
|
21131
|
-
],
|
|
21132
|
-
"returns": "Promise<Record<string, any>>"
|
|
21133
|
-
},
|
|
21134
|
-
"runWorkflow": {
|
|
21135
|
-
"description": "Run a ComfyUI workflow with optional runtime input overrides. Inputs can be provided in two forms: **Direct node mapping** (when no `inputMap` in options): ``` { '3': { seed: 42 }, '6': { text: 'a cat' } } ``` **Named inputs** (when `inputMap` is provided in options): ``` inputs: { positive_prompt: 'a cat', seed: 42 } options.inputMap: { positive_prompt: { nodeId: '6', field: 'text' }, seed: { nodeId: '3', field: 'seed' } } ```",
|
|
21136
|
-
"parameters": {
|
|
21137
|
-
"workflow": {
|
|
21138
|
-
"type": "Record<string, any>",
|
|
21139
|
-
"description": "Parameter workflow"
|
|
21140
|
-
},
|
|
21141
|
-
"inputs": {
|
|
21142
|
-
"type": "Record<string, any>",
|
|
21143
|
-
"description": "Parameter inputs"
|
|
21144
|
-
},
|
|
21145
|
-
"options": {
|
|
21146
|
-
"type": "WorkflowRunOptions",
|
|
21147
|
-
"description": "Parameter options",
|
|
21148
|
-
"properties": {
|
|
21149
|
-
"poll": {
|
|
21150
|
-
"type": "boolean",
|
|
21151
|
-
"description": "Use polling instead of WebSocket for tracking execution"
|
|
21152
|
-
},
|
|
21153
|
-
"pollInterval": {
|
|
21154
|
-
"type": "number",
|
|
21155
|
-
"description": "Polling interval in ms (default 1000)"
|
|
21156
|
-
},
|
|
21157
|
-
"inputMap": {
|
|
21158
|
-
"type": "InputMapping",
|
|
21159
|
-
"description": "Named input mapping: semantic name -> { nodeId, field }"
|
|
21160
|
-
},
|
|
21161
|
-
"outputDir": {
|
|
21162
|
-
"type": "string",
|
|
21163
|
-
"description": "If provided, output images are downloaded to this directory"
|
|
21164
|
-
}
|
|
21165
|
-
}
|
|
21166
|
-
}
|
|
21167
|
-
},
|
|
21168
|
-
"required": [
|
|
21169
|
-
"workflow"
|
|
21170
|
-
],
|
|
21171
|
-
"returns": "Promise<WorkflowResult>"
|
|
21172
|
-
}
|
|
21173
|
-
},
|
|
21174
|
-
"getters": {
|
|
21175
|
-
"clientId": {
|
|
21176
|
-
"description": "The unique client ID used for WebSocket session tracking.",
|
|
21177
|
-
"returns": "string"
|
|
21178
|
-
},
|
|
21179
|
-
"wsURL": {
|
|
21180
|
-
"description": "The WebSocket URL derived from baseURL or overridden via options.",
|
|
21181
|
-
"returns": "string"
|
|
21182
|
-
}
|
|
21183
|
-
},
|
|
21184
|
-
"events": {
|
|
21185
|
-
"execution_start": {
|
|
21186
|
-
"name": "execution_start",
|
|
21187
|
-
"description": "Event emitted by ComfyUIClient",
|
|
21188
|
-
"arguments": {}
|
|
21189
|
-
},
|
|
21190
|
-
"execution_complete": {
|
|
21191
|
-
"name": "execution_complete",
|
|
21192
|
-
"description": "Event emitted by ComfyUIClient",
|
|
21193
|
-
"arguments": {}
|
|
21194
|
-
},
|
|
21195
|
-
"executing": {
|
|
21196
|
-
"name": "executing",
|
|
21197
|
-
"description": "Event emitted by ComfyUIClient",
|
|
21198
|
-
"arguments": {}
|
|
21199
|
-
},
|
|
21200
|
-
"progress": {
|
|
21201
|
-
"name": "progress",
|
|
21202
|
-
"description": "Event emitted by ComfyUIClient",
|
|
21203
|
-
"arguments": {}
|
|
21204
|
-
},
|
|
21205
|
-
"executed": {
|
|
21206
|
-
"name": "executed",
|
|
21207
|
-
"description": "Event emitted by ComfyUIClient",
|
|
21208
|
-
"arguments": {}
|
|
21209
|
-
},
|
|
21210
|
-
"execution_cached": {
|
|
21211
|
-
"name": "execution_cached",
|
|
21212
|
-
"description": "Event emitted by ComfyUIClient",
|
|
21213
|
-
"arguments": {}
|
|
21214
|
-
},
|
|
21215
|
-
"execution_error": {
|
|
21216
|
-
"name": "execution_error",
|
|
21217
|
-
"description": "Event emitted by ComfyUIClient",
|
|
20964
|
+
"models": {
|
|
20965
|
+
"name": "models",
|
|
20966
|
+
"description": "Event emitted by OpenAIClient",
|
|
21218
20967
|
"arguments": {}
|
|
21219
20968
|
}
|
|
21220
20969
|
},
|
|
@@ -21224,7 +20973,7 @@ export const introspectionData = [
|
|
|
21224
20973
|
"examples": [
|
|
21225
20974
|
{
|
|
21226
20975
|
"language": "ts",
|
|
21227
|
-
"code": "const
|
|
20976
|
+
"code": "const openai = container.client('openai', { defaultModel: 'gpt-4o' })\nconst answer = await openai.ask('What is the meaning of life?')\nconsole.log(answer)"
|
|
21228
20977
|
}
|
|
21229
20978
|
]
|
|
21230
20979
|
},
|
|
@@ -21624,6 +21373,257 @@ export const introspectionData = [
|
|
|
21624
21373
|
}
|
|
21625
21374
|
]
|
|
21626
21375
|
},
|
|
21376
|
+
{
|
|
21377
|
+
"id": "clients.comfyui",
|
|
21378
|
+
"description": "ComfyUI client — execute Stable Diffusion workflows via the ComfyUI API. Connects to a ComfyUI instance to queue prompts, track execution via WebSocket or polling, and download generated images. Supports both UI-format and API-format workflows with automatic conversion.",
|
|
21379
|
+
"shortcut": "clients.comfyui",
|
|
21380
|
+
"className": "ComfyUIClient",
|
|
21381
|
+
"methods": {
|
|
21382
|
+
"queuePrompt": {
|
|
21383
|
+
"description": "Queue a prompt (API-format workflow) for execution.",
|
|
21384
|
+
"parameters": {
|
|
21385
|
+
"prompt": {
|
|
21386
|
+
"type": "Record<string, any>",
|
|
21387
|
+
"description": "The API-format workflow object"
|
|
21388
|
+
},
|
|
21389
|
+
"clientId": {
|
|
21390
|
+
"type": "string",
|
|
21391
|
+
"description": "Override the client ID for this request"
|
|
21392
|
+
}
|
|
21393
|
+
},
|
|
21394
|
+
"required": [
|
|
21395
|
+
"prompt"
|
|
21396
|
+
],
|
|
21397
|
+
"returns": "Promise<{ prompt_id: string; number: number }>",
|
|
21398
|
+
"examples": [
|
|
21399
|
+
{
|
|
21400
|
+
"language": "ts",
|
|
21401
|
+
"code": "const { prompt_id } = await comfy.queuePrompt(apiWorkflow)"
|
|
21402
|
+
}
|
|
21403
|
+
]
|
|
21404
|
+
},
|
|
21405
|
+
"getQueue": {
|
|
21406
|
+
"description": "Get the current prompt queue status.",
|
|
21407
|
+
"parameters": {},
|
|
21408
|
+
"required": [],
|
|
21409
|
+
"returns": "Promise<{ queue_running: any[]; queue_pending: any[] }>"
|
|
21410
|
+
},
|
|
21411
|
+
"getHistory": {
|
|
21412
|
+
"description": "Get execution history, optionally for a specific prompt.",
|
|
21413
|
+
"parameters": {
|
|
21414
|
+
"promptId": {
|
|
21415
|
+
"type": "string",
|
|
21416
|
+
"description": "If provided, returns history for this prompt only"
|
|
21417
|
+
}
|
|
21418
|
+
},
|
|
21419
|
+
"required": [],
|
|
21420
|
+
"returns": "Promise<Record<string, any>>"
|
|
21421
|
+
},
|
|
21422
|
+
"getSystemStats": {
|
|
21423
|
+
"description": "Get system stats including GPU memory and queue info.",
|
|
21424
|
+
"parameters": {},
|
|
21425
|
+
"required": [],
|
|
21426
|
+
"returns": "Promise<any>"
|
|
21427
|
+
},
|
|
21428
|
+
"getObjectInfo": {
|
|
21429
|
+
"description": "Get node type info with input/output schemas.",
|
|
21430
|
+
"parameters": {
|
|
21431
|
+
"nodeClass": {
|
|
21432
|
+
"type": "string",
|
|
21433
|
+
"description": "If provided, returns info for this node type only"
|
|
21434
|
+
}
|
|
21435
|
+
},
|
|
21436
|
+
"required": [],
|
|
21437
|
+
"returns": "Promise<any>"
|
|
21438
|
+
},
|
|
21439
|
+
"interrupt": {
|
|
21440
|
+
"description": "Interrupt the currently executing prompt.",
|
|
21441
|
+
"parameters": {},
|
|
21442
|
+
"required": [],
|
|
21443
|
+
"returns": "Promise<void>"
|
|
21444
|
+
},
|
|
21445
|
+
"getModels": {
|
|
21446
|
+
"description": "List available models, optionally filtered by type.",
|
|
21447
|
+
"parameters": {
|
|
21448
|
+
"type": {
|
|
21449
|
+
"type": "string",
|
|
21450
|
+
"description": "Model type filter (e.g., 'checkpoints', 'loras')"
|
|
21451
|
+
}
|
|
21452
|
+
},
|
|
21453
|
+
"required": [],
|
|
21454
|
+
"returns": "Promise<string[]>"
|
|
21455
|
+
},
|
|
21456
|
+
"getEmbeddings": {
|
|
21457
|
+
"description": "List available embedding models.",
|
|
21458
|
+
"parameters": {},
|
|
21459
|
+
"required": [],
|
|
21460
|
+
"returns": "Promise<string[]>"
|
|
21461
|
+
},
|
|
21462
|
+
"uploadImage": {
|
|
21463
|
+
"description": "Upload an image to ComfyUI's input directory.",
|
|
21464
|
+
"parameters": {
|
|
21465
|
+
"file": {
|
|
21466
|
+
"type": "Buffer | Blob",
|
|
21467
|
+
"description": "The image data as Buffer or Blob"
|
|
21468
|
+
},
|
|
21469
|
+
"filename": {
|
|
21470
|
+
"type": "string",
|
|
21471
|
+
"description": "File name for the upload"
|
|
21472
|
+
},
|
|
21473
|
+
"opts": {
|
|
21474
|
+
"type": "{ subfolder?: string; type?: string; overwrite?: boolean }",
|
|
21475
|
+
"description": "Upload options (subfolder, type, overwrite)"
|
|
21476
|
+
}
|
|
21477
|
+
},
|
|
21478
|
+
"required": [
|
|
21479
|
+
"file",
|
|
21480
|
+
"filename"
|
|
21481
|
+
],
|
|
21482
|
+
"returns": "Promise<any>"
|
|
21483
|
+
},
|
|
21484
|
+
"viewImage": {
|
|
21485
|
+
"description": "Download a generated image from ComfyUI as a Buffer.",
|
|
21486
|
+
"parameters": {
|
|
21487
|
+
"filename": {
|
|
21488
|
+
"type": "string",
|
|
21489
|
+
"description": "The image filename"
|
|
21490
|
+
},
|
|
21491
|
+
"subfolder": {
|
|
21492
|
+
"type": "any",
|
|
21493
|
+
"description": "Subfolder within the output directory"
|
|
21494
|
+
},
|
|
21495
|
+
"type": {
|
|
21496
|
+
"type": "any",
|
|
21497
|
+
"description": "Image type ('output', 'input', 'temp')"
|
|
21498
|
+
}
|
|
21499
|
+
},
|
|
21500
|
+
"required": [
|
|
21501
|
+
"filename"
|
|
21502
|
+
],
|
|
21503
|
+
"returns": "Promise<Buffer>"
|
|
21504
|
+
},
|
|
21505
|
+
"connectWs": {
|
|
21506
|
+
"description": "Open a WebSocket connection to ComfyUI for real-time execution tracking. Events emitted: `execution_start`, `executing`, `progress`, `executed`, `execution_cached`, `execution_error`, `execution_complete`.",
|
|
21507
|
+
"parameters": {},
|
|
21508
|
+
"required": [],
|
|
21509
|
+
"returns": "Promise<void>"
|
|
21510
|
+
},
|
|
21511
|
+
"disconnectWs": {
|
|
21512
|
+
"description": "Close the WebSocket connection.",
|
|
21513
|
+
"parameters": {},
|
|
21514
|
+
"required": [],
|
|
21515
|
+
"returns": "void"
|
|
21516
|
+
},
|
|
21517
|
+
"toApiFormat": {
|
|
21518
|
+
"description": "Convert a UI-format workflow to the API format that /prompt expects. Requires a running ComfyUI instance to fetch `object_info` so we can map positional `widgets_values` to their named input fields. If the workflow is already in API format, it's returned as-is.",
|
|
21519
|
+
"parameters": {
|
|
21520
|
+
"workflow": {
|
|
21521
|
+
"type": "Record<string, any>",
|
|
21522
|
+
"description": "Parameter workflow"
|
|
21523
|
+
}
|
|
21524
|
+
},
|
|
21525
|
+
"required": [
|
|
21526
|
+
"workflow"
|
|
21527
|
+
],
|
|
21528
|
+
"returns": "Promise<Record<string, any>>"
|
|
21529
|
+
},
|
|
21530
|
+
"runWorkflow": {
|
|
21531
|
+
"description": "Run a ComfyUI workflow with optional runtime input overrides. Inputs can be provided in two forms: **Direct node mapping** (when no `inputMap` in options): ``` { '3': { seed: 42 }, '6': { text: 'a cat' } } ``` **Named inputs** (when `inputMap` is provided in options): ``` inputs: { positive_prompt: 'a cat', seed: 42 } options.inputMap: { positive_prompt: { nodeId: '6', field: 'text' }, seed: { nodeId: '3', field: 'seed' } } ```",
|
|
21532
|
+
"parameters": {
|
|
21533
|
+
"workflow": {
|
|
21534
|
+
"type": "Record<string, any>",
|
|
21535
|
+
"description": "Parameter workflow"
|
|
21536
|
+
},
|
|
21537
|
+
"inputs": {
|
|
21538
|
+
"type": "Record<string, any>",
|
|
21539
|
+
"description": "Parameter inputs"
|
|
21540
|
+
},
|
|
21541
|
+
"options": {
|
|
21542
|
+
"type": "WorkflowRunOptions",
|
|
21543
|
+
"description": "Parameter options",
|
|
21544
|
+
"properties": {
|
|
21545
|
+
"poll": {
|
|
21546
|
+
"type": "boolean",
|
|
21547
|
+
"description": "Use polling instead of WebSocket for tracking execution"
|
|
21548
|
+
},
|
|
21549
|
+
"pollInterval": {
|
|
21550
|
+
"type": "number",
|
|
21551
|
+
"description": "Polling interval in ms (default 1000)"
|
|
21552
|
+
},
|
|
21553
|
+
"inputMap": {
|
|
21554
|
+
"type": "InputMapping",
|
|
21555
|
+
"description": "Named input mapping: semantic name -> { nodeId, field }"
|
|
21556
|
+
},
|
|
21557
|
+
"outputDir": {
|
|
21558
|
+
"type": "string",
|
|
21559
|
+
"description": "If provided, output images are downloaded to this directory"
|
|
21560
|
+
}
|
|
21561
|
+
}
|
|
21562
|
+
}
|
|
21563
|
+
},
|
|
21564
|
+
"required": [
|
|
21565
|
+
"workflow"
|
|
21566
|
+
],
|
|
21567
|
+
"returns": "Promise<WorkflowResult>"
|
|
21568
|
+
}
|
|
21569
|
+
},
|
|
21570
|
+
"getters": {
|
|
21571
|
+
"clientId": {
|
|
21572
|
+
"description": "The unique client ID used for WebSocket session tracking.",
|
|
21573
|
+
"returns": "string"
|
|
21574
|
+
},
|
|
21575
|
+
"wsURL": {
|
|
21576
|
+
"description": "The WebSocket URL derived from baseURL or overridden via options.",
|
|
21577
|
+
"returns": "string"
|
|
21578
|
+
}
|
|
21579
|
+
},
|
|
21580
|
+
"events": {
|
|
21581
|
+
"execution_start": {
|
|
21582
|
+
"name": "execution_start",
|
|
21583
|
+
"description": "Event emitted by ComfyUIClient",
|
|
21584
|
+
"arguments": {}
|
|
21585
|
+
},
|
|
21586
|
+
"execution_complete": {
|
|
21587
|
+
"name": "execution_complete",
|
|
21588
|
+
"description": "Event emitted by ComfyUIClient",
|
|
21589
|
+
"arguments": {}
|
|
21590
|
+
},
|
|
21591
|
+
"executing": {
|
|
21592
|
+
"name": "executing",
|
|
21593
|
+
"description": "Event emitted by ComfyUIClient",
|
|
21594
|
+
"arguments": {}
|
|
21595
|
+
},
|
|
21596
|
+
"progress": {
|
|
21597
|
+
"name": "progress",
|
|
21598
|
+
"description": "Event emitted by ComfyUIClient",
|
|
21599
|
+
"arguments": {}
|
|
21600
|
+
},
|
|
21601
|
+
"executed": {
|
|
21602
|
+
"name": "executed",
|
|
21603
|
+
"description": "Event emitted by ComfyUIClient",
|
|
21604
|
+
"arguments": {}
|
|
21605
|
+
},
|
|
21606
|
+
"execution_cached": {
|
|
21607
|
+
"name": "execution_cached",
|
|
21608
|
+
"description": "Event emitted by ComfyUIClient",
|
|
21609
|
+
"arguments": {}
|
|
21610
|
+
},
|
|
21611
|
+
"execution_error": {
|
|
21612
|
+
"name": "execution_error",
|
|
21613
|
+
"description": "Event emitted by ComfyUIClient",
|
|
21614
|
+
"arguments": {}
|
|
21615
|
+
}
|
|
21616
|
+
},
|
|
21617
|
+
"state": {},
|
|
21618
|
+
"options": {},
|
|
21619
|
+
"envVars": [],
|
|
21620
|
+
"examples": [
|
|
21621
|
+
{
|
|
21622
|
+
"language": "ts",
|
|
21623
|
+
"code": "const comfy = container.client('comfyui', { baseURL: 'http://localhost:8188' })\nconst result = await comfy.runWorkflow(workflow, {\n '6': { text: 'a beautiful sunset' }\n})\nconsole.log(result.images)"
|
|
21624
|
+
}
|
|
21625
|
+
]
|
|
21626
|
+
},
|
|
21627
21627
|
{
|
|
21628
21628
|
"id": "servers.mcp",
|
|
21629
21629
|
"description": "MCP (Model Context Protocol) server for exposing tools, resources, and prompts to AI clients like Claude Code. Uses the low-level MCP SDK Server class directly with Zod 4 native JSON Schema conversion. Register tools, resources, and prompts programmatically, then start the server over stdio (for CLI integration) or HTTP (for remote access).",
|