lua-cli 3.53.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.
@@ -64,6 +64,22 @@ declare interface LuaTool<TInput extends ZodType = ZodType> {
64
64
  name: string;
65
65
  /** Description of what the tool does */
66
66
  description: string;
67
+ /**
68
+ * Optional text the chat shows to the user while this tool runs and after it
69
+ * finishes, instead of the tool's name. Either one text for both moments, or
70
+ * one for each:
71
+ *
72
+ * ```ts
73
+ * label = { running: 'Creating a ticket for {subject}', done: 'Created a ticket for {subject}' };
74
+ * label = 'Checked stock';
75
+ * ```
76
+ *
77
+ * `{argName}` is replaced with that argument's value from the call (string
78
+ * and number arguments only). Don't end the text with "…": the chat adds it
79
+ * while the tool runs. Each text is a string literal (or a const holding one)
80
+ * of at most 80 characters; `lua compile` ignores a computed label.
81
+ */
82
+ label?: ToolLabel;
67
83
  /** Zod schema for input validation */
68
84
  inputSchema: TInput;
69
85
  /**
@@ -234,15 +250,15 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
234
250
  */
235
251
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
236
252
  }, "strip", z.ZodTypeAny, {
237
- model: string;
238
253
  kind: "inference";
239
- voice?: string | undefined;
254
+ model: string;
240
255
  options?: Record<string, unknown> | undefined;
256
+ voice?: string | undefined;
241
257
  }, {
242
- model: string;
243
258
  kind: "inference";
244
- voice?: string | undefined;
259
+ model: string;
245
260
  options?: Record<string, unknown> | undefined;
261
+ voice?: string | undefined;
246
262
  }>, z.ZodObject<{
247
263
  kind: z.ZodLiteral<"plugin">;
248
264
  provider: z.ZodEnum<["deepgram", "elevenlabs"]>;
@@ -257,13 +273,13 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
257
273
  }, "strip", z.ZodTypeAny, {
258
274
  class: "LLM" | "STT" | "STTv2" | "TTS";
259
275
  options: Record<string, unknown>;
260
- provider: "deepgram" | "elevenlabs";
261
276
  kind: "plugin";
277
+ provider: "deepgram" | "elevenlabs";
262
278
  }, {
263
279
  class: "LLM" | "STT" | "STTv2" | "TTS";
264
280
  options: Record<string, unknown>;
265
- provider: "deepgram" | "elevenlabs";
266
281
  kind: "plugin";
282
+ provider: "deepgram" | "elevenlabs";
267
283
  }>, z.ZodObject<{
268
284
  kind: z.ZodLiteral<"realtime">;
269
285
  provider: z.ZodEnum<["openai", "google", "xai"]>;
@@ -276,12 +292,12 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
276
292
  options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
277
293
  }, "strip", z.ZodTypeAny, {
278
294
  options: Record<string, unknown>;
279
- provider: "openai" | "google" | "xai";
280
295
  kind: "realtime";
296
+ provider: "openai" | "google" | "xai";
281
297
  }, {
282
298
  options: Record<string, unknown>;
283
- provider: "openai" | "google" | "xai";
284
299
  kind: "realtime";
300
+ provider: "openai" | "google" | "xai";
285
301
  }>]>;
286
302
  stt: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
287
303
  kind: z.ZodLiteral<"inference">;
@@ -300,15 +316,15 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
300
316
  */
