lua-cli 3.54.0 → 3.55.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.
@@ -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?: string | {
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
- voice?: string | undefined;
254
+ model: string;
259
255
  options?: Record<string, unknown> | undefined;
256
+ voice?: string | undefined;
260
257
  }, {
261
- model: string;
262
258
  kind: "inference";
263
- voice?: string | undefined;
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"]>;
@@ -276,13 +273,13 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
276
273
  }, "strip", z.ZodTypeAny, {
277
274
  class: "LLM" | "STT" | "STTv2" | "TTS";
278
275
  options: Record<string, unknown>;
279
- provider: "deepgram" | "elevenlabs";
280
276
  kind: "plugin";
277
+ provider: "deepgram" | "elevenlabs";
281
278
  }, {
282
279
  class: "LLM" | "STT" | "STTv2" | "TTS";
283
280
  options: Record<string, unknown>;
284
- provider: "deepgram" | "elevenlabs";
285
281
  kind: "plugin";
282
+ provider: "deepgram" | "elevenlabs";
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
- voice?: string | undefined;
320
+ model: string;
325
321
  options?: Record<string, unknown> | undefined;
322
+ voice?: string | undefined;
326
323
  }, {
327
- model: string;
328
324
  kind: "inference";
329
- voice?: string | undefined;
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"]>;
@@ -342,13 +339,13 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
342
339
  }, "strip", z.ZodTypeAny, {
343
340
  class: "LLM" | "STT" | "STTv2" | "TTS";
344
341
  options: Record<string, unknown>;
345
- provider: "deepgram" | "elevenlabs";
346
342
  kind: "plugin";
343
+ provider: "deepgram" | "elevenlabs";
347
344
  }, {
348
345
  class: "LLM" | "STT" | "STTv2" | "TTS";
349
346
  options: Record<string, unknown>;
350
- provider: "deepgram" | "elevenlabs";
351
347
  kind: "plugin";
348
+ provider: "deepgram" | "elevenlabs";
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
- voice?: string | undefined;
386
+ model: string;
391
387
  options?: Record<string, unknown> | undefined;
388
+ voice?: string | undefined;
392
389
  }, {
393
- model: string;
394
390
  kind: "inference";
395
- voice?: string | undefined;
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"]>;
@@ -408,13 +405,13 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
408
405
  }, "strip", z.ZodTypeAny, {
409
406
  class: "LLM" | "STT" | "STTv2" | "TTS";
410
407
  options: Record<string, unknown>;
411
- provider: "deepgram" | "elevenlabs";
412
408
  kind: "plugin";
409
+ provider: "deepgram" | "elevenlabs";
413
410
  }, {
414
411
  class: "LLM" | "STT" | "STTv2" | "TTS";
415
412
  options: Record<string, unknown>;
416
- provider: "deepgram" | "elevenlabs";
417
413
  kind: "plugin";
414
+ provider: "deepgram" | "elevenlabs";
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
- voice?: string | undefined;
592
+ model: string;
597
593
  options?: Record<string, unknown> | undefined;
594
+ voice?: string | undefined;
598
595
  } | {
599
596
  class: "LLM" | "STT" | "STTv2" | "TTS";
600
597
  options: Record<string, unknown>;
601
- provider: "deepgram" | "elevenlabs";
602
598
  kind: "plugin";
599
+ provider: "deepgram" | "elevenlabs";
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
- voice?: string | undefined;
609
+ model: string;
614
610
  options?: Record<string, unknown> | undefined;
611
+ voice?: string | undefined;
615
612
  } | {
616
613
  class: "LLM" | "STT" | "STTv2" | "TTS";
617
614
  options: Record<string, unknown>;
618
- provider: "deepgram" | "elevenlabs";
619
615
  kind: "plugin";
616
+ provider: "deepgram" | "elevenlabs";
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
- voice?: string | undefined;
625
+ model: string;
630
626
  options?: Record<string, unknown> | undefined;
627
+ voice?: string | undefined;
631
628
  } | {
632
629
  class: "LLM" | "STT" | "STTv2" | "TTS";
633
630
  options: Record<string, unknown>;
634
- provider: "deepgram" | "elevenlabs";
635
631
  kind: "plugin";
632
+ provider: "deepgram" | "elevenlabs";
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
- voice?: string | undefined;
686
+ model: string;
691
687
  options?: Record<string, unknown> | undefined;
688
+ voice?: string | undefined;
692
689
  } | {
693
690
  class: "LLM" | "STT" | "STTv2" | "TTS";
694
691
  options: Record<string, unknown>;
695
- provider: "deepgram" | "elevenlabs";
696
692
  kind: "plugin";
693
+ provider: "deepgram" | "elevenlabs";
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
- voice?: string | undefined;
703
+ model: string;
708
704
  options?: Record<string, unknown> | undefined;
705
+ voice?: string | undefined;
709
706
  } | {
710
707
  class: "LLM" | "STT" | "STTv2" | "TTS";
711
708
  options: Record<string, unknown>;
712
- provider: "deepgram" | "elevenlabs";
713
709
  kind: "plugin";
710
+ provider: "deepgram" | "elevenlabs";
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
- voice?: string | undefined;
719
+ model: string;
724
720
  options?: Record<string, unknown> | undefined;
721
+ voice?: string | undefined;
725
722
  } | {
726
723
  class: "LLM" | "STT" | "STTv2" | "TTS";
727
724
  options: Record<string, unknown>;
728
- provider: "deepgram" | "elevenlabs";
729
725
  kind: "plugin";
726
+ provider: "deepgram" | "elevenlabs";
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
- voice?: string | undefined;
780
+ model: string;
785
781
  options?: Record<string, unknown> | undefined;
782
+ voice?: string | undefined;
786
783
  } | {
787
784
  class: "LLM" | "STT" | "STTv2" | "TTS";
788
785
  options: Record<string, unknown>;
789
- provider: "deepgram" | "elevenlabs";
790
786
  kind: "plugin";
787
+ provider: "deepgram" | "elevenlabs";
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
- voice?: string | undefined;
797
+ model: string;
802
798
  options?: Record<string, unknown> | undefined;
799
+ voice?: string | undefined;
803
800
  } | {
804
801
  class: "LLM" | "STT" | "STTv2" | "TTS";
805
802
  options: Record<string, unknown>;
806
- provider: "deepgram" | "elevenlabs";
807
803
  kind: "plugin";
804
+ provider: "deepgram" | "elevenlabs";
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
- voice?: string | undefined;
813
+ model: string;
818
814
  options?: Record<string, unknown> | undefined;
815
+ voice?: string | undefined;
819
816
  } | {
820
817
  class: "LLM" | "STT" | "STTv2" | "TTS";
821
818
  options: Record<string, unknown>;
822
- provider: "deepgram" | "elevenlabs";
823
819
  kind: "plugin";
820
+ provider: "deepgram" | "elevenlabs";
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
- voice?: string | undefined;
874
+ model: string;
879
875
  options?: Record<string, unknown> | undefined;
876
+ voice?: string | undefined;
880
877
  } | {
881
878
  class: "LLM" | "STT" | "STTv2" | "TTS";
882
879
  options: Record<string, unknown>;
883
- provider: "deepgram" | "elevenlabs";
884
880
  kind: "plugin";
881
+ provider: "deepgram" | "elevenlabs";
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
- voice?: string | undefined;
891
+ model: string;
896
892
  options?: Record<string, unknown> | undefined;
893
+ voice?: string | undefined;
897
894
  } | {
898
895
  class: "LLM" | "STT" | "STTv2" | "TTS";
899
896
  options: Record<string, unknown>;
900
- provider: "deepgram" | "elevenlabs";
901
897
  kind: "plugin";
898
+ provider: "deepgram" | "elevenlabs";
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
- voice?: string | undefined;
907
+ model: string;
912
908
  options?: Record<string, unknown> | undefined;
909
+ voice?: string | undefined;
913
910
  } | {
914
911
  class: "LLM" | "STT" | "STTv2" | "TTS";
915
912
  options: Record<string, unknown>;
916
- provider: "deepgram" | "elevenlabs";
917
913
  kind: "plugin";
914
+ provider: "deepgram" | "elevenlabs";
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?: string | {
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;