@soederpop/luca 0.0.19 → 0.0.20

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-03-20T21:12:58.846Z
4
+ // Generated at: 2026-03-21T01:13:42.175Z
5
5
 
6
6
  setBuildTimeData('features.googleDocs', {
7
7
  "id": "features.googleDocs",
@@ -9519,202 +9519,6 @@ setBuildTimeData('clients.websocket', {
9519
9519
  ]
9520
9520
  });
9521
9521
 
9522
- setBuildTimeData('clients.supabase', {
9523
- "id": "clients.supabase",
9524
- "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).",
9525
- "shortcut": "clients.supabase",
9526
- "className": "SupabaseClient",
9527
- "methods": {
9528
- "from": {
9529
- "description": "Start a query on a Postgres table or view.",
9530
- "parameters": {
9531
- "table": {
9532
- "type": "string",
9533
- "description": "The table or view name to query"
9534
- }
9535
- },
9536
- "required": [
9537
- "table"
9538
- ],
9539
- "returns": "void"
9540
- },
9541
- "rpc": {
9542
- "description": "Call a Postgres function (RPC).",
9543
- "parameters": {
9544
- "fn": {
9545
- "type": "string",
9546
- "description": "The function name"
9547
- },
9548
- "params": {
9549
- "type": "Record<string, unknown>",
9550
- "description": "Arguments to pass to the function"
9551
- },
9552
- "options": {
9553
- "type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
9554
- "description": "Optional settings (head, get, count)"
9555
- }
9556
- },
9557
- "required": [
9558
- "fn"
9559
- ],
9560
- "returns": "void"
9561
- },
9562
- "signInWithPassword": {
9563
- "description": "Sign in with email and password.",
9564
- "parameters": {
9565
- "email": {
9566
- "type": "string",
9567
- "description": "Parameter email"
9568
- },
9569
- "password": {
9570
- "type": "string",
9571
- "description": "Parameter password"
9572
- }
9573
- },
9574
- "required": [
9575
- "email",
9576
- "password"
9577
- ],
9578
- "returns": "void"
9579
- },
9580
- "signUp": {
9581
- "description": "Create a new user account with email and password.",
9582
- "parameters": {
9583
- "email": {
9584
- "type": "string",
9585
- "description": "Parameter email"
9586
- },
9587
- "password": {
9588
- "type": "string",
9589
- "description": "Parameter password"
9590
- }
9591
- },
9592
- "required": [
9593
- "email",
9594
- "password"
9595
- ],
9596
- "returns": "void"
9597
- },
9598
- "signOut": {
9599
- "description": "Sign the current user out.",
9600
- "parameters": {},
9601
- "required": [],
9602
- "returns": "void"
9603
- },
9604
- "getSession": {
9605
- "description": "Get the current session, if any.",
9606
- "parameters": {},
9607
- "required": [],
9608
- "returns": "void"
9609
- },
9610
- "getUser": {
9611
- "description": "Get the current user, if any.",
9612
- "parameters": {},
9613
- "required": [],
9614
- "returns": "void"
9615
- },
9616
- "invoke": {
9617
- "description": "Invoke a Supabase Edge Function by name.",
9618
- "parameters": {
9619
- "name": {
9620
- "type": "string",
9621
- "description": "Parameter name"
9622
- },
9623
- "body": {
9624
- "type": "any",
9625
- "description": "Parameter body"
9626
- }
9627
- },
9628
- "required": [
9629
- "name"
9630
- ],
9631
- "returns": "void"
9632
- },
9633
- "subscribe": {
9634
- "description": "Subscribe to realtime changes on a Postgres table.",
9635
- "parameters": {
9636
- "channelName": {
9637
- "type": "string",
9638
- "description": "A name for this subscription channel"
9639
- },
9640
- "table": {
9641
- "type": "string",
9642
- "description": "The table to listen to"
9643
- },
9644
- "callback": {
9645
- "type": "(payload: any) => void",
9646
- "description": "Called with the payload on each change"
9647
- },
9648
- "event": {
9649
- "type": "\"INSERT\" | \"UPDATE\" | \"DELETE\" | \"*\"",
9650
- "description": "The event type to listen for (default: all changes)"
9651
- }
9652
- },
9653
- "required": [
9654
- "channelName",
9655
- "table",
9656
- "callback"
9657
- ],
9658
- "returns": "RealtimeChannel"
9659
- },
9660
- "unsubscribe": {
9661
- "description": "Unsubscribe and remove a realtime channel by name.",
9662
- "parameters": {
9663
- "channelName": {
9664
- "type": "string",
9665
- "description": "The channel name to remove"
9666
- }
9667
- },
9668
- "required": [
9669
- "channelName"
9670
- ],
9671
- "returns": "void"
9672
- },
9673
- "unsubscribeAll": {
9674
- "description": "Unsubscribe and remove all realtime channels.",
9675
- "parameters": {},
9676
- "required": [],
9677
- "returns": "void"
9678
- },
9679
- "connect": {
9680
- "description": "Connect is a no-op since the Supabase SDK initializes on construction. The client is ready to use immediately after creation.",
9681
- "parameters": {},
9682
- "required": [],
9683
- "returns": "void"
9684
- },
9685
- "disconnect": {
9686
- "description": "Disconnect by signing out and removing all realtime channels.",
9687
- "parameters": {},
9688
- "required": [],
9689
- "returns": "void"
9690
- }
9691
- },
9692
- "getters": {
9693
- "sdk": {
9694
- "description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
9695
- "returns": "SupabaseSDKClient<any, any>"
9696
- },
9697
- "storage": {
9698
- "description": "Returns the Supabase Storage client for managing buckets and files.",
9699
- "returns": "any"
9700
- },
9701
- "functions": {
9702
- "description": "Returns the Supabase Functions client.",
9703
- "returns": "any"
9704
- }
9705
- },
9706
- "events": {},
9707
- "state": {},
9708
- "options": {},
9709
- "envVars": [],
9710
- "examples": [
9711
- {
9712
- "language": "ts",
9713
- "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})"
9714
- }
9715
- ]
9716
- });
9717
-
9718
9522
  setBuildTimeData('clients.openai', {
9719
9523
  "id": "clients.openai",
9720
9524
  "description": "OpenAI client — wraps the OpenAI SDK for chat completions, responses API, embeddings, and image generation. Provides convenience methods for common operations while tracking token usage and request counts. Supports both the Chat Completions API and the newer Responses API.",
@@ -9983,245 +9787,43 @@ setBuildTimeData('clients.openai', {
9983
9787
  ]
9984
9788
  });
9985
9789
 
9986
- setBuildTimeData('clients.elevenlabs', {
9987
- "id": "clients.elevenlabs",
9988
- "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.",
9989
- "shortcut": "clients.elevenlabs",
9990
- "className": "ElevenLabsClient",
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",
9991
9795
  "methods": {
9992
- "beforeRequest": {
9993
- "description": "Inject the xi-api-key header before each request.",
9994
- "parameters": {},
9995
- "required": [],
9996
- "returns": "void"
9997
- },
9998
- "connect": {
9999
- "description": "Validate the API key by listing available models.",
10000
- "parameters": {},
10001
- "required": [],
10002
- "returns": "Promise<this>",
10003
- "examples": [
10004
- {
10005
- "language": "ts",
10006
- "code": "await el.connect()"
10007
- }
10008
- ]
10009
- },
10010
- "listVoices": {
10011
- "description": "List available voices with optional search and filtering.",
9796
+ "queuePrompt": {
9797
+ "description": "Queue a prompt (API-format workflow) for execution.",
10012
9798
  "parameters": {
10013
- "options": {
10014
- "type": "{\n search?: string\n category?: string\n voice_type?: string\n page_size?: number\n next_page_token?: string\n }",
10015
- "description": "Query parameters for filtering voices"
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"
10016
9806
  }
10017
9807
  },
10018
- "required": [],
10019
- "returns": "Promise<any>",
9808
+ "required": [
9809
+ "prompt"
9810
+ ],
9811
+ "returns": "Promise<{ prompt_id: string; number: number }>",
10020
9812
  "examples": [
10021
9813
  {
10022
9814
  "language": "ts",
10023
- "code": "const voices = await el.listVoices()\nconst premade = await el.listVoices({ category: 'premade' })"
9815
+ "code": "const { prompt_id } = await comfy.queuePrompt(apiWorkflow)"
10024
9816
  }
10025
9817
  ]
10026
9818
  },
10027
- "getVoice": {
10028
- "description": "Get details for a single voice.",
10029
- "parameters": {
10030
- "voiceId": {
10031
- "type": "string",
10032
- "description": "The voice ID to look up"
10033
- }
10034
- },
10035
- "required": [
10036
- "voiceId"
10037
- ],
10038
- "returns": "Promise<any>",
10039
- "examples": [
10040
- {
10041
- "language": "ts",
10042
- "code": "const voice = await el.getVoice('21m00Tcm4TlvDq8ikWAM')\nconsole.log(voice.name, voice.settings)"
10043
- }
10044
- ]
10045
- },
10046
- "listModels": {
10047
- "description": "List available TTS models.",
10048
- "parameters": {},
10049
- "required": [],
10050
- "returns": "Promise<any[]>",
10051
- "examples": [
10052
- {
10053
- "language": "ts",
10054
- "code": "const models = await el.listModels()\nconsole.log(models.map(m => m.model_id))"
10055
- }
10056
- ]
10057
- },
10058
- "synthesize": {
10059
- "description": "Synthesize speech from text, returning audio as a Buffer.",
10060
- "parameters": {
10061
- "text": {
10062
- "type": "string",
10063
- "description": "The text to convert to speech"
10064
- },
10065
- "options": {
10066
- "type": "SynthesizeOptions",
10067
- "description": "Voice, model, format, and voice settings overrides",
10068
- "properties": {
10069
- "voiceId": {
10070
- "type": "string",
10071
- "description": ""
10072
- },
10073
- "modelId": {
10074
- "type": "string",
10075
- "description": ""
10076
- },
10077
- "outputFormat": {
10078
- "type": "string",
10079
- "description": ""
10080
- },
10081
- "voiceSettings": {
10082
- "type": "ElevenLabsVoiceSettings",
10083
- "description": ""
10084
- },
10085
- "disableCache": {
10086
- "type": "boolean",
10087
- "description": ""
10088
- }
10089
- }
10090
- }
10091
- },
10092
- "required": [
10093
- "text"
10094
- ],
10095
- "returns": "Promise<Buffer>",
10096
- "examples": [
10097
- {
10098
- "language": "ts",
10099
- "code": "const audio = await el.synthesize('Hello world')\n// audio is a Buffer of mp3 data\n\nconst custom = await el.synthesize('Hello', {\n voiceId: '21m00Tcm4TlvDq8ikWAM',\n voiceSettings: { stability: 0.5, similarityBoost: 0.8 }\n})"
10100
- }
10101
- ]
10102
- },
10103
- "say": {
10104
- "description": "Synthesize speech and write the audio to a file.",
10105
- "parameters": {
10106
- "text": {
10107
- "type": "string",
10108
- "description": "The text to convert to speech"
10109
- },
10110
- "outputPath": {
10111
- "type": "string",
10112
- "description": "File path to write the audio to"
10113
- },
10114
- "options": {
10115
- "type": "SynthesizeOptions",
10116
- "description": "Voice, model, format, and voice settings overrides",
10117
- "properties": {
10118
- "voiceId": {
10119
- "type": "string",
10120
- "description": ""
10121
- },
10122
- "modelId": {
10123
- "type": "string",
10124
- "description": ""
10125
- },
10126
- "outputFormat": {
10127
- "type": "string",
10128
- "description": ""
10129
- },
10130
- "voiceSettings": {
10131
- "type": "ElevenLabsVoiceSettings",
10132
- "description": ""
10133
- },
10134
- "disableCache": {
10135
- "type": "boolean",
10136
- "description": ""
10137
- }
10138
- }
10139
- }
10140
- },
10141
- "required": [
10142
- "text",
10143
- "outputPath"
10144
- ],
10145
- "returns": "Promise<string>",
10146
- "examples": [
10147
- {
10148
- "language": "ts",
10149
- "code": "const path = await el.say('Hello world', './hello.mp3')\nconsole.log(`Audio saved to ${path}`)"
10150
- }
10151
- ]
10152
- }
10153
- },
10154
- "getters": {
10155
- "apiKey": {
10156
- "description": "The resolved API key from options or environment.",
10157
- "returns": "string"
10158
- }
10159
- },
10160
- "events": {
10161
- "failure": {
10162
- "name": "failure",
10163
- "description": "Event emitted by ElevenLabsClient",
10164
- "arguments": {}
10165
- },
10166
- "voices": {
10167
- "name": "voices",
10168
- "description": "Event emitted by ElevenLabsClient",
10169
- "arguments": {}
10170
- },
10171
- "speech": {
10172
- "name": "speech",
10173
- "description": "Event emitted by ElevenLabsClient",
10174
- "arguments": {}
10175
- }
10176
- },
10177
- "state": {},
10178
- "options": {},
10179
- "envVars": [],
10180
- "examples": [
10181
- {
10182
- "language": "ts",
10183
- "code": "const el = container.client('elevenlabs')\nawait el.connect()\nconst voices = await el.listVoices()\nconst audio = await el.synthesize('Hello world')\n// audio is a Buffer of mp3 data"
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.",
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.",
10225
9827
  "parameters": {
10226
9828
  "promptId": {
10227
9829
  "type": "string",
@@ -10437,157 +10039,194 @@ setBuildTimeData('clients.comfyui', {
10437
10039
  ]
10438
10040
  });
10439
10041
 
10440
- setBuildTimeData('servers.mcp', {
10441
- "id": "servers.mcp",
10442
- "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).",
10443
- "shortcut": "servers.mcp",
10444
- "className": "MCPServer",
10042
+ setBuildTimeData('clients.elevenlabs', {
10043
+ "id": "clients.elevenlabs",
10044
+ "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.",
10045
+ "shortcut": "clients.elevenlabs",
10046
+ "className": "ElevenLabsClient",
10445
10047
  "methods": {
10446
- "tool": {
10447
- "description": "Register an MCP tool. The tool's Zod schema is converted to JSON Schema for the protocol listing, and used for runtime argument validation. Tool handlers can return a string (auto-wrapped as text content) or a full CallToolResult object for advanced responses (images, errors, etc).",
10048
+ "beforeRequest": {
10049
+ "description": "Inject the xi-api-key header before each request.",
10050
+ "parameters": {},
10051
+ "required": [],
10052
+ "returns": "void"
10053
+ },
10054
+ "connect": {
10055
+ "description": "Validate the API key by listing available models.",
10056
+ "parameters": {},
10057
+ "required": [],
10058
+ "returns": "Promise<this>",
10059
+ "examples": [
10060
+ {
10061
+ "language": "ts",
10062
+ "code": "await el.connect()"
10063
+ }
10064
+ ]
10065
+ },
10066
+ "listVoices": {
10067
+ "description": "List available voices with optional search and filtering.",
10448
10068
  "parameters": {
10449
- "name": {
10450
- "type": "string",
10451
- "description": "Unique tool name"
10452
- },
10453
10069
  "options": {
10454
- "type": "ToolRegistrationOptions",
10455
- "description": "Tool schema, description, and handler",
10456
- "properties": {
10457
- "schema": {
10458
- "type": "z.ZodObject<any>",
10459
- "description": ""
10460
- },
10461
- "description": {
10462
- "type": "string",
10463
- "description": ""
10464
- },
10465
- "handler": {
10466
- "type": "(args: any, ctx: MCPContext) => any",
10467
- "description": ""
10468
- }
10469
- }
10070
+ "type": "{\n search?: string\n category?: string\n voice_type?: string\n page_size?: number\n next_page_token?: string\n }",
10071
+ "description": "Query parameters for filtering voices"
10470
10072
  }
10471
10073
  },
10472
- "required": [
10473
- "name",
10474
- "options"
10475
- ],
10476
- "returns": "this"
10477
- },
10478
- "resource": {
10479
- "description": "Register an MCP resource. Resources expose data (files, configs, etc) that AI clients can read by URI. Accepts either a handler function directly or an options object with additional metadata (name, description, mimeType).",
10074
+ "required": [],
10075
+ "returns": "Promise<any>",
10076
+ "examples": [
10077
+ {
10078
+ "language": "ts",
10079
+ "code": "const voices = await el.listVoices()\nconst premade = await el.listVoices({ category: 'premade' })"
10080
+ }
10081
+ ]
10082
+ },
10083
+ "getVoice": {
10084
+ "description": "Get details for a single voice.",
10480
10085
  "parameters": {
10481
- "uri": {
10086
+ "voiceId": {
10482
10087
  "type": "string",
10483
- "description": "Unique resource URI (e.g. \"project://readme\")"
10484
- },
10485
- "handlerOrOptions": {
10486
- "type": "ResourceRegistrationOptions['handler'] | ResourceRegistrationOptions",
10487
- "description": "Handler function or options object with handler"
10088
+ "description": "The voice ID to look up"
10488
10089
  }
10489
10090
  },
10490
10091
  "required": [
10491
- "uri",
10492
- "handlerOrOptions"
10092
+ "voiceId"
10493
10093
  ],
10494
- "returns": "this"
10094
+ "returns": "Promise<any>",
10095
+ "examples": [
10096
+ {
10097
+ "language": "ts",
10098
+ "code": "const voice = await el.getVoice('21m00Tcm4TlvDq8ikWAM')\nconsole.log(voice.name, voice.settings)"
10099
+ }
10100
+ ]
10495
10101
  },
10496
- "prompt": {
10497
- "description": "Register an MCP prompt. Prompts are reusable message templates that AI clients can invoke with optional string arguments.",
10102
+ "listModels": {
10103
+ "description": "List available TTS models.",
10104
+ "parameters": {},
10105
+ "required": [],
10106
+ "returns": "Promise<any[]>",
10107
+ "examples": [
10108
+ {
10109
+ "language": "ts",
10110
+ "code": "const models = await el.listModels()\nconsole.log(models.map(m => m.model_id))"
10111
+ }
10112
+ ]
10113
+ },
10114
+ "synthesize": {
10115
+ "description": "Synthesize speech from text, returning audio as a Buffer.",
10498
10116
  "parameters": {
10499
- "name": {
10117
+ "text": {
10500
10118
  "type": "string",
10501
- "description": "Unique prompt name"
10119
+ "description": "The text to convert to speech"
10502
10120
  },
10503
10121
  "options": {
10504
- "type": "PromptRegistrationOptions",
10505
- "description": "Prompt handler, optional args schema, and description",
10122
+ "type": "SynthesizeOptions",
10123
+ "description": "Voice, model, format, and voice settings overrides",
10506
10124
  "properties": {
10507
- "description": {
10125
+ "voiceId": {
10508
10126
  "type": "string",
10509
10127
  "description": ""
10510
10128
  },
10511
- "args": {
10512
- "type": "Record<string, z.ZodType>",
10129
+ "modelId": {
10130
+ "type": "string",
10513
10131
  "description": ""
10514
10132
  },
10515
- "handler": {
10516
- "type": "(args: Record<string, string | undefined>, ctx: MCPContext) => Promise<PromptMessage[]> | PromptMessage[]",
10133
+ "outputFormat": {
10134
+ "type": "string",
10135
+ "description": ""
10136
+ },
10137
+ "voiceSettings": {
10138
+ "type": "ElevenLabsVoiceSettings",
10139
+ "description": ""
10140
+ },
10141
+ "disableCache": {
10142
+ "type": "boolean",
10517
10143
  "description": ""
10518
10144
  }
10519
10145
  }
10520
10146
  }
10521
10147
  },
10522
10148
  "required": [
10523
- "name",
10524
- "options"
10149
+ "text"
10525
10150
  ],
10526
- "returns": "this"
10527
- },
10528
- "configure": {
10529
- "description": "Configure the MCP protocol server and register all protocol handlers. Called automatically before start() if not already configured.",
10530
- "parameters": {},
10531
- "required": [],
10532
- "returns": "void"
10151
+ "returns": "Promise<Buffer>",
10152
+ "examples": [
10153
+ {
10154
+ "language": "ts",
10155
+ "code": "const audio = await el.synthesize('Hello world')\n// audio is a Buffer of mp3 data\n\nconst custom = await el.synthesize('Hello', {\n voiceId: '21m00Tcm4TlvDq8ikWAM',\n voiceSettings: { stability: 0.5, similarityBoost: 0.8 }\n})"
10156
+ }
10157
+ ]
10533
10158
  },
10534
- "start": {
10535
- "description": "Start the MCP server with the specified transport.",
10159
+ "say": {
10160
+ "description": "Synthesize speech and write the audio to a file.",
10536
10161
  "parameters": {
10162
+ "text": {
10163
+ "type": "string",
10164
+ "description": "The text to convert to speech"
10165
+ },
10166
+ "outputPath": {
10167
+ "type": "string",
10168
+ "description": "File path to write the audio to"
10169
+ },
10537
10170
  "options": {
10538
- "type": "{\n transport?: 'stdio' | 'http'\n port?: number\n host?: string\n mcpCompat?: MCPCompatMode\n stdioCompat?: StdioCompatMode\n }",
10539
- "description": "Transport configuration. Defaults to stdio.",
10171
+ "type": "SynthesizeOptions",
10172
+ "description": "Voice, model, format, and voice settings overrides",
10540
10173
  "properties": {
10541
- "transport": {
10542
- "type": "any",
10543
- "description": "'stdio' for CLI integration, 'http' for remote access"
10174
+ "voiceId": {
10175
+ "type": "string",
10176
+ "description": ""
10544
10177
  },
10545
- "port": {
10546
- "type": "any",
10547
- "description": "Port for HTTP transport (default 3001)"
10178
+ "modelId": {
10179
+ "type": "string",
10180
+ "description": ""
10181
+ },
10182
+ "outputFormat": {
10183
+ "type": "string",
10184
+ "description": ""
10185
+ },
10186
+ "voiceSettings": {
10187
+ "type": "ElevenLabsVoiceSettings",
10188
+ "description": ""
10189
+ },
10190
+ "disableCache": {
10191
+ "type": "boolean",
10192
+ "description": ""
10548
10193
  }
10549
10194
  }
10550
10195
  }
10551
10196
  },
10552
- "required": [],
10553
- "returns": "void"
10554
- },
10555
- "stop": {
10556
- "description": "Stop the MCP server and close all connections.",
10557
- "parameters": {},
10558
- "required": [],
10559
- "returns": "void"
10197
+ "required": [
10198
+ "text",
10199
+ "outputPath"
10200
+ ],
10201
+ "returns": "Promise<string>",
10202
+ "examples": [
10203
+ {
10204
+ "language": "ts",
10205
+ "code": "const path = await el.say('Hello world', './hello.mp3')\nconsole.log(`Audio saved to ${path}`)"
10206
+ }
10207
+ ]
10560
10208
  }
10561
10209
  },
10562
10210
  "getters": {
10563
- "mcpServer": {
10564
- "description": "The underlying MCP protocol server instance. Created during configure().",
10565
- "returns": "MCPProtocolServer"
10566
- },
10567
- "handlerContext": {
10568
- "description": "The handler context passed to all tool, resource, and prompt handlers.",
10569
- "returns": "MCPContext"
10211
+ "apiKey": {
10212
+ "description": "The resolved API key from options or environment.",
10213
+ "returns": "string"
10570
10214
  }
10571
10215
  },
10572
10216
  "events": {
10573
- "toolRegistered": {
10574
- "name": "toolRegistered",
10575
- "description": "Event emitted by MCPServer",
10576
- "arguments": {}
10577
- },
10578
- "resourceRegistered": {
10579
- "name": "resourceRegistered",
10580
- "description": "Event emitted by MCPServer",
10217
+ "failure": {
10218
+ "name": "failure",
10219
+ "description": "Event emitted by ElevenLabsClient",
10581
10220
  "arguments": {}
10582
10221
  },
10583
- "promptRegistered": {
10584
- "name": "promptRegistered",
10585
- "description": "Event emitted by MCPServer",
10222
+ "voices": {
10223
+ "name": "voices",
10224
+ "description": "Event emitted by ElevenLabsClient",
10586
10225
  "arguments": {}
10587
10226
  },
10588
- "toolCalled": {
10589
- "name": "toolCalled",
10590
- "description": "Event emitted by MCPServer",
10227
+ "speech": {
10228
+ "name": "speech",
10229
+ "description": "Event emitted by ElevenLabsClient",
10591
10230
  "arguments": {}
10592
10231
  }
10593
10232
  },
@@ -10597,265 +10236,626 @@ setBuildTimeData('servers.mcp', {
10597
10236
  "examples": [
10598
10237
  {
10599
10238
  "language": "ts",
10600
- "code": "const mcp = container.server('mcp', { serverName: 'my-server', serverVersion: '1.0.0' })\n\nmcp.tool('search_files', {\n schema: z.object({ pattern: z.string() }),\n description: 'Search for files',\n handler: async (args, ctx) => {\n return ctx.container.feature('fs').walk('.', { include: [args.pattern] }).files.join('\\n')\n }\n})\n\nawait mcp.start()"
10239
+ "code": "const el = container.client('elevenlabs')\nawait el.connect()\nconst voices = await el.listVoices()\nconst audio = await el.synthesize('Hello world')\n// audio is a Buffer of mp3 data"
10601
10240
  }
10602
10241
  ]
10603
10242
  });
10604
10243
 
10605
- setBuildTimeData('servers.express', {
10606
- "id": "servers.express",
10607
- "description": "Express.js HTTP server with automatic endpoint mounting, CORS, and SPA history fallback. Wraps an Express application with convention-based endpoint discovery. Endpoints defined as modules are automatically mounted as routes. Supports static file serving, CORS configuration, and single-page app history fallback out of the box.",
10608
- "shortcut": "servers.express",
10609
- "className": "ExpressServer",
10244
+ setBuildTimeData('clients.supabase', {
10245
+ "id": "clients.supabase",
10246
+ "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).",
10247
+ "shortcut": "clients.supabase",
10248
+ "className": "SupabaseClient",
10610
10249
  "methods": {
10611
- "start": {
10612
- "description": "Start the Express HTTP server. A runtime `port` overrides the constructor option and is written to state so `server.port` always reflects reality.",
10250
+ "from": {
10251
+ "description": "Start a query on a Postgres table or view.",
10613
10252
  "parameters": {
10614
- "options": {
10615
- "type": "StartOptions",
10616
- "description": "Optional runtime overrides for port and host"
10253
+ "table": {
10254
+ "type": "string",
10255
+ "description": "The table or view name to query"
10617
10256
  }
10618
10257
  },
10619
- "required": [],
10620
- "returns": "void"
10621
- },
10622
- "stop": {
10623
- "description": "",
10624
- "parameters": {},
10625
- "required": [],
10626
- "returns": "void"
10627
- },
10628
- "configure": {
10629
- "description": "",
10630
- "parameters": {},
10631
- "required": [],
10258
+ "required": [
10259
+ "table"
10260
+ ],
10632
10261
  "returns": "void"
10633
10262
  },
10634
- "useEndpoint": {
10635
- "description": "",
10263
+ "rpc": {
10264
+ "description": "Call a Postgres function (RPC).",
10636
10265
  "parameters": {
10637
- "endpoint": {
10638
- "type": "Endpoint",
10639
- "description": "Parameter endpoint"
10266
+ "fn": {
10267
+ "type": "string",
10268
+ "description": "The function name"
10269
+ },
10270
+ "params": {
10271
+ "type": "Record<string, unknown>",
10272
+ "description": "Arguments to pass to the function"
10273
+ },
10274
+ "options": {
10275
+ "type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
10276
+ "description": "Optional settings (head, get, count)"
10640
10277
  }
10641
10278
  },
10642
10279
  "required": [
10643
- "endpoint"
10280
+ "fn"
10644
10281
  ],
10645
- "returns": "this"
10282
+ "returns": "void"
10646
10283
  },
10647
- "useEndpoints": {
10648
- "description": "",
10284
+ "signInWithPassword": {
10285
+ "description": "Sign in with email and password.",
10649
10286
  "parameters": {
10650
- "dir": {
10287
+ "email": {
10651
10288
  "type": "string",
10652
- "description": "Parameter dir"
10289
+ "description": "Parameter email"
10290
+ },
10291
+ "password": {
10292
+ "type": "string",
10293
+ "description": "Parameter password"
10653
10294
  }
10654
10295
  },
10655
10296
  "required": [
10656
- "dir"
10297
+ "email",
10298
+ "password"
10657
10299
  ],
10658
- "returns": "Promise<this>"
10300
+ "returns": "void"
10659
10301
  },
10660
- "useEndpointModules": {
10661
- "description": "",
10302
+ "signUp": {
10303
+ "description": "Create a new user account with email and password.",
10662
10304
  "parameters": {
10663
- "modules": {
10664
- "type": "EndpointModule[]",
10665
- "description": "Parameter modules"
10305
+ "email": {
10306
+ "type": "string",
10307
+ "description": "Parameter email"
10308
+ },
10309
+ "password": {
10310
+ "type": "string",
10311
+ "description": "Parameter password"
10666
10312
  }
10667
10313
  },
10668
10314
  "required": [
10669
- "modules"
10315
+ "email",
10316
+ "password"
10670
10317
  ],
10671
- "returns": "Promise<this>"
10318
+ "returns": "void"
10672
10319
  },
10673
- "serveOpenAPISpec": {
10674
- "description": "",
10675
- "parameters": {
10676
- "options": {
10677
- "type": "{ title?: string; version?: string; description?: string }",
10678
- "description": "Parameter options"
10679
- }
10680
- },
10320
+ "signOut": {
10321
+ "description": "Sign the current user out.",
10322
+ "parameters": {},
10681
10323
  "required": [],
10682
- "returns": "this"
10324
+ "returns": "void"
10683
10325
  },
10684
- "generateOpenAPISpec": {
10685
- "description": "",
10686
- "parameters": {
10687
- "options": {
10688
- "type": "{ title?: string; version?: string; description?: string }",
10689
- "description": "Parameter options"
10690
- }
10691
- },
10326
+ "getSession": {
10327
+ "description": "Get the current session, if any.",
10328
+ "parameters": {},
10692
10329
  "required": [],
10693
- "returns": "Record<string, any>"
10694
- }
10695
- },
10696
- "getters": {
10697
- "express": {
10698
- "description": "",
10699
- "returns": "any"
10330
+ "returns": "void"
10700
10331
  },
10701
- "hooks": {
10702
- "description": "",
10703
- "returns": "any"
10332
+ "getUser": {
10333
+ "description": "Get the current user, if any.",
10334
+ "parameters": {},
10335
+ "required": [],
10336
+ "returns": "void"
10704
10337
  },
10705
- "app": {
10706
- "description": "",
10707
- "returns": "any"
10708
- }
10709
- },
10710
- "events": {},
10711
- "state": {},
10712
- "options": {},
10713
- "envVars": [],
10714
- "examples": [
10715
- {
10716
- "language": "ts",
10717
- "code": "const server = container.server('express', { cors: true, static: './public' })\nawait server.start({ port: 3000 })\n\n// Mount endpoints programmatically\nserver.mount(myEndpoint)\n\n// Access the underlying Express app\nserver.app.get('/health', (req, res) => res.json({ ok: true }))"
10718
- }
10719
- ]
10720
- });
10721
-
10722
- setBuildTimeData('servers.websocket', {
10723
- "id": "servers.websocket",
10724
- "description": "WebSocket server built on the `ws` library with optional JSON message framing. Manages WebSocket connections, tracks connected clients, and bridges messages to Luca's event bus. When `json` mode is enabled, incoming messages are automatically JSON-parsed (with `.toString()` for Buffer data) and outgoing messages via `send()` / `broadcast()` are JSON-stringified. When `json` mode is disabled, raw message data is emitted as-is and `send()` / `broadcast()` still JSON-stringify for safety.",
10725
- "shortcut": "servers.websocket",
10726
- "className": "WebsocketServer",
10727
- "methods": {
10728
- "broadcast": {
10729
- "description": "",
10338
+ "invoke": {
10339
+ "description": "Invoke a Supabase Edge Function by name.",
10730
10340
  "parameters": {
10731
- "message": {
10341
+ "name": {
10342
+ "type": "string",
10343
+ "description": "Parameter name"
10344
+ },
10345
+ "body": {
10732
10346
  "type": "any",
10733
- "description": "Parameter message"
10347
+ "description": "Parameter body"
10734
10348
  }
10735
10349
  },
10736
10350
  "required": [
10737
- "message"
10351
+ "name"
10738
10352
  ],
10739
10353
  "returns": "void"
10740
10354
  },
10741
- "send": {
10742
- "description": "",
10355
+ "subscribe": {
10356
+ "description": "Subscribe to realtime changes on a Postgres table.",
10743
10357
  "parameters": {
10744
- "ws": {
10745
- "type": "any",
10746
- "description": "Parameter ws"
10358
+ "channelName": {
10359
+ "type": "string",
10360
+ "description": "A name for this subscription channel"
10747
10361
  },
10748
- "message": {
10749
- "type": "any",
10750
- "description": "Parameter message"
10362
+ "table": {
10363
+ "type": "string",
10364
+ "description": "The table to listen to"
10365
+ },
10366
+ "callback": {
10367
+ "type": "(payload: any) => void",
10368
+ "description": "Called with the payload on each change"
10369
+ },
10370
+ "event": {
10371
+ "type": "\"INSERT\" | \"UPDATE\" | \"DELETE\" | \"*\"",
10372
+ "description": "The event type to listen for (default: all changes)"
10751
10373
  }
10752
10374
  },
10753
10375
  "required": [
10754
- "ws",
10755
- "message"
10376
+ "channelName",
10377
+ "table",
10378
+ "callback"
10756
10379
  ],
10757
- "returns": "void"
10380
+ "returns": "RealtimeChannel"
10758
10381
  },
10759
- "start": {
10760
- "description": "Start the WebSocket server. A runtime `port` overrides the constructor option and is written to state before the underlying `ws.Server` is created, so the server binds to the correct port.",
10382
+ "unsubscribe": {
10383
+ "description": "Unsubscribe and remove a realtime channel by name.",
10761
10384
  "parameters": {
10762
- "options": {
10763
- "type": "StartOptions",
10764
- "description": "Optional runtime overrides for port and host"
10385
+ "channelName": {
10386
+ "type": "string",
10387
+ "description": "The channel name to remove"
10765
10388
  }
10766
10389
  },
10390
+ "required": [
10391
+ "channelName"
10392
+ ],
10393
+ "returns": "void"
10394
+ },
10395
+ "unsubscribeAll": {
10396
+ "description": "Unsubscribe and remove all realtime channels.",
10397
+ "parameters": {},
10767
10398
  "required": [],
10768
10399
  "returns": "void"
10769
10400
  },
10770
- "stop": {
10771
- "description": "",
10401
+ "connect": {
10402
+ "description": "Connect is a no-op since the Supabase SDK initializes on construction. The client is ready to use immediately after creation.",
10403
+ "parameters": {},
10404
+ "required": [],
10405
+ "returns": "void"
10406
+ },
10407
+ "disconnect": {
10408
+ "description": "Disconnect by signing out and removing all realtime channels.",
10772
10409
  "parameters": {},
10773
10410
  "required": [],
10774
10411
  "returns": "void"
10775
10412
  }
10776
10413
  },
10777
10414
  "getters": {
10778
- "wss": {
10779
- "description": "",
10780
- "returns": "any"
10415
+ "sdk": {
10416
+ "description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
10417
+ "returns": "SupabaseSDKClient<any, any>"
10781
10418
  },
10782
- "port": {
10783
- "description": "The port this server will bind to. Defaults to 8081 if not set via constructor options or start().",
10419
+ "storage": {
10420
+ "description": "Returns the Supabase Storage client for managing buckets and files.",
10784
10421
  "returns": "any"
10785
- }
10786
- },
10787
- "events": {
10788
- "connection": {
10789
- "name": "connection",
10790
- "description": "Event emitted by WebsocketServer",
10791
- "arguments": {}
10792
10422
  },
10793
- "message": {
10794
- "name": "message",
10795
- "description": "Event emitted by WebsocketServer",
10796
- "arguments": {}
10423
+ "functions": {
10424
+ "description": "Returns the Supabase Functions client.",
10425
+ "returns": "any"
10797
10426
  }
10798
10427
  },
10428
+ "events": {},
10799
10429
  "state": {},
10800
10430
  "options": {},
10801
10431
  "envVars": [],
10802
10432
  "examples": [
10803
10433
  {
10804
10434
  "language": "ts",
10805
- "code": "const ws = container.server('websocket', { json: true })\nawait ws.start({ port: 8080 })\n\nws.on('message', (data, client) => {\n console.log('Received:', data)\n ws.broadcast({ echo: data })\n})"
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})"
10806
10436
  }
10807
10437
  ]
10808
10438
  });
10809
10439
 
10810
- // Container introspection data
10811
- setContainerBuildTimeData('Container', {
10812
- "className": "Container",
10813
- "description": "Containers are single objects that contain state, an event bus, and registries of helpers such as: - features - clients - servers A Helper represents a category of components in your program which have a common interface, e.g. all servers can be started / stopped, all features can be enabled, if supported, all clients can connect to something. A Helper can be introspected at runtime to learn about the interface of the helper. A helper has state, and emits events. You can design your own containers and load them up with the helpers you want for that environment.",
10440
+ setBuildTimeData('servers.mcp', {
10441
+ "id": "servers.mcp",
10442
+ "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).",
10443
+ "shortcut": "servers.mcp",
10444
+ "className": "MCPServer",
10814
10445
  "methods": {
10815
- "subcontainer": {
10816
- "description": "Creates a new subcontainer instance of the same concrete Container subclass. The new instance is constructed with the same options as this container, shallow-merged with any overrides you provide. This preserves the runtime container type (e.g. NodeContainer, BrowserContainer, etc.).",
10446
+ "tool": {
10447
+ "description": "Register an MCP tool. The tool's Zod schema is converted to JSON Schema for the protocol listing, and used for runtime argument validation. Tool handlers can return a string (auto-wrapped as text content) or a full CallToolResult object for advanced responses (images, errors, etc).",
10817
10448
  "parameters": {
10818
- "this": {
10819
- "type": "This",
10820
- "description": "Parameter this"
10449
+ "name": {
10450
+ "type": "string",
10451
+ "description": "Unique tool name"
10821
10452
  },
10822
10453
  "options": {
10823
- "type": "ConstructorParameters<This['constructor']>[0]",
10824
- "description": "Options to override for the new container instance."
10454
+ "type": "ToolRegistrationOptions",
10455
+ "description": "Tool schema, description, and handler",
10456
+ "properties": {
10457
+ "schema": {
10458
+ "type": "z.ZodObject<any>",
10459
+ "description": ""
10460
+ },
10461
+ "description": {
10462
+ "type": "string",
10463
+ "description": ""
10464
+ },
10465
+ "handler": {
10466
+ "type": "(args: any, ctx: MCPContext) => any",
10467
+ "description": ""
10468
+ }
10469
+ }
10825
10470
  }
10826
10471
  },
10827
10472
  "required": [
10828
- "this",
10473
+ "name",
10829
10474
  "options"
10830
10475
  ],
10831
- "returns": "This"
10476
+ "returns": "this"
10832
10477
  },
10833
- "addContext": {
10834
- "description": "",
10478
+ "resource": {
10479
+ "description": "Register an MCP resource. Resources expose data (files, configs, etc) that AI clients can read by URI. Accepts either a handler function directly or an options object with additional metadata (name, description, mimeType).",
10835
10480
  "parameters": {
10836
- "keyOrContext": {
10837
- "type": "keyof ContainerContext | Partial<ContainerContext>",
10838
- "description": "Parameter keyOrContext"
10481
+ "uri": {
10482
+ "type": "string",
10483
+ "description": "Unique resource URI (e.g. \"project://readme\")"
10839
10484
  },
10840
- "value": {
10841
- "type": "ContainerContext[keyof ContainerContext]",
10842
- "description": "Parameter value"
10485
+ "handlerOrOptions": {
10486
+ "type": "ResourceRegistrationOptions['handler'] | ResourceRegistrationOptions",
10487
+ "description": "Handler function or options object with handler"
10843
10488
  }
10844
10489
  },
10845
10490
  "required": [
10846
- "keyOrContext"
10491
+ "uri",
10492
+ "handlerOrOptions"
10847
10493
  ],
10848
10494
  "returns": "this"
10849
10495
  },
10850
- "setState": {
10851
- "description": "Sets the state of the container.",
10496
+ "prompt": {
10497
+ "description": "Register an MCP prompt. Prompts are reusable message templates that AI clients can invoke with optional string arguments.",
10852
10498
  "parameters": {
10853
- "newState": {
10854
- "type": "SetStateValue<ContainerState>",
10855
- "description": "The new state of the container."
10856
- }
10857
- },
10858
- "required": [
10499
+ "name": {
10500
+ "type": "string",
10501
+ "description": "Unique prompt name"
10502
+ },
10503
+ "options": {
10504
+ "type": "PromptRegistrationOptions",
10505
+ "description": "Prompt handler, optional args schema, and description",
10506
+ "properties": {
10507
+ "description": {
10508
+ "type": "string",
10509
+ "description": ""
10510
+ },
10511
+ "args": {
10512
+ "type": "Record<string, z.ZodType>",
10513
+ "description": ""
10514
+ },
10515
+ "handler": {
10516
+ "type": "(args: Record<string, string | undefined>, ctx: MCPContext) => Promise<PromptMessage[]> | PromptMessage[]",
10517
+ "description": ""
10518
+ }
10519
+ }
10520
+ }
10521
+ },
10522
+ "required": [
10523
+ "name",
10524
+ "options"
10525
+ ],
10526
+ "returns": "this"
10527
+ },
10528
+ "configure": {
10529
+ "description": "Configure the MCP protocol server and register all protocol handlers. Called automatically before start() if not already configured.",
10530
+ "parameters": {},
10531
+ "required": [],
10532
+ "returns": "void"
10533
+ },
10534
+ "start": {
10535
+ "description": "Start the MCP server with the specified transport.",
10536
+ "parameters": {
10537
+ "options": {
10538
+ "type": "{\n transport?: 'stdio' | 'http'\n port?: number\n host?: string\n mcpCompat?: MCPCompatMode\n stdioCompat?: StdioCompatMode\n }",
10539
+ "description": "Transport configuration. Defaults to stdio.",
10540
+ "properties": {
10541
+ "transport": {
10542
+ "type": "any",
10543
+ "description": "'stdio' for CLI integration, 'http' for remote access"
10544
+ },
10545
+ "port": {
10546
+ "type": "any",
10547
+ "description": "Port for HTTP transport (default 3001)"
10548
+ }
10549
+ }
10550
+ }
10551
+ },
10552
+ "required": [],
10553
+ "returns": "void"
10554
+ },
10555
+ "stop": {
10556
+ "description": "Stop the MCP server and close all connections.",
10557
+ "parameters": {},
10558
+ "required": [],
10559
+ "returns": "void"
10560
+ }
10561
+ },
10562
+ "getters": {
10563
+ "mcpServer": {
10564
+ "description": "The underlying MCP protocol server instance. Created during configure().",
10565
+ "returns": "MCPProtocolServer"
10566
+ },
10567
+ "handlerContext": {
10568
+ "description": "The handler context passed to all tool, resource, and prompt handlers.",
10569
+ "returns": "MCPContext"
10570
+ }
10571
+ },
10572
+ "events": {
10573
+ "toolRegistered": {
10574
+ "name": "toolRegistered",
10575
+ "description": "Event emitted by MCPServer",
10576
+ "arguments": {}
10577
+ },
10578
+ "resourceRegistered": {
10579
+ "name": "resourceRegistered",
10580
+ "description": "Event emitted by MCPServer",
10581
+ "arguments": {}
10582
+ },
10583
+ "promptRegistered": {
10584
+ "name": "promptRegistered",
10585
+ "description": "Event emitted by MCPServer",
10586
+ "arguments": {}
10587
+ },
10588
+ "toolCalled": {
10589
+ "name": "toolCalled",
10590
+ "description": "Event emitted by MCPServer",
10591
+ "arguments": {}
10592
+ }
10593
+ },
10594
+ "state": {},
10595
+ "options": {},
10596
+ "envVars": [],
10597
+ "examples": [
10598
+ {
10599
+ "language": "ts",
10600
+ "code": "const mcp = container.server('mcp', { serverName: 'my-server', serverVersion: '1.0.0' })\n\nmcp.tool('search_files', {\n schema: z.object({ pattern: z.string() }),\n description: 'Search for files',\n handler: async (args, ctx) => {\n return ctx.container.feature('fs').walk('.', { include: [args.pattern] }).files.join('\\n')\n }\n})\n\nawait mcp.start()"
10601
+ }
10602
+ ]
10603
+ });
10604
+
10605
+ setBuildTimeData('servers.express', {
10606
+ "id": "servers.express",
10607
+ "description": "Express.js HTTP server with automatic endpoint mounting, CORS, and SPA history fallback. Wraps an Express application with convention-based endpoint discovery. Endpoints defined as modules are automatically mounted as routes. Supports static file serving, CORS configuration, and single-page app history fallback out of the box.",
10608
+ "shortcut": "servers.express",
10609
+ "className": "ExpressServer",
10610
+ "methods": {
10611
+ "start": {
10612
+ "description": "Start the Express HTTP server. A runtime `port` overrides the constructor option and is written to state so `server.port` always reflects reality.",
10613
+ "parameters": {
10614
+ "options": {
10615
+ "type": "StartOptions",
10616
+ "description": "Optional runtime overrides for port and host"
10617
+ }
10618
+ },
10619
+ "required": [],
10620
+ "returns": "void"
10621
+ },
10622
+ "stop": {
10623
+ "description": "",
10624
+ "parameters": {},
10625
+ "required": [],
10626
+ "returns": "void"
10627
+ },
10628
+ "configure": {
10629
+ "description": "",
10630
+ "parameters": {},
10631
+ "required": [],
10632
+ "returns": "void"
10633
+ },
10634
+ "useEndpoint": {
10635
+ "description": "",
10636
+ "parameters": {
10637
+ "endpoint": {
10638
+ "type": "Endpoint",
10639
+ "description": "Parameter endpoint"
10640
+ }
10641
+ },
10642
+ "required": [
10643
+ "endpoint"
10644
+ ],
10645
+ "returns": "this"
10646
+ },
10647
+ "useEndpoints": {
10648
+ "description": "",
10649
+ "parameters": {
10650
+ "dir": {
10651
+ "type": "string",
10652
+ "description": "Parameter dir"
10653
+ }
10654
+ },
10655
+ "required": [
10656
+ "dir"
10657
+ ],
10658
+ "returns": "Promise<this>"
10659
+ },
10660
+ "useEndpointModules": {
10661
+ "description": "",
10662
+ "parameters": {
10663
+ "modules": {
10664
+ "type": "EndpointModule[]",
10665
+ "description": "Parameter modules"
10666
+ }
10667
+ },
10668
+ "required": [
10669
+ "modules"
10670
+ ],
10671
+ "returns": "Promise<this>"
10672
+ },
10673
+ "serveOpenAPISpec": {
10674
+ "description": "",
10675
+ "parameters": {
10676
+ "options": {
10677
+ "type": "{ title?: string; version?: string; description?: string }",
10678
+ "description": "Parameter options"
10679
+ }
10680
+ },
10681
+ "required": [],
10682
+ "returns": "this"
10683
+ },
10684
+ "generateOpenAPISpec": {
10685
+ "description": "",
10686
+ "parameters": {
10687
+ "options": {
10688
+ "type": "{ title?: string; version?: string; description?: string }",
10689
+ "description": "Parameter options"
10690
+ }
10691
+ },
10692
+ "required": [],
10693
+ "returns": "Record<string, any>"
10694
+ }
10695
+ },
10696
+ "getters": {
10697
+ "express": {
10698
+ "description": "",
10699
+ "returns": "any"
10700
+ },
10701
+ "hooks": {
10702
+ "description": "",
10703
+ "returns": "any"
10704
+ },
10705
+ "app": {
10706
+ "description": "",
10707
+ "returns": "any"
10708
+ }
10709
+ },
10710
+ "events": {},
10711
+ "state": {},
10712
+ "options": {},
10713
+ "envVars": [],
10714
+ "examples": [
10715
+ {
10716
+ "language": "ts",
10717
+ "code": "const server = container.server('express', { cors: true, static: './public' })\nawait server.start({ port: 3000 })\n\n// Mount endpoints programmatically\nserver.mount(myEndpoint)\n\n// Access the underlying Express app\nserver.app.get('/health', (req, res) => res.json({ ok: true }))"
10718
+ }
10719
+ ]
10720
+ });
10721
+
10722
+ setBuildTimeData('servers.websocket', {
10723
+ "id": "servers.websocket",
10724
+ "description": "WebSocket server built on the `ws` library with optional JSON message framing. Manages WebSocket connections, tracks connected clients, and bridges messages to Luca's event bus. When `json` mode is enabled, incoming messages are automatically JSON-parsed (with `.toString()` for Buffer data) and outgoing messages via `send()` / `broadcast()` are JSON-stringified. When `json` mode is disabled, raw message data is emitted as-is and `send()` / `broadcast()` still JSON-stringify for safety.",
10725
+ "shortcut": "servers.websocket",
10726
+ "className": "WebsocketServer",
10727
+ "methods": {
10728
+ "broadcast": {
10729
+ "description": "",
10730
+ "parameters": {
10731
+ "message": {
10732
+ "type": "any",
10733
+ "description": "Parameter message"
10734
+ }
10735
+ },
10736
+ "required": [
10737
+ "message"
10738
+ ],
10739
+ "returns": "void"
10740
+ },
10741
+ "send": {
10742
+ "description": "",
10743
+ "parameters": {
10744
+ "ws": {
10745
+ "type": "any",
10746
+ "description": "Parameter ws"
10747
+ },
10748
+ "message": {
10749
+ "type": "any",
10750
+ "description": "Parameter message"
10751
+ }
10752
+ },
10753
+ "required": [
10754
+ "ws",
10755
+ "message"
10756
+ ],
10757
+ "returns": "void"
10758
+ },
10759
+ "start": {
10760
+ "description": "Start the WebSocket server. A runtime `port` overrides the constructor option and is written to state before the underlying `ws.Server` is created, so the server binds to the correct port.",
10761
+ "parameters": {
10762
+ "options": {
10763
+ "type": "StartOptions",
10764
+ "description": "Optional runtime overrides for port and host"
10765
+ }
10766
+ },
10767
+ "required": [],
10768
+ "returns": "void"
10769
+ },
10770
+ "stop": {
10771
+ "description": "",
10772
+ "parameters": {},
10773
+ "required": [],
10774
+ "returns": "void"
10775
+ }
10776
+ },
10777
+ "getters": {
10778
+ "wss": {
10779
+ "description": "",
10780
+ "returns": "any"
10781
+ },
10782
+ "port": {
10783
+ "description": "The port this server will bind to. Defaults to 8081 if not set via constructor options or start().",
10784
+ "returns": "any"
10785
+ }
10786
+ },
10787
+ "events": {
10788
+ "connection": {
10789
+ "name": "connection",
10790
+ "description": "Event emitted by WebsocketServer",
10791
+ "arguments": {}
10792
+ },
10793
+ "message": {
10794
+ "name": "message",
10795
+ "description": "Event emitted by WebsocketServer",
10796
+ "arguments": {}
10797
+ }
10798
+ },
10799
+ "state": {},
10800
+ "options": {},
10801
+ "envVars": [],
10802
+ "examples": [
10803
+ {
10804
+ "language": "ts",
10805
+ "code": "const ws = container.server('websocket', { json: true })\nawait ws.start({ port: 8080 })\n\nws.on('message', (data, client) => {\n console.log('Received:', data)\n ws.broadcast({ echo: data })\n})"
10806
+ }
10807
+ ]
10808
+ });
10809
+
10810
+ // Container introspection data
10811
+ setContainerBuildTimeData('Container', {
10812
+ "className": "Container",
10813
+ "description": "Containers are single objects that contain state, an event bus, and registries of helpers such as: - features - clients - servers A Helper represents a category of components in your program which have a common interface, e.g. all servers can be started / stopped, all features can be enabled, if supported, all clients can connect to something. A Helper can be introspected at runtime to learn about the interface of the helper. A helper has state, and emits events. You can design your own containers and load them up with the helpers you want for that environment.",
10814
+ "methods": {
10815
+ "subcontainer": {
10816
+ "description": "Creates a new subcontainer instance of the same concrete Container subclass. The new instance is constructed with the same options as this container, shallow-merged with any overrides you provide. This preserves the runtime container type (e.g. NodeContainer, BrowserContainer, etc.).",
10817
+ "parameters": {
10818
+ "this": {
10819
+ "type": "This",
10820
+ "description": "Parameter this"
10821
+ },
10822
+ "options": {
10823
+ "type": "ConstructorParameters<This['constructor']>[0]",
10824
+ "description": "Options to override for the new container instance."
10825
+ }
10826
+ },
10827
+ "required": [
10828
+ "this",
10829
+ "options"
10830
+ ],
10831
+ "returns": "This"
10832
+ },
10833
+ "addContext": {
10834
+ "description": "",
10835
+ "parameters": {
10836
+ "keyOrContext": {
10837
+ "type": "keyof ContainerContext | Partial<ContainerContext>",
10838
+ "description": "Parameter keyOrContext"
10839
+ },
10840
+ "value": {
10841
+ "type": "ContainerContext[keyof ContainerContext]",
10842
+ "description": "Parameter value"
10843
+ }
10844
+ },
10845
+ "required": [
10846
+ "keyOrContext"
10847
+ ],
10848
+ "returns": "this"
10849
+ },
10850
+ "setState": {
10851
+ "description": "Sets the state of the container.",
10852
+ "parameters": {
10853
+ "newState": {
10854
+ "type": "SetStateValue<ContainerState>",
10855
+ "description": "The new state of the container."
10856
+ }
10857
+ },
10858
+ "required": [
10859
10859
  "newState"
10860
10860
  ],
10861
10861
  "returns": "void"
@@ -20690,218 +20690,23 @@ export const introspectionData = [
20690
20690
  "arguments": {}
20691
20691
  },
20692
20692
  "close": {
20693
- "name": "close",
20694
- "description": "Event emitted by WebSocketClient",
20695
- "arguments": {}
20696
- },
20697
- "reconnecting": {
20698
- "name": "reconnecting",
20699
- "description": "Event emitted by WebSocketClient",
20700
- "arguments": {}
20701
- }
20702
- },
20703
- "state": {},
20704
- "options": {},
20705
- "envVars": [],
20706
- "examples": [
20707
- {
20708
- "language": "ts",
20709
- "code": "const ws = container.client('websocket', {\n baseURL: 'ws://localhost:8080',\n reconnect: true,\n maxReconnectAttempts: 5\n})\nws.on('message', (data) => console.log('Received:', data))\nawait ws.connect()\nawait ws.send({ type: 'hello' })"
20710
- }
20711
- ]
20712
- },
20713
- {
20714
- "id": "clients.supabase",
20715
- "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).",
20716
- "shortcut": "clients.supabase",
20717
- "className": "SupabaseClient",
20718
- "methods": {
20719
- "from": {
20720
- "description": "Start a query on a Postgres table or view.",
20721
- "parameters": {
20722
- "table": {
20723
- "type": "string",
20724
- "description": "The table or view name to query"
20725
- }
20726
- },
20727
- "required": [
20728
- "table"
20729
- ],
20730
- "returns": "void"
20731
- },
20732
- "rpc": {
20733
- "description": "Call a Postgres function (RPC).",
20734
- "parameters": {
20735
- "fn": {
20736
- "type": "string",
20737
- "description": "The function name"
20738
- },
20739
- "params": {
20740
- "type": "Record<string, unknown>",
20741
- "description": "Arguments to pass to the function"
20742
- },
20743
- "options": {
20744
- "type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
20745
- "description": "Optional settings (head, get, count)"
20746
- }
20747
- },
20748
- "required": [
20749
- "fn"
20750
- ],
20751
- "returns": "void"
20752
- },
20753
- "signInWithPassword": {
20754
- "description": "Sign in with email and password.",
20755
- "parameters": {
20756
- "email": {
20757
- "type": "string",
20758
- "description": "Parameter email"
20759
- },
20760
- "password": {
20761
- "type": "string",
20762
- "description": "Parameter password"
20763
- }
20764
- },
20765
- "required": [
20766
- "email",
20767
- "password"
20768
- ],
20769
- "returns": "void"
20770
- },
20771
- "signUp": {
20772
- "description": "Create a new user account with email and password.",
20773
- "parameters": {
20774
- "email": {
20775
- "type": "string",
20776
- "description": "Parameter email"
20777
- },
20778
- "password": {
20779
- "type": "string",
20780
- "description": "Parameter password"
20781
- }
20782
- },
20783
- "required": [
20784
- "email",
20785
- "password"
20786
- ],
20787
- "returns": "void"
20788
- },
20789
- "signOut": {
20790
- "description": "Sign the current user out.",
20791
- "parameters": {},
20792
- "required": [],
20793
- "returns": "void"
20794
- },
20795
- "getSession": {
20796
- "description": "Get the current session, if any.",
20797
- "parameters": {},
20798
- "required": [],
20799
- "returns": "void"
20800
- },
20801
- "getUser": {
20802
- "description": "Get the current user, if any.",
20803
- "parameters": {},
20804
- "required": [],
20805
- "returns": "void"
20806
- },
20807
- "invoke": {
20808
- "description": "Invoke a Supabase Edge Function by name.",
20809
- "parameters": {
20810
- "name": {
20811
- "type": "string",
20812
- "description": "Parameter name"
20813
- },
20814
- "body": {
20815
- "type": "any",
20816
- "description": "Parameter body"
20817
- }
20818
- },
20819
- "required": [
20820
- "name"
20821
- ],
20822
- "returns": "void"
20823
- },
20824
- "subscribe": {
20825
- "description": "Subscribe to realtime changes on a Postgres table.",
20826
- "parameters": {
20827
- "channelName": {
20828
- "type": "string",
20829
- "description": "A name for this subscription channel"
20830
- },
20831
- "table": {
20832
- "type": "string",
20833
- "description": "The table to listen to"
20834
- },
20835
- "callback": {
20836
- "type": "(payload: any) => void",
20837
- "description": "Called with the payload on each change"
20838
- },
20839
- "event": {
20840
- "type": "\"INSERT\" | \"UPDATE\" | \"DELETE\" | \"*\"",
20841
- "description": "The event type to listen for (default: all changes)"
20842
- }
20843
- },
20844
- "required": [
20845
- "channelName",
20846
- "table",
20847
- "callback"
20848
- ],
20849
- "returns": "RealtimeChannel"
20850
- },
20851
- "unsubscribe": {
20852
- "description": "Unsubscribe and remove a realtime channel by name.",
20853
- "parameters": {
20854
- "channelName": {
20855
- "type": "string",
20856
- "description": "The channel name to remove"
20857
- }
20858
- },
20859
- "required": [
20860
- "channelName"
20861
- ],
20862
- "returns": "void"
20863
- },
20864
- "unsubscribeAll": {
20865
- "description": "Unsubscribe and remove all realtime channels.",
20866
- "parameters": {},
20867
- "required": [],
20868
- "returns": "void"
20869
- },
20870
- "connect": {
20871
- "description": "Connect is a no-op since the Supabase SDK initializes on construction. The client is ready to use immediately after creation.",
20872
- "parameters": {},
20873
- "required": [],
20874
- "returns": "void"
20875
- },
20876
- "disconnect": {
20877
- "description": "Disconnect by signing out and removing all realtime channels.",
20878
- "parameters": {},
20879
- "required": [],
20880
- "returns": "void"
20881
- }
20882
- },
20883
- "getters": {
20884
- "sdk": {
20885
- "description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
20886
- "returns": "SupabaseSDKClient<any, any>"
20887
- },
20888
- "storage": {
20889
- "description": "Returns the Supabase Storage client for managing buckets and files.",
20890
- "returns": "any"
20693
+ "name": "close",
20694
+ "description": "Event emitted by WebSocketClient",
20695
+ "arguments": {}
20891
20696
  },
20892
- "functions": {
20893
- "description": "Returns the Supabase Functions client.",
20894
- "returns": "any"
20697
+ "reconnecting": {
20698
+ "name": "reconnecting",
20699
+ "description": "Event emitted by WebSocketClient",
20700
+ "arguments": {}
20895
20701
  }
20896
20702
  },
20897
- "events": {},
20898
20703
  "state": {},
20899
20704
  "options": {},
20900
20705
  "envVars": [],
20901
20706
  "examples": [
20902
20707
  {
20903
20708
  "language": "ts",
20904
- "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})"
20709
+ "code": "const ws = container.client('websocket', {\n baseURL: 'ws://localhost:8080',\n reconnect: true,\n maxReconnectAttempts: 5\n})\nws.on('message', (data) => console.log('Received:', data))\nawait ws.connect()\nawait ws.send({ type: 'hello' })"
20905
20710
  }
20906
20711
  ]
20907
20712
  },
@@ -21018,147 +20823,398 @@ export const introspectionData = [
21018
20823
  "createEmbedding": {
21019
20824
  "description": "Create text embeddings for semantic search or similarity comparisons.",
21020
20825
  "parameters": {
21021
- "input": {
21022
- "type": "string | string[]",
21023
- "description": "A string or array of strings to embed"
20826
+ "input": {
20827
+ "type": "string | string[]",
20828
+ "description": "A string or array of strings to embed"
20829
+ },
20830
+ "options": {
20831
+ "type": "Partial<OpenAI.Embeddings.EmbeddingCreateParams>",
20832
+ "description": "Additional parameters (model, etc.)"
20833
+ }
20834
+ },
20835
+ "required": [
20836
+ "input"
20837
+ ],
20838
+ "returns": "Promise<OpenAI.Embeddings.CreateEmbeddingResponse>",
20839
+ "examples": [
20840
+ {
20841
+ "language": "ts",
20842
+ "code": "const response = await openai.createEmbedding('Hello world')\nconsole.log(response.data[0].embedding.length)"
20843
+ }
20844
+ ]
20845
+ },
20846
+ "createImage": {
20847
+ "description": "Generate an image from a text prompt using DALL-E.",
20848
+ "parameters": {
20849
+ "prompt": {
20850
+ "type": "string",
20851
+ "description": "Description of the image to generate"
20852
+ },
20853
+ "options": {
20854
+ "type": "Partial<OpenAI.Images.ImageGenerateParams>",
20855
+ "description": "Additional parameters (size, n, etc.)"
20856
+ }
20857
+ },
20858
+ "required": [
20859
+ "prompt"
20860
+ ],
20861
+ "returns": "Promise<OpenAI.Images.ImagesResponse>",
20862
+ "examples": [
20863
+ {
20864
+ "language": "ts",
20865
+ "code": "const response = await openai.createImage('A sunset over mountains')\nconsole.log(response.data[0].url)"
20866
+ }
20867
+ ]
20868
+ },
20869
+ "listModels": {
20870
+ "description": "List all available models.",
20871
+ "parameters": {},
20872
+ "required": [],
20873
+ "returns": "Promise<OpenAI.Models.ModelsPage>",
20874
+ "examples": [
20875
+ {
20876
+ "language": "ts",
20877
+ "code": "const models = await openai.listModels()"
20878
+ }
20879
+ ]
20880
+ },
20881
+ "ask": {
20882
+ "description": "Ask a single question and get a text response. Convenience wrapper around `createChatCompletion` for simple Q&A.",
20883
+ "parameters": {
20884
+ "question": {
20885
+ "type": "string",
20886
+ "description": "The question to ask"
20887
+ },
20888
+ "options": {
20889
+ "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
20890
+ "description": "Additional completion parameters"
20891
+ }
20892
+ },
20893
+ "required": [
20894
+ "question"
20895
+ ],
20896
+ "returns": "Promise<string>",
20897
+ "examples": [
20898
+ {
20899
+ "language": "ts",
20900
+ "code": "const answer = await openai.ask('What is 2 + 2?')\nconsole.log(answer) // '4'"
20901
+ }
20902
+ ]
20903
+ },
20904
+ "chat": {
20905
+ "description": "Send a multi-turn conversation and get a text response. Convenience wrapper around `createChatCompletion` that returns just the text.",
20906
+ "parameters": {
20907
+ "messages": {
20908
+ "type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
20909
+ "description": "Array of chat messages"
20910
+ },
20911
+ "options": {
20912
+ "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
20913
+ "description": "Additional completion parameters"
20914
+ }
20915
+ },
20916
+ "required": [
20917
+ "messages"
20918
+ ],
20919
+ "returns": "Promise<string>",
20920
+ "examples": [
20921
+ {
20922
+ "language": "ts",
20923
+ "code": "const reply = await openai.chat([\n { role: 'system', content: 'You are a pirate.' },\n { role: 'user', content: 'Hello!' }\n])"
20924
+ }
20925
+ ]
20926
+ }
20927
+ },
20928
+ "getters": {
20929
+ "defaultModel": {
20930
+ "description": "The default model used for completions, from options or 'gpt-4o'.",
20931
+ "returns": "string"
20932
+ },
20933
+ "raw": {
20934
+ "description": "The underlying OpenAI SDK instance for advanced use cases.",
20935
+ "returns": "OpenAI"
20936
+ }
20937
+ },
20938
+ "events": {
20939
+ "connected": {
20940
+ "name": "connected",
20941
+ "description": "Event emitted by OpenAIClient",
20942
+ "arguments": {}
20943
+ },
20944
+ "failure": {
20945
+ "name": "failure",
20946
+ "description": "Event emitted by OpenAIClient",
20947
+ "arguments": {}
20948
+ },
20949
+ "completion": {
20950
+ "name": "completion",
20951
+ "description": "Event emitted by OpenAIClient",
20952
+ "arguments": {}
20953
+ },
20954
+ "embedding": {
20955
+ "name": "embedding",
20956
+ "description": "Event emitted by OpenAIClient",
20957
+ "arguments": {}
20958
+ },
20959
+ "image": {
20960
+ "name": "image",
20961
+ "description": "Event emitted by OpenAIClient",
20962
+ "arguments": {}
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"
21024
21072
  },
21025
- "options": {
21026
- "type": "Partial<OpenAI.Embeddings.EmbeddingCreateParams>",
21027
- "description": "Additional parameters (model, etc.)"
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)"
21028
21080
  }
21029
21081
  },
21030
21082
  "required": [
21031
- "input"
21083
+ "file",
21084
+ "filename"
21032
21085
  ],
21033
- "returns": "Promise<OpenAI.Embeddings.CreateEmbeddingResponse>",
21034
- "examples": [
21035
- {
21036
- "language": "ts",
21037
- "code": "const response = await openai.createEmbedding('Hello world')\nconsole.log(response.data[0].embedding.length)"
21038
- }
21039
- ]
21086
+ "returns": "Promise<any>"
21040
21087
  },
21041
- "createImage": {
21042
- "description": "Generate an image from a text prompt using DALL-E.",
21088
+ "viewImage": {
21089
+ "description": "Download a generated image from ComfyUI as a Buffer.",
21043
21090
  "parameters": {
21044
- "prompt": {
21091
+ "filename": {
21045
21092
  "type": "string",
21046
- "description": "Description of the image to generate"
21093
+ "description": "The image filename"
21047
21094
  },
21048
- "options": {
21049
- "type": "Partial<OpenAI.Images.ImageGenerateParams>",
21050
- "description": "Additional parameters (size, n, etc.)"
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')"
21051
21102
  }
21052
21103
  },
21053
21104
  "required": [
21054
- "prompt"
21105
+ "filename"
21055
21106
  ],
21056
- "returns": "Promise<OpenAI.Images.ImagesResponse>",
21057
- "examples": [
21058
- {
21059
- "language": "ts",
21060
- "code": "const response = await openai.createImage('A sunset over mountains')\nconsole.log(response.data[0].url)"
21061
- }
21062
- ]
21107
+ "returns": "Promise<Buffer>"
21063
21108
  },
21064
- "listModels": {
21065
- "description": "List all available models.",
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`.",
21066
21111
  "parameters": {},
21067
21112
  "required": [],
21068
- "returns": "Promise<OpenAI.Models.ModelsPage>",
21069
- "examples": [
21070
- {
21071
- "language": "ts",
21072
- "code": "const models = await openai.listModels()"
21073
- }
21074
- ]
21113
+ "returns": "Promise<void>"
21075
21114
  },
21076
- "ask": {
21077
- "description": "Ask a single question and get a text response. Convenience wrapper around `createChatCompletion` for simple Q&A.",
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.",
21078
21123
  "parameters": {
21079
- "question": {
21080
- "type": "string",
21081
- "description": "The question to ask"
21082
- },
21083
- "options": {
21084
- "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
21085
- "description": "Additional completion parameters"
21124
+ "workflow": {
21125
+ "type": "Record<string, any>",
21126
+ "description": "Parameter workflow"
21086
21127
  }
21087
21128
  },
21088
21129
  "required": [
21089
- "question"
21130
+ "workflow"
21090
21131
  ],
21091
- "returns": "Promise<string>",
21092
- "examples": [
21093
- {
21094
- "language": "ts",
21095
- "code": "const answer = await openai.ask('What is 2 + 2?')\nconsole.log(answer) // '4'"
21096
- }
21097
- ]
21132
+ "returns": "Promise<Record<string, any>>"
21098
21133
  },
21099
- "chat": {
21100
- "description": "Send a multi-turn conversation and get a text response. Convenience wrapper around `createChatCompletion` that returns just the text.",
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' } } ```",
21101
21136
  "parameters": {
21102
- "messages": {
21103
- "type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
21104
- "description": "Array of chat messages"
21137
+ "workflow": {
21138
+ "type": "Record<string, any>",
21139
+ "description": "Parameter workflow"
21140
+ },
21141
+ "inputs": {
21142
+ "type": "Record<string, any>",
21143
+ "description": "Parameter inputs"
21105
21144
  },
21106
21145
  "options": {
21107
- "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
21108
- "description": "Additional completion parameters"
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
+ }
21109
21166
  }
21110
21167
  },
21111
21168
  "required": [
21112
- "messages"
21169
+ "workflow"
21113
21170
  ],
21114
- "returns": "Promise<string>",
21115
- "examples": [
21116
- {
21117
- "language": "ts",
21118
- "code": "const reply = await openai.chat([\n { role: 'system', content: 'You are a pirate.' },\n { role: 'user', content: 'Hello!' }\n])"
21119
- }
21120
- ]
21171
+ "returns": "Promise<WorkflowResult>"
21121
21172
  }
21122
21173
  },
21123
21174
  "getters": {
21124
- "defaultModel": {
21125
- "description": "The default model used for completions, from options or 'gpt-4o'.",
21175
+ "clientId": {
21176
+ "description": "The unique client ID used for WebSocket session tracking.",
21126
21177
  "returns": "string"
21127
21178
  },
21128
- "raw": {
21129
- "description": "The underlying OpenAI SDK instance for advanced use cases.",
21130
- "returns": "OpenAI"
21179
+ "wsURL": {
21180
+ "description": "The WebSocket URL derived from baseURL or overridden via options.",
21181
+ "returns": "string"
21131
21182
  }
21132
21183
  },
21133
21184
  "events": {
21134
- "connected": {
21135
- "name": "connected",
21136
- "description": "Event emitted by OpenAIClient",
21185
+ "execution_start": {
21186
+ "name": "execution_start",
21187
+ "description": "Event emitted by ComfyUIClient",
21137
21188
  "arguments": {}
21138
21189
  },
21139
- "failure": {
21140
- "name": "failure",
21141
- "description": "Event emitted by OpenAIClient",
21190
+ "execution_complete": {
21191
+ "name": "execution_complete",
21192
+ "description": "Event emitted by ComfyUIClient",
21142
21193
  "arguments": {}
21143
21194
  },
21144
- "completion": {
21145
- "name": "completion",
21146
- "description": "Event emitted by OpenAIClient",
21195
+ "executing": {
21196
+ "name": "executing",
21197
+ "description": "Event emitted by ComfyUIClient",
21147
21198
  "arguments": {}
21148
21199
  },
21149
- "embedding": {
21150
- "name": "embedding",
21151
- "description": "Event emitted by OpenAIClient",
21200
+ "progress": {
21201
+ "name": "progress",
21202
+ "description": "Event emitted by ComfyUIClient",
21152
21203
  "arguments": {}
21153
21204
  },
21154
- "image": {
21155
- "name": "image",
21156
- "description": "Event emitted by OpenAIClient",
21205
+ "executed": {
21206
+ "name": "executed",
21207
+ "description": "Event emitted by ComfyUIClient",
21157
21208
  "arguments": {}
21158
21209
  },
21159
- "models": {
21160
- "name": "models",
21161
- "description": "Event emitted by OpenAIClient",
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",
21162
21218
  "arguments": {}
21163
21219
  }
21164
21220
  },
@@ -21168,7 +21224,7 @@ export const introspectionData = [
21168
21224
  "examples": [
21169
21225
  {
21170
21226
  "language": "ts",
21171
- "code": "const openai = container.client('openai', { defaultModel: 'gpt-4o' })\nconst answer = await openai.ask('What is the meaning of life?')\nconsole.log(answer)"
21227
+ "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)"
21172
21228
  }
21173
21229
  ]
21174
21230
  },
@@ -21374,253 +21430,197 @@ export const introspectionData = [
21374
21430
  ]
21375
21431
  },
21376
21432
  {
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",
21433
+ "id": "clients.supabase",
21434
+ "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).",
21435
+ "shortcut": "clients.supabase",
21436
+ "className": "SupabaseClient",
21381
21437
  "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.",
21438
+ "from": {
21439
+ "description": "Start a query on a Postgres table or view.",
21430
21440
  "parameters": {
21431
- "nodeClass": {
21441
+ "table": {
21432
21442
  "type": "string",
21433
- "description": "If provided, returns info for this node type only"
21443
+ "description": "The table or view name to query"
21434
21444
  }
21435
21445
  },
21436
- "required": [],
21437
- "returns": "Promise<any>"
21438
- },
21439
- "interrupt": {
21440
- "description": "Interrupt the currently executing prompt.",
21441
- "parameters": {},
21442
- "required": [],
21443
- "returns": "Promise<void>"
21446
+ "required": [
21447
+ "table"
21448
+ ],
21449
+ "returns": "void"
21444
21450
  },
21445
- "getModels": {
21446
- "description": "List available models, optionally filtered by type.",
21451
+ "rpc": {
21452
+ "description": "Call a Postgres function (RPC).",
21447
21453
  "parameters": {
21448
- "type": {
21454
+ "fn": {
21449
21455
  "type": "string",
21450
- "description": "Model type filter (e.g., 'checkpoints', 'loras')"
21456
+ "description": "The function name"
21457
+ },
21458
+ "params": {
21459
+ "type": "Record<string, unknown>",
21460
+ "description": "Arguments to pass to the function"
21461
+ },
21462
+ "options": {
21463
+ "type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
21464
+ "description": "Optional settings (head, get, count)"
21451
21465
  }
21452
21466
  },
21453
- "required": [],
21454
- "returns": "Promise<string[]>"
21455
- },
21456
- "getEmbeddings": {
21457
- "description": "List available embedding models.",
21458
- "parameters": {},
21459
- "required": [],
21460
- "returns": "Promise<string[]>"
21467
+ "required": [
21468
+ "fn"
21469
+ ],
21470
+ "returns": "void"
21461
21471
  },
21462
- "uploadImage": {
21463
- "description": "Upload an image to ComfyUI's input directory.",
21472
+ "signInWithPassword": {
21473
+ "description": "Sign in with email and password.",
21464
21474
  "parameters": {
21465
- "file": {
21466
- "type": "Buffer | Blob",
21467
- "description": "The image data as Buffer or Blob"
21468
- },
21469
- "filename": {
21475
+ "email": {
21470
21476
  "type": "string",
21471
- "description": "File name for the upload"
21477
+ "description": "Parameter email"
21472
21478
  },
21473
- "opts": {
21474
- "type": "{ subfolder?: string; type?: string; overwrite?: boolean }",
21475
- "description": "Upload options (subfolder, type, overwrite)"
21479
+ "password": {
21480
+ "type": "string",
21481
+ "description": "Parameter password"
21476
21482
  }
21477
21483
  },
21478
21484
  "required": [
21479
- "file",
21480
- "filename"
21485
+ "email",
21486
+ "password"
21481
21487
  ],
21482
- "returns": "Promise<any>"
21488
+ "returns": "void"
21483
21489
  },
21484
- "viewImage": {
21485
- "description": "Download a generated image from ComfyUI as a Buffer.",
21490
+ "signUp": {
21491
+ "description": "Create a new user account with email and password.",
21486
21492
  "parameters": {
21487
- "filename": {
21493
+ "email": {
21488
21494
  "type": "string",
21489
- "description": "The image filename"
21490
- },
21491
- "subfolder": {
21492
- "type": "any",
21493
- "description": "Subfolder within the output directory"
21495
+ "description": "Parameter email"
21494
21496
  },
21495
- "type": {
21496
- "type": "any",
21497
- "description": "Image type ('output', 'input', 'temp')"
21497
+ "password": {
21498
+ "type": "string",
21499
+ "description": "Parameter password"
21498
21500
  }
21499
21501
  },
21500
21502
  "required": [
21501
- "filename"
21503
+ "email",
21504
+ "password"
21502
21505
  ],
21503
- "returns": "Promise<Buffer>"
21506
+ "returns": "void"
21504
21507
  },
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`.",
21508
+ "signOut": {
21509
+ "description": "Sign the current user out.",
21507
21510
  "parameters": {},
21508
21511
  "required": [],
21509
- "returns": "Promise<void>"
21512
+ "returns": "void"
21510
21513
  },
21511
- "disconnectWs": {
21512
- "description": "Close the WebSocket connection.",
21514
+ "getSession": {
21515
+ "description": "Get the current session, if any.",
21513
21516
  "parameters": {},
21514
21517
  "required": [],
21515
21518
  "returns": "void"
21516
21519
  },
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.",
21520
+ "getUser": {
21521
+ "description": "Get the current user, if any.",
21522
+ "parameters": {},
21523
+ "required": [],
21524
+ "returns": "void"
21525
+ },
21526
+ "invoke": {
21527
+ "description": "Invoke a Supabase Edge Function by name.",
21519
21528
  "parameters": {
21520
- "workflow": {
21521
- "type": "Record<string, any>",
21522
- "description": "Parameter workflow"
21529
+ "name": {
21530
+ "type": "string",
21531
+ "description": "Parameter name"
21532
+ },
21533
+ "body": {
21534
+ "type": "any",
21535
+ "description": "Parameter body"
21523
21536
  }
21524
21537
  },
21525
21538
  "required": [
21526
- "workflow"
21539
+ "name"
21527
21540
  ],
21528
- "returns": "Promise<Record<string, any>>"
21541
+ "returns": "void"
21529
21542
  },
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' } } ```",
21543
+ "subscribe": {
21544
+ "description": "Subscribe to realtime changes on a Postgres table.",
21532
21545
  "parameters": {
21533
- "workflow": {
21534
- "type": "Record<string, any>",
21535
- "description": "Parameter workflow"
21546
+ "channelName": {
21547
+ "type": "string",
21548
+ "description": "A name for this subscription channel"
21536
21549
  },
21537
- "inputs": {
21538
- "type": "Record<string, any>",
21539
- "description": "Parameter inputs"
21550
+ "table": {
21551
+ "type": "string",
21552
+ "description": "The table to listen to"
21540
21553
  },
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
- }
21554
+ "callback": {
21555
+ "type": "(payload: any) => void",
21556
+ "description": "Called with the payload on each change"
21557
+ },
21558
+ "event": {
21559
+ "type": "\"INSERT\" | \"UPDATE\" | \"DELETE\" | \"*\"",
21560
+ "description": "The event type to listen for (default: all changes)"
21562
21561
  }
21563
21562
  },
21564
21563
  "required": [
21565
- "workflow"
21564
+ "channelName",
21565
+ "table",
21566
+ "callback"
21566
21567
  ],
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": {}
21568
+ "returns": "RealtimeChannel"
21585
21569
  },
21586
- "execution_complete": {
21587
- "name": "execution_complete",
21588
- "description": "Event emitted by ComfyUIClient",
21589
- "arguments": {}
21570
+ "unsubscribe": {
21571
+ "description": "Unsubscribe and remove a realtime channel by name.",
21572
+ "parameters": {
21573
+ "channelName": {
21574
+ "type": "string",
21575
+ "description": "The channel name to remove"
21576
+ }
21577
+ },
21578
+ "required": [
21579
+ "channelName"
21580
+ ],
21581
+ "returns": "void"
21590
21582
  },
21591
- "executing": {
21592
- "name": "executing",
21593
- "description": "Event emitted by ComfyUIClient",
21594
- "arguments": {}
21583
+ "unsubscribeAll": {
21584
+ "description": "Unsubscribe and remove all realtime channels.",
21585
+ "parameters": {},
21586
+ "required": [],
21587
+ "returns": "void"
21595
21588
  },
21596
- "progress": {
21597
- "name": "progress",
21598
- "description": "Event emitted by ComfyUIClient",
21599
- "arguments": {}
21589
+ "connect": {
21590
+ "description": "Connect is a no-op since the Supabase SDK initializes on construction. The client is ready to use immediately after creation.",
21591
+ "parameters": {},
21592
+ "required": [],
21593
+ "returns": "void"
21600
21594
  },
21601
- "executed": {
21602
- "name": "executed",
21603
- "description": "Event emitted by ComfyUIClient",
21604
- "arguments": {}
21595
+ "disconnect": {
21596
+ "description": "Disconnect by signing out and removing all realtime channels.",
21597
+ "parameters": {},
21598
+ "required": [],
21599
+ "returns": "void"
21600
+ }
21601
+ },
21602
+ "getters": {
21603
+ "sdk": {
21604
+ "description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
21605
+ "returns": "SupabaseSDKClient<any, any>"
21605
21606
  },
21606
- "execution_cached": {
21607
- "name": "execution_cached",
21608
- "description": "Event emitted by ComfyUIClient",
21609
- "arguments": {}
21607
+ "storage": {
21608
+ "description": "Returns the Supabase Storage client for managing buckets and files.",
21609
+ "returns": "any"
21610
21610
  },
21611
- "execution_error": {
21612
- "name": "execution_error",
21613
- "description": "Event emitted by ComfyUIClient",
21614
- "arguments": {}
21611
+ "functions": {
21612
+ "description": "Returns the Supabase Functions client.",
21613
+ "returns": "any"
21615
21614
  }
21616
21615
  },
21616
+ "events": {},
21617
21617
  "state": {},
21618
21618
  "options": {},
21619
21619
  "envVars": [],
21620
21620
  "examples": [
21621
21621
  {
21622
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)"
21623
+ "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})"
21624
21624
  }
21625
21625
  ]
21626
21626
  },