@soederpop/luca 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/.github/workflows/release.yaml +2 -0
  2. package/CNAME +1 -0
  3. package/assistants/codingAssistant/ABOUT.md +3 -1
  4. package/assistants/codingAssistant/CORE.md +2 -4
  5. package/assistants/codingAssistant/hooks.ts +9 -10
  6. package/assistants/codingAssistant/tools.ts +9 -0
  7. package/assistants/inkbot/ABOUT.md +13 -2
  8. package/assistants/inkbot/CORE.md +278 -39
  9. package/assistants/inkbot/hooks.ts +0 -8
  10. package/assistants/inkbot/tools.ts +24 -18
  11. package/assistants/researcher/ABOUT.md +5 -0
  12. package/assistants/researcher/CORE.md +46 -0
  13. package/assistants/researcher/hooks.ts +16 -0
  14. package/assistants/researcher/tools.ts +237 -0
  15. package/commands/inkbot.ts +526 -194
  16. package/docs/CNAME +1 -0
  17. package/docs/examples/assistant-hooks-reference.ts +171 -0
  18. package/index.html +1430 -0
  19. package/package.json +1 -1
  20. package/public/slides-ai-native.html +902 -0
  21. package/public/slides-intro.html +974 -0
  22. package/src/agi/features/assistant.ts +432 -62
  23. package/src/agi/features/conversation.ts +170 -10
  24. package/src/bootstrap/generated.ts +1 -1
  25. package/src/cli/build-info.ts +2 -2
  26. package/src/helper.ts +12 -3
  27. package/src/introspection/generated.agi.ts +1663 -644
  28. package/src/introspection/generated.node.ts +1637 -870
  29. package/src/introspection/generated.web.ts +1 -1
  30. package/src/python/generated.ts +1 -1
  31. package/src/scaffolds/generated.ts +1 -1
  32. package/test/assistant-hooks.test.ts +306 -0
  33. package/test/assistant.test.ts +1 -1
  34. package/test/fork-and-research.test.ts +450 -0
  35. package/SPEC.md +0 -304
@@ -1,7 +1,7 @@
1
1
  import { setBuildTimeData, setContainerBuildTimeData } from './index.js';
2
2
 
3
3
  // Auto-generated introspection registry data
4
- // Generated at: 2026-04-05T06:58:06.272Z
4
+ // Generated at: 2026-04-09T05:21:42.461Z
5
5
 
