@voicelayer/sdk 0.5.1 → 0.6.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.
- package/dist/brain/index.d.ts +2 -2
- package/dist/brain/index.js +70 -16
- package/dist/index.d.ts +280 -277
- package/dist/index.js +7807 -6419
- package/dist/runtime/text-session.d.ts +1 -1
- package/dist/runtime/text-session.js +578 -103
- package/dist/{text-session-BbG3VG50.d.ts → text-session-C4Z59gG4.d.ts} +194 -111
- package/package.json +8 -4
|
@@ -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
|
-
text: string;
|
|
358
357
|
id: string;
|
|
359
|
-
}, {
|
|
360
358
|
text: string;
|
|
359
|
+
}, {
|
|
361
360
|
id: string;
|
|
361
|
+
text: string;
|
|
362
362
|
}>, "many">>;
|
|
363
363
|
fields: z.ZodArray<z.ZodObject<{
|
|
364
364
|
name: z.ZodString;
|
|
@@ -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?: "
|
|
457
|
+
scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
|
|
458
458
|
retentionDays?: number | undefined;
|
|
459
459
|
piiFields?: string[] | undefined;
|
|
460
460
|
}, {
|
|
461
|
-
scope?: "
|
|
461
|
+
scope?: "call" | "caller" | "participant" | "account" | "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;
|
|
489
|
+
url: string;
|
|
481
490
|
description: string;
|
|
482
491
|
input: Record<string, "string" | "number" | "boolean">;
|
|
483
|
-
url: string;
|
|
484
492
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
485
493
|
auth: "none" | "connection";
|
|
494
|
+
allowPrivateNetwork?: boolean | undefined;
|
|
486
495
|
headers?: Record<string, string> | undefined;
|
|
487
496
|
connectionRef?: string | undefined;
|
|
488
|
-
|
|
497
|
+
sendRealValues?: boolean | undefined;
|
|
489
498
|
}, {
|
|
490
499
|
name: string;
|
|
500
|
+
url: string;
|
|
491
501
|
description: string;
|
|
492
502
|
input: Record<string, "string" | "number" | "boolean">;
|
|
493
|
-
url: string;
|
|
494
503
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
495
504
|
auth: "none" | "connection";
|
|
505
|
+
allowPrivateNetwork?: boolean | undefined;
|
|
496
506
|
headers?: Record<string, string> | undefined;
|
|
497
507
|
connectionRef?: string | undefined;
|
|
498
|
-
|
|
508
|
+
sendRealValues?: boolean | undefined;
|
|
499
509
|
}>, "many">>;
|
|
500
510
|
displayName: z.ZodOptional<z.ZodString>;
|
|
501
511
|
speech: z.ZodOptional<z.ZodObject<{
|
|
@@ -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;
|
|
571
|
+
condition?: string | undefined;
|
|
561
572
|
sourceHandle?: string | undefined;
|
|
562
573
|
label?: string | undefined;
|
|
563
|
-
condition?: string | undefined;
|
|
564
574
|
}, {
|
|
565
575
|
to: string;
|
|
576
|
+
condition?: string | undefined;
|
|
566
577
|
sourceHandle?: string | undefined;
|
|
567
578
|
label?: string | undefined;
|
|
568
|
-
condition?: string | undefined;
|
|
569
579
|
}>, "many">;
|
|
570
580
|
}, "strip", z.ZodTypeAny, {
|
|
571
|
-
type: "
|
|
581
|
+
type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
|
|
572
582
|
id: string;
|
|
573
583
|
config: Record<string, unknown>;
|
|
574
584
|
out: {
|
|
575
585
|
to: string;
|
|
586
|
+
condition?: string | undefined;
|
|
576
587
|
sourceHandle?: string | undefined;
|
|
577
588
|
label?: string | undefined;
|
|
578
|
-
condition?: string | undefined;
|
|
579
589
|
}[];
|
|
580
590
|
}, {
|
|
581
|
-
type: "
|
|
591
|
+
type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
|
|
582
592
|
id: string;
|
|
583
593
|
config: Record<string, unknown>;
|
|
584
594
|
out: {
|
|
585
595
|
to: string;
|
|
596
|
+
condition?: string | undefined;
|
|
586
597
|
sourceHandle?: string | undefined;
|
|
587
598
|
label?: string | undefined;
|
|
588
|
-
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, {
|
|
625
|
+
v: 1;
|
|
615
626
|
id: string;
|
|
627
|
+
entry: string[];
|
|
616
628
|
nodes: Record<string, {
|
|
617
|
-
type: "
|
|
629
|
+
type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
|
|
618
630
|
id: string;
|
|
619
631
|
config: Record<string, unknown>;
|
|
620
632
|
out: {
|
|
621
633
|
to: string;
|
|
634
|
+
condition?: string | undefined;
|
|
622
635
|
sourceHandle?: string | undefined;
|
|
623
636
|
label?: string | undefined;
|
|
624
|
-
condition?: string | undefined;
|
|
625
637
|
}[];
|
|
626
638
|
}>;
|
|
627
|
-
v: 1;
|
|
628
|
-
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
|
}, {
|
|
649
|
+
v: 1;
|
|
639
650
|
id: string;
|
|
651
|
+
entry: string[];
|
|
640
652
|
nodes: Record<string, {
|
|
641
|
-
type: "
|
|
653
|
+
type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
|
|
642
654
|
id: string;
|
|
643
655
|
config: Record<string, unknown>;
|
|
644
656
|
out: {
|
|
645
657
|
to: string;
|
|
658
|
+
condition?: string | undefined;
|
|
646
659
|
sourceHandle?: string | undefined;
|
|
647
660
|
label?: string | undefined;
|
|
648
|
-
condition?: string | undefined;
|
|
649
661
|
}[];
|
|
650
662
|
}>;
|
|
651
|
-
v: 1;
|
|
652
|
-
entry: string[];
|
|
653
663
|
completionGate: {
|
|
654
664
|
requiredFields: string[];
|
|
655
665
|
};
|
|
@@ -686,7 +696,7 @@ declare const ProcessSchemaDTO: z.ZodObject<{
|
|
|
686
696
|
routes?: Record<string, string> | undefined;
|
|
687
697
|
} | undefined;
|
|
688
698
|
memory?: {
|
|
689
|
-
scope?: "
|
|
699
|
+
scope?: "call" | "caller" | "participant" | "account" | "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
|
-
text: string;
|
|
706
715
|
id: string;
|
|
716
|
+
text: 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;
|
|
726
|
+
url: string;
|
|
716
727
|
description: string;
|
|
717
728
|
input: Record<string, "string" | "number" | "boolean">;
|
|
718
|
-
url: string;
|
|
719
729
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
720
730
|
auth: "none" | "connection";
|
|
731
|
+
allowPrivateNetwork?: boolean | undefined;
|
|
721
732
|
headers?: Record<string, string> | undefined;
|
|
722
733
|
connectionRef?: string | undefined;
|
|
723
|
-
|
|
734
|
+
sendRealValues?: boolean | undefined;
|
|
724
735
|
}[] | undefined;
|
|
725
736
|
displayName?: string | undefined;
|
|
726
737
|
program?: {
|
|
738
|
+
v: 1;
|
|
727
739
|
id: string;
|
|
740
|
+
entry: string[];
|
|
728
741
|
nodes: Record<string, {
|
|
729
|
-
type: "
|
|
742
|
+
type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
|
|
730
743
|
id: string;
|
|
731
744
|
config: Record<string, unknown>;
|
|
732
745
|
out: {
|
|
733
746
|
to: string;
|
|
747
|
+
condition?: string | undefined;
|
|
734
748
|
sourceHandle?: string | undefined;
|
|
735
749
|
label?: string | undefined;
|
|
736
|
-
condition?: string | undefined;
|
|
737
750
|
}[];
|
|
738
751
|
}>;
|
|
739
|
-
v: 1;
|
|
740
|
-
entry: string[];
|
|
741
752
|
completionGate: {
|
|
742
753
|
requiredFields: string[];
|
|
743
754
|
};
|
|
@@ -774,7 +785,7 @@ declare const ProcessSchemaDTO: z.ZodObject<{
|
|
|
774
785
|
routes?: Record<string, string> | undefined;
|
|
775
786
|
} | undefined;
|
|
776
787
|
memory?: {
|
|
777
|
-
scope?: "
|
|
788
|
+
scope?: "call" | "caller" | "participant" | "account" | "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
|
-
text: string;
|
|
794
804
|
id: string;
|
|
805
|
+
text: 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;
|
|
815
|
+
url: string;
|
|
804
816
|
description: string;
|
|
805
817
|
input: Record<string, "string" | "number" | "boolean">;
|
|
806
|
-
url: string;
|
|
807
818
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
808
819
|
auth: "none" | "connection";
|
|
820
|
+
allowPrivateNetwork?: boolean | undefined;
|
|
809
821
|
headers?: Record<string, string> | undefined;
|
|
810
822
|
connectionRef?: string | undefined;
|
|
811
|
-
|
|
823
|
+
sendRealValues?: boolean | undefined;
|
|
812
824
|
}[] | undefined;
|
|
813
825
|
displayName?: string | undefined;
|
|
814
826
|
program?: {
|
|
827
|
+
v: 1;
|
|
815
828
|
id: string;
|
|
829
|
+
entry: string[];
|
|
816
830
|
nodes: Record<string, {
|
|
817
|
-
type: "
|
|
831
|
+
type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
|
|
818
832
|
id: string;
|
|
819
833
|
config: Record<string, unknown>;
|
|
820
834
|
out: {
|
|
821
835
|
to: string;
|
|
836
|
+
condition?: string | undefined;
|
|
822
837
|
sourceHandle?: string | undefined;
|
|
823
838
|
label?: string | undefined;
|
|
824
|
-
condition?: string | undefined;
|
|
825
839
|
}[];
|
|
826
840
|
}>;
|
|
827
|
-
v: 1;
|
|
828
|
-
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
|
-
text: string;
|
|
872
883
|
id: string;
|
|
873
|
-
}, {
|
|
874
884
|
text: string;
|
|
885
|
+
}, {
|
|
875
886
|
id: string;
|
|
887
|
+
text: string;
|
|
876
888
|
}>, "many">>;
|
|
877
889
|
fields: z.ZodArray<z.ZodObject<{
|
|
878
890
|
name: z.ZodString;
|
|
@@ -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?: "
|
|
983
|
+
scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
|
|
972
984
|
retentionDays?: number | undefined;
|
|
973
985
|
piiFields?: string[] | undefined;
|
|
974
986
|
}, {
|
|
975
|
-
scope?: "
|
|
987
|
+
scope?: "call" | "caller" | "participant" | "account" | "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;
|
|
1015
|
+
url: string;
|
|
995
1016
|
description: string;
|
|
996
1017
|
input: Record<string, "string" | "number" | "boolean">;
|
|
997
|
-
url: string;
|
|
998
1018
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
999
1019
|
auth: "none" | "connection";
|
|
1020
|
+
allowPrivateNetwork?: boolean | undefined;
|
|
1000
1021
|
headers?: Record<string, string> | undefined;
|
|
1001
1022
|
connectionRef?: string | undefined;
|
|
1002
|
-
|
|
1023
|
+
sendRealValues?: boolean | undefined;
|
|
1003
1024
|
}, {
|
|
1004
1025
|
name: string;
|
|
1026
|
+
url: string;
|
|
1005
1027
|
description: string;
|
|
1006
1028
|
input: Record<string, "string" | "number" | "boolean">;
|
|
1007
|
-
url: string;
|
|
1008
1029
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
1009
1030
|
auth: "none" | "connection";
|
|
1031
|
+
allowPrivateNetwork?: boolean | undefined;
|
|
1010
1032
|
headers?: Record<string, string> | undefined;
|
|
1011
1033
|
connectionRef?: string | undefined;
|
|
1012
|
-
|
|
1034
|
+
sendRealValues?: boolean | undefined;
|
|
1013
1035
|
}>, "many">>;
|
|
1014
1036
|
displayName: z.ZodOptional<z.ZodString>;
|
|
1015
1037
|
speech: z.ZodOptional<z.ZodObject<{
|
|
@@ -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;
|
|
1097
|
+
condition?: string | undefined;
|
|
1075
1098
|
sourceHandle?: string | undefined;
|
|
1076
1099
|
label?: string | undefined;
|
|
1077
|
-
condition?: string | undefined;
|
|
1078
1100
|
}, {
|
|
1079
1101
|
to: string;
|
|
1102
|
+
condition?: string | undefined;
|
|
1080
1103
|
sourceHandle?: string | undefined;
|
|
1081
1104
|
label?: string | undefined;
|
|
1082
|
-
condition?: string | undefined;
|
|
1083
1105
|
}>, "many">;
|
|
1084
1106
|
}, "strip", z.ZodTypeAny, {
|
|
1085
|
-
type: "
|
|
1107
|
+
type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
|
|
1086
1108
|
id: string;
|
|
1087
1109
|
config: Record<string, unknown>;
|
|
1088
1110
|
out: {
|
|
1089
1111
|
to: string;
|
|
1112
|
+
condition?: string | undefined;
|
|
1090
1113
|
sourceHandle?: string | undefined;
|
|
1091
1114
|
label?: string | undefined;
|
|
1092
|
-
condition?: string | undefined;
|
|
1093
1115
|
}[];
|
|
1094
1116
|
}, {
|
|
1095
|
-
type: "
|
|
1117
|
+
type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
|
|
1096
1118
|
id: string;
|
|
1097
1119
|
config: Record<string, unknown>;
|
|
1098
1120
|
out: {
|
|
1099
1121
|
to: string;
|
|
1122
|
+
condition?: string | undefined;
|
|
1100
1123
|
sourceHandle?: string | undefined;
|
|
1101
1124
|
label?: string | undefined;
|
|
1102
|
-
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, {
|
|
1151
|
+
v: 1;
|
|
1129
1152
|
id: string;
|
|
1153
|
+
entry: string[];
|
|
1130
1154
|
nodes: Record<string, {
|
|
1131
|
-
type: "
|
|
1155
|
+
type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
|
|
1132
1156
|
id: string;
|
|
1133
1157
|
config: Record<string, unknown>;
|
|
1134
1158
|
out: {
|
|
1135
1159
|
to: string;
|
|
1160
|
+
condition?: string | undefined;
|
|
1136
1161
|
sourceHandle?: string | undefined;
|
|
1137
1162
|
label?: string | undefined;
|
|
1138
|
-
condition?: string | undefined;
|
|
1139
1163
|
}[];
|
|
1140
1164
|
}>;
|
|
1141
|
-
v: 1;
|
|
1142
|
-
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
|
}, {
|
|
1175
|
+
v: 1;
|
|
1153
1176
|
id: string;
|
|
1177
|
+
entry: string[];
|
|
1154
1178
|
nodes: Record<string, {
|
|
1155
|
-
type: "
|
|
1179
|
+
type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
|
|
1156
1180
|
id: string;
|
|
1157
1181
|
config: Record<string, unknown>;
|
|
1158
1182
|
out: {
|
|
1159
1183
|
to: string;
|
|
1184
|
+
condition?: string | undefined;
|
|
1160
1185
|
sourceHandle?: string | undefined;
|
|
1161
1186
|
label?: string | undefined;
|
|
1162
|
-
condition?: string | undefined;
|
|
1163
1187
|
}[];
|
|
1164
1188
|
}>;
|
|
1165
|
-
v: 1;
|
|
1166
|
-
entry: string[];
|
|
1167
1189
|
completionGate: {
|
|
1168
1190
|
requiredFields: string[];
|
|
1169
1191
|
};
|
|
@@ -1200,7 +1222,7 @@ declare const AgentDTO: z.ZodObject<{
|
|
|
1200
1222
|
routes?: Record<string, string> | undefined;
|
|
1201
1223
|
} | undefined;
|
|
1202
1224
|
memory?: {
|
|
1203
|
-
scope?: "
|
|
1225
|
+
scope?: "call" | "caller" | "participant" | "account" | "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
|
-
text: string;
|
|
1220
1241
|
id: string;
|
|
1242
|
+
text: 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;
|
|
1252
|
+
url: string;
|
|
1230
1253
|
description: string;
|
|
1231
1254
|
input: Record<string, "string" | "number" | "boolean">;
|
|
1232
|
-
url: string;
|
|
1233
1255
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
1234
1256
|
auth: "none" | "connection";
|
|
1257
|
+
allowPrivateNetwork?: boolean | undefined;
|
|
1235
1258
|
headers?: Record<string, string> | undefined;
|
|
1236
1259
|
connectionRef?: string | undefined;
|
|
1237
|
-
|
|
1260
|
+
sendRealValues?: boolean | undefined;
|
|
1238
1261
|
}[] | undefined;
|
|
1239
1262
|
displayName?: string | undefined;
|
|
1240
1263
|
program?: {
|
|
1264
|
+
v: 1;
|
|
1241
1265
|
id: string;
|
|
1266
|
+
entry: string[];
|
|
1242
1267
|
nodes: Record<string, {
|
|
1243
|
-
type: "
|
|
1268
|
+
type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
|
|
1244
1269
|
id: string;
|
|
1245
1270
|
config: Record<string, unknown>;
|
|
1246
1271
|
out: {
|
|
1247
1272
|
to: string;
|
|
1273
|
+
condition?: string | undefined;
|
|
1248
1274
|
sourceHandle?: string | undefined;
|
|
1249
1275
|
label?: string | undefined;
|
|
1250
|
-
condition?: string | undefined;
|
|
1251
1276
|
}[];
|
|
1252
1277
|
}>;
|
|
1253
|
-
v: 1;
|
|
1254
|
-
entry: string[];
|
|
1255
1278
|
completionGate: {
|
|
1256
1279
|
requiredFields: string[];
|
|
1257
1280
|
};
|
|
@@ -1288,7 +1311,7 @@ declare const AgentDTO: z.ZodObject<{
|
|
|
1288
1311
|
routes?: Record<string, string> | undefined;
|
|
1289
1312
|
} | undefined;
|
|
1290
1313
|
memory?: {
|
|
1291
|
-
scope?: "
|
|
1314
|
+
scope?: "call" | "caller" | "participant" | "account" | "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
|
-
text: string;
|
|
1308
1330
|
id: string;
|
|
1331
|
+
text: 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;
|
|
1341
|
+
url: string;
|
|
1318
1342
|
description: string;
|
|
1319
1343
|
input: Record<string, "string" | "number" | "boolean">;
|
|
1320
|
-
url: string;
|
|
1321
1344
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
1322
1345
|
auth: "none" | "connection";
|
|
1346
|
+
allowPrivateNetwork?: boolean | undefined;
|
|
1323
1347
|
headers?: Record<string, string> | undefined;
|
|
1324
1348
|
connectionRef?: string | undefined;
|
|
1325
|
-
|
|
1349
|
+
sendRealValues?: boolean | undefined;
|
|
1326
1350
|
}[] | undefined;
|
|
1327
1351
|
displayName?: string | undefined;
|
|
1328
1352
|
program?: {
|
|
1353
|
+
v: 1;
|
|
1329
1354
|
id: string;
|
|
1355
|
+
entry: string[];
|
|
1330
1356
|
nodes: Record<string, {
|
|
1331
|
-
type: "
|
|
1357
|
+
type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
|
|
1332
1358
|
id: string;
|
|
1333
1359
|
config: Record<string, unknown>;
|
|
1334
1360
|
out: {
|
|
1335
1361
|
to: string;
|
|
1362
|
+
condition?: string | undefined;
|
|
1336
1363
|
sourceHandle?: string | undefined;
|
|
1337
1364
|
label?: string | undefined;
|
|
1338
|
-
condition?: string | undefined;
|
|
1339
1365
|
}[];
|
|
1340
1366
|
}>;
|
|
1341
|
-
v: 1;
|
|
1342
|
-
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
|
-
projectId: string;
|
|
1361
1384
|
name: string;
|
|
1385
|
+
projectId: string;
|
|
1362
1386
|
createdAt: string;
|
|
1363
1387
|
updatedAt: string;
|
|
1364
1388
|
version: string;
|
|
@@ -1398,7 +1422,7 @@ declare const AgentDTO: z.ZodObject<{
|
|
|
1398
1422
|
routes?: Record<string, string> | undefined;
|
|
1399
1423
|
} | undefined;
|
|
1400
1424
|
memory?: {
|
|
1401
|
-
scope?: "
|
|
1425
|
+
scope?: "call" | "caller" | "participant" | "account" | "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
|
-
text: string;
|
|
1418
1441
|
id: string;
|
|
1442
|
+
text: 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;
|
|
1452
|
+
url: string;
|
|
1428
1453
|
description: string;
|
|
1429
1454
|
input: Record<string, "string" | "number" | "boolean">;
|
|
1430
|
-
url: string;
|
|
1431
1455
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
1432
1456
|
auth: "none" | "connection";
|
|
1457
|
+
allowPrivateNetwork?: boolean | undefined;
|
|
1433
1458
|
headers?: Record<string, string> | undefined;
|
|
1434
1459
|
connectionRef?: string | undefined;
|
|
1435
|
-
|
|
1460
|
+
sendRealValues?: boolean | undefined;
|
|
1436
1461
|
}[] | undefined;
|
|
1437
1462
|
displayName?: string | undefined;
|
|
1438
1463
|
program?: {
|
|
1464
|
+
v: 1;
|
|
1439
1465
|
id: string;
|
|
1466
|
+
entry: string[];
|
|
1440
1467
|
nodes: Record<string, {
|
|
1441
|
-
type: "
|
|
1468
|
+
type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
|
|
1442
1469
|
id: string;
|
|
1443
1470
|
config: Record<string, unknown>;
|
|
1444
1471
|
out: {
|
|
1445
1472
|
to: string;
|
|
1473
|
+
condition?: string | undefined;
|
|
1446
1474
|
sourceHandle?: string | undefined;
|
|
1447
1475
|
label?: string | undefined;
|
|
1448
|
-
condition?: string | undefined;
|
|
1449
1476
|
}[];
|
|
1450
1477
|
}>;
|
|
1451
|
-
v: 1;
|
|
1452
|
-
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
|
-
projectId: string;
|
|
1469
1493
|
name: string;
|
|
1494
|
+
projectId: string;
|
|
1470
1495
|
createdAt: string;
|
|
1471
1496
|
updatedAt: string;
|
|
1472
1497
|
version: string;
|
|
@@ -1506,7 +1531,7 @@ declare const AgentDTO: z.ZodObject<{
|
|
|
1506
1531
|
routes?: Record<string, string> | undefined;
|
|
1507
1532
|
} | undefined;
|
|
1508
1533
|
memory?: {
|
|
1509
|
-
scope?: "
|
|
1534
|
+
scope?: "call" | "caller" | "participant" | "account" | "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
|
-
text: string;
|
|
1526
1550
|
id: string;
|
|
1551
|
+
text: 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;
|
|
1561
|
+
url: string;
|
|
1536
1562
|
description: string;
|
|
1537
1563
|
input: Record<string, "string" | "number" | "boolean">;
|
|
1538
|
-
url: string;
|
|
1539
1564
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
1540
1565
|
auth: "none" | "connection";
|
|
1566
|
+
allowPrivateNetwork?: boolean | undefined;
|
|
1541
1567
|
headers?: Record<string, string> | undefined;
|
|
1542
1568
|
connectionRef?: string | undefined;
|
|
1543
|
-
|
|
1569
|
+
sendRealValues?: boolean | undefined;
|
|
1544
1570
|
}[] | undefined;
|
|
1545
1571
|
displayName?: string | undefined;
|
|
1546
1572
|
program?: {
|
|
1573
|
+
v: 1;
|
|
1547
1574
|
id: string;
|
|
1575
|
+
entry: string[];
|
|
1548
1576
|
nodes: Record<string, {
|
|
1549
|
-
type: "
|
|
1577
|
+
type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
|
|
1550
1578
|
id: string;
|
|
1551
1579
|
config: Record<string, unknown>;
|
|
1552
1580
|
out: {
|
|
1553
1581
|
to: string;
|
|
1582
|
+
condition?: string | undefined;
|
|
1554
1583
|
sourceHandle?: string | undefined;
|
|
1555
1584
|
label?: string | undefined;
|
|
1556
|
-
condition?: string | undefined;
|
|
1557
1585
|
}[];
|
|
1558
1586
|
}>;
|
|
1559
|
-
v: 1;
|
|
1560
|
-
entry: string[];
|
|
1561
1587
|
completionGate: {
|
|
1562
1588
|
requiredFields: string[];
|
|
1563
1589
|
};
|
|
@@ -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;
|
|
1668
|
+
condition?: string | undefined;
|
|
1642
1669
|
sourceHandle?: string | undefined;
|
|
1643
1670
|
label?: string | undefined;
|
|
1644
|
-
condition?: string | undefined;
|
|
1645
1671
|
}, {
|
|
1646
1672
|
to: string;
|
|
1673
|
+
condition?: string | undefined;
|
|
1647
1674
|
sourceHandle?: string | undefined;
|
|
1648
1675
|
label?: string | undefined;
|
|
1649
|
-
condition?: string | undefined;
|
|
1650
1676
|
}>, "many">;
|
|
1651
1677
|
}, "strip", z.ZodTypeAny, {
|
|
1652
|
-
type: "
|
|
1678
|
+
type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
|
|
1653
1679
|
id: string;
|
|
1654
1680
|
config: Record<string, unknown>;
|
|
1655
1681
|
out: {
|
|
1656
1682
|
to: string;
|
|
1683
|
+
condition?: string | undefined;
|
|
1657
1684
|
sourceHandle?: string | undefined;
|
|
1658
1685
|
label?: string | undefined;
|
|
1659
|
-
condition?: string | undefined;
|
|
1660
1686
|
}[];
|
|
1661
1687
|
}, {
|
|
1662
|
-
type: "
|
|
1688
|
+
type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
|
|
1663
1689
|
id: string;
|
|
1664
1690
|
config: Record<string, unknown>;
|
|
1665
1691
|
out: {
|
|
1666
1692
|
to: string;
|
|
1693
|
+
condition?: string | undefined;
|
|
1667
1694
|
sourceHandle?: string | undefined;
|
|
1668
1695
|
label?: string | undefined;
|
|
1669
|
-
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, {
|
|
1722
|
+
v: 1;
|
|
1696
1723
|
id: string;
|
|
1724
|
+
entry: string[];
|
|
1697
1725
|
nodes: Record<string, {
|
|
1698
|
-
type: "
|
|
1726
|
+
type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
|
|
1699
1727
|
id: string;
|
|
1700
1728
|
config: Record<string, unknown>;
|
|
1701
1729
|
out: {
|
|
1702
1730
|
to: string;
|
|
1731
|
+
condition?: string | undefined;
|
|
1703
1732
|
sourceHandle?: string | undefined;
|
|
1704
1733
|
label?: string | undefined;
|
|
1705
|
-
condition?: string | undefined;
|
|
1706
1734
|
}[];
|
|
1707
1735
|
}>;
|
|
1708
|
-
v: 1;
|
|
1709
|
-
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
|
}, {
|
|
1746
|
+
v: 1;
|
|
1720
1747
|
id: string;
|
|
1748
|
+
entry: string[];
|
|
1721
1749
|
nodes: Record<string, {
|
|
1722
|
-
type: "
|
|
1750
|
+
type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
|
|
1723
1751
|
id: string;
|
|
1724
1752
|
config: Record<string, unknown>;
|
|
1725
1753
|
out: {
|
|
1726
1754
|
to: string;
|
|
1755
|
+
condition?: string | undefined;
|
|
1727
1756
|
sourceHandle?: string | undefined;
|
|
1728
1757
|
label?: string | undefined;
|
|
1729
|
-
condition?: string | undefined;
|
|
1730
1758
|
}[];
|
|
1731
1759
|
}>;
|
|
1732
|
-
v: 1;
|
|
1733
|
-
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,6 +2959,8 @@ 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;
|
|
@@ -2964,7 +3030,11 @@ type PlaybookResolver = (name: string) => Promise<{
|
|
|
2964
3030
|
* the server-side endpoint, so the URL/credential never reach this worker. */
|
|
2965
3031
|
interface RegistryToolsResolver {
|
|
2966
3032
|
catalog(): Promise<ReadonlyArray<AgentToolSpec>>;
|
|
2967
|
-
run(name: string, args: Record<string, unknown
|
|
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<{
|
|
2968
3038
|
ok: boolean;
|
|
2969
3039
|
status: number;
|
|
2970
3040
|
data: unknown;
|
|
@@ -2974,6 +3044,13 @@ interface RegistryToolsResolver {
|
|
|
2974
3044
|
* interpreter can run inline. null when the referenced flow isn't found / unpublished
|
|
2975
3045
|
* (the subflow executor then degrades to a recorded no-op and advances). */
|
|
2976
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
|
+
};
|
|
2977
3054
|
/** Side-effect surface injected once by runFlowProgram. Every member is optional;
|
|
2978
3055
|
* a missing resolver makes its executor degrade to a recorded no-op (never throws,
|
|
2979
3056
|
* never blocks the call). Kept off AgentContext so the contract stays small and
|
|
@@ -2994,6 +3071,12 @@ interface GraphResolvers {
|
|
|
2994
3071
|
readonly agentRunner?: AgentRunner;
|
|
2995
3072
|
/** Name-referenced project tool registry (catalog + server-side execute). */
|
|
2996
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;
|
|
2997
3080
|
}
|
|
2998
3081
|
|
|
2999
3082
|
/**
|
|
@@ -3161,4 +3244,4 @@ type RunLiveTextOptions = Omit<RunTextSessionOptions, 'onAgentText' | 'onAwaitIn
|
|
|
3161
3244
|
* interpreter blocks for the next message, or the flow ends. */
|
|
3162
3245
|
declare function runLiveTextConversation(opts: RunLiveTextOptions): LiveTextConversation;
|
|
3163
3246
|
|
|
3164
|
-
export {
|
|
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 };
|