lua-cli 3.54.0 → 3.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-exports.d.ts +205 -111
- package/dist/api-exports.js +397 -112
- package/dist/api-exports.js.map +1 -1
- package/dist/index.js +1144 -310
- package/dist/index.js.map +1 -1
- package/dist/voice/test/index.d.ts +100 -94
- package/dist/workflow-builder.d.ts +7 -4
- package/dist/workflow-builder.js +322 -71
- package/dist/workflow-builder.js.map +1 -1
- package/docs/README.md +3 -3
- package/docs/api/Data.md +19 -4
- package/docs/api/PreProcessor.md +66 -56
- package/docs/api/Threads.md +14 -0
- package/package.json +2 -1
- package/template/package.json +1 -1
- package/template-web-app/web/package.json +2 -3
- package/template-web-app/web/src/index.css +0 -2
- package/template-web-app/web/src/main.tsx +1 -9
|
@@ -79,10 +79,7 @@ declare interface LuaTool<TInput extends ZodType = ZodType> {
|
|
|
79
79
|
* while the tool runs. Each text is a string literal (or a const holding one)
|
|
80
80
|
* of at most 80 characters; `lua compile` ignores a computed label.
|
|
81
81
|
*/
|
|
82
|
-
label?:
|
|
83
|
-
running: string;
|
|
84
|
-
done: string;
|
|
85
|
-
};
|
|
82
|
+
label?: ToolLabel;
|
|
86
83
|
/** Zod schema for input validation */
|
|
87
84
|
inputSchema: TInput;
|
|
88
85
|
/**
|
|
@@ -253,15 +250,15 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
253
250
|
*/
|
|
254
251
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
255
252
|
}, "strip", z.ZodTypeAny, {
|
|
256
|
-
model: string;
|
|
257
253
|
kind: "inference";
|
|
258
|
-
|
|
254
|
+
model: string;
|
|
259
255
|
options?: Record<string, unknown> | undefined;
|
|
256
|
+
voice?: string | undefined;
|
|
260
257
|
}, {
|
|
261
|
-
model: string;
|
|
262
258
|
kind: "inference";
|
|
263
|
-
|
|
259
|
+
model: string;
|
|
264
260
|
options?: Record<string, unknown> | undefined;
|
|
261
|
+
voice?: string | undefined;
|
|
265
262
|
}>, z.ZodObject<{
|
|
266
263
|
kind: z.ZodLiteral<"plugin">;
|
|
267
264
|
provider: z.ZodEnum<["deepgram", "elevenlabs"]>;
|
|
@@ -274,15 +271,15 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
274
271
|
*/
|
|
275
272
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
276
273
|
}, "strip", z.ZodTypeAny, {
|
|
277
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
278
274
|
options: Record<string, unknown>;
|
|
279
|
-
provider: "deepgram" | "elevenlabs";
|
|
280
275
|
kind: "plugin";
|
|
281
|
-
|
|
276
|
+
provider: "deepgram" | "elevenlabs";
|
|
282
277
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
278
|
+
}, {
|
|
283
279
|
options: Record<string, unknown>;
|
|
284
|
-
provider: "deepgram" | "elevenlabs";
|
|
285
280
|
kind: "plugin";
|
|
281
|
+
provider: "deepgram" | "elevenlabs";
|
|
282
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
286
283
|
}>, z.ZodObject<{
|
|
287
284
|
kind: z.ZodLiteral<"realtime">;
|
|
288
285
|
provider: z.ZodEnum<["openai", "google", "xai"]>;
|
|
@@ -295,12 +292,12 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
295
292
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
296
293
|
}, "strip", z.ZodTypeAny, {
|
|
297
294
|
options: Record<string, unknown>;
|
|
298
|
-
provider: "openai" | "google" | "xai";
|
|
299
295
|
kind: "realtime";
|
|
296
|
+
provider: "openai" | "google" | "xai";
|
|
300
297
|
}, {
|
|
301
298
|
options: Record<string, unknown>;
|
|
302
|
-
provider: "openai" | "google" | "xai";
|
|
303
299
|
kind: "realtime";
|
|
300
|
+
provider: "openai" | "google" | "xai";
|
|
304
301
|
}>]>;
|
|
305
302
|
stt: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
306
303
|
kind: z.ZodLiteral<"inference">;
|
|
@@ -319,15 +316,15 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
319
316
|
*/
|
|
320
317
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
321
318
|
}, "strip", z.ZodTypeAny, {
|
|
322
|
-
model: string;
|
|
323
319
|
kind: "inference";
|
|
324
|
-
|
|
320
|
+
model: string;
|
|
325
321
|
options?: Record<string, unknown> | undefined;
|
|
322
|
+
voice?: string | undefined;
|
|
326
323
|
}, {
|
|
327
|
-
model: string;
|
|
328
324
|
kind: "inference";
|
|
329
|
-
|
|
325
|
+
model: string;
|
|
330
326
|
options?: Record<string, unknown> | undefined;
|
|
327
|
+
voice?: string | undefined;
|
|
331
328
|
}>, z.ZodObject<{
|
|
332
329
|
kind: z.ZodLiteral<"plugin">;
|
|
333
330
|
provider: z.ZodEnum<["deepgram", "elevenlabs"]>;
|
|
@@ -340,15 +337,15 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
340
337
|
*/
|
|
341
338
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
342
339
|
}, "strip", z.ZodTypeAny, {
|
|
343
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
344
340
|
options: Record<string, unknown>;
|
|
345
|
-
provider: "deepgram" | "elevenlabs";
|
|
346
341
|
kind: "plugin";
|
|
347
|
-
|
|
342
|
+
provider: "deepgram" | "elevenlabs";
|
|
348
343
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
344
|
+
}, {
|
|
349
345
|
options: Record<string, unknown>;
|
|
350
|
-
provider: "deepgram" | "elevenlabs";
|
|
351
346
|
kind: "plugin";
|
|
347
|
+
provider: "deepgram" | "elevenlabs";
|
|
348
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
352
349
|
}>, z.ZodObject<{
|
|
353
350
|
kind: z.ZodLiteral<"realtime">;
|
|
354
351
|
provider: z.ZodEnum<["openai", "google", "xai"]>;
|
|
@@ -361,12 +358,12 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
361
358
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
362
359
|
}, "strip", z.ZodTypeAny, {
|
|
363
360
|
options: Record<string, unknown>;
|
|
364
|
-
provider: "openai" | "google" | "xai";
|
|
365
361
|
kind: "realtime";
|
|
362
|
+
provider: "openai" | "google" | "xai";
|
|
366
363
|
}, {
|
|
367
364
|
options: Record<string, unknown>;
|
|
368
|
-
provider: "openai" | "google" | "xai";
|
|
369
365
|
kind: "realtime";
|
|
366
|
+
provider: "openai" | "google" | "xai";
|
|
370
367
|
}>]>>;
|
|
371
368
|
tts: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
372
369
|
kind: z.ZodLiteral<"inference">;
|
|
@@ -385,15 +382,15 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
385
382
|
*/
|
|
386
383
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
387
384
|
}, "strip", z.ZodTypeAny, {
|
|
388
|
-
model: string;
|
|
389
385
|
kind: "inference";
|
|
390
|
-
|
|
386
|
+
model: string;
|
|
391
387
|
options?: Record<string, unknown> | undefined;
|
|
388
|
+
voice?: string | undefined;
|
|
392
389
|
}, {
|
|
393
|
-
model: string;
|
|
394
390
|
kind: "inference";
|
|
395
|
-
|
|
391
|
+
model: string;
|
|
396
392
|
options?: Record<string, unknown> | undefined;
|
|
393
|
+
voice?: string | undefined;
|
|
397
394
|
}>, z.ZodObject<{
|
|
398
395
|
kind: z.ZodLiteral<"plugin">;
|
|
399
396
|
provider: z.ZodEnum<["deepgram", "elevenlabs"]>;
|
|
@@ -406,15 +403,15 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
406
403
|
*/
|
|
407
404
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
408
405
|
}, "strip", z.ZodTypeAny, {
|
|
409
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
410
406
|
options: Record<string, unknown>;
|
|
411
|
-
provider: "deepgram" | "elevenlabs";
|
|
412
407
|
kind: "plugin";
|
|
413
|
-
|
|
408
|
+
provider: "deepgram" | "elevenlabs";
|
|
414
409
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
410
|
+
}, {
|
|
415
411
|
options: Record<string, unknown>;
|
|
416
|
-
provider: "deepgram" | "elevenlabs";
|
|
417
412
|
kind: "plugin";
|
|
413
|
+
provider: "deepgram" | "elevenlabs";
|
|
414
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
418
415
|
}>, z.ZodObject<{
|
|
419
416
|
kind: z.ZodLiteral<"realtime">;
|
|
420
417
|
provider: z.ZodEnum<["openai", "google", "xai"]>;
|
|
@@ -427,12 +424,12 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
427
424
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
428
425
|
}, "strip", z.ZodTypeAny, {
|
|
429
426
|
options: Record<string, unknown>;
|
|
430
|
-
provider: "openai" | "google" | "xai";
|
|
431
427
|
kind: "realtime";
|
|
428
|
+
provider: "openai" | "google" | "xai";
|
|
432
429
|
}, {
|
|
433
430
|
options: Record<string, unknown>;
|
|
434
|
-
provider: "openai" | "google" | "xai";
|
|
435
431
|
kind: "realtime";
|
|
432
|
+
provider: "openai" | "google" | "xai";
|
|
436
433
|
}>]>>;
|
|
437
434
|
vad: z.ZodOptional<z.ZodString>;
|
|
438
435
|
vadOptions: z.ZodOptional<z.ZodObject<{
|
|
@@ -591,52 +588,52 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
591
588
|
excludeTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
592
589
|
}, "strip", z.ZodTypeAny, {
|
|
593
590
|
llm: {
|
|
594
|
-
model: string;
|
|
595
591
|
kind: "inference";
|
|
596
|
-
|
|
592
|
+
model: string;
|
|
597
593
|
options?: Record<string, unknown> | undefined;
|
|
594
|
+
voice?: string | undefined;
|
|
598
595
|
} | {
|
|
599
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
600
596
|
options: Record<string, unknown>;
|
|
601
|
-
provider: "deepgram" | "elevenlabs";
|
|
602
597
|
kind: "plugin";
|
|
598
|
+
provider: "deepgram" | "elevenlabs";
|
|
599
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
603
600
|
} | {
|
|
604
601
|
options: Record<string, unknown>;
|
|
605
|
-
provider: "openai" | "google" | "xai";
|
|
606
602
|
kind: "realtime";
|
|
603
|
+
provider: "openai" | "google" | "xai";
|
|
607
604
|
};
|
|
608
605
|
name?: string | undefined;
|
|
609
606
|
vad?: string | undefined;
|
|
610
607
|
stt?: {
|
|
611
|
-
model: string;
|
|
612
608
|
kind: "inference";
|
|
613
|
-
|
|
609
|
+
model: string;
|
|
614
610
|
options?: Record<string, unknown> | undefined;
|
|
611
|
+
voice?: string | undefined;
|
|
615
612
|
} | {
|
|
616
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
617
613
|
options: Record<string, unknown>;
|
|
618
|
-
provider: "deepgram" | "elevenlabs";
|
|
619
614
|
kind: "plugin";
|
|
615
|
+
provider: "deepgram" | "elevenlabs";
|
|
616
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
620
617
|
} | {
|
|
621
618
|
options: Record<string, unknown>;
|
|
622
|
-
provider: "openai" | "google" | "xai";
|
|
623
619
|
kind: "realtime";
|
|
620
|
+
provider: "openai" | "google" | "xai";
|
|
624
621
|
} | undefined;
|
|
625
622
|
volume?: number | undefined;
|
|
626
623
|
tts?: {
|
|
627
|
-
model: string;
|
|
628
624
|
kind: "inference";
|
|
629
|
-
|
|
625
|
+
model: string;
|
|
630
626
|
options?: Record<string, unknown> | undefined;
|
|
627
|
+
voice?: string | undefined;
|
|
631
628
|
} | {
|
|
632
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
633
629
|
options: Record<string, unknown>;
|
|
634
|
-
provider: "deepgram" | "elevenlabs";
|
|
635
630
|
kind: "plugin";
|
|
631
|
+
provider: "deepgram" | "elevenlabs";
|
|
632
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
636
633
|
} | {
|
|
637
634
|
options: Record<string, unknown>;
|
|
638
|
-
provider: "openai" | "google" | "xai";
|
|
639
635
|
kind: "realtime";
|
|
636
|
+
provider: "openai" | "google" | "xai";
|
|
640
637
|
} | undefined;
|
|
641
638
|
vadOptions?: {
|
|
642
639
|
minSpeechDuration?: number | undefined;
|
|
@@ -685,52 +682,52 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
685
682
|
excludeTools?: string[] | undefined;
|
|
686
683
|
}, {
|
|
687
684
|
llm: {
|
|
688
|
-
model: string;
|
|
689
685
|
kind: "inference";
|
|
690
|
-
|
|
686
|
+
model: string;
|
|
691
687
|
options?: Record<string, unknown> | undefined;
|
|
688
|
+
voice?: string | undefined;
|
|
692
689
|
} | {
|
|
693
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
694
690
|
options: Record<string, unknown>;
|
|
695
|
-
provider: "deepgram" | "elevenlabs";
|
|
696
691
|
kind: "plugin";
|
|
692
|
+
provider: "deepgram" | "elevenlabs";
|
|
693
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
697
694
|
} | {
|
|
698
695
|
options: Record<string, unknown>;
|
|
699
|
-
provider: "openai" | "google" | "xai";
|
|
700
696
|
kind: "realtime";
|
|
697
|
+
provider: "openai" | "google" | "xai";
|
|
701
698
|
};
|
|
702
699
|
name?: string | undefined;
|
|
703
700
|
vad?: string | undefined;
|
|
704
701
|
stt?: {
|
|
705
|
-
model: string;
|
|
706
702
|
kind: "inference";
|
|
707
|
-
|
|
703
|
+
model: string;
|
|
708
704
|
options?: Record<string, unknown> | undefined;
|
|
705
|
+
voice?: string | undefined;
|
|
709
706
|
} | {
|
|
710
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
711
707
|
options: Record<string, unknown>;
|
|
712
|
-
provider: "deepgram" | "elevenlabs";
|
|
713
708
|
kind: "plugin";
|
|
709
|
+
provider: "deepgram" | "elevenlabs";
|
|
710
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
714
711
|
} | {
|
|
715
712
|
options: Record<string, unknown>;
|
|
716
|
-
provider: "openai" | "google" | "xai";
|
|
717
713
|
kind: "realtime";
|
|
714
|
+
provider: "openai" | "google" | "xai";
|
|
718
715
|
} | undefined;
|
|
719
716
|
volume?: number | undefined;
|
|
720
717
|
tts?: {
|
|
721
|
-
model: string;
|
|
722
718
|
kind: "inference";
|
|
723
|
-
|
|
719
|
+
model: string;
|
|
724
720
|
options?: Record<string, unknown> | undefined;
|
|
721
|
+
voice?: string | undefined;
|
|
725
722
|
} | {
|
|
726
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
727
723
|
options: Record<string, unknown>;
|
|
728
|
-
provider: "deepgram" | "elevenlabs";
|
|
729
724
|
kind: "plugin";
|
|
725
|
+
provider: "deepgram" | "elevenlabs";
|
|
726
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
730
727
|
} | {
|
|
731
728
|
options: Record<string, unknown>;
|
|
732
|
-
provider: "openai" | "google" | "xai";
|
|
733
729
|
kind: "realtime";
|
|
730
|
+
provider: "openai" | "google" | "xai";
|
|
734
731
|
} | undefined;
|
|
735
732
|
vadOptions?: {
|
|
736
733
|
minSpeechDuration?: number | undefined;
|
|
@@ -779,52 +776,52 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
779
776
|
excludeTools?: string[] | undefined;
|
|
780
777
|
}>, {
|
|
781
778
|
llm: {
|
|
782
|
-
model: string;
|
|
783
779
|
kind: "inference";
|
|
784
|
-
|
|
780
|
+
model: string;
|
|
785
781
|
options?: Record<string, unknown> | undefined;
|
|
782
|
+
voice?: string | undefined;
|
|
786
783
|
} | {
|
|
787
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
788
784
|
options: Record<string, unknown>;
|
|
789
|
-
provider: "deepgram" | "elevenlabs";
|
|
790
785
|
kind: "plugin";
|
|
786
|
+
provider: "deepgram" | "elevenlabs";
|
|
787
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
791
788
|
} | {
|
|
792
789
|
options: Record<string, unknown>;
|
|
793
|
-
provider: "openai" | "google" | "xai";
|
|
794
790
|
kind: "realtime";
|
|
791
|
+
provider: "openai" | "google" | "xai";
|
|
795
792
|
};
|
|
796
793
|
name?: string | undefined;
|
|
797
794
|
vad?: string | undefined;
|
|
798
795
|
stt?: {
|
|
799
|
-
model: string;
|
|
800
796
|
kind: "inference";
|
|
801
|
-
|
|
797
|
+
model: string;
|
|
802
798
|
options?: Record<string, unknown> | undefined;
|
|
799
|
+
voice?: string | undefined;
|
|
803
800
|
} | {
|
|
804
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
805
801
|
options: Record<string, unknown>;
|
|
806
|
-
provider: "deepgram" | "elevenlabs";
|
|
807
802
|
kind: "plugin";
|
|
803
|
+
provider: "deepgram" | "elevenlabs";
|
|
804
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
808
805
|
} | {
|
|
809
806
|
options: Record<string, unknown>;
|
|
810
|
-
provider: "openai" | "google" | "xai";
|
|
811
807
|
kind: "realtime";
|
|
808
|
+
provider: "openai" | "google" | "xai";
|
|
812
809
|
} | undefined;
|
|
813
810
|
volume?: number | undefined;
|
|
814
811
|
tts?: {
|
|
815
|
-
model: string;
|
|
816
812
|
kind: "inference";
|
|
817
|
-
|
|
813
|
+
model: string;
|
|
818
814
|
options?: Record<string, unknown> | undefined;
|
|
815
|
+
voice?: string | undefined;
|
|
819
816
|
} | {
|
|
820
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
821
817
|
options: Record<string, unknown>;
|
|
822
|
-
provider: "deepgram" | "elevenlabs";
|
|
823
818
|
kind: "plugin";
|
|
819
|
+
provider: "deepgram" | "elevenlabs";
|
|
820
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
824
821
|
} | {
|
|
825
822
|
options: Record<string, unknown>;
|
|
826
|
-
provider: "openai" | "google" | "xai";
|
|
827
823
|
kind: "realtime";
|
|
824
|
+
provider: "openai" | "google" | "xai";
|
|
828
825
|
} | undefined;
|
|
829
826
|
vadOptions?: {
|
|
830
827
|
minSpeechDuration?: number | undefined;
|
|
@@ -873,52 +870,52 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
873
870
|
excludeTools?: string[] | undefined;
|
|
874
871
|
}, {
|
|
875
872
|
llm: {
|
|
876
|
-
model: string;
|
|
877
873
|
kind: "inference";
|
|
878
|
-
|
|
874
|
+
model: string;
|
|
879
875
|
options?: Record<string, unknown> | undefined;
|
|
876
|
+
voice?: string | undefined;
|
|
880
877
|
} | {
|
|
881
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
882
878
|
options: Record<string, unknown>;
|
|
883
|
-
provider: "deepgram" | "elevenlabs";
|
|
884
879
|
kind: "plugin";
|
|
880
|
+
provider: "deepgram" | "elevenlabs";
|
|
881
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
885
882
|
} | {
|
|
886
883
|
options: Record<string, unknown>;
|
|
887
|
-
provider: "openai" | "google" | "xai";
|
|
888
884
|
kind: "realtime";
|
|
885
|
+
provider: "openai" | "google" | "xai";
|
|
889
886
|
};
|
|
890
887
|
name?: string | undefined;
|
|
891
888
|
vad?: string | undefined;
|
|
892
889
|
stt?: {
|
|
893
|
-
model: string;
|
|
894
890
|
kind: "inference";
|
|
895
|
-
|
|
891
|
+
model: string;
|
|
896
892
|
options?: Record<string, unknown> | undefined;
|
|
893
|
+
voice?: string | undefined;
|
|
897
894
|
} | {
|
|
898
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
899
895
|
options: Record<string, unknown>;
|
|
900
|
-
provider: "deepgram" | "elevenlabs";
|
|
901
896
|
kind: "plugin";
|
|
897
|
+
provider: "deepgram" | "elevenlabs";
|
|
898
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
902
899
|
} | {
|
|
903
900
|
options: Record<string, unknown>;
|
|
904
|
-
provider: "openai" | "google" | "xai";
|
|
905
901
|
kind: "realtime";
|
|
902
|
+
provider: "openai" | "google" | "xai";
|
|
906
903
|
} | undefined;
|
|
907
904
|
volume?: number | undefined;
|
|
908
905
|
tts?: {
|
|
909
|
-
model: string;
|
|
910
906
|
kind: "inference";
|
|
911
|
-
|
|
907
|
+
model: string;
|
|
912
908
|
options?: Record<string, unknown> | undefined;
|
|
909
|
+
voice?: string | undefined;
|
|
913
910
|
} | {
|
|
914
|
-
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
915
911
|
options: Record<string, unknown>;
|
|
916
|
-
provider: "deepgram" | "elevenlabs";
|
|
917
912
|
kind: "plugin";
|
|
913
|
+
provider: "deepgram" | "elevenlabs";
|
|
914
|
+
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
918
915
|
} | {
|
|
919
916
|
options: Record<string, unknown>;
|
|
920
|
-
provider: "openai" | "google" | "xai";
|
|
921
917
|
kind: "realtime";
|
|
918
|
+
provider: "openai" | "google" | "xai";
|
|
922
919
|
} | undefined;
|
|
923
920
|
vadOptions?: {
|
|
924
921
|
minSpeechDuration?: number | undefined;
|
|
@@ -1012,6 +1009,7 @@ declare class LuaVoiceTool<TInput extends ZodType = ZodType> implements LuaTool<
|
|
|
1012
1009
|
readonly inputSchema: TInput;
|
|
1013
1010
|
readonly execute: (input: any, ctx?: LuaVoiceToolCtx) => Promise<any>;
|
|
1014
1011
|
readonly condition?: () => Promise<boolean>;
|
|
1012
|
+
readonly label?: ToolLabel;
|
|
1015
1013
|
readonly voice?: {
|
|
1016
1014
|
flags?: ToolFlag[];
|
|
1017
1015
|
};
|
|
@@ -1030,6 +1028,8 @@ declare interface LuaVoiceToolConfig<TInput extends ZodType = ZodType> {
|
|
|
1030
1028
|
execute: (input: any, ctx?: LuaVoiceToolCtx) => Promise<any>;
|
|
1031
1029
|
condition?: () => Promise<boolean>;
|
|
1032
1030
|
flags?: ToolFlag[];
|
|
1031
|
+
/** What a step shows while the tool runs and when it is done, as on `LuaTool`. */
|
|
1032
|
+
label?: ToolLabel;
|
|
1033
1033
|
}
|
|
1034
1034
|
|
|
1035
1035
|
/**
|
|
@@ -1266,6 +1266,12 @@ declare enum ToolFlag {
|
|
|
1266
1266
|
DISALLOW_INTERRUPTION = "disallow_interruption"
|
|
1267
1267
|
}
|
|
1268
1268
|
|
|
1269
|
+
/** A tool's `label`: one text for both moments, or one while it runs and one when it is done. `{arg}` fills from the call. */
|
|
1270
|
+
declare type ToolLabel = string | {
|
|
1271
|
+
running: string;
|
|
1272
|
+
done: string;
|
|
1273
|
+
};
|
|
1274
|
+
|
|
1269
1275
|
/**
|
|
1270
1276
|
* Wrap each LuaTool / LuaVoiceTool in a LiveKit `llm.tool({})` so the
|
|
1271
1277
|
* AgentSession can dispatch tool calls. The mockTools map overrides the
|
|
@@ -291,10 +291,7 @@ declare interface LuaTool<TInput extends ZodType = ZodType> {
|
|
|
291
291
|
* while the tool runs. Each text is a string literal (or a const holding one)
|
|
292
292
|
* of at most 80 characters; `lua compile` ignores a computed label.
|
|
293
293
|
*/
|
|
294
|
-
label?:
|
|
295
|
-
running: string;
|
|
296
|
-
done: string;
|
|
297
|
-
};
|
|
294
|
+
label?: ToolLabel;
|
|
298
295
|
/** Zod schema for input validation */
|
|
299
296
|
inputSchema: TInput;
|
|
300
297
|
/**
|
|
@@ -719,6 +716,12 @@ declare enum ToolFlag {
|
|
|
719
716
|
DISALLOW_INTERRUPTION = "disallow_interruption"
|
|
720
717
|
}
|
|
721
718
|
|
|
719
|
+
/** A tool's `label`: one text for both moments, or one while it runs and one when it is done. `{arg}` fills from the call. */
|
|
720
|
+
declare type ToolLabel = string | {
|
|
721
|
+
running: string;
|
|
722
|
+
done: string;
|
|
723
|
+
};
|
|
724
|
+
|
|
722
725
|
export declare interface ToolStepOptions {
|
|
723
726
|
input?: LuaMapConfig;
|
|
724
727
|
timeoutSeconds?: number;
|