6
6
  setBuildTimeData('features.googleDocs', {
7
7
  "id": "features.googleDocs",
@@ -11864,198 +11864,270 @@ setBuildTimeData('clients.websocket', {
11864
11864
  "envVars": []
11865
11865
  });
11866
11866
 
11867
- setBuildTimeData('clients.supabase', {
11868
- "id": "clients.supabase",
11869
- "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).",
11870
- "shortcut": "clients.supabase",
11871
- "className": "SupabaseClient",
11867
+ setBuildTimeData('clients.openai', {
11868
+ "id": "clients.openai",
11869
+ "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.",
11870
+ "shortcut": "clients.openai",
11871
+ "className": "OpenAIClient",
11872
11872
  "methods": {
11873
- "from": {
11874
- "description": "Start a query on a Postgres table or view.",
11873
+ "connect": {
11874
+ "description": "Test the API connection by listing models.",
11875
+ "parameters": {},
11876
+ "required": [],
11877
+ "returns": "Promise<this>",
11878
+ "examples": [
11879
+ {
11880
+ "language": "ts",
11881
+ "code": "await openai.connect()"
11882
+ }
11883
+ ]
11884
+ },
11885
+ "createChatCompletion": {
11886
+ "description": "Create a chat completion using the Chat Completions API.",
11875
11887
  "parameters": {
11876
- "table": {
11877
- "type": "string",
11878
- "description": "The table or view name to query"
11888
+ "messages": {
11889
+ "type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
11890
+ "description": "Array of chat messages"
11891
+ },
11892
+ "options": {
11893
+ "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
11894
+ "description": "Additional parameters for the completion"
11879
11895
  }
11880
11896
  },
11881
11897
  "required": [
11882
- "table"
11898
+ "messages"
11883
11899
  ],
11884
- "returns": "void"
11900
+ "returns": "Promise<OpenAI.Chat.Completions.ChatCompletion>",
11901
+ "examples": [
11902
+ {
11903
+ "language": "ts",
11904
+ "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)"
11905
+ }
11906
+ ]
11885
11907
  },
11886
- "rpc": {
11887
- "description": "Call a Postgres function (RPC).",
11908
+ "createResponse": {
11909
+ "description": "Create a response using the Responses API.",
11888
11910
  "parameters": {
11889
- "fn": {
11890
- "type": "string",
11891
- "description": "The function name"
11892
- },
11893
- "params": {
11894
- "type": "Record<string, unknown>",
11895
- "description": "Arguments to pass to the function"
11911
+ "input": {
11912
+ "type": "OpenAI.Responses.ResponseInput | string",
11913
+ "description": "The input prompt or message array"
11896
11914
  },
11897
11915
  "options": {
11898
- "type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
11899
- "description": "Optional settings (head, get, count)"
11916
+ "type": "Partial<OpenAI.Responses.ResponseCreateParamsNonStreaming>",
11917
+ "description": "Additional parameters for the response"
11900
11918
  }
11901
11919
  },
11902
11920
  "required": [
11903
- "fn"
11921
+ "input"
11904
11922
  ],
11905
- "returns": "void"
11923
+ "returns": "Promise<OpenAI.Responses.Response>",
11924
+ "examples": [
11925
+ {
11926
+ "language": "ts",
11927
+ "code": "const response = await openai.createResponse('Explain quantum computing')"
11928
+ }
11929
+ ]
11906
11930
  },
11907
- "signInWithPassword": {
11908
- "description": "Sign in with email and password.",
11931
+ "streamResponse": {
11932
+ "description": "Stream a response using the Responses API.",
11909
11933
  "parameters": {
11910
- "email": {
11911
- "type": "string",
11912
- "description": "Parameter email"
11934
+ "input": {
11935
+ "type": "OpenAI.Responses.ResponseInput | string",
11936
+ "description": "The input prompt or message array"
11913
11937
  },
11914
- "password": {
11915
- "type": "string",
11916
- "description": "Parameter password"
11938
+ "options": {
11939
+ "type": "Partial<OpenAI.Responses.ResponseCreateParamsStreaming>",
11940
+ "description": "Additional parameters for the streaming response"
11917
11941
  }
11918
11942
  },
11919
11943
  "required": [
11920
- "email",
11921
- "password"
11944
+ "input"
11922
11945
  ],
11923
- "returns": "void"
11946
+ "returns": "Promise<AsyncIterable<OpenAI.Responses.ResponseStreamEvent>>",
11947
+ "examples": [
11948
+ {
11949
+ "language": "ts",
11950
+ "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}"
11951
+ }
11952
+ ]
11924
11953
  },
11925
- "signUp": {
11926
- "description": "Create a new user account with email and password.",
11954
+ "createCompletion": {
11955
+ "description": "Create a legacy text completion.",
11927
11956
  "parameters": {
11928
- "email": {
11957
+ "prompt": {
11929
11958
  "type": "string",
11930
- "description": "Parameter email"
11959
+ "description": "The text prompt to complete"
11931
11960
  },
11932
- "password": {
11933
- "type": "string",
11934
- "description": "Parameter password"
11961
+ "options": {
11962
+ "type": "Partial<OpenAI.Completions.CompletionCreateParams>",
11963
+ "description": "Additional parameters for the completion"
11935
11964
  }
11936
11965
  },
11937
11966
  "required": [
11938
- "email",
11939
- "password"
11967
+ "prompt"
11940
11968
  ],
11941
- "returns": "void"
11942
- },
11943
- "signOut": {
11944
- "description": "Sign the current user out.",
11945
- "parameters": {},
11946
- "required": [],
11947
- "returns": "void"
11948
- },
11949
- "getSession": {
11950
- "description": "Get the current session, if any.",
11951
- "parameters": {},
11952
- "required": [],
11953
- "returns": "void"
11954
- },
11955
- "getUser": {
11956
- "description": "Get the current user, if any.",
11957
- "parameters": {},
11958
- "required": [],
11959
- "returns": "void"
11969
+ "returns": "Promise<OpenAI.Completions.Completion>",
11970
+ "examples": [
11971
+ {
11972
+ "language": "ts",
11973
+ "code": "const response = await openai.createCompletion('Once upon a time')"
11974
+ }
11975
+ ]
11960
11976
  },
11961
- "invoke": {
11962
- "description": "Invoke a Supabase Edge Function by name.",
11977
+ "createEmbedding": {
11978
+ "description": "Create text embeddings for semantic search or similarity comparisons.",
11963
11979
  "parameters": {
11964
- "name": {
11965
- "type": "string",
11966
- "description": "Parameter name"
11980
+ "input": {
11981
+ "type": "string | string[]",
11982
+ "description": "A string or array of strings to embed"
11967
11983
  },
11968
- "body": {
11969
- "type": "any",
11970
- "description": "Parameter body"
11984
+ "options": {
11985
+ "type": "Partial<OpenAI.Embeddings.EmbeddingCreateParams>",
11986
+ "description": "Additional parameters (model, etc.)"
11971
11987
  }
11972
11988
  },
11973
11989
  "required": [
11974
- "name"
11990
+ "input"
11975
11991
  ],
11976
- "returns": "void"
11992
+ "returns": "Promise<OpenAI.Embeddings.CreateEmbeddingResponse>",
11993
+ "examples": [
11994
+ {
11995
+ "language": "ts",
11996
+ "code": "const response = await openai.createEmbedding('Hello world')\nconsole.log(response.data[0].embedding.length)"
11997
+ }
11998
+ ]
11977
11999
  },
11978
- "subscribe": {
11979
- "description": "Subscribe to realtime changes on a Postgres table.",
12000
+ "createImage": {
12001
+ "description": "Generate an image from a text prompt using DALL-E.",
11980
12002
  "parameters": {
11981
- "channelName": {
11982
- "type": "string",
11983
- "description": "A name for this subscription channel"
11984
- },
11985
- "table": {
12003
+ "prompt": {
11986
12004
  "type": "string",
11987
- "description": "The table to listen to"
11988
- },
11989
- "callback": {
11990
- "type": "(payload: any) => void",
11991
- "description": "Called with the payload on each change"
12005
+ "description": "Description of the image to generate"
11992
12006
  },
11993
- "event": {
11994
- "type": "\"INSERT\" | \"UPDATE\" | \"DELETE\" | \"*\"",
11995
- "description": "The event type to listen for (default: all changes)"
12007
+ "options": {
12008
+ "type": "Partial<OpenAI.Images.ImageGenerateParams>",
12009
+ "description": "Additional parameters (size, n, etc.)"
11996
12010
  }
11997
12011
  },
11998
12012
  "required": [
11999
- "channelName",
12000
- "table",
12001
- "callback"
12013
+ "prompt"
12002
12014
  ],
12003
- "returns": "RealtimeChannel"
12015
+ "returns": "Promise<OpenAI.Images.ImagesResponse>",
12016
+ "examples": [
12017
+ {
12018
+ "language": "ts",
12019
+ "code": "const response = await openai.createImage('A sunset over mountains')\nconsole.log(response.data[0].url)"
12020
+ }
12021
+ ]
12004
12022
  },
12005
- "unsubscribe": {
12006
- "description": "Unsubscribe and remove a realtime channel by name.",
12023
+ "listModels": {
12024
+ "description": "List all available models.",
12025
+ "parameters": {},
12026
+ "required": [],
12027
+ "returns": "Promise<OpenAI.Models.ModelsPage>",
12028
+ "examples": [
12029
+ {
12030
+ "language": "ts",
12031
+ "code": "const models = await openai.listModels()"
12032
+ }
12033
+ ]
12034
+ },
12035
+ "ask": {
12036
+ "description": "Ask a single question and get a text response. Convenience wrapper around `createChatCompletion` for simple Q&A.",
12007
12037
  "parameters": {
12008
- "channelName": {
12038
+ "question": {
12009
12039
  "type": "string",
12010
- "description": "The channel name to remove"
12040
+ "description": "The question to ask"
12041
+ },
12042
+ "options": {
12043
+ "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
12044
+ "description": "Additional completion parameters"
12011
12045
  }
12012
12046
  },
12013
12047
  "required": [
12014
- "channelName"
12048
+ "question"
12015
12049
  ],
12016
- "returns": "void"
12017
- },
12018
- "unsubscribeAll": {
12019
- "description": "Unsubscribe and remove all realtime channels.",
12020
- "parameters": {},
12021
- "required": [],
12022
- "returns": "void"
12023
- },
12024
- "connect": {
12025
- "description": "Connect is a no-op since the Supabase SDK initializes on construction. The client is ready to use immediately after creation.",
12026
- "parameters": {},
12027
- "required": [],
12028
- "returns": "void"
12050
+ "returns": "Promise<string>",
12051
+ "examples": [
12052
+ {
12053
+ "language": "ts",
12054
+ "code": "const answer = await openai.ask('What is 2 + 2?')\nconsole.log(answer) // '4'"
12055
+ }
12056
+ ]
12029
12057
  },
12030
- "disconnect": {
12031
- "description": "Disconnect by signing out and removing all realtime channels.",
12032
- "parameters": {},
12033
- "required": [],
12034
- "returns": "void"
12058
+ "chat": {
12059
+ "description": "Send a multi-turn conversation and get a text response. Convenience wrapper around `createChatCompletion` that returns just the text.",
12060
+ "parameters": {
12061
+ "messages": {
12062
+ "type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
12063
+ "description": "Array of chat messages"
12064
+ },
12065
+ "options": {
12066
+ "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
12067
+ "description": "Additional completion parameters"
12068
+ }
12069
+ },
12070
+ "required": [
12071
+ "messages"
12072
+ ],
12073
+ "returns": "Promise<string>",
12074
+ "examples": [
12075
+ {
12076
+ "language": "ts",
12077
+ "code": "const reply = await openai.chat([\n { role: 'system', content: 'You are a pirate.' },\n { role: 'user', content: 'Hello!' }\n])"
12078
+ }
12079
+ ]
12035
12080
  }
12036
12081
  },
12037
12082
  "getters": {
12038
- "sdk": {
12039
- "description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
12040
- "returns": "SupabaseSDKClient<any, any>"
12083
+ "defaultModel": {
12084
+ "description": "The default model used for completions, from options or 'gpt-4o'.",
12085
+ "returns": "string"
12041
12086
  },
12042
- "storage": {
12043
- "description": "Returns the Supabase Storage client for managing buckets and files.",
12044
- "returns": "any"
12087
+ "raw": {
12088
+ "description": "The underlying OpenAI SDK instance for advanced use cases.",
12089
+ "returns": "OpenAI"
12090
+ }
12091
+ },
12092
+ "events": {
12093
+ "connected": {
12094
+ "name": "connected",
12095
+ "description": "Event emitted by OpenAIClient",
12096
+ "arguments": {}
12045
12097
  },
12046
- "functions": {
12047
- "description": "Returns the Supabase Functions client.",
12048
- "returns": "any"
12098
+ "failure": {
12099
+ "name": "failure",
12100
+ "description": "Event emitted by OpenAIClient",
12101
+ "arguments": {}
12102
+ },
12103
+ "completion": {
12104
+ "name": "completion",
12105
+ "description": "Event emitted by OpenAIClient",
12106
+ "arguments": {}
12107
+ },
12108
+ "embedding": {
12109
+ "name": "embedding",
12110
+ "description": "Event emitted by OpenAIClient",
12111
+ "arguments": {}
12112
+ },
12113
+ "image": {
12114
+ "name": "image",
12115
+ "description": "Event emitted by OpenAIClient",
12116
+ "arguments": {}
12117
+ },
12118
+ "models": {
12119
+ "name": "models",
12120
+ "description": "Event emitted by OpenAIClient",
12121
+ "arguments": {}
12049
12122
  }
12050
12123
  },
12051
- "events": {},
12052
12124
  "state": {},
12053
12125
  "options": {},
12054
12126
  "envVars": [],
12055
12127
  "examples": [
12056
12128
  {
12057
12129
  "language": "ts",
12058
- "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})"
12130
+ "code": "const openai = container.client('openai', { defaultModel: 'gpt-4o' })\nconst answer = await openai.ask('What is the meaning of life?')\nconsole.log(answer)"
12059
12131
  }
12060
12132
  ]
12061
12133
  });
@@ -12357,260 +12429,295 @@ setBuildTimeData('clients.comfyui', {
12357
12429
  }
12358
12430
  });
12359
12431
 
12360
- setBuildTimeData('clients.openai', {
12361
- "id": "clients.openai",
12362
- "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.",
12363
- "shortcut": "clients.openai",
12364
- "className": "OpenAIClient",
12432
+ setBuildTimeData('clients.voicebox', {
12433
+ "id": "clients.voicebox",
12434
+ "description": "VoiceBox client — local TTS synthesis via VoiceBox.sh REST API (Qwen3-TTS). Provides methods for managing voice profiles and generating speech audio locally. Uses the streaming endpoint for synchronous synthesis (returns WAV buffer).",
12435
+ "shortcut": "clients.voicebox",
12436
+ "className": "VoiceBoxClient",
12365
12437
  "methods": {
12366
12438
  "connect": {
12367
- "description": "Test the API connection by listing models.",
12439
+ "description": "Validate the VoiceBox server is reachable by hitting the health endpoint.",
12368
12440
  "parameters": {},
12369
12441
  "required": [],
12370
- "returns": "Promise<this>",
12442
+ "returns": "Promise<this>"
12443
+ },
12444
+ "listProfiles": {
12445
+ "description": "List all voice profiles.",
12446
+ "parameters": {},
12447
+ "required": [],
12448
+ "returns": "Promise<any[]>",
12371
12449
  "examples": [
12372
12450
  {
12373
12451
  "language": "ts",
12374
- "code": "await openai.connect()"
12452
+ "code": "const profiles = await vb.listProfiles()\nconsole.log(profiles.map(p => `${p.name} (${p.sample_count} samples)`))"
12375
12453
  }
12376
12454
  ]
12377
12455
  },
12378
- "createChatCompletion": {
12379
- "description": "Create a chat completion using the Chat Completions API.",
12456
+ "getProfile": {
12457
+ "description": "Get a single voice profile by ID.",
12380
12458
  "parameters": {
12381
- "messages": {
12382
- "type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
12383
- "description": "Array of chat messages"
12384
- },
12385
- "options": {
12386
- "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
12387
- "description": "Additional parameters for the completion"
12459
+ "profileId": {
12460
+ "type": "string",
12461
+ "description": "Parameter profileId"
12388
12462
  }
12389
12463
  },
12390
12464
  "required": [
12391
- "messages"
12465
+ "profileId"
12392
12466
  ],
12393
- "returns": "Promise<OpenAI.Chat.Completions.ChatCompletion>",
12394
- "examples": [
12395
- {
12396
- "language": "ts",
12397
- "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)"
12398
- }
12399
- ]
12467
+ "returns": "Promise<any>"
12400
12468
  },
12401
- "createResponse": {
12402
- "description": "Create a response using the Responses API.",
12469
+ "createProfile": {
12470
+ "description": "Create a new voice profile.",
12403
12471
  "parameters": {
12404
- "input": {
12405
- "type": "OpenAI.Responses.ResponseInput | string",
12406
- "description": "The input prompt or message array"
12472
+ "name": {
12473
+ "type": "string",
12474
+ "description": "Parameter name"
12407
12475
  },
12408
12476
  "options": {
12409
- "type": "Partial<OpenAI.Responses.ResponseCreateParamsNonStreaming>",
12410
- "description": "Additional parameters for the response"
12477
+ "type": "{ description?: string; language?: string }",
12478
+ "description": "Parameter options"
12411
12479
  }
12412
12480
  },
12413
12481
  "required": [
12414
- "input"
12482
+ "name"
12415
12483
  ],
12416
- "returns": "Promise<OpenAI.Responses.Response>",
12417
- "examples": [
12418
- {
12419
- "language": "ts",
12420
- "code": "const response = await openai.createResponse('Explain quantum computing')"
12421
- }
12422
- ]
12484
+ "returns": "Promise<any>"
12423
12485
  },
12424
- "streamResponse": {
12425
- "description": "Stream a response using the Responses API.",
12486
+ "listEffects": {
12487
+ "description": "List available audio effects and their parameter definitions.",
12488
+ "parameters": {},
12489
+ "required": [],
12490
+ "returns": "Promise<any>"
12491
+ },
12492
+ "synthesize": {
12493
+ "description": "Synthesize speech from text using the streaming endpoint. Returns audio as a WAV Buffer (synchronous — blocks until audio is ready).",
12426
12494
  "parameters": {
12427
- "input": {
12428
- "type": "OpenAI.Responses.ResponseInput | string",
12429
- "description": "The input prompt or message array"
12495
+ "text": {
12496
+ "type": "string",
12497
+ "description": "The text to convert to speech"
12430
12498
  },
12431
12499
  "options": {
12432
- "type": "Partial<OpenAI.Responses.ResponseCreateParamsStreaming>",
12433
- "description": "Additional parameters for the streaming response"
12500
+ "type": "SynthesizeOptions",
12501
+ "description": "Profile, engine, model, and other synthesis options",
12502
+ "properties": {
12503
+ "profileId": {
12504
+ "type": "string",
12505
+ "description": ""
12506
+ },
12507
+ "engine": {
12508
+ "type": "string",
12509
+ "description": ""
12510
+ },
12511
+ "modelSize": {
12512
+ "type": "string",
12513
+ "description": ""
12514
+ },
12515
+ "language": {
12516
+ "type": "string",
12517
+ "description": ""
12518
+ },
12519
+ "instruct": {
12520
+ "type": "string",
12521
+ "description": ""
12522
+ },
12523
+ "seed": {
12524
+ "type": "number",
12525
+ "description": ""
12526
+ },
12527
+ "maxChunkChars": {
12528
+ "type": "number",
12529
+ "description": ""
12530
+ },
12531
+ "crossfadeMs": {
12532
+ "type": "number",
12533
+ "description": ""
12534
+ },
12535
+ "normalize": {
12536
+ "type": "boolean",
12537
+ "description": ""
12538
+ },
12539
+ "effectsChain": {
12540
+ "type": "EffectConfig[]",
12541
+ "description": ""
12542
+ },
12543
+ "disableCache": {
12544
+ "type": "boolean",
12545
+ "description": ""
12546
+ }
12547
+ }
12434
12548
  }
12435
12549
  },
12436
12550
  "required": [
12437
- "input"
12551
+ "text"
12438
12552
  ],
12439
- "returns": "Promise<AsyncIterable<OpenAI.Responses.ResponseStreamEvent>>",
12553
+ "returns": "Promise<Buffer>",
12440
12554
  "examples": [
12441
12555
  {
12442
12556
  "language": "ts",
12443
- "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}"
12557
+ "code": "const audio = await vb.synthesize('Hello world', { profileId: 'abc-123' })\n// audio is a Buffer of WAV data"
12444
12558
  }
12445
12559
  ]
12446
12560
  },
12447
- "createCompletion": {
12448
- "description": "Create a legacy text completion.",
12561
+ "generate": {
12562
+ "description": "Generate speech asynchronously (returns metadata, not audio). Use getAudio() to fetch the audio after generation completes.",
12449
12563
  "parameters": {
12450
- "prompt": {
12564
+ "text": {
12451
12565
  "type": "string",
12452
- "description": "The text prompt to complete"
12566
+ "description": "Parameter text"
12453
12567
  },
12454
12568
  "options": {
12455
- "type": "Partial<OpenAI.Completions.CompletionCreateParams>",
12456
- "description": "Additional parameters for the completion"
12569
+ "type": "SynthesizeOptions",
12570
+ "description": "Parameter options",
12571
+ "properties": {
12572
+ "profileId": {
12573
+ "type": "string",
12574
+ "description": ""
12575
+ },
12576
+ "engine": {
12577
+ "type": "string",
12578
+ "description": ""
12579
+ },
12580
+ "modelSize": {
12581
+ "type": "string",
12582
+ "description": ""
12583
+ },
12584
+ "language": {
12585
+ "type": "string",
12586
+ "description": ""
12587
+ },
12588
+ "instruct": {
12589
+ "type": "string",
12590
+ "description": ""
12591
+ },
12592
+ "seed": {
12593
+ "type": "number",
12594
+ "description": ""
12595
+ },
12596
+ "maxChunkChars": {
12597
+ "type": "number",
12598
+ "description": ""
12599
+ },
12600
+ "crossfadeMs": {
12601
+ "type": "number",
12602
+ "description": ""
12603
+ },
12604
+ "normalize": {
12605
+ "type": "boolean",
12606
+ "description": ""
12607
+ },
12608
+ "effectsChain": {
12609
+ "type": "EffectConfig[]",
12610
+ "description": ""
12611
+ },
12612
+ "disableCache": {
12613
+ "type": "boolean",
12614
+ "description": ""
12615
+ }
12616
+ }
12457
12617
  }
12458
12618
  },
12459
12619
  "required": [
12460
- "prompt"
12620
+ "text"
12461
12621
  ],
12462
- "returns": "Promise<OpenAI.Completions.Completion>",
12463
- "examples": [
12464
- {
12465
- "language": "ts",
12466
- "code": "const response = await openai.createCompletion('Once upon a time')"
12467
- }
12468
- ]
12622
+ "returns": "Promise<any>"
12469
12623
  },
12470
- "createEmbedding": {
12471
- "description": "Create text embeddings for semantic search or similarity comparisons.",
12624
+ "getAudio": {
12625
+ "description": "Fetch generated audio by generation ID. Returns WAV Buffer.",
12472
12626
  "parameters": {
12473
- "input": {
12474
- "type": "string | string[]",
12475
- "description": "A string or array of strings to embed"
12476
- },
12477
- "options": {
12478
- "type": "Partial<OpenAI.Embeddings.EmbeddingCreateParams>",
12479
- "description": "Additional parameters (model, etc.)"
12627
+ "generationId": {
12628
+ "type": "string",
12629
+ "description": "Parameter generationId"
12480
12630
  }
12481
12631
  },
12482
12632
  "required": [
12483
- "input"
12633
+ "generationId"
12484
12634
  ],
12485
- "returns": "Promise<OpenAI.Embeddings.CreateEmbeddingResponse>",
12486
- "examples": [
12487
- {
12488
- "language": "ts",
12489
- "code": "const response = await openai.createEmbedding('Hello world')\nconsole.log(response.data[0].embedding.length)"
12490
- }
12491
- ]
12635
+ "returns": "Promise<Buffer>"
12492
12636
  },
12493
- "createImage": {
12494
- "description": "Generate an image from a text prompt using DALL-E.",
12637
+ "say": {
12638
+ "description": "Synthesize and write audio to a file.",
12495
12639
  "parameters": {
12496
- "prompt": {
12640
+ "text": {
12497
12641
  "type": "string",
12498
- "description": "Description of the image to generate"
12642
+ "description": "Parameter text"
12499
12643
  },
12500
- "options": {
12501
- "type": "Partial<OpenAI.Images.ImageGenerateParams>",
12502
- "description": "Additional parameters (size, n, etc.)"
12503
- }
12504
- },
12505
- "required": [
12506
- "prompt"
12507
- ],
12508
- "returns": "Promise<OpenAI.Images.ImagesResponse>",
12509
- "examples": [
12510
- {
12511
- "language": "ts",
12512
- "code": "const response = await openai.createImage('A sunset over mountains')\nconsole.log(response.data[0].url)"
12513
- }
12514
- ]
12515
- },
12516
- "listModels": {
12517
- "description": "List all available models.",
12518
- "parameters": {},
12519
- "required": [],
12520
- "returns": "Promise<OpenAI.Models.ModelsPage>",
12521
- "examples": [
12522
- {
12523
- "language": "ts",
12524
- "code": "const models = await openai.listModels()"
12525
- }
12526
- ]
12527
- },
12528
- "ask": {
12529
- "description": "Ask a single question and get a text response. Convenience wrapper around `createChatCompletion` for simple Q&A.",
12530
- "parameters": {
12531
- "question": {
12644
+ "outputPath": {
12532
12645
  "type": "string",
12533
- "description": "The question to ask"
12646
+ "description": "Parameter outputPath"
12534
12647
  },
12535
12648
  "options": {
12536
- "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
12537
- "description": "Additional completion parameters"
12538
- }
12539
- },
12540
- "required": [
12541
- "question"
12542
- ],
12543
- "returns": "Promise<string>",
12544
- "examples": [
12545
- {
12546
- "language": "ts",
12547
- "code": "const answer = await openai.ask('What is 2 + 2?')\nconsole.log(answer) // '4'"
12548
- }
12549
- ]
12550
- },
12551
- "chat": {
12552
- "description": "Send a multi-turn conversation and get a text response. Convenience wrapper around `createChatCompletion` that returns just the text.",
12553
- "parameters": {
12554
- "messages": {
12555
- "type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
12556
- "description": "Array of chat messages"
12557
- },
12558
- "options": {
12559
- "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
12560
- "description": "Additional completion parameters"
12649
+ "type": "SynthesizeOptions",
12650
+ "description": "Parameter options",
12651
+ "properties": {
12652
+ "profileId": {
12653
+ "type": "string",
12654
+ "description": ""
12655
+ },
12656
+ "engine": {
12657
+ "type": "string",
12658
+ "description": ""
12659
+ },
12660
+ "modelSize": {
12661
+ "type": "string",
12662
+ "description": ""
12663
+ },
12664
+ "language": {
12665
+ "type": "string",
12666
+ "description": ""
12667
+ },
12668
+ "instruct": {
12669
+ "type": "string",
12670
+ "description": ""
12671
+ },
12672
+ "seed": {
12673
+ "type": "number",
12674
+ "description": ""
12675
+ },
12676
+ "maxChunkChars": {
12677
+ "type": "number",
12678
+ "description": ""
12679
+ },
12680
+ "crossfadeMs": {
12681
+ "type": "number",
12682
+ "description": ""
12683
+ },
12684
+ "normalize": {
12685
+ "type": "boolean",
12686
+ "description": ""
12687
+ },
12688
+ "effectsChain": {
12689
+ "type": "EffectConfig[]",
12690
+ "description": ""
12691
+ },
12692
+ "disableCache": {
12693
+ "type": "boolean",
12694
+ "description": ""
12695
+ }
12696
+ }
12561
12697
  }
12562
12698
  },
12563
12699
  "required": [
12564
- "messages"
12700
+ "text",
12701
+ "outputPath"
12565
12702
  ],
12566
- "returns": "Promise<string>",
12567
- "examples": [
12568
- {
12569
- "language": "ts",
12570
- "code": "const reply = await openai.chat([\n { role: 'system', content: 'You are a pirate.' },\n { role: 'user', content: 'Hello!' }\n])"
12571
- }
12572
- ]
12573
- }
12574
- },
12575
- "getters": {
12576
- "defaultModel": {
12577
- "description": "The default model used for completions, from options or 'gpt-4o'.",
12578
- "returns": "string"
12579
- },
12580
- "raw": {
12581
- "description": "The underlying OpenAI SDK instance for advanced use cases.",
12582
- "returns": "OpenAI"
12703
+ "returns": "Promise<string>"
12583
12704
  }
12584
12705
  },
12706
+ "getters": {},
12585
12707
  "events": {
12586
- "connected": {
12587
- "name": "connected",
12588
- "description": "Event emitted by OpenAIClient",
12589
- "arguments": {}
12590
- },
12591
12708
  "failure": {
12592
12709
  "name": "failure",
12593
- "description": "Event emitted by OpenAIClient",
12594
- "arguments": {}
12595
- },
12596
- "completion": {
12597
- "name": "completion",
12598
- "description": "Event emitted by OpenAIClient",
12710
+ "description": "Event emitted by VoiceBoxClient",
12599
12711
  "arguments": {}
12600
12712
  },
12601
- "embedding": {
12602
- "name": "embedding",
12603
- "description": "Event emitted by OpenAIClient",
12713
+ "profiles": {
12714
+ "name": "profiles",
12715
+ "description": "Event emitted by VoiceBoxClient",
12604
12716
  "arguments": {}
12605
12717
  },
12606
- "image": {
12607
- "name": "image",
12608
- "description": "Event emitted by OpenAIClient",
12609
- "arguments": {}
12610
- },
12611
- "models": {
12612
- "name": "models",
12613
- "description": "Event emitted by OpenAIClient",
12718
+ "speech": {
12719
+ "name": "speech",
12720
+ "description": "Event emitted by VoiceBoxClient",
12614
12721
  "arguments": {}
12615
12722
  }
12616
12723
  },
@@ -12620,9 +12727,90 @@ setBuildTimeData('clients.openai', {
12620
12727
  "examples": [
12621
12728
  {
12622
12729
  "language": "ts",
12623
- "code": "const openai = container.client('openai', { defaultModel: 'gpt-4o' })\nconst answer = await openai.ask('What is the meaning of life?')\nconsole.log(answer)"
12730
+ "code": "const vb = container.client('voicebox')\nawait vb.connect()\nconst profiles = await vb.listProfiles()\nconst audio = await vb.synthesize('Hello world', { profileId: profiles[0].id })\n// audio is a Buffer of WAV data"
12624
12731
  }
12625
- ]
12732
+ ],
12733
+ "types": {
12734
+ "SynthesizeOptions": {
12735
+ "description": "",
12736
+ "properties": {
12737
+ "profileId": {
12738
+ "type": "string",
12739
+ "description": "",
12740
+ "optional": true
12741
+ },
12742
+ "engine": {
12743
+ "type": "string",
12744
+ "description": "",
12745
+ "optional": true
12746
+ },
12747
+ "modelSize": {
12748
+ "type": "string",
12749
+ "description": "",
12750
+ "optional": true
12751
+ },
12752
+ "language": {
12753
+ "type": "string",
12754
+ "description": "",
12755
+ "optional": true
12756
+ },
12757
+ "instruct": {
12758
+ "type": "string",
12759
+ "description": "",
12760
+ "optional": true
12761
+ },
12762
+ "seed": {
12763
+ "type": "number",
12764
+ "description": "",
12765
+ "optional": true
12766
+ },
12767
+ "maxChunkChars": {
12768
+ "type": "number",
12769
+ "description": "",
12770
+ "optional": true
12771
+ },
12772
+ "crossfadeMs": {
12773
+ "type": "number",
12774
+ "description": "",
12775
+ "optional": true
12776
+ },
12777
+ "normalize": {
12778
+ "type": "boolean",
12779
+ "description": "",
12780
+ "optional": true
12781
+ },
12782
+ "effectsChain": {
12783
+ "type": "EffectConfig[]",
12784
+ "description": "",
12785
+ "optional": true
12786
+ },
12787
+ "disableCache": {
12788
+ "type": "boolean",
12789
+ "description": "",
12790
+ "optional": true
12791
+ }
12792
+ }
12793
+ },
12794
+ "EffectConfig": {
12795
+ "description": "",
12796
+ "properties": {
12797
+ "type": {
12798
+ "type": "string",
12799
+ "description": ""
12800
+ },
12801
+ "enabled": {
12802
+ "type": "boolean",
12803
+ "description": "",
12804
+ "optional": true
12805
+ },
12806
+ "params": {
12807
+ "type": "Record<string, any>",
12808
+ "description": "",
12809
+ "optional": true
12810
+ }
12811
+ }
12812
+ }
12813
+ }
12626
12814
  });
12627
12815
 
12628
12816
  setBuildTimeData('clients.elevenlabs', {
@@ -12889,6 +13077,202 @@ setBuildTimeData('clients.elevenlabs', {
12889
13077
  }
12890
13078
  });
12891
13079
 
13080
+ setBuildTimeData('clients.supabase', {
13081
+ "id": "clients.supabase",
13082
+ "description": "Supabase client for the Luca container system. Wraps the official `@supabase/supabase-js` SDK and exposes it through Luca's typed state, events, and introspection system. The SDK is isomorphic so this single implementation works in both Node and browser containers. Use `client.sdk` for full SDK access, or use the convenience wrappers for common operations (auth, database queries, storage, edge functions, realtime).",
13083
+ "shortcut": "clients.supabase",
13084
+ "className": "SupabaseClient",
13085
+ "methods": {
13086
+ "from": {
13087
+ "description": "Start a query on a Postgres table or view.",
13088
+ "parameters": {
13089
+ "table": {
13090
+ "type": "string",
13091
+ "description": "The table or view name to query"
13092
+ }
13093
+ },
13094
+ "required": [
13095
+ "table"
13096
+ ],
13097
+ "returns": "void"
13098
+ },
13099
+ "rpc": {
13100
+ "description": "Call a Postgres function (RPC).",
13101
+ "parameters": {
13102
+ "fn": {
13103
+ "type": "string",
13104
+ "description": "The function name"
13105
+ },
13106
+ "params": {
13107
+ "type": "Record<string, unknown>",
13108
+ "description": "Arguments to pass to the function"
13109
+ },
13110
+ "options": {
13111
+ "type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
13112
+ "description": "Optional settings (head, get, count)"
13113
+ }
13114
+ },
13115
+ "required": [
13116
+ "fn"
13117
+ ],
13118
+ "returns": "void"
13119
+ },
13120
+ "signInWithPassword": {
13121
+ "description": "Sign in with email and password.",
13122
+ "parameters": {
13123
+ "email": {
13124
+ "type": "string",
13125
+ "description": "Parameter email"
13126
+ },
13127
+ "password": {
13128
+ "type": "string",
13129
+ "description": "Parameter password"
13130
+ }
13131
+ },
13132
+ "required": [
13133
+ "email",
13134
+ "password"
13135
+ ],
13136
+ "returns": "void"
13137
+ },
13138
+ "signUp": {
13139
+ "description": "Create a new user account with email and password.",
13140
+ "parameters": {
13141
+ "email": {
13142
+ "type": "string",
13143
+ "description": "Parameter email"
13144
+ },
13145
+ "password": {
13146
+ "type": "string",
13147
+ "description": "Parameter password"
13148
+ }
13149
+ },
13150
+ "required": [
13151
+ "email",
13152
+ "password"
13153
+ ],
13154
+ "returns": "void"
13155
+ },
13156
+ "signOut": {
13157
+ "description": "Sign the current user out.",
13158
+ "parameters": {},
13159
+ "required": [],
13160
+ "returns": "void"
13161
+ },
13162
+ "getSession": {
13163
+ "description": "Get the current session, if any.",
13164
+ "parameters": {},
13165
+ "required": [],
13166
+ "returns": "void"
13167
+ },
13168
+ "getUser": {
13169
+ "description": "Get the current user, if any.",
13170
+ "parameters": {},
13171
+ "required": [],
13172
+ "returns": "void"
13173
+ },
13174
+ "invoke": {
13175
+ "description": "Invoke a Supabase Edge Function by name.",
13176
+ "parameters": {
13177
+ "name": {
13178
+ "type": "string",
13179
+ "description": "Parameter name"
13180
+ },
13181
+ "body": {
13182
+ "type": "any",
13183
+ "description": "Parameter body"
13184
+ }
13185
+ },
13186
+ "required": [
13187
+ "name"
13188
+ ],
13189
+ "returns": "void"
13190
+ },
13191
+ "subscribe": {
13192
+ "description": "Subscribe to realtime changes on a Postgres table.",
13193
+ "parameters": {
13194
+ "channelName": {
13195
+ "type": "string",
13196
+ "description": "A name for this subscription channel"
13197
+ },
13198
+ "table": {
13199
+ "type": "string",
13200
+ "description": "The table to listen to"
13201
+ },
13202
+ "callback": {
13203
+ "type": "(payload: any) => void",
13204
+ "description": "Called with the payload on each change"
13205
+ },
13206
+ "event": {
13207
+ "type": "\"INSERT\" | \"UPDATE\" | \"DELETE\" | \"*\"",
13208
+ "description": "The event type to listen for (default: all changes)"
13209
+ }
13210
+ },
13211
+ "required": [
13212
+ "channelName",
13213
+ "table",
13214
+ "callback"
13215
+ ],
13216
+ "returns": "RealtimeChannel"
13217
+ },
13218
+ "unsubscribe": {
13219
+ "description": "Unsubscribe and remove a realtime channel by name.",
13220
+ "parameters": {
13221
+ "channelName": {
13222
+ "type": "string",
13223
+ "description": "The channel name to remove"
13224
+ }
13225
+ },
13226
+ "required": [
13227
+ "channelName"
13228
+ ],
13229
+ "returns": "void"
13230
+ },
13231
+ "unsubscribeAll": {
13232
+ "description": "Unsubscribe and remove all realtime channels.",
13233
+ "parameters": {},
13234
+ "required": [],
13235
+ "returns": "void"
13236
+ },
13237
+ "connect": {
13238
+ "description": "Connect is a no-op since the Supabase SDK initializes on construction. The client is ready to use immediately after creation.",
13239
+ "parameters": {},
13240
+ "required": [],
13241
+ "returns": "void"
13242
+ },
13243
+ "disconnect": {
13244
+ "description": "Disconnect by signing out and removing all realtime channels.",
13245
+ "parameters": {},
13246
+ "required": [],
13247
+ "returns": "void"
13248
+ }
13249
+ },
13250
+ "getters": {
13251
+ "sdk": {
13252
+ "description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
13253
+ "returns": "SupabaseSDKClient<any, any>"
13254
+ },
13255
+ "storage": {
13256
+ "description": "Returns the Supabase Storage client for managing buckets and files.",
13257
+ "returns": "any"
13258
+ },
13259
+ "functions": {
13260
+ "description": "Returns the Supabase Functions client.",
13261
+ "returns": "any"
13262
+ }
13263
+ },
13264
+ "events": {},
13265
+ "state": {},
13266
+ "options": {},
13267
+ "envVars": [],
13268
+ "examples": [
13269
+ {
13270
+ "language": "ts",
13271
+ "code": "const supabase = container.client('supabase', {\n supabaseUrl: 'https://xyz.supabase.co',\n supabaseKey: 'your-anon-key',\n})\n\n// Query data\nconst { data } = await supabase.from('users').select('*')\n\n// Auth\nawait supabase.signInWithPassword('user@example.com', 'password')\n\n// Realtime\nsupabase.subscribe('changes', 'users', (payload) => {\n console.log('Change:', payload)\n})"
13272
+ }
13273
+ ]
13274
+ });
13275
+
12892
13276
  setBuildTimeData('servers.mcp', {
12893
13277
  "id": "servers.mcp",
12894
13278
  "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).",
@@ -13615,6 +13999,16 @@ setBuildTimeData('features.assistantsManager', {
13615
13999
  "hasVoice": {
13616
14000
  "type": "boolean",
13617
14001
  "description": "Whether a voice.yaml configuration file exists."
14002
+ },
14003
+ "about": {
14004
+ "type": "string",
14005
+ "description": "Contents of ABOUT.md if present, undefined otherwise.",
14006
+ "optional": true
14007
+ },
14008
+ "meta": {
14009
+ "type": "Record<string, any>",
14010
+ "description": "Frontmatter metadata parsed from CORE.md.",
14011
+ "optional": true
13618
14012
  }
13619
14013
  }
13620
14014
  }
@@ -13710,22 +14104,45 @@ setBuildTimeData('features.conversation', {
13710
14104
  ]
13711
14105
  },
13712
14106
  "fork": {
13713
- "description": "Fork the conversation into a new independent instance. The fork inherits the same system prompt, tools, and full message history, but has its own identity and state — changes in either direction do not affect the other.",
14107
+ "description": "",
13714
14108
  "parameters": {
13715
14109
  "overrides": {
13716
- "type": "Partial<ConversationOptions>",
13717
- "description": "Optional option overrides for the forked conversation (e.g. different model or title)"
14110
+ "type": "ForkOptions | ForkOptions[]",
14111
+ "description": "Parameter overrides"
13718
14112
  }
13719
14113
  },
13720
14114
  "required": [],
13721
- "returns": "Conversation",
14115
+ "returns": "Conversation | Conversation[]"
14116
+ },
14117
+ "research": {
14118
+ "description": "Fan out N questions in parallel using forked conversations, return the results. Each fork is independent and ephemeral — no history is saved.",
14119
+ "parameters": {
14120
+ "questions": {
14121
+ "type": "(string | { question: string; forkOptions?: ForkOptions })[]",
14122
+ "description": "Array of questions (strings) or objects with question + per-fork overrides"
14123
+ },
14124
+ "defaults": {
14125
+ "type": "ForkOptions",
14126
+ "description": "Default fork options applied to all forks (individual overrides take precedence)"
14127
+ }
14128
+ },
14129
+ "required": [
14130
+ "questions"
14131
+ ],
14132
+ "returns": "Promise<string[]>",
13722
14133
  "examples": [
13723
14134
  {
13724
14135
  "language": "ts",
13725
- "code": "const fork = conversation.fork()\nawait fork.ask('What if we took a different approach?')\n// original conversation is unchanged"
14136
+ "code": "const results = await conversation.research([\n \"What are the pros of approach A?\",\n \"What are the pros of approach B?\",\n], { history: 'none', model: 'gpt-4o-mini' })\n\n// Per-fork overrides\nconst results = await conversation.research([\n \"Quick factual question\",\n { question: \"Needs recent context\", forkOptions: { history: 5 } },\n], { history: 'none' })"
13726
14137
  }
13727
14138
  ]
13728
14139
  },
14140
+ "abort": {
14141
+ "description": "Abort the current ask() call. Cancels the in-flight network request and any pending tool executions. The ask() promise will reject with a ConversationAbortError whose `partial` property contains any text accumulated before the abort.",
14142
+ "parameters": {},
14143
+ "required": [],
14144
+ "returns": "void"
14145
+ },
13729
14146
  "estimateTokens": {
13730
14147
  "description": "Estimate the input token count for the current messages array using the js-tiktoken tokenizer. Updates state.",
13731
14148
  "parameters": {},
@@ -13884,6 +14301,11 @@ setBuildTimeData('features.conversation', {
13884
14301
  "description": "Event emitted by Conversation",
13885
14302
  "arguments": {}
13886
14303
  },
14304
+ "aborted": {
14305
+ "name": "aborted",
14306
+ "description": "Event emitted by Conversation",
14307
+ "arguments": {}
14308
+ },
13887
14309
  "toolError": {
13888
14310
  "name": "toolError",
13889
14311
  "description": "Event emitted by Conversation",
@@ -15348,8 +15770,26 @@ setBuildTimeData('features.assistant', {
15348
15770
  ],
15349
15771
  "returns": "this"
15350
15772
  },
15773
+ "triggerHook": {
15774
+ "description": "Trigger a named hook and await its completion. The hook function receives `(assistant, ...args)` and its return value is passed back to the caller. This ensures hooks run to completion BEFORE any subsequent logic executes, unlike the old bus-based approach where async hooks were fire-and-forget. Hooks that don't exist are silently skipped (returns undefined).",
15775
+ "parameters": {
15776
+ "hookName": {
15777
+ "type": "string",
15778
+ "description": "The hook to trigger (matches an export name from hooks.ts)"
15779
+ },
15780
+ "args": {
15781
+ "type": "any[]",
15782
+ "description": "Arguments passed to the hook after the assistant instance"
15783
+ }
15784
+ },
15785
+ "required": [
15786
+ "hookName",
15787
+ "args"
15788
+ ],
15789
+ "returns": "Promise<any>"
15790
+ },
15351
15791
  "afterInitialize": {
15352
- "description": "Called immediately after the assistant is constructed. Synchronously loads the system prompt, tools, and hooks, then binds hooks as event listeners so every emitted event automatically invokes its corresponding hook.",
15792
+ "description": "Called immediately after the assistant is constructed. Synchronously loads the system prompt, tools, and hooks. Hooks are invoked via triggerHook() at each emit site, ensuring async hooks are properly awaited.",
15353
15793
  "parameters": {},
15354
15794
  "required": [],
15355
15795
  "returns": "void"
@@ -15580,6 +16020,68 @@ setBuildTimeData('features.assistant', {
15580
16020
  "required": [],
15581
16021
  "returns": "void"
15582
16022
  },
16023
+ "fork": {
16024
+ "description": "",
16025
+ "parameters": {
16026
+ "options": {
16027
+ "type": "AssistantForkOptions | AssistantForkOptions[]",
16028
+ "description": "Parameter options"
16029
+ }
16030
+ },
16031
+ "required": [],
16032
+ "returns": "Promise<Assistant | Assistant[]>"
16033
+ },
16034
+ "createResearchJob": {
16035
+ "description": "Create a non-blocking research job that fans out questions across forked assistants. The forks fire immediately and the returned entity tracks progress via observable state and events. Each fork preserves the full assistant identity (interceptors, tools, hooks).",
16036
+ "parameters": {
16037
+ "prompt": {
16038
+ "type": "string",
16039
+ "description": "Shared context/framing prompt prepended to each fork's system prompt"
16040
+ },
16041
+ "questions": {
16042
+ "type": "(string | { question: string; forkOptions?: AssistantForkOptions })[]",
16043
+ "description": "Array of questions (strings) or objects with question + per-fork overrides"
16044
+ },
16045
+ "defaults": {
16046
+ "type": "AssistantForkOptions",
16047
+ "description": "Default fork options applied to all forks"
16048
+ }
16049
+ },
16050
+ "required": [
16051
+ "prompt",
16052
+ "questions"
16053
+ ],
16054
+ "returns": "Promise<ResearchJob>",
16055
+ "examples": [
16056
+ {
16057
+ "language": "ts",
16058
+ "code": "// Fire and forget — check later\nconst job = await assistant.createResearchJob(\n \"Analyze this codebase for security issues\",\n [\"Look for SQL injection\", \"Look for XSS\", \"Look for auth bypass\"],\n { history: 'none', model: 'gpt-4o-mini' }\n)\n\n// Check progress\njob.state.get('completed') // 2 of 3\njob.state.get('results') // [answer1, answer2, null]\n\n// React to events\njob.on('forkCompleted', (index, result) => console.log(`Fork ${index} done`))\n\n// Or just wait\nawait job.waitFor('completed')"
16059
+ }
16060
+ ]
16061
+ },
16062
+ "research": {
16063
+ "description": "Fan out N questions in parallel using forked assistants, return the results. Sugar over createResearchJob — blocks until all forks complete.",
16064
+ "parameters": {
16065
+ "questions": {
16066
+ "type": "(string | { question: string; forkOptions?: AssistantForkOptions })[]",
16067
+ "description": "Array of questions (strings) or objects with question + per-fork overrides"
16068
+ },
16069
+ "defaults": {
16070
+ "type": "AssistantForkOptions & { prompt?: string }",
16071
+ "description": "Default fork options applied to all forks"
16072
+ }
16073
+ },
16074
+ "required": [
16075
+ "questions"
16076
+ ],
16077
+ "returns": "Promise<(string | null)[]>",
16078
+ "examples": [
16079
+ {
16080
+ "language": "ts",
16081
+ "code": "const results = await assistant.research([\n \"What are best practices for X?\",\n \"What are common pitfalls of X?\",\n], { history: 'none', model: 'gpt-4o-mini' })"
16082
+ }
16083
+ ]
16084
+ },
15583
16085
  "subagent": {
15584
16086
  "description": "Get or create a subagent assistant. Uses the assistantsManager to discover and create the assistant, then caches the instance for reuse across tool calls.",
15585
16087
  "parameters": {
@@ -15657,6 +16159,14 @@ setBuildTimeData('features.assistant', {
15657
16159
  "description": "Whether the assistant has been started and is ready to receive questions.",
15658
16160
  "returns": "boolean"
15659
16161
  },
16162
+ "isFork": {
16163
+ "description": "Whether this assistant was created via fork().",
16164
+ "returns": "boolean"
16165
+ },
16166
+ "forkDepth": {
16167
+ "description": "How many levels deep this fork is. 0 = original, 1 = direct fork, 2 = fork of a fork, etc.",
16168
+ "returns": "number"
16169
+ },
15660
16170
  "systemPrompt": {
15661
16171
  "description": "The current system prompt text.",
15662
16172
  "returns": "string"
@@ -15711,6 +16221,11 @@ setBuildTimeData('features.assistant', {
15711
16221
  }
15712
16222
  },
15713
16223
  "events": {
16224
+ "hookFired": {
16225
+ "name": "hookFired",
16226
+ "description": "Event emitted by Assistant",
16227
+ "arguments": {}
16228
+ },
15714
16229
  "created": {
15715
16230
  "name": "created",
15716
16231
  "description": "Event emitted by Assistant",
@@ -15726,11 +16241,6 @@ setBuildTimeData('features.assistant', {
15726
16241
  "description": "Event emitted by Assistant",
15727
16242
  "arguments": {}
15728
16243
  },
15729
- "hookFired": {
15730
- "name": "hookFired",
15731
- "description": "Event emitted by Assistant",
15732
- "arguments": {}
15733
- },
15734
16244
  "reloaded": {
15735
16245
  "name": "reloaded",
15736
16246
  "description": "Event emitted by Assistant",
@@ -31329,197 +31839,269 @@ export const introspectionData = [
31329
31839
  "envVars": []
31330
31840
  },
31331
31841
  {
31332
- "id": "clients.supabase",
31333
- "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).",
31334
- "shortcut": "clients.supabase",
31335
- "className": "SupabaseClient",
31842
+ "id": "clients.openai",
31843
+ "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.",
31844
+ "shortcut": "clients.openai",
31845
+ "className": "OpenAIClient",
31336
31846
  "methods": {
31337
- "from": {
31338
- "description": "Start a query on a Postgres table or view.",
31847
+ "connect": {
31848
+ "description": "Test the API connection by listing models.",
31849
+ "parameters": {},
31850
+ "required": [],
31851
+ "returns": "Promise<this>",
31852
+ "examples": [
31853
+ {
31854
+ "language": "ts",
31855
+ "code": "await openai.connect()"
31856
+ }
31857
+ ]
31858
+ },
31859
+ "createChatCompletion": {
31860
+ "description": "Create a chat completion using the Chat Completions API.",
31339
31861
  "parameters": {
31340
- "table": {
31341
- "type": "string",
31342
- "description": "The table or view name to query"
31862
+ "messages": {
31863
+ "type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
31864
+ "description": "Array of chat messages"
31865
+ },
31866
+ "options": {
31867
+ "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
31868
+ "description": "Additional parameters for the completion"
31343
31869
  }
31344
31870
  },
31345
31871
  "required": [
31346
- "table"
31872
+ "messages"
31347
31873
  ],
31348
- "returns": "void"
31874
+ "returns": "Promise<OpenAI.Chat.Completions.ChatCompletion>",
31875
+ "examples": [
31876
+ {
31877
+ "language": "ts",
31878
+ "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)"
31879
+ }
31880
+ ]
31349
31881
  },
31350
- "rpc": {
31351
- "description": "Call a Postgres function (RPC).",
31882
+ "createResponse": {
31883
+ "description": "Create a response using the Responses API.",
31352
31884
  "parameters": {
31353
- "fn": {
31354
- "type": "string",
31355
- "description": "The function name"
31356
- },
31357
- "params": {
31358
- "type": "Record<string, unknown>",
31359
- "description": "Arguments to pass to the function"
31885
+ "input": {
31886
+ "type": "OpenAI.Responses.ResponseInput | string",
31887
+ "description": "The input prompt or message array"
31360
31888
  },
31361
31889
  "options": {
31362
- "type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
31363
- "description": "Optional settings (head, get, count)"
31890
+ "type": "Partial<OpenAI.Responses.ResponseCreateParamsNonStreaming>",
31891
+ "description": "Additional parameters for the response"
31364
31892
  }
31365
31893
  },
31366
31894
  "required": [
31367
- "fn"
31895
+ "input"
31368
31896
  ],
31369
- "returns": "void"
31897
+ "returns": "Promise<OpenAI.Responses.Response>",
31898
+ "examples": [
31899
+ {
31900
+ "language": "ts",
31901
+ "code": "const response = await openai.createResponse('Explain quantum computing')"
31902
+ }
31903
+ ]
31370
31904
  },
31371
- "signInWithPassword": {
31372
- "description": "Sign in with email and password.",
31905
+ "streamResponse": {
31906
+ "description": "Stream a response using the Responses API.",
31373
31907
  "parameters": {
31374
- "email": {
31375
- "type": "string",
31376
- "description": "Parameter email"
31908
+ "input": {
31909
+ "type": "OpenAI.Responses.ResponseInput | string",
31910
+ "description": "The input prompt or message array"
31377
31911
  },
31378
- "password": {
31379
- "type": "string",
31380
- "description": "Parameter password"
31912
+ "options": {
31913
+ "type": "Partial<OpenAI.Responses.ResponseCreateParamsStreaming>",
31914
+ "description": "Additional parameters for the streaming response"
31381
31915
  }
31382
31916
  },
31383
31917
  "required": [
31384
- "email",
31385
- "password"
31918
+ "input"
31386
31919
  ],
31387
- "returns": "void"
31920
+ "returns": "Promise<AsyncIterable<OpenAI.Responses.ResponseStreamEvent>>",
31921
+ "examples": [
31922
+ {
31923
+ "language": "ts",
31924
+ "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}"
31925
+ }
31926
+ ]
31388
31927
  },
31389
- "signUp": {
31390
- "description": "Create a new user account with email and password.",
31928
+ "createCompletion": {
31929
+ "description": "Create a legacy text completion.",
31391
31930
  "parameters": {
31392
- "email": {
31931
+ "prompt": {
31393
31932
  "type": "string",
31394
- "description": "Parameter email"
31933
+ "description": "The text prompt to complete"
31395
31934
  },
31396
- "password": {
31397
- "type": "string",
31398
- "description": "Parameter password"
31935
+ "options": {
31936
+ "type": "Partial<OpenAI.Completions.CompletionCreateParams>",
31937
+ "description": "Additional parameters for the completion"
31399
31938
  }
31400
31939
  },
31401
31940
  "required": [
31402
- "email",
31403
- "password"
31941
+ "prompt"
31404
31942
  ],
31405
- "returns": "void"
31406
- },
31407
- "signOut": {
31408
- "description": "Sign the current user out.",
31409
- "parameters": {},
31410
- "required": [],
31411
- "returns": "void"
31412
- },
31413
- "getSession": {
31414
- "description": "Get the current session, if any.",
31415
- "parameters": {},
31416
- "required": [],
31417
- "returns": "void"
31418
- },
31419
- "getUser": {
31420
- "description": "Get the current user, if any.",
31421
- "parameters": {},
31422
- "required": [],
31423
- "returns": "void"
31943
+ "returns": "Promise<OpenAI.Completions.Completion>",
31944
+ "examples": [
31945
+ {
31946
+ "language": "ts",
31947
+ "code": "const response = await openai.createCompletion('Once upon a time')"
31948
+ }
31949
+ ]
31424
31950
  },
31425
- "invoke": {
31426
- "description": "Invoke a Supabase Edge Function by name.",
31951
+ "createEmbedding": {
31952
+ "description": "Create text embeddings for semantic search or similarity comparisons.",
31427
31953
  "parameters": {
31428
- "name": {
31429
- "type": "string",
31430
- "description": "Parameter name"
31954
+ "input": {
31955
+ "type": "string | string[]",
31956
+ "description": "A string or array of strings to embed"
31431
31957
  },
31432
- "body": {
31433
- "type": "any",
31434
- "description": "Parameter body"
31958
+ "options": {
31959
+ "type": "Partial<OpenAI.Embeddings.EmbeddingCreateParams>",
31960
+ "description": "Additional parameters (model, etc.)"
31435
31961
  }
31436
31962
  },
31437
31963
  "required": [
31438
- "name"
31964
+ "input"
31439
31965
  ],
31440
- "returns": "void"
31966
+ "returns": "Promise<OpenAI.Embeddings.CreateEmbeddingResponse>",
31967
+ "examples": [
31968
+ {
31969
+ "language": "ts",
31970
+ "code": "const response = await openai.createEmbedding('Hello world')\nconsole.log(response.data[0].embedding.length)"
31971
+ }
31972
+ ]
31441
31973
  },
31442
- "subscribe": {
31443
- "description": "Subscribe to realtime changes on a Postgres table.",
31974
+ "createImage": {
31975
+ "description": "Generate an image from a text prompt using DALL-E.",
31444
31976
  "parameters": {
31445
- "channelName": {
31446
- "type": "string",
31447
- "description": "A name for this subscription channel"
31448
- },
31449
- "table": {
31977
+ "prompt": {
31450
31978
  "type": "string",
31451
- "description": "The table to listen to"
31452
- },
31453
- "callback": {
31454
- "type": "(payload: any) => void",
31455
- "description": "Called with the payload on each change"
31979
+ "description": "Description of the image to generate"
31456
31980
  },
31457
- "event": {
31458
- "type": "\"INSERT\" | \"UPDATE\" | \"DELETE\" | \"*\"",
31459
- "description": "The event type to listen for (default: all changes)"
31981
+ "options": {
31982
+ "type": "Partial<OpenAI.Images.ImageGenerateParams>",
31983
+ "description": "Additional parameters (size, n, etc.)"
31460
31984
  }
31461
31985
  },
31462
31986
  "required": [
31463
- "channelName",
31464
- "table",
31465
- "callback"
31987
+ "prompt"
31466
31988
  ],
31467
- "returns": "RealtimeChannel"
31989
+ "returns": "Promise<OpenAI.Images.ImagesResponse>",
31990
+ "examples": [
31991
+ {
31992
+ "language": "ts",
31993
+ "code": "const response = await openai.createImage('A sunset over mountains')\nconsole.log(response.data[0].url)"
31994
+ }
31995
+ ]
31468
31996
  },
31469
- "unsubscribe": {
31470
- "description": "Unsubscribe and remove a realtime channel by name.",
31997
+ "listModels": {
31998
+ "description": "List all available models.",
31999
+ "parameters": {},
32000
+ "required": [],
32001
+ "returns": "Promise<OpenAI.Models.ModelsPage>",
32002
+ "examples": [
32003
+ {
32004
+ "language": "ts",
32005
+ "code": "const models = await openai.listModels()"
32006
+ }
32007
+ ]
32008
+ },
32009
+ "ask": {
32010
+ "description": "Ask a single question and get a text response. Convenience wrapper around `createChatCompletion` for simple Q&A.",
31471
32011
  "parameters": {
31472
- "channelName": {
32012
+ "question": {
31473
32013
  "type": "string",
31474
- "description": "The channel name to remove"
32014
+ "description": "The question to ask"
32015
+ },
32016
+ "options": {
32017
+ "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
32018
+ "description": "Additional completion parameters"
31475
32019
  }
31476
32020
  },
31477
32021
  "required": [
31478
- "channelName"
32022
+ "question"
31479
32023
  ],
31480
- "returns": "void"
31481
- },
31482
- "unsubscribeAll": {
31483
- "description": "Unsubscribe and remove all realtime channels.",
31484
- "parameters": {},
31485
- "required": [],
31486
- "returns": "void"
31487
- },
31488
- "connect": {
31489
- "description": "Connect is a no-op since the Supabase SDK initializes on construction. The client is ready to use immediately after creation.",
31490
- "parameters": {},
31491
- "required": [],
31492
- "returns": "void"
32024
+ "returns": "Promise<string>",
32025
+ "examples": [
32026
+ {
32027
+ "language": "ts",
32028
+ "code": "const answer = await openai.ask('What is 2 + 2?')\nconsole.log(answer) // '4'"
32029
+ }
32030
+ ]
31493
32031
  },
31494
- "disconnect": {
31495
- "description": "Disconnect by signing out and removing all realtime channels.",
31496
- "parameters": {},
31497
- "required": [],
31498
- "returns": "void"
32032
+ "chat": {
32033
+ "description": "Send a multi-turn conversation and get a text response. Convenience wrapper around `createChatCompletion` that returns just the text.",
32034
+ "parameters": {
32035
+ "messages": {
32036
+ "type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
32037
+ "description": "Array of chat messages"
32038
+ },
32039
+ "options": {
32040
+ "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
32041
+ "description": "Additional completion parameters"
32042
+ }
32043
+ },
32044
+ "required": [
32045
+ "messages"
32046
+ ],
32047
+ "returns": "Promise<string>",
32048
+ "examples": [
32049
+ {
32050
+ "language": "ts",
32051
+ "code": "const reply = await openai.chat([\n { role: 'system', content: 'You are a pirate.' },\n { role: 'user', content: 'Hello!' }\n])"
32052
+ }
32053
+ ]
31499
32054
  }
31500
32055
  },
31501
32056
  "getters": {
31502
- "sdk": {
31503
- "description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
31504
- "returns": "SupabaseSDKClient<any, any>"
32057
+ "defaultModel": {
32058
+ "description": "The default model used for completions, from options or 'gpt-4o'.",
32059
+ "returns": "string"
31505
32060
  },
31506
- "storage": {
31507
- "description": "Returns the Supabase Storage client for managing buckets and files.",
31508
- "returns": "any"
32061
+ "raw": {
32062
+ "description": "The underlying OpenAI SDK instance for advanced use cases.",
32063
+ "returns": "OpenAI"
32064
+ }
32065
+ },
32066
+ "events": {
32067
+ "connected": {
32068
+ "name": "connected",
32069
+ "description": "Event emitted by OpenAIClient",
32070
+ "arguments": {}
31509
32071
  },
31510
- "functions": {
31511
- "description": "Returns the Supabase Functions client.",
31512
- "returns": "any"
32072
+ "failure": {
32073
+ "name": "failure",
32074
+ "description": "Event emitted by OpenAIClient",
32075
+ "arguments": {}
32076
+ },
32077
+ "completion": {
32078
+ "name": "completion",
32079
+ "description": "Event emitted by OpenAIClient",
32080
+ "arguments": {}
32081
+ },
32082
+ "embedding": {
32083
+ "name": "embedding",
32084
+ "description": "Event emitted by OpenAIClient",
32085
+ "arguments": {}
32086
+ },
32087
+ "image": {
32088
+ "name": "image",
32089
+ "description": "Event emitted by OpenAIClient",
32090
+ "arguments": {}
32091
+ },
32092
+ "models": {
32093
+ "name": "models",
32094
+ "description": "Event emitted by OpenAIClient",
32095
+ "arguments": {}
31513
32096
  }
31514
32097
  },
31515
- "events": {},
31516
32098
  "state": {},
31517
32099
  "options": {},
31518
32100
  "envVars": [],
31519
32101
  "examples": [
31520
32102
  {
31521
32103
  "language": "ts",
31522
- "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})"
32104
+ "code": "const openai = container.client('openai', { defaultModel: 'gpt-4o' })\nconst answer = await openai.ask('What is the meaning of life?')\nconsole.log(answer)"
31523
32105
  }
31524
32106
  ]
31525
32107
  },
@@ -31820,259 +32402,294 @@ export const introspectionData = [
31820
32402
  }
31821
32403
  },
31822
32404
  {
31823
- "id": "clients.openai",
31824
- "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.",
31825
- "shortcut": "clients.openai",
31826
- "className": "OpenAIClient",
32405
+ "id": "clients.voicebox",
32406
+ "description": "VoiceBox client — local TTS synthesis via VoiceBox.sh REST API (Qwen3-TTS). Provides methods for managing voice profiles and generating speech audio locally. Uses the streaming endpoint for synchronous synthesis (returns WAV buffer).",
32407
+ "shortcut": "clients.voicebox",
32408
+ "className": "VoiceBoxClient",
31827
32409
  "methods": {
31828
32410
  "connect": {
31829
- "description": "Test the API connection by listing models.",
32411
+ "description": "Validate the VoiceBox server is reachable by hitting the health endpoint.",
31830
32412
  "parameters": {},
31831
32413
  "required": [],
31832
- "returns": "Promise<this>",
31833
- "examples": [
31834
- {
31835
- "language": "ts",
31836
- "code": "await openai.connect()"
31837
- }
31838
- ]
32414
+ "returns": "Promise<this>"
31839
32415
  },
31840
- "createChatCompletion": {
31841
- "description": "Create a chat completion using the Chat Completions API.",
31842
- "parameters": {
31843
- "messages": {
31844
- "type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
31845
- "description": "Array of chat messages"
31846
- },
31847
- "options": {
31848
- "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
31849
- "description": "Additional parameters for the completion"
31850
- }
31851
- },
31852
- "required": [
31853
- "messages"
31854
- ],
31855
- "returns": "Promise<OpenAI.Chat.Completions.ChatCompletion>",
32416
+ "listProfiles": {
32417
+ "description": "List all voice profiles.",
32418
+ "parameters": {},
32419
+ "required": [],
32420
+ "returns": "Promise<any[]>",
31856
32421
  "examples": [
31857
32422
  {
31858
32423
  "language": "ts",
31859
- "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)"
32424
+ "code": "const profiles = await vb.listProfiles()\nconsole.log(profiles.map(p => `${p.name} (${p.sample_count} samples)`))"
31860
32425
  }
31861
32426
  ]
31862
32427
  },
31863
- "createResponse": {
31864
- "description": "Create a response using the Responses API.",
32428
+ "getProfile": {
32429
+ "description": "Get a single voice profile by ID.",
31865
32430
  "parameters": {
31866
- "input": {
31867
- "type": "OpenAI.Responses.ResponseInput | string",
31868
- "description": "The input prompt or message array"
31869
- },
31870
- "options": {
31871
- "type": "Partial<OpenAI.Responses.ResponseCreateParamsNonStreaming>",
31872
- "description": "Additional parameters for the response"
32431
+ "profileId": {
32432
+ "type": "string",
32433
+ "description": "Parameter profileId"
31873
32434
  }
31874
32435
  },
31875
32436
  "required": [
31876
- "input"
32437
+ "profileId"
31877
32438
  ],
31878
- "returns": "Promise<OpenAI.Responses.Response>",
31879
- "examples": [
31880
- {
31881
- "language": "ts",
31882
- "code": "const response = await openai.createResponse('Explain quantum computing')"
31883
- }
31884
- ]
32439
+ "returns": "Promise<any>"
31885
32440
  },
31886
- "streamResponse": {
31887
- "description": "Stream a response using the Responses API.",
32441
+ "createProfile": {
32442
+ "description": "Create a new voice profile.",
31888
32443
  "parameters": {
31889
- "input": {
31890
- "type": "OpenAI.Responses.ResponseInput | string",
31891
- "description": "The input prompt or message array"
32444
+ "name": {
32445
+ "type": "string",
32446
+ "description": "Parameter name"
31892
32447
  },
31893
32448
  "options": {
31894
- "type": "Partial<OpenAI.Responses.ResponseCreateParamsStreaming>",
31895
- "description": "Additional parameters for the streaming response"
32449
+ "type": "{ description?: string; language?: string }",
32450
+ "description": "Parameter options"
31896
32451
  }
31897
32452
  },
31898
32453
  "required": [
31899
- "input"
32454
+ "name"
31900
32455
  ],
31901
- "returns": "Promise<AsyncIterable<OpenAI.Responses.ResponseStreamEvent>>",
31902
- "examples": [
31903
- {
31904
- "language": "ts",
31905
- "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}"
31906
- }
31907
- ]
32456
+ "returns": "Promise<any>"
31908
32457
  },
31909
- "createCompletion": {
31910
- "description": "Create a legacy text completion.",
32458
+ "listEffects": {
32459
+ "description": "List available audio effects and their parameter definitions.",
32460
+ "parameters": {},
32461
+ "required": [],
32462
+ "returns": "Promise<any>"
32463
+ },
32464
+ "synthesize": {
32465
+ "description": "Synthesize speech from text using the streaming endpoint. Returns audio as a WAV Buffer (synchronous — blocks until audio is ready).",
31911
32466
  "parameters": {
31912
- "prompt": {
32467
+ "text": {
31913
32468
  "type": "string",
31914
- "description": "The text prompt to complete"
32469
+ "description": "The text to convert to speech"
31915
32470
  },
31916
32471
  "options": {
31917
- "type": "Partial<OpenAI.Completions.CompletionCreateParams>",
31918
- "description": "Additional parameters for the completion"
32472
+ "type": "SynthesizeOptions",
32473
+ "description": "Profile, engine, model, and other synthesis options",
32474
+ "properties": {
32475
+ "profileId": {
32476
+ "type": "string",
32477
+ "description": ""
32478
+ },
32479
+ "engine": {
32480
+ "type": "string",
32481
+ "description": ""
32482
+ },
32483
+ "modelSize": {
32484
+ "type": "string",
32485
+ "description": ""
32486
+ },
32487
+ "language": {
32488
+ "type": "string",
32489
+ "description": ""
32490
+ },
32491
+ "instruct": {
32492
+ "type": "string",
32493
+ "description": ""
32494
+ },
32495
+ "seed": {
32496
+ "type": "number",
32497
+ "description": ""
32498
+ },
32499
+ "maxChunkChars": {
32500
+ "type": "number",
32501
+ "description": ""
32502
+ },
32503
+ "crossfadeMs": {
32504
+ "type": "number",
32505
+ "description": ""
32506
+ },
32507
+ "normalize": {
32508
+ "type": "boolean",
32509
+ "description": ""
32510
+ },
32511
+ "effectsChain": {
32512
+ "type": "EffectConfig[]",
32513
+ "description": ""
32514
+ },
32515
+ "disableCache": {
32516
+ "type": "boolean",
32517
+ "description": ""
32518
+ }
32519
+ }
31919
32520
  }
31920
32521
  },
31921
32522
  "required": [
31922
- "prompt"
32523
+ "text"
31923
32524
  ],
31924
- "returns": "Promise<OpenAI.Completions.Completion>",
32525
+ "returns": "Promise<Buffer>",
31925
32526
  "examples": [
31926
32527
  {
31927
32528
  "language": "ts",
31928
- "code": "const response = await openai.createCompletion('Once upon a time')"
32529
+ "code": "const audio = await vb.synthesize('Hello world', { profileId: 'abc-123' })\n// audio is a Buffer of WAV data"
31929
32530
  }
31930
32531
  ]
31931
32532
  },
31932
- "createEmbedding": {
31933
- "description": "Create text embeddings for semantic search or similarity comparisons.",
32533
+ "generate": {
32534
+ "description": "Generate speech asynchronously (returns metadata, not audio). Use getAudio() to fetch the audio after generation completes.",
31934
32535
  "parameters": {
31935
- "input": {
31936
- "type": "string | string[]",
31937
- "description": "A string or array of strings to embed"
32536
+ "text": {
32537
+ "type": "string",
32538
+ "description": "Parameter text"
31938
32539
  },
31939
32540
  "options": {
31940
- "type": "Partial<OpenAI.Embeddings.EmbeddingCreateParams>",
31941
- "description": "Additional parameters (model, etc.)"
32541
+ "type": "SynthesizeOptions",
32542
+ "description": "Parameter options",
32543
+ "properties": {
32544
+ "profileId": {
32545
+ "type": "string",
32546
+ "description": ""
32547
+ },
32548
+ "engine": {
32549
+ "type": "string",
32550
+ "description": ""
32551
+ },
32552
+ "modelSize": {
32553
+ "type": "string",
32554
+ "description": ""
32555
+ },
32556
+ "language": {
32557
+ "type": "string",
32558
+ "description": ""
32559
+ },
32560
+ "instruct": {
32561
+ "type": "string",
32562
+ "description": ""
32563
+ },
32564
+ "seed": {
32565
+ "type": "number",
32566
+ "description": ""
32567
+ },
32568
+ "maxChunkChars": {
32569
+ "type": "number",
32570
+ "description": ""
32571
+ },
32572
+ "crossfadeMs": {
32573
+ "type": "number",
32574
+ "description": ""
32575
+ },
32576
+ "normalize": {
32577
+ "type": "boolean",
32578
+ "description": ""
32579
+ },
32580
+ "effectsChain": {
32581
+ "type": "EffectConfig[]",
32582
+ "description": ""
32583
+ },
32584
+ "disableCache": {
32585
+ "type": "boolean",
32586
+ "description": ""
32587
+ }
32588
+ }
31942
32589
  }
31943
32590
  },
31944
32591
  "required": [
31945
- "input"
32592
+ "text"
31946
32593
  ],
31947
- "returns": "Promise<OpenAI.Embeddings.CreateEmbeddingResponse>",
31948
- "examples": [
31949
- {
31950
- "language": "ts",
31951
- "code": "const response = await openai.createEmbedding('Hello world')\nconsole.log(response.data[0].embedding.length)"
31952
- }
31953
- ]
32594
+ "returns": "Promise<any>"
31954
32595
  },
31955
- "createImage": {
31956
- "description": "Generate an image from a text prompt using DALL-E.",
32596
+ "getAudio": {
32597
+ "description": "Fetch generated audio by generation ID. Returns WAV Buffer.",
31957
32598
  "parameters": {
31958
- "prompt": {
32599
+ "generationId": {
31959
32600
  "type": "string",
31960
- "description": "Description of the image to generate"
31961
- },
31962
- "options": {
31963
- "type": "Partial<OpenAI.Images.ImageGenerateParams>",
31964
- "description": "Additional parameters (size, n, etc.)"
32601
+ "description": "Parameter generationId"
31965
32602
  }
31966
32603
  },
31967
32604
  "required": [
31968
- "prompt"
32605
+ "generationId"
31969
32606
  ],
31970
- "returns": "Promise<OpenAI.Images.ImagesResponse>",
31971
- "examples": [
31972
- {
31973
- "language": "ts",
31974
- "code": "const response = await openai.createImage('A sunset over mountains')\nconsole.log(response.data[0].url)"
31975
- }
31976
- ]
31977
- },
31978
- "listModels": {
31979
- "description": "List all available models.",
31980
- "parameters": {},
31981
- "required": [],
31982
- "returns": "Promise<OpenAI.Models.ModelsPage>",
31983
- "examples": [
31984
- {
31985
- "language": "ts",
31986
- "code": "const models = await openai.listModels()"
31987
- }
31988
- ]
32607
+ "returns": "Promise<Buffer>"
31989
32608
  },
31990
- "ask": {
31991
- "description": "Ask a single question and get a text response. Convenience wrapper around `createChatCompletion` for simple Q&A.",
32609
+ "say": {
32610
+ "description": "Synthesize and write audio to a file.",
31992
32611
  "parameters": {
31993
- "question": {
32612
+ "text": {
31994
32613
  "type": "string",
31995
- "description": "The question to ask"
32614
+ "description": "Parameter text"
31996
32615
  },
31997
- "options": {
31998
- "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
31999
- "description": "Additional completion parameters"
32000
- }
32001
- },
32002
- "required": [
32003
- "question"
32004
- ],
32005
- "returns": "Promise<string>",
32006
- "examples": [
32007
- {
32008
- "language": "ts",
32009
- "code": "const answer = await openai.ask('What is 2 + 2?')\nconsole.log(answer) // '4'"
32010
- }
32011
- ]
32012
- },
32013
- "chat": {
32014
- "description": "Send a multi-turn conversation and get a text response. Convenience wrapper around `createChatCompletion` that returns just the text.",
32015
- "parameters": {
32016
- "messages": {
32017
- "type": "OpenAI.Chat.Completions.ChatCompletionMessageParam[]",
32018
- "description": "Array of chat messages"
32616
+ "outputPath": {
32617
+ "type": "string",
32618
+ "description": "Parameter outputPath"
32019
32619
  },
32020
32620
  "options": {
32021
- "type": "Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>",
32022
- "description": "Additional completion parameters"
32621
+ "type": "SynthesizeOptions",
32622
+ "description": "Parameter options",
32623
+ "properties": {
32624
+ "profileId": {
32625
+ "type": "string",
32626
+ "description": ""
32627
+ },
32628
+ "engine": {
32629
+ "type": "string",
32630
+ "description": ""
32631
+ },
32632
+ "modelSize": {
32633
+ "type": "string",
32634
+ "description": ""
32635
+ },
32636
+ "language": {
32637
+ "type": "string",
32638
+ "description": ""
32639
+ },
32640
+ "instruct": {
32641
+ "type": "string",
32642
+ "description": ""
32643
+ },
32644
+ "seed": {
32645
+ "type": "number",
32646
+ "description": ""
32647
+ },
32648
+ "maxChunkChars": {
32649
+ "type": "number",
32650
+ "description": ""
32651
+ },
32652
+ "crossfadeMs": {
32653
+ "type": "number",
32654
+ "description": ""
32655
+ },
32656
+ "normalize": {
32657
+ "type": "boolean",
32658
+ "description": ""
32659
+ },
32660
+ "effectsChain": {
32661
+ "type": "EffectConfig[]",
32662
+ "description": ""
32663
+ },
32664
+ "disableCache": {
32665
+ "type": "boolean",
32666
+ "description": ""
32667
+ }
32668
+ }
32023
32669
  }
32024
32670
  },
32025
32671
  "required": [
32026
- "messages"
32672
+ "text",
32673
+ "outputPath"
32027
32674
  ],
32028
- "returns": "Promise<string>",
32029
- "examples": [
32030
- {
32031
- "language": "ts",
32032
- "code": "const reply = await openai.chat([\n { role: 'system', content: 'You are a pirate.' },\n { role: 'user', content: 'Hello!' }\n])"
32033
- }
32034
- ]
32035
- }
32036
- },
32037
- "getters": {
32038
- "defaultModel": {
32039
- "description": "The default model used for completions, from options or 'gpt-4o'.",
32040
- "returns": "string"
32041
- },
32042
- "raw": {
32043
- "description": "The underlying OpenAI SDK instance for advanced use cases.",
32044
- "returns": "OpenAI"
32675
+ "returns": "Promise<string>"
32045
32676
  }
32046
32677
  },
32678
+ "getters": {},
32047
32679
  "events": {
32048
- "connected": {
32049
- "name": "connected",
32050
- "description": "Event emitted by OpenAIClient",
32051
- "arguments": {}
32052
- },
32053
32680
  "failure": {
32054
32681
  "name": "failure",
32055
- "description": "Event emitted by OpenAIClient",
32056
- "arguments": {}
32057
- },
32058
- "completion": {
32059
- "name": "completion",
32060
- "description": "Event emitted by OpenAIClient",
32682
+ "description": "Event emitted by VoiceBoxClient",
32061
32683
  "arguments": {}
32062
32684
  },
32063
- "embedding": {
32064
- "name": "embedding",
32065
- "description": "Event emitted by OpenAIClient",
32685
+ "profiles": {
32686
+ "name": "profiles",
32687
+ "description": "Event emitted by VoiceBoxClient",
32066
32688
  "arguments": {}
32067
32689
  },
32068
- "image": {
32069
- "name": "image",
32070
- "description": "Event emitted by OpenAIClient",
32071
- "arguments": {}
32072
- },
32073
- "models": {
32074
- "name": "models",
32075
- "description": "Event emitted by OpenAIClient",
32690
+ "speech": {
32691
+ "name": "speech",
32692
+ "description": "Event emitted by VoiceBoxClient",
32076
32693
  "arguments": {}
32077
32694
  }
32078
32695
  },
@@ -32082,9 +32699,90 @@ export const introspectionData = [
32082
32699
  "examples": [
32083
32700
  {
32084
32701
  "language": "ts",
32085
- "code": "const openai = container.client('openai', { defaultModel: 'gpt-4o' })\nconst answer = await openai.ask('What is the meaning of life?')\nconsole.log(answer)"
32702
+ "code": "const vb = container.client('voicebox')\nawait vb.connect()\nconst profiles = await vb.listProfiles()\nconst audio = await vb.synthesize('Hello world', { profileId: profiles[0].id })\n// audio is a Buffer of WAV data"
32086
32703
  }
32087
- ]
32704
+ ],
32705
+ "types": {
32706
+ "SynthesizeOptions": {
32707
+ "description": "",
32708
+ "properties": {
32709
+ "profileId": {
32710
+ "type": "string",
32711
+ "description": "",
32712
+ "optional": true
32713
+ },
32714
+ "engine": {
32715
+ "type": "string",
32716
+ "description": "",
32717
+ "optional": true
32718
+ },
32719
+ "modelSize": {
32720
+ "type": "string",
32721
+ "description": "",
32722
+ "optional": true
32723
+ },
32724
+ "language": {
32725
+ "type": "string",
32726
+ "description": "",
32727
+ "optional": true
32728
+ },
32729
+ "instruct": {
32730
+ "type": "string",
32731
+ "description": "",
32732
+ "optional": true
32733
+ },
32734
+ "seed": {
32735
+ "type": "number",
32736
+ "description": "",
32737
+ "optional": true
32738
+ },
32739
+ "maxChunkChars": {
32740
+ "type": "number",
32741
+ "description": "",
32742
+ "optional": true
32743
+ },
32744
+ "crossfadeMs": {
32745
+ "type": "number",
32746
+ "description": "",
32747
+ "optional": true
32748
+ },
32749
+ "normalize": {
32750
+ "type": "boolean",
32751
+ "description": "",
32752
+ "optional": true
32753
+ },
32754
+ "effectsChain": {
32755
+ "type": "EffectConfig[]",
32756
+ "description": "",
32757
+ "optional": true
32758
+ },
32759
+ "disableCache": {
32760
+ "type": "boolean",
32761
+ "description": "",
32762
+ "optional": true
32763
+ }
32764
+ }
32765
+ },
32766
+ "EffectConfig": {
32767
+ "description": "",
32768
+ "properties": {
32769
+ "type": {
32770
+ "type": "string",
32771
+ "description": ""
32772
+ },
32773
+ "enabled": {
32774
+ "type": "boolean",
32775
+ "description": "",
32776
+ "optional": true
32777
+ },
32778
+ "params": {
32779
+ "type": "Record<string, any>",
32780
+ "description": "",
32781
+ "optional": true
32782
+ }
32783
+ }
32784
+ }
32785
+ }
32088
32786
  },
32089
32787
  {
32090
32788
  "id": "clients.elevenlabs",
@@ -32349,6 +33047,201 @@ export const introspectionData = [
32349
33047
  }
32350
33048
  }
32351
33049
  },
33050
+ {
33051
+ "id": "clients.supabase",
33052
+ "description": "Supabase client for the Luca container system. Wraps the official `@supabase/supabase-js` SDK and exposes it through Luca's typed state, events, and introspection system. The SDK is isomorphic so this single implementation works in both Node and browser containers. Use `client.sdk` for full SDK access, or use the convenience wrappers for common operations (auth, database queries, storage, edge functions, realtime).",
33053
+ "shortcut": "clients.supabase",
33054
+ "className": "SupabaseClient",
33055
+ "methods": {
33056
+ "from": {
33057
+ "description": "Start a query on a Postgres table or view.",
33058
+ "parameters": {
33059
+ "table": {
33060
+ "type": "string",
33061
+ "description": "The table or view name to query"
33062
+ }
33063
+ },
33064
+ "required": [
33065
+ "table"
33066
+ ],
33067
+ "returns": "void"
33068
+ },
33069
+ "rpc": {
33070
+ "description": "Call a Postgres function (RPC).",
33071
+ "parameters": {
33072
+ "fn": {
33073
+ "type": "string",
33074
+ "description": "The function name"
33075
+ },
33076
+ "params": {
33077
+ "type": "Record<string, unknown>",
33078
+ "description": "Arguments to pass to the function"
33079
+ },
33080
+ "options": {
33081
+ "type": "{ head?: boolean; get?: boolean; count?: \"exact\" | \"planned\" | \"estimated\" }",
33082
+ "description": "Optional settings (head, get, count)"
33083
+ }
33084
+ },
33085
+ "required": [
33086
+ "fn"
33087
+ ],
33088
+ "returns": "void"
33089
+ },
33090
+ "signInWithPassword": {
33091
+ "description": "Sign in with email and password.",
33092
+ "parameters": {
33093
+ "email": {
33094
+ "type": "string",
33095
+ "description": "Parameter email"
33096
+ },
33097
+ "password": {
33098
+ "type": "string",
33099
+ "description": "Parameter password"
33100
+ }
33101
+ },
33102
+ "required": [
33103
+ "email",
33104
+ "password"
33105
+ ],
33106
+ "returns": "void"
33107
+ },
33108
+ "signUp": {
33109
+ "description": "Create a new user account with email and password.",
33110
+ "parameters": {
33111
+ "email": {
33112
+ "type": "string",
33113
+ "description": "Parameter email"
33114
+ },
33115
+ "password": {
33116
+ "type": "string",
33117
+ "description": "Parameter password"
33118
+ }
33119
+ },
33120
+ "required": [
33121
+ "email",
33122
+ "password"
33123
+ ],
33124
+ "returns": "void"
33125
+ },
33126
+ "signOut": {
33127
+ "description": "Sign the current user out.",
33128
+ "parameters": {},
33129
+ "required": [],
33130
+ "returns": "void"
33131
+ },
33132
+ "getSession": {
33133
+ "description": "Get the current session, if any.",
33134
+ "parameters": {},
33135
+ "required": [],
33136
+ "returns": "void"
33137
+ },
33138
+ "getUser": {
33139
+ "description": "Get the current user, if any.",
33140
+ "parameters": {},
33141
+ "required": [],
33142
+ "returns": "void"
33143
+ },
33144
+ "invoke": {
33145
+ "description": "Invoke a Supabase Edge Function by name.",
33146
+ "parameters": {
33147
+ "name": {
33148
+ "type": "string",
33149
+ "description": "Parameter name"
33150
+ },
33151
+ "body": {
33152
+ "type": "any",
33153
+ "description": "Parameter body"
33154
+ }
33155
+ },
33156
+ "required": [
33157
+ "name"
33158
+ ],
33159
+ "returns": "void"
33160
+ },
33161
+ "subscribe": {
33162
+ "description": "Subscribe to realtime changes on a Postgres table.",
33163
+ "parameters": {
33164
+ "channelName": {
33165
+ "type": "string",
33166
+ "description": "A name for this subscription channel"
33167
+ },
33168
+ "table": {
33169
+ "type": "string",
33170
+ "description": "The table to listen to"
33171
+ },
33172
+ "callback": {
33173
+ "type": "(payload: any) => void",
33174
+ "description": "Called with the payload on each change"
33175
+ },
33176
+ "event": {
33177
+ "type": "\"INSERT\" | \"UPDATE\" | \"DELETE\" | \"*\"",
33178
+ "description": "The event type to listen for (default: all changes)"
33179
+ }
33180
+ },
33181
+ "required": [
33182
+ "channelName",
33183
+ "table",
33184
+ "callback"
33185
+ ],
33186
+ "returns": "RealtimeChannel"
33187
+ },
33188
+ "unsubscribe": {
33189
+ "description": "Unsubscribe and remove a realtime channel by name.",
33190
+ "parameters": {
33191
+ "channelName": {
33192
+ "type": "string",
33193
+ "description": "The channel name to remove"
33194
+ }
33195
+ },
33196
+ "required": [
33197
+ "channelName"
33198
+ ],
33199
+ "returns": "void"
33200
+ },
33201
+ "unsubscribeAll": {
33202
+ "description": "Unsubscribe and remove all realtime channels.",
33203
+ "parameters": {},
33204
+ "required": [],
33205
+ "returns": "void"
33206
+ },
33207
+ "connect": {
33208
+ "description": "Connect is a no-op since the Supabase SDK initializes on construction. The client is ready to use immediately after creation.",
33209
+ "parameters": {},
33210
+ "required": [],
33211
+ "returns": "void"
33212
+ },
33213
+ "disconnect": {
33214
+ "description": "Disconnect by signing out and removing all realtime channels.",
33215
+ "parameters": {},
33216
+ "required": [],
33217
+ "returns": "void"
33218
+ }
33219
+ },
33220
+ "getters": {
33221
+ "sdk": {
33222
+ "description": "Returns the raw Supabase SDK client for full access to all SDK methods.",
33223
+ "returns": "SupabaseSDKClient<any, any>"
33224
+ },
33225
+ "storage": {
33226
+ "description": "Returns the Supabase Storage client for managing buckets and files.",
33227
+ "returns": "any"
33228
+ },
33229
+ "functions": {
33230
+ "description": "Returns the Supabase Functions client.",
33231
+ "returns": "any"
33232
+ }
33233
+ },
33234
+ "events": {},
33235
+ "state": {},
33236
+ "options": {},
33237
+ "envVars": [],
33238
+ "examples": [
33239
+ {
33240
+ "language": "ts",
33241
+ "code": "const supabase = container.client('supabase', {\n supabaseUrl: 'https://xyz.supabase.co',\n supabaseKey: 'your-anon-key',\n})\n\n// Query data\nconst { data } = await supabase.from('users').select('*')\n\n// Auth\nawait supabase.signInWithPassword('user@example.com', 'password')\n\n// Realtime\nsupabase.subscribe('changes', 'users', (payload) => {\n console.log('Change:', payload)\n})"
33242
+ }
33243
+ ]
33244
+ },
32352
33245
  {
32353
33246
  "id": "servers.mcp",
32354
33247
  "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).",
@@ -33072,6 +33965,16 @@ export const introspectionData = [
33072
33965
  "hasVoice": {
33073
33966
  "type": "boolean",
33074
33967
  "description": "Whether a voice.yaml configuration file exists."
33968
+ },
33969
+ "about": {
33970
+ "type": "string",
33971
+ "description": "Contents of ABOUT.md if present, undefined otherwise.",
33972
+ "optional": true
33973
+ },
33974
+ "meta": {
33975
+ "type": "Record<string, any>",
33976
+ "description": "Frontmatter metadata parsed from CORE.md.",
33977
+ "optional": true
33075
33978
  }
33076
33979
  }
33077
33980
  }
@@ -33166,22 +34069,45 @@ export const introspectionData = [
33166
34069
  ]
33167
34070
  },
33168
34071
  "fork": {
33169
- "description": "Fork the conversation into a new independent instance. The fork inherits the same system prompt, tools, and full message history, but has its own identity and state — changes in either direction do not affect the other.",
34072
+ "description": "",
33170
34073
  "parameters": {
33171
34074
  "overrides": {
33172
- "type": "Partial<ConversationOptions>",
33173
- "description": "Optional option overrides for the forked conversation (e.g. different model or title)"
34075
+ "type": "ForkOptions | ForkOptions[]",
34076
+ "description": "Parameter overrides"
33174
34077
  }
33175
34078
  },
33176
34079
  "required": [],
33177
- "returns": "Conversation",
34080
+ "returns": "Conversation | Conversation[]"
34081
+ },
34082
+ "research": {
34083
+ "description": "Fan out N questions in parallel using forked conversations, return the results. Each fork is independent and ephemeral — no history is saved.",
34084
+ "parameters": {
34085
+ "questions": {
34086
+ "type": "(string | { question: string; forkOptions?: ForkOptions })[]",
34087
+ "description": "Array of questions (strings) or objects with question + per-fork overrides"
34088
+ },
34089
+ "defaults": {
34090
+ "type": "ForkOptions",
34091
+ "description": "Default fork options applied to all forks (individual overrides take precedence)"
34092
+ }
34093
+ },
34094
+ "required": [
34095
+ "questions"
34096
+ ],
34097
+ "returns": "Promise<string[]>",
33178
34098
  "examples": [
33179
34099
  {
33180
34100
  "language": "ts",
33181
- "code": "const fork = conversation.fork()\nawait fork.ask('What if we took a different approach?')\n// original conversation is unchanged"
34101
+ "code": "const results = await conversation.research([\n \"What are the pros of approach A?\",\n \"What are the pros of approach B?\",\n], { history: 'none', model: 'gpt-4o-mini' })\n\n// Per-fork overrides\nconst results = await conversation.research([\n \"Quick factual question\",\n { question: \"Needs recent context\", forkOptions: { history: 5 } },\n], { history: 'none' })"
33182
34102
  }
33183
34103
  ]
33184
34104
  },
34105
+ "abort": {
34106
+ "description": "Abort the current ask() call. Cancels the in-flight network request and any pending tool executions. The ask() promise will reject with a ConversationAbortError whose `partial` property contains any text accumulated before the abort.",
34107
+ "parameters": {},
34108
+ "required": [],
34109
+ "returns": "void"
34110
+ },
33185
34111
  "estimateTokens": {
33186
34112
  "description": "Estimate the input token count for the current messages array using the js-tiktoken tokenizer. Updates state.",
33187
34113
  "parameters": {},
@@ -33340,6 +34266,11 @@ export const introspectionData = [
33340
34266
  "description": "Event emitted by Conversation",
33341
34267
  "arguments": {}
33342
34268
  },
34269
+ "aborted": {
34270
+ "name": "aborted",
34271
+ "description": "Event emitted by Conversation",
34272
+ "arguments": {}
34273
+ },
33343
34274
  "toolError": {
33344
34275
  "name": "toolError",
33345
34276
  "description": "Event emitted by Conversation",
@@ -34799,8 +35730,26 @@ export const introspectionData = [
34799
35730
  ],
34800
35731
  "returns": "this"
34801
35732
  },
35733
+ "triggerHook": {
35734
+ "description": "Trigger a named hook and await its completion. The hook function receives `(assistant, ...args)` and its return value is passed back to the caller. This ensures hooks run to completion BEFORE any subsequent logic executes, unlike the old bus-based approach where async hooks were fire-and-forget. Hooks that don't exist are silently skipped (returns undefined).",
35735
+ "parameters": {
35736
+ "hookName": {
35737
+ "type": "string",
35738
+ "description": "The hook to trigger (matches an export name from hooks.ts)"
35739
+ },
35740
+ "args": {
35741
+ "type": "any[]",
35742
+ "description": "Arguments passed to the hook after the assistant instance"
35743
+ }
35744
+ },
35745
+ "required": [
35746
+ "hookName",
35747
+ "args"
35748
+ ],
35749
+ "returns": "Promise<any>"
35750
+ },
34802
35751
  "afterInitialize": {
34803
- "description": "Called immediately after the assistant is constructed. Synchronously loads the system prompt, tools, and hooks, then binds hooks as event listeners so every emitted event automatically invokes its corresponding hook.",
35752
+ "description": "Called immediately after the assistant is constructed. Synchronously loads the system prompt, tools, and hooks. Hooks are invoked via triggerHook() at each emit site, ensuring async hooks are properly awaited.",
34804
35753
  "parameters": {},
34805
35754
  "required": [],
34806
35755
  "returns": "void"
@@ -35031,6 +35980,68 @@ export const introspectionData = [
35031
35980
  "required": [],
35032
35981
  "returns": "void"
35033
35982
  },
35983
+ "fork": {
35984
+ "description": "",
35985
+ "parameters": {
35986
+ "options": {
35987
+ "type": "AssistantForkOptions | AssistantForkOptions[]",
35988
+ "description": "Parameter options"
35989
+ }
35990
+ },
35991
+ "required": [],
35992
+ "returns": "Promise<Assistant | Assistant[]>"
35993
+ },
35994
+ "createResearchJob": {
35995
+ "description": "Create a non-blocking research job that fans out questions across forked assistants. The forks fire immediately and the returned entity tracks progress via observable state and events. Each fork preserves the full assistant identity (interceptors, tools, hooks).",
35996
+ "parameters": {
35997
+ "prompt": {
35998
+ "type": "string",
35999
+ "description": "Shared context/framing prompt prepended to each fork's system prompt"
36000
+ },
36001
+ "questions": {
36002
+ "type": "(string | { question: string; forkOptions?: AssistantForkOptions })[]",
36003
+ "description": "Array of questions (strings) or objects with question + per-fork overrides"
36004
+ },
36005
+ "defaults": {
36006
+ "type": "AssistantForkOptions",
36007
+ "description": "Default fork options applied to all forks"
36008
+ }
36009
+ },
36010
+ "required": [
36011
+ "prompt",
36012
+ "questions"
36013
+ ],
36014
+ "returns": "Promise<ResearchJob>",
36015
+ "examples": [
36016
+ {
36017
+ "language": "ts",
36018
+ "code": "// Fire and forget — check later\nconst job = await assistant.createResearchJob(\n \"Analyze this codebase for security issues\",\n [\"Look for SQL injection\", \"Look for XSS\", \"Look for auth bypass\"],\n { history: 'none', model: 'gpt-4o-mini' }\n)\n\n// Check progress\njob.state.get('completed') // 2 of 3\njob.state.get('results') // [answer1, answer2, null]\n\n// React to events\njob.on('forkCompleted', (index, result) => console.log(`Fork ${index} done`))\n\n// Or just wait\nawait job.waitFor('completed')"
36019
+ }
36020
+ ]
36021
+ },
36022
+ "research": {
36023
+ "description": "Fan out N questions in parallel using forked assistants, return the results. Sugar over createResearchJob — blocks until all forks complete.",
36024
+ "parameters": {
36025
+ "questions": {
36026
+ "type": "(string | { question: string; forkOptions?: AssistantForkOptions })[]",
36027
+ "description": "Array of questions (strings) or objects with question + per-fork overrides"
36028
+ },
36029
+ "defaults": {
36030
+ "type": "AssistantForkOptions & { prompt?: string }",
36031
+ "description": "Default fork options applied to all forks"
36032
+ }
36033
+ },
36034
+ "required": [
36035
+ "questions"
36036
+ ],
36037
+ "returns": "Promise<(string | null)[]>",
36038
+ "examples": [
36039
+ {
36040
+ "language": "ts",
36041
+ "code": "const results = await assistant.research([\n \"What are best practices for X?\",\n \"What are common pitfalls of X?\",\n], { history: 'none', model: 'gpt-4o-mini' })"
36042
+ }
36043
+ ]
36044
+ },
35034
36045
  "subagent": {
35035
36046
  "description": "Get or create a subagent assistant. Uses the assistantsManager to discover and create the assistant, then caches the instance for reuse across tool calls.",
35036
36047
  "parameters": {
@@ -35108,6 +36119,14 @@ export const introspectionData = [
35108
36119
  "description": "Whether the assistant has been started and is ready to receive questions.",
35109
36120
  "returns": "boolean"
35110
36121
  },
36122
+ "isFork": {
36123
+ "description": "Whether this assistant was created via fork().",
36124
+ "returns": "boolean"
36125
+ },
36126
+ "forkDepth": {
36127
+ "description": "How many levels deep this fork is. 0 = original, 1 = direct fork, 2 = fork of a fork, etc.",
36128
+ "returns": "number"
36129
+ },
35111
36130
  "systemPrompt": {
35112
36131
  "description": "The current system prompt text.",
35113
36132
  "returns": "string"
@@ -35162,6 +36181,11 @@ export const introspectionData = [
35162
36181
  }
35163
36182
  },
35164
36183
  "events": {
36184
+ "hookFired": {
36185
+ "name": "hookFired",
36186
+ "description": "Event emitted by Assistant",
36187
+ "arguments": {}
36188
+ },
35165
36189
  "created": {
35166
36190
  "name": "created",
35167
36191
  "description": "Event emitted by Assistant",
@@ -35177,11 +36201,6 @@ export const introspectionData = [
35177
36201
  "description": "Event emitted by Assistant",
35178
36202
  "arguments": {}
35179
36203
  },
35180
- "hookFired": {
35181
- "name": "hookFired",
35182
- "description": "Event emitted by Assistant",
35183
- "arguments": {}
35184
- },
35185
36204
  "reloaded": {
35186
36205
  "name": "reloaded",
35187
36206
  "description": "Event emitted by Assistant",