@soederpop/luca 0.2.2 → 0.2.3

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.
@@ -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-04-06T20:39:08.676Z
4
+ // Generated at: 2026-04-09T05:21:42.461Z
5
5
 
6
6
  setBuildTimeData('features.googleDocs', {
7
7
  "id": "features.googleDocs",
@@ -12132,6 +12132,303 @@ setBuildTimeData('clients.openai', {
12132
12132
  ]
12133
12133
  });
12134
12134
 
12135
+ setBuildTimeData('clients.comfyui', {
12136
+ "id": "clients.comfyui",
12137
+ "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.",
12138
+ "shortcut": "clients.comfyui",
12139
+ "className": "ComfyUIClient",
12140
+ "methods": {
12141
+ "queuePrompt": {
12142
+ "description": "Queue a prompt (API-format workflow) for execution.",
12143
+ "parameters": {
12144
+ "prompt": {
12145
+ "type": "Record<string, any>",
12146
+ "description": "The API-format workflow object"
12147
+ },
12148
+ "clientId": {
12149
+ "type": "string",
12150
+ "description": "Override the client ID for this request"
12151
+ }
12152
+ },
12153
+ "required": [
12154
+ "prompt"
12155
+ ],
12156
+ "returns": "Promise<{ prompt_id: string; number: number }>",
12157
+ "examples": [
12158
+ {
12159
+ "language": "ts",
12160
+ "code": "const { prompt_id } = await comfy.queuePrompt(apiWorkflow)"
12161
+ }
12162
+ ]
12163
+ },
12164
+ "getQueue": {
12165
+ "description": "Get the current prompt queue status.",
12166
+ "parameters": {},
12167
+ "required": [],
12168
+ "returns": "Promise<{ queue_running: any[]; queue_pending: any[] }>"
12169
+ },
12170
+ "getHistory": {
12171
+ "description": "Get execution history, optionally for a specific prompt.",
12172
+ "parameters": {
12173
+ "promptId": {
12174
+ "type": "string",
12175
+ "description": "If provided, returns history for this prompt only"
12176
+ }
12177
+ },
12178
+ "required": [],
12179
+ "returns": "Promise<Record<string, any>>"
12180
+ },
12181
+ "getSystemStats": {
12182
+ "description": "Get system stats including GPU memory and queue info.",
12183
+ "parameters": {},
12184
+ "required": [],
12185
+ "returns": "Promise<any>"
12186
+ },
12187
+ "getObjectInfo": {
12188
+ "description": "Get node type info with input/output schemas.",
12189
+ "parameters": {
12190
+ "nodeClass": {
12191
+ "type": "string",
12192
+ "description": "If provided, returns info for this node type only"
12193
+ }
12194
+ },
12195
+ "required": [],
12196
+ "returns": "Promise<any>"
12197
+ },
12198
+ "interrupt": {
12199
+ "description": "Interrupt the currently executing prompt.",
12200
+ "parameters": {},
12201
+ "required": [],
12202
+ "returns": "Promise<void>"
12203
+ },
12204
+ "getModels": {
12205
+ "description": "List available models, optionally filtered by type.",
12206
+ "parameters": {
12207
+ "type": {
12208
+ "type": "string",
12209
+ "description": "Model type filter (e.g., 'checkpoints', 'loras')"
12210
+ }
12211
+ },
12212
+ "required": [],
12213
+ "returns": "Promise<string[]>"
12214
+ },
12215
+ "getEmbeddings": {
12216
+ "description": "List available embedding models.",
12217
+ "parameters": {},
12218
+ "required": [],
12219
+ "returns": "Promise<string[]>"
12220
+ },
12221
+ "uploadImage": {
12222
+ "description": "Upload an image to ComfyUI's input directory.",
12223
+ "parameters": {
12224
+ "file": {
12225
+ "type": "Buffer | Blob",
12226
+ "description": "The image data as Buffer or Blob"
12227
+ },
12228
+ "filename": {
12229
+ "type": "string",
12230
+ "description": "File name for the upload"
12231
+ },
12232
+ "opts": {
12233
+ "type": "{ subfolder?: string; type?: string; overwrite?: boolean }",
12234
+ "description": "Upload options (subfolder, type, overwrite)"
12235
+ }
12236
+ },
12237
+ "required": [
12238
+ "file",
12239
+ "filename"
12240
+ ],
12241
+ "returns": "Promise<any>"
12242
+ },
12243
+ "viewImage": {
12244
+ "description": "Download a generated image from ComfyUI as a Buffer.",
12245
+ "parameters": {
12246
+ "filename": {
12247
+ "type": "string",
12248
+ "description": "The image filename"
12249
+ },
12250
+ "subfolder": {
12251
+ "type": "any",
12252
+ "description": "Subfolder within the output directory"
12253
+ },
12254
+ "type": {
12255
+ "type": "any",
12256
+ "description": "Image type ('output', 'input', 'temp')"
12257
+ }
12258
+ },
12259
+ "required": [
12260
+ "filename"
12261
+ ],
12262
+ "returns": "Promise<Buffer>"
12263
+ },
12264
+ "connectWs": {
12265
+ "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`.",
12266
+ "parameters": {},
12267
+ "required": [],
12268
+ "returns": "Promise<void>"
12269
+ },
12270
+ "disconnectWs": {
12271
+ "description": "Close the WebSocket connection.",
12272
+ "parameters": {},
12273
+ "required": [],
12274
+ "returns": "void"
12275
+ },
12276
+ "toApiFormat": {
12277
+ "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.",
12278
+ "parameters": {
12279
+ "workflow": {
12280
+ "type": "Record<string, any>",
12281
+ "description": "Parameter workflow"
12282
+ }
12283
+ },
12284
+ "required": [
12285
+ "workflow"
12286
+ ],
12287
+ "returns": "Promise<Record<string, any>>"
12288
+ },
12289
+ "runWorkflow": {
12290
+ "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' } } ```",
12291
+ "parameters": {
12292
+ "workflow": {
12293
+ "type": "Record<string, any>",
12294
+ "description": "Parameter workflow"
12295
+ },
12296
+ "inputs": {
12297
+ "type": "Record<string, any>",
12298
+ "description": "Parameter inputs"
12299
+ },
12300
+ "options": {
12301
+ "type": "WorkflowRunOptions",
12302
+ "description": "Parameter options",
12303
+ "properties": {
12304
+ "poll": {
12305
+ "type": "boolean",
12306
+ "description": "Use polling instead of WebSocket for tracking execution"
12307
+ },
12308
+ "pollInterval": {
12309
+ "type": "number",
12310
+ "description": "Polling interval in ms (default 1000)"
12311
+ },
12312
+ "inputMap": {
12313
+ "type": "InputMapping",
12314
+ "description": "Named input mapping: semantic name -> { nodeId, field }"
12315
+ },
12316
+ "outputDir": {
12317
+ "type": "string",
12318
+ "description": "If provided, output images are downloaded to this directory"
12319
+ }
12320
+ }
12321
+ }
12322
+ },
12323
+ "required": [
12324
+ "workflow"
12325
+ ],
12326
+ "returns": "Promise<WorkflowResult>"
12327
+ }
12328
+ },
12329
+ "getters": {
12330
+ "clientId": {
12331
+ "description": "The unique client ID used for WebSocket session tracking.",
12332
+ "returns": "string"
12333
+ },
12334
+ "wsURL": {
12335
+ "description": "The WebSocket URL derived from baseURL or overridden via options.",
12336
+ "returns": "string"
12337
+ }
12338
+ },
12339
+ "events": {
12340
+ "execution_start": {
12341
+ "name": "execution_start",
12342
+ "description": "Event emitted by ComfyUIClient",
12343
+ "arguments": {}
12344
+ },
12345
+ "execution_complete": {
12346
+ "name": "execution_complete",
12347
+ "description": "Event emitted by ComfyUIClient",
12348
+ "arguments": {}
12349
+ },
12350
+ "executing": {
12351
+ "name": "executing",
12352
+ "description": "Event emitted by ComfyUIClient",
12353
+ "arguments": {}
12354
+ },
12355
+ "progress": {
12356
+ "name": "progress",
12357
+ "description": "Event emitted by ComfyUIClient",
12358
+ "arguments": {}
12359
+ },
12360
+ "executed": {
12361
+ "name": "executed",
12362
+ "description": "Event emitted by ComfyUIClient",
12363
+ "arguments": {}
12364
+ },
12365
+ "execution_cached": {
12366
+ "name": "execution_cached",
12367
+ "description": "Event emitted by ComfyUIClient",
12368
+ "arguments": {}
12369
+ },
12370
+ "execution_error": {
12371
+ "name": "execution_error",
12372
+ "description": "Event emitted by ComfyUIClient",
12373
+ "arguments": {}
12374
+ }
12375
+ },
12376
+ "state": {},
12377
+ "options": {},
12378
+ "envVars": [],
12379
+ "examples": [
12380
+ {
12381
+ "language": "ts",
12382
+ "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)"
12383
+ }
12384
+ ],
12385
+ "types": {
12386
+ "WorkflowRunOptions": {
12387
+ "description": "",
12388
+ "properties": {
12389
+ "poll": {
12390
+ "type": "boolean",
12391
+ "description": "Use polling instead of WebSocket for tracking execution",
12392
+ "optional": true
12393
+ },
12394
+ "pollInterval": {
12395
+ "type": "number",
12396
+ "description": "Polling interval in ms (default 1000)",
12397
+ "optional": true
12398
+ },
12399
+ "inputMap": {
12400
+ "type": "InputMapping",
12401
+ "description": "Named input mapping: semantic name -> { nodeId, field }",
12402
+ "optional": true
12403
+ },
12404
+ "outputDir": {
12405
+ "type": "string",
12406
+ "description": "If provided, output images are downloaded to this directory",
12407
+ "optional": true
12408
+ }
12409
+ }
12410
+ },
12411
+ "WorkflowResult": {
12412
+ "description": "",
12413
+ "properties": {
12414
+ "promptId": {
12415
+ "type": "string",
12416
+ "description": ""
12417
+ },
12418
+ "outputs": {
12419
+ "type": "Record<string, any>",
12420
+ "description": ""
12421
+ },
12422
+ "images": {
12423
+ "type": "Array<{ filename: string; subfolder: string; type: string; localPath?: string }>",
12424
+ "description": "",
12425
+ "optional": true
12426
+ }
12427
+ }
12428
+ }
12429
+ }
12430
+ });
12431
+
12135
12432
  setBuildTimeData('clients.voicebox', {
12136
12433
  "id": "clients.voicebox",
12137
12434
  "description": "VoiceBox client — local TTS synthesis via VoiceBox.sh REST API (Qwen3-TTS). Provides methods for managing voice profiles and generating speech audio locally. Uses the streaming endpoint for synchronous synthesis (returns WAV buffer).",
@@ -12516,202 +12813,6 @@ setBuildTimeData('clients.voicebox', {
12516
12813
  }
12517
12814
  });
12518
12815
 
12519
- setBuildTimeData('clients.supabase', {
12520
- "id": "clients.supabase",
12521
- "description": "Supabase client for the Luca container system. Wraps the official `@supabase/supabase-js` SDK and exposes it through Luca's typed state, events, and introspection system. The SDK is isomorphic so this single implementation works in both Node and browser containers. Use `client.sdk` for full SDK access, or use the convenience wrappers for common operations (auth, database queries, storage, edge functions, realtime).",
12522
- "shortcut": "clients.supabase",
12523
- "className": "SupabaseClient",
12524
- "methods": {
12525
- "from": {
12526
- "description": "Start a query on a Postgres table or view.",
12527
- "parameters": {
12528
- "table": {
12529
- "type": "string",
12530
- "description": "The table or view name to query"
12531
- }
12532
- },
12533
- "required": [
12534
- "table"
12535
- ],
12536
- "returns": "void"
12537
- },
12538
- "rpc": {
12539
- "description": "Call a Postgres function (RPC).",
12540
- "parameters": {
12541
- "fn": {
12542
- "type": "string",
12543
- "description": "The function name"
12544
- },
12545
- "params": {
12546
- "type": "Record<string, unknown>",
12547
- "description": "Arguments to pass to the function"
12548
- },
12549
- "options": {
12550
- "type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
12551
- "description": "Optional settings (head, get, count)"
12552
- }
12553
- },
12554
- "required": [
12555
- "fn"
12556
- ],
12557
- "returns": "void"
12558
- },
12559
- "signInWithPassword": {
12560
- "description": "Sign in with email and password.",
12561
- "parameters": {
12562
- "email": {
12563
- "type": "string",
12564
- "description": "Parameter email"
12565
- },
12566
- "password": {
12567
- "type": "string",
12568
- "description": "Parameter password"
12569
- }
12570
- },
12571
- "required": [
12572
- "email",
12573
- "password"
12574
- ],
12575
- "returns": "void"
12576
- },
12577
- "signUp": {
12578
- "description": "Create a new user account with email and password.",
12579
- "parameters": {
12580
- "email": {
12581
- "type": "string",
12582
- "description": "Parameter email"
12583
- },
12584
- "password": {
12585
- "type": "string",
12586
- "description": "Parameter password"
12587
- }
12588
- },
12589
- "required": [
12590
- "email",
12591
- "password"
12592
- ],
12593
- "returns": "void"
12594
- },
12595
- "signOut": {
12596
- "description": "Sign the current user out.",
12597
- "parameters": {},
12598
- "required": [],
12599
- "returns": "void"
12600
- },
12601
- "getSession": {
12602
- "description": "Get the current session, if any.",
12603
- "parameters": {},
12604
- "required": [],
12605
- "returns": "void"
12606
- },
12607
- "getUser": {
12608
- "description": "Get the current user, if any.",
12609
- "parameters": {},
12610
- "required": [],
12611
- "returns": "void"
12612
- },
12613
- "invoke": {
12614
- "description": "Invoke a Supabase Edge Function by name.",
12615
- "parameters": {
12616
- "name": {
12617
- "type": "string",
12618
- "description": "Parameter name"
12619
- },
12620
- "body": {
12621
- "type": "any",
12622
- "description": "Parameter body"
12623
- }
12624
- },
12625
- "required": [
12626
- "name"
12627
- ],
12628
- "returns": "void"
12629
- },
12630
- "subscribe": {
12631
- "description": "Subscribe to realtime changes on a Postgres table.",
12632
- "parameters": {
12633
- "channelName": {
12634
- "type": "string",
12635
- "description": "A name for this subscription channel"
12636
- },
12637
- "table": {
12638
- "type": "string",
12639
- "description": "The table to listen to"
12640
- },
12641
- "callback": {
12642
- "type": "(payload: any) => void",
12643
- "description": "Called with the payload on each change"
12644
- },
12645
- "event": {
12646
- "type": "\"INSERT\" | \"UPDATE\" | \"DELETE\" | \"*\"",
12647
- "description": "The event type to listen for (default: all changes)"
12648
- }
12649
- },
12650
- "required": [
12651
- "channelName",
12652
- "table",
12653
- "callback"
12654
- ],
12655
- "returns": "RealtimeChannel"
12656
- },
12657
- "unsubscribe": {
12658
- "description": "Unsubscribe and remove a realtime channel by name.",
12659
- "parameters": {
12660
- "channelName": {
12661
- "type": "string",
12662
- "description": "The channel name to remove"
12663
- }
12664
- },
12665
- "required": [
12666
- "channelName"
12667
- ],
12668
- "returns": "void"
12669
- },
12670
- "unsubscribeAll": {
12671
- "description": "Unsubscribe and remove all realtime channels.",
12672
- "parameters": {},
12673
- "required": [],
12674
- "returns": "void"
12675
- },
12676
- "connect": {
12677
- "description": "Connect is a no-op since the Supabase SDK initializes on construction. The client is ready to use immediately after creation.",
12678
- "parameters": {},
12679
- "required": [],
12680
- "returns": "void"
12681
- },
12682
- "disconnect": {
12683
- "description": "Disconnect by signing out and removing all realtime channels.",
12684
- "parameters": {},
12685
- "required": [],
12686
- "returns": "void"
12687
- }
12688
- },
12689
- "getters": {
12690
- "sdk": {
12691
- "description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
12692
- "returns": "SupabaseSDKClient<any, any>"
12693
- },
12694
- "storage": {
12695
- "description": "Returns the Supabase Storage client for managing buckets and files.",
12696
- "returns": "any"
12697
- },
12698
- "functions": {
12699
- "description": "Returns the Supabase Functions client.",
12700
- "returns": "any"
12701
- }
12702
- },
12703
- "events": {},
12704
- "state": {},
12705
- "options": {},
12706
- "envVars": [],
12707
- "examples": [
12708
- {
12709
- "language": "ts",
12710
- "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})"
12711
- }
12712
- ]
12713
- });
12714
-
12715
12816
  setBuildTimeData('clients.elevenlabs', {
12716
12817
  "id": "clients.elevenlabs",
12717
12818
  "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.",
@@ -12976,301 +13077,200 @@ setBuildTimeData('clients.elevenlabs', {
12976
13077
  }
12977
13078
  });
12978
13079
 
12979
- setBuildTimeData('clients.comfyui', {
12980
- "id": "clients.comfyui",
12981
- "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.",
12982
- "shortcut": "clients.comfyui",
12983
- "className": "ComfyUIClient",
13080
+ setBuildTimeData('clients.supabase', {
13081
+ "id": "clients.supabase",
13082
+ "description": "Supabase client for the Luca container system. Wraps the official `@supabase/supabase-js` SDK and exposes it through Luca's typed state, events, and introspection system. The SDK is isomorphic so this single implementation works in both Node and browser containers. Use `client.sdk` for full SDK access, or use the convenience wrappers for common operations (auth, database queries, storage, edge functions, realtime).",
13083
+ "shortcut": "clients.supabase",
13084
+ "className": "SupabaseClient",
12984
13085
  "methods": {
12985
- "queuePrompt": {
12986
- "description": "Queue a prompt (API-format workflow) for execution.",
13086
+ "from": {
13087
+ "description": "Start a query on a Postgres table or view.",
12987
13088
  "parameters": {
12988
- "prompt": {
12989
- "type": "Record<string, any>",
12990
- "description": "The API-format workflow object"
12991
- },
12992
- "clientId": {
13089
+ "table": {
12993
13090
  "type": "string",
12994
- "description": "Override the client ID for this request"
13091
+ "description": "The table or view name to query"
12995
13092
  }
12996
13093
  },
12997
13094
  "required": [
12998
- "prompt"
13095
+ "table"
12999
13096
  ],
13000
- "returns": "Promise<{ prompt_id: string; number: number }>",
13001
- "examples": [
13002
- {
13003
- "language": "ts",
13004
- "code": "const { prompt_id } = await comfy.queuePrompt(apiWorkflow)"
13005
- }
13006
- ]
13007
- },
13008
- "getQueue": {
13009
- "description": "Get the current prompt queue status.",
13010
- "parameters": {},
13011
- "required": [],
13012
- "returns": "Promise<{ queue_running: any[]; queue_pending: any[] }>"
13013
- },
13014
- "getHistory": {
13015
- "description": "Get execution history, optionally for a specific prompt.",
13016
- "parameters": {
13017
- "promptId": {
13018
- "type": "string",
13019
- "description": "If provided, returns history for this prompt only"
13020
- }
13021
- },
13022
- "required": [],
13023
- "returns": "Promise<Record<string, any>>"
13024
- },
13025
- "getSystemStats": {
13026
- "description": "Get system stats including GPU memory and queue info.",
13027
- "parameters": {},
13028
- "required": [],
13029
- "returns": "Promise<any>"
13097
+ "returns": "void"
13030
13098
  },
13031
- "getObjectInfo": {
13032
- "description": "Get node type info with input/output schemas.",
13099
+ "rpc": {
13100
+ "description": "Call a Postgres function (RPC).",
13033
13101
  "parameters": {
13034
- "nodeClass": {
13102
+ "fn": {
13035
13103
  "type": "string",
13036
- "description": "If provided, returns info for this node type only"
13104
+ "description": "The function name"
13105
+ },
13106
+ "params": {
13107
+ "type": "Record<string, unknown>",
13108
+ "description": "Arguments to pass to the function"
13109
+ },
13110
+ "options": {
13111
+ "type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
13112
+ "description": "Optional settings (head, get, count)"
13037
13113
  }
13038
13114
  },
13039
- "required": [],
13040
- "returns": "Promise<any>"
13041
- },
13042
- "interrupt": {
13043
- "description": "Interrupt the currently executing prompt.",
13044
- "parameters": {},
13045
- "required": [],
13046
- "returns": "Promise<void>"
13115
+ "required": [
13116
+ "fn"
13117
+ ],
13118
+ "returns": "void"
13047
13119
  },
13048
- "getModels": {
13049
- "description": "List available models, optionally filtered by type.",
13120
+ "signInWithPassword": {
13121
+ "description": "Sign in with email and password.",
13050
13122
  "parameters": {
13051
- "type": {
13123
+ "email": {
13052
13124
  "type": "string",
13053
- "description": "Model type filter (e.g., 'checkpoints', 'loras')"
13054
- }
13055
- },
13056
- "required": [],
13057
- "returns": "Promise<string[]>"
13058
- },
13059
- "getEmbeddings": {
13060
- "description": "List available embedding models.",
13061
- "parameters": {},
13062
- "required": [],
13063
- "returns": "Promise<string[]>"
13064
- },
13065
- "uploadImage": {
13066
- "description": "Upload an image to ComfyUI's input directory.",
13067
- "parameters": {
13068
- "file": {
13069
- "type": "Buffer | Blob",
13070
- "description": "The image data as Buffer or Blob"
13125
+ "description": "Parameter email"
13071
13126
  },
13072
- "filename": {
13127
+ "password": {
13073
13128
  "type": "string",
13074
- "description": "File name for the upload"
13075
- },
13076
- "opts": {
13077
- "type": "{ subfolder?: string; type?: string; overwrite?: boolean }",
13078
- "description": "Upload options (subfolder, type, overwrite)"
13129
+ "description": "Parameter password"
13079
13130
  }
13080
13131
  },
13081
13132
  "required": [
13082
- "file",
13083
- "filename"
13133
+ "email",
13134
+ "password"
13084
13135
  ],
13085
- "returns": "Promise<any>"
13136
+ "returns": "void"
13086
13137
  },
13087
- "viewImage": {
13088
- "description": "Download a generated image from ComfyUI as a Buffer.",
13138
+ "signUp": {
13139
+ "description": "Create a new user account with email and password.",
13089
13140
  "parameters": {
13090
- "filename": {
13141
+ "email": {
13091
13142
  "type": "string",
13092
- "description": "The image filename"
13093
- },
13094
- "subfolder": {
13095
- "type": "any",
13096
- "description": "Subfolder within the output directory"
13143
+ "description": "Parameter email"
13097
13144
  },
13098
- "type": {
13099
- "type": "any",
13100
- "description": "Image type ('output', 'input', 'temp')"
13145
+ "password": {
13146
+ "type": "string",
13147
+ "description": "Parameter password"
13101
13148
  }
13102
13149
  },
13103
13150
  "required": [
13104
- "filename"
13151
+ "email",
13152
+ "password"
13105
13153
  ],
13106
- "returns": "Promise<Buffer>"
13154
+ "returns": "void"
13107
13155
  },
13108
- "connectWs": {
13109
- "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`.",
13156
+ "signOut": {
13157
+ "description": "Sign the current user out.",
13110
13158
  "parameters": {},
13111
13159
  "required": [],
13112
- "returns": "Promise<void>"
13160
+ "returns": "void"
13113
13161
  },
13114
- "disconnectWs": {
13115
- "description": "Close the WebSocket connection.",
13162
+ "getSession": {
13163
+ "description": "Get the current session, if any.",
13116
13164
  "parameters": {},
13117
13165
  "required": [],
13118
13166
  "returns": "void"
13119
13167
  },
13120
- "toApiFormat": {
13121
- "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.",
13168
+ "getUser": {
13169
+ "description": "Get the current user, if any.",
13170
+ "parameters": {},
13171
+ "required": [],
13172
+ "returns": "void"
13173
+ },
13174
+ "invoke": {
13175
+ "description": "Invoke a Supabase Edge Function by name.",
13122
13176
  "parameters": {
13123
- "workflow": {
13124
- "type": "Record<string, any>",
13125
- "description": "Parameter workflow"
13177
+ "name": {
13178
+ "type": "string",
13179
+ "description": "Parameter name"
13180
+ },
13181
+ "body": {
13182
+ "type": "any",
13183
+ "description": "Parameter body"
13126
13184
  }
13127
13185
  },
13128
13186
  "required": [
13129
- "workflow"
13187
+ "name"
13130
13188
  ],
13131
- "returns": "Promise<Record<string, any>>"
13189
+ "returns": "void"
13132
13190
  },
13133
- "runWorkflow": {
13134
- "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' } } ```",
13191
+ "subscribe": {
13192
+ "description": "Subscribe to realtime changes on a Postgres table.",
13135
13193
  "parameters": {
13136
- "workflow": {
13137
- "type": "Record<string, any>",
13138
- "description": "Parameter workflow"
13194
+ "channelName": {
13195
+ "type": "string",
13196
+ "description": "A name for this subscription channel"
13139
13197
  },
13140
- "inputs": {
13141
- "type": "Record<string, any>",
13142
- "description": "Parameter inputs"
13198
+ "table": {
13199
+ "type": "string",
13200
+ "description": "The table to listen to"
13143
13201
  },
13144
- "options": {
13145
- "type": "WorkflowRunOptions",
13146
- "description": "Parameter options",
13147
- "properties": {
13148
- "poll": {
13149
- "type": "boolean",
13150
- "description": "Use polling instead of WebSocket for tracking execution"
13151
- },
13152
- "pollInterval": {
13153
- "type": "number",
13154
- "description": "Polling interval in ms (default 1000)"
13155
- },
13156
- "inputMap": {
13157
- "type": "InputMapping",
13158
- "description": "Named input mapping: semantic name -> { nodeId, field }"
13159
- },
13160
- "outputDir": {
13161
- "type": "string",
13162
- "description": "If provided, output images are downloaded to this directory"
13163
- }
13164
- }
13202
+ "callback": {
13203
+ "type": "(payload: any) => void",
13204
+ "description": "Called with the payload on each change"
13205
+ },
13206
+ "event": {
13207
+ "type": "\"INSERT\" | \"UPDATE\" | \"DELETE\" | \"*\"",
13208
+ "description": "The event type to listen for (default: all changes)"
13165
13209
  }
13166
13210
  },
13167
13211
  "required": [
13168
- "workflow"
13212
+ "channelName",
13213
+ "table",
13214
+ "callback"
13169
13215
  ],
13170
- "returns": "Promise<WorkflowResult>"
13171
- }
13172
- },
13173
- "getters": {
13174
- "clientId": {
13175
- "description": "The unique client ID used for WebSocket session tracking.",
13176
- "returns": "string"
13177
- },
13178
- "wsURL": {
13179
- "description": "The WebSocket URL derived from baseURL or overridden via options.",
13180
- "returns": "string"
13181
- }
13182
- },
13183
- "events": {
13184
- "execution_start": {
13185
- "name": "execution_start",
13186
- "description": "Event emitted by ComfyUIClient",
13187
- "arguments": {}
13216
+ "returns": "RealtimeChannel"
13188
13217
  },
13189
- "execution_complete": {
13190
- "name": "execution_complete",
13191
- "description": "Event emitted by ComfyUIClient",
13192
- "arguments": {}
13218
+ "unsubscribe": {
13219
+ "description": "Unsubscribe and remove a realtime channel by name.",
13220
+ "parameters": {
13221
+ "channelName": {
13222
+ "type": "string",
13223
+ "description": "The channel name to remove"
13224
+ }
13225
+ },
13226
+ "required": [
13227
+ "channelName"
13228
+ ],
13229
+ "returns": "void"
13193
13230
  },
13194
- "executing": {
13195
- "name": "executing",
13196
- "description": "Event emitted by ComfyUIClient",
13197
- "arguments": {}
13231
+ "unsubscribeAll": {
13232
+ "description": "Unsubscribe and remove all realtime channels.",
13233
+ "parameters": {},
13234
+ "required": [],
13235
+ "returns": "void"
13198
13236
  },
13199
- "progress": {
13200
- "name": "progress",
13201
- "description": "Event emitted by ComfyUIClient",
13202
- "arguments": {}
13237
+ "connect": {
13238
+ "description": "Connect is a no-op since the Supabase SDK initializes on construction. The client is ready to use immediately after creation.",
13239
+ "parameters": {},
13240
+ "required": [],
13241
+ "returns": "void"
13203
13242
  },
13204
- "executed": {
13205
- "name": "executed",
13206
- "description": "Event emitted by ComfyUIClient",
13207
- "arguments": {}
13243
+ "disconnect": {
13244
+ "description": "Disconnect by signing out and removing all realtime channels.",
13245
+ "parameters": {},
13246
+ "required": [],
13247
+ "returns": "void"
13248
+ }
13249
+ },
13250
+ "getters": {
13251
+ "sdk": {
13252
+ "description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
13253
+ "returns": "SupabaseSDKClient<any, any>"
13208
13254
  },
13209
- "execution_cached": {
13210
- "name": "execution_cached",
13211
- "description": "Event emitted by ComfyUIClient",
13212
- "arguments": {}
13255
+ "storage": {
13256
+ "description": "Returns the Supabase Storage client for managing buckets and files.",
13257
+ "returns": "any"
13213
13258
  },
13214
- "execution_error": {
13215
- "name": "execution_error",
13216
- "description": "Event emitted by ComfyUIClient",
13217
- "arguments": {}
13259
+ "functions": {
13260
+ "description": "Returns the Supabase Functions client.",
13261
+ "returns": "any"
13218
13262
  }
13219
13263
  },
13264
+ "events": {},
13220
13265
  "state": {},
13221
13266
  "options": {},
13222
13267
  "envVars": [],
13223
13268
  "examples": [
13224
13269
  {
13225
13270
  "language": "ts",
13226
- "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)"
13227
- }
13228
- ],
13229
- "types": {
13230
- "WorkflowRunOptions": {
13231
- "description": "",
13232
- "properties": {
13233
- "poll": {
13234
- "type": "boolean",
13235
- "description": "Use polling instead of WebSocket for tracking execution",
13236
- "optional": true
13237
- },
13238
- "pollInterval": {
13239
- "type": "number",
13240
- "description": "Polling interval in ms (default 1000)",
13241
- "optional": true
13242
- },
13243
- "inputMap": {
13244
- "type": "InputMapping",
13245
- "description": "Named input mapping: semantic name -> { nodeId, field }",
13246
- "optional": true
13247
- },
13248
- "outputDir": {
13249
- "type": "string",
13250
- "description": "If provided, output images are downloaded to this directory",
13251
- "optional": true
13252
- }
13253
- }
13254
- },
13255
- "WorkflowResult": {
13256
- "description": "",
13257
- "properties": {
13258
- "promptId": {
13259
- "type": "string",
13260
- "description": ""
13261
- },
13262
- "outputs": {
13263
- "type": "Record<string, any>",
13264
- "description": ""
13265
- },
13266
- "images": {
13267
- "type": "Array<{ filename: string; subfolder: string; type: string; localPath?: string }>",
13268
- "description": "",
13269
- "optional": true
13270
- }
13271
- }
13271
+ "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})"
13272
13272
  }
13273
- }
13273
+ ]
13274
13274
  });
13275
13275
 
13276
13276
  setBuildTimeData('servers.mcp', {
@@ -14104,22 +14104,45 @@ setBuildTimeData('features.conversation', {
14104
14104
  ]
14105
14105
  },
14106
14106
  "fork": {
14107
- "description": "Fork the conversation into a new independent instance. The fork inherits the same system prompt, tools, and full message history, but has its own identity and state — changes in either direction do not affect the other.",
14107
+ "description": "",
14108
14108
  "parameters": {
14109
14109
  "overrides": {
14110
- "type": "Partial<ConversationOptions>",
14111
- "description": "Optional option overrides for the forked conversation (e.g. different model or title)"
14110
+ "type": "ForkOptions | ForkOptions[]",
14111
+ "description": "Parameter overrides"
14112
14112
  }
14113
14113
  },
14114
14114
  "required": [],
14115
- "returns": "Conversation",
14115
+ "returns": "Conversation | Conversation[]"
14116
+ },
14117
+ "research": {
14118
+ "description": "Fan out N questions in parallel using forked conversations, return the results. Each fork is independent and ephemeral — no history is saved.",
14119
+ "parameters": {
14120
+ "questions": {
14121
+ "type": "(string | { question: string; forkOptions?: ForkOptions })[]",
14122
+ "description": "Array of questions (strings) or objects with question + per-fork overrides"
14123
+ },
14124
+ "defaults": {
14125
+ "type": "ForkOptions",
14126
+ "description": "Default fork options applied to all forks (individual overrides take precedence)"
14127
+ }
14128
+ },
14129
+ "required": [
14130
+ "questions"
14131
+ ],
14132
+ "returns": "Promise<string[]>",
14116
14133
  "examples": [
14117
14134
  {
14118
14135
  "language": "ts",
14119
- "code": "const fork = conversation.fork()\nawait fork.ask('What if we took a different approach?')\n// original conversation is unchanged"
14136
+ "code": "const results = await conversation.research([\n \"What are the pros of approach A?\",\n \"What are the pros of approach B?\",\n], { history: 'none', model: 'gpt-4o-mini' })\n\n// Per-fork overrides\nconst results = await conversation.research([\n \"Quick factual question\",\n { question: \"Needs recent context\", forkOptions: { history: 5 } },\n], { history: 'none' })"
14120
14137
  }
14121
14138
  ]
14122
14139
  },
14140
+ "abort": {
14141
+ "description": "Abort the current ask() call. Cancels the in-flight network request and any pending tool executions. The ask() promise will reject with a ConversationAbortError whose `partial` property contains any text accumulated before the abort.",
14142
+ "parameters": {},
14143
+ "required": [],
14144
+ "returns": "void"
14145
+ },
14123
14146
  "estimateTokens": {
14124
14147
  "description": "Estimate the input token count for the current messages array using the js-tiktoken tokenizer. Updates state.",
14125
14148
  "parameters": {},
@@ -14278,6 +14301,11 @@ setBuildTimeData('features.conversation', {
14278
14301
  "description": "Event emitted by Conversation",
14279
14302
  "arguments": {}
14280
14303
  },
14304
+ "aborted": {
14305
+ "name": "aborted",
14306
+ "description": "Event emitted by Conversation",
14307
+ "arguments": {}
14308
+ },
14281
14309
  "toolError": {
14282
14310
  "name": "toolError",
14283
14311
  "description": "Event emitted by Conversation",
@@ -15742,8 +15770,26 @@ setBuildTimeData('features.assistant', {
15742
15770
  ],
15743
15771
  "returns": "this"
15744
15772
  },
15773
+ "triggerHook": {
15774
+ "description": "Trigger a named hook and await its completion. The hook function receives `(assistant, ...args)` and its return value is passed back to the caller. This ensures hooks run to completion BEFORE any subsequent logic executes, unlike the old bus-based approach where async hooks were fire-and-forget. Hooks that don't exist are silently skipped (returns undefined).",
15775
+ "parameters": {
15776
+ "hookName": {
15777
+ "type": "string",
15778
+ "description": "The hook to trigger (matches an export name from hooks.ts)"
15779
+ },
15780
+ "args": {
15781
+ "type": "any[]",
15782
+ "description": "Arguments passed to the hook after the assistant instance"
15783
+ }
15784
+ },
15785
+ "required": [
15786
+ "hookName",
15787
+ "args"
15788
+ ],
15789
+ "returns": "Promise<any>"
15790
+ },
15745
15791
  "afterInitialize": {
15746
- "description": "Called immediately after the assistant is constructed. Synchronously loads the system prompt, tools, and hooks, then binds hooks as event listeners so every emitted event automatically invokes its corresponding hook.",
15792
+ "description": "Called immediately after the assistant is constructed. Synchronously loads the system prompt, tools, and hooks. Hooks are invoked via triggerHook() at each emit site, ensuring async hooks are properly awaited.",
15747
15793
  "parameters": {},
15748
15794
  "required": [],
15749
15795
  "returns": "void"
@@ -15974,6 +16020,68 @@ setBuildTimeData('features.assistant', {
15974
16020
  "required": [],
15975
16021
  "returns": "void"
15976
16022
  },
16023
+ "fork": {
16024
+ "description": "",
16025
+ "parameters": {
16026
+ "options": {
16027
+ "type": "AssistantForkOptions | AssistantForkOptions[]",
16028
+ "description": "Parameter options"
16029
+ }
16030
+ },
16031
+ "required": [],
16032
+ "returns": "Promise<Assistant | Assistant[]>"
16033
+ },
16034
+ "createResearchJob": {
16035
+ "description": "Create a non-blocking research job that fans out questions across forked assistants. The forks fire immediately and the returned entity tracks progress via observable state and events. Each fork preserves the full assistant identity (interceptors, tools, hooks).",
16036
+ "parameters": {
16037
+ "prompt": {
16038
+ "type": "string",
16039
+ "description": "Shared context/framing prompt prepended to each fork's system prompt"
16040
+ },
16041
+ "questions": {
16042
+ "type": "(string | { question: string; forkOptions?: AssistantForkOptions })[]",
16043
+ "description": "Array of questions (strings) or objects with question + per-fork overrides"
16044
+ },
16045
+ "defaults": {
16046
+ "type": "AssistantForkOptions",
16047
+ "description": "Default fork options applied to all forks"
16048
+ }
16049
+ },
16050
+ "required": [
16051
+ "prompt",
16052
+ "questions"
16053
+ ],
16054
+ "returns": "Promise<ResearchJob>",
16055
+ "examples": [
16056
+ {
16057
+ "language": "ts",
16058
+ "code": "// Fire and forget — check later\nconst job = await assistant.createResearchJob(\n \"Analyze this codebase for security issues\",\n [\"Look for SQL injection\", \"Look for XSS\", \"Look for auth bypass\"],\n { history: 'none', model: 'gpt-4o-mini' }\n)\n\n// Check progress\njob.state.get('completed') // 2 of 3\njob.state.get('results') // [answer1, answer2, null]\n\n// React to events\njob.on('forkCompleted', (index, result) => console.log(`Fork ${index} done`))\n\n// Or just wait\nawait job.waitFor('completed')"
16059
+ }
16060
+ ]
16061
+ },
16062
+ "research": {
16063
+ "description": "Fan out N questions in parallel using forked assistants, return the results. Sugar over createResearchJob — blocks until all forks complete.",
16064
+ "parameters": {
16065
+ "questions": {
16066
+ "type": "(string | { question: string; forkOptions?: AssistantForkOptions })[]",
16067
+ "description": "Array of questions (strings) or objects with question + per-fork overrides"
16068
+ },
16069
+ "defaults": {
16070
+ "type": "AssistantForkOptions & { prompt?: string }",
16071
+ "description": "Default fork options applied to all forks"
16072
+ }
16073
+ },
16074
+ "required": [
16075
+ "questions"
16076
+ ],
16077
+ "returns": "Promise<(string | null)[]>",
16078
+ "examples": [
16079
+ {
16080
+ "language": "ts",
16081
+ "code": "const results = await assistant.research([\n \"What are best practices for X?\",\n \"What are common pitfalls of X?\",\n], { history: 'none', model: 'gpt-4o-mini' })"
16082
+ }
16083
+ ]
16084
+ },
15977
16085
  "subagent": {
15978
16086
  "description": "Get or create a subagent assistant. Uses the assistantsManager to discover and create the assistant, then caches the instance for reuse across tool calls.",
15979
16087
  "parameters": {
@@ -16051,6 +16159,14 @@ setBuildTimeData('features.assistant', {
16051
16159
  "description": "Whether the assistant has been started and is ready to receive questions.",
16052
16160
  "returns": "boolean"
16053
16161
  },
16162
+ "isFork": {
16163
+ "description": "Whether this assistant was created via fork().",
16164
+ "returns": "boolean"
16165
+ },
16166
+ "forkDepth": {
16167
+ "description": "How many levels deep this fork is. 0 = original, 1 = direct fork, 2 = fork of a fork, etc.",
16168
+ "returns": "number"
16169
+ },
16054
16170
  "systemPrompt": {
16055
16171
  "description": "The current system prompt text.",
16056
16172
  "returns": "string"
@@ -16105,6 +16221,11 @@ setBuildTimeData('features.assistant', {
16105
16221
  }
16106
16222
  },
16107
16223
  "events": {
16224
+ "hookFired": {
16225
+ "name": "hookFired",
16226
+ "description": "Event emitted by Assistant",
16227
+ "arguments": {}
16228
+ },
16108
16229
  "created": {
16109
16230
  "name": "created",
16110
16231
  "description": "Event emitted by Assistant",
@@ -16120,11 +16241,6 @@ setBuildTimeData('features.assistant', {
16120
16241
  "description": "Event emitted by Assistant",
16121
16242
  "arguments": {}
16122
16243
  },
16123
- "hookFired": {
16124
- "name": "hookFired",
16125
- "description": "Event emitted by Assistant",
16126
- "arguments": {}
16127
- },
16128
16244
  "reloaded": {
16129
16245
  "name": "reloaded",
16130
16246
  "description": "Event emitted by Assistant",
@@ -31989,6 +32105,302 @@ export const introspectionData = [
31989
32105
  }
31990
32106
  ]
31991
32107
  },
32108
+ {
32109
+ "id": "clients.comfyui",
32110
+ "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.",
32111
+ "shortcut": "clients.comfyui",
32112
+ "className": "ComfyUIClient",
32113
+ "methods": {
32114
+ "queuePrompt": {
32115
+ "description": "Queue a prompt (API-format workflow) for execution.",
32116
+ "parameters": {
32117
+ "prompt": {
32118
+ "type": "Record<string, any>",
32119
+ "description": "The API-format workflow object"
32120
+ },
32121
+ "clientId": {
32122
+ "type": "string",
32123
+ "description": "Override the client ID for this request"
32124
+ }
32125
+ },
32126
+ "required": [
32127
+ "prompt"
32128
+ ],
32129
+ "returns": "Promise<{ prompt_id: string; number: number }>",
32130
+ "examples": [
32131
+ {
32132
+ "language": "ts",
32133
+ "code": "const { prompt_id } = await comfy.queuePrompt(apiWorkflow)"
32134
+ }
32135
+ ]
32136
+ },
32137
+ "getQueue": {
32138
+ "description": "Get the current prompt queue status.",
32139
+ "parameters": {},
32140
+ "required": [],
32141
+ "returns": "Promise<{ queue_running: any[]; queue_pending: any[] }>"
32142
+ },
32143
+ "getHistory": {
32144
+ "description": "Get execution history, optionally for a specific prompt.",
32145
+ "parameters": {
32146
+ "promptId": {
32147
+ "type": "string",
32148
+ "description": "If provided, returns history for this prompt only"
32149
+ }
32150
+ },
32151
+ "required": [],
32152
+ "returns": "Promise<Record<string, any>>"
32153
+ },
32154
+ "getSystemStats": {
32155
+ "description": "Get system stats including GPU memory and queue info.",
32156
+ "parameters": {},
32157
+ "required": [],
32158
+ "returns": "Promise<any>"
32159
+ },
32160
+ "getObjectInfo": {
32161
+ "description": "Get node type info with input/output schemas.",
32162
+ "parameters": {
32163
+ "nodeClass": {
32164
+ "type": "string",
32165
+ "description": "If provided, returns info for this node type only"
32166
+ }
32167
+ },
32168
+ "required": [],
32169
+ "returns": "Promise<any>"
32170
+ },
32171
+ "interrupt": {
32172
+ "description": "Interrupt the currently executing prompt.",
32173
+ "parameters": {},
32174
+ "required": [],
32175
+ "returns": "Promise<void>"
32176
+ },
32177
+ "getModels": {
32178
+ "description": "List available models, optionally filtered by type.",
32179
+ "parameters": {
32180
+ "type": {
32181
+ "type": "string",
32182
+ "description": "Model type filter (e.g., 'checkpoints', 'loras')"
32183
+ }
32184
+ },
32185
+ "required": [],
32186
+ "returns": "Promise<string[]>"
32187
+ },
32188
+ "getEmbeddings": {
32189
+ "description": "List available embedding models.",
32190
+ "parameters": {},
32191
+ "required": [],
32192
+ "returns": "Promise<string[]>"
32193
+ },
32194
+ "uploadImage": {
32195
+ "description": "Upload an image to ComfyUI's input directory.",
32196
+ "parameters": {
32197
+ "file": {
32198
+ "type": "Buffer | Blob",
32199
+ "description": "The image data as Buffer or Blob"
32200
+ },
32201
+ "filename": {
32202
+ "type": "string",
32203
+ "description": "File name for the upload"
32204
+ },
32205
+ "opts": {
32206
+ "type": "{ subfolder?: string; type?: string; overwrite?: boolean }",
32207
+ "description": "Upload options (subfolder, type, overwrite)"
32208
+ }
32209
+ },
32210
+ "required": [
32211
+ "file",
32212
+ "filename"
32213
+ ],
32214
+ "returns": "Promise<any>"
32215
+ },
32216
+ "viewImage": {
32217
+ "description": "Download a generated image from ComfyUI as a Buffer.",
32218
+ "parameters": {
32219
+ "filename": {
32220
+ "type": "string",
32221
+ "description": "The image filename"
32222
+ },
32223
+ "subfolder": {
32224
+ "type": "any",
32225
+ "description": "Subfolder within the output directory"
32226
+ },
32227
+ "type": {
32228
+ "type": "any",
32229
+ "description": "Image type ('output', 'input', 'temp')"
32230
+ }
32231
+ },
32232
+ "required": [
32233
+ "filename"
32234
+ ],
32235
+ "returns": "Promise<Buffer>"
32236
+ },
32237
+ "connectWs": {
32238
+ "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`.",
32239
+ "parameters": {},
32240
+ "required": [],
32241
+ "returns": "Promise<void>"
32242
+ },
32243
+ "disconnectWs": {
32244
+ "description": "Close the WebSocket connection.",
32245
+ "parameters": {},
32246
+ "required": [],
32247
+ "returns": "void"
32248
+ },
32249
+ "toApiFormat": {
32250
+ "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.",
32251
+ "parameters": {
32252
+ "workflow": {
32253
+ "type": "Record<string, any>",
32254
+ "description": "Parameter workflow"
32255
+ }
32256
+ },
32257
+ "required": [
32258
+ "workflow"
32259
+ ],
32260
+ "returns": "Promise<Record<string, any>>"
32261
+ },
32262
+ "runWorkflow": {
32263
+ "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' } } ```",
32264
+ "parameters": {
32265
+ "workflow": {
32266
+ "type": "Record<string, any>",
32267
+ "description": "Parameter workflow"
32268
+ },
32269
+ "inputs": {
32270
+ "type": "Record<string, any>",
32271
+ "description": "Parameter inputs"
32272
+ },
32273
+ "options": {
32274
+ "type": "WorkflowRunOptions",
32275
+ "description": "Parameter options",
32276
+ "properties": {
32277
+ "poll": {
32278
+ "type": "boolean",
32279
+ "description": "Use polling instead of WebSocket for tracking execution"
32280
+ },
32281
+ "pollInterval": {
32282
+ "type": "number",
32283
+ "description": "Polling interval in ms (default 1000)"
32284
+ },
32285
+ "inputMap": {
32286
+ "type": "InputMapping",
32287
+ "description": "Named input mapping: semantic name -> { nodeId, field }"
32288
+ },
32289
+ "outputDir": {
32290
+ "type": "string",
32291
+ "description": "If provided, output images are downloaded to this directory"
32292
+ }
32293
+ }
32294
+ }
32295
+ },
32296
+ "required": [
32297
+ "workflow"
32298
+ ],
32299
+ "returns": "Promise<WorkflowResult>"
32300
+ }
32301
+ },
32302
+ "getters": {
32303
+ "clientId": {
32304
+ "description": "The unique client ID used for WebSocket session tracking.",
32305
+ "returns": "string"
32306
+ },
32307
+ "wsURL": {
32308
+ "description": "The WebSocket URL derived from baseURL or overridden via options.",
32309
+ "returns": "string"
32310
+ }
32311
+ },
32312
+ "events": {
32313
+ "execution_start": {
32314
+ "name": "execution_start",
32315
+ "description": "Event emitted by ComfyUIClient",
32316
+ "arguments": {}
32317
+ },
32318
+ "execution_complete": {
32319
+ "name": "execution_complete",
32320
+ "description": "Event emitted by ComfyUIClient",
32321
+ "arguments": {}
32322
+ },
32323
+ "executing": {
32324
+ "name": "executing",
32325
+ "description": "Event emitted by ComfyUIClient",
32326
+ "arguments": {}
32327
+ },
32328
+ "progress": {
32329
+ "name": "progress",
32330
+ "description": "Event emitted by ComfyUIClient",
32331
+ "arguments": {}
32332
+ },
32333
+ "executed": {
32334
+ "name": "executed",
32335
+ "description": "Event emitted by ComfyUIClient",
32336
+ "arguments": {}
32337
+ },
32338
+ "execution_cached": {
32339
+ "name": "execution_cached",
32340
+ "description": "Event emitted by ComfyUIClient",
32341
+ "arguments": {}
32342
+ },
32343
+ "execution_error": {
32344
+ "name": "execution_error",
32345
+ "description": "Event emitted by ComfyUIClient",
32346
+ "arguments": {}
32347
+ }
32348
+ },
32349
+ "state": {},
32350
+ "options": {},
32351
+ "envVars": [],
32352
+ "examples": [
32353
+ {
32354
+ "language": "ts",
32355
+ "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)"
32356
+ }
32357
+ ],
32358
+ "types": {
32359
+ "WorkflowRunOptions": {
32360
+ "description": "",
32361
+ "properties": {
32362
+ "poll": {
32363
+ "type": "boolean",
32364
+ "description": "Use polling instead of WebSocket for tracking execution",
32365
+ "optional": true
32366
+ },
32367
+ "pollInterval": {
32368
+ "type": "number",
32369
+ "description": "Polling interval in ms (default 1000)",
32370
+ "optional": true
32371
+ },
32372
+ "inputMap": {
32373
+ "type": "InputMapping",
32374
+ "description": "Named input mapping: semantic name -> { nodeId, field }",
32375
+ "optional": true
32376
+ },
32377
+ "outputDir": {
32378
+ "type": "string",
32379
+ "description": "If provided, output images are downloaded to this directory",
32380
+ "optional": true
32381
+ }
32382
+ }
32383
+ },
32384
+ "WorkflowResult": {
32385
+ "description": "",
32386
+ "properties": {
32387
+ "promptId": {
32388
+ "type": "string",
32389
+ "description": ""
32390
+ },
32391
+ "outputs": {
32392
+ "type": "Record<string, any>",
32393
+ "description": ""
32394
+ },
32395
+ "images": {
32396
+ "type": "Array<{ filename: string; subfolder: string; type: string; localPath?: string }>",
32397
+ "description": "",
32398
+ "optional": true
32399
+ }
32400
+ }
32401
+ }
32402
+ }
32403
+ },
31992
32404
  {
31993
32405
  "id": "clients.voicebox",
31994
32406
  "description": "VoiceBox client — local TTS synthesis via VoiceBox.sh REST API (Qwen3-TTS). Provides methods for managing voice profiles and generating speech audio locally. Uses the streaming endpoint for synchronous synthesis (returns WAV buffer).",
@@ -32372,201 +32784,6 @@ export const introspectionData = [
32372
32784
  }
32373
32785
  }
32374
32786
  },
32375
- {
32376
- "id": "clients.supabase",
32377
- "description": "Supabase client for the Luca container system. Wraps the official `@supabase/supabase-js` SDK and exposes it through Luca's typed state, events, and introspection system. The SDK is isomorphic so this single implementation works in both Node and browser containers. Use `client.sdk` for full SDK access, or use the convenience wrappers for common operations (auth, database queries, storage, edge functions, realtime).",
32378
- "shortcut": "clients.supabase",
32379
- "className": "SupabaseClient",
32380
- "methods": {
32381
- "from": {
32382
- "description": "Start a query on a Postgres table or view.",
32383
- "parameters": {
32384
- "table": {
32385
- "type": "string",
32386
- "description": "The table or view name to query"
32387
- }
32388
- },
32389
- "required": [
32390
- "table"
32391
- ],
32392
- "returns": "void"
32393
- },
32394
- "rpc": {
32395
- "description": "Call a Postgres function (RPC).",
32396
- "parameters": {
32397
- "fn": {
32398
- "type": "string",
32399
- "description": "The function name"
32400
- },
32401
- "params": {
32402
- "type": "Record<string, unknown>",
32403
- "description": "Arguments to pass to the function"
32404
- },
32405
- "options": {
32406
- "type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
32407
- "description": "Optional settings (head, get, count)"
32408
- }
32409
- },
32410
- "required": [
32411
- "fn"
32412
- ],
32413
- "returns": "void"
32414
- },
32415
- "signInWithPassword": {
32416
- "description": "Sign in with email and password.",
32417
- "parameters": {
32418
- "email": {
32419
- "type": "string",
32420
- "description": "Parameter email"
32421
- },
32422
- "password": {
32423
- "type": "string",
32424
- "description": "Parameter password"
32425
- }
32426
- },
32427
- "required": [
32428
- "email",
32429
- "password"
32430
- ],
32431
- "returns": "void"
32432
- },
32433
- "signUp": {
32434
- "description": "Create a new user account with email and password.",
32435
- "parameters": {
32436
- "email": {
32437
- "type": "string",
32438
- "description": "Parameter email"
32439
- },
32440
- "password": {
32441
- "type": "string",
32442
- "description": "Parameter password"
32443
- }
32444
- },
32445
- "required": [
32446
- "email",
32447
- "password"
32448
- ],
32449
- "returns": "void"
32450
- },
32451
- "signOut": {
32452
- "description": "Sign the current user out.",
32453
- "parameters": {},
32454
- "required": [],
32455
- "returns": "void"
32456
- },
32457
- "getSession": {
32458
- "description": "Get the current session, if any.",
32459
- "parameters": {},
32460
- "required": [],
32461
- "returns": "void"
32462
- },
32463
- "getUser": {
32464
- "description": "Get the current user, if any.",
32465
- "parameters": {},
32466
- "required": [],
32467
- "returns": "void"
32468
- },
32469
- "invoke": {
32470
- "description": "Invoke a Supabase Edge Function by name.",
32471
- "parameters": {
32472
- "name": {
32473
- "type": "string",
32474
- "description": "Parameter name"
32475
- },
32476
- "body": {
32477
- "type": "any",
32478
- "description": "Parameter body"
32479
- }
32480
- },
32481
- "required": [
32482
- "name"
32483
- ],
32484
- "returns": "void"
32485
- },
32486
- "subscribe": {
32487
- "description": "Subscribe to realtime changes on a Postgres table.",
32488
- "parameters": {
32489
- "channelName": {
32490
- "type": "string",
32491
- "description": "A name for this subscription channel"
32492
- },
32493
- "table": {
32494
- "type": "string",
32495
- "description": "The table to listen to"
32496
- },
32497
- "callback": {
32498
- "type": "(payload: any) => void",
32499
- "description": "Called with the payload on each change"
32500
- },
32501
- "event": {
32502
- "type": "\"INSERT\" | \"UPDATE\" | \"DELETE\" | \"*\"",
32503
- "description": "The event type to listen for (default: all changes)"
32504
- }
32505
- },
32506
- "required": [
32507
- "channelName",
32508
- "table",
32509
- "callback"
32510
- ],
32511
- "returns": "RealtimeChannel"
32512
- },
32513
- "unsubscribe": {
32514
- "description": "Unsubscribe and remove a realtime channel by name.",
32515
- "parameters": {
32516
- "channelName": {
32517
- "type": "string",
32518
- "description": "The channel name to remove"
32519
- }
32520
- },
32521
- "required": [
32522
- "channelName"
32523
- ],
32524
- "returns": "void"
32525
- },
32526
- "unsubscribeAll": {
32527
- "description": "Unsubscribe and remove all realtime channels.",
32528
- "parameters": {},
32529
- "required": [],
32530
- "returns": "void"
32531
- },
32532
- "connect": {
32533
- "description": "Connect is a no-op since the Supabase SDK initializes on construction. The client is ready to use immediately after creation.",
32534
- "parameters": {},
32535
- "required": [],
32536
- "returns": "void"
32537
- },
32538
- "disconnect": {
32539
- "description": "Disconnect by signing out and removing all realtime channels.",
32540
- "parameters": {},
32541
- "required": [],
32542
- "returns": "void"
32543
- }
32544
- },
32545
- "getters": {
32546
- "sdk": {
32547
- "description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
32548
- "returns": "SupabaseSDKClient<any, any>"
32549
- },
32550
- "storage": {
32551
- "description": "Returns the Supabase Storage client for managing buckets and files.",
32552
- "returns": "any"
32553
- },
32554
- "functions": {
32555
- "description": "Returns the Supabase Functions client.",
32556
- "returns": "any"
32557
- }
32558
- },
32559
- "events": {},
32560
- "state": {},
32561
- "options": {},
32562
- "envVars": [],
32563
- "examples": [
32564
- {
32565
- "language": "ts",
32566
- "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})"
32567
- }
32568
- ]
32569
- },
32570
32787
  {
32571
32788
  "id": "clients.elevenlabs",
32572
32789
  "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.",
@@ -32831,300 +33048,199 @@ export const introspectionData = [
32831
33048
  }
32832
33049
  },
32833
33050
  {
32834
- "id": "clients.comfyui",
32835
- "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.",
32836
- "shortcut": "clients.comfyui",
32837
- "className": "ComfyUIClient",
33051
+ "id": "clients.supabase",
33052
+ "description": "Supabase client for the Luca container system. Wraps the official `@supabase/supabase-js` SDK and exposes it through Luca's typed state, events, and introspection system. The SDK is isomorphic so this single implementation works in both Node and browser containers. Use `client.sdk` for full SDK access, or use the convenience wrappers for common operations (auth, database queries, storage, edge functions, realtime).",
33053
+ "shortcut": "clients.supabase",
33054
+ "className": "SupabaseClient",
32838
33055
  "methods": {
32839
- "queuePrompt": {
32840
- "description": "Queue a prompt (API-format workflow) for execution.",
33056
+ "from": {
33057
+ "description": "Start a query on a Postgres table or view.",
32841
33058
  "parameters": {
32842
- "prompt": {
32843
- "type": "Record<string, any>",
32844
- "description": "The API-format workflow object"
32845
- },
32846
- "clientId": {
33059
+ "table": {
32847
33060
  "type": "string",
32848
- "description": "Override the client ID for this request"
33061
+ "description": "The table or view name to query"
32849
33062
  }
32850
33063
  },
32851
33064
  "required": [
32852
- "prompt"
33065
+ "table"
32853
33066
  ],
32854
- "returns": "Promise<{ prompt_id: string; number: number }>",
32855
- "examples": [
32856
- {
32857
- "language": "ts",
32858
- "code": "const { prompt_id } = await comfy.queuePrompt(apiWorkflow)"
32859
- }
32860
- ]
32861
- },
32862
- "getQueue": {
32863
- "description": "Get the current prompt queue status.",
32864
- "parameters": {},
32865
- "required": [],
32866
- "returns": "Promise<{ queue_running: any[]; queue_pending: any[] }>"
32867
- },
32868
- "getHistory": {
32869
- "description": "Get execution history, optionally for a specific prompt.",
32870
- "parameters": {
32871
- "promptId": {
32872
- "type": "string",
32873
- "description": "If provided, returns history for this prompt only"
32874
- }
32875
- },
32876
- "required": [],
32877
- "returns": "Promise<Record<string, any>>"
32878
- },
32879
- "getSystemStats": {
32880
- "description": "Get system stats including GPU memory and queue info.",
32881
- "parameters": {},
32882
- "required": [],
32883
- "returns": "Promise<any>"
33067
+ "returns": "void"
32884
33068
  },
32885
- "getObjectInfo": {
32886
- "description": "Get node type info with input/output schemas.",
33069
+ "rpc": {
33070
+ "description": "Call a Postgres function (RPC).",
32887
33071
  "parameters": {
32888
- "nodeClass": {
33072
+ "fn": {
32889
33073
  "type": "string",
32890
- "description": "If provided, returns info for this node type only"
33074
+ "description": "The function name"
33075
+ },
33076
+ "params": {
33077
+ "type": "Record<string, unknown>",
33078
+ "description": "Arguments to pass to the function"
33079
+ },
33080
+ "options": {
33081
+ "type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
33082
+ "description": "Optional settings (head, get, count)"
32891
33083
  }
32892
33084
  },
32893
- "required": [],
32894
- "returns": "Promise<any>"
32895
- },
32896
- "interrupt": {
32897
- "description": "Interrupt the currently executing prompt.",
32898
- "parameters": {},
32899
- "required": [],
32900
- "returns": "Promise<void>"
33085
+ "required": [
33086
+ "fn"
33087
+ ],
33088
+ "returns": "void"
32901
33089
  },
32902
- "getModels": {
32903
- "description": "List available models, optionally filtered by type.",
33090
+ "signInWithPassword": {
33091
+ "description": "Sign in with email and password.",
32904
33092
  "parameters": {
32905
- "type": {
33093
+ "email": {
32906
33094
  "type": "string",
32907
- "description": "Model type filter (e.g., 'checkpoints', 'loras')"
32908
- }
32909
- },
32910
- "required": [],
32911
- "returns": "Promise<string[]>"
32912
- },
32913
- "getEmbeddings": {
32914
- "description": "List available embedding models.",
32915
- "parameters": {},
32916
- "required": [],
32917
- "returns": "Promise<string[]>"
32918
- },
32919
- "uploadImage": {
32920
- "description": "Upload an image to ComfyUI's input directory.",
32921
- "parameters": {
32922
- "file": {
32923
- "type": "Buffer | Blob",
32924
- "description": "The image data as Buffer or Blob"
33095
+ "description": "Parameter email"
32925
33096
  },
32926
- "filename": {
33097
+ "password": {
32927
33098
  "type": "string",
32928
- "description": "File name for the upload"
32929
- },
32930
- "opts": {
32931
- "type": "{ subfolder?: string; type?: string; overwrite?: boolean }",
32932
- "description": "Upload options (subfolder, type, overwrite)"
33099
+ "description": "Parameter password"
32933
33100
  }
32934
33101
  },
32935
33102
  "required": [
32936
- "file",
32937
- "filename"
33103
+ "email",
33104
+ "password"
32938
33105
  ],
32939
- "returns": "Promise<any>"
33106
+ "returns": "void"
32940
33107
  },
32941
- "viewImage": {
32942
- "description": "Download a generated image from ComfyUI as a Buffer.",
33108
+ "signUp": {
33109
+ "description": "Create a new user account with email and password.",
32943
33110
  "parameters": {
32944
- "filename": {
33111
+ "email": {
32945
33112
  "type": "string",
32946
- "description": "The image filename"
32947
- },
32948
- "subfolder": {
32949
- "type": "any",
32950
- "description": "Subfolder within the output directory"
33113
+ "description": "Parameter email"
32951
33114
  },
32952
- "type": {
32953
- "type": "any",
32954
- "description": "Image type ('output', 'input', 'temp')"
33115
+ "password": {
33116
+ "type": "string",
33117
+ "description": "Parameter password"
32955
33118
  }
32956
33119
  },
32957
33120
  "required": [
32958
- "filename"
33121
+ "email",
33122
+ "password"
32959
33123
  ],
32960
- "returns": "Promise<Buffer>"
33124
+ "returns": "void"
32961
33125
  },
32962
- "connectWs": {
32963
- "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`.",
33126
+ "signOut": {
33127
+ "description": "Sign the current user out.",
32964
33128
  "parameters": {},
32965
33129
  "required": [],
32966
- "returns": "Promise<void>"
33130
+ "returns": "void"
32967
33131
  },
32968
- "disconnectWs": {
32969
- "description": "Close the WebSocket connection.",
33132
+ "getSession": {
33133
+ "description": "Get the current session, if any.",
32970
33134
  "parameters": {},
32971
33135
  "required": [],
32972
33136
  "returns": "void"
32973
33137
  },
32974
- "toApiFormat": {
32975
- "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.",
33138
+ "getUser": {
33139
+ "description": "Get the current user, if any.",
33140
+ "parameters": {},
33141
+ "required": [],
33142
+ "returns": "void"
33143
+ },
33144
+ "invoke": {
33145
+ "description": "Invoke a Supabase Edge Function by name.",
32976
33146
  "parameters": {
32977
- "workflow": {
32978
- "type": "Record<string, any>",
32979
- "description": "Parameter workflow"
33147
+ "name": {
33148
+ "type": "string",
33149
+ "description": "Parameter name"
33150
+ },
33151
+ "body": {
33152
+ "type": "any",
33153
+ "description": "Parameter body"
32980
33154
  }
32981
33155
  },
32982
33156
  "required": [
32983
- "workflow"
33157
+ "name"
32984
33158
  ],
32985
- "returns": "Promise<Record<string, any>>"
33159
+ "returns": "void"
32986
33160
  },
32987
- "runWorkflow": {
32988
- "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' } } ```",
33161
+ "subscribe": {
33162
+ "description": "Subscribe to realtime changes on a Postgres table.",
32989
33163
  "parameters": {
32990
- "workflow": {
32991
- "type": "Record<string, any>",
32992
- "description": "Parameter workflow"
33164
+ "channelName": {
33165
+ "type": "string",
33166
+ "description": "A name for this subscription channel"
32993
33167
  },
32994
- "inputs": {
32995
- "type": "Record<string, any>",
32996
- "description": "Parameter inputs"
33168
+ "table": {
33169
+ "type": "string",
33170
+ "description": "The table to listen to"
32997
33171
  },
32998
- "options": {
32999
- "type": "WorkflowRunOptions",
33000
- "description": "Parameter options",
33001
- "properties": {
33002
- "poll": {
33003
- "type": "boolean",
33004
- "description": "Use polling instead of WebSocket for tracking execution"
33005
- },
33006
- "pollInterval": {
33007
- "type": "number",
33008
- "description": "Polling interval in ms (default 1000)"
33009
- },
33010
- "inputMap": {
33011
- "type": "InputMapping",
33012
- "description": "Named input mapping: semantic name -> { nodeId, field }"
33013
- },
33014
- "outputDir": {
33015
- "type": "string",
33016
- "description": "If provided, output images are downloaded to this directory"
33017
- }
33018
- }
33172
+ "callback": {
33173
+ "type": "(payload: any) => void",
33174
+ "description": "Called with the payload on each change"
33175
+ },
33176
+ "event": {
33177
+ "type": "\"INSERT\" | \"UPDATE\" | \"DELETE\" | \"*\"",
33178
+ "description": "The event type to listen for (default: all changes)"
33019
33179
  }
33020
33180
  },
33021
33181
  "required": [
33022
- "workflow"
33182
+ "channelName",
33183
+ "table",
33184
+ "callback"
33023
33185
  ],
33024
- "returns": "Promise<WorkflowResult>"
33025
- }
33026
- },
33027
- "getters": {
33028
- "clientId": {
33029
- "description": "The unique client ID used for WebSocket session tracking.",
33030
- "returns": "string"
33031
- },
33032
- "wsURL": {
33033
- "description": "The WebSocket URL derived from baseURL or overridden via options.",
33034
- "returns": "string"
33035
- }
33036
- },
33037
- "events": {
33038
- "execution_start": {
33039
- "name": "execution_start",
33040
- "description": "Event emitted by ComfyUIClient",
33041
- "arguments": {}
33186
+ "returns": "RealtimeChannel"
33042
33187
  },
33043
- "execution_complete": {
33044
- "name": "execution_complete",
33045
- "description": "Event emitted by ComfyUIClient",
33046
- "arguments": {}
33188
+ "unsubscribe": {
33189
+ "description": "Unsubscribe and remove a realtime channel by name.",
33190
+ "parameters": {
33191
+ "channelName": {
33192
+ "type": "string",
33193
+ "description": "The channel name to remove"
33194
+ }
33195
+ },
33196
+ "required": [
33197
+ "channelName"
33198
+ ],
33199
+ "returns": "void"
33047
33200
  },
33048
- "executing": {
33049
- "name": "executing",
33050
- "description": "Event emitted by ComfyUIClient",
33051
- "arguments": {}
33201
+ "unsubscribeAll": {
33202
+ "description": "Unsubscribe and remove all realtime channels.",
33203
+ "parameters": {},
33204
+ "required": [],
33205
+ "returns": "void"
33052
33206
  },
33053
- "progress": {
33054
- "name": "progress",
33055
- "description": "Event emitted by ComfyUIClient",
33056
- "arguments": {}
33207
+ "connect": {
33208
+ "description": "Connect is a no-op since the Supabase SDK initializes on construction. The client is ready to use immediately after creation.",
33209
+ "parameters": {},
33210
+ "required": [],
33211
+ "returns": "void"
33057
33212
  },
33058
- "executed": {
33059
- "name": "executed",
33060
- "description": "Event emitted by ComfyUIClient",
33061
- "arguments": {}
33213
+ "disconnect": {
33214
+ "description": "Disconnect by signing out and removing all realtime channels.",
33215
+ "parameters": {},
33216
+ "required": [],
33217
+ "returns": "void"
33218
+ }
33219
+ },
33220
+ "getters": {
33221
+ "sdk": {
33222
+ "description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
33223
+ "returns": "SupabaseSDKClient<any, any>"
33062
33224
  },
33063
- "execution_cached": {
33064
- "name": "execution_cached",
33065
- "description": "Event emitted by ComfyUIClient",
33066
- "arguments": {}
33225
+ "storage": {
33226
+ "description": "Returns the Supabase Storage client for managing buckets and files.",
33227
+ "returns": "any"
33067
33228
  },
33068
- "execution_error": {
33069
- "name": "execution_error",
33070
- "description": "Event emitted by ComfyUIClient",
33071
- "arguments": {}
33229
+ "functions": {
33230
+ "description": "Returns the Supabase Functions client.",
33231
+ "returns": "any"
33072
33232
  }
33073
33233
  },
33234
+ "events": {},
33074
33235
  "state": {},
33075
33236
  "options": {},
33076
33237
  "envVars": [],
33077
33238
  "examples": [
33078
33239
  {
33079
33240
  "language": "ts",
33080
- "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)"
33081
- }
33082
- ],
33083
- "types": {
33084
- "WorkflowRunOptions": {
33085
- "description": "",
33086
- "properties": {
33087
- "poll": {
33088
- "type": "boolean",
33089
- "description": "Use polling instead of WebSocket for tracking execution",
33090
- "optional": true
33091
- },
33092
- "pollInterval": {
33093
- "type": "number",
33094
- "description": "Polling interval in ms (default 1000)",
33095
- "optional": true
33096
- },
33097
- "inputMap": {
33098
- "type": "InputMapping",
33099
- "description": "Named input mapping: semantic name -> { nodeId, field }",
33100
- "optional": true
33101
- },
33102
- "outputDir": {
33103
- "type": "string",
33104
- "description": "If provided, output images are downloaded to this directory",
33105
- "optional": true
33106
- }
33107
- }
33108
- },
33109
- "WorkflowResult": {
33110
- "description": "",
33111
- "properties": {
33112
- "promptId": {
33113
- "type": "string",
33114
- "description": ""
33115
- },
33116
- "outputs": {
33117
- "type": "Record<string, any>",
33118
- "description": ""
33119
- },
33120
- "images": {
33121
- "type": "Array<{ filename: string; subfolder: string; type: string; localPath?: string }>",
33122
- "description": "",
33123
- "optional": true
33124
- }
33125
- }
33241
+ "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})"
33126
33242
  }
33127
- }
33243
+ ]
33128
33244
  },
33129
33245
  {
33130
33246
  "id": "servers.mcp",
@@ -33953,22 +34069,45 @@ export const introspectionData = [
33953
34069
  ]
33954
34070
  },
33955
34071
  "fork": {
33956
- "description": "Fork the conversation into a new independent instance. The fork inherits the same system prompt, tools, and full message history, but has its own identity and state — changes in either direction do not affect the other.",
34072
+ "description": "",
33957
34073
  "parameters": {
33958
34074
  "overrides": {
33959
- "type": "Partial<ConversationOptions>",
33960
- "description": "Optional option overrides for the forked conversation (e.g. different model or title)"
34075
+ "type": "ForkOptions | ForkOptions[]",
34076
+ "description": "Parameter overrides"
33961
34077
  }
33962
34078
  },
33963
34079
  "required": [],
33964
- "returns": "Conversation",
34080
+ "returns": "Conversation | Conversation[]"
34081
+ },
34082
+ "research": {
34083
+ "description": "Fan out N questions in parallel using forked conversations, return the results. Each fork is independent and ephemeral — no history is saved.",
34084
+ "parameters": {
34085
+ "questions": {
34086
+ "type": "(string | { question: string; forkOptions?: ForkOptions })[]",
34087
+ "description": "Array of questions (strings) or objects with question + per-fork overrides"
34088
+ },
34089
+ "defaults": {
34090
+ "type": "ForkOptions",
34091
+ "description": "Default fork options applied to all forks (individual overrides take precedence)"
34092
+ }
34093
+ },
34094
+ "required": [
34095
+ "questions"
34096
+ ],
34097
+ "returns": "Promise<string[]>",
33965
34098
  "examples": [
33966
34099
  {
33967
34100
  "language": "ts",
33968
- "code": "const fork = conversation.fork()\nawait fork.ask('What if we took a different approach?')\n// original conversation is unchanged"
34101
+ "code": "const results = await conversation.research([\n \"What are the pros of approach A?\",\n \"What are the pros of approach B?\",\n], { history: 'none', model: 'gpt-4o-mini' })\n\n// Per-fork overrides\nconst results = await conversation.research([\n \"Quick factual question\",\n { question: \"Needs recent context\", forkOptions: { history: 5 } },\n], { history: 'none' })"
33969
34102
  }
33970
34103
  ]
33971
34104
  },
34105
+ "abort": {
34106
+ "description": "Abort the current ask() call. Cancels the in-flight network request and any pending tool executions. The ask() promise will reject with a ConversationAbortError whose `partial` property contains any text accumulated before the abort.",
34107
+ "parameters": {},
34108
+ "required": [],
34109
+ "returns": "void"
34110
+ },
33972
34111
  "estimateTokens": {
33973
34112
  "description": "Estimate the input token count for the current messages array using the js-tiktoken tokenizer. Updates state.",
33974
34113
  "parameters": {},
@@ -34127,6 +34266,11 @@ export const introspectionData = [
34127
34266
  "description": "Event emitted by Conversation",
34128
34267
  "arguments": {}
34129
34268
  },
34269
+ "aborted": {
34270
+ "name": "aborted",
34271
+ "description": "Event emitted by Conversation",
34272
+ "arguments": {}
34273
+ },
34130
34274
  "toolError": {
34131
34275
  "name": "toolError",
34132
34276
  "description": "Event emitted by Conversation",
@@ -35586,8 +35730,26 @@ export const introspectionData = [
35586
35730
  ],
35587
35731
  "returns": "this"
35588
35732
  },
35733
+ "triggerHook": {
35734
+ "description": "Trigger a named hook and await its completion. The hook function receives `(assistant, ...args)` and its return value is passed back to the caller. This ensures hooks run to completion BEFORE any subsequent logic executes, unlike the old bus-based approach where async hooks were fire-and-forget. Hooks that don't exist are silently skipped (returns undefined).",
35735
+ "parameters": {
35736
+ "hookName": {
35737
+ "type": "string",
35738
+ "description": "The hook to trigger (matches an export name from hooks.ts)"
35739
+ },
35740
+ "args": {
35741
+ "type": "any[]",
35742
+ "description": "Arguments passed to the hook after the assistant instance"
35743
+ }
35744
+ },
35745
+ "required": [
35746
+ "hookName",
35747
+ "args"
35748
+ ],
35749
+ "returns": "Promise<any>"
35750
+ },
35589
35751
  "afterInitialize": {
35590
- "description": "Called immediately after the assistant is constructed. Synchronously loads the system prompt, tools, and hooks, then binds hooks as event listeners so every emitted event automatically invokes its corresponding hook.",
35752
+ "description": "Called immediately after the assistant is constructed. Synchronously loads the system prompt, tools, and hooks. Hooks are invoked via triggerHook() at each emit site, ensuring async hooks are properly awaited.",
35591
35753
  "parameters": {},
35592
35754
  "required": [],
35593
35755
  "returns": "void"
@@ -35818,6 +35980,68 @@ export const introspectionData = [
35818
35980
  "required": [],
35819
35981
  "returns": "void"
35820
35982
  },
35983
+ "fork": {
35984
+ "description": "",
35985
+ "parameters": {
35986
+ "options": {
35987
+ "type": "AssistantForkOptions | AssistantForkOptions[]",
35988
+ "description": "Parameter options"
35989
+ }
35990
+ },
35991
+ "required": [],
35992
+ "returns": "Promise<Assistant | Assistant[]>"
35993
+ },
35994
+ "createResearchJob": {
35995
+ "description": "Create a non-blocking research job that fans out questions across forked assistants. The forks fire immediately and the returned entity tracks progress via observable state and events. Each fork preserves the full assistant identity (interceptors, tools, hooks).",
35996
+ "parameters": {
35997
+ "prompt": {
35998
+ "type": "string",
35999
+ "description": "Shared context/framing prompt prepended to each fork's system prompt"
36000
+ },
36001
+ "questions": {
36002
+ "type": "(string | { question: string; forkOptions?: AssistantForkOptions })[]",
36003
+ "description": "Array of questions (strings) or objects with question + per-fork overrides"
36004
+ },
36005
+ "defaults": {
36006
+ "type": "AssistantForkOptions",
36007
+ "description": "Default fork options applied to all forks"
36008
+ }
36009
+ },
36010
+ "required": [
36011
+ "prompt",
36012
+ "questions"
36013
+ ],
36014
+ "returns": "Promise<ResearchJob>",
36015
+ "examples": [
36016
+ {
36017
+ "language": "ts",
36018
+ "code": "// Fire and forget — check later\nconst job = await assistant.createResearchJob(\n \"Analyze this codebase for security issues\",\n [\"Look for SQL injection\", \"Look for XSS\", \"Look for auth bypass\"],\n { history: 'none', model: 'gpt-4o-mini' }\n)\n\n// Check progress\njob.state.get('completed') // 2 of 3\njob.state.get('results') // [answer1, answer2, null]\n\n// React to events\njob.on('forkCompleted', (index, result) => console.log(`Fork ${index} done`))\n\n// Or just wait\nawait job.waitFor('completed')"
36019
+ }
36020
+ ]
36021
+ },
36022
+ "research": {
36023
+ "description": "Fan out N questions in parallel using forked assistants, return the results. Sugar over createResearchJob — blocks until all forks complete.",
36024
+ "parameters": {
36025
+ "questions": {
36026
+ "type": "(string | { question: string; forkOptions?: AssistantForkOptions })[]",
36027
+ "description": "Array of questions (strings) or objects with question + per-fork overrides"
36028
+ },
36029
+ "defaults": {
36030
+ "type": "AssistantForkOptions & { prompt?: string }",
36031
+ "description": "Default fork options applied to all forks"
36032
+ }
36033
+ },
36034
+ "required": [
36035
+ "questions"
36036
+ ],
36037
+ "returns": "Promise<(string | null)[]>",
36038
+ "examples": [
36039
+ {
36040
+ "language": "ts",
36041
+ "code": "const results = await assistant.research([\n \"What are best practices for X?\",\n \"What are common pitfalls of X?\",\n], { history: 'none', model: 'gpt-4o-mini' })"
36042
+ }
36043
+ ]
36044
+ },
35821
36045
  "subagent": {
35822
36046
  "description": "Get or create a subagent assistant. Uses the assistantsManager to discover and create the assistant, then caches the instance for reuse across tool calls.",
35823
36047
  "parameters": {
@@ -35895,6 +36119,14 @@ export const introspectionData = [
35895
36119
  "description": "Whether the assistant has been started and is ready to receive questions.",
35896
36120
  "returns": "boolean"
35897
36121
  },
36122
+ "isFork": {
36123
+ "description": "Whether this assistant was created via fork().",
36124
+ "returns": "boolean"
36125
+ },
36126
+ "forkDepth": {
36127
+ "description": "How many levels deep this fork is. 0 = original, 1 = direct fork, 2 = fork of a fork, etc.",
36128
+ "returns": "number"
36129
+ },
35898
36130
  "systemPrompt": {
35899
36131
  "description": "The current system prompt text.",
35900
36132
  "returns": "string"
@@ -35949,6 +36181,11 @@ export const introspectionData = [
35949
36181
  }
35950
36182
  },
35951
36183
  "events": {
36184
+ "hookFired": {
36185
+ "name": "hookFired",
36186
+ "description": "Event emitted by Assistant",
36187
+ "arguments": {}
36188
+ },
35952
36189
  "created": {
35953
36190
  "name": "created",
35954
36191
  "description": "Event emitted by Assistant",
@@ -35964,11 +36201,6 @@ export const introspectionData = [
35964
36201
  "description": "Event emitted by Assistant",
35965
36202
  "arguments": {}
35966
36203
  },
35967
- "hookFired": {
35968
- "name": "hookFired",
35969
- "description": "Event emitted by Assistant",
35970
- "arguments": {}
35971
- },
35972
36204
  "reloaded": {
35973
36205
  "name": "reloaded",
35974
36206
  "description": "Event emitted by Assistant",