@soederpop/luca 0.0.21 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/prompts/check-for-undocumented-features.md +27 -0
- package/luca.cli.ts +14 -1
- package/package.json +1 -1
- package/src/bootstrap/generated.ts +1 -1
- package/src/cli/cli.ts +45 -6
- package/src/commands/prompt.ts +18 -2
- package/src/introspection/generated.agi.ts +1207 -872
- package/src/introspection/generated.node.ts +841 -506
- package/src/introspection/generated.web.ts +1 -1
- package/src/node/container.ts +31 -1
- package/src/node/features/google-auth.ts +1 -0
- package/src/node/features/google-calendar.ts +5 -0
- package/src/node/features/google-docs.ts +8 -1
- package/src/node/features/google-drive.ts +6 -0
- package/src/node/features/google-mail.ts +540 -0
- package/src/node/features/google-sheets.ts +6 -0
- package/src/scaffolds/generated.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { setBuildTimeData, setContainerBuildTimeData } from './index.js';
|
|
2
2
|
|
|
3
3
|
// Auto-generated introspection registry data
|
|
4
|
-
// Generated at: 2026-03-
|
|
4
|
+
// Generated at: 2026-03-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,347 +9687,79 @@ setBuildTimeData('clients.websocket', {
|
|
|
9519
9687
|
]
|
|
9520
9688
|
});
|
|
9521
9689
|
|
|
9522
|
-
setBuildTimeData('clients.
|
|
9523
|
-
"id": "clients.
|
|
9524
|
-
"description": "
|
|
9525
|
-
"shortcut": "clients.
|
|
9526
|
-
"className": "
|
|
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
|
-
"
|
|
9529
|
-
"description": "
|
|
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
|
-
"
|
|
9544
|
-
"type": "
|
|
9545
|
-
"description": "
|
|
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
|
-
"
|
|
9705
|
+
"table"
|
|
9554
9706
|
],
|
|
9555
|
-
"returns": "
|
|
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
|
-
"
|
|
9564
|
-
"description": "
|
|
9709
|
+
"rpc": {
|
|
9710
|
+
"description": "Call a Postgres function (RPC).",
|
|
9565
9711
|
"parameters": {
|
|
9566
|
-
"
|
|
9567
|
-
"type": "
|
|
9568
|
-
"description": "The
|
|
9712
|
+
"fn": {
|
|
9713
|
+
"type": "string",
|
|
9714
|
+
"description": "The function name"
|
|
9569
9715
|
},
|
|
9570
|
-
"
|
|
9571
|
-
"type": "
|
|
9572
|
-
"description": "
|
|
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": "
|
|
9595
|
-
"description": "
|
|
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
|
-
"
|
|
9726
|
+
"fn"
|
|
9600
9727
|
],
|
|
9601
|
-
"returns": "
|
|
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
|
-
"
|
|
9610
|
-
"description": "
|
|
9730
|
+
"signInWithPassword": {
|
|
9731
|
+
"description": "Sign in with email and password.",
|
|
9611
9732
|
"parameters": {
|
|
9612
|
-
"
|
|
9733
|
+
"email": {
|
|
9613
9734
|
"type": "string",
|
|
9614
|
-
"description": "
|
|
9735
|
+
"description": "Parameter email"
|
|
9615
9736
|
},
|
|
9616
|
-
"
|
|
9617
|
-
"type": "
|
|
9618
|
-
"description": "
|
|
9737
|
+
"password": {
|
|
9738
|
+
"type": "string",
|
|
9739
|
+
"description": "Parameter password"
|
|
9619
9740
|
}
|
|
9620
9741
|
},
|
|
9621
9742
|
"required": [
|
|
9622
|
-
"
|
|
9743
|
+
"email",
|
|
9744
|
+
"password"
|
|
9623
9745
|
],
|
|
9624
|
-
"returns": "
|
|
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
|
-
"
|
|
9633
|
-
"description": "Create
|
|
9748
|
+
"signUp": {
|
|
9749
|
+
"description": "Create a new user account with email and password.",
|
|
9634
9750
|
"parameters": {
|
|
9635
|
-
"
|
|
9636
|
-
"type": "string
|
|
9637
|
-
"description": "
|
|
9751
|
+
"email": {
|
|
9752
|
+
"type": "string",
|
|
9753
|
+
"description": "Parameter email"
|
|
9638
9754
|
},
|
|
9639
|
-
"
|
|
9640
|
-
"type": "
|
|
9641
|
-
"description": "
|
|
9755
|
+
"password": {
|
|
9756
|
+
"type": "string",
|
|
9757
|
+
"description": "Parameter password"
|
|
9642
9758
|
}
|
|
9643
9759
|
},
|
|
9644
9760
|
"required": [
|
|
9645
|
-
"
|
|
9646
|
-
|
|
9647
|
-
"returns": "Promise<OpenAI.Embeddings.CreateEmbeddingResponse>",
|
|
9648
|
-
"examples": [
|
|
9649
|
-
{
|
|
9650
|
-
"language": "ts",
|
|
9651
|
-
"code": "const response = await openai.createEmbedding('Hello world')\nconsole.log(response.data[0].embedding.length)"
|
|
9652
|
-
}
|
|
9653
|
-
]
|
|
9654
|
-
},
|
|
9655
|
-
"createImage": {
|
|
9656
|
-
"description": "Generate an image from a text prompt using DALL-E.",
|
|
9657
|
-
"parameters": {
|
|
9658
|
-
"prompt": {
|
|
9659
|
-
"type": "string",
|
|
9660
|
-
"description": "Description of the image to generate"
|
|
9661
|
-
},
|
|
9662
|
-
"options": {
|
|
9663
|
-
"type": "Partial<OpenAI.Images.ImageGenerateParams>",
|
|
9664
|
-
"description": "Additional parameters (size, n, etc.)"
|
|
9665
|
-
}
|
|
9666
|
-
},
|
|
9667
|
-
"required": [
|
|
9668
|
-
"prompt"
|
|
9669
|
-
],
|
|
9670
|
-
"returns": "Promise<OpenAI.Images.ImagesResponse>",
|
|
9671
|
-
"examples": [
|
|
9672
|
-
{
|
|
9673
|
-
"language": "ts",
|
|
9674
|
-
"code": "const response = await openai.createImage('A sunset over mountains')\nconsole.log(response.data[0].url)"
|
|
9675
|
-
}
|
|
9676
|
-
]
|
|
9677
|
-
},
|
|
9678
|
-
"listModels": {
|
|
9679
|
-
"description": "List all available models.",
|
|
9680
|
-
"parameters": {},
|
|
9681
|
-
"required": [],
|
|
9682
|
-
"returns": "Promise<OpenAI.Models.ModelsPage>",
|
|
9683
|
-
"examples": [
|
|
9684
|
-
{
|
|
9685
|
-
"language": "ts",
|
|
9686
|
-
"code": "const models = await openai.listModels()"
|
|
9687
|
-
}
|
|
9688
|
-
]
|
|
9689
|
-
},
|
|
9690
|
-
"ask": {
|
|
9691
|
-
"description": "Ask a single question and get a text response. Convenience wrapper around `createChatCompletion` for simple Q&A.",
|
|
9692
|
-
"parameters": {
|
|
9693
|
-
"question": {
|
|
9694
|
-
"type": "string",
|
|
9695
|
-
"description": "The question to ask"
|
|
9696
|
-
},
|
|
9697
|
-
"options": {
|
|
9698
|
-
"type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
|
|
9699
|
-
"description": "Additional completion parameters"
|
|
9700
|
-
}
|
|
9701
|
-
},
|
|
9702
|
-
"required": [
|
|
9703
|
-
"question"
|
|
9704
|
-
],
|
|
9705
|
-
"returns": "Promise<string>",
|
|
9706
|
-
"examples": [
|
|
9707
|
-
{
|
|
9708
|
-
"language": "ts",
|
|
9709
|
-
"code": "const answer = await openai.ask('What is 2 + 2?')\nconsole.log(answer) // '4'"
|
|
9710
|
-
}
|
|
9711
|
-
]
|
|
9712
|
-
},
|
|
9713
|
-
"chat": {
|
|
9714
|
-
"description": "Send a multi-turn conversation and get a text response. Convenience wrapper around `createChatCompletion` that returns just the text.",
|
|
9715
|
-
"parameters": {
|
|
9716
|
-
"messages": {
|
|
9717
|
-
"type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
|
|
9718
|
-
"description": "Array of chat messages"
|
|
9719
|
-
},
|
|
9720
|
-
"options": {
|
|
9721
|
-
"type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
|
|
9722
|
-
"description": "Additional completion parameters"
|
|
9723
|
-
}
|
|
9724
|
-
},
|
|
9725
|
-
"required": [
|
|
9726
|
-
"messages"
|
|
9727
|
-
],
|
|
9728
|
-
"returns": "Promise<string>",
|
|
9729
|
-
"examples": [
|
|
9730
|
-
{
|
|
9731
|
-
"language": "ts",
|
|
9732
|
-
"code": "const reply = await openai.chat([\n { role: 'system', content: 'You are a pirate.' },\n { role: 'user', content: 'Hello!' }\n])"
|
|
9733
|
-
}
|
|
9734
|
-
]
|
|
9735
|
-
}
|
|
9736
|
-
},
|
|
9737
|
-
"getters": {
|
|
9738
|
-
"defaultModel": {
|
|
9739
|
-
"description": "The default model used for completions, from options or 'gpt-4o'.",
|
|
9740
|
-
"returns": "string"
|
|
9741
|
-
},
|
|
9742
|
-
"raw": {
|
|
9743
|
-
"description": "The underlying OpenAI SDK instance for advanced use cases.",
|
|
9744
|
-
"returns": "OpenAI"
|
|
9745
|
-
}
|
|
9746
|
-
},
|
|
9747
|
-
"events": {
|
|
9748
|
-
"connected": {
|
|
9749
|
-
"name": "connected",
|
|
9750
|
-
"description": "Event emitted by OpenAIClient",
|
|
9751
|
-
"arguments": {}
|
|
9752
|
-
},
|
|
9753
|
-
"failure": {
|
|
9754
|
-
"name": "failure",
|
|
9755
|
-
"description": "Event emitted by OpenAIClient",
|
|
9756
|
-
"arguments": {}
|
|
9757
|
-
},
|
|
9758
|
-
"completion": {
|
|
9759
|
-
"name": "completion",
|
|
9760
|
-
"description": "Event emitted by OpenAIClient",
|
|
9761
|
-
"arguments": {}
|
|
9762
|
-
},
|
|
9763
|
-
"embedding": {
|
|
9764
|
-
"name": "embedding",
|
|
9765
|
-
"description": "Event emitted by OpenAIClient",
|
|
9766
|
-
"arguments": {}
|
|
9767
|
-
},
|
|
9768
|
-
"image": {
|
|
9769
|
-
"name": "image",
|
|
9770
|
-
"description": "Event emitted by OpenAIClient",
|
|
9771
|
-
"arguments": {}
|
|
9772
|
-
},
|
|
9773
|
-
"models": {
|
|
9774
|
-
"name": "models",
|
|
9775
|
-
"description": "Event emitted by OpenAIClient",
|
|
9776
|
-
"arguments": {}
|
|
9777
|
-
}
|
|
9778
|
-
},
|
|
9779
|
-
"state": {},
|
|
9780
|
-
"options": {},
|
|
9781
|
-
"envVars": [],
|
|
9782
|
-
"examples": [
|
|
9783
|
-
{
|
|
9784
|
-
"language": "ts",
|
|
9785
|
-
"code": "const openai = container.client('openai', { defaultModel: 'gpt-4o' })\nconst answer = await openai.ask('What is the meaning of life?')\nconsole.log(answer)"
|
|
9786
|
-
}
|
|
9787
|
-
]
|
|
9788
|
-
});
|
|
9789
|
-
|
|
9790
|
-
setBuildTimeData('clients.supabase', {
|
|
9791
|
-
"id": "clients.supabase",
|
|
9792
|
-
"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).",
|
|
9793
|
-
"shortcut": "clients.supabase",
|
|
9794
|
-
"className": "SupabaseClient",
|
|
9795
|
-
"methods": {
|
|
9796
|
-
"from": {
|
|
9797
|
-
"description": "Start a query on a Postgres table or view.",
|
|
9798
|
-
"parameters": {
|
|
9799
|
-
"table": {
|
|
9800
|
-
"type": "string",
|
|
9801
|
-
"description": "The table or view name to query"
|
|
9802
|
-
}
|
|
9803
|
-
},
|
|
9804
|
-
"required": [
|
|
9805
|
-
"table"
|
|
9806
|
-
],
|
|
9807
|
-
"returns": "void"
|
|
9808
|
-
},
|
|
9809
|
-
"rpc": {
|
|
9810
|
-
"description": "Call a Postgres function (RPC).",
|
|
9811
|
-
"parameters": {
|
|
9812
|
-
"fn": {
|
|
9813
|
-
"type": "string",
|
|
9814
|
-
"description": "The function name"
|
|
9815
|
-
},
|
|
9816
|
-
"params": {
|
|
9817
|
-
"type": "Record<string, unknown>",
|
|
9818
|
-
"description": "Arguments to pass to the function"
|
|
9819
|
-
},
|
|
9820
|
-
"options": {
|
|
9821
|
-
"type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
|
|
9822
|
-
"description": "Optional settings (head, get, count)"
|
|
9823
|
-
}
|
|
9824
|
-
},
|
|
9825
|
-
"required": [
|
|
9826
|
-
"fn"
|
|
9827
|
-
],
|
|
9828
|
-
"returns": "void"
|
|
9829
|
-
},
|
|
9830
|
-
"signInWithPassword": {
|
|
9831
|
-
"description": "Sign in with email and password.",
|
|
9832
|
-
"parameters": {
|
|
9833
|
-
"email": {
|
|
9834
|
-
"type": "string",
|
|
9835
|
-
"description": "Parameter email"
|
|
9836
|
-
},
|
|
9837
|
-
"password": {
|
|
9838
|
-
"type": "string",
|
|
9839
|
-
"description": "Parameter password"
|
|
9840
|
-
}
|
|
9841
|
-
},
|
|
9842
|
-
"required": [
|
|
9843
|
-
"email",
|
|
9844
|
-
"password"
|
|
9845
|
-
],
|
|
9846
|
-
"returns": "void"
|
|
9847
|
-
},
|
|
9848
|
-
"signUp": {
|
|
9849
|
-
"description": "Create a new user account with email and password.",
|
|
9850
|
-
"parameters": {
|
|
9851
|
-
"email": {
|
|
9852
|
-
"type": "string",
|
|
9853
|
-
"description": "Parameter email"
|
|
9854
|
-
},
|
|
9855
|
-
"password": {
|
|
9856
|
-
"type": "string",
|
|
9857
|
-
"description": "Parameter password"
|
|
9858
|
-
}
|
|
9859
|
-
},
|
|
9860
|
-
"required": [
|
|
9861
|
-
"email",
|
|
9862
|
-
"password"
|
|
9761
|
+
"email",
|
|
9762
|
+
"password"
|
|
9863
9763
|
],
|
|
9864
9764
|
"returns": "void"
|
|
9865
9765
|
},
|
|
@@ -9983,194 +9883,260 @@ setBuildTimeData('clients.supabase', {
|
|
|
9983
9883
|
]
|
|
9984
9884
|
});
|
|
9985
9885
|
|
|
9986
|
-
setBuildTimeData('clients.
|
|
9987
|
-
"id": "clients.
|
|
9988
|
-
"description": "
|
|
9989
|
-
"shortcut": "clients.
|
|
9990
|
-
"className": "
|
|
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",
|
|
9991
9891
|
"methods": {
|
|
9992
|
-
"beforeRequest": {
|
|
9993
|
-
"description": "Inject the xi-api-key header before each request.",
|
|
9994
|
-
"parameters": {},
|
|
9995
|
-
"required": [],
|
|
9996
|
-
"returns": "void"
|
|
9997
|
-
},
|
|
9998
9892
|
"connect": {
|
|
9999
|
-
"description": "
|
|
9893
|
+
"description": "Test the API connection by listing models.",
|
|
10000
9894
|
"parameters": {},
|
|
10001
9895
|
"required": [],
|
|
10002
9896
|
"returns": "Promise<this>",
|
|
10003
9897
|
"examples": [
|
|
10004
9898
|
{
|
|
10005
9899
|
"language": "ts",
|
|
10006
|
-
"code": "await
|
|
9900
|
+
"code": "await openai.connect()"
|
|
10007
9901
|
}
|
|
10008
9902
|
]
|
|
10009
9903
|
},
|
|
10010
|
-
"
|
|
10011
|
-
"description": "
|
|
9904
|
+
"createChatCompletion": {
|
|
9905
|
+
"description": "Create a chat completion using the Chat Completions API.",
|
|
10012
9906
|
"parameters": {
|
|
9907
|
+
"messages": {
|
|
9908
|
+
"type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
|
|
9909
|
+
"description": "Array of chat messages"
|
|
9910
|
+
},
|
|
10013
9911
|
"options": {
|
|
10014
|
-
"type": "
|
|
10015
|
-
"description": "
|
|
9912
|
+
"type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
|
|
9913
|
+
"description": "Additional parameters for the completion"
|
|
10016
9914
|
}
|
|
10017
9915
|
},
|
|
10018
|
-
"required": [
|
|
10019
|
-
|
|
9916
|
+
"required": [
|
|
9917
|
+
"messages"
|
|
9918
|
+
],
|
|
9919
|
+
"returns": "Promise<OpenAI.Chat.Completions.ChatCompletion>",
|
|
10020
9920
|
"examples": [
|
|
10021
9921
|
{
|
|
10022
9922
|
"language": "ts",
|
|
10023
|
-
"code": "const
|
|
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)"
|
|
10024
9924
|
}
|
|
10025
9925
|
]
|
|
10026
9926
|
},
|
|
10027
|
-
"
|
|
10028
|
-
"description": "
|
|
10029
|
-
"parameters": {
|
|
10030
|
-
"
|
|
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": {
|
|
10031
9977
|
"type": "string",
|
|
10032
|
-
"description": "The
|
|
9978
|
+
"description": "The text prompt to complete"
|
|
9979
|
+
},
|
|
9980
|
+
"options": {
|
|
9981
|
+
"type": "Partial<OpenAI.Completions.CompletionCreateParams>",
|
|
9982
|
+
"description": "Additional parameters for the completion"
|
|
10033
9983
|
}
|
|
10034
9984
|
},
|
|
10035
9985
|
"required": [
|
|
10036
|
-
"
|
|
9986
|
+
"prompt"
|
|
10037
9987
|
],
|
|
10038
|
-
"returns": "Promise<
|
|
9988
|
+
"returns": "Promise<OpenAI.Completions.Completion>",
|
|
10039
9989
|
"examples": [
|
|
10040
9990
|
{
|
|
10041
9991
|
"language": "ts",
|
|
10042
|
-
"code": "const
|
|
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",
|
|
10015
|
+
"code": "const response = await openai.createEmbedding('Hello world')\nconsole.log(response.data[0].embedding.length)"
|
|
10016
|
+
}
|
|
10017
|
+
]
|
|
10018
|
+
},
|
|
10019
|
+
"createImage": {
|
|
10020
|
+
"description": "Generate an image from a text prompt using DALL-E.",
|
|
10021
|
+
"parameters": {
|
|
10022
|
+
"prompt": {
|
|
10023
|
+
"type": "string",
|
|
10024
|
+
"description": "Description of the image to generate"
|
|
10025
|
+
},
|
|
10026
|
+
"options": {
|
|
10027
|
+
"type": "Partial<OpenAI.Images.ImageGenerateParams>",
|
|
10028
|
+
"description": "Additional parameters (size, n, etc.)"
|
|
10029
|
+
}
|
|
10030
|
+
},
|
|
10031
|
+
"required": [
|
|
10032
|
+
"prompt"
|
|
10033
|
+
],
|
|
10034
|
+
"returns": "Promise<OpenAI.Images.ImagesResponse>",
|
|
10035
|
+
"examples": [
|
|
10036
|
+
{
|
|
10037
|
+
"language": "ts",
|
|
10038
|
+
"code": "const response = await openai.createImage('A sunset over mountains')\nconsole.log(response.data[0].url)"
|
|
10043
10039
|
}
|
|
10044
10040
|
]
|
|
10045
10041
|
},
|
|
10046
10042
|
"listModels": {
|
|
10047
|
-
"description": "List available
|
|
10043
|
+
"description": "List all available models.",
|
|
10048
10044
|
"parameters": {},
|
|
10049
10045
|
"required": [],
|
|
10050
|
-
"returns": "Promise<
|
|
10046
|
+
"returns": "Promise<OpenAI.Models.ModelsPage>",
|
|
10051
10047
|
"examples": [
|
|
10052
10048
|
{
|
|
10053
10049
|
"language": "ts",
|
|
10054
|
-
"code": "const models = await
|
|
10050
|
+
"code": "const models = await openai.listModels()"
|
|
10055
10051
|
}
|
|
10056
10052
|
]
|
|
10057
10053
|
},
|
|
10058
|
-
"
|
|
10059
|
-
"description": "
|
|
10054
|
+
"ask": {
|
|
10055
|
+
"description": "Ask a single question and get a text response. Convenience wrapper around `createChatCompletion` for simple Q&A.",
|
|
10060
10056
|
"parameters": {
|
|
10061
|
-
"
|
|
10057
|
+
"question": {
|
|
10062
10058
|
"type": "string",
|
|
10063
|
-
"description": "The
|
|
10059
|
+
"description": "The question to ask"
|
|
10064
10060
|
},
|
|
10065
10061
|
"options": {
|
|
10066
|
-
"type": "
|
|
10067
|
-
"description": "
|
|
10068
|
-
"properties": {
|
|
10069
|
-
"voiceId": {
|
|
10070
|
-
"type": "string",
|
|
10071
|
-
"description": ""
|
|
10072
|
-
},
|
|
10073
|
-
"modelId": {
|
|
10074
|
-
"type": "string",
|
|
10075
|
-
"description": ""
|
|
10076
|
-
},
|
|
10077
|
-
"outputFormat": {
|
|
10078
|
-
"type": "string",
|
|
10079
|
-
"description": ""
|
|
10080
|
-
},
|
|
10081
|
-
"voiceSettings": {
|
|
10082
|
-
"type": "ElevenLabsVoiceSettings",
|
|
10083
|
-
"description": ""
|
|
10084
|
-
},
|
|
10085
|
-
"disableCache": {
|
|
10086
|
-
"type": "boolean",
|
|
10087
|
-
"description": ""
|
|
10088
|
-
}
|
|
10089
|
-
}
|
|
10062
|
+
"type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
|
|
10063
|
+
"description": "Additional completion parameters"
|
|
10090
10064
|
}
|
|
10091
10065
|
},
|
|
10092
10066
|
"required": [
|
|
10093
|
-
"
|
|
10067
|
+
"question"
|
|
10094
10068
|
],
|
|
10095
|
-
"returns": "Promise<
|
|
10069
|
+
"returns": "Promise<string>",
|
|
10096
10070
|
"examples": [
|
|
10097
10071
|
{
|
|
10098
10072
|
"language": "ts",
|
|
10099
|
-
"code": "const
|
|
10073
|
+
"code": "const answer = await openai.ask('What is 2 + 2?')\nconsole.log(answer) // '4'"
|
|
10100
10074
|
}
|
|
10101
10075
|
]
|
|
10102
10076
|
},
|
|
10103
|
-
"
|
|
10104
|
-
"description": "
|
|
10077
|
+
"chat": {
|
|
10078
|
+
"description": "Send a multi-turn conversation and get a text response. Convenience wrapper around `createChatCompletion` that returns just the text.",
|
|
10105
10079
|
"parameters": {
|
|
10106
|
-
"
|
|
10107
|
-
"type": "
|
|
10108
|
-
"description": "
|
|
10109
|
-
},
|
|
10110
|
-
"outputPath": {
|
|
10111
|
-
"type": "string",
|
|
10112
|
-
"description": "File path to write the audio to"
|
|
10080
|
+
"messages": {
|
|
10081
|
+
"type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
|
|
10082
|
+
"description": "Array of chat messages"
|
|
10113
10083
|
},
|
|
10114
10084
|
"options": {
|
|
10115
|
-
"type": "
|
|
10116
|
-
"description": "
|
|
10117
|
-
"properties": {
|
|
10118
|
-
"voiceId": {
|
|
10119
|
-
"type": "string",
|
|
10120
|
-
"description": ""
|
|
10121
|
-
},
|
|
10122
|
-
"modelId": {
|
|
10123
|
-
"type": "string",
|
|
10124
|
-
"description": ""
|
|
10125
|
-
},
|
|
10126
|
-
"outputFormat": {
|
|
10127
|
-
"type": "string",
|
|
10128
|
-
"description": ""
|
|
10129
|
-
},
|
|
10130
|
-
"voiceSettings": {
|
|
10131
|
-
"type": "ElevenLabsVoiceSettings",
|
|
10132
|
-
"description": ""
|
|
10133
|
-
},
|
|
10134
|
-
"disableCache": {
|
|
10135
|
-
"type": "boolean",
|
|
10136
|
-
"description": ""
|
|
10137
|
-
}
|
|
10138
|
-
}
|
|
10085
|
+
"type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
|
|
10086
|
+
"description": "Additional completion parameters"
|
|
10139
10087
|
}
|
|
10140
10088
|
},
|
|
10141
10089
|
"required": [
|
|
10142
|
-
"
|
|
10143
|
-
"outputPath"
|
|
10090
|
+
"messages"
|
|
10144
10091
|
],
|
|
10145
10092
|
"returns": "Promise<string>",
|
|
10146
10093
|
"examples": [
|
|
10147
10094
|
{
|
|
10148
10095
|
"language": "ts",
|
|
10149
|
-
"code": "const
|
|
10096
|
+
"code": "const reply = await openai.chat([\n { role: 'system', content: 'You are a pirate.' },\n { role: 'user', content: 'Hello!' }\n])"
|
|
10150
10097
|
}
|
|
10151
10098
|
]
|
|
10152
10099
|
}
|
|
10153
10100
|
},
|
|
10154
10101
|
"getters": {
|
|
10155
|
-
"
|
|
10156
|
-
"description": "The
|
|
10102
|
+
"defaultModel": {
|
|
10103
|
+
"description": "The default model used for completions, from options or 'gpt-4o'.",
|
|
10157
10104
|
"returns": "string"
|
|
10105
|
+
},
|
|
10106
|
+
"raw": {
|
|
10107
|
+
"description": "The underlying OpenAI SDK instance for advanced use cases.",
|
|
10108
|
+
"returns": "OpenAI"
|
|
10158
10109
|
}
|
|
10159
10110
|
},
|
|
10160
10111
|
"events": {
|
|
10112
|
+
"connected": {
|
|
10113
|
+
"name": "connected",
|
|
10114
|
+
"description": "Event emitted by OpenAIClient",
|
|
10115
|
+
"arguments": {}
|
|
10116
|
+
},
|
|
10161
10117
|
"failure": {
|
|
10162
10118
|
"name": "failure",
|
|
10163
|
-
"description": "Event emitted by
|
|
10119
|
+
"description": "Event emitted by OpenAIClient",
|
|
10164
10120
|
"arguments": {}
|
|
10165
10121
|
},
|
|
10166
|
-
"
|
|
10167
|
-
"name": "
|
|
10168
|
-
"description": "Event emitted by
|
|
10122
|
+
"completion": {
|
|
10123
|
+
"name": "completion",
|
|
10124
|
+
"description": "Event emitted by OpenAIClient",
|
|
10169
10125
|
"arguments": {}
|
|
10170
10126
|
},
|
|
10171
|
-
"
|
|
10172
|
-
"name": "
|
|
10173
|
-
"description": "Event emitted by
|
|
10127
|
+
"embedding": {
|
|
10128
|
+
"name": "embedding",
|
|
10129
|
+
"description": "Event emitted by OpenAIClient",
|
|
10130
|
+
"arguments": {}
|
|
10131
|
+
},
|
|
10132
|
+
"image": {
|
|
10133
|
+
"name": "image",
|
|
10134
|
+
"description": "Event emitted by OpenAIClient",
|
|
10135
|
+
"arguments": {}
|
|
10136
|
+
},
|
|
10137
|
+
"models": {
|
|
10138
|
+
"name": "models",
|
|
10139
|
+
"description": "Event emitted by OpenAIClient",
|
|
10174
10140
|
"arguments": {}
|
|
10175
10141
|
}
|
|
10176
10142
|
},
|
|
@@ -10180,7 +10146,7 @@ setBuildTimeData('clients.elevenlabs', {
|
|
|
10180
10146
|
"examples": [
|
|
10181
10147
|
{
|
|
10182
10148
|
"language": "ts",
|
|
10183
|
-
"code": "const
|
|
10149
|
+
"code": "const openai = container.client('openai', { defaultModel: 'gpt-4o' })\nconst answer = await openai.ask('What is the meaning of life?')\nconsole.log(answer)"
|
|
10184
10150
|
}
|
|
10185
10151
|
]
|
|
10186
10152
|
});
|
|
@@ -10437,19 +10403,221 @@ setBuildTimeData('clients.comfyui', {
|
|
|
10437
10403
|
]
|
|
10438
10404
|
});
|
|
10439
10405
|
|
|
10440
|
-
setBuildTimeData('
|
|
10441
|
-
"id": "
|
|
10442
|
-
"description": "
|
|
10443
|
-
"shortcut": "
|
|
10444
|
-
"className": "
|
|
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",
|
|
10445
10411
|
"methods": {
|
|
10446
|
-
"
|
|
10447
|
-
"description": "
|
|
10448
|
-
"parameters": {
|
|
10449
|
-
|
|
10450
|
-
|
|
10451
|
-
|
|
10452
|
-
|
|
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.",
|
|
10480
|
+
"parameters": {
|
|
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
|
+
}
|
|
10510
|
+
}
|
|
10511
|
+
},
|
|
10512
|
+
"required": [
|
|
10513
|
+
"text"
|
|
10514
|
+
],
|
|
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
|
+
]
|
|
10522
|
+
},
|
|
10523
|
+
"say": {
|
|
10524
|
+
"description": "Synthesize speech and write the audio to a file.",
|
|
10525
|
+
"parameters": {
|
|
10526
|
+
"text": {
|
|
10527
|
+
"type": "string",
|
|
10528
|
+
"description": "The text to convert to speech"
|
|
10529
|
+
},
|
|
10530
|
+
"outputPath": {
|
|
10531
|
+
"type": "string",
|
|
10532
|
+
"description": "File path to write the audio to"
|
|
10533
|
+
},
|
|
10534
|
+
"options": {
|
|
10535
|
+
"type": "SynthesizeOptions",
|
|
10536
|
+
"description": "Voice, model, format, and voice settings overrides",
|
|
10537
|
+
"properties": {
|
|
10538
|
+
"voiceId": {
|
|
10539
|
+
"type": "string",
|
|
10540
|
+
"description": ""
|
|
10541
|
+
},
|
|
10542
|
+
"modelId": {
|
|
10543
|
+
"type": "string",
|
|
10544
|
+
"description": ""
|
|
10545
|
+
},
|
|
10546
|
+
"outputFormat": {
|
|
10547
|
+
"type": "string",
|
|
10548
|
+
"description": ""
|
|
10549
|
+
},
|
|
10550
|
+
"voiceSettings": {
|
|
10551
|
+
"type": "ElevenLabsVoiceSettings",
|
|
10552
|
+
"description": ""
|
|
10553
|
+
},
|
|
10554
|
+
"disableCache": {
|
|
10555
|
+
"type": "boolean",
|
|
10556
|
+
"description": ""
|
|
10557
|
+
}
|
|
10558
|
+
}
|
|
10559
|
+
}
|
|
10560
|
+
},
|
|
10561
|
+
"required": [
|
|
10562
|
+
"text",
|
|
10563
|
+
"outputPath"
|
|
10564
|
+
],
|
|
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
|
+
]
|
|
10572
|
+
}
|
|
10573
|
+
},
|
|
10574
|
+
"getters": {
|
|
10575
|
+
"apiKey": {
|
|
10576
|
+
"description": "The resolved API key from options or environment.",
|
|
10577
|
+
"returns": "string"
|
|
10578
|
+
}
|
|
10579
|
+
},
|
|
10580
|
+
"events": {
|
|
10581
|
+
"failure": {
|
|
10582
|
+
"name": "failure",
|
|
10583
|
+
"description": "Event emitted by ElevenLabsClient",
|
|
10584
|
+
"arguments": {}
|
|
10585
|
+
},
|
|
10586
|
+
"voices": {
|
|
10587
|
+
"name": "voices",
|
|
10588
|
+
"description": "Event emitted by ElevenLabsClient",
|
|
10589
|
+
"arguments": {}
|
|
10590
|
+
},
|
|
10591
|
+
"speech": {
|
|
10592
|
+
"name": "speech",
|
|
10593
|
+
"description": "Event emitted by ElevenLabsClient",
|
|
10594
|
+
"arguments": {}
|
|
10595
|
+
}
|
|
10596
|
+
},
|
|
10597
|
+
"state": {},
|
|
10598
|
+
"options": {},
|
|
10599
|
+
"envVars": [],
|
|
10600
|
+
"examples": [
|
|
10601
|
+
{
|
|
10602
|
+
"language": "ts",
|
|
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"
|
|
10604
|
+
}
|
|
10605
|
+
]
|
|
10606
|
+
});
|
|
10607
|
+
|
|
10608
|
+
setBuildTimeData('servers.mcp', {
|
|
10609
|
+
"id": "servers.mcp",
|
|
10610
|
+
"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).",
|
|
10611
|
+
"shortcut": "servers.mcp",
|
|
10612
|
+
"className": "MCPServer",
|
|
10613
|
+
"methods": {
|
|
10614
|
+
"tool": {
|
|
10615
|
+
"description": "Register an MCP tool. The tool's Zod schema is converted to JSON Schema for the protocol listing, and used for runtime argument validation. Tool handlers can return a string (auto-wrapped as text content) or a full CallToolResult object for advanced responses (images, errors, etc).",
|
|
10616
|
+
"parameters": {
|
|
10617
|
+
"name": {
|
|
10618
|
+
"type": "string",
|
|
10619
|
+
"description": "Unique tool name"
|
|
10620
|
+
},
|
|
10453
10621
|
"options": {
|
|
10454
10622
|
"type": "ToolRegistrationOptions",
|
|
10455
10623
|
"description": "Tool schema, description, and handler",
|
|
@@ -16780,54 +16948,221 @@ export const introspectionData = [
|
|
|
16780
16948
|
]
|
|
16781
16949
|
},
|
|
16782
16950
|
{
|
|
16783
|
-
"id": "features.
|
|
16784
|
-
"description": "
|
|
16785
|
-
"shortcut": "features.
|
|
16786
|
-
"className": "
|
|
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",
|
|
16787
16955
|
"methods": {
|
|
16788
|
-
"
|
|
16789
|
-
"description": "
|
|
16790
|
-
"parameters": {
|
|
16791
|
-
|
|
16792
|
-
|
|
16793
|
-
|
|
16794
|
-
|
|
16795
|
-
|
|
16796
|
-
|
|
16797
|
-
|
|
16798
|
-
|
|
16799
|
-
|
|
16800
|
-
|
|
16801
|
-
|
|
16802
|
-
|
|
16803
|
-
|
|
16804
|
-
|
|
16805
|
-
|
|
16806
|
-
|
|
16807
|
-
|
|
16808
|
-
|
|
16809
|
-
|
|
16810
|
-
|
|
16811
|
-
|
|
16812
|
-
|
|
16813
|
-
|
|
16814
|
-
|
|
16815
|
-
|
|
16816
|
-
|
|
16817
|
-
|
|
16818
|
-
|
|
16819
|
-
|
|
16820
|
-
|
|
16821
|
-
|
|
16822
|
-
|
|
16823
|
-
|
|
16824
|
-
|
|
16825
|
-
|
|
16826
|
-
|
|
16827
|
-
|
|
16828
|
-
|
|
16829
|
-
|
|
16830
|
-
|
|
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"
|
|
17060
|
+
}
|
|
17061
|
+
},
|
|
17062
|
+
"getters": {
|
|
17063
|
+
"auth": {
|
|
17064
|
+
"description": "Access the google-auth feature lazily.",
|
|
17065
|
+
"returns": "GoogleAuth"
|
|
17066
|
+
},
|
|
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": {}
|
|
17105
|
+
}
|
|
17106
|
+
},
|
|
17107
|
+
"state": {},
|
|
17108
|
+
"options": {},
|
|
17109
|
+
"envVars": [],
|
|
17110
|
+
"examples": [
|
|
17111
|
+
{
|
|
17112
|
+
"language": "ts",
|
|
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()"
|
|
17114
|
+
}
|
|
17115
|
+
]
|
|
17116
|
+
},
|
|
17117
|
+
{
|
|
17118
|
+
"id": "features.os",
|
|
17119
|
+
"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.",
|
|
17120
|
+
"shortcut": "features.os",
|
|
17121
|
+
"className": "OS",
|
|
17122
|
+
"methods": {
|
|
17123
|
+
"getDisplayInfo": {
|
|
17124
|
+
"description": "Gets information about all connected displays. Platform-specific: currently implemented for macOS (darwin). Linux and Windows will throw with a clear \"not yet implemented\" message.",
|
|
17125
|
+
"parameters": {},
|
|
17126
|
+
"required": [],
|
|
17127
|
+
"returns": "DisplayInfo[]",
|
|
17128
|
+
"examples": [
|
|
17129
|
+
{
|
|
17130
|
+
"language": "ts",
|
|
17131
|
+
"code": "const displays = os.getDisplayInfo()\ndisplays.forEach(d => {\n console.log(`${d.name}: ${d.resolution.width}x${d.resolution.height}${d.retina ? ' (Retina)' : ''}`)\n})"
|
|
17132
|
+
}
|
|
17133
|
+
]
|
|
17134
|
+
}
|
|
17135
|
+
},
|
|
17136
|
+
"getters": {
|
|
17137
|
+
"arch": {
|
|
17138
|
+
"description": "Gets the operating system CPU architecture.",
|
|
17139
|
+
"returns": "any",
|
|
17140
|
+
"examples": [
|
|
17141
|
+
{
|
|
17142
|
+
"language": "ts",
|
|
17143
|
+
"code": "const arch = os.arch\nconsole.log(`Running on ${arch} architecture`)"
|
|
17144
|
+
}
|
|
17145
|
+
]
|
|
17146
|
+
},
|
|
17147
|
+
"tmpdir": {
|
|
17148
|
+
"description": "Gets the operating system's default directory for temporary files.",
|
|
17149
|
+
"returns": "any",
|
|
17150
|
+
"examples": [
|
|
17151
|
+
{
|
|
17152
|
+
"language": "ts",
|
|
17153
|
+
"code": "const tempDir = os.tmpdir\nconsole.log(`Temp directory: ${tempDir}`)"
|
|
17154
|
+
}
|
|
17155
|
+
]
|
|
17156
|
+
},
|
|
17157
|
+
"homedir": {
|
|
17158
|
+
"description": "Gets the current user's home directory path.",
|
|
17159
|
+
"returns": "any",
|
|
17160
|
+
"examples": [
|
|
17161
|
+
{
|
|
17162
|
+
"language": "ts",
|
|
17163
|
+
"code": "const home = os.homedir\nconsole.log(`User home: ${home}`)"
|
|
17164
|
+
}
|
|
17165
|
+
]
|
|
16831
17166
|
},
|
|
16832
17167
|
"cpuCount": {
|
|
16833
17168
|
"description": "Gets the number of logical CPU cores available on the system.",
|
|
@@ -22960,298 +23295,31 @@ export const introspectionData = [
|
|
|
22960
23295
|
"description": "Whether the client is in an error state.",
|
|
22961
23296
|
"returns": "any"
|
|
22962
23297
|
}
|
|
22963
|
-
},
|
|
22964
|
-
"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",
|
|
22983
|
-
"arguments": {}
|
|
22984
|
-
},
|
|
22985
|
-
"reconnecting": {
|
|
22986
|
-
"name": "reconnecting",
|
|
22987
|
-
"description": "Event emitted by WebSocketClient",
|
|
22988
|
-
"arguments": {}
|
|
22989
|
-
}
|
|
22990
|
-
},
|
|
22991
|
-
"state": {},
|
|
22992
|
-
"options": {},
|
|
22993
|
-
"envVars": [],
|
|
22994
|
-
"examples": [
|
|
22995
|
-
{
|
|
22996
|
-
"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' })"
|
|
22998
|
-
}
|
|
22999
|
-
]
|
|
23000
|
-
},
|
|
23001
|
-
{
|
|
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",
|
|
23006
|
-
"methods": {
|
|
23007
|
-
"connect": {
|
|
23008
|
-
"description": "Test the API connection by listing models.",
|
|
23009
|
-
"parameters": {},
|
|
23010
|
-
"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
|
-
]
|
|
23041
|
-
},
|
|
23042
|
-
"createResponse": {
|
|
23043
|
-
"description": "Create a response using the Responses API.",
|
|
23044
|
-
"parameters": {
|
|
23045
|
-
"input": {
|
|
23046
|
-
"type": "OpenAI.Responses.ResponseInput | string",
|
|
23047
|
-
"description": "The input prompt or message array"
|
|
23048
|
-
},
|
|
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"
|
|
23071
|
-
},
|
|
23072
|
-
"options": {
|
|
23073
|
-
"type": "Partial<OpenAI.Responses.ResponseCreateParamsStreaming>",
|
|
23074
|
-
"description": "Additional parameters for the streaming response"
|
|
23075
|
-
}
|
|
23076
|
-
},
|
|
23077
|
-
"required": [
|
|
23078
|
-
"input"
|
|
23079
|
-
],
|
|
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
|
-
]
|
|
23087
|
-
},
|
|
23088
|
-
"createCompletion": {
|
|
23089
|
-
"description": "Create a legacy text completion.",
|
|
23090
|
-
"parameters": {
|
|
23091
|
-
"prompt": {
|
|
23092
|
-
"type": "string",
|
|
23093
|
-
"description": "The text prompt to complete"
|
|
23094
|
-
},
|
|
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"
|
|
23117
|
-
},
|
|
23118
|
-
"options": {
|
|
23119
|
-
"type": "Partial<OpenAI.Embeddings.EmbeddingCreateParams>",
|
|
23120
|
-
"description": "Additional parameters (model, etc.)"
|
|
23121
|
-
}
|
|
23122
|
-
},
|
|
23123
|
-
"required": [
|
|
23124
|
-
"input"
|
|
23125
|
-
],
|
|
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
|
-
]
|
|
23133
|
-
},
|
|
23134
|
-
"createImage": {
|
|
23135
|
-
"description": "Generate an image from a text prompt using DALL-E.",
|
|
23136
|
-
"parameters": {
|
|
23137
|
-
"prompt": {
|
|
23138
|
-
"type": "string",
|
|
23139
|
-
"description": "Description of the image to generate"
|
|
23140
|
-
},
|
|
23141
|
-
"options": {
|
|
23142
|
-
"type": "Partial<OpenAI.Images.ImageGenerateParams>",
|
|
23143
|
-
"description": "Additional parameters (size, n, etc.)"
|
|
23144
|
-
}
|
|
23145
|
-
},
|
|
23146
|
-
"required": [
|
|
23147
|
-
"prompt"
|
|
23148
|
-
],
|
|
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
|
-
]
|
|
23168
|
-
},
|
|
23169
|
-
"ask": {
|
|
23170
|
-
"description": "Ask a single question and get a text response. Convenience wrapper around `createChatCompletion` for simple Q&A.",
|
|
23171
|
-
"parameters": {
|
|
23172
|
-
"question": {
|
|
23173
|
-
"type": "string",
|
|
23174
|
-
"description": "The question to ask"
|
|
23175
|
-
},
|
|
23176
|
-
"options": {
|
|
23177
|
-
"type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
|
|
23178
|
-
"description": "Additional completion parameters"
|
|
23179
|
-
}
|
|
23180
|
-
},
|
|
23181
|
-
"required": [
|
|
23182
|
-
"question"
|
|
23183
|
-
],
|
|
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
|
-
]
|
|
23191
|
-
},
|
|
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"
|
|
23198
|
-
},
|
|
23199
|
-
"options": {
|
|
23200
|
-
"type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
|
|
23201
|
-
"description": "Additional completion parameters"
|
|
23202
|
-
}
|
|
23203
|
-
},
|
|
23204
|
-
"required": [
|
|
23205
|
-
"messages"
|
|
23206
|
-
],
|
|
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])"
|
|
23212
|
-
}
|
|
23213
|
-
]
|
|
23214
|
-
}
|
|
23215
|
-
},
|
|
23216
|
-
"getters": {
|
|
23217
|
-
"defaultModel": {
|
|
23218
|
-
"description": "The default model used for completions, from options or 'gpt-4o'.",
|
|
23219
|
-
"returns": "string"
|
|
23220
|
-
},
|
|
23221
|
-
"raw": {
|
|
23222
|
-
"description": "The underlying OpenAI SDK instance for advanced use cases.",
|
|
23223
|
-
"returns": "OpenAI"
|
|
23224
|
-
}
|
|
23225
|
-
},
|
|
23226
|
-
"events": {
|
|
23227
|
-
"connected": {
|
|
23228
|
-
"name": "connected",
|
|
23229
|
-
"description": "Event emitted by OpenAIClient",
|
|
23230
|
-
"arguments": {}
|
|
23231
|
-
},
|
|
23232
|
-
"failure": {
|
|
23233
|
-
"name": "failure",
|
|
23234
|
-
"description": "Event emitted by OpenAIClient",
|
|
23298
|
+
},
|
|
23299
|
+
"events": {
|
|
23300
|
+
"open": {
|
|
23301
|
+
"name": "open",
|
|
23302
|
+
"description": "Event emitted by WebSocketClient",
|
|
23235
23303
|
"arguments": {}
|
|
23236
23304
|
},
|
|
23237
|
-
"
|
|
23238
|
-
"name": "
|
|
23239
|
-
"description": "Event emitted by
|
|
23305
|
+
"error": {
|
|
23306
|
+
"name": "error",
|
|
23307
|
+
"description": "Event emitted by WebSocketClient",
|
|
23240
23308
|
"arguments": {}
|
|
23241
23309
|
},
|
|
23242
|
-
"
|
|
23243
|
-
"name": "
|
|
23244
|
-
"description": "Event emitted by
|
|
23310
|
+
"message": {
|
|
23311
|
+
"name": "message",
|
|
23312
|
+
"description": "Event emitted by WebSocketClient",
|
|
23245
23313
|
"arguments": {}
|
|
23246
23314
|
},
|
|
23247
|
-
"
|
|
23248
|
-
"name": "
|
|
23249
|
-
"description": "Event emitted by
|
|
23315
|
+
"close": {
|
|
23316
|
+
"name": "close",
|
|
23317
|
+
"description": "Event emitted by WebSocketClient",
|
|
23250
23318
|
"arguments": {}
|
|
23251
23319
|
},
|
|
23252
|
-
"
|
|
23253
|
-
"name": "
|
|
23254
|
-
"description": "Event emitted by
|
|
23320
|
+
"reconnecting": {
|
|
23321
|
+
"name": "reconnecting",
|
|
23322
|
+
"description": "Event emitted by WebSocketClient",
|
|
23255
23323
|
"arguments": {}
|
|
23256
23324
|
}
|
|
23257
23325
|
},
|
|
@@ -23261,7 +23329,7 @@ export const introspectionData = [
|
|
|
23261
23329
|
"examples": [
|
|
23262
23330
|
{
|
|
23263
23331
|
"language": "ts",
|
|
23264
|
-
"code": "const
|
|
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' })"
|
|
23265
23333
|
}
|
|
23266
23334
|
]
|
|
23267
23335
|
},
|
|
@@ -23461,193 +23529,259 @@ export const introspectionData = [
|
|
|
23461
23529
|
]
|
|
23462
23530
|
},
|
|
23463
23531
|
{
|
|
23464
|
-
"id": "clients.
|
|
23465
|
-
"description": "
|
|
23466
|
-
"shortcut": "clients.
|
|
23467
|
-
"className": "
|
|
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",
|
|
23468
23536
|
"methods": {
|
|
23469
|
-
"beforeRequest": {
|
|
23470
|
-
"description": "Inject the xi-api-key header before each request.",
|
|
23471
|
-
"parameters": {},
|
|
23472
|
-
"required": [],
|
|
23473
|
-
"returns": "void"
|
|
23474
|
-
},
|
|
23475
23537
|
"connect": {
|
|
23476
|
-
"description": "
|
|
23538
|
+
"description": "Test the API connection by listing models.",
|
|
23477
23539
|
"parameters": {},
|
|
23478
23540
|
"required": [],
|
|
23479
23541
|
"returns": "Promise<this>",
|
|
23480
23542
|
"examples": [
|
|
23481
23543
|
{
|
|
23482
23544
|
"language": "ts",
|
|
23483
|
-
"code": "await
|
|
23545
|
+
"code": "await openai.connect()"
|
|
23484
23546
|
}
|
|
23485
23547
|
]
|
|
23486
23548
|
},
|
|
23487
|
-
"
|
|
23488
|
-
"description": "
|
|
23549
|
+
"createChatCompletion": {
|
|
23550
|
+
"description": "Create a chat completion using the Chat Completions API.",
|
|
23489
23551
|
"parameters": {
|
|
23552
|
+
"messages": {
|
|
23553
|
+
"type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
|
|
23554
|
+
"description": "Array of chat messages"
|
|
23555
|
+
},
|
|
23490
23556
|
"options": {
|
|
23491
|
-
"type": "
|
|
23492
|
-
"description": "
|
|
23557
|
+
"type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
|
|
23558
|
+
"description": "Additional parameters for the completion"
|
|
23493
23559
|
}
|
|
23494
23560
|
},
|
|
23495
|
-
"required": [
|
|
23496
|
-
|
|
23561
|
+
"required": [
|
|
23562
|
+
"messages"
|
|
23563
|
+
],
|
|
23564
|
+
"returns": "Promise<OpenAI.Chat.Completions.ChatCompletion>",
|
|
23497
23565
|
"examples": [
|
|
23498
23566
|
{
|
|
23499
23567
|
"language": "ts",
|
|
23500
|
-
"code": "const
|
|
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)"
|
|
23501
23569
|
}
|
|
23502
23570
|
]
|
|
23503
23571
|
},
|
|
23504
|
-
"
|
|
23505
|
-
"description": "
|
|
23572
|
+
"createResponse": {
|
|
23573
|
+
"description": "Create a response using the Responses API.",
|
|
23506
23574
|
"parameters": {
|
|
23507
|
-
"
|
|
23508
|
-
"type": "string",
|
|
23509
|
-
"description": "The
|
|
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"
|
|
23510
23582
|
}
|
|
23511
23583
|
},
|
|
23512
23584
|
"required": [
|
|
23513
|
-
"
|
|
23585
|
+
"input"
|
|
23514
23586
|
],
|
|
23515
|
-
"returns": "Promise<
|
|
23587
|
+
"returns": "Promise<OpenAI.Responses.Response>",
|
|
23516
23588
|
"examples": [
|
|
23517
23589
|
{
|
|
23518
23590
|
"language": "ts",
|
|
23519
|
-
"code": "const
|
|
23591
|
+
"code": "const response = await openai.createResponse('Explain quantum computing')"
|
|
23520
23592
|
}
|
|
23521
23593
|
]
|
|
23522
23594
|
},
|
|
23523
|
-
"
|
|
23524
|
-
"description": "
|
|
23525
|
-
"parameters": {
|
|
23526
|
-
|
|
23527
|
-
|
|
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>>",
|
|
23528
23611
|
"examples": [
|
|
23529
23612
|
{
|
|
23530
23613
|
"language": "ts",
|
|
23531
|
-
"code": "const
|
|
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}"
|
|
23532
23615
|
}
|
|
23533
23616
|
]
|
|
23534
23617
|
},
|
|
23535
|
-
"
|
|
23536
|
-
"description": "
|
|
23618
|
+
"createCompletion": {
|
|
23619
|
+
"description": "Create a legacy text completion.",
|
|
23537
23620
|
"parameters": {
|
|
23538
|
-
"
|
|
23621
|
+
"prompt": {
|
|
23539
23622
|
"type": "string",
|
|
23540
|
-
"description": "The text
|
|
23623
|
+
"description": "The text prompt to complete"
|
|
23541
23624
|
},
|
|
23542
23625
|
"options": {
|
|
23543
|
-
"type": "
|
|
23544
|
-
"description": "
|
|
23545
|
-
"properties": {
|
|
23546
|
-
"voiceId": {
|
|
23547
|
-
"type": "string",
|
|
23548
|
-
"description": ""
|
|
23549
|
-
},
|
|
23550
|
-
"modelId": {
|
|
23551
|
-
"type": "string",
|
|
23552
|
-
"description": ""
|
|
23553
|
-
},
|
|
23554
|
-
"outputFormat": {
|
|
23555
|
-
"type": "string",
|
|
23556
|
-
"description": ""
|
|
23557
|
-
},
|
|
23558
|
-
"voiceSettings": {
|
|
23559
|
-
"type": "ElevenLabsVoiceSettings",
|
|
23560
|
-
"description": ""
|
|
23561
|
-
},
|
|
23562
|
-
"disableCache": {
|
|
23563
|
-
"type": "boolean",
|
|
23564
|
-
"description": ""
|
|
23565
|
-
}
|
|
23566
|
-
}
|
|
23626
|
+
"type": "Partial<OpenAI.Completions.CompletionCreateParams>",
|
|
23627
|
+
"description": "Additional parameters for the completion"
|
|
23567
23628
|
}
|
|
23568
23629
|
},
|
|
23569
23630
|
"required": [
|
|
23570
|
-
"
|
|
23631
|
+
"prompt"
|
|
23571
23632
|
],
|
|
23572
|
-
"returns": "Promise<
|
|
23633
|
+
"returns": "Promise<OpenAI.Completions.Completion>",
|
|
23573
23634
|
"examples": [
|
|
23574
23635
|
{
|
|
23575
23636
|
"language": "ts",
|
|
23576
|
-
"code": "const
|
|
23637
|
+
"code": "const response = await openai.createCompletion('Once upon a time')"
|
|
23577
23638
|
}
|
|
23578
23639
|
]
|
|
23579
23640
|
},
|
|
23580
|
-
"
|
|
23581
|
-
"description": "
|
|
23641
|
+
"createEmbedding": {
|
|
23642
|
+
"description": "Create text embeddings for semantic search or similarity comparisons.",
|
|
23582
23643
|
"parameters": {
|
|
23583
|
-
"
|
|
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": {
|
|
23584
23668
|
"type": "string",
|
|
23585
|
-
"description": "
|
|
23669
|
+
"description": "Description of the image to generate"
|
|
23586
23670
|
},
|
|
23587
|
-
"
|
|
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": {
|
|
23588
23703
|
"type": "string",
|
|
23589
|
-
"description": "
|
|
23704
|
+
"description": "The question to ask"
|
|
23590
23705
|
},
|
|
23591
23706
|
"options": {
|
|
23592
|
-
"type": "
|
|
23593
|
-
"description": "
|
|
23594
|
-
|
|
23595
|
-
|
|
23596
|
-
|
|
23597
|
-
|
|
23598
|
-
|
|
23599
|
-
|
|
23600
|
-
|
|
23601
|
-
|
|
23602
|
-
|
|
23603
|
-
|
|
23604
|
-
|
|
23605
|
-
|
|
23606
|
-
|
|
23607
|
-
|
|
23608
|
-
|
|
23609
|
-
|
|
23610
|
-
|
|
23611
|
-
|
|
23612
|
-
|
|
23613
|
-
|
|
23614
|
-
|
|
23615
|
-
|
|
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"
|
|
23616
23732
|
}
|
|
23617
23733
|
},
|
|
23618
23734
|
"required": [
|
|
23619
|
-
"
|
|
23620
|
-
"outputPath"
|
|
23735
|
+
"messages"
|
|
23621
23736
|
],
|
|
23622
23737
|
"returns": "Promise<string>",
|
|
23623
23738
|
"examples": [
|
|
23624
23739
|
{
|
|
23625
23740
|
"language": "ts",
|
|
23626
|
-
"code": "const
|
|
23741
|
+
"code": "const reply = await openai.chat([\n { role: 'system', content: 'You are a pirate.' },\n { role: 'user', content: 'Hello!' }\n])"
|
|
23627
23742
|
}
|
|
23628
23743
|
]
|
|
23629
23744
|
}
|
|
23630
23745
|
},
|
|
23631
23746
|
"getters": {
|
|
23632
|
-
"
|
|
23633
|
-
"description": "The
|
|
23747
|
+
"defaultModel": {
|
|
23748
|
+
"description": "The default model used for completions, from options or 'gpt-4o'.",
|
|
23634
23749
|
"returns": "string"
|
|
23750
|
+
},
|
|
23751
|
+
"raw": {
|
|
23752
|
+
"description": "The underlying OpenAI SDK instance for advanced use cases.",
|
|
23753
|
+
"returns": "OpenAI"
|
|
23635
23754
|
}
|
|
23636
23755
|
},
|
|
23637
23756
|
"events": {
|
|
23757
|
+
"connected": {
|
|
23758
|
+
"name": "connected",
|
|
23759
|
+
"description": "Event emitted by OpenAIClient",
|
|
23760
|
+
"arguments": {}
|
|
23761
|
+
},
|
|
23638
23762
|
"failure": {
|
|
23639
23763
|
"name": "failure",
|
|
23640
|
-
"description": "Event emitted by
|
|
23764
|
+
"description": "Event emitted by OpenAIClient",
|
|
23641
23765
|
"arguments": {}
|
|
23642
23766
|
},
|
|
23643
|
-
"
|
|
23644
|
-
"name": "
|
|
23645
|
-
"description": "Event emitted by
|
|
23767
|
+
"completion": {
|
|
23768
|
+
"name": "completion",
|
|
23769
|
+
"description": "Event emitted by OpenAIClient",
|
|
23646
23770
|
"arguments": {}
|
|
23647
23771
|
},
|
|
23648
|
-
"
|
|
23649
|
-
"name": "
|
|
23650
|
-
"description": "Event emitted by
|
|
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",
|
|
23651
23785
|
"arguments": {}
|
|
23652
23786
|
}
|
|
23653
23787
|
},
|
|
@@ -23657,7 +23791,7 @@ export const introspectionData = [
|
|
|
23657
23791
|
"examples": [
|
|
23658
23792
|
{
|
|
23659
23793
|
"language": "ts",
|
|
23660
|
-
"code": "const
|
|
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).",
|