301
317
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
302
318
  }, "strip", z.ZodTypeAny, {
303
- model: string;
304
319
  kind: "inference";
305
- voice?: string | undefined;
320
+ model: string;
306
321
  options?: Record<string, unknown> | undefined;
322
+ voice?: string | undefined;
307
323
  }, {
308
- model: string;
309
324
  kind: "inference";
310
- voice?: string | undefined;
325
+ model: string;
311
326
  options?: Record<string, unknown> | undefined;
327
+ voice?: string | undefined;
312
328
  }>, z.ZodObject<{
313
329
  kind: z.ZodLiteral<"plugin">;
314
330
  provider: z.ZodEnum<["deepgram", "elevenlabs"]>;
@@ -323,13 +339,13 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
323
339
  }, "strip", z.ZodTypeAny, {
324
340
  class: "LLM" | "STT" | "STTv2" | "TTS";
325
341
  options: Record<string, unknown>;
326
- provider: "deepgram" | "elevenlabs";
327
342
  kind: "plugin";
343
+ provider: "deepgram" | "elevenlabs";
328
344
  }, {
329
345
  class: "LLM" | "STT" | "STTv2" | "TTS";
330
346
  options: Record<string, unknown>;
331
- provider: "deepgram" | "elevenlabs";
332
347
  kind: "plugin";
348
+ provider: "deepgram" | "elevenlabs";
333
349
  }>, z.ZodObject<{
334
350
  kind: z.ZodLiteral<"realtime">;
335
351
  provider: z.ZodEnum<["openai", "google", "xai"]>;
@@ -342,12 +358,12 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
342
358
  options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
343
359
  }, "strip", z.ZodTypeAny, {
344
360
  options: Record<string, unknown>;
345
- provider: "openai" | "google" | "xai";
346
361
  kind: "realtime";
362
+ provider: "openai" | "google" | "xai";
347
363
  }, {
348
364
  options: Record<string, unknown>;
349
- provider: "openai" | "google" | "xai";
350
365
  kind: "realtime";
366
+ provider: "openai" | "google" | "xai";
351
367
  }>]>>;
352
368
  tts: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
353
369
  kind: z.ZodLiteral<"inference">;
@@ -366,15 +382,15 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
366
382
  */
367
383
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
368
384
  }, "strip", z.ZodTypeAny, {
369
- model: string;
370
385
  kind: "inference";
371
- voice?: string | undefined;
386
+ model: string;
372
387
  options?: Record<string, unknown> | undefined;
388
+ voice?: string | undefined;
373
389
  }, {
374
- model: string;
375
390
  kind: "inference";
376
- voice?: string | undefined;
391
+ model: string;
377
392
  options?: Record<string, unknown> | undefined;
393
+ voice?: string | undefined;
378
394
  }>, z.ZodObject<{
379
395
  kind: z.ZodLiteral<"plugin">;
380
396
  provider: z.ZodEnum<["deepgram", "elevenlabs"]>;
@@ -389,13 +405,13 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
389
405
  }, "strip", z.ZodTypeAny, {
390
406
  class: "LLM" | "STT" | "STTv2" | "TTS";
391
407
  options: Record<string, unknown>;
392
- provider: "deepgram" | "elevenlabs";
393
408
  kind: "plugin";
409
+ provider: "deepgram" | "elevenlabs";
394
410
  }, {
395
411
  class: "LLM" | "STT" | "STTv2" | "TTS";
396
412
  options: Record<string, unknown>;
397
- provider: "deepgram" | "elevenlabs";
398
413
  kind: "plugin";
414
+ provider: "deepgram" | "elevenlabs";
399
415
  }>, z.ZodObject<{
400
416
  kind: z.ZodLiteral<"realtime">;
401
417
  provider: z.ZodEnum<["openai", "google", "xai"]>;
@@ -408,12 +424,12 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
408
424
  options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
409
425
  }, "strip", z.ZodTypeAny, {
410
426
  options: Record<string, unknown>;
411
- provider: "openai" | "google" | "xai";
412
427
  kind: "realtime";
428
+ provider: "openai" | "google" | "xai";
413
429
  }, {
414
430
  options: Record<string, unknown>;
415
- provider: "openai" | "google" | "xai";
416
431
  kind: "realtime";
432
+ provider: "openai" | "google" | "xai";
417
433
  }>]>>;
418
434
  vad: z.ZodOptional<z.ZodString>;
