@voicelayer/sdk 0.3.1 → 0.4.1

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.
@@ -59,6 +59,9 @@ interface SessionCapabilities {
59
59
  readonly canReceiveDtmf: boolean;
60
60
  readonly canPublishDtmf: boolean;
61
61
  readonly canResolveSpeaker: boolean;
62
+ /** The agent's instructions can change mid-session (a host's call_instruct / call_inject_context — burn-down G-6):
63
+ * an LLM pipeline, or a realtime model that supports mid-session instruction updates. Never a no-op LLM (puppet). */
64
+ readonly canUpdateInstructions: boolean;
62
65
  }
63
66
  interface SayOptions$1 {
64
67
  readonly allowInterruptions?: boolean;
@@ -95,6 +98,9 @@ interface SessionOutbound {
95
98
  readonly reason?: string;
96
99
  readonly trigger?: string;
97
100
  }): Promise<EndCallOutcome>;
101
+ /** Replace the agent's instructions for the rest of the session; a reply already in flight keeps its own. Throws if
102
+ * !canUpdateInstructions. Resolves once the next reply will use them. */
103
+ setInstructions(text: string): Promise<void>;
98
104
  }
99
105
  type TurnEvent = {
100
106
  readonly kind: 'partial';
@@ -242,6 +248,8 @@ interface FakeSessionAdapter extends SessionAdapter {
242
248
  emitError(error: unknown, fatalTransport?: boolean): void;
243
249
  emitClose(): void;
244
250
  readonly spoken: ReadonlyArray<string>;
251
+ /** Every setInstructions text, in order. */
252
+ readonly instructionsSet: ReadonlyArray<string>;
245
253
  readonly generatedReplies: ReadonlyArray<string | undefined>;
246
254
  readonly sentDtmf: ReadonlyArray<string>;
247
255
  readonly endCalls: ReadonlyArray<{
@@ -343,11 +351,11 @@ declare const ProcessSchemaDTO: z.ZodObject<{
343
351
  id: z.ZodString;
344
352
  text: z.ZodString;
345
353
  }, "strip", z.ZodTypeAny, {
346
- text: string;
347
354
  id: string;
348
- }, {
349
355
  text: string;
356
+ }, {
350
357
  id: string;
358
+ text: string;
351
359
  }>, "many">>;
352
360
  fields: z.ZodArray<z.ZodObject<{
353
361
  name: z.ZodString;
@@ -433,11 +441,11 @@ declare const ProcessSchemaDTO: z.ZodObject<{
433
441
  retentionDays: z.ZodOptional<z.ZodNumber>;
434
442
  piiFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
435
443
  }, "strip", z.ZodTypeAny, {
436
- scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
444
+ scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
437
445
  retentionDays?: number | undefined;
438
446
  piiFields?: string[] | undefined;
439
447
  }, {
440
- scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
448
+ scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
441
449
  retentionDays?: number | undefined;
442
450
  piiFields?: string[] | undefined;
443
451
  }>>;
@@ -452,18 +460,18 @@ declare const ProcessSchemaDTO: z.ZodObject<{
452
460
  connectionRef: z.ZodOptional<z.ZodString>;
453
461
  }, "strip", z.ZodTypeAny, {
454
462
  name: string;
463
+ url: string;
455
464
  description: string;
456
465
  input: Record<string, "string" | "number" | "boolean">;
457
- url: string;
458
466
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
459
467
  auth: "none" | "connection";
460
468
  headers?: Record<string, string> | undefined;
461
469
  connectionRef?: string | undefined;
462
470
  }, {
463
471
  name: string;
472
+ url: string;
464
473
  description: string;
465
474
  input: Record<string, "string" | "number" | "boolean">;
466
- url: string;
467
475
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
468
476
  auth: "none" | "connection";
469
477
  headers?: Record<string, string> | undefined;
@@ -529,34 +537,34 @@ declare const ProcessSchemaDTO: z.ZodObject<{
529
537
  label: z.ZodOptional<z.ZodString>;
530
538
  }, "strip", z.ZodTypeAny, {
531
539
  to: string;
540
+ condition?: string | undefined;
532
541
  sourceHandle?: string | undefined;
533
542
  label?: string | undefined;
534
- condition?: string | undefined;
535
543
  }, {
536
544
  to: string;
545
+ condition?: string | undefined;
537
546
  sourceHandle?: string | undefined;
538
547
  label?: string | undefined;
539
- condition?: string | undefined;
540
548
  }>, "many">;
541
549
  }, "strip", z.ZodTypeAny, {
542
- type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
550
+ type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
543
551
  id: string;
544
552
  config: Record<string, unknown>;
545
553
  out: {
546
554
  to: string;
555
+ condition?: string | undefined;
547
556
  sourceHandle?: string | undefined;
548
557
  label?: string | undefined;
549
- condition?: string | undefined;
550
558
  }[];
551
559
  }, {
552
- type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
560
+ type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
553
561
  id: string;
554
562
  config: Record<string, unknown>;
555
563
  out: {
556
564
  to: string;
565
+ condition?: string | undefined;
557
566
  sourceHandle?: string | undefined;
558
567
  label?: string | undefined;
559
- condition?: string | undefined;
560
568
  }[];
561
569
  }>>;
562
570
  completionGate: z.ZodObject<{
@@ -583,20 +591,20 @@ declare const ProcessSchemaDTO: z.ZodObject<{
583
591
  labelOnlyEdges?: string[] | undefined;
584
592
  }>>;
585
593
  }, "strip", z.ZodTypeAny, {
594
+ v: 1;
586
595
  id: string;
596
+ entry: string[];
587
597
  nodes: Record<string, {
588
- type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
598
+ type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
589
599
  id: string;
590
600
  config: Record<string, unknown>;
591
601
  out: {
592
602
  to: string;
603
+ condition?: string | undefined;
593
604
  sourceHandle?: string | undefined;
594
605
  label?: string | undefined;
595
- condition?: string | undefined;
596
606
  }[];
597
607
  }>;
598
- v: 1;
599
- entry: string[];
600
608
  completionGate: {
601
609
  requiredFields: string[];
602
610
  };
@@ -607,20 +615,20 @@ declare const ProcessSchemaDTO: z.ZodObject<{
607
615
  labelOnlyEdges?: string[] | undefined;
608
616
  } | undefined;
609
617
  }, {
618
+ v: 1;
610
619
  id: string;
620
+ entry: string[];
611
621
  nodes: Record<string, {
612
- type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
622
+ type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
613
623
  id: string;
614
624
  config: Record<string, unknown>;
615
625
  out: {
616
626
  to: string;
627
+ condition?: string | undefined;
617
628
  sourceHandle?: string | undefined;
618
629
  label?: string | undefined;
619
- condition?: string | undefined;
620
630
  }[];
621
631
  }>;
622
- v: 1;
623
- entry: string[];
624
632
  completionGate: {
625
633
  requiredFields: string[];
626
634
  };
@@ -655,7 +663,7 @@ declare const ProcessSchemaDTO: z.ZodObject<{
655
663
  routes?: Record<string, string> | undefined;
656
664
  } | undefined;
657
665
  memory?: {
658
- scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
666
+ scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
659
667
  retentionDays?: number | undefined;
660
668
  piiFields?: string[] | undefined;
661
669
  } | undefined;
@@ -671,8 +679,8 @@ declare const ProcessSchemaDTO: z.ZodObject<{
671
679
  } | undefined;
672
680
  } | undefined;
673
681
  prompts?: {
674
- text: string;
675
682
  id: string;
683
+ text: string;
676
684
  }[] | undefined;
677
685
  triggers?: {
678
686
  then: string;
@@ -682,29 +690,29 @@ declare const ProcessSchemaDTO: z.ZodObject<{
682
690
  }[] | undefined;
683
691
  tools?: {
684
692
  name: string;
693
+ url: string;
685
694
  description: string;
686
695
  input: Record<string, "string" | "number" | "boolean">;
687
- url: string;
688
696
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
689
697
  auth: "none" | "connection";
690
698
  headers?: Record<string, string> | undefined;
691
699
  connectionRef?: string | undefined;
692
700
  }[] | undefined;
693
701
  program?: {
702
+ v: 1;
694
703
  id: string;
704
+ entry: string[];
695
705
  nodes: Record<string, {
696
- type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
706
+ type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
697
707
  id: string;
698
708
  config: Record<string, unknown>;
699
709
  out: {
700
710
  to: string;
711
+ condition?: string | undefined;
701
712
  sourceHandle?: string | undefined;
702
713
  label?: string | undefined;
703
- condition?: string | undefined;
704
714
  }[];
705
715
  }>;
706
- v: 1;
707
- entry: string[];
708
716
  completionGate: {
709
717
  requiredFields: string[];
710
718
  };
@@ -739,7 +747,7 @@ declare const ProcessSchemaDTO: z.ZodObject<{
739
747
  routes?: Record<string, string> | undefined;
740
748
  } | undefined;
741
749
  memory?: {
742
- scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
750
+ scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
743
751
  retentionDays?: number | undefined;
744
752
  piiFields?: string[] | undefined;
745
753
  } | undefined;
@@ -755,8 +763,8 @@ declare const ProcessSchemaDTO: z.ZodObject<{
755
763
  } | undefined;
756
764
  } | undefined;
757
765
  prompts?: {
758
- text: string;
759
766
  id: string;
767
+ text: string;
760
768
  }[] | undefined;
761
769
  triggers?: {
762
770
  then: string;
@@ -766,29 +774,29 @@ declare const ProcessSchemaDTO: z.ZodObject<{
766
774
  }[] | undefined;
767
775
  tools?: {
768
776
  name: string;
777
+ url: string;
769
778
  description: string;
770
779
  input: Record<string, "string" | "number" | "boolean">;
771
- url: string;
772
780
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
773
781
  auth: "none" | "connection";
774
782
  headers?: Record<string, string> | undefined;
775
783
  connectionRef?: string | undefined;
776
784
  }[] | undefined;
777
785
  program?: {
786
+ v: 1;
778
787
  id: string;
788
+ entry: string[];
779
789
  nodes: Record<string, {
780
- type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
790
+ type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
781
791
  id: string;
782
792
  config: Record<string, unknown>;
783
793
  out: {
784
794
  to: string;
795
+ condition?: string | undefined;
785
796
  sourceHandle?: string | undefined;
786
797
  label?: string | undefined;
787
- condition?: string | undefined;
788
798
  }[];
789
799
  }>;
790
- v: 1;
791
- entry: string[];
792
800
  completionGate: {
793
801
  requiredFields: string[];
794
802
  };
@@ -831,11 +839,11 @@ declare const AgentDTO: z.ZodObject<{
831
839
  id: z.ZodString;
832
840
  text: z.ZodString;
833
841
  }, "strip", z.ZodTypeAny, {
834
- text: string;
835
842
  id: string;
836
- }, {
837
843
  text: string;
844
+ }, {
838
845
  id: string;
846
+ text: string;
839
847
  }>, "many">>;
840
848
  fields: z.ZodArray<z.ZodObject<{
841
849
  name: z.ZodString;
@@ -921,11 +929,11 @@ declare const AgentDTO: z.ZodObject<{
921
929
  retentionDays: z.ZodOptional<z.ZodNumber>;
922
930
  piiFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
923
931
  }, "strip", z.ZodTypeAny, {
924
- scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
932
+ scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
925
933
  retentionDays?: number | undefined;
926
934
  piiFields?: string[] | undefined;
927
935
  }, {
928
- scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
936
+ scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
929
937
  retentionDays?: number | undefined;
930
938
  piiFields?: string[] | undefined;
931
939
  }>>;
@@ -940,18 +948,18 @@ declare const AgentDTO: z.ZodObject<{
940
948
  connectionRef: z.ZodOptional<z.ZodString>;
941
949
  }, "strip", z.ZodTypeAny, {
942
950
  name: string;
951
+ url: string;
943
952
  description: string;
944
953
  input: Record<string, "string" | "number" | "boolean">;
945
- url: string;
946
954
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
947
955
  auth: "none" | "connection";
948
956
  headers?: Record<string, string> | undefined;
949
957
  connectionRef?: string | undefined;
950
958
  }, {
951
959
  name: string;
960
+ url: string;
952
961
  description: string;
953
962
  input: Record<string, "string" | "number" | "boolean">;
954
- url: string;
955
963
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
956
964
  auth: "none" | "connection";
957
965
  headers?: Record<string, string> | undefined;
@@ -1017,34 +1025,34 @@ declare const AgentDTO: z.ZodObject<{
1017
1025
  label: z.ZodOptional<z.ZodString>;
1018
1026
  }, "strip", z.ZodTypeAny, {
1019
1027
  to: string;
1028
+ condition?: string | undefined;
1020
1029
  sourceHandle?: string | undefined;
1021
1030
  label?: string | undefined;
1022
- condition?: string | undefined;
1023
1031
  }, {
1024
1032
  to: string;
1033
+ condition?: string | undefined;
1025
1034
  sourceHandle?: string | undefined;
1026
1035
  label?: string | undefined;
1027
- condition?: string | undefined;
1028
1036
  }>, "many">;
1029
1037
  }, "strip", z.ZodTypeAny, {
1030
- type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1038
+ type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1031
1039
  id: string;
1032
1040
  config: Record<string, unknown>;
1033
1041
  out: {
1034
1042
  to: string;
1043
+ condition?: string | undefined;
1035
1044
  sourceHandle?: string | undefined;
1036
1045
  label?: string | undefined;
1037
- condition?: string | undefined;
1038
1046
  }[];
1039
1047
  }, {
1040
- type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1048
+ type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1041
1049
  id: string;
1042
1050
  config: Record<string, unknown>;
1043
1051
  out: {
1044
1052
  to: string;
1053
+ condition?: string | undefined;
1045
1054
  sourceHandle?: string | undefined;
1046
1055
  label?: string | undefined;
1047
- condition?: string | undefined;
1048
1056
  }[];
1049
1057
  }>>;
1050
1058
  completionGate: z.ZodObject<{
@@ -1071,20 +1079,20 @@ declare const AgentDTO: z.ZodObject<{
1071
1079
  labelOnlyEdges?: string[] | undefined;
1072
1080
  }>>;
1073
1081
  }, "strip", z.ZodTypeAny, {
1082
+ v: 1;
1074
1083
  id: string;
1084
+ entry: string[];
1075
1085
  nodes: Record<string, {
1076
- type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1086
+ type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1077
1087
  id: string;
1078
1088
  config: Record<string, unknown>;
1079
1089
  out: {
1080
1090
  to: string;
1091
+ condition?: string | undefined;
1081
1092
  sourceHandle?: string | undefined;
1082
1093
  label?: string | undefined;
1083
- condition?: string | undefined;
1084
1094
  }[];
1085
1095
  }>;
1086
- v: 1;
1087
- entry: string[];
1088
1096
  completionGate: {
1089
1097
  requiredFields: string[];
1090
1098
  };
@@ -1095,20 +1103,20 @@ declare const AgentDTO: z.ZodObject<{
1095
1103
  labelOnlyEdges?: string[] | undefined;
1096
1104
  } | undefined;
1097
1105
  }, {
1106
+ v: 1;
1098
1107
  id: string;
1108
+ entry: string[];
1099
1109
  nodes: Record<string, {
1100
- type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1110
+ type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1101
1111
  id: string;
1102
1112
  config: Record<string, unknown>;
1103
1113
  out: {
1104
1114
  to: string;
1115
+ condition?: string | undefined;
1105
1116
  sourceHandle?: string | undefined;
1106
1117
  label?: string | undefined;
1107
- condition?: string | undefined;
1108
1118
  }[];
1109
1119
  }>;
1110
- v: 1;
1111
- entry: string[];
1112
1120
  completionGate: {
1113
1121
  requiredFields: string[];
1114
1122
  };
@@ -1143,7 +1151,7 @@ declare const AgentDTO: z.ZodObject<{
1143
1151
  routes?: Record<string, string> | undefined;
1144
1152
  } | undefined;
1145
1153
  memory?: {
1146
- scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
1154
+ scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
1147
1155
  retentionDays?: number | undefined;
1148
1156
  piiFields?: string[] | undefined;
1149
1157
  } | undefined;
@@ -1159,8 +1167,8 @@ declare const AgentDTO: z.ZodObject<{
1159
1167
  } | undefined;
1160
1168
  } | undefined;
1161
1169
  prompts?: {
1162
- text: string;
1163
1170
  id: string;
1171
+ text: string;
1164
1172
  }[] | undefined;
1165
1173
  triggers?: {
1166
1174
  then: string;
@@ -1170,29 +1178,29 @@ declare const AgentDTO: z.ZodObject<{
1170
1178
  }[] | undefined;
1171
1179
  tools?: {
1172
1180
  name: string;
1181
+ url: string;
1173
1182
  description: string;
1174
1183
  input: Record<string, "string" | "number" | "boolean">;
1175
- url: string;
1176
1184
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1177
1185
  auth: "none" | "connection";
1178
1186
  headers?: Record<string, string> | undefined;
1179
1187
  connectionRef?: string | undefined;
1180
1188
  }[] | undefined;
1181
1189
  program?: {
1190
+ v: 1;
1182
1191
  id: string;
1192
+ entry: string[];
1183
1193
  nodes: Record<string, {
1184
- type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1194
+ type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1185
1195
  id: string;
1186
1196
  config: Record<string, unknown>;
1187
1197
  out: {
1188
1198
  to: string;
1199
+ condition?: string | undefined;
1189
1200
  sourceHandle?: string | undefined;
1190
1201
  label?: string | undefined;
1191
- condition?: string | undefined;
1192
1202
  }[];
1193
1203
  }>;
1194
- v: 1;
1195
- entry: string[];
1196
1204
  completionGate: {
1197
1205
  requiredFields: string[];
1198
1206
  };
@@ -1227,7 +1235,7 @@ declare const AgentDTO: z.ZodObject<{
1227
1235
  routes?: Record<string, string> | undefined;
1228
1236
  } | undefined;
1229
1237
  memory?: {
1230
- scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
1238
+ scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
1231
1239
  retentionDays?: number | undefined;
1232
1240
  piiFields?: string[] | undefined;
1233
1241
  } | undefined;
@@ -1243,8 +1251,8 @@ declare const AgentDTO: z.ZodObject<{
1243
1251
  } | undefined;
1244
1252
  } | undefined;
1245
1253
  prompts?: {
1246
- text: string;
1247
1254
  id: string;
1255
+ text: string;
1248
1256
  }[] | undefined;
1249
1257
  triggers?: {
1250
1258
  then: string;
@@ -1254,29 +1262,29 @@ declare const AgentDTO: z.ZodObject<{
1254
1262
  }[] | undefined;
1255
1263
  tools?: {
1256
1264
  name: string;
1265
+ url: string;
1257
1266
  description: string;
1258
1267
  input: Record<string, "string" | "number" | "boolean">;
1259
- url: string;
1260
1268
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1261
1269
  auth: "none" | "connection";
1262
1270
  headers?: Record<string, string> | undefined;
1263
1271
  connectionRef?: string | undefined;
1264
1272
  }[] | undefined;
1265
1273
  program?: {
1274
+ v: 1;
1266
1275
  id: string;
1276
+ entry: string[];
1267
1277
  nodes: Record<string, {
1268
- type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1278
+ type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1269
1279
  id: string;
1270
1280
  config: Record<string, unknown>;
1271
1281
  out: {
1272
1282
  to: string;
1283
+ condition?: string | undefined;
1273
1284
  sourceHandle?: string | undefined;
1274
1285
  label?: string | undefined;
1275
- condition?: string | undefined;
1276
1286
  }[];
1277
1287
  }>;
1278
- v: 1;
1279
- entry: string[];
1280
1288
  completionGate: {
1281
1289
  requiredFields: string[];
1282
1290
  };
@@ -1294,8 +1302,8 @@ declare const AgentDTO: z.ZodObject<{
1294
1302
  }, "strip", z.ZodTypeAny, {
1295
1303
  status: "online" | "offline" | "degraded";
1296
1304
  id: string;
1297
- projectId: string;
1298
1305
  name: string;
1306
+ projectId: string;
1299
1307
  createdAt: string;
1300
1308
  updatedAt: string;
1301
1309
  version: string;
@@ -1333,7 +1341,7 @@ declare const AgentDTO: z.ZodObject<{
1333
1341
  routes?: Record<string, string> | undefined;
1334
1342
  } | undefined;
1335
1343
  memory?: {
1336
- scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
1344
+ scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
1337
1345
  retentionDays?: number | undefined;
1338
1346
  piiFields?: string[] | undefined;
1339
1347
  } | undefined;
@@ -1349,8 +1357,8 @@ declare const AgentDTO: z.ZodObject<{
1349
1357
  } | undefined;
1350
1358
  } | undefined;
1351
1359
  prompts?: {
1352
- text: string;
1353
1360
  id: string;
1361
+ text: string;
1354
1362
  }[] | undefined;
1355
1363
  triggers?: {
1356
1364
  then: string;
@@ -1360,29 +1368,29 @@ declare const AgentDTO: z.ZodObject<{
1360
1368
  }[] | undefined;
1361
1369
  tools?: {
1362
1370
  name: string;
1371
+ url: string;
1363
1372
  description: string;
1364
1373
  input: Record<string, "string" | "number" | "boolean">;
1365
- url: string;
1366
1374
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1367
1375
  auth: "none" | "connection";
1368
1376
  headers?: Record<string, string> | undefined;
1369
1377
  connectionRef?: string | undefined;
1370
1378
  }[] | undefined;
1371
1379
  program?: {
1380
+ v: 1;
1372
1381
  id: string;
1382
+ entry: string[];
1373
1383
  nodes: Record<string, {
1374
- type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1384
+ type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1375
1385
  id: string;
1376
1386
  config: Record<string, unknown>;
1377
1387
  out: {
1378
1388
  to: string;
1389
+ condition?: string | undefined;
1379
1390
  sourceHandle?: string | undefined;
1380
1391
  label?: string | undefined;
1381
- condition?: string | undefined;
1382
1392
  }[];
1383
1393
  }>;
1384
- v: 1;
1385
- entry: string[];
1386
1394
  completionGate: {
1387
1395
  requiredFields: string[];
1388
1396
  };
@@ -1398,8 +1406,8 @@ declare const AgentDTO: z.ZodObject<{
1398
1406
  }, {
1399
1407
  status: "online" | "offline" | "degraded";
1400
1408
  id: string;
1401
- projectId: string;
1402
1409
  name: string;
1410
+ projectId: string;
1403
1411
  createdAt: string;
1404
1412
  updatedAt: string;
1405
1413
  version: string;
@@ -1437,7 +1445,7 @@ declare const AgentDTO: z.ZodObject<{
1437
1445
  routes?: Record<string, string> | undefined;
1438
1446
  } | undefined;
1439
1447
  memory?: {
1440
- scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
1448
+ scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
1441
1449
  retentionDays?: number | undefined;
1442
1450
  piiFields?: string[] | undefined;
1443
1451
  } | undefined;
@@ -1453,8 +1461,8 @@ declare const AgentDTO: z.ZodObject<{
1453
1461
  } | undefined;
1454
1462
  } | undefined;
1455
1463
  prompts?: {
1456
- text: string;
1457
1464
  id: string;
1465
+ text: string;
1458
1466
  }[] | undefined;
1459
1467
  triggers?: {
1460
1468
  then: string;
@@ -1464,29 +1472,29 @@ declare const AgentDTO: z.ZodObject<{
1464
1472
  }[] | undefined;
1465
1473
  tools?: {
1466
1474
  name: string;
1475
+ url: string;
1467
1476
  description: string;
1468
1477
  input: Record<string, "string" | "number" | "boolean">;
1469
- url: string;
1470
1478
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1471
1479
  auth: "none" | "connection";
1472
1480
  headers?: Record<string, string> | undefined;
1473
1481
  connectionRef?: string | undefined;
1474
1482
  }[] | undefined;
1475
1483
  program?: {
1484
+ v: 1;
1476
1485
  id: string;
1486
+ entry: string[];
1477
1487
  nodes: Record<string, {
1478
- type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1488
+ type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1479
1489
  id: string;
1480
1490
  config: Record<string, unknown>;
1481
1491
  out: {
1482
1492
  to: string;
1493
+ condition?: string | undefined;
1483
1494
  sourceHandle?: string | undefined;
1484
1495
  label?: string | undefined;
1485
- condition?: string | undefined;
1486
1496
  }[];
1487
1497
  }>;
1488
- v: 1;
1489
- entry: string[];
1490
1498
  completionGate: {
1491
1499
  requiredFields: string[];
1492
1500
  };
@@ -1517,34 +1525,34 @@ declare const FlowProgram: z.ZodObject<{
1517
1525
  label: z.ZodOptional<z.ZodString>;
1518
1526
  }, "strip", z.ZodTypeAny, {
1519
1527
  to: string;
1528
+ condition?: string | undefined;
1520
1529
  sourceHandle?: string | undefined;
1521
1530
  label?: string | undefined;
1522
- condition?: string | undefined;
1523
1531
  }, {
1524
1532
  to: string;
1533
+ condition?: string | undefined;
1525
1534
  sourceHandle?: string | undefined;
1526
1535
  label?: string | undefined;
1527
- condition?: string | undefined;
1528
1536
  }>, "many">;
1529
1537
  }, "strip", z.ZodTypeAny, {
1530
- type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1538
+ type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1531
1539
  id: string;
1532
1540
  config: Record<string, unknown>;
1533
1541
  out: {
1534
1542
  to: string;
1543
+ condition?: string | undefined;
1535
1544
  sourceHandle?: string | undefined;
1536
1545
  label?: string | undefined;
1537
- condition?: string | undefined;
1538
1546
  }[];
1539
1547
  }, {
1540
- type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1548
+ type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1541
1549
  id: string;
1542
1550
  config: Record<string, unknown>;
1543
1551
  out: {
1544
1552
  to: string;
1553
+ condition?: string | undefined;
1545
1554
  sourceHandle?: string | undefined;
1546
1555
  label?: string | undefined;
1547
- condition?: string | undefined;
1548
1556
  }[];
1549
1557
  }>>;
1550
1558
  completionGate: z.ZodObject<{
@@ -1571,20 +1579,20 @@ declare const FlowProgram: z.ZodObject<{
1571
1579
  labelOnlyEdges?: string[] | undefined;
1572
1580
  }>>;
1573
1581
  }, "strip", z.ZodTypeAny, {
1582
+ v: 1;
1574
1583
  id: string;
1584
+ entry: string[];
1575
1585
  nodes: Record<string, {
1576
- type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1586
+ type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1577
1587
  id: string;
1578
1588
  config: Record<string, unknown>;
1579
1589
  out: {
1580
1590
  to: string;
1591
+ condition?: string | undefined;
1581
1592
  sourceHandle?: string | undefined;
1582
1593
  label?: string | undefined;
1583
- condition?: string | undefined;
1584
1594
  }[];
1585
1595
  }>;
1586
- v: 1;
1587
- entry: string[];
1588
1596
  completionGate: {
1589
1597
  requiredFields: string[];
1590
1598
  };
@@ -1595,20 +1603,20 @@ declare const FlowProgram: z.ZodObject<{
1595
1603
  labelOnlyEdges?: string[] | undefined;
1596
1604
  } | undefined;
1597
1605
  }, {
1606
+ v: 1;
1598
1607
  id: string;
1608
+ entry: string[];
1599
1609
  nodes: Record<string, {
1600
- type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1610
+ type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1601
1611
  id: string;
1602
1612
  config: Record<string, unknown>;
1603
1613
  out: {
1604
1614
  to: string;
1615
+ condition?: string | undefined;
1605
1616
  sourceHandle?: string | undefined;
1606
1617
  label?: string | undefined;
1607
- condition?: string | undefined;
1608
1618
  }[];
1609
1619
  }>;
1610
- v: 1;
1611
- entry: string[];
1612
1620
  completionGate: {
1613
1621
  requiredFields: string[];
1614
1622
  };