@soederpop/luca 0.0.20 → 0.0.22

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-21T01:13:42.264Z
4
+ // Generated at: 2026-03-21T15:48:33.144Z
5
5
 
6
6
  setBuildTimeData('features.googleDocs', {
7
7
  "id": "features.googleDocs",
@@ -3270,6 +3270,174 @@ setBuildTimeData('features.repl', {
3270
3270
  ]
3271
3271
  });
3272
3272
 
3273
+ setBuildTimeData('features.googleMail', {
3274
+ "id": "features.googleMail",
3275
+ "description": "Google Mail feature for searching, reading, and watching Gmail messages. Depends on the googleAuth feature for authentication. Creates a Gmail v1 API client lazily. Supports Gmail search query syntax, individual message reading, and polling-based new mail detection with event emission.",
3276
+ "shortcut": "features.googleMail",
3277
+ "className": "GoogleMail",
3278
+ "methods": {
3279
+ "search": {
3280
+ "description": "Search for messages using Gmail query syntax and/or structured filters.",
3281
+ "parameters": {
3282
+ "options": {
3283
+ "type": "SearchMailOptions",
3284
+ "description": "Search filters including query, from, to, subject, date ranges",
3285
+ "properties": {
3286
+ "query": {
3287
+ "type": "string",
3288
+ "description": ""
3289
+ },
3290
+ "from": {
3291
+ "type": "string",
3292
+ "description": ""
3293
+ },
3294
+ "to": {
3295
+ "type": "string",
3296
+ "description": ""
3297
+ },
3298
+ "subject": {
3299
+ "type": "string",
3300
+ "description": ""
3301
+ },
3302
+ "after": {
3303
+ "type": "string",
3304
+ "description": ""
3305
+ },
3306
+ "before": {
3307
+ "type": "string",
3308
+ "description": ""
3309
+ },
3310
+ "hasAttachment": {
3311
+ "type": "boolean",
3312
+ "description": ""
3313
+ },
3314
+ "label": {
3315
+ "type": "string",
3316
+ "description": ""
3317
+ },
3318
+ "isUnread": {
3319
+ "type": "boolean",
3320
+ "description": ""
3321
+ },
3322
+ "maxResults": {
3323
+ "type": "number",
3324
+ "description": ""
3325
+ },
3326
+ "pageToken": {
3327
+ "type": "string",
3328
+ "description": ""
3329
+ }
3330
+ }
3331
+ }
3332
+ },
3333
+ "required": [],
3334
+ "returns": "Promise<MailMessageList>"
3335
+ },
3336
+ "getMessage": {
3337
+ "description": "Get a single message by ID.",
3338
+ "parameters": {
3339
+ "messageId": {
3340
+ "type": "string",
3341
+ "description": "The message ID"
3342
+ },
3343
+ "format": {
3344
+ "type": "'full' | 'metadata' | 'minimal' | 'raw'",
3345
+ "description": "Message format (defaults to options.format or 'full')"
3346
+ }
3347
+ },
3348
+ "required": [
3349
+ "messageId"
3350
+ ],
3351
+ "returns": "Promise<MailMessage>"
3352
+ },
3353
+ "getThread": {
3354
+ "description": "Get a full thread with all its messages.",
3355
+ "parameters": {
3356
+ "threadId": {
3357
+ "type": "string",
3358
+ "description": "The thread ID"
3359
+ }
3360
+ },
3361
+ "required": [
3362
+ "threadId"
3363
+ ],
3364
+ "returns": "Promise<MailThread>"
3365
+ },
3366
+ "listLabels": {
3367
+ "description": "List all labels for the authenticated user.",
3368
+ "parameters": {},
3369
+ "required": [],
3370
+ "returns": "Promise<MailLabel[]>"
3371
+ },
3372
+ "startWatching": {
3373
+ "description": "Start watching for new mail by polling at a regular interval. Emits 'newMail' events with an array of new messages when they arrive. Uses Gmail history API to efficiently detect only new messages since the last check.",
3374
+ "parameters": {},
3375
+ "required": [],
3376
+ "returns": "Promise<void>"
3377
+ },
3378
+ "stopWatching": {
3379
+ "description": "Stop watching for new mail.",
3380
+ "parameters": {},
3381
+ "required": [],
3382
+ "returns": "void"
3383
+ }
3384
+ },
3385
+ "getters": {
3386
+ "auth": {
3387
+ "description": "Access the google-auth feature lazily.",
3388
+ "returns": "GoogleAuth"
3389
+ },
3390
+ "userId": {
3391
+ "description": "Default user ID from options or 'me'.",
3392
+ "returns": "string"
3393
+ },
3394
+ "defaultFormat": {
3395
+ "description": "Default message format from options or 'full'.",
3396
+ "returns": "'full' | 'metadata' | 'minimal' | 'raw'"
3397
+ },
3398
+ "pollInterval": {
3399
+ "description": "Polling interval from options or 30 seconds.",
3400
+ "returns": "number"
3401
+ }
3402
+ },
3403
+ "events": {
3404
+ "messagesFetched": {
3405
+ "name": "messagesFetched",
3406
+ "description": "Event emitted by GoogleMail",
3407
+ "arguments": {}
3408
+ },
3409
+ "error": {
3410
+ "name": "error",
3411
+ "description": "Event emitted by GoogleMail",
3412
+ "arguments": {}
3413
+ },
3414
+ "watchStarted": {
3415
+ "name": "watchStarted",
3416
+ "description": "Event emitted by GoogleMail",
3417
+ "arguments": {}
3418
+ },
3419
+ "watchStopped": {
3420
+ "name": "watchStopped",
3421
+ "description": "Event emitted by GoogleMail",
3422
+ "arguments": {}
3423
+ },
3424
+ "newMail": {
3425
+ "name": "newMail",
3426
+ "description": "Event emitted by GoogleMail",
3427
+ "arguments": {}
3428
+ }
3429
+ },
3430
+ "state": {},
3431
+ "options": {},
3432
+ "envVars": [],
3433
+ "examples": [
3434
+ {
3435
+ "language": "ts",
3436
+ "code": "const mail = container.feature('googleMail')\n\n// Search by sender\nconst fromBoss = await mail.search({ from: 'boss@company.com' })\n\n// Use Gmail query string\nconst unread = await mail.search({ query: 'is:unread category:primary' })\n\n// Read a specific message\nconst msg = await mail.getMessage('message-id-here')\n\n// Get a full thread\nconst thread = await mail.getThread('thread-id-here')\n\n// List labels\nconst labels = await mail.listLabels()\n\n// Watch for new mail (polls and emits 'newMail' events)\nmail.on('newMail', (messages) => {\n console.log(`Got ${messages.length} new messages!`)\n})\nawait mail.startWatching()\n\n// Stop watching\nmail.stopWatching()"
3437
+ }
3438
+ ]
3439
+ });
3440
+
3273
3441
  setBuildTimeData('features.os', {
3274
3442
  "id": "features.os",
3275
3443
  "description": "The OS feature provides access to operating system utilities and information. This feature wraps Node.js's built-in `os` module and provides convenient getters for system information like architecture, platform, directories, network interfaces, and hardware details.",
@@ -9519,135 +9687,331 @@ setBuildTimeData('clients.websocket', {
9519
9687
  ]
9520
9688
  });
9521
9689
 
9522
- setBuildTimeData('clients.openai', {
9523
- "id": "clients.openai",
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.",
9525
- "shortcut": "clients.openai",
9526
- "className": "OpenAIClient",
9690
+ setBuildTimeData('clients.supabase', {
9691
+ "id": "clients.supabase",
9692
+ "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).",
9693
+ "shortcut": "clients.supabase",
9694
+ "className": "SupabaseClient",
9527
9695
  "methods": {
9528
- "connect": {
9529
- "description": "Test the API connection by listing models.",
9530
- "parameters": {},
9531
- "required": [],
9532
- "returns": "Promise<this>",
9533
- "examples": [
9534
- {
9535
- "language": "ts",
9536
- "code": "await openai.connect()"
9537
- }
9538
- ]
9539
- },
9540
- "createChatCompletion": {
9541
- "description": "Create a chat completion using the Chat Completions API.",
9696
+ "from": {
9697
+ "description": "Start a query on a Postgres table or view.",
9542
9698
  "parameters": {
9543
- "messages": {
9544
- "type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
9545
- "description": "Array of chat messages"
9546
- },
9547
- "options": {
9548
- "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
9549
- "description": "Additional parameters for the completion"
9699
+ "table": {
9700
+ "type": "string",
9701
+ "description": "The table or view name to query"
9550
9702
  }
9551
9703
  },
9552
9704
  "required": [
9553
- "messages"
9705
+ "table"
9554
9706
  ],
9555
- "returns": "Promise<OpenAI.Chat.Completions.ChatCompletion>",
9556
- "examples": [
9557
- {
9558
- "language": "ts",
9559
- "code": "const response = await openai.createChatCompletion([\n { role: 'system', content: 'You are a helpful assistant.' },\n { role: 'user', content: 'Hello!' }\n])\nconsole.log(response.choices[0]?.message?.content)"
9560
- }
9561
- ]
9707
+ "returns": "void"
9562
9708
  },
9563
- "createResponse": {
9564
- "description": "Create a response using the Responses API.",
9709
+ "rpc": {
9710
+ "description": "Call a Postgres function (RPC).",
9565
9711
  "parameters": {
9566
- "input": {
9567
- "type": "OpenAI.Responses.ResponseInput | string",
9568
- "description": "The input prompt or message array"
9712
+ "fn": {
9713
+ "type": "string",
9714
+ "description": "The function name"
9569
9715
  },
9570
- "options": {
9571
- "type": "Partial<OpenAI.Responses.ResponseCreateParamsNonStreaming>",
9572
- "description": "Additional parameters for the response"
9573
- }
9574
- },
9575
- "required": [
9576
- "input"
9577
- ],
9578
- "returns": "Promise<OpenAI.Responses.Response>",
9579
- "examples": [
9580
- {
9581
- "language": "ts",
9582
- "code": "const response = await openai.createResponse('Explain quantum computing')"
9583
- }
9584
- ]
9585
- },
9586
- "streamResponse": {
9587
- "description": "Stream a response using the Responses API.",
9588
- "parameters": {
9589
- "input": {
9590
- "type": "OpenAI.Responses.ResponseInput | string",
9591
- "description": "The input prompt or message array"
9716
+ "params": {
9717
+ "type": "Record<string, unknown>",
9718
+ "description": "Arguments to pass to the function"
9592
9719
  },
9593
9720
  "options": {
9594
- "type": "Partial<OpenAI.Responses.ResponseCreateParamsStreaming>",
9595
- "description": "Additional parameters for the streaming response"
9721
+ "type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
9722
+ "description": "Optional settings (head, get, count)"
9596
9723
  }
9597
9724
  },
9598
9725
  "required": [
9599
- "input"
9726
+ "fn"
9600
9727
  ],
9601
- "returns": "Promise<AsyncIterable<OpenAI.Responses.ResponseStreamEvent>>",
9602
- "examples": [
9603
- {
9604
- "language": "ts",
9605
- "code": "const stream = await openai.streamResponse('Write a poem')\nfor await (const event of stream) {\n if (event.type === 'response.output_text.delta') {\n process.stdout.write(event.delta)\n }\n}"
9606
- }
9607
- ]
9728
+ "returns": "void"
9608
9729
  },
9609
- "createCompletion": {
9610
- "description": "Create a legacy text completion.",
9730
+ "signInWithPassword": {
9731
+ "description": "Sign in with email and password.",
9611
9732
  "parameters": {
9612
- "prompt": {
9733
+ "email": {
9613
9734
  "type": "string",
9614
- "description": "The text prompt to complete"
9735
+ "description": "Parameter email"
9615
9736
  },
9616
- "options": {
9617
- "type": "Partial<OpenAI.Completions.CompletionCreateParams>",
9618
- "description": "Additional parameters for the completion"
9737
+ "password": {
9738
+ "type": "string",
9739
+ "description": "Parameter password"
9619
9740
  }
9620
9741
  },
9621
9742
  "required": [
9622
- "prompt"
9743
+ "email",
9744
+ "password"
9623
9745
  ],
9624
- "returns": "Promise<OpenAI.Completions.Completion>",
9625
- "examples": [
9626
- {
9627
- "language": "ts",
9628
- "code": "const response = await openai.createCompletion('Once upon a time')"
9629
- }
9630
- ]
9746
+ "returns": "void"
9631
9747
  },
9632
- "createEmbedding": {
9633
- "description": "Create text embeddings for semantic search or similarity comparisons.",
9748
+ "signUp": {
9749
+ "description": "Create a new user account with email and password.",
9634
9750
  "parameters": {
9635
- "input": {
9636
- "type": "string | string[]",
9637
- "description": "A string or array of strings to embed"
9751
+ "email": {
9752
+ "type": "string",
9753
+ "description": "Parameter email"
9638
9754
  },
9639
- "options": {
9640
- "type": "Partial<OpenAI.Embeddings.EmbeddingCreateParams>",
9641
- "description": "Additional parameters (model, etc.)"
9755
+ "password": {
9756
+ "type": "string",
9757
+ "description": "Parameter password"
9642
9758
  }
9643
9759
  },
9644
9760
  "required": [
9645
- "input"
9761
+ "email",
9762
+ "password"
9646
9763
  ],
9647
- "returns": "Promise<OpenAI.Embeddings.CreateEmbeddingResponse>",
9648
- "examples": [
9649
- {
9650
- "language": "ts",
9764
+ "returns": "void"
9765
+ },
9766
+ "signOut": {
9767
+ "description": "Sign the current user out.",
9768
+ "parameters": {},
9769
+ "required": [],
9770
+ "returns": "void"
9771
+ },
9772
+ "getSession": {
9773
+ "description": "Get the current session, if any.",
9774
+ "parameters": {},
9775
+ "required": [],
9776
+ "returns": "void"
9777
+ },
9778
+ "getUser": {
9779
+ "description": "Get the current user, if any.",
9780
+ "parameters": {},
9781
+ "required": [],
9782
+ "returns": "void"
9783
+ },
9784
+ "invoke": {
9785
+ "description": "Invoke a Supabase Edge Function by name.",
9786
+ "parameters": {
9787
+ "name": {
9788
+ "type": "string",
9789
+ "description": "Parameter name"
9790
+ },
9791
+ "body": {
9792
+ "type": "any",
9793
+ "description": "Parameter body"
9794
+ }
9795
+ },
9796
+ "required": [
9797
+ "name"
9798
+ ],
9799
+ "returns": "void"
9800
+ },
9801
+ "subscribe": {
9802
+ "description": "Subscribe to realtime changes on a Postgres table.",
9803
+ "parameters": {
9804
+ "channelName": {
9805
+ "type": "string",
9806
+ "description": "A name for this subscription channel"
9807
+ },
9808
+ "table": {
9809
+ "type": "string",
9810
+ "description": "The table to listen to"
9811
+ },
9812
+ "callback": {
9813
+ "type": "(payload: any) => void",
9814
+ "description": "Called with the payload on each change"
9815
+ },
9816
+ "event": {
9817
+ "type": "\"INSERT\" | \"UPDATE\" | \"DELETE\" | \"*\"",
9818
+ "description": "The event type to listen for (default: all changes)"
9819
+ }
9820
+ },
9821
+ "required": [
9822
+ "channelName",
9823
+ "table",
9824
+ "callback"
9825
+ ],
9826
+ "returns": "RealtimeChannel"
9827
+ },
9828
+ "unsubscribe": {
9829
+ "description": "Unsubscribe and remove a realtime channel by name.",
9830
+ "parameters": {
9831
+ "channelName": {
9832
+ "type": "string",
9833
+ "description": "The channel name to remove"
9834
+ }
9835
+ },
9836
+ "required": [
9837
+ "channelName"
9838
+ ],
9839
+ "returns": "void"
9840
+ },
9841
+ "unsubscribeAll": {
9842
+ "description": "Unsubscribe and remove all realtime channels.",
9843
+ "parameters": {},
9844
+ "required": [],
9845
+ "returns": "void"
9846
+ },
9847
+ "connect": {
9848
+ "description": "Connect is a no-op since the Supabase SDK initializes on construction. The client is ready to use immediately after creation.",
9849
+ "parameters": {},
9850
+ "required": [],
9851
+ "returns": "void"
9852
+ },
9853
+ "disconnect": {
9854
+ "description": "Disconnect by signing out and removing all realtime channels.",
9855
+ "parameters": {},
9856
+ "required": [],
9857
+ "returns": "void"
9858
+ }
9859
+ },
9860
+ "getters": {
9861
+ "sdk": {
9862
+ "description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
9863
+ "returns": "SupabaseSDKClient<any, any>"
9864
+ },
9865
+ "storage": {
9866
+ "description": "Returns the Supabase Storage client for managing buckets and files.",
9867
+ "returns": "any"
9868
+ },
9869
+ "functions": {
9870
+ "description": "Returns the Supabase Functions client.",
9871
+ "returns": "any"
9872
+ }
9873
+ },
9874
+ "events": {},
9875
+ "state": {},
9876
+ "options": {},
9877
+ "envVars": [],
9878
+ "examples": [
9879
+ {
9880
+ "language": "ts",
9881
+ "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})"
9882
+ }
9883
+ ]
9884
+ });
9885
+
9886
+ setBuildTimeData('clients.openai', {
9887
+ "id": "clients.openai",
9888
+ "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.",
9889
+ "shortcut": "clients.openai",
9890
+ "className": "OpenAIClient",
9891
+ "methods": {
9892
+ "connect": {
9893
+ "description": "Test the API connection by listing models.",
9894
+ "parameters": {},
9895
+ "required": [],
9896
+ "returns": "Promise<this>",
9897
+ "examples": [
9898
+ {
9899
+ "language": "ts",
9900
+ "code": "await openai.connect()"
9901
+ }
9902
+ ]
9903
+ },
9904
+ "createChatCompletion": {
9905
+ "description": "Create a chat completion using the Chat Completions API.",
9906
+ "parameters": {
9907
+ "messages": {
9908
+ "type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
9909
+ "description": "Array of chat messages"
9910
+ },
9911
+ "options": {
9912
+ "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
9913
+ "description": "Additional parameters for the completion"
9914
+ }
9915
+ },
9916
+ "required": [
9917
+ "messages"
9918
+ ],
9919
+ "returns": "Promise<OpenAI.Chat.Completions.ChatCompletion>",
9920
+ "examples": [
9921
+ {
9922
+ "language": "ts",
9923
+ "code": "const response = await openai.createChatCompletion([\n { role: 'system', content: 'You are a helpful assistant.' },\n { role: 'user', content: 'Hello!' }\n])\nconsole.log(response.choices[0]?.message?.content)"
9924
+ }
9925
+ ]
9926
+ },
9927
+ "createResponse": {
9928
+ "description": "Create a response using the Responses API.",
9929
+ "parameters": {
9930
+ "input": {
9931
+ "type": "OpenAI.Responses.ResponseInput | string",
9932
+ "description": "The input prompt or message array"
9933
+ },
9934
+ "options": {
9935
+ "type": "Partial<OpenAI.Responses.ResponseCreateParamsNonStreaming>",
9936
+ "description": "Additional parameters for the response"
9937
+ }
9938
+ },
9939
+ "required": [
9940
+ "input"
9941
+ ],
9942
+ "returns": "Promise<OpenAI.Responses.Response>",
9943
+ "examples": [
9944
+ {
9945
+ "language": "ts",
9946
+ "code": "const response = await openai.createResponse('Explain quantum computing')"
9947
+ }
9948
+ ]
9949
+ },
9950
+ "streamResponse": {
9951
+ "description": "Stream a response using the Responses API.",
9952
+ "parameters": {
9953
+ "input": {
9954
+ "type": "OpenAI.Responses.ResponseInput | string",
9955
+ "description": "The input prompt or message array"
9956
+ },
9957
+ "options": {
9958
+ "type": "Partial<OpenAI.Responses.ResponseCreateParamsStreaming>",
9959
+ "description": "Additional parameters for the streaming response"
9960
+ }
9961
+ },
9962
+ "required": [
9963
+ "input"
9964
+ ],
9965
+ "returns": "Promise<AsyncIterable<OpenAI.Responses.ResponseStreamEvent>>",
9966
+ "examples": [
9967
+ {
9968
+ "language": "ts",
9969
+ "code": "const stream = await openai.streamResponse('Write a poem')\nfor await (const event of stream) {\n if (event.type === 'response.output_text.delta') {\n process.stdout.write(event.delta)\n }\n}"
9970
+ }
9971
+ ]
9972
+ },
9973
+ "createCompletion": {
9974
+ "description": "Create a legacy text completion.",
9975
+ "parameters": {
9976
+ "prompt": {
9977
+ "type": "string",
9978
+ "description": "The text prompt to complete"
9979
+ },
9980
+ "options": {
9981
+ "type": "Partial<OpenAI.Completions.CompletionCreateParams>",
9982
+ "description": "Additional parameters for the completion"
9983
+ }
9984
+ },
9985
+ "required": [
9986
+ "prompt"
9987
+ ],
9988
+ "returns": "Promise<OpenAI.Completions.Completion>",
9989
+ "examples": [
9990
+ {
9991
+ "language": "ts",
9992
+ "code": "const response = await openai.createCompletion('Once upon a time')"
9993
+ }
9994
+ ]
9995
+ },
9996
+ "createEmbedding": {
9997
+ "description": "Create text embeddings for semantic search or similarity comparisons.",
9998
+ "parameters": {
9999
+ "input": {
10000
+ "type": "string | string[]",
10001
+ "description": "A string or array of strings to embed"
10002
+ },
10003
+ "options": {
10004
+ "type": "Partial<OpenAI.Embeddings.EmbeddingCreateParams>",
10005
+ "description": "Additional parameters (model, etc.)"
10006
+ }
10007
+ },
10008
+ "required": [
10009
+ "input"
10010
+ ],
10011
+ "returns": "Promise<OpenAI.Embeddings.CreateEmbeddingResponse>",
10012
+ "examples": [
10013
+ {
10014
+ "language": "ts",
9651
10015
  "code": "const response = await openai.createEmbedding('Hello world')\nconsole.log(response.data[0].embedding.length)"
9652
10016
  }
9653
10017
  ]
@@ -9787,404 +10151,6 @@ setBuildTimeData('clients.openai', {
9787
10151
  ]
9788
10152
  });
9789
10153
 
9790
- setBuildTimeData('clients.elevenlabs', {
9791
- "id": "clients.elevenlabs",
9792
- "description": "ElevenLabs client — text-to-speech synthesis via the ElevenLabs REST API. Provides methods for listing voices, listing models, and generating speech audio. Audio is returned as a Buffer; use `say()` for a convenience method that writes to disk.",
9793
- "shortcut": "clients.elevenlabs",
9794
- "className": "ElevenLabsClient",
9795
- "methods": {
9796
- "beforeRequest": {
9797
- "description": "Inject the xi-api-key header before each request.",
9798
- "parameters": {},
9799
- "required": [],
9800
- "returns": "void"
9801
- },
9802
- "connect": {
9803
- "description": "Validate the API key by listing available models.",
9804
- "parameters": {},
9805
- "required": [],
9806
- "returns": "Promise<this>",
9807
- "examples": [
9808
- {
9809
- "language": "ts",
9810
- "code": "await el.connect()"
9811
- }
9812
- ]
9813
- },
9814
- "listVoices": {
9815
- "description": "List available voices with optional search and filtering.",
9816
- "parameters": {
9817
- "options": {
9818
- "type": "{\n search?: string\n category?: string\n voice_type?: string\n page_size?: number\n next_page_token?: string\n }",
9819
- "description": "Query parameters for filtering voices"
9820
- }
9821
- },
9822
- "required": [],
9823
- "returns": "Promise<any>",
9824
- "examples": [
9825
- {
9826
- "language": "ts",
9827
- "code": "const voices = await el.listVoices()\nconst premade = await el.listVoices({ category: 'premade' })"
9828
- }
9829
- ]
9830
- },
9831
- "getVoice": {
9832
- "description": "Get details for a single voice.",
9833
- "parameters": {
9834
- "voiceId": {
9835
- "type": "string",
9836
- "description": "The voice ID to look up"
9837
- }
9838
- },
9839
- "required": [
9840
- "voiceId"
9841
- ],
9842
- "returns": "Promise<any>",
9843
- "examples": [
9844
- {
9845
- "language": "ts",
9846
- "code": "const voice = await el.getVoice('21m00Tcm4TlvDq8ikWAM')\nconsole.log(voice.name, voice.settings)"
9847
- }
9848
- ]
9849
- },
9850
- "listModels": {
9851
- "description": "List available TTS models.",
9852
- "parameters": {},
9853
- "required": [],
9854
- "returns": "Promise<any[]>",
9855
- "examples": [
9856
- {
9857
- "language": "ts",
9858
- "code": "const models = await el.listModels()\nconsole.log(models.map(m => m.model_id))"
9859
- }
9860
- ]
9861
- },
9862
- "synthesize": {
9863
- "description": "Synthesize speech from text, returning audio as a Buffer.",
9864
- "parameters": {
9865
- "text": {
9866
- "type": "string",
9867
- "description": "The text to convert to speech"
9868
- },
9869
- "options": {
9870
- "type": "SynthesizeOptions",
9871
- "description": "Voice, model, format, and voice settings overrides",
9872
- "properties": {
9873
- "voiceId": {
9874
- "type": "string",
9875
- "description": ""
9876
- },
9877
- "modelId": {
9878
- "type": "string",
9879
- "description": ""
9880
- },
9881
- "outputFormat": {
9882
- "type": "string",
9883
- "description": ""
9884
- },
9885
- "voiceSettings": {
9886
- "type": "ElevenLabsVoiceSettings",
9887
- "description": ""
9888
- },
9889
- "disableCache": {
9890
- "type": "boolean",
9891
- "description": ""
9892
- }
9893
- }
9894
- }
9895
- },
9896
- "required": [
9897
- "text"
9898
- ],
9899
- "returns": "Promise<Buffer>",
9900
- "examples": [
9901
- {
9902
- "language": "ts",
9903
- "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})"
9904
- }
9905
- ]
9906
- },
9907
- "say": {
9908
- "description": "Synthesize speech and write the audio to a file.",
9909
- "parameters": {
9910
- "text": {
9911
- "type": "string",
9912
- "description": "The text to convert to speech"
9913
- },
9914
- "outputPath": {
9915
- "type": "string",
9916
- "description": "File path to write the audio to"
9917
- },
9918
- "options": {
9919
- "type": "SynthesizeOptions",
9920
- "description": "Voice, model, format, and voice settings overrides",
9921
- "properties": {
9922
- "voiceId": {
9923
- "type": "string",
9924
- "description": ""
9925
- },
9926
- "modelId": {
9927
- "type": "string",
9928
- "description": ""
9929
- },
9930
- "outputFormat": {
9931
- "type": "string",
9932
- "description": ""
9933
- },
9934
- "voiceSettings": {
9935
- "type": "ElevenLabsVoiceSettings",
9936
- "description": ""
9937
- },
9938
- "disableCache": {
9939
- "type": "boolean",
9940
- "description": ""
9941
- }
9942
- }
9943
- }
9944
- },
9945
- "required": [
9946
- "text",
9947
- "outputPath"
9948
- ],
9949
- "returns": "Promise<string>",
9950
- "examples": [
9951
- {
9952
- "language": "ts",
9953
- "code": "const path = await el.say('Hello world', './hello.mp3')\nconsole.log(`Audio saved to ${path}`)"
9954
- }
9955
- ]
9956
- }
9957
- },
9958
- "getters": {
9959
- "apiKey": {
9960
- "description": "The resolved API key from options or environment.",
9961
- "returns": "string"
9962
- }
9963
- },
9964
- "events": {
9965
- "failure": {
9966
- "name": "failure",
9967
- "description": "Event emitted by ElevenLabsClient",
9968
- "arguments": {}
9969
- },
9970
- "voices": {
9971
- "name": "voices",
9972
- "description": "Event emitted by ElevenLabsClient",
9973
- "arguments": {}
9974
- },
9975
- "speech": {
9976
- "name": "speech",
9977
- "description": "Event emitted by ElevenLabsClient",
9978
- "arguments": {}
9979
- }
9980
- },
9981
- "state": {},
9982
- "options": {},
9983
- "envVars": [],
9984
- "examples": [
9985
- {
9986
- "language": "ts",
9987
- "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"
9988
- }
9989
- ]
9990
- });
9991
-
9992
- setBuildTimeData('clients.supabase', {
9993
- "id": "clients.supabase",
9994
- "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).",
9995
- "shortcut": "clients.supabase",
9996
- "className": "SupabaseClient",
9997
- "methods": {
9998
- "from": {
9999
- "description": "Start a query on a Postgres table or view.",
10000
- "parameters": {
10001
- "table": {
10002
- "type": "string",
10003
- "description": "The table or view name to query"
10004
- }
10005
- },
10006
- "required": [
10007
- "table"
10008
- ],
10009
- "returns": "void"
10010
- },
10011
- "rpc": {
10012
- "description": "Call a Postgres function (RPC).",
10013
- "parameters": {
10014
- "fn": {
10015
- "type": "string",
10016
- "description": "The function name"
10017
- },
10018
- "params": {
10019
- "type": "Record<string, unknown>",
10020
- "description": "Arguments to pass to the function"
10021
- },
10022
- "options": {
10023
- "type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
10024
- "description": "Optional settings (head, get, count)"
10025
- }
10026
- },
10027
- "required": [
10028
- "fn"
10029
- ],
10030
- "returns": "void"
10031
- },
10032
- "signInWithPassword": {
10033
- "description": "Sign in with email and password.",
10034
- "parameters": {
10035
- "email": {
10036
- "type": "string",
10037
- "description": "Parameter email"
10038
- },
10039
- "password": {
10040
- "type": "string",
10041
- "description": "Parameter password"
10042
- }
10043
- },
10044
- "required": [
10045
- "email",
10046
- "password"
10047
- ],
10048
- "returns": "void"
10049
- },
10050
- "signUp": {
10051
- "description": "Create a new user account with email and password.",
10052
- "parameters": {
10053
- "email": {
10054
- "type": "string",
10055
- "description": "Parameter email"
10056
- },
10057
- "password": {
10058
- "type": "string",
10059
- "description": "Parameter password"
10060
- }
10061
- },
10062
- "required": [
10063
- "email",
10064
- "password"
10065
- ],
10066
- "returns": "void"
10067
- },
10068
- "signOut": {
10069
- "description": "Sign the current user out.",
10070
- "parameters": {},
10071
- "required": [],
10072
- "returns": "void"
10073
- },
10074
- "getSession": {
10075
- "description": "Get the current session, if any.",
10076
- "parameters": {},
10077
- "required": [],
10078
- "returns": "void"
10079
- },
10080
- "getUser": {
10081
- "description": "Get the current user, if any.",
10082
- "parameters": {},
10083
- "required": [],
10084
- "returns": "void"
10085
- },
10086
- "invoke": {
10087
- "description": "Invoke a Supabase Edge Function by name.",
10088
- "parameters": {
10089
- "name": {
10090
- "type": "string",
10091
- "description": "Parameter name"
10092
- },
10093
- "body": {
10094
- "type": "any",
10095
- "description": "Parameter body"
10096
- }
10097
- },
10098
- "required": [
10099
- "name"
10100
- ],
10101
- "returns": "void"
10102
- },
10103
- "subscribe": {
10104
- "description": "Subscribe to realtime changes on a Postgres table.",
10105
- "parameters": {
10106
- "channelName": {
10107
- "type": "string",
10108
- "description": "A name for this subscription channel"
10109
- },
10110
- "table": {
10111
- "type": "string",
10112
- "description": "The table to listen to"
10113
- },
10114
- "callback": {
10115
- "type": "(payload: any) => void",
10116
- "description": "Called with the payload on each change"
10117
- },
10118
- "event": {
10119
- "type": "\"INSERT\" | \"UPDATE\" | \"DELETE\" | \"*\"",
10120
- "description": "The event type to listen for (default: all changes)"
10121
- }
10122
- },
10123
- "required": [
10124
- "channelName",
10125
- "table",
10126
- "callback"
10127
- ],
10128
- "returns": "RealtimeChannel"
10129
- },
10130
- "unsubscribe": {
10131
- "description": "Unsubscribe and remove a realtime channel by name.",
10132
- "parameters": {
10133
- "channelName": {
10134
- "type": "string",
10135
- "description": "The channel name to remove"
10136
- }
10137
- },
10138
- "required": [
10139
- "channelName"
10140
- ],
10141
- "returns": "void"
10142
- },
10143
- "unsubscribeAll": {
10144
- "description": "Unsubscribe and remove all realtime channels.",
10145
- "parameters": {},
10146
- "required": [],
10147
- "returns": "void"
10148
- },
10149
- "connect": {
10150
- "description": "Connect is a no-op since the Supabase SDK initializes on construction. The client is ready to use immediately after creation.",
10151
- "parameters": {},
10152
- "required": [],
10153
- "returns": "void"
10154
- },
10155
- "disconnect": {
10156
- "description": "Disconnect by signing out and removing all realtime channels.",
10157
- "parameters": {},
10158
- "required": [],
10159
- "returns": "void"
10160
- }
10161
- },
10162
- "getters": {
10163
- "sdk": {
10164
- "description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
10165
- "returns": "SupabaseSDKClient<any, any>"
10166
- },
10167
- "storage": {
10168
- "description": "Returns the Supabase Storage client for managing buckets and files.",
10169
- "returns": "any"
10170
- },
10171
- "functions": {
10172
- "description": "Returns the Supabase Functions client.",
10173
- "returns": "any"
10174
- }
10175
- },
10176
- "events": {},
10177
- "state": {},
10178
- "options": {},
10179
- "envVars": [],
10180
- "examples": [
10181
- {
10182
- "language": "ts",
10183
- "code": "const supabase = container.client('supabase', {\n supabaseUrl: 'https://xyz.supabase.co',\n supabaseKey: 'your-anon-key',\n})\n\n// Query data\nconst { data } = await supabase.from('users').select('*')\n\n// Auth\nawait supabase.signInWithPassword('user@example.com', 'password')\n\n// Realtime\nsupabase.subscribe('changes', 'users', (payload) => {\n console.log('Change:', payload)\n})"
10184
- }
10185
- ]
10186
- });
10187
-
10188
10154
  setBuildTimeData('clients.comfyui', {
10189
10155
  "id": "clients.comfyui",
10190
10156
  "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.",
@@ -10326,103 +10292,305 @@ setBuildTimeData('clients.comfyui', {
10326
10292
  "required": [],
10327
10293
  "returns": "void"
10328
10294
  },
10329
- "toApiFormat": {
10330
- "description": "Convert a UI-format workflow to the API format that /prompt expects. Requires a running ComfyUI instance to fetch `object_info` so we can map positional `widgets_values` to their named input fields. If the workflow is already in API format, it's returned as-is.",
10295
+ "toApiFormat": {
10296
+ "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.",
10297
+ "parameters": {
10298
+ "workflow": {
10299
+ "type": "Record<string, any>",
10300
+ "description": "Parameter workflow"
10301
+ }
10302
+ },
10303
+ "required": [
10304
+ "workflow"
10305
+ ],
10306
+ "returns": "Promise<Record<string, any>>"
10307
+ },
10308
+ "runWorkflow": {
10309
+ "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' } } ```",
10310
+ "parameters": {
10311
+ "workflow": {
10312
+ "type": "Record<string, any>",
10313
+ "description": "Parameter workflow"
10314
+ },
10315
+ "inputs": {
10316
+ "type": "Record<string, any>",
10317
+ "description": "Parameter inputs"
10318
+ },
10319
+ "options": {
10320
+ "type": "WorkflowRunOptions",
10321
+ "description": "Parameter options",
10322
+ "properties": {
10323
+ "poll": {
10324
+ "type": "boolean",
10325
+ "description": "Use polling instead of WebSocket for tracking execution"
10326
+ },
10327
+ "pollInterval": {
10328
+ "type": "number",
10329
+ "description": "Polling interval in ms (default 1000)"
10330
+ },
10331
+ "inputMap": {
10332
+ "type": "InputMapping",
10333
+ "description": "Named input mapping: semantic name -> { nodeId, field }"
10334
+ },
10335
+ "outputDir": {
10336
+ "type": "string",
10337
+ "description": "If provided, output images are downloaded to this directory"
10338
+ }
10339
+ }
10340
+ }
10341
+ },
10342
+ "required": [
10343
+ "workflow"
10344
+ ],
10345
+ "returns": "Promise<WorkflowResult>"
10346
+ }
10347
+ },
10348
+ "getters": {
10349
+ "clientId": {
10350
+ "description": "The unique client ID used for WebSocket session tracking.",
10351
+ "returns": "string"
10352
+ },
10353
+ "wsURL": {
10354
+ "description": "The WebSocket URL derived from baseURL or overridden via options.",
10355
+ "returns": "string"
10356
+ }
10357
+ },
10358
+ "events": {
10359
+ "execution_start": {
10360
+ "name": "execution_start",
10361
+ "description": "Event emitted by ComfyUIClient",
10362
+ "arguments": {}
10363
+ },
10364
+ "execution_complete": {
10365
+ "name": "execution_complete",
10366
+ "description": "Event emitted by ComfyUIClient",
10367
+ "arguments": {}
10368
+ },
10369
+ "executing": {
10370
+ "name": "executing",
10371
+ "description": "Event emitted by ComfyUIClient",
10372
+ "arguments": {}
10373
+ },
10374
+ "progress": {
10375
+ "name": "progress",
10376
+ "description": "Event emitted by ComfyUIClient",
10377
+ "arguments": {}
10378
+ },
10379
+ "executed": {
10380
+ "name": "executed",
10381
+ "description": "Event emitted by ComfyUIClient",
10382
+ "arguments": {}
10383
+ },
10384
+ "execution_cached": {
10385
+ "name": "execution_cached",
10386
+ "description": "Event emitted by ComfyUIClient",
10387
+ "arguments": {}
10388
+ },
10389
+ "execution_error": {
10390
+ "name": "execution_error",
10391
+ "description": "Event emitted by ComfyUIClient",
10392
+ "arguments": {}
10393
+ }
10394
+ },
10395
+ "state": {},
10396
+ "options": {},
10397
+ "envVars": [],
10398
+ "examples": [
10399
+ {
10400
+ "language": "ts",
10401
+ "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)"
10402
+ }
10403
+ ]
10404
+ });
10405
+
10406
+ setBuildTimeData('clients.elevenlabs', {
10407
+ "id": "clients.elevenlabs",
10408
+ "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.",
10409
+ "shortcut": "clients.elevenlabs",
10410
+ "className": "ElevenLabsClient",
10411
+ "methods": {
10412
+ "beforeRequest": {
10413
+ "description": "Inject the xi-api-key header before each request.",
10414
+ "parameters": {},
10415
+ "required": [],
10416
+ "returns": "void"
10417
+ },
10418
+ "connect": {
10419
+ "description": "Validate the API key by listing available models.",
10420
+ "parameters": {},
10421
+ "required": [],
10422
+ "returns": "Promise<this>",
10423
+ "examples": [
10424
+ {
10425
+ "language": "ts",
10426
+ "code": "await el.connect()"
10427
+ }
10428
+ ]
10429
+ },
10430
+ "listVoices": {
10431
+ "description": "List available voices with optional search and filtering.",
10432
+ "parameters": {
10433
+ "options": {
10434
+ "type": "{\n search?: string\n category?: string\n voice_type?: string\n page_size?: number\n next_page_token?: string\n }",
10435
+ "description": "Query parameters for filtering voices"
10436
+ }
10437
+ },
10438
+ "required": [],
10439
+ "returns": "Promise<any>",
10440
+ "examples": [
10441
+ {
10442
+ "language": "ts",
10443
+ "code": "const voices = await el.listVoices()\nconst premade = await el.listVoices({ category: 'premade' })"
10444
+ }
10445
+ ]
10446
+ },
10447
+ "getVoice": {
10448
+ "description": "Get details for a single voice.",
10449
+ "parameters": {
10450
+ "voiceId": {
10451
+ "type": "string",
10452
+ "description": "The voice ID to look up"
10453
+ }
10454
+ },
10455
+ "required": [
10456
+ "voiceId"
10457
+ ],
10458
+ "returns": "Promise<any>",
10459
+ "examples": [
10460
+ {
10461
+ "language": "ts",
10462
+ "code": "const voice = await el.getVoice('21m00Tcm4TlvDq8ikWAM')\nconsole.log(voice.name, voice.settings)"
10463
+ }
10464
+ ]
10465
+ },
10466
+ "listModels": {
10467
+ "description": "List available TTS models.",
10468
+ "parameters": {},
10469
+ "required": [],
10470
+ "returns": "Promise<any[]>",
10471
+ "examples": [
10472
+ {
10473
+ "language": "ts",
10474
+ "code": "const models = await el.listModels()\nconsole.log(models.map(m => m.model_id))"
10475
+ }
10476
+ ]
10477
+ },
10478
+ "synthesize": {
10479
+ "description": "Synthesize speech from text, returning audio as a Buffer.",
10331
10480
  "parameters": {
10332
- "workflow": {
10333
- "type": "Record<string, any>",
10334
- "description": "Parameter workflow"
10481
+ "text": {
10482
+ "type": "string",
10483
+ "description": "The text to convert to speech"
10484
+ },
10485
+ "options": {
10486
+ "type": "SynthesizeOptions",
10487
+ "description": "Voice, model, format, and voice settings overrides",
10488
+ "properties": {
10489
+ "voiceId": {
10490
+ "type": "string",
10491
+ "description": ""
10492
+ },
10493
+ "modelId": {
10494
+ "type": "string",
10495
+ "description": ""
10496
+ },
10497
+ "outputFormat": {
10498
+ "type": "string",
10499
+ "description": ""
10500
+ },
10501
+ "voiceSettings": {
10502
+ "type": "ElevenLabsVoiceSettings",
10503
+ "description": ""
10504
+ },
10505
+ "disableCache": {
10506
+ "type": "boolean",
10507
+ "description": ""
10508
+ }
10509
+ }
10335
10510
  }
10336
10511
  },
10337
10512
  "required": [
10338
- "workflow"
10513
+ "text"
10339
10514
  ],
10340
- "returns": "Promise<Record<string, any>>"
10515
+ "returns": "Promise<Buffer>",
10516
+ "examples": [
10517
+ {
10518
+ "language": "ts",
10519
+ "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})"
10520
+ }
10521
+ ]
10341
10522
  },
10342
- "runWorkflow": {
10343
- "description": "Run a ComfyUI workflow with optional runtime input overrides. Inputs can be provided in two forms: **Direct node mapping** (when no `inputMap` in options): ``` { '3': { seed: 42 }, '6': { text: 'a cat' } } ``` **Named inputs** (when `inputMap` is provided in options): ``` inputs: { positive_prompt: 'a cat', seed: 42 } options.inputMap: { positive_prompt: { nodeId: '6', field: 'text' }, seed: { nodeId: '3', field: 'seed' } } ```",
10523
+ "say": {
10524
+ "description": "Synthesize speech and write the audio to a file.",
10344
10525
  "parameters": {
10345
- "workflow": {
10346
- "type": "Record<string, any>",
10347
- "description": "Parameter workflow"
10526
+ "text": {
10527
+ "type": "string",
10528
+ "description": "The text to convert to speech"
10348
10529
  },
10349
- "inputs": {
10350
- "type": "Record<string, any>",
10351
- "description": "Parameter inputs"
10530
+ "outputPath": {
10531
+ "type": "string",
10532
+ "description": "File path to write the audio to"
10352
10533
  },
10353
10534
  "options": {
10354
- "type": "WorkflowRunOptions",
10355
- "description": "Parameter options",
10535
+ "type": "SynthesizeOptions",
10536
+ "description": "Voice, model, format, and voice settings overrides",
10356
10537
  "properties": {
10357
- "poll": {
10358
- "type": "boolean",
10359
- "description": "Use polling instead of WebSocket for tracking execution"
10360
- },
10361
- "pollInterval": {
10362
- "type": "number",
10363
- "description": "Polling interval in ms (default 1000)"
10538
+ "voiceId": {
10539
+ "type": "string",
10540
+ "description": ""
10364
10541
  },
10365
- "inputMap": {
10366
- "type": "InputMapping",
10367
- "description": "Named input mapping: semantic name -> { nodeId, field }"
10542
+ "modelId": {
10543
+ "type": "string",
10544
+ "description": ""
10368
10545
  },
10369
- "outputDir": {
10546
+ "outputFormat": {
10370
10547
  "type": "string",
10371
- "description": "If provided, output images are downloaded to this directory"
10548
+ "description": ""
10549
+ },
10550
+ "voiceSettings": {
10551
+ "type": "ElevenLabsVoiceSettings",
10552
+ "description": ""
10553
+ },
10554
+ "disableCache": {
10555
+ "type": "boolean",
10556
+ "description": ""
10372
10557
  }
10373
10558
  }
10374
10559
  }
10375
10560
  },
10376
10561
  "required": [
10377
- "workflow"
10562
+ "text",
10563
+ "outputPath"
10378
10564
  ],
10379
- "returns": "Promise<WorkflowResult>"
10565
+ "returns": "Promise<string>",
10566
+ "examples": [
10567
+ {
10568
+ "language": "ts",
10569
+ "code": "const path = await el.say('Hello world', './hello.mp3')\nconsole.log(`Audio saved to ${path}`)"
10570
+ }
10571
+ ]
10380
10572
  }
10381
10573
  },
10382
10574
  "getters": {
10383
- "clientId": {
10384
- "description": "The unique client ID used for WebSocket session tracking.",
10385
- "returns": "string"
10386
- },
10387
- "wsURL": {
10388
- "description": "The WebSocket URL derived from baseURL or overridden via options.",
10575
+ "apiKey": {
10576
+ "description": "The resolved API key from options or environment.",
10389
10577
  "returns": "string"
10390
10578
  }
10391
10579
  },
10392
10580
  "events": {
10393
- "execution_start": {
10394
- "name": "execution_start",
10395
- "description": "Event emitted by ComfyUIClient",
10396
- "arguments": {}
10397
- },
10398
- "execution_complete": {
10399
- "name": "execution_complete",
10400
- "description": "Event emitted by ComfyUIClient",
10401
- "arguments": {}
10402
- },
10403
- "executing": {
10404
- "name": "executing",
10405
- "description": "Event emitted by ComfyUIClient",
10406
- "arguments": {}
10407
- },
10408
- "progress": {
10409
- "name": "progress",
10410
- "description": "Event emitted by ComfyUIClient",
10411
- "arguments": {}
10412
- },
10413
- "executed": {
10414
- "name": "executed",
10415
- "description": "Event emitted by ComfyUIClient",
10581
+ "failure": {
10582
+ "name": "failure",
10583
+ "description": "Event emitted by ElevenLabsClient",
10416
10584
  "arguments": {}
10417
10585
  },
10418
- "execution_cached": {
10419
- "name": "execution_cached",
10420
- "description": "Event emitted by ComfyUIClient",
10586
+ "voices": {
10587
+ "name": "voices",
10588
+ "description": "Event emitted by ElevenLabsClient",
10421
10589
  "arguments": {}
10422
10590
  },
10423
- "execution_error": {
10424
- "name": "execution_error",
10425
- "description": "Event emitted by ComfyUIClient",
10591
+ "speech": {
10592
+ "name": "speech",
10593
+ "description": "Event emitted by ElevenLabsClient",
10426
10594
  "arguments": {}
10427
10595
  }
10428
10596
  },
@@ -10432,7 +10600,7 @@ setBuildTimeData('clients.comfyui', {
10432
10600
  "examples": [
10433
10601
  {
10434
10602
  "language": "ts",
10435
- "code": "const comfy = container.client('comfyui', { baseURL: 'http://localhost:8188' })\nconst result = await comfy.runWorkflow(workflow, {\n '6': { text: 'a beautiful sunset' }\n})\nconsole.log(result.images)"
10603
+ "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"
10436
10604
  }
10437
10605
  ]
10438
10606
  });
@@ -16749,33 +16917,200 @@ export const introspectionData = [
16749
16917
  }
16750
16918
  },
16751
16919
  "required": [],
16752
- "returns": "void",
16753
- "examples": [
16754
- {
16755
- "language": "ts",
16756
- "code": "const repl = container.feature('repl', { enable: true })\nawait repl.start({\n context: { db: myDatabase },\n historyPath: '.repl-history'\n})"
16757
- }
16758
- ]
16920
+ "returns": "void",
16921
+ "examples": [
16922
+ {
16923
+ "language": "ts",
16924
+ "code": "const repl = container.feature('repl', { enable: true })\nawait repl.start({\n context: { db: myDatabase },\n historyPath: '.repl-history'\n})"
16925
+ }
16926
+ ]
16927
+ }
16928
+ },
16929
+ "getters": {
16930
+ "isStarted": {
16931
+ "description": "Whether the REPL session is currently running.",
16932
+ "returns": "any"
16933
+ },
16934
+ "vmContext": {
16935
+ "description": "The VM context object used for evaluating expressions in the REPL.",
16936
+ "returns": "any"
16937
+ }
16938
+ },
16939
+ "events": {},
16940
+ "state": {},
16941
+ "options": {},
16942
+ "envVars": [],
16943
+ "examples": [
16944
+ {
16945
+ "language": "ts",
16946
+ "code": "const repl = container.feature('repl', { enable: true })\nawait repl.start({ context: { myVar: 42 } })"
16947
+ }
16948
+ ]
16949
+ },
16950
+ {
16951
+ "id": "features.googleMail",
16952
+ "description": "Google Mail feature for searching, reading, and watching Gmail messages. Depends on the googleAuth feature for authentication. Creates a Gmail v1 API client lazily. Supports Gmail search query syntax, individual message reading, and polling-based new mail detection with event emission.",
16953
+ "shortcut": "features.googleMail",
16954
+ "className": "GoogleMail",
16955
+ "methods": {
16956
+ "search": {
16957
+ "description": "Search for messages using Gmail query syntax and/or structured filters.",
16958
+ "parameters": {
16959
+ "options": {
16960
+ "type": "SearchMailOptions",
16961
+ "description": "Search filters including query, from, to, subject, date ranges",
16962
+ "properties": {
16963
+ "query": {
16964
+ "type": "string",
16965
+ "description": ""
16966
+ },
16967
+ "from": {
16968
+ "type": "string",
16969
+ "description": ""
16970
+ },
16971
+ "to": {
16972
+ "type": "string",
16973
+ "description": ""
16974
+ },
16975
+ "subject": {
16976
+ "type": "string",
16977
+ "description": ""
16978
+ },
16979
+ "after": {
16980
+ "type": "string",
16981
+ "description": ""
16982
+ },
16983
+ "before": {
16984
+ "type": "string",
16985
+ "description": ""
16986
+ },
16987
+ "hasAttachment": {
16988
+ "type": "boolean",
16989
+ "description": ""
16990
+ },
16991
+ "label": {
16992
+ "type": "string",
16993
+ "description": ""
16994
+ },
16995
+ "isUnread": {
16996
+ "type": "boolean",
16997
+ "description": ""
16998
+ },
16999
+ "maxResults": {
17000
+ "type": "number",
17001
+ "description": ""
17002
+ },
17003
+ "pageToken": {
17004
+ "type": "string",
17005
+ "description": ""
17006
+ }
17007
+ }
17008
+ }
17009
+ },
17010
+ "required": [],
17011
+ "returns": "Promise<MailMessageList>"
17012
+ },
17013
+ "getMessage": {
17014
+ "description": "Get a single message by ID.",
17015
+ "parameters": {
17016
+ "messageId": {
17017
+ "type": "string",
17018
+ "description": "The message ID"
17019
+ },
17020
+ "format": {
17021
+ "type": "'full' | 'metadata' | 'minimal' | 'raw'",
17022
+ "description": "Message format (defaults to options.format or 'full')"
17023
+ }
17024
+ },
17025
+ "required": [
17026
+ "messageId"
17027
+ ],
17028
+ "returns": "Promise<MailMessage>"
17029
+ },
17030
+ "getThread": {
17031
+ "description": "Get a full thread with all its messages.",
17032
+ "parameters": {
17033
+ "threadId": {
17034
+ "type": "string",
17035
+ "description": "The thread ID"
17036
+ }
17037
+ },
17038
+ "required": [
17039
+ "threadId"
17040
+ ],
17041
+ "returns": "Promise<MailThread>"
17042
+ },
17043
+ "listLabels": {
17044
+ "description": "List all labels for the authenticated user.",
17045
+ "parameters": {},
17046
+ "required": [],
17047
+ "returns": "Promise<MailLabel[]>"
17048
+ },
17049
+ "startWatching": {
17050
+ "description": "Start watching for new mail by polling at a regular interval. Emits 'newMail' events with an array of new messages when they arrive. Uses Gmail history API to efficiently detect only new messages since the last check.",
17051
+ "parameters": {},
17052
+ "required": [],
17053
+ "returns": "Promise<void>"
17054
+ },
17055
+ "stopWatching": {
17056
+ "description": "Stop watching for new mail.",
17057
+ "parameters": {},
17058
+ "required": [],
17059
+ "returns": "void"
16759
17060
  }
16760
17061
  },
16761
17062
  "getters": {
16762
- "isStarted": {
16763
- "description": "Whether the REPL session is currently running.",
16764
- "returns": "any"
17063
+ "auth": {
17064
+ "description": "Access the google-auth feature lazily.",
17065
+ "returns": "GoogleAuth"
16765
17066
  },
16766
- "vmContext": {
16767
- "description": "The VM context object used for evaluating expressions in the REPL.",
16768
- "returns": "any"
17067
+ "userId": {
17068
+ "description": "Default user ID from options or 'me'.",
17069
+ "returns": "string"
17070
+ },
17071
+ "defaultFormat": {
17072
+ "description": "Default message format from options or 'full'.",
17073
+ "returns": "'full' | 'metadata' | 'minimal' | 'raw'"
17074
+ },
17075
+ "pollInterval": {
17076
+ "description": "Polling interval from options or 30 seconds.",
17077
+ "returns": "number"
17078
+ }
17079
+ },
17080
+ "events": {
17081
+ "messagesFetched": {
17082
+ "name": "messagesFetched",
17083
+ "description": "Event emitted by GoogleMail",
17084
+ "arguments": {}
17085
+ },
17086
+ "error": {
17087
+ "name": "error",
17088
+ "description": "Event emitted by GoogleMail",
17089
+ "arguments": {}
17090
+ },
17091
+ "watchStarted": {
17092
+ "name": "watchStarted",
17093
+ "description": "Event emitted by GoogleMail",
17094
+ "arguments": {}
17095
+ },
17096
+ "watchStopped": {
17097
+ "name": "watchStopped",
17098
+ "description": "Event emitted by GoogleMail",
17099
+ "arguments": {}
17100
+ },
17101
+ "newMail": {
17102
+ "name": "newMail",
17103
+ "description": "Event emitted by GoogleMail",
17104
+ "arguments": {}
16769
17105
  }
16770
17106
  },
16771
- "events": {},
16772
17107
  "state": {},
16773
17108
  "options": {},
16774
17109
  "envVars": [],
16775
17110
  "examples": [
16776
17111
  {
16777
17112
  "language": "ts",
16778
- "code": "const repl = container.feature('repl', { enable: true })\nawait repl.start({ context: { myVar: 42 } })"
17113
+ "code": "const mail = container.feature('googleMail')\n\n// Search by sender\nconst fromBoss = await mail.search({ from: 'boss@company.com' })\n\n// Use Gmail query string\nconst unread = await mail.search({ query: 'is:unread category:primary' })\n\n// Read a specific message\nconst msg = await mail.getMessage('message-id-here')\n\n// Get a full thread\nconst thread = await mail.getThread('thread-id-here')\n\n// List labels\nconst labels = await mail.listLabels()\n\n// Watch for new mail (polls and emits 'newMail' events)\nmail.on('newMail', (messages) => {\n console.log(`Got ${messages.length} new messages!`)\n})\nawait mail.startWatching()\n\n// Stop watching\nmail.stopWatching()"
16779
17114
  }
16780
17115
  ]
16781
17116
  },
@@ -22727,264 +23062,31 @@ export const introspectionData = [
22727
23062
  "description": "Optional variables for the mutation"
22728
23063
  },
22729
23064
  "operationName": {
22730
- "type": "string",
22731
- "description": "Optional operation name when the mutation contains multiple operations"
22732
- }
22733
- },
22734
- "required": [
22735
- "mutation"
22736
- ],
22737
- "returns": "Promise<R>"
22738
- }
22739
- },
22740
- "getters": {
22741
- "endpoint": {
22742
- "description": "The GraphQL endpoint path. Defaults to '/graphql'.",
22743
- "returns": "any"
22744
- }
22745
- },
22746
- "events": {
22747
- "graphqlError": {
22748
- "name": "graphqlError",
22749
- "description": "Event emitted by GraphClient",
22750
- "arguments": {}
22751
- },
22752
- "failure": {
22753
- "name": "failure",
22754
- "description": "Event emitted by GraphClient",
22755
- "arguments": {}
22756
- }
22757
- },
22758
- "state": {},
22759
- "options": {},
22760
- "envVars": [],
22761
- "examples": [
22762
- {
22763
- "language": "ts",
22764
- "code": "const gql = container.client('graph', { baseURL: 'https://api.example.com' })\nconst data = await gql.query(`{ users { id name } }`)\nawait gql.mutate(`mutation($name: String!) { createUser(name: $name) { id } }`, { name: 'Alice' })"
22765
- }
22766
- ]
22767
- },
22768
- {
22769
- "id": "clients.rest",
22770
- "description": "HTTP REST client built on top of axios. Provides convenience methods for GET, POST, PUT, PATCH, and DELETE requests with automatic JSON handling, configurable base URL, and error event emission.",
22771
- "shortcut": "clients.rest",
22772
- "className": "RestClient",
22773
- "methods": {
22774
- "beforeRequest": {
22775
- "description": "",
22776
- "parameters": {},
22777
- "required": [],
22778
- "returns": "void"
22779
- },
22780
- "patch": {
22781
- "description": "Send a PATCH request. Returns the parsed response body directly (not an axios Response wrapper). On HTTP errors, returns the error as JSON instead of throwing.",
22782
- "parameters": {
22783
- "url": {
22784
- "type": "string",
22785
- "description": "Request path relative to baseURL"
22786
- },
22787
- "data": {
22788
- "type": "any",
22789
- "description": "Request body"
22790
- },
22791
- "options": {
22792
- "type": "AxiosRequestConfig",
22793
- "description": "Additional axios request config"
22794
- }
22795
- },
22796
- "required": [
22797
- "url"
22798
- ],
22799
- "returns": "void"
22800
- },
22801
- "put": {
22802
- "description": "Send a PUT request. Returns the parsed response body directly (not an axios Response wrapper). On HTTP errors, returns the error as JSON instead of throwing.",
22803
- "parameters": {
22804
- "url": {
22805
- "type": "string",
22806
- "description": "Request path relative to baseURL"
22807
- },
22808
- "data": {
22809
- "type": "any",
22810
- "description": "Request body"
22811
- },
22812
- "options": {
22813
- "type": "AxiosRequestConfig",
22814
- "description": "Additional axios request config"
22815
- }
22816
- },
22817
- "required": [
22818
- "url"
22819
- ],
22820
- "returns": "void"
22821
- },
22822
- "post": {
22823
- "description": "Send a POST request. Returns the parsed response body directly (not an axios Response wrapper). On HTTP errors, returns the error as JSON instead of throwing.",
22824
- "parameters": {
22825
- "url": {
22826
- "type": "string",
22827
- "description": "Request path relative to baseURL"
22828
- },
22829
- "data": {
22830
- "type": "any",
22831
- "description": "Request body"
22832
- },
22833
- "options": {
22834
- "type": "AxiosRequestConfig",
22835
- "description": "Additional axios request config"
22836
- }
22837
- },
22838
- "required": [
22839
- "url"
22840
- ],
22841
- "returns": "void"
22842
- },
22843
- "delete": {
22844
- "description": "Send a DELETE request. Returns the parsed response body directly (not an axios Response wrapper). On HTTP errors, returns the error as JSON instead of throwing.",
22845
- "parameters": {
22846
- "url": {
22847
- "type": "string",
22848
- "description": "Request path relative to baseURL"
22849
- },
22850
- "params": {
22851
- "type": "any",
22852
- "description": "Query parameters"
22853
- },
22854
- "options": {
22855
- "type": "AxiosRequestConfig",
22856
- "description": "Additional axios request config"
22857
- }
22858
- },
22859
- "required": [
22860
- "url"
22861
- ],
22862
- "returns": "void"
22863
- },
22864
- "get": {
22865
- "description": "Send a GET request. Returns the parsed response body directly (not an axios Response wrapper). On HTTP errors, returns the error as JSON instead of throwing.",
22866
- "parameters": {
22867
- "url": {
22868
- "type": "string",
22869
- "description": "Request path relative to baseURL"
22870
- },
22871
- "params": {
22872
- "type": "any",
22873
- "description": "Query parameters"
22874
- },
22875
- "options": {
22876
- "type": "AxiosRequestConfig",
22877
- "description": "Additional axios request config"
22878
- }
22879
- },
22880
- "required": [
22881
- "url"
22882
- ],
22883
- "returns": "void"
22884
- },
22885
- "handleError": {
22886
- "description": "Handle an axios error by emitting 'failure' and returning the error as JSON.",
22887
- "parameters": {
22888
- "error": {
22889
- "type": "AxiosError",
22890
- "description": "Parameter error"
22891
- }
22892
- },
22893
- "required": [
22894
- "error"
22895
- ],
22896
- "returns": "void"
22897
- }
22898
- },
22899
- "getters": {
22900
- "useJSON": {
22901
- "description": "Whether JSON content-type headers should be set automatically.",
22902
- "returns": "any"
22903
- },
22904
- "baseURL": {
22905
- "description": "",
22906
- "returns": "any"
22907
- }
22908
- },
22909
- "events": {
22910
- "failure": {
22911
- "name": "failure",
22912
- "description": "Event emitted by RestClient",
22913
- "arguments": {}
22914
- }
22915
- },
22916
- "state": {},
22917
- "options": {},
22918
- "envVars": [],
22919
- "examples": [
22920
- {
22921
- "language": "ts",
22922
- "code": "const api = container.client('rest', { baseURL: 'https://api.example.com', json: true })\nconst users = await api.get('/users')\nawait api.post('/users', { name: 'Alice' })"
22923
- }
22924
- ]
22925
- },
22926
- {
22927
- "id": "clients.websocket",
22928
- "description": "WebSocket client that bridges raw WebSocket events to Luca's Helper event bus, providing a clean interface for sending/receiving messages, tracking connection state, and optional auto-reconnection with exponential backoff. Events emitted: - `open` — connection established - `message` — message received (JSON-parsed when possible) - `close` — connection closed (with code and reason) - `error` — connection error - `reconnecting` — attempting reconnection (with attempt number)",
22929
- "shortcut": "clients.websocket",
22930
- "className": "WebSocketClient",
22931
- "methods": {
22932
- "connect": {
22933
- "description": "Establish a WebSocket connection to the configured baseURL. Wires all raw WebSocket events (open, message, close, error) to the Helper event bus and updates connection state accordingly. Resolves once the connection is open; rejects on error.",
22934
- "parameters": {},
22935
- "required": [],
22936
- "returns": "Promise<this>"
22937
- },
22938
- "send": {
22939
- "description": "Send data over the WebSocket connection. Automatically JSON-serializes the payload. If not currently connected, attempts to connect first.",
22940
- "parameters": {
22941
- "data": {
22942
- "type": "any",
22943
- "description": "The data to send (will be JSON.stringify'd)"
23065
+ "type": "string",
23066
+ "description": "Optional operation name when the mutation contains multiple operations"
22944
23067
  }
22945
23068
  },
22946
23069
  "required": [
22947
- "data"
23070
+ "mutation"
22948
23071
  ],
22949
- "returns": "Promise<void>"
22950
- },
22951
- "disconnect": {
22952
- "description": "Gracefully close the WebSocket connection. Suppresses auto-reconnect and updates connection state to disconnected.",
22953
- "parameters": {},
22954
- "required": [],
22955
- "returns": "Promise<this>"
23072
+ "returns": "Promise<R>"
22956
23073
  }
22957
23074
  },
22958
23075
  "getters": {
22959
- "hasError": {
22960
- "description": "Whether the client is in an error state.",
23076
+ "endpoint": {
23077
+ "description": "The GraphQL endpoint path. Defaults to '/graphql'.",
22961
23078
  "returns": "any"
22962
23079
  }
22963
23080
  },
22964
23081
  "events": {
22965
- "open": {
22966
- "name": "open",
22967
- "description": "Event emitted by WebSocketClient",
22968
- "arguments": {}
22969
- },
22970
- "error": {
22971
- "name": "error",
22972
- "description": "Event emitted by WebSocketClient",
22973
- "arguments": {}
22974
- },
22975
- "message": {
22976
- "name": "message",
22977
- "description": "Event emitted by WebSocketClient",
22978
- "arguments": {}
22979
- },
22980
- "close": {
22981
- "name": "close",
22982
- "description": "Event emitted by WebSocketClient",
23082
+ "graphqlError": {
23083
+ "name": "graphqlError",
23084
+ "description": "Event emitted by GraphClient",
22983
23085
  "arguments": {}
22984
23086
  },
22985
- "reconnecting": {
22986
- "name": "reconnecting",
22987
- "description": "Event emitted by WebSocketClient",
23087
+ "failure": {
23088
+ "name": "failure",
23089
+ "description": "Event emitted by GraphClient",
22988
23090
  "arguments": {}
22989
23091
  }
22990
23092
  },
@@ -22994,264 +23096,155 @@ export const introspectionData = [
22994
23096
  "examples": [
22995
23097
  {
22996
23098
  "language": "ts",
22997
- "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' })"
23099
+ "code": "const gql = container.client('graph', { baseURL: 'https://api.example.com' })\nconst data = await gql.query(`{ users { id name } }`)\nawait gql.mutate(`mutation($name: String!) { createUser(name: $name) { id } }`, { name: 'Alice' })"
22998
23100
  }
22999
23101
  ]
23000
23102
  },
23001
23103
  {
23002
- "id": "clients.openai",
23003
- "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.",
23004
- "shortcut": "clients.openai",
23005
- "className": "OpenAIClient",
23104
+ "id": "clients.rest",
23105
+ "description": "HTTP REST client built on top of axios. Provides convenience methods for GET, POST, PUT, PATCH, and DELETE requests with automatic JSON handling, configurable base URL, and error event emission.",
23106
+ "shortcut": "clients.rest",
23107
+ "className": "RestClient",
23006
23108
  "methods": {
23007
- "connect": {
23008
- "description": "Test the API connection by listing models.",
23109
+ "beforeRequest": {
23110
+ "description": "",
23009
23111
  "parameters": {},
23010
23112
  "required": [],
23011
- "returns": "Promise<this>",
23012
- "examples": [
23013
- {
23014
- "language": "ts",
23015
- "code": "await openai.connect()"
23016
- }
23017
- ]
23018
- },
23019
- "createChatCompletion": {
23020
- "description": "Create a chat completion using the Chat Completions API.",
23021
- "parameters": {
23022
- "messages": {
23023
- "type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
23024
- "description": "Array of chat messages"
23025
- },
23026
- "options": {
23027
- "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
23028
- "description": "Additional parameters for the completion"
23029
- }
23030
- },
23031
- "required": [
23032
- "messages"
23033
- ],
23034
- "returns": "Promise<OpenAI.Chat.Completions.ChatCompletion>",
23035
- "examples": [
23036
- {
23037
- "language": "ts",
23038
- "code": "const response = await openai.createChatCompletion([\n { role: 'system', content: 'You are a helpful assistant.' },\n { role: 'user', content: 'Hello!' }\n])\nconsole.log(response.choices[0]?.message?.content)"
23039
- }
23040
- ]
23113
+ "returns": "void"
23041
23114
  },
23042
- "createResponse": {
23043
- "description": "Create a response using the Responses API.",
23115
+ "patch": {
23116
+ "description": "Send a PATCH request. Returns the parsed response body directly (not an axios Response wrapper). On HTTP errors, returns the error as JSON instead of throwing.",
23044
23117
  "parameters": {
23045
- "input": {
23046
- "type": "OpenAI.Responses.ResponseInput | string",
23047
- "description": "The input prompt or message array"
23118
+ "url": {
23119
+ "type": "string",
23120
+ "description": "Request path relative to baseURL"
23048
23121
  },
23049
- "options": {
23050
- "type": "Partial<OpenAI.Responses.ResponseCreateParamsNonStreaming>",
23051
- "description": "Additional parameters for the response"
23052
- }
23053
- },
23054
- "required": [
23055
- "input"
23056
- ],
23057
- "returns": "Promise<OpenAI.Responses.Response>",
23058
- "examples": [
23059
- {
23060
- "language": "ts",
23061
- "code": "const response = await openai.createResponse('Explain quantum computing')"
23062
- }
23063
- ]
23064
- },
23065
- "streamResponse": {
23066
- "description": "Stream a response using the Responses API.",
23067
- "parameters": {
23068
- "input": {
23069
- "type": "OpenAI.Responses.ResponseInput | string",
23070
- "description": "The input prompt or message array"
23122
+ "data": {
23123
+ "type": "any",
23124
+ "description": "Request body"
23071
23125
  },
23072
23126
  "options": {
23073
- "type": "Partial<OpenAI.Responses.ResponseCreateParamsStreaming>",
23074
- "description": "Additional parameters for the streaming response"
23127
+ "type": "AxiosRequestConfig",
23128
+ "description": "Additional axios request config"
23075
23129
  }
23076
23130
  },
23077
23131
  "required": [
23078
- "input"
23132
+ "url"
23079
23133
  ],
23080
- "returns": "Promise<AsyncIterable<OpenAI.Responses.ResponseStreamEvent>>",
23081
- "examples": [
23082
- {
23083
- "language": "ts",
23084
- "code": "const stream = await openai.streamResponse('Write a poem')\nfor await (const event of stream) {\n if (event.type === 'response.output_text.delta') {\n process.stdout.write(event.delta)\n }\n}"
23085
- }
23086
- ]
23134
+ "returns": "void"
23087
23135
  },
23088
- "createCompletion": {
23089
- "description": "Create a legacy text completion.",
23136
+ "put": {
23137
+ "description": "Send a PUT request. Returns the parsed response body directly (not an axios Response wrapper). On HTTP errors, returns the error as JSON instead of throwing.",
23090
23138
  "parameters": {
23091
- "prompt": {
23139
+ "url": {
23092
23140
  "type": "string",
23093
- "description": "The text prompt to complete"
23141
+ "description": "Request path relative to baseURL"
23094
23142
  },
23095
- "options": {
23096
- "type": "Partial<OpenAI.Completions.CompletionCreateParams>",
23097
- "description": "Additional parameters for the completion"
23098
- }
23099
- },
23100
- "required": [
23101
- "prompt"
23102
- ],
23103
- "returns": "Promise<OpenAI.Completions.Completion>",
23104
- "examples": [
23105
- {
23106
- "language": "ts",
23107
- "code": "const response = await openai.createCompletion('Once upon a time')"
23108
- }
23109
- ]
23110
- },
23111
- "createEmbedding": {
23112
- "description": "Create text embeddings for semantic search or similarity comparisons.",
23113
- "parameters": {
23114
- "input": {
23115
- "type": "string | string[]",
23116
- "description": "A string or array of strings to embed"
23143
+ "data": {
23144
+ "type": "any",
23145
+ "description": "Request body"
23117
23146
  },
23118
23147
  "options": {
23119
- "type": "Partial<OpenAI.Embeddings.EmbeddingCreateParams>",
23120
- "description": "Additional parameters (model, etc.)"
23148
+ "type": "AxiosRequestConfig",
23149
+ "description": "Additional axios request config"
23121
23150
  }
23122
23151
  },
23123
23152
  "required": [
23124
- "input"
23153
+ "url"
23125
23154
  ],
23126
- "returns": "Promise<OpenAI.Embeddings.CreateEmbeddingResponse>",
23127
- "examples": [
23128
- {
23129
- "language": "ts",
23130
- "code": "const response = await openai.createEmbedding('Hello world')\nconsole.log(response.data[0].embedding.length)"
23131
- }
23132
- ]
23155
+ "returns": "void"
23133
23156
  },
23134
- "createImage": {
23135
- "description": "Generate an image from a text prompt using DALL-E.",
23157
+ "post": {
23158
+ "description": "Send a POST request. Returns the parsed response body directly (not an axios Response wrapper). On HTTP errors, returns the error as JSON instead of throwing.",
23136
23159
  "parameters": {
23137
- "prompt": {
23160
+ "url": {
23138
23161
  "type": "string",
23139
- "description": "Description of the image to generate"
23162
+ "description": "Request path relative to baseURL"
23163
+ },
23164
+ "data": {
23165
+ "type": "any",
23166
+ "description": "Request body"
23140
23167
  },
23141
23168
  "options": {
23142
- "type": "Partial<OpenAI.Images.ImageGenerateParams>",
23143
- "description": "Additional parameters (size, n, etc.)"
23169
+ "type": "AxiosRequestConfig",
23170
+ "description": "Additional axios request config"
23144
23171
  }
23145
23172
  },
23146
23173
  "required": [
23147
- "prompt"
23174
+ "url"
23148
23175
  ],
23149
- "returns": "Promise<OpenAI.Images.ImagesResponse>",
23150
- "examples": [
23151
- {
23152
- "language": "ts",
23153
- "code": "const response = await openai.createImage('A sunset over mountains')\nconsole.log(response.data[0].url)"
23154
- }
23155
- ]
23156
- },
23157
- "listModels": {
23158
- "description": "List all available models.",
23159
- "parameters": {},
23160
- "required": [],
23161
- "returns": "Promise<OpenAI.Models.ModelsPage>",
23162
- "examples": [
23163
- {
23164
- "language": "ts",
23165
- "code": "const models = await openai.listModels()"
23166
- }
23167
- ]
23176
+ "returns": "void"
23168
23177
  },
23169
- "ask": {
23170
- "description": "Ask a single question and get a text response. Convenience wrapper around `createChatCompletion` for simple Q&A.",
23178
+ "delete": {
23179
+ "description": "Send a DELETE request. Returns the parsed response body directly (not an axios Response wrapper). On HTTP errors, returns the error as JSON instead of throwing.",
23171
23180
  "parameters": {
23172
- "question": {
23181
+ "url": {
23173
23182
  "type": "string",
23174
- "description": "The question to ask"
23183
+ "description": "Request path relative to baseURL"
23184
+ },
23185
+ "params": {
23186
+ "type": "any",
23187
+ "description": "Query parameters"
23175
23188
  },
23176
23189
  "options": {
23177
- "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
23178
- "description": "Additional completion parameters"
23190
+ "type": "AxiosRequestConfig",
23191
+ "description": "Additional axios request config"
23179
23192
  }
23180
23193
  },
23181
23194
  "required": [
23182
- "question"
23195
+ "url"
23183
23196
  ],
23184
- "returns": "Promise<string>",
23185
- "examples": [
23186
- {
23187
- "language": "ts",
23188
- "code": "const answer = await openai.ask('What is 2 + 2?')\nconsole.log(answer) // '4'"
23189
- }
23190
- ]
23197
+ "returns": "void"
23191
23198
  },
23192
- "chat": {
23193
- "description": "Send a multi-turn conversation and get a text response. Convenience wrapper around `createChatCompletion` that returns just the text.",
23194
- "parameters": {
23195
- "messages": {
23196
- "type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
23197
- "description": "Array of chat messages"
23199
+ "get": {
23200
+ "description": "Send a GET request. Returns the parsed response body directly (not an axios Response wrapper). On HTTP errors, returns the error as JSON instead of throwing.",
23201
+ "parameters": {
23202
+ "url": {
23203
+ "type": "string",
23204
+ "description": "Request path relative to baseURL"
23205
+ },
23206
+ "params": {
23207
+ "type": "any",
23208
+ "description": "Query parameters"
23198
23209
  },
23199
23210
  "options": {
23200
- "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
23201
- "description": "Additional completion parameters"
23211
+ "type": "AxiosRequestConfig",
23212
+ "description": "Additional axios request config"
23202
23213
  }
23203
23214
  },
23204
23215
  "required": [
23205
- "messages"
23216
+ "url"
23206
23217
  ],
23207
- "returns": "Promise<string>",
23208
- "examples": [
23209
- {
23210
- "language": "ts",
23211
- "code": "const reply = await openai.chat([\n { role: 'system', content: 'You are a pirate.' },\n { role: 'user', content: 'Hello!' }\n])"
23218
+ "returns": "void"
23219
+ },
23220
+ "handleError": {
23221
+ "description": "Handle an axios error by emitting 'failure' and returning the error as JSON.",
23222
+ "parameters": {
23223
+ "error": {
23224
+ "type": "AxiosError",
23225
+ "description": "Parameter error"
23212
23226
  }
23213
- ]
23227
+ },
23228
+ "required": [
23229
+ "error"
23230
+ ],
23231
+ "returns": "void"
23214
23232
  }
23215
23233
  },
23216
23234
  "getters": {
23217
- "defaultModel": {
23218
- "description": "The default model used for completions, from options or 'gpt-4o'.",
23219
- "returns": "string"
23235
+ "useJSON": {
23236
+ "description": "Whether JSON content-type headers should be set automatically.",
23237
+ "returns": "any"
23220
23238
  },
23221
- "raw": {
23222
- "description": "The underlying OpenAI SDK instance for advanced use cases.",
23223
- "returns": "OpenAI"
23239
+ "baseURL": {
23240
+ "description": "",
23241
+ "returns": "any"
23224
23242
  }
23225
23243
  },
23226
23244
  "events": {
23227
- "connected": {
23228
- "name": "connected",
23229
- "description": "Event emitted by OpenAIClient",
23230
- "arguments": {}
23231
- },
23232
23245
  "failure": {
23233
23246
  "name": "failure",
23234
- "description": "Event emitted by OpenAIClient",
23235
- "arguments": {}
23236
- },
23237
- "completion": {
23238
- "name": "completion",
23239
- "description": "Event emitted by OpenAIClient",
23240
- "arguments": {}
23241
- },
23242
- "embedding": {
23243
- "name": "embedding",
23244
- "description": "Event emitted by OpenAIClient",
23245
- "arguments": {}
23246
- },
23247
- "image": {
23248
- "name": "image",
23249
- "description": "Event emitted by OpenAIClient",
23250
- "arguments": {}
23251
- },
23252
- "models": {
23253
- "name": "models",
23254
- "description": "Event emitted by OpenAIClient",
23247
+ "description": "Event emitted by RestClient",
23255
23248
  "arguments": {}
23256
23249
  }
23257
23250
  },
@@ -23261,198 +23254,72 @@ export const introspectionData = [
23261
23254
  "examples": [
23262
23255
  {
23263
23256
  "language": "ts",
23264
- "code": "const openai = container.client('openai', { defaultModel: 'gpt-4o' })\nconst answer = await openai.ask('What is the meaning of life?')\nconsole.log(answer)"
23257
+ "code": "const api = container.client('rest', { baseURL: 'https://api.example.com', json: true })\nconst users = await api.get('/users')\nawait api.post('/users', { name: 'Alice' })"
23265
23258
  }
23266
23259
  ]
23267
23260
  },
23268
23261
  {
23269
- "id": "clients.elevenlabs",
23270
- "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.",
23271
- "shortcut": "clients.elevenlabs",
23272
- "className": "ElevenLabsClient",
23262
+ "id": "clients.websocket",
23263
+ "description": "WebSocket client that bridges raw WebSocket events to Luca's Helper event bus, providing a clean interface for sending/receiving messages, tracking connection state, and optional auto-reconnection with exponential backoff. Events emitted: - `open` connection established - `message` — message received (JSON-parsed when possible) - `close` connection closed (with code and reason) - `error` — connection error - `reconnecting` — attempting reconnection (with attempt number)",
23264
+ "shortcut": "clients.websocket",
23265
+ "className": "WebSocketClient",
23273
23266
  "methods": {
23274
- "beforeRequest": {
23275
- "description": "Inject the xi-api-key header before each request.",
23276
- "parameters": {},
23277
- "required": [],
23278
- "returns": "void"
23279
- },
23280
23267
  "connect": {
23281
- "description": "Validate the API key by listing available models.",
23268
+ "description": "Establish a WebSocket connection to the configured baseURL. Wires all raw WebSocket events (open, message, close, error) to the Helper event bus and updates connection state accordingly. Resolves once the connection is open; rejects on error.",
23282
23269
  "parameters": {},
23283
23270
  "required": [],
23284
- "returns": "Promise<this>",
23285
- "examples": [
23286
- {
23287
- "language": "ts",
23288
- "code": "await el.connect()"
23289
- }
23290
- ]
23291
- },
23292
- "listVoices": {
23293
- "description": "List available voices with optional search and filtering.",
23294
- "parameters": {
23295
- "options": {
23296
- "type": "{\n search?: string\n category?: string\n voice_type?: string\n page_size?: number\n next_page_token?: string\n }",
23297
- "description": "Query parameters for filtering voices"
23298
- }
23299
- },
23300
- "required": [],
23301
- "returns": "Promise<any>",
23302
- "examples": [
23303
- {
23304
- "language": "ts",
23305
- "code": "const voices = await el.listVoices()\nconst premade = await el.listVoices({ category: 'premade' })"
23306
- }
23307
- ]
23271
+ "returns": "Promise<this>"
23308
23272
  },
23309
- "getVoice": {
23310
- "description": "Get details for a single voice.",
23273
+ "send": {
23274
+ "description": "Send data over the WebSocket connection. Automatically JSON-serializes the payload. If not currently connected, attempts to connect first.",
23311
23275
  "parameters": {
23312
- "voiceId": {
23313
- "type": "string",
23314
- "description": "The voice ID to look up"
23276
+ "data": {
23277
+ "type": "any",
23278
+ "description": "The data to send (will be JSON.stringify'd)"
23315
23279
  }
23316
23280
  },
23317
23281
  "required": [
23318
- "voiceId"
23282
+ "data"
23319
23283
  ],
23320
- "returns": "Promise<any>",
23321
- "examples": [
23322
- {
23323
- "language": "ts",
23324
- "code": "const voice = await el.getVoice('21m00Tcm4TlvDq8ikWAM')\nconsole.log(voice.name, voice.settings)"
23325
- }
23326
- ]
23284
+ "returns": "Promise<void>"
23327
23285
  },
23328
- "listModels": {
23329
- "description": "List available TTS models.",
23286
+ "disconnect": {
23287
+ "description": "Gracefully close the WebSocket connection. Suppresses auto-reconnect and updates connection state to disconnected.",
23330
23288
  "parameters": {},
23331
23289
  "required": [],
23332
- "returns": "Promise<any[]>",
23333
- "examples": [
23334
- {
23335
- "language": "ts",
23336
- "code": "const models = await el.listModels()\nconsole.log(models.map(m => m.model_id))"
23337
- }
23338
- ]
23339
- },
23340
- "synthesize": {
23341
- "description": "Synthesize speech from text, returning audio as a Buffer.",
23342
- "parameters": {
23343
- "text": {
23344
- "type": "string",
23345
- "description": "The text to convert to speech"
23346
- },
23347
- "options": {
23348
- "type": "SynthesizeOptions",
23349
- "description": "Voice, model, format, and voice settings overrides",
23350
- "properties": {
23351
- "voiceId": {
23352
- "type": "string",
23353
- "description": ""
23354
- },
23355
- "modelId": {
23356
- "type": "string",
23357
- "description": ""
23358
- },
23359
- "outputFormat": {
23360
- "type": "string",
23361
- "description": ""
23362
- },
23363
- "voiceSettings": {
23364
- "type": "ElevenLabsVoiceSettings",
23365
- "description": ""
23366
- },
23367
- "disableCache": {
23368
- "type": "boolean",
23369
- "description": ""
23370
- }
23371
- }
23372
- }
23373
- },
23374
- "required": [
23375
- "text"
23376
- ],
23377
- "returns": "Promise<Buffer>",
23378
- "examples": [
23379
- {
23380
- "language": "ts",
23381
- "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})"
23382
- }
23383
- ]
23384
- },
23385
- "say": {
23386
- "description": "Synthesize speech and write the audio to a file.",
23387
- "parameters": {
23388
- "text": {
23389
- "type": "string",
23390
- "description": "The text to convert to speech"
23391
- },
23392
- "outputPath": {
23393
- "type": "string",
23394
- "description": "File path to write the audio to"
23395
- },
23396
- "options": {
23397
- "type": "SynthesizeOptions",
23398
- "description": "Voice, model, format, and voice settings overrides",
23399
- "properties": {
23400
- "voiceId": {
23401
- "type": "string",
23402
- "description": ""
23403
- },
23404
- "modelId": {
23405
- "type": "string",
23406
- "description": ""
23407
- },
23408
- "outputFormat": {
23409
- "type": "string",
23410
- "description": ""
23411
- },
23412
- "voiceSettings": {
23413
- "type": "ElevenLabsVoiceSettings",
23414
- "description": ""
23415
- },
23416
- "disableCache": {
23417
- "type": "boolean",
23418
- "description": ""
23419
- }
23420
- }
23421
- }
23422
- },
23423
- "required": [
23424
- "text",
23425
- "outputPath"
23426
- ],
23427
- "returns": "Promise<string>",
23428
- "examples": [
23429
- {
23430
- "language": "ts",
23431
- "code": "const path = await el.say('Hello world', './hello.mp3')\nconsole.log(`Audio saved to ${path}`)"
23432
- }
23433
- ]
23290
+ "returns": "Promise<this>"
23434
23291
  }
23435
23292
  },
23436
23293
  "getters": {
23437
- "apiKey": {
23438
- "description": "The resolved API key from options or environment.",
23439
- "returns": "string"
23294
+ "hasError": {
23295
+ "description": "Whether the client is in an error state.",
23296
+ "returns": "any"
23440
23297
  }
23441
23298
  },
23442
23299
  "events": {
23443
- "failure": {
23444
- "name": "failure",
23445
- "description": "Event emitted by ElevenLabsClient",
23300
+ "open": {
23301
+ "name": "open",
23302
+ "description": "Event emitted by WebSocketClient",
23303
+ "arguments": {}
23304
+ },
23305
+ "error": {
23306
+ "name": "error",
23307
+ "description": "Event emitted by WebSocketClient",
23446
23308
  "arguments": {}
23447
23309
  },
23448
- "voices": {
23449
- "name": "voices",
23450
- "description": "Event emitted by ElevenLabsClient",
23310
+ "message": {
23311
+ "name": "message",
23312
+ "description": "Event emitted by WebSocketClient",
23451
23313
  "arguments": {}
23452
23314
  },
23453
- "speech": {
23454
- "name": "speech",
23455
- "description": "Event emitted by ElevenLabsClient",
23315
+ "close": {
23316
+ "name": "close",
23317
+ "description": "Event emitted by WebSocketClient",
23318
+ "arguments": {}
23319
+ },
23320
+ "reconnecting": {
23321
+ "name": "reconnecting",
23322
+ "description": "Event emitted by WebSocketClient",
23456
23323
  "arguments": {}
23457
23324
  }
23458
23325
  },
@@ -23462,7 +23329,7 @@ export const introspectionData = [
23462
23329
  "examples": [
23463
23330
  {
23464
23331
  "language": "ts",
23465
- "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"
23332
+ "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' })"
23466
23333
  }
23467
23334
  ]
23468
23335
  },
@@ -23637,27 +23504,294 @@ export const introspectionData = [
23637
23504
  }
23638
23505
  },
23639
23506
  "getters": {
23640
- "sdk": {
23641
- "description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
23642
- "returns": "SupabaseSDKClient<any, any>"
23507
+ "sdk": {
23508
+ "description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
23509
+ "returns": "SupabaseSDKClient<any, any>"
23510
+ },
23511
+ "storage": {
23512
+ "description": "Returns the Supabase Storage client for managing buckets and files.",
23513
+ "returns": "any"
23514
+ },
23515
+ "functions": {
23516
+ "description": "Returns the Supabase Functions client.",
23517
+ "returns": "any"
23518
+ }
23519
+ },
23520
+ "events": {},
23521
+ "state": {},
23522
+ "options": {},
23523
+ "envVars": [],
23524
+ "examples": [
23525
+ {
23526
+ "language": "ts",
23527
+ "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})"
23528
+ }
23529
+ ]
23530
+ },
23531
+ {
23532
+ "id": "clients.openai",
23533
+ "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.",
23534
+ "shortcut": "clients.openai",
23535
+ "className": "OpenAIClient",
23536
+ "methods": {
23537
+ "connect": {
23538
+ "description": "Test the API connection by listing models.",
23539
+ "parameters": {},
23540
+ "required": [],
23541
+ "returns": "Promise<this>",
23542
+ "examples": [
23543
+ {
23544
+ "language": "ts",
23545
+ "code": "await openai.connect()"
23546
+ }
23547
+ ]
23548
+ },
23549
+ "createChatCompletion": {
23550
+ "description": "Create a chat completion using the Chat Completions API.",
23551
+ "parameters": {
23552
+ "messages": {
23553
+ "type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
23554
+ "description": "Array of chat messages"
23555
+ },
23556
+ "options": {
23557
+ "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
23558
+ "description": "Additional parameters for the completion"
23559
+ }
23560
+ },
23561
+ "required": [
23562
+ "messages"
23563
+ ],
23564
+ "returns": "Promise<OpenAI.Chat.Completions.ChatCompletion>",
23565
+ "examples": [
23566
+ {
23567
+ "language": "ts",
23568
+ "code": "const response = await openai.createChatCompletion([\n { role: 'system', content: 'You are a helpful assistant.' },\n { role: 'user', content: 'Hello!' }\n])\nconsole.log(response.choices[0]?.message?.content)"
23569
+ }
23570
+ ]
23571
+ },
23572
+ "createResponse": {
23573
+ "description": "Create a response using the Responses API.",
23574
+ "parameters": {
23575
+ "input": {
23576
+ "type": "OpenAI.Responses.ResponseInput | string",
23577
+ "description": "The input prompt or message array"
23578
+ },
23579
+ "options": {
23580
+ "type": "Partial<OpenAI.Responses.ResponseCreateParamsNonStreaming>",
23581
+ "description": "Additional parameters for the response"
23582
+ }
23583
+ },
23584
+ "required": [
23585
+ "input"
23586
+ ],
23587
+ "returns": "Promise<OpenAI.Responses.Response>",
23588
+ "examples": [
23589
+ {
23590
+ "language": "ts",
23591
+ "code": "const response = await openai.createResponse('Explain quantum computing')"
23592
+ }
23593
+ ]
23594
+ },
23595
+ "streamResponse": {
23596
+ "description": "Stream a response using the Responses API.",
23597
+ "parameters": {
23598
+ "input": {
23599
+ "type": "OpenAI.Responses.ResponseInput | string",
23600
+ "description": "The input prompt or message array"
23601
+ },
23602
+ "options": {
23603
+ "type": "Partial<OpenAI.Responses.ResponseCreateParamsStreaming>",
23604
+ "description": "Additional parameters for the streaming response"
23605
+ }
23606
+ },
23607
+ "required": [
23608
+ "input"
23609
+ ],
23610
+ "returns": "Promise<AsyncIterable<OpenAI.Responses.ResponseStreamEvent>>",
23611
+ "examples": [
23612
+ {
23613
+ "language": "ts",
23614
+ "code": "const stream = await openai.streamResponse('Write a poem')\nfor await (const event of stream) {\n if (event.type === 'response.output_text.delta') {\n process.stdout.write(event.delta)\n }\n}"
23615
+ }
23616
+ ]
23617
+ },
23618
+ "createCompletion": {
23619
+ "description": "Create a legacy text completion.",
23620
+ "parameters": {
23621
+ "prompt": {
23622
+ "type": "string",
23623
+ "description": "The text prompt to complete"
23624
+ },
23625
+ "options": {
23626
+ "type": "Partial<OpenAI.Completions.CompletionCreateParams>",
23627
+ "description": "Additional parameters for the completion"
23628
+ }
23629
+ },
23630
+ "required": [
23631
+ "prompt"
23632
+ ],
23633
+ "returns": "Promise<OpenAI.Completions.Completion>",
23634
+ "examples": [
23635
+ {
23636
+ "language": "ts",
23637
+ "code": "const response = await openai.createCompletion('Once upon a time')"
23638
+ }
23639
+ ]
23640
+ },
23641
+ "createEmbedding": {
23642
+ "description": "Create text embeddings for semantic search or similarity comparisons.",
23643
+ "parameters": {
23644
+ "input": {
23645
+ "type": "string | string[]",
23646
+ "description": "A string or array of strings to embed"
23647
+ },
23648
+ "options": {
23649
+ "type": "Partial<OpenAI.Embeddings.EmbeddingCreateParams>",
23650
+ "description": "Additional parameters (model, etc.)"
23651
+ }
23652
+ },
23653
+ "required": [
23654
+ "input"
23655
+ ],
23656
+ "returns": "Promise<OpenAI.Embeddings.CreateEmbeddingResponse>",
23657
+ "examples": [
23658
+ {
23659
+ "language": "ts",
23660
+ "code": "const response = await openai.createEmbedding('Hello world')\nconsole.log(response.data[0].embedding.length)"
23661
+ }
23662
+ ]
23663
+ },
23664
+ "createImage": {
23665
+ "description": "Generate an image from a text prompt using DALL-E.",
23666
+ "parameters": {
23667
+ "prompt": {
23668
+ "type": "string",
23669
+ "description": "Description of the image to generate"
23670
+ },
23671
+ "options": {
23672
+ "type": "Partial<OpenAI.Images.ImageGenerateParams>",
23673
+ "description": "Additional parameters (size, n, etc.)"
23674
+ }
23675
+ },
23676
+ "required": [
23677
+ "prompt"
23678
+ ],
23679
+ "returns": "Promise<OpenAI.Images.ImagesResponse>",
23680
+ "examples": [
23681
+ {
23682
+ "language": "ts",
23683
+ "code": "const response = await openai.createImage('A sunset over mountains')\nconsole.log(response.data[0].url)"
23684
+ }
23685
+ ]
23686
+ },
23687
+ "listModels": {
23688
+ "description": "List all available models.",
23689
+ "parameters": {},
23690
+ "required": [],
23691
+ "returns": "Promise<OpenAI.Models.ModelsPage>",
23692
+ "examples": [
23693
+ {
23694
+ "language": "ts",
23695
+ "code": "const models = await openai.listModels()"
23696
+ }
23697
+ ]
23698
+ },
23699
+ "ask": {
23700
+ "description": "Ask a single question and get a text response. Convenience wrapper around `createChatCompletion` for simple Q&A.",
23701
+ "parameters": {
23702
+ "question": {
23703
+ "type": "string",
23704
+ "description": "The question to ask"
23705
+ },
23706
+ "options": {
23707
+ "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
23708
+ "description": "Additional completion parameters"
23709
+ }
23710
+ },
23711
+ "required": [
23712
+ "question"
23713
+ ],
23714
+ "returns": "Promise<string>",
23715
+ "examples": [
23716
+ {
23717
+ "language": "ts",
23718
+ "code": "const answer = await openai.ask('What is 2 + 2?')\nconsole.log(answer) // '4'"
23719
+ }
23720
+ ]
23721
+ },
23722
+ "chat": {
23723
+ "description": "Send a multi-turn conversation and get a text response. Convenience wrapper around `createChatCompletion` that returns just the text.",
23724
+ "parameters": {
23725
+ "messages": {
23726
+ "type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
23727
+ "description": "Array of chat messages"
23728
+ },
23729
+ "options": {
23730
+ "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
23731
+ "description": "Additional completion parameters"
23732
+ }
23733
+ },
23734
+ "required": [
23735
+ "messages"
23736
+ ],
23737
+ "returns": "Promise<string>",
23738
+ "examples": [
23739
+ {
23740
+ "language": "ts",
23741
+ "code": "const reply = await openai.chat([\n { role: 'system', content: 'You are a pirate.' },\n { role: 'user', content: 'Hello!' }\n])"
23742
+ }
23743
+ ]
23744
+ }
23745
+ },
23746
+ "getters": {
23747
+ "defaultModel": {
23748
+ "description": "The default model used for completions, from options or 'gpt-4o'.",
23749
+ "returns": "string"
23643
23750
  },
23644
- "storage": {
23645
- "description": "Returns the Supabase Storage client for managing buckets and files.",
23646
- "returns": "any"
23751
+ "raw": {
23752
+ "description": "The underlying OpenAI SDK instance for advanced use cases.",
23753
+ "returns": "OpenAI"
23754
+ }
23755
+ },
23756
+ "events": {
23757
+ "connected": {
23758
+ "name": "connected",
23759
+ "description": "Event emitted by OpenAIClient",
23760
+ "arguments": {}
23647
23761
  },
23648
- "functions": {
23649
- "description": "Returns the Supabase Functions client.",
23650
- "returns": "any"
23762
+ "failure": {
23763
+ "name": "failure",
23764
+ "description": "Event emitted by OpenAIClient",
23765
+ "arguments": {}
23766
+ },
23767
+ "completion": {
23768
+ "name": "completion",
23769
+ "description": "Event emitted by OpenAIClient",
23770
+ "arguments": {}
23771
+ },
23772
+ "embedding": {
23773
+ "name": "embedding",
23774
+ "description": "Event emitted by OpenAIClient",
23775
+ "arguments": {}
23776
+ },
23777
+ "image": {
23778
+ "name": "image",
23779
+ "description": "Event emitted by OpenAIClient",
23780
+ "arguments": {}
23781
+ },
23782
+ "models": {
23783
+ "name": "models",
23784
+ "description": "Event emitted by OpenAIClient",
23785
+ "arguments": {}
23651
23786
  }
23652
23787
  },
23653
- "events": {},
23654
23788
  "state": {},
23655
23789
  "options": {},
23656
23790
  "envVars": [],
23657
23791
  "examples": [
23658
23792
  {
23659
23793
  "language": "ts",
23660
- "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})"
23794
+ "code": "const openai = container.client('openai', { defaultModel: 'gpt-4o' })\nconst answer = await openai.ask('What is the meaning of life?')\nconsole.log(answer)"
23661
23795
  }
23662
23796
  ]
23663
23797
  },
@@ -23912,6 +24046,207 @@ export const introspectionData = [
23912
24046
  }
23913
24047
  ]
23914
24048
  },
24049
+ {
24050
+ "id": "clients.elevenlabs",
24051
+ "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.",
24052
+ "shortcut": "clients.elevenlabs",
24053
+ "className": "ElevenLabsClient",
24054
+ "methods": {
24055
+ "beforeRequest": {
24056
+ "description": "Inject the xi-api-key header before each request.",
24057
+ "parameters": {},
24058
+ "required": [],
24059
+ "returns": "void"
24060
+ },
24061
+ "connect": {
24062
+ "description": "Validate the API key by listing available models.",
24063
+ "parameters": {},
24064
+ "required": [],
24065
+ "returns": "Promise<this>",
24066
+ "examples": [
24067
+ {
24068
+ "language": "ts",
24069
+ "code": "await el.connect()"
24070
+ }
24071
+ ]
24072
+ },
24073
+ "listVoices": {
24074
+ "description": "List available voices with optional search and filtering.",
24075
+ "parameters": {
24076
+ "options": {
24077
+ "type": "{\n search?: string\n category?: string\n voice_type?: string\n page_size?: number\n next_page_token?: string\n }",
24078
+ "description": "Query parameters for filtering voices"
24079
+ }
24080
+ },
24081
+ "required": [],
24082
+ "returns": "Promise<any>",
24083
+ "examples": [
24084
+ {
24085
+ "language": "ts",
24086
+ "code": "const voices = await el.listVoices()\nconst premade = await el.listVoices({ category: 'premade' })"
24087
+ }
24088
+ ]
24089
+ },
24090
+ "getVoice": {
24091
+ "description": "Get details for a single voice.",
24092
+ "parameters": {
24093
+ "voiceId": {
24094
+ "type": "string",
24095
+ "description": "The voice ID to look up"
24096
+ }
24097
+ },
24098
+ "required": [
24099
+ "voiceId"
24100
+ ],
24101
+ "returns": "Promise<any>",
24102
+ "examples": [
24103
+ {
24104
+ "language": "ts",
24105
+ "code": "const voice = await el.getVoice('21m00Tcm4TlvDq8ikWAM')\nconsole.log(voice.name, voice.settings)"
24106
+ }
24107
+ ]
24108
+ },
24109
+ "listModels": {
24110
+ "description": "List available TTS models.",
24111
+ "parameters": {},
24112
+ "required": [],
24113
+ "returns": "Promise<any[]>",
24114
+ "examples": [
24115
+ {
24116
+ "language": "ts",
24117
+ "code": "const models = await el.listModels()\nconsole.log(models.map(m => m.model_id))"
24118
+ }
24119
+ ]
24120
+ },
24121
+ "synthesize": {
24122
+ "description": "Synthesize speech from text, returning audio as a Buffer.",
24123
+ "parameters": {
24124
+ "text": {
24125
+ "type": "string",
24126
+ "description": "The text to convert to speech"
24127
+ },
24128
+ "options": {
24129
+ "type": "SynthesizeOptions",
24130
+ "description": "Voice, model, format, and voice settings overrides",
24131
+ "properties": {
24132
+ "voiceId": {
24133
+ "type": "string",
24134
+ "description": ""
24135
+ },
24136
+ "modelId": {
24137
+ "type": "string",
24138
+ "description": ""
24139
+ },
24140
+ "outputFormat": {
24141
+ "type": "string",
24142
+ "description": ""
24143
+ },
24144
+ "voiceSettings": {
24145
+ "type": "ElevenLabsVoiceSettings",
24146
+ "description": ""
24147
+ },
24148
+ "disableCache": {
24149
+ "type": "boolean",
24150
+ "description": ""
24151
+ }
24152
+ }
24153
+ }
24154
+ },
24155
+ "required": [
24156
+ "text"
24157
+ ],
24158
+ "returns": "Promise<Buffer>",
24159
+ "examples": [
24160
+ {
24161
+ "language": "ts",
24162
+ "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})"
24163
+ }
24164
+ ]
24165
+ },
24166
+ "say": {
24167
+ "description": "Synthesize speech and write the audio to a file.",
24168
+ "parameters": {
24169
+ "text": {
24170
+ "type": "string",
24171
+ "description": "The text to convert to speech"
24172
+ },
24173
+ "outputPath": {
24174
+ "type": "string",
24175
+ "description": "File path to write the audio to"
24176
+ },
24177
+ "options": {
24178
+ "type": "SynthesizeOptions",
24179
+ "description": "Voice, model, format, and voice settings overrides",
24180
+ "properties": {
24181
+ "voiceId": {
24182
+ "type": "string",
24183
+ "description": ""
24184
+ },
24185
+ "modelId": {
24186
+ "type": "string",
24187
+ "description": ""
24188
+ },
24189
+ "outputFormat": {
24190
+ "type": "string",
24191
+ "description": ""
24192
+ },
24193
+ "voiceSettings": {
24194
+ "type": "ElevenLabsVoiceSettings",
24195
+ "description": ""
24196
+ },
24197
+ "disableCache": {
24198
+ "type": "boolean",
24199
+ "description": ""
24200
+ }
24201
+ }
24202
+ }
24203
+ },
24204
+ "required": [
24205
+ "text",
24206
+ "outputPath"
24207
+ ],
24208
+ "returns": "Promise<string>",
24209
+ "examples": [
24210
+ {
24211
+ "language": "ts",
24212
+ "code": "const path = await el.say('Hello world', './hello.mp3')\nconsole.log(`Audio saved to ${path}`)"
24213
+ }
24214
+ ]
24215
+ }
24216
+ },
24217
+ "getters": {
24218
+ "apiKey": {
24219
+ "description": "The resolved API key from options or environment.",
24220
+ "returns": "string"
24221
+ }
24222
+ },
24223
+ "events": {
24224
+ "failure": {
24225
+ "name": "failure",
24226
+ "description": "Event emitted by ElevenLabsClient",
24227
+ "arguments": {}
24228
+ },
24229
+ "voices": {
24230
+ "name": "voices",
24231
+ "description": "Event emitted by ElevenLabsClient",
24232
+ "arguments": {}
24233
+ },
24234
+ "speech": {
24235
+ "name": "speech",
24236
+ "description": "Event emitted by ElevenLabsClient",
24237
+ "arguments": {}
24238
+ }
24239
+ },
24240
+ "state": {},
24241
+ "options": {},
24242
+ "envVars": [],
24243
+ "examples": [
24244
+ {
24245
+ "language": "ts",
24246
+ "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"
24247
+ }
24248
+ ]
24249
+ },
23915
24250
  {
23916
24251
  "id": "servers.mcp",
23917
24252
  "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).",