419
435
  vadOptions: z.ZodOptional<z.ZodObject<{
@@ -572,52 +588,52 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
572
588
  excludeTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
573
589
  }, "strip", z.ZodTypeAny, {
574
590
  llm: {
575
- model: string;
576
591
  kind: "inference";
577
- voice?: string | undefined;
592
+ model: string;
578
593
  options?: Record<string, unknown> | undefined;
594
+ voice?: string | undefined;
579
595
  } | {
580
596
  class: "LLM" | "STT" | "STTv2" | "TTS";
581
597
  options: Record<string, unknown>;
582
- provider: "deepgram" | "elevenlabs";
583
598
  kind: "plugin";
599
+ provider: "deepgram" | "elevenlabs";
584
600
  } | {
585
601
  options: Record<string, unknown>;
586
- provider: "openai" | "google" | "xai";
587
602
  kind: "realtime";
603
+ provider: "openai" | "google" | "xai";
588
604
  };
589
605
  name?: string | undefined;
590
606
  vad?: string | undefined;
591
607
  stt?: {
592
- model: string;
593
608
  kind: "inference";
594
- voice?: string | undefined;
609
+ model: string;
595
610
  options?: Record<string, unknown> | undefined;
611
+ voice?: string | undefined;
596
612
  } | {
597
613
  class: "LLM" | "STT" | "STTv2" | "TTS";
598
614
  options: Record<string, unknown>;
599
- provider: "deepgram" | "elevenlabs";
600
615
  kind: "plugin";
616
+ provider: "deepgram" | "elevenlabs";
601
617
  } | {
602
618
  options: Record<string, unknown>;
603
- provider: "openai" | "google" | "xai";
604
619
  kind: "realtime";
620
+ provider: "openai" | "google" | "xai";
605
621
  } | undefined;
606
622
  volume?: number | undefined;
607
623
  tts?: {
608
- model: string;
609
624
  kind: "inference";
610
- voice?: string | undefined;
625
+ model: string;
611
626
  options?: Record<string, unknown> | undefined;
627
+ voice?: string | undefined;
612
628
  } | {
613
629
  class: "LLM" | "STT" | "STTv2" | "TTS";
614
630
  options: Record<string, unknown>;
615
- provider: "deepgram" | "elevenlabs";
616
631
  kind: "plugin";
632
+ provider: "deepgram" | "elevenlabs";
617
633
  } | {
618
634
  options: Record<string, unknown>;
619
- provider: "openai" | "google" | "xai";
620
635
  kind: "realtime";
636
+ provider: "openai" | "google" | "xai";
621
637
  } | undefined;
622
638
  vadOptions?: {
623
639
  minSpeechDuration?: number | undefined;
@@ -666,52 +682,52 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
666
682
  excludeTools?: string[] | undefined;
667
683
  }, {
668
684
  llm: {
669
- model: string;
670
685
  kind: "inference";
671
- voice?: string | undefined;
686
+ model: string;
672
687
  options?: Record<string, unknown> | undefined;
688
+ voice?: string | undefined;
673
689
  } | {
674
690
  class: "LLM" | "STT" | "STTv2" | "TTS";
675
691
  options: Record<string, unknown>;
676
- provider: "deepgram" | "elevenlabs";
677
692
  kind: "plugin";
693
+ provider: "deepgram" | "elevenlabs";
678
694
  } | {
679
695
  options: Record<string, unknown>;
680
- provider: "openai" | "google" | "xai";
681
696
  kind: "realtime";
697
+ provider: "openai" | "google" | "xai";
682
698
  };
683
699
  name?: string | undefined;
684
700
  vad?: string | undefined;
685
701
  stt?: {
686
- model: string;
687
702
  kind: "inference";
688
- voice?: string | undefined;
703
+ model: string;
689
704
  options?: Record<string, unknown> | undefined;
705
+ voice?: string | undefined;
690
706
  } | {
691
707
  class: "LLM" | "STT" | "STTv2" | "TTS";
692
708
  options: Record<string, unknown>;
693
- provider: "deepgram" | "elevenlabs";
694
709
  kind: "plugin";
710
+ provider: "deepgram" | "elevenlabs";
695
711
  } | {
696
712
  options: Record<string, unknown>;
697
- provider: "openai" | "google" | "xai";
698
713
  kind: "realtime";
714
+ provider: "openai" | "google" | "xai";
699
715
  } | undefined;
700
716
  volume?: number | undefined;
701
717
  tts?: {
702
- model: string;
703
718
  kind: "inference";
704
- voice?: string | undefined;
719
+ model: string;
705
720
  options?: Record<string, unknown> | undefined;
721
+ voice?: string | undefined;
706
722
  } | {
707
723
  class: "LLM" | "STT" | "STTv2" | "TTS";
708
724
  options: Record<string, unknown>;
709
- provider: "deepgram" | "elevenlabs";
710
725
  kind: "plugin";
726
+ provider: "deepgram" | "elevenlabs";
711
727
  } | {
712
728
  options: Record<string, unknown>;
713
- provider: "openai" | "google" | "xai";
714
729
  kind: "realtime";
730
+ provider: "openai" | "google" | "xai";
715
731
  } | undefined;
716
732
  vadOptions?: {
717
733
  minSpeechDuration?: number | undefined;
@@ -760,52 +776,52 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
760
776
  excludeTools?: string[] | undefined;
761
777
  }>, {
762
778
  llm: {
763
- model: string;
764
779
  kind: "inference";
765
- voice?: string | undefined;
780
+ model: string;
766
781
  options?: Record<string, unknown> | undefined;
782
+ voice?: string | undefined;
767
783
  } | {
768
784
  class: "LLM" | "STT" | "STTv2" | "TTS";
769
785
  options: Record<string, unknown>;
770
- provider: "deepgram" | "elevenlabs";
771
786
  kind: "plugin";
787
+ provider: "deepgram" | "elevenlabs";
772
788
  } | {
773
789
  options: Record<string, unknown>;
774
- provider: "openai" | "google" | "xai";
775
790
  kind: "realtime";
791
+ provider: "openai" | "google" | "xai";
776
792
  };
777
793
  name?: string | undefined;
778
794
  vad?: string | undefined;
779
795
  stt?: {
780
- model: string;
781
796
  kind: "inference";
782
- voice?: string | undefined;
797
+ model: string;
783
798
  options?: Record<string, unknown> | undefined;
799
+ voice?: string | undefined;
784
800
  } | {
785
801
  class: "LLM" | "STT" | "STTv2" | "TTS";
786
802
  options: Record<string, unknown>;
787
- provider: "deepgram" | "elevenlabs";
788
803
  kind: "plugin";
804
+ provider: "deepgram" | "elevenlabs";
789
805
  } | {
790
806
  options: Record<string, unknown>;
791
- provider: "openai" | "google" | "xai";
792
807
  kind: "realtime";
808
+ provider: "openai" | "google" | "xai";
793
809
  } | undefined;
794
810
  volume?: number | undefined;
795
811
  tts?: {
796
- model: string;
797
812
  kind: "inference";
798
- voice?: string | undefined;
813
+ model: string;
799
814
  options?: Record<string, unknown> | undefined;
815
+ voice?: string | undefined;
800
816
  } | {
801
817
  class: "LLM" | "STT" | "STTv2" | "TTS";
802
818
  options: Record<string, unknown>;
803
- provider: "deepgram" | "elevenlabs";
804
819
  kind: "plugin";
820
+ provider: "deepgram" | "elevenlabs";
805
821
  } | {
806
822
  options: Record<string, unknown>;
807
- provider: "openai" | "google" | "xai";
808
823
  kind: "realtime";
824
+ provider: "openai" | "google" | "xai";
809
825
  } | undefined;
810
826
  vadOptions?: {
811
827
  minSpeechDuration?: number | undefined;
@@ -854,52 +870,52 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
854
870
  excludeTools?: string[] | undefined;
855
871
  }, {
856
872
  llm: {
857
- model: string;
858
873
  kind: "inference";
859
- voice?: string | undefined;
874
+ model: string;
860
875
  options?: Record<string, unknown> | undefined;
876
+ voice?: string | undefined;
861
877
  } | {
862
878
  class: "LLM" | "STT" | "STTv2" | "TTS";
863
879
  options: Record<string, unknown>;
864
- provider: "deepgram" | "elevenlabs";
865
880
  kind: "plugin";
881
+ provider: "deepgram" | "elevenlabs";
866
882
  } | {
867
883
  options: Record<string, unknown>;
868
- provider: "openai" | "google" | "xai";
869
884
  kind: "realtime";
885
+ provider: "openai" | "google" | "xai";
870
886
  };
871
887
  name?: string | undefined;
872
888
  vad?: string | undefined;
873
889
  stt?: {
874
- model: string;
875
890
  kind: "inference";
876
- voice?: string | undefined;
891
+ model: string;
877
892
  options?: Record<string, unknown> | undefined;
893
+ voice?: string | undefined;
878
894
  } | {
879
895
  class: "LLM" | "STT" | "STTv2" | "TTS";
880
896
  options: Record<string, unknown>;
881
- provider: "deepgram" | "elevenlabs";
882
897
  kind: "plugin";
898
+ provider: "deepgram" | "elevenlabs";
883
899
  } | {
884
900
  options: Record<string, unknown>;
885
- provider: "openai" | "google" | "xai";
886
901
  kind: "realtime";
902
+ provider: "openai" | "google" | "xai";
887
903
  } | undefined;
888
904
  volume?: number | undefined;
889
905
  tts?: {
890
- model: string;
891
906
  kind: "inference";
892
- voice?: string | undefined;
907
+ model: string;
893
908
  options?: Record<string, unknown> | undefined;
909
+ voice?: string | undefined;
894
910
  } | {
895
911
  class: "LLM" | "STT" | "STTv2" | "TTS";
896
912
  options: Record<string, unknown>;
897
- provider: "deepgram" | "elevenlabs";
898
913
  kind: "plugin";
914
+ provider: "deepgram" | "elevenlabs";
899
915
  } | {
900
916
  options: Record<string, unknown>;
901
- provider: "openai" | "google" | "xai";
902
917
  kind: "realtime";
918
+ provider: "openai" | "google" | "xai";
903
919
  } | undefined;
904
920
  vadOptions?: {
905
921
  minSpeechDuration?: number | undefined;
@@ -993,6 +1009,7 @@ declare class LuaVoiceTool<TInput extends ZodType = ZodType> implements LuaTool<
993
1009
  readonly inputSchema: TInput;
994
1010
  readonly execute: (input: any, ctx?: LuaVoiceToolCtx) => Promise<any>;
995
1011
  readonly condition?: () => Promise<boolean>;
1012
+ readonly label?: ToolLabel;
996
1013
  readonly voice?: {
997
1014
  flags?: ToolFlag[];
998
1015
  };
@@ -1011,6 +1028,8 @@ declare interface LuaVoiceToolConfig<TInput extends ZodType = ZodType> {
1011
1028
  execute: (input: any, ctx?: LuaVoiceToolCtx) => Promise<any>;
1012
1029
  condition?: () => Promise<boolean>;
1013
1030
  flags?: ToolFlag[];
1031
+ /** What a step shows while the tool runs and when it is done, as on `LuaTool`. */
1032
+ label?: ToolLabel;
1014
1033
  }
1015
1034
 
1016
1035
  /**
@@ -1247,6 +1266,12 @@ declare enum ToolFlag {
1247
1266
  DISALLOW_INTERRUPTION = "disallow_interruption"
1248
1267
  }
1249
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
+
1250
1275
  /**
1251
1276
  * Wrap each LuaTool / LuaVoiceTool in a LiveKit `llm.tool({})` so the
1252
1277
  * AgentSession can dispatch tool calls. The mockTools map overrides the
@@ -276,6 +276,22 @@ declare interface LuaTool<TInput extends ZodType = ZodType> {
276
276
  name: string;
277
277
  /** Description of what the tool does */
278
278
  description: string;
279
+ /**
280
+ * Optional text the chat shows to the user while this tool runs and after it
281
+ * finishes, instead of the tool's name. Either one text for both moments, or
282
+ * one for each:
283
+ *
284
+ * ```ts
285
+ * label = { running: 'Creating a ticket for {subject}', done: 'Created a ticket for {subject}' };
286
+ * label = 'Checked stock';
287
+ * ```
288
+ *
289
+ * `{argName}` is replaced with that argument's value from the call (string
290
+ * and number arguments only). Don't end the text with "…": the chat adds it
291
+ * while the tool runs. Each text is a string literal (or a const holding one)
292
+ * of at most 80 characters; `lua compile` ignores a computed label.
293
+ */
294
+ label?: ToolLabel;
279
295
  /** Zod schema for input validation */
280
296
  inputSchema: TInput;
281
297
  /**
@@ -700,6 +716,12 @@ declare enum ToolFlag {
700
716
  DISALLOW_INTERRUPTION = "disallow_interruption"
701
717
  }
702
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
+
703
725
  export declare interface ToolStepOptions {
704
726
  input?: LuaMapConfig;
705
727
  timeoutSeconds?: number;