@voicelayer/sdk 0.5.0 → 0.6.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.
@@ -354,11 +354,11 @@ declare const ProcessSchemaDTO: z.ZodObject<{
354
354
  id: z.ZodString;
355
355
  text: z.ZodString;
356
356
  }, "strip", z.ZodTypeAny, {
357
- id: string;
358
357
  text: string;
359
- }, {
360
358
  id: string;
359
+ }, {
361
360
  text: string;
361
+ id: string;
362
362
  }>, "many">>;
363
363
  fields: z.ZodArray<z.ZodObject<{
364
364
  name: z.ZodString;
@@ -373,7 +373,7 @@ declare const ProcessSchemaDTO: z.ZodObject<{
373
373
  * doesn't extract it from their words. Absent ⇒ the caller may say it. */
374
374
  fromCaller: z.ZodOptional<z.ZodBoolean>;
375
375
  }, "strip", z.ZodTypeAny, {
376
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
376
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
377
377
  name: string;
378
378
  required: boolean;
379
379
  ask?: string | undefined;
@@ -383,7 +383,7 @@ declare const ProcessSchemaDTO: z.ZodObject<{
383
383
  enum?: string[] | undefined;
384
384
  fromCaller?: boolean | undefined;
385
385
  }, {
386
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
386
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
387
387
  name: string;
388
388
  required: boolean;
389
389
  ask?: string | undefined;
@@ -454,11 +454,11 @@ declare const ProcessSchemaDTO: z.ZodObject<{
454
454
  retentionDays: z.ZodOptional<z.ZodNumber>;
455
455
  piiFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
456
456
  }, "strip", z.ZodTypeAny, {
457
- scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
457
+ scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
458
458
  retentionDays?: number | undefined;
459
459
  piiFields?: string[] | undefined;
460
460
  }, {
461
- scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
461
+ scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
462
462
  retentionDays?: number | undefined;
463
463
  piiFields?: string[] | undefined;
464
464
  }>>;
@@ -476,26 +476,36 @@ declare const ProcessSchemaDTO: z.ZodObject<{
476
476
  * worker (it holds the internal service token) never honours it.
477
477
  */
478
478
  allowPrivateNetwork: z.ZodOptional<z.ZodBoolean>;
479
+ /**
480
+ * Burn-down G-33: the model reads the caller's PII as tokens (`<PII_PHONE_1>`). `true` — this tool's arguments carry
481
+ * the caller's real values instead, when its URL fixes the host (publish refuses it on a host the call fills in).
482
+ * Absent — real values only when it signs in with a connection; otherwise the endpoint gets the tokens. `false` —
483
+ * always the tokens.
484
+ * (packages/sdk/test/tool-detokenise.test.ts)
485
+ */
486
+ sendRealValues: z.ZodOptional<z.ZodBoolean>;
479
487
  }, "strip", z.ZodTypeAny, {
480
488
  name: string;
481
- url: string;
482
489
  description: string;
483
490
  input: Record<string, "string" | "number" | "boolean">;
491
+ url: string;
484
492
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
485
493
  auth: "none" | "connection";
486
- allowPrivateNetwork?: boolean | undefined;
487
494
  headers?: Record<string, string> | undefined;
488
495
  connectionRef?: string | undefined;
496
+ allowPrivateNetwork?: boolean | undefined;
497
+ sendRealValues?: boolean | undefined;
489
498
  }, {
490
499
  name: string;
491
- url: string;
492
500
  description: string;
493
501
  input: Record<string, "string" | "number" | "boolean">;
502
+ url: string;
494
503
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
495
504
  auth: "none" | "connection";
496
- allowPrivateNetwork?: boolean | undefined;
497
505
  headers?: Record<string, string> | undefined;
498
506
  connectionRef?: string | undefined;
507
+ allowPrivateNetwork?: boolean | undefined;
508
+ sendRealValues?: boolean | undefined;
499
509
  }>, "many">>;
500
510
  displayName: z.ZodOptional<z.ZodString>;
501
511
  speech: z.ZodOptional<z.ZodObject<{
@@ -549,7 +559,7 @@ declare const ProcessSchemaDTO: z.ZodObject<{
549
559
  entry: z.ZodArray<z.ZodString, "many">;
550
560
  nodes: z.ZodRecord<z.ZodString, z.ZodObject<{
551
561
  id: z.ZodString;
552
- type: z.ZodEnum<["start", "say", "ask", "confirm", "tool", "decision", "handoff", "end", "trigger", "gate", "playbook", "menu", "code", "set", "subflow", "llm", "rag", "memory", "speech", "classify", "router", "note"]>;
562
+ type: z.ZodEnum<["start", "say", "ask", "confirm", "tool", "email", "decision", "handoff", "end", "trigger", "gate", "playbook", "menu", "code", "set", "subflow", "llm", "rag", "memory", "speech", "classify", "router", "note"]>;
553
563
  config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
554
564
  out: z.ZodArray<z.ZodObject<{
555
565
  to: z.ZodString;
@@ -558,34 +568,34 @@ declare const ProcessSchemaDTO: z.ZodObject<{
558
568
  label: z.ZodOptional<z.ZodString>;
559
569
  }, "strip", z.ZodTypeAny, {
560
570
  to: string;
561
- condition?: string | undefined;
562
571
  sourceHandle?: string | undefined;
563
572
  label?: string | undefined;
573
+ condition?: string | undefined;
564
574
  }, {
565
575
  to: string;
566
- condition?: string | undefined;
567
576
  sourceHandle?: string | undefined;
568
577
  label?: string | undefined;
578
+ condition?: string | undefined;
569
579
  }>, "many">;
570
580
  }, "strip", z.ZodTypeAny, {
571
- type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
581
+ type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
572
582
  id: string;
573
583
  config: Record<string, unknown>;
574
584
  out: {
575
585
  to: string;
576
- condition?: string | undefined;
577
586
  sourceHandle?: string | undefined;
578
587
  label?: string | undefined;
588
+ condition?: string | undefined;
579
589
  }[];
580
590
  }, {
581
- type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
591
+ type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
582
592
  id: string;
583
593
  config: Record<string, unknown>;
584
594
  out: {
585
595
  to: string;
586
- condition?: string | undefined;
587
596
  sourceHandle?: string | undefined;
588
597
  label?: string | undefined;
598
+ condition?: string | undefined;
589
599
  }[];
590
600
  }>>;
591
601
  completionGate: z.ZodObject<{
@@ -612,20 +622,20 @@ declare const ProcessSchemaDTO: z.ZodObject<{
612
622
  labelOnlyEdges?: string[] | undefined;
613
623
  }>>;
614
624
  }, "strip", z.ZodTypeAny, {
615
- v: 1;
616
625
  id: string;
617
- entry: string[];
618
626
  nodes: Record<string, {
619
- type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
627
+ type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
620
628
  id: string;
621
629
  config: Record<string, unknown>;
622
630
  out: {
623
631
  to: string;
624
- condition?: string | undefined;
625
632
  sourceHandle?: string | undefined;
626
633
  label?: string | undefined;
634
+ condition?: string | undefined;
627
635
  }[];
628
636
  }>;
637
+ v: 1;
638
+ entry: string[];
629
639
  completionGate: {
630
640
  requiredFields: string[];
631
641
  };
@@ -636,20 +646,20 @@ declare const ProcessSchemaDTO: z.ZodObject<{
636
646
  labelOnlyEdges?: string[] | undefined;
637
647
  } | undefined;
638
648
  }, {
639
- v: 1;
640
649
  id: string;
641
- entry: string[];
642
650
  nodes: Record<string, {
643
- type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
651
+ type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
644
652
  id: string;
645
653
  config: Record<string, unknown>;
646
654
  out: {
647
655
  to: string;
648
- condition?: string | undefined;
649
656
  sourceHandle?: string | undefined;
650
657
  label?: string | undefined;
658
+ condition?: string | undefined;
651
659
  }[];
652
660
  }>;
661
+ v: 1;
662
+ entry: string[];
653
663
  completionGate: {
654
664
  requiredFields: string[];
655
665
  };
@@ -671,7 +681,7 @@ declare const ProcessSchemaDTO: z.ZodObject<{
671
681
  } | undefined;
672
682
  };
673
683
  fields: {
674
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
684
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
675
685
  name: string;
676
686
  required: boolean;
677
687
  ask?: string | undefined;
@@ -686,7 +696,7 @@ declare const ProcessSchemaDTO: z.ZodObject<{
686
696
  routes?: Record<string, string> | undefined;
687
697
  } | undefined;
688
698
  memory?: {
689
- scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
699
+ scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
690
700
  retentionDays?: number | undefined;
691
701
  piiFields?: string[] | undefined;
692
702
  } | undefined;
@@ -702,8 +712,8 @@ declare const ProcessSchemaDTO: z.ZodObject<{
702
712
  } | undefined;
703
713
  } | undefined;
704
714
  prompts?: {
705
- id: string;
706
715
  text: string;
716
+ id: string;
707
717
  }[] | undefined;
708
718
  triggers?: {
709
719
  then: string;
@@ -713,31 +723,32 @@ declare const ProcessSchemaDTO: z.ZodObject<{
713
723
  }[] | undefined;
714
724
  tools?: {
715
725
  name: string;
716
- url: string;
717
726
  description: string;
718
727
  input: Record<string, "string" | "number" | "boolean">;
728
+ url: string;
719
729
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
720
730
  auth: "none" | "connection";
721
- allowPrivateNetwork?: boolean | undefined;
722
731
  headers?: Record<string, string> | undefined;
723
732
  connectionRef?: string | undefined;
733
+ allowPrivateNetwork?: boolean | undefined;
734
+ sendRealValues?: boolean | undefined;
724
735
  }[] | undefined;
725
736
  displayName?: string | undefined;
726
737
  program?: {
727
- v: 1;
728
738
  id: string;
729
- entry: string[];
730
739
  nodes: Record<string, {
731
- type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
740
+ type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
732
741
  id: string;
733
742
  config: Record<string, unknown>;
734
743
  out: {
735
744
  to: string;
736
- condition?: string | undefined;
737
745
  sourceHandle?: string | undefined;
738
746
  label?: string | undefined;
747
+ condition?: string | undefined;
739
748
  }[];
740
749
  }>;
750
+ v: 1;
751
+ entry: string[];
741
752
  completionGate: {
742
753
  requiredFields: string[];
743
754
  };
@@ -759,7 +770,7 @@ declare const ProcessSchemaDTO: z.ZodObject<{
759
770
  } | undefined;
760
771
  };
761
772
  fields: {
762
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
773
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
763
774
  name: string;
764
775
  required: boolean;
765
776
  ask?: string | undefined;
@@ -774,7 +785,7 @@ declare const ProcessSchemaDTO: z.ZodObject<{
774
785
  routes?: Record<string, string> | undefined;
775
786
  } | undefined;
776
787
  memory?: {
777
- scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
788
+ scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
778
789
  retentionDays?: number | undefined;
779
790
  piiFields?: string[] | undefined;
780
791
  } | undefined;
@@ -790,8 +801,8 @@ declare const ProcessSchemaDTO: z.ZodObject<{
790
801
  } | undefined;
791
802
  } | undefined;
792
803
  prompts?: {
793
- id: string;
794
804
  text: string;
805
+ id: string;
795
806
  }[] | undefined;
796
807
  triggers?: {
797
808
  then: string;
@@ -801,31 +812,32 @@ declare const ProcessSchemaDTO: z.ZodObject<{
801
812
  }[] | undefined;
802
813
  tools?: {
803
814
  name: string;
804
- url: string;
805
815
  description: string;
806
816
  input: Record<string, "string" | "number" | "boolean">;
817
+ url: string;
807
818
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
808
819
  auth: "none" | "connection";
809
- allowPrivateNetwork?: boolean | undefined;
810
820
  headers?: Record<string, string> | undefined;
811
821
  connectionRef?: string | undefined;
822
+ allowPrivateNetwork?: boolean | undefined;
823
+ sendRealValues?: boolean | undefined;
812
824
  }[] | undefined;
813
825
  displayName?: string | undefined;
814
826
  program?: {
815
- v: 1;
816
827
  id: string;
817
- entry: string[];
818
828
  nodes: Record<string, {
819
- type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
829
+ type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
820
830
  id: string;
821
831
  config: Record<string, unknown>;
822
832
  out: {
823
833
  to: string;
824
- condition?: string | undefined;
825
834
  sourceHandle?: string | undefined;
826
835
  label?: string | undefined;
836
+ condition?: string | undefined;
827
837
  }[];
828
838
  }>;
839
+ v: 1;
840
+ entry: string[];
829
841
  completionGate: {
830
842
  requiredFields: string[];
831
843
  };
@@ -868,11 +880,11 @@ declare const AgentDTO: z.ZodObject<{
868
880
  id: z.ZodString;
869
881
  text: z.ZodString;
870
882
  }, "strip", z.ZodTypeAny, {
871
- id: string;
872
883
  text: string;
873
- }, {
874
884
  id: string;
885
+ }, {
875
886
  text: string;
887
+ id: string;
876
888
  }>, "many">>;
877
889
  fields: z.ZodArray<z.ZodObject<{
878
890
  name: z.ZodString;
@@ -887,7 +899,7 @@ declare const AgentDTO: z.ZodObject<{
887
899
  * doesn't extract it from their words. Absent ⇒ the caller may say it. */
888
900
  fromCaller: z.ZodOptional<z.ZodBoolean>;
889
901
  }, "strip", z.ZodTypeAny, {
890
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
902
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
891
903
  name: string;
892
904
  required: boolean;
893
905
  ask?: string | undefined;
@@ -897,7 +909,7 @@ declare const AgentDTO: z.ZodObject<{
897
909
  enum?: string[] | undefined;
898
910
  fromCaller?: boolean | undefined;
899
911
  }, {
900
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
912
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
901
913
  name: string;
902
914
  required: boolean;
903
915
  ask?: string | undefined;
@@ -968,11 +980,11 @@ declare const AgentDTO: z.ZodObject<{
968
980
  retentionDays: z.ZodOptional<z.ZodNumber>;
969
981
  piiFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
970
982
  }, "strip", z.ZodTypeAny, {
971
- scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
983
+ scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
972
984
  retentionDays?: number | undefined;
973
985
  piiFields?: string[] | undefined;
974
986
  }, {
975
- scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
987
+ scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
976
988
  retentionDays?: number | undefined;
977
989
  piiFields?: string[] | undefined;
978
990
  }>>;
@@ -990,26 +1002,36 @@ declare const AgentDTO: z.ZodObject<{
990
1002
  * worker (it holds the internal service token) never honours it.
991
1003
  */
992
1004
  allowPrivateNetwork: z.ZodOptional<z.ZodBoolean>;
1005
+ /**
1006
+ * Burn-down G-33: the model reads the caller's PII as tokens (`<PII_PHONE_1>`). `true` — this tool's arguments carry
1007
+ * the caller's real values instead, when its URL fixes the host (publish refuses it on a host the call fills in).
1008
+ * Absent — real values only when it signs in with a connection; otherwise the endpoint gets the tokens. `false` —
1009
+ * always the tokens.
1010
+ * (packages/sdk/test/tool-detokenise.test.ts)
1011
+ */
1012
+ sendRealValues: z.ZodOptional<z.ZodBoolean>;
993
1013
  }, "strip", z.ZodTypeAny, {
994
1014
  name: string;
995
- url: string;
996
1015
  description: string;
997
1016
  input: Record<string, "string" | "number" | "boolean">;
1017
+ url: string;
998
1018
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
999
1019
  auth: "none" | "connection";
1000
- allowPrivateNetwork?: boolean | undefined;
1001
1020
  headers?: Record<string, string> | undefined;
1002
1021
  connectionRef?: string | undefined;
1022
+ allowPrivateNetwork?: boolean | undefined;
1023
+ sendRealValues?: boolean | undefined;
1003
1024
  }, {
1004
1025
  name: string;
1005
- url: string;
1006
1026
  description: string;
1007
1027
  input: Record<string, "string" | "number" | "boolean">;
1028
+ url: string;
1008
1029
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1009
1030
  auth: "none" | "connection";
1010
- allowPrivateNetwork?: boolean | undefined;
1011
1031
  headers?: Record<string, string> | undefined;
1012
1032
  connectionRef?: string | undefined;
1033
+ allowPrivateNetwork?: boolean | undefined;
1034
+ sendRealValues?: boolean | undefined;
1013
1035
  }>, "many">>;
1014
1036
  displayName: z.ZodOptional<z.ZodString>;
1015
1037
  speech: z.ZodOptional<z.ZodObject<{
@@ -1063,7 +1085,7 @@ declare const AgentDTO: z.ZodObject<{
1063
1085
  entry: z.ZodArray<z.ZodString, "many">;
1064
1086
  nodes: z.ZodRecord<z.ZodString, z.ZodObject<{
1065
1087
  id: z.ZodString;
1066
- type: z.ZodEnum<["start", "say", "ask", "confirm", "tool", "decision", "handoff", "end", "trigger", "gate", "playbook", "menu", "code", "set", "subflow", "llm", "rag", "memory", "speech", "classify", "router", "note"]>;
1088
+ type: z.ZodEnum<["start", "say", "ask", "confirm", "tool", "email", "decision", "handoff", "end", "trigger", "gate", "playbook", "menu", "code", "set", "subflow", "llm", "rag", "memory", "speech", "classify", "router", "note"]>;
1067
1089
  config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1068
1090
  out: z.ZodArray<z.ZodObject<{
1069
1091
  to: z.ZodString;
@@ -1072,34 +1094,34 @@ declare const AgentDTO: z.ZodObject<{
1072
1094
  label: z.ZodOptional<z.ZodString>;
1073
1095
  }, "strip", z.ZodTypeAny, {
1074
1096
  to: string;
1075
- condition?: string | undefined;
1076
1097
  sourceHandle?: string | undefined;
1077
1098
  label?: string | undefined;
1099
+ condition?: string | undefined;
1078
1100
  }, {
1079
1101
  to: string;
1080
- condition?: string | undefined;
1081
1102
  sourceHandle?: string | undefined;
1082
1103
  label?: string | undefined;
1104
+ condition?: string | undefined;
1083
1105
  }>, "many">;
1084
1106
  }, "strip", z.ZodTypeAny, {
1085
- type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1107
+ type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1086
1108
  id: string;
1087
1109
  config: Record<string, unknown>;
1088
1110
  out: {
1089
1111
  to: string;
1090
- condition?: string | undefined;
1091
1112
  sourceHandle?: string | undefined;
1092
1113
  label?: string | undefined;
1114
+ condition?: string | undefined;
1093
1115
  }[];
1094
1116
  }, {
1095
- type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1117
+ type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1096
1118
  id: string;
1097
1119
  config: Record<string, unknown>;
1098
1120
  out: {
1099
1121
  to: string;
1100
- condition?: string | undefined;
1101
1122
  sourceHandle?: string | undefined;
1102
1123
  label?: string | undefined;
1124
+ condition?: string | undefined;
1103
1125
  }[];
1104
1126
  }>>;
1105
1127
  completionGate: z.ZodObject<{
@@ -1126,20 +1148,20 @@ declare const AgentDTO: z.ZodObject<{
1126
1148
  labelOnlyEdges?: string[] | undefined;
1127
1149
  }>>;
1128
1150
  }, "strip", z.ZodTypeAny, {
1129
- v: 1;
1130
1151
  id: string;
1131
- entry: string[];
1132
1152
  nodes: Record<string, {
1133
- type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1153
+ type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1134
1154
  id: string;
1135
1155
  config: Record<string, unknown>;
1136
1156
  out: {
1137
1157
  to: string;
1138
- condition?: string | undefined;
1139
1158
  sourceHandle?: string | undefined;
1140
1159
  label?: string | undefined;
1160
+ condition?: string | undefined;
1141
1161
  }[];
1142
1162
  }>;
1163
+ v: 1;
1164
+ entry: string[];
1143
1165
  completionGate: {
1144
1166
  requiredFields: string[];
1145
1167
  };
@@ -1150,20 +1172,20 @@ declare const AgentDTO: z.ZodObject<{
1150
1172
  labelOnlyEdges?: string[] | undefined;
1151
1173
  } | undefined;
1152
1174
  }, {
1153
- v: 1;
1154
1175
  id: string;
1155
- entry: string[];
1156
1176
  nodes: Record<string, {
1157
- type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1177
+ type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1158
1178
  id: string;
1159
1179
  config: Record<string, unknown>;
1160
1180
  out: {
1161
1181
  to: string;
1162
- condition?: string | undefined;
1163
1182
  sourceHandle?: string | undefined;
1164
1183
  label?: string | undefined;
1184
+ condition?: string | undefined;
1165
1185
  }[];
1166
1186
  }>;
1187
+ v: 1;
1188
+ entry: string[];
1167
1189
  completionGate: {
1168
1190
  requiredFields: string[];
1169
1191
  };
@@ -1185,7 +1207,7 @@ declare const AgentDTO: z.ZodObject<{
1185
1207
  } | undefined;
1186
1208
  };
1187
1209
  fields: {
1188
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
1210
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
1189
1211
  name: string;
1190
1212
  required: boolean;
1191
1213
  ask?: string | undefined;
@@ -1200,7 +1222,7 @@ declare const AgentDTO: z.ZodObject<{
1200
1222
  routes?: Record<string, string> | undefined;
1201
1223
  } | undefined;
1202
1224
  memory?: {
1203
- scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
1225
+ scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
1204
1226
  retentionDays?: number | undefined;
1205
1227
  piiFields?: string[] | undefined;
1206
1228
  } | undefined;
@@ -1216,8 +1238,8 @@ declare const AgentDTO: z.ZodObject<{
1216
1238
  } | undefined;
1217
1239
  } | undefined;
1218
1240
  prompts?: {
1219
- id: string;
1220
1241
  text: string;
1242
+ id: string;
1221
1243
  }[] | undefined;
1222
1244
  triggers?: {
1223
1245
  then: string;
@@ -1227,31 +1249,32 @@ declare const AgentDTO: z.ZodObject<{
1227
1249
  }[] | undefined;
1228
1250
  tools?: {
1229
1251
  name: string;
1230
- url: string;
1231
1252
  description: string;
1232
1253
  input: Record<string, "string" | "number" | "boolean">;
1254
+ url: string;
1233
1255
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1234
1256
  auth: "none" | "connection";
1235
- allowPrivateNetwork?: boolean | undefined;
1236
1257
  headers?: Record<string, string> | undefined;
1237
1258
  connectionRef?: string | undefined;
1259
+ allowPrivateNetwork?: boolean | undefined;
1260
+ sendRealValues?: boolean | undefined;
1238
1261
  }[] | undefined;
1239
1262
  displayName?: string | undefined;
1240
1263
  program?: {
1241
- v: 1;
1242
1264
  id: string;
1243
- entry: string[];
1244
1265
  nodes: Record<string, {
1245
- type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1266
+ type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1246
1267
  id: string;
1247
1268
  config: Record<string, unknown>;
1248
1269
  out: {
1249
1270
  to: string;
1250
- condition?: string | undefined;
1251
1271
  sourceHandle?: string | undefined;
1252
1272
  label?: string | undefined;
1273
+ condition?: string | undefined;
1253
1274
  }[];
1254
1275
  }>;
1276
+ v: 1;
1277
+ entry: string[];
1255
1278
  completionGate: {
1256
1279
  requiredFields: string[];
1257
1280
  };
@@ -1273,7 +1296,7 @@ declare const AgentDTO: z.ZodObject<{
1273
1296
  } | undefined;
1274
1297
  };
1275
1298
  fields: {
1276
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
1299
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
1277
1300
  name: string;
1278
1301
  required: boolean;
1279
1302
  ask?: string | undefined;
@@ -1288,7 +1311,7 @@ declare const AgentDTO: z.ZodObject<{
1288
1311
  routes?: Record<string, string> | undefined;
1289
1312
  } | undefined;
1290
1313
  memory?: {
1291
- scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
1314
+ scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
1292
1315
  retentionDays?: number | undefined;
1293
1316
  piiFields?: string[] | undefined;
1294
1317
  } | undefined;
@@ -1304,8 +1327,8 @@ declare const AgentDTO: z.ZodObject<{
1304
1327
  } | undefined;
1305
1328
  } | undefined;
1306
1329
  prompts?: {
1307
- id: string;
1308
1330
  text: string;
1331
+ id: string;
1309
1332
  }[] | undefined;
1310
1333
  triggers?: {
1311
1334
  then: string;
@@ -1315,31 +1338,32 @@ declare const AgentDTO: z.ZodObject<{
1315
1338
  }[] | undefined;
1316
1339
  tools?: {
1317
1340
  name: string;
1318
- url: string;
1319
1341
  description: string;
1320
1342
  input: Record<string, "string" | "number" | "boolean">;
1343
+ url: string;
1321
1344
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1322
1345
  auth: "none" | "connection";
1323
- allowPrivateNetwork?: boolean | undefined;
1324
1346
  headers?: Record<string, string> | undefined;
1325
1347
  connectionRef?: string | undefined;
1348
+ allowPrivateNetwork?: boolean | undefined;
1349
+ sendRealValues?: boolean | undefined;
1326
1350
  }[] | undefined;
1327
1351
  displayName?: string | undefined;
1328
1352
  program?: {
1329
- v: 1;
1330
1353
  id: string;
1331
- entry: string[];
1332
1354
  nodes: Record<string, {
1333
- type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1355
+ type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1334
1356
  id: string;
1335
1357
  config: Record<string, unknown>;
1336
1358
  out: {
1337
1359
  to: string;
1338
- condition?: string | undefined;
1339
1360
  sourceHandle?: string | undefined;
1340
1361
  label?: string | undefined;
1362
+ condition?: string | undefined;
1341
1363
  }[];
1342
1364
  }>;
1365
+ v: 1;
1366
+ entry: string[];
1343
1367
  completionGate: {
1344
1368
  requiredFields: string[];
1345
1369
  };
@@ -1357,8 +1381,8 @@ declare const AgentDTO: z.ZodObject<{
1357
1381
  }, "strip", z.ZodTypeAny, {
1358
1382
  status: "online" | "offline" | "degraded";
1359
1383
  id: string;
1360
- name: string;
1361
1384
  projectId: string;
1385
+ name: string;
1362
1386
  createdAt: string;
1363
1387
  updatedAt: string;
1364
1388
  version: string;
@@ -1383,7 +1407,7 @@ declare const AgentDTO: z.ZodObject<{
1383
1407
  } | undefined;
1384
1408
  };
1385
1409
  fields: {
1386
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
1410
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
1387
1411
  name: string;
1388
1412
  required: boolean;
1389
1413
  ask?: string | undefined;
@@ -1398,7 +1422,7 @@ declare const AgentDTO: z.ZodObject<{
1398
1422
  routes?: Record<string, string> | undefined;
1399
1423
  } | undefined;
1400
1424
  memory?: {
1401
- scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
1425
+ scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
1402
1426
  retentionDays?: number | undefined;
1403
1427
  piiFields?: string[] | undefined;
1404
1428
  } | undefined;
@@ -1414,8 +1438,8 @@ declare const AgentDTO: z.ZodObject<{
1414
1438
  } | undefined;
1415
1439
  } | undefined;
1416
1440
  prompts?: {
1417
- id: string;
1418
1441
  text: string;
1442
+ id: string;
1419
1443
  }[] | undefined;
1420
1444
  triggers?: {
1421
1445
  then: string;
@@ -1425,31 +1449,32 @@ declare const AgentDTO: z.ZodObject<{
1425
1449
  }[] | undefined;
1426
1450
  tools?: {
1427
1451
  name: string;
1428
- url: string;
1429
1452
  description: string;
1430
1453
  input: Record<string, "string" | "number" | "boolean">;
1454
+ url: string;
1431
1455
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1432
1456
  auth: "none" | "connection";
1433
- allowPrivateNetwork?: boolean | undefined;
1434
1457
  headers?: Record<string, string> | undefined;
1435
1458
  connectionRef?: string | undefined;
1459
+ allowPrivateNetwork?: boolean | undefined;
1460
+ sendRealValues?: boolean | undefined;
1436
1461
  }[] | undefined;
1437
1462
  displayName?: string | undefined;
1438
1463
  program?: {
1439
- v: 1;
1440
1464
  id: string;
1441
- entry: string[];
1442
1465
  nodes: Record<string, {
1443
- type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1466
+ type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1444
1467
  id: string;
1445
1468
  config: Record<string, unknown>;
1446
1469
  out: {
1447
1470
  to: string;
1448
- condition?: string | undefined;
1449
1471
  sourceHandle?: string | undefined;
1450
1472
  label?: string | undefined;
1473
+ condition?: string | undefined;
1451
1474
  }[];
1452
1475
  }>;
1476
+ v: 1;
1477
+ entry: string[];
1453
1478
  completionGate: {
1454
1479
  requiredFields: string[];
1455
1480
  };
@@ -1465,8 +1490,8 @@ declare const AgentDTO: z.ZodObject<{
1465
1490
  }, {
1466
1491
  status: "online" | "offline" | "degraded";
1467
1492
  id: string;
1468
- name: string;
1469
1493
  projectId: string;
1494
+ name: string;
1470
1495
  createdAt: string;
1471
1496
  updatedAt: string;
1472
1497
  version: string;
@@ -1491,7 +1516,7 @@ declare const AgentDTO: z.ZodObject<{
1491
1516
  } | undefined;
1492
1517
  };
1493
1518
  fields: {
1494
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
1519
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
1495
1520
  name: string;
1496
1521
  required: boolean;
1497
1522
  ask?: string | undefined;
@@ -1506,7 +1531,7 @@ declare const AgentDTO: z.ZodObject<{
1506
1531
  routes?: Record<string, string> | undefined;
1507
1532
  } | undefined;
1508
1533
  memory?: {
1509
- scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
1534
+ scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
1510
1535
  retentionDays?: number | undefined;
1511
1536
  piiFields?: string[] | undefined;
1512
1537
  } | undefined;
@@ -1522,8 +1547,8 @@ declare const AgentDTO: z.ZodObject<{
1522
1547
  } | undefined;
1523
1548
  } | undefined;
1524
1549
  prompts?: {
1525
- id: string;
1526
1550
  text: string;
1551
+ id: string;
1527
1552
  }[] | undefined;
1528
1553
  triggers?: {
1529
1554
  then: string;
@@ -1533,31 +1558,32 @@ declare const AgentDTO: z.ZodObject<{
1533
1558
  }[] | undefined;
1534
1559
  tools?: {
1535
1560
  name: string;
1536
- url: string;
1537
1561
  description: string;
1538
1562
  input: Record<string, "string" | "number" | "boolean">;
1563
+ url: string;
1539
1564
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1540
1565
  auth: "none" | "connection";
1541
- allowPrivateNetwork?: boolean | undefined;
1542
1566
  headers?: Record<string, string> | undefined;
1543
1567
  connectionRef?: string | undefined;
1568
+ allowPrivateNetwork?: boolean | undefined;
1569
+ sendRealValues?: boolean | undefined;
1544
1570
  }[] | undefined;
1545
1571
  displayName?: string | undefined;
1546
1572
  program?: {
1547
- v: 1;
1548
1573
  id: string;
1549
- entry: string[];
1550
1574
  nodes: Record<string, {
1551
- type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1575
+ type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1552
1576
  id: string;
1553
1577
  config: Record<string, unknown>;
1554
1578
  out: {
1555
1579
  to: string;
1556
- condition?: string | undefined;
1557
1580
  sourceHandle?: string | undefined;
1558
1581
  label?: string | undefined;
1582
+ condition?: string | undefined;
1559
1583
  }[];
1560
1584
  }>;
1585
+ v: 1;
1586
+ entry: string[];
1561
1587
  completionGate: {
1562
1588
  requiredFields: string[];
1563
1589
  };
@@ -1630,7 +1656,7 @@ declare const FlowProgram: z.ZodObject<{
1630
1656
  entry: z.ZodArray<z.ZodString, "many">;
1631
1657
  nodes: z.ZodRecord<z.ZodString, z.ZodObject<{
1632
1658
  id: z.ZodString;
1633
- type: z.ZodEnum<["start", "say", "ask", "confirm", "tool", "decision", "handoff", "end", "trigger", "gate", "playbook", "menu", "code", "set", "subflow", "llm", "rag", "memory", "speech", "classify", "router", "note"]>;
1659
+ type: z.ZodEnum<["start", "say", "ask", "confirm", "tool", "email", "decision", "handoff", "end", "trigger", "gate", "playbook", "menu", "code", "set", "subflow", "llm", "rag", "memory", "speech", "classify", "router", "note"]>;
1634
1660
  config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1635
1661
  out: z.ZodArray<z.ZodObject<{
1636
1662
  to: z.ZodString;
@@ -1639,34 +1665,34 @@ declare const FlowProgram: z.ZodObject<{
1639
1665
  label: z.ZodOptional<z.ZodString>;
1640
1666
  }, "strip", z.ZodTypeAny, {
1641
1667
  to: string;
1642
- condition?: string | undefined;
1643
1668
  sourceHandle?: string | undefined;
1644
1669
  label?: string | undefined;
1670
+ condition?: string | undefined;
1645
1671
  }, {
1646
1672
  to: string;
1647
- condition?: string | undefined;
1648
1673
  sourceHandle?: string | undefined;
1649
1674
  label?: string | undefined;
1675
+ condition?: string | undefined;
1650
1676
  }>, "many">;
1651
1677
  }, "strip", z.ZodTypeAny, {
1652
- type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1678
+ type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1653
1679
  id: string;
1654
1680
  config: Record<string, unknown>;
1655
1681
  out: {
1656
1682
  to: string;
1657
- condition?: string | undefined;
1658
1683
  sourceHandle?: string | undefined;
1659
1684
  label?: string | undefined;
1685
+ condition?: string | undefined;
1660
1686
  }[];
1661
1687
  }, {
1662
- type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1688
+ type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1663
1689
  id: string;
1664
1690
  config: Record<string, unknown>;
1665
1691
  out: {
1666
1692
  to: string;
1667
- condition?: string | undefined;
1668
1693
  sourceHandle?: string | undefined;
1669
1694
  label?: string | undefined;
1695
+ condition?: string | undefined;
1670
1696
  }[];
1671
1697
  }>>;
1672
1698
  completionGate: z.ZodObject<{
@@ -1693,20 +1719,20 @@ declare const FlowProgram: z.ZodObject<{
1693
1719
  labelOnlyEdges?: string[] | undefined;
1694
1720
  }>>;
1695
1721
  }, "strip", z.ZodTypeAny, {
1696
- v: 1;
1697
1722
  id: string;
1698
- entry: string[];
1699
1723
  nodes: Record<string, {
1700
- type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1724
+ type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1701
1725
  id: string;
1702
1726
  config: Record<string, unknown>;
1703
1727
  out: {
1704
1728
  to: string;
1705
- condition?: string | undefined;
1706
1729
  sourceHandle?: string | undefined;
1707
1730
  label?: string | undefined;
1731
+ condition?: string | undefined;
1708
1732
  }[];
1709
1733
  }>;
1734
+ v: 1;
1735
+ entry: string[];
1710
1736
  completionGate: {
1711
1737
  requiredFields: string[];
1712
1738
  };
@@ -1717,20 +1743,20 @@ declare const FlowProgram: z.ZodObject<{
1717
1743
  labelOnlyEdges?: string[] | undefined;
1718
1744
  } | undefined;
1719
1745
  }, {
1720
- v: 1;
1721
1746
  id: string;
1722
- entry: string[];
1723
1747
  nodes: Record<string, {
1724
- type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1748
+ type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1725
1749
  id: string;
1726
1750
  config: Record<string, unknown>;
1727
1751
  out: {
1728
1752
  to: string;
1729
- condition?: string | undefined;
1730
1753
  sourceHandle?: string | undefined;
1731
1754
  label?: string | undefined;
1755
+ condition?: string | undefined;
1732
1756
  }[];
1733
1757
  }>;
1758
+ v: 1;
1759
+ entry: string[];
1734
1760
  completionGate: {
1735
1761
  requiredFields: string[];
1736
1762
  };
@@ -2154,6 +2180,18 @@ interface AgentEventEmitter {
2154
2180
  emit(event: AgentLifecycleEvent): void;
2155
2181
  }
2156
2182
 
2183
+ /** Where a tool's arguments go — what decides whether it gets the caller's real values or the call's tokens. */
2184
+ interface ToolDestination {
2185
+ /** `code`: the agent's own code, in its own worker. `http`: a request to `host`. */
2186
+ readonly kind: 'code' | 'http';
2187
+ /** The host the request goes to when its URL fixes it; null when a placeholder picks it. Audited; never a value. */
2188
+ readonly host?: string | null;
2189
+ /** It signs in with a vault connection. */
2190
+ readonly connection?: boolean;
2191
+ /** Explicit: true — real values (an HTTP tool: only to a host its URL fixes); false — the tokens, whatever else holds. */
2192
+ readonly sendRealValues?: boolean;
2193
+ }
2194
+
2157
2195
  /** Primitive field types accepted in a process definition. */
2158
2196
  type ProcessFieldType = 'string' | 'string[]' | 'number' | 'boolean' | 'datetime' | 'email' | 'phone';
2159
2197
  interface ProcessField {
@@ -2300,6 +2338,11 @@ interface ConnectorInstance<TName extends string = string, TApi = unknown> {
2300
2338
  readonly api: TApi;
2301
2339
  /** If true, every method on `api` becomes an LLM-callable tool. */
2302
2340
  readonly expose?: boolean;
2341
+ /**
2342
+ * Its exposed tools get the caller's real values in place of the call's PII tokens (`<PII_PHONE_1>`) — a connector
2343
+ * is your code. `false` keeps the tokens. (burn-down G-33 — test/tool-detokenise.test.ts)
2344
+ */
2345
+ readonly sendRealValues?: boolean;
2303
2346
  }
2304
2347
  type ComplianceTag = 'tcpa' | 'hipaa' | 'pci' | 'gdpr' | 'soc2';
2305
2348
  /**
@@ -2525,10 +2568,16 @@ interface EndCallPolicy {
2525
2568
  }
2526
2569
  type ShorthandPrimitive = 'string' | 'number' | 'boolean';
2527
2570
  type ToolInputShape = Record<string, ShorthandPrimitive> | z.ZodTypeAny;
2571
+ /** What the runtime tells a tool about the input it hands it (burn-down G-33). */
2572
+ interface ToolRunInfo {
2573
+ /** The call's PII tokens in the input were swapped for the caller's real values: a request built from it is
2574
+ * sensitive — never let a redirect carry it to another origin (`httpTool` refuses one). */
2575
+ readonly carriesRealValues: boolean;
2576
+ }
2528
2577
  interface ToolDefinition<I = unknown, R = unknown> {
2529
2578
  readonly description: string;
2530
2579
  readonly input: ToolInputShape;
2531
- readonly run: (input: I, ctx: AgentContext) => Promise<R> | R;
2580
+ readonly run: (input: I, ctx: AgentContext, info?: ToolRunInfo) => Promise<R> | R;
2532
2581
  /**
2533
2582
  * Capability this tool requires. Action Guard hard-blocks the call if not
2534
2583
  * declared (PRD §B.5 — "no soft failures, ever"). Defaults to
@@ -2537,6 +2586,19 @@ interface ToolDefinition<I = unknown, R = unknown> {
2537
2586
  * for centralised policy.
2538
2587
  */
2539
2588
  readonly capability?: string;
2589
+ /**
2590
+ * The model reads the caller's PII as tokens (`<PII_PHONE_1>`); the platform swaps them back for the real values in a
2591
+ * tool's arguments right before it runs, only where the destination is trusted (burn-down G-33). A code tool — this
2592
+ * one, run in your worker — gets the real values by default; `false` keeps the tokens. An HTTP tool gets tokens
2593
+ * unless it signs in with a vault connection or is `true` — and `true` counts only when its URL fixes the host.
2594
+ * (test/tool-detokenise.test.ts)
2595
+ */
2596
+ readonly sendRealValues?: boolean;
2597
+ /**
2598
+ * Where the arguments go, for the trust rule above — set by the SDK's own builders (`httpTool`, dashboard registry
2599
+ * tools, a flow's tools). Unset: the tool is your code.
2600
+ */
2601
+ readonly destination?: ToolDestination;
2540
2602
  }
2541
2603
  /**
2542
2604
  * Optional security adapters. The SDK always enforces the local-only synchronous
@@ -2792,6 +2854,8 @@ interface AgentToolSpec {
2792
2854
  readonly name: string;
2793
2855
  readonly description: string;
2794
2856
  readonly input: Record<string, 'string' | 'number' | 'boolean'>;
2857
+ /** Where its arguments go — for the tool boundary's trust rule (burn-down G-33); never shown to the model. */
2858
+ readonly destination?: ToolDestination;
2795
2859
  }
2796
2860
  interface AgentToolCall {
2797
2861
  readonly name: string;
@@ -2895,11 +2959,34 @@ type ToolExecutor = (req: {
2895
2959
  readonly input?: Record<string, unknown>;
2896
2960
  readonly auth?: 'connection';
2897
2961
  readonly connectionRef?: string;
2962
+ /** The input holds the caller's real values (G-33): the executor refuses a redirect to another origin. */
2963
+ readonly carriesRealValues?: boolean;
2898
2964
  }) => Promise<{
2899
2965
  readonly ok: boolean;
2900
2966
  readonly status: number;
2901
2967
  readonly data: unknown;
2902
2968
  }>;
2969
+ /** Send an email step's email through the workspace's email (burn-down G-22): From checked against the workspace's
2970
+ * verified sending domains, wallet-admitted, metered. Never a send from the worker itself — on voice it is
2971
+ * POST /v1/email/send under the call's own project identity; on text, the API's in-process funnel. */
2972
+ type EmailResolver = (req: {
2973
+ readonly to: string;
2974
+ readonly subject: string;
2975
+ readonly text: string;
2976
+ readonly from?: string;
2977
+ readonly fromName?: string;
2978
+ readonly replyTo?: string;
2979
+ }, opts?: {
2980
+ /** Aborted when the step stops waiting (its timeout): the request is cancelled, not left running. */
2981
+ readonly signal?: AbortSignal;
2982
+ }) => Promise<{
2983
+ readonly ok: true;
2984
+ readonly emailId: string;
2985
+ } | {
2986
+ readonly ok: false;
2987
+ readonly error: string;
2988
+ readonly detail?: string;
2989
+ }>;
2903
2990
  /** Evaluate a sandboxed code/expression node (server-side; never on the call path). */
2904
2991
  type CodeResolver = (src: {
2905
2992
  readonly expression: string;
@@ -2943,7 +3030,11 @@ type PlaybookResolver = (name: string) => Promise<{
2943
3030
  * the server-side endpoint, so the URL/credential never reach this worker. */
2944
3031
  interface RegistryToolsResolver {
2945
3032
  catalog(): Promise<ReadonlyArray<AgentToolSpec>>;
2946
- run(name: string, args: Record<string, unknown>): Promise<{
3033
+ run(name: string, args: Record<string, unknown>,
3034
+ /** carriesRealValues: the args hold the caller's real values (G-33) — the server refuses a cross-origin redirect. */
3035
+ opts?: {
3036
+ readonly carriesRealValues?: boolean;
3037
+ }): Promise<{
2947
3038
  ok: boolean;
2948
3039
  status: number;
2949
3040
  data: unknown;
@@ -2953,6 +3044,13 @@ interface RegistryToolsResolver {
2953
3044
  * interpreter can run inline. null when the referenced flow isn't found / unpublished
2954
3045
  * (the subflow executor then degrades to a recorded no-op and advances). */
2955
3046
  type FlowResolver = (ref: string) => Promise<FlowProgram | null>;
3047
+ /** The tool boundary's rule for a graph tool step's inputs (G-33, #18): `params` as `destination` may receive them, and
3048
+ * whether they carry the caller's real values (the request then refuses a redirect to another origin). */
3049
+ type ToolInputsPolicy = (params: Record<string, unknown>, destination: ToolDestination) => {
3050
+ readonly params: Record<string, unknown>;
3051
+ readonly carriesRealValues: boolean;
3052
+ readonly trusted: boolean;
3053
+ };
2956
3054
  /** Side-effect surface injected once by runFlowProgram. Every member is optional;
2957
3055
  * a missing resolver makes its executor degrade to a recorded no-op (never throws,
2958
3056
  * never blocks the call). Kept off AgentContext so the contract stays small and
@@ -2963,6 +3061,8 @@ interface GraphResolvers {
2963
3061
  /** Server-side SSRF-guarded HTTP tool executor (tool node). When present the
2964
3062
  * tool executor routes through it instead of fetching locally. */
2965
3063
  readonly toolExecutor?: ToolExecutor;
3064
+ /** The workspace's email (email node). Absent → the step takes Couldn't send. */
3065
+ readonly email?: EmailResolver;
2966
3066
  readonly code?: CodeResolver;
2967
3067
  readonly classify?: ClassifyResolver;
2968
3068
  readonly playbooks?: PlaybookResolver;
@@ -2971,8 +3071,22 @@ interface GraphResolvers {
2971
3071
  readonly agentRunner?: AgentRunner;
2972
3072
  /** Name-referenced project tool registry (catalog + server-side execute). */
2973
3073
  readonly registryTools?: RegistryToolsResolver;
3074
+ /** The tool boundary's rule for a graph tool step's inputs where the run has no SecurityPrimitive of its own (a flow
3075
+ * over text in the API — one destination, one treatment, on every surface: #18). A call's own guard wins. */
3076
+ readonly toolInputs?: ToolInputsPolicy;
3077
+ /** What the caller said, fed by the text driver on every caller message — the boundary tokenises for an untrusted
3078
+ * tool only values the caller said (`SecurityPrimitive.noteCallerText`, G-33 final review). */
3079
+ readonly noteCallerText?: (text: string) => void;
2974
3080
  }
2975
3081
 
3082
+ /**
3083
+ * One conversation's Email-step sends, never sent twice (burn-down G-22): an exact repeat (same recipient, subject and
3084
+ * body — a caller looping the flow, or a retry edge after a timeout) gets the first send's result, or waits for it
3085
+ * while it's in flight. A send whose outcome is unknown (timed out) stays recorded; only a refusal that sent nothing
3086
+ * lets the same email be tried again. Build one per conversation. How MANY a conversation may send (3) is the API's
3087
+ * cap, kept in Valkey by the conversation id, so it survives a worker restart.
3088
+ */
3089
+ declare function dedupeConversationEmails(resolver: EmailResolver): EmailResolver;
2976
3090
  /** A library playbook as GET /v1/playbooks (and the API's PlaybooksService) lists it — the fields a flow reads. */
2977
3091
  interface PlaybookLibraryEntry {
2978
3092
  readonly name: string;
@@ -3130,4 +3244,4 @@ type RunLiveTextOptions = Omit<RunTextSessionOptions, 'onAgentText' | 'onAwaitIn
3130
3244
  * interpreter blocks for the next message, or the flow ends. */
3131
3245
  declare function runLiveTextConversation(opts: RunLiveTextOptions): LiveTextConversation;
3132
3246
 
3133
- export { NON_BUSY_STATES as $, AgentEnvironment as A, type DtmfHandler as B, type ConnectorInstance as C, type DtmfEvent as D, type EndCallControllerHandle as E, type EndCallInfo as F, type EndCallOutcome as G, type HandoffConfig as H, type EndCallPolicy as I, type EndCallTrigger as J, type EndpointingConfig as K, type LLMProvider as L, type ModelConfig as M, type FakeSessionAdapter as N, type FloorControlConfig as O, ProcessSchemaDTO as P, type InboundOptions as Q, type ReadinessProbe as R, type STTProvider as S, type TTSProvider as T, type InferProcessData as U, type VADProvider as V, type InterruptionConfig as W, LK_AGENT_STATE_MAP as X, type MemoryHandle as Y, type MemoryScope as Z, type MetricsEvent as _, type AgentLifecycleEvent as a, urlProbe as a$, type Participant as a0, ParticipantId as a1, type ParticipantKind as a2, type ParticipantSet as a3, type ParticipantsConfig as a4, type ProcessBackendAck as a5, type ProcessFieldType as a6, type ProcessSnapshot as a7, type ReadinessReport as a8, type ReadinessResult as a9, type TriggerAction as aA, type TriggerCondition as aB, type TtsVoiceConfig as aC, type TurnEvent as aD, type Unsubscribe as aE, type UserInputEvent as aF, type UserStateEvent as aG, type UserTurn as aH, VoiceLayerAuthError as aI, VoiceLayerError as aJ, VoiceLayerHttpError as aK, VoiceLayerNetworkError as aL, VoiceLayerValidationError as aM, applySpeechTurnHandling as aN, asyncProbe as aO, defineProcess as aP, dtmfCodeToDigit as aQ, dtmfDigitToCode as aR, duck as aS, envProbe as aT, mute as aU, normalizeState as aV, passthrough as aW, runProbes as aX, runTextSession as aY, runTextTranscript as aZ, transform as a_, type RespondOptions as aa, type Room as ab, type RouteEntry as ac, type RoutingRule as ad, type RoutingSnapshot as ae, type RunTextSessionOptions as af, type RunTextTranscriptOptions as ag, type SayOptions as ah, type SecurityConfig as ai, type SendDtmfOptions as aj, type SessionAdapter as ak, type SessionCapabilities as al, type SessionErrorEvent as am, type SessionEvent as an, type SessionEventMap as ao, type SessionFactory as ap, type SessionFactoryInput as aq, type SessionOutbound as ar, type SessionState as as, type ShorthandPrimitive as at, type SpeechResult as au, type SpeechTarget as av, type StateChangeEvent as aw, type TextSession as ax, type TextTranscriptResult as ay, type ToolInputShape as az, AgentDTO as b, type FlowResolver as b0, type GraphResolvers as b1, type GraphTraceEvent as b2, type KnowledgeResolver as b3, type LiveTextConversation as b4, type LiveTurnResult as b5, type PlaybookLibraryEntry as b6, type PlaybookResolver as b7, type RegistryToolsResolver as b8, type RunLiveTextOptions as b9, denyPrivateNetwork as ba, privateNetworkOptInHonoured as bb, runLiveTextConversation as bc, runWithOpenAIScope as bd, toPlaybookResolution as be, type AgentEventEmitter as c, type AgentContext as d, type AgentConfig as e, type ProcessField as f, type ProviderFactory as g, type RealtimeProvider as h, type TurnDetectorProvider as i, type ProcessDefinition as j, type TriggerDefinition as k, type MemoryConfig as l, type ToolDefinition as m, type SpeechConfig as n, type ToolExecutor as o, type HostLookup as p, type AgentEventListener as q, type AgentTurnEvent as r, type AudioProfile as s, type AudioSurface as t, type CallInfo as u, type CallOutcomeSummary as v, type ChannelKind as w, type CompletionStrategy as x, type ComplianceTag as y, ConsultationPolicy as z };
3247
+ export { type MetricsEvent as $, AgentEnvironment as A, ConsultationPolicy as B, type ConnectorInstance as C, type DtmfEvent as D, type DtmfHandler as E, type EndCallControllerHandle as F, type EndCallInfo as G, type HandoffConfig as H, type EndCallOutcome as I, type EndCallPolicy as J, type EndCallTrigger as K, type LLMProvider as L, type ModelConfig as M, type EndpointingConfig as N, type FakeSessionAdapter as O, ProcessSchemaDTO as P, type FloorControlConfig as Q, type ReadinessProbe as R, type STTProvider as S, type ToolDefinition as T, type InboundOptions as U, type VADProvider as V, type InferProcessData as W, type InterruptionConfig as X, LK_AGENT_STATE_MAP as Y, type MemoryHandle as Z, type MemoryScope as _, type AgentLifecycleEvent as a, transform as a$, NON_BUSY_STATES as a0, type Participant as a1, ParticipantId as a2, type ParticipantKind as a3, type ParticipantSet as a4, type ParticipantsConfig as a5, type ProcessBackendAck as a6, type ProcessFieldType as a7, type ProcessSnapshot as a8, type ReadinessReport as a9, type ToolInputShape as aA, type TriggerAction as aB, type TriggerCondition as aC, type TtsVoiceConfig as aD, type TurnEvent as aE, type Unsubscribe as aF, type UserInputEvent as aG, type UserStateEvent as aH, type UserTurn as aI, VoiceLayerAuthError as aJ, VoiceLayerError as aK, VoiceLayerHttpError as aL, VoiceLayerNetworkError as aM, VoiceLayerValidationError as aN, applySpeechTurnHandling as aO, asyncProbe as aP, defineProcess as aQ, dtmfCodeToDigit as aR, dtmfDigitToCode as aS, duck as aT, envProbe as aU, mute as aV, normalizeState as aW, passthrough as aX, runProbes as aY, runTextSession as aZ, runTextTranscript as a_, type ReadinessResult as aa, type RespondOptions as ab, type Room as ac, type RouteEntry as ad, type RoutingRule as ae, type RoutingSnapshot as af, type RunTextSessionOptions as ag, type RunTextTranscriptOptions as ah, type SayOptions as ai, type SecurityConfig as aj, type SendDtmfOptions as ak, type SessionAdapter as al, type SessionCapabilities as am, type SessionErrorEvent as an, type SessionEvent as ao, type SessionEventMap as ap, type SessionFactory as aq, type SessionFactoryInput as ar, type SessionOutbound as as, type SessionState as at, type ShorthandPrimitive as au, type SpeechResult as av, type SpeechTarget as aw, type StateChangeEvent as ax, type TextSession as ay, type TextTranscriptResult as az, AgentDTO as b, urlProbe as b0, type EmailResolver as b1, type FlowResolver as b2, type GraphResolvers as b3, type GraphTraceEvent as b4, type KnowledgeResolver as b5, type LiveTextConversation as b6, type LiveTurnResult as b7, type PlaybookLibraryEntry as b8, type PlaybookResolver as b9, type RegistryToolsResolver as ba, type RunLiveTextOptions as bb, dedupeConversationEmails as bc, denyPrivateNetwork as bd, privateNetworkOptInHonoured as be, runLiveTextConversation as bf, runWithOpenAIScope as bg, toPlaybookResolution as bh, type AgentEventEmitter as c, type AgentConfig as d, type ProcessField as e, type ProviderFactory as f, type TTSProvider as g, type RealtimeProvider as h, type TurnDetectorProvider as i, type ProcessDefinition as j, type TriggerDefinition as k, type MemoryConfig as l, type SpeechConfig as m, type ToolExecutor as n, type AgentContext as o, type ToolRunInfo as p, type HostLookup as q, type AgentEventListener as r, type AgentTurnEvent as s, type AudioProfile as t, type AudioSurface as u, type CallInfo as v, type CallOutcomeSummary as w, type ChannelKind as x, type CompletionStrategy as y, type ComplianceTag as z };