@goodtiming/baton-sdk 0.5.4 → 0.5.6
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/index.cjs +33 -52
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -4
- package/dist/index.d.ts +41 -4
- package/dist/index.js +33 -52
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
declare const SDK_VERSION = "ts-0.5.
|
|
3
|
+
declare const SDK_VERSION = "ts-0.5.6";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Zod schemas + TS types for the Baton event stream per SPEC §11.4.
|
|
@@ -101,7 +101,6 @@ declare const AnnotationPayloadSchema: z.ZodObject<{
|
|
|
101
101
|
workflow: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
102
102
|
suggested_improvement: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
103
103
|
context: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
104
|
-
intent_source: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
105
104
|
tool_name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
106
105
|
}, z.core.$strict>;
|
|
107
106
|
type AnnotationPayload = z.infer<typeof AnnotationPayloadSchema>;
|
|
@@ -340,6 +339,7 @@ declare const ToolCallStartEventSchema: z.ZodObject<{
|
|
|
340
339
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
341
340
|
}, z.core.$strict>>>;
|
|
342
341
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
342
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
343
343
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
344
344
|
info: z.ZodOptional<z.ZodObject<{
|
|
345
345
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -378,6 +378,7 @@ declare const ToolCallEndEventSchema: z.ZodObject<{
|
|
|
378
378
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
379
379
|
}, z.core.$strict>>>;
|
|
380
380
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
381
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
381
382
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
382
383
|
info: z.ZodOptional<z.ZodObject<{
|
|
383
384
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -419,6 +420,7 @@ declare const ToolCallErrorEventSchema: z.ZodObject<{
|
|
|
419
420
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
420
421
|
}, z.core.$strict>>>;
|
|
421
422
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
423
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
422
424
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
423
425
|
info: z.ZodOptional<z.ZodObject<{
|
|
424
426
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -442,7 +444,6 @@ declare const AnnotationEventSchema: z.ZodObject<{
|
|
|
442
444
|
workflow: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
443
445
|
suggested_improvement: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
444
446
|
context: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
445
|
-
intent_source: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
446
447
|
tool_name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
447
448
|
}, z.core.$strict>;
|
|
448
449
|
event_id: z.ZodDefault<z.ZodUUID>;
|
|
@@ -461,6 +462,7 @@ declare const AnnotationEventSchema: z.ZodObject<{
|
|
|
461
462
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
462
463
|
}, z.core.$strict>>>;
|
|
463
464
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
465
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
464
466
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
465
467
|
info: z.ZodOptional<z.ZodObject<{
|
|
466
468
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -501,6 +503,7 @@ declare const SurfaceSnapshotEventSchema: z.ZodObject<{
|
|
|
501
503
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
502
504
|
}, z.core.$strict>>>;
|
|
503
505
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
506
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
504
507
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
505
508
|
info: z.ZodOptional<z.ZodObject<{
|
|
506
509
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -534,6 +537,7 @@ declare const ResourceListStartEventSchema: z.ZodObject<{
|
|
|
534
537
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
535
538
|
}, z.core.$strict>>>;
|
|
536
539
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
540
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
537
541
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
538
542
|
info: z.ZodOptional<z.ZodObject<{
|
|
539
543
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -570,6 +574,7 @@ declare const ResourceListEndEventSchema: z.ZodObject<{
|
|
|
570
574
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
571
575
|
}, z.core.$strict>>>;
|
|
572
576
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
577
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
573
578
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
574
579
|
info: z.ZodOptional<z.ZodObject<{
|
|
575
580
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -607,6 +612,7 @@ declare const ResourceListErrorEventSchema: z.ZodObject<{
|
|
|
607
612
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
608
613
|
}, z.core.$strict>>>;
|
|
609
614
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
615
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
610
616
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
611
617
|
info: z.ZodOptional<z.ZodObject<{
|
|
612
618
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -643,6 +649,7 @@ declare const ResourceReadStartEventSchema: z.ZodObject<{
|
|
|
643
649
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
644
650
|
}, z.core.$strict>>>;
|
|
645
651
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
652
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
646
653
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
647
654
|
info: z.ZodOptional<z.ZodObject<{
|
|
648
655
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -679,6 +686,7 @@ declare const ResourceReadEndEventSchema: z.ZodObject<{
|
|
|
679
686
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
680
687
|
}, z.core.$strict>>>;
|
|
681
688
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
689
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
682
690
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
683
691
|
info: z.ZodOptional<z.ZodObject<{
|
|
684
692
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -717,6 +725,7 @@ declare const ResourceReadErrorEventSchema: z.ZodObject<{
|
|
|
717
725
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
718
726
|
}, z.core.$strict>>>;
|
|
719
727
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
728
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
720
729
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
721
730
|
info: z.ZodOptional<z.ZodObject<{
|
|
722
731
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -750,6 +759,7 @@ declare const PromptListStartEventSchema: z.ZodObject<{
|
|
|
750
759
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
751
760
|
}, z.core.$strict>>>;
|
|
752
761
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
762
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
753
763
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
754
764
|
info: z.ZodOptional<z.ZodObject<{
|
|
755
765
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -786,6 +796,7 @@ declare const PromptListEndEventSchema: z.ZodObject<{
|
|
|
786
796
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
787
797
|
}, z.core.$strict>>>;
|
|
788
798
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
799
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
789
800
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
790
801
|
info: z.ZodOptional<z.ZodObject<{
|
|
791
802
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -823,6 +834,7 @@ declare const PromptListErrorEventSchema: z.ZodObject<{
|
|
|
823
834
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
824
835
|
}, z.core.$strict>>>;
|
|
825
836
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
837
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
826
838
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
827
839
|
info: z.ZodOptional<z.ZodObject<{
|
|
828
840
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -859,6 +871,7 @@ declare const PromptGetStartEventSchema: z.ZodObject<{
|
|
|
859
871
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
860
872
|
}, z.core.$strict>>>;
|
|
861
873
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
874
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
862
875
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
863
876
|
info: z.ZodOptional<z.ZodObject<{
|
|
864
877
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -895,6 +908,7 @@ declare const PromptGetEndEventSchema: z.ZodObject<{
|
|
|
895
908
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
896
909
|
}, z.core.$strict>>>;
|
|
897
910
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
911
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
898
912
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
899
913
|
info: z.ZodOptional<z.ZodObject<{
|
|
900
914
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -933,6 +947,7 @@ declare const PromptGetErrorEventSchema: z.ZodObject<{
|
|
|
933
947
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
934
948
|
}, z.core.$strict>>>;
|
|
935
949
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
950
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
936
951
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
937
952
|
info: z.ZodOptional<z.ZodObject<{
|
|
938
953
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -966,6 +981,7 @@ declare const ToolListStartEventSchema: z.ZodObject<{
|
|
|
966
981
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
967
982
|
}, z.core.$strict>>>;
|
|
968
983
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
984
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
969
985
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
970
986
|
info: z.ZodOptional<z.ZodObject<{
|
|
971
987
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1002,6 +1018,7 @@ declare const ToolListEndEventSchema: z.ZodObject<{
|
|
|
1002
1018
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1003
1019
|
}, z.core.$strict>>>;
|
|
1004
1020
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1021
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1005
1022
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1006
1023
|
info: z.ZodOptional<z.ZodObject<{
|
|
1007
1024
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1039,6 +1056,7 @@ declare const ToolListErrorEventSchema: z.ZodObject<{
|
|
|
1039
1056
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1040
1057
|
}, z.core.$strict>>>;
|
|
1041
1058
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1059
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1042
1060
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1043
1061
|
info: z.ZodOptional<z.ZodObject<{
|
|
1044
1062
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1080,6 +1098,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1080
1098
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1081
1099
|
}, z.core.$strict>>>;
|
|
1082
1100
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1101
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1083
1102
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1084
1103
|
info: z.ZodOptional<z.ZodObject<{
|
|
1085
1104
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1116,6 +1135,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1116
1135
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1117
1136
|
}, z.core.$strict>>>;
|
|
1118
1137
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1138
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1119
1139
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1120
1140
|
info: z.ZodOptional<z.ZodObject<{
|
|
1121
1141
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1155,6 +1175,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1155
1175
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1156
1176
|
}, z.core.$strict>>>;
|
|
1157
1177
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1178
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1158
1179
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1159
1180
|
info: z.ZodOptional<z.ZodObject<{
|
|
1160
1181
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1176,7 +1197,6 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1176
1197
|
workflow: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1177
1198
|
suggested_improvement: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1178
1199
|
context: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
1179
|
-
intent_source: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1180
1200
|
tool_name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1181
1201
|
}, z.core.$strict>;
|
|
1182
1202
|
event_id: z.ZodDefault<z.ZodUUID>;
|
|
@@ -1195,6 +1215,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1195
1215
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1196
1216
|
}, z.core.$strict>>>;
|
|
1197
1217
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1218
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1198
1219
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1199
1220
|
info: z.ZodOptional<z.ZodObject<{
|
|
1200
1221
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1233,6 +1254,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1233
1254
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1234
1255
|
}, z.core.$strict>>>;
|
|
1235
1256
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1257
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1236
1258
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1237
1259
|
info: z.ZodOptional<z.ZodObject<{
|
|
1238
1260
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1264,6 +1286,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1264
1286
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1265
1287
|
}, z.core.$strict>>>;
|
|
1266
1288
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1289
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1267
1290
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1268
1291
|
info: z.ZodOptional<z.ZodObject<{
|
|
1269
1292
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1298,6 +1321,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1298
1321
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1299
1322
|
}, z.core.$strict>>>;
|
|
1300
1323
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1324
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1301
1325
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1302
1326
|
info: z.ZodOptional<z.ZodObject<{
|
|
1303
1327
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1333,6 +1357,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1333
1357
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1334
1358
|
}, z.core.$strict>>>;
|
|
1335
1359
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1360
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1336
1361
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1337
1362
|
info: z.ZodOptional<z.ZodObject<{
|
|
1338
1363
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1367,6 +1392,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1367
1392
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1368
1393
|
}, z.core.$strict>>>;
|
|
1369
1394
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1395
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1370
1396
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1371
1397
|
info: z.ZodOptional<z.ZodObject<{
|
|
1372
1398
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1401,6 +1427,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1401
1427
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1402
1428
|
}, z.core.$strict>>>;
|
|
1403
1429
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1430
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1404
1431
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1405
1432
|
info: z.ZodOptional<z.ZodObject<{
|
|
1406
1433
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1437,6 +1464,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1437
1464
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1438
1465
|
}, z.core.$strict>>>;
|
|
1439
1466
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1467
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1440
1468
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1441
1469
|
info: z.ZodOptional<z.ZodObject<{
|
|
1442
1470
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1468,6 +1496,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1468
1496
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1469
1497
|
}, z.core.$strict>>>;
|
|
1470
1498
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1499
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1471
1500
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1472
1501
|
info: z.ZodOptional<z.ZodObject<{
|
|
1473
1502
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1502,6 +1531,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1502
1531
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1503
1532
|
}, z.core.$strict>>>;
|
|
1504
1533
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1534
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1505
1535
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1506
1536
|
info: z.ZodOptional<z.ZodObject<{
|
|
1507
1537
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1537,6 +1567,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1537
1567
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1538
1568
|
}, z.core.$strict>>>;
|
|
1539
1569
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1570
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1540
1571
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1541
1572
|
info: z.ZodOptional<z.ZodObject<{
|
|
1542
1573
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1571,6 +1602,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1571
1602
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1572
1603
|
}, z.core.$strict>>>;
|
|
1573
1604
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1605
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1574
1606
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1575
1607
|
info: z.ZodOptional<z.ZodObject<{
|
|
1576
1608
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1605,6 +1637,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1605
1637
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1606
1638
|
}, z.core.$strict>>>;
|
|
1607
1639
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1640
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1608
1641
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1609
1642
|
info: z.ZodOptional<z.ZodObject<{
|
|
1610
1643
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1641,6 +1674,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1641
1674
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1642
1675
|
}, z.core.$strict>>>;
|
|
1643
1676
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1677
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1644
1678
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1645
1679
|
info: z.ZodOptional<z.ZodObject<{
|
|
1646
1680
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1672,6 +1706,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1672
1706
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1673
1707
|
}, z.core.$strict>>>;
|
|
1674
1708
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1709
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1675
1710
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1676
1711
|
info: z.ZodOptional<z.ZodObject<{
|
|
1677
1712
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1706,6 +1741,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1706
1741
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1707
1742
|
}, z.core.$strict>>>;
|
|
1708
1743
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1744
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1709
1745
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1710
1746
|
info: z.ZodOptional<z.ZodObject<{
|
|
1711
1747
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1741,6 +1777,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1741
1777
|
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1742
1778
|
}, z.core.$strict>>>;
|
|
1743
1779
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1780
|
+
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1744
1781
|
client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1745
1782
|
info: z.ZodOptional<z.ZodObject<{
|
|
1746
1783
|
name: z.ZodOptional<z.ZodString>;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/version.ts
|
|
2
|
-
var SDK_VERSION = "ts-0.5.
|
|
2
|
+
var SDK_VERSION = "ts-0.5.6";
|
|
3
3
|
|
|
4
4
|
// src/events.ts
|
|
5
5
|
import { z } from "zod";
|
|
@@ -110,7 +110,6 @@ var AnnotationPayloadSchema = z.object({
|
|
|
110
110
|
workflow: z.string().nullable().default(null),
|
|
111
111
|
suggested_improvement: z.string().nullable().default(null),
|
|
112
112
|
context: z.record(z.string(), z.unknown()).nullable().default(null),
|
|
113
|
-
intent_source: z.string().nullable().default(null),
|
|
114
113
|
tool_name: z.string().nullable().default(null)
|
|
115
114
|
}).strict();
|
|
116
115
|
var SurfaceSnapshotPayloadSchema = z.object({
|
|
@@ -146,6 +145,7 @@ var envelopeShape = {
|
|
|
146
145
|
agent_runtime: z.string().default("unknown"),
|
|
147
146
|
principal: PrincipalWireSchema.nullable().default(null),
|
|
148
147
|
transport_observed: z.string().nullable().default(null),
|
|
148
|
+
session_id_origin: z.string().nullable().default(null),
|
|
149
149
|
client_observed: ClientObservedSchema.nullable().default(null),
|
|
150
150
|
call_id: z.string().nullable().default(null),
|
|
151
151
|
runtime_meta: z.record(z.string(), z.unknown()).nullable().default(null)
|
|
@@ -1119,8 +1119,20 @@ function observeClient(extra, options) {
|
|
|
1119
1119
|
|
|
1120
1120
|
// src/integrations/mcp/sessionResolution.ts
|
|
1121
1121
|
async function resolveSessionId(fallbackSessionId, extra) {
|
|
1122
|
-
if (typeof extra.sessionId === "string" && extra.sessionId)
|
|
1123
|
-
|
|
1122
|
+
if (typeof extra.sessionId === "string" && extra.sessionId) {
|
|
1123
|
+
return { sessionId: extra.sessionId, origin: "observed" };
|
|
1124
|
+
}
|
|
1125
|
+
const fromHeader = sessionIdFromHeader(extra);
|
|
1126
|
+
if (fromHeader !== null) return { sessionId: fromHeader, origin: "observed" };
|
|
1127
|
+
return { sessionId: fallbackSessionId, origin: "minted" };
|
|
1128
|
+
}
|
|
1129
|
+
function sessionIdFromHeader(extra) {
|
|
1130
|
+
try {
|
|
1131
|
+
const value = extraHeaders(extra)?.get("mcp-session-id")?.trim();
|
|
1132
|
+
return value ? value : null;
|
|
1133
|
+
} catch {
|
|
1134
|
+
return null;
|
|
1135
|
+
}
|
|
1124
1136
|
}
|
|
1125
1137
|
|
|
1126
1138
|
// src/integrations/mcp/annotation.ts
|
|
@@ -1171,7 +1183,7 @@ function registerAnnotationTool(server, options) {
|
|
|
1171
1183
|
meta ? roundMetaCoordinates(meta) : null,
|
|
1172
1184
|
"_meta"
|
|
1173
1185
|
);
|
|
1174
|
-
const sessionId = await resolveSessionId(options.fallbackSessionId, extra);
|
|
1186
|
+
const { sessionId, origin } = await resolveSessionId(options.fallbackSessionId, extra);
|
|
1175
1187
|
const principal = await resolveCallPrincipal(
|
|
1176
1188
|
options.resolvePrincipal,
|
|
1177
1189
|
{ extra, toolName: name, arguments: args }
|
|
@@ -1187,6 +1199,7 @@ function registerAnnotationTool(server, options) {
|
|
|
1187
1199
|
consent_token: options.consentToken,
|
|
1188
1200
|
principal,
|
|
1189
1201
|
transport_observed: observeTransport(extra),
|
|
1202
|
+
session_id_origin: origin,
|
|
1190
1203
|
client_observed: observeClient(extra, { server, scrubber: options.scrubber }),
|
|
1191
1204
|
runtime_meta: scrubbedMeta,
|
|
1192
1205
|
payload: {
|
|
@@ -1659,18 +1672,6 @@ var BatonHandle = class {
|
|
|
1659
1672
|
}
|
|
1660
1673
|
};
|
|
1661
1674
|
|
|
1662
|
-
// src/integrations/mcp/proactiveTracker.ts
|
|
1663
|
-
var ProactiveTracker = class {
|
|
1664
|
-
emitted = /* @__PURE__ */ new Set();
|
|
1665
|
-
/** Claim the session's proactive slot. Returns true exactly once per
|
|
1666
|
-
* session (the caller should then emit); false if already claimed. */
|
|
1667
|
-
claim(sessionId) {
|
|
1668
|
-
if (this.emitted.has(sessionId)) return false;
|
|
1669
|
-
this.emitted.add(sessionId);
|
|
1670
|
-
return true;
|
|
1671
|
-
}
|
|
1672
|
-
};
|
|
1673
|
-
|
|
1674
1675
|
// src/integrations/mcp/sessionCounter.ts
|
|
1675
1676
|
var SessionCounter = class {
|
|
1676
1677
|
counters = /* @__PURE__ */ new Map();
|
|
@@ -1946,12 +1947,12 @@ function messageOf(err) {
|
|
|
1946
1947
|
async function resolveEnvelopeParts(ctx, extra) {
|
|
1947
1948
|
const meta = extraMeta(extra);
|
|
1948
1949
|
const scrubbedMeta = scrubOrNull(ctx.scrubber, meta ? roundMetaCoordinates(meta) : null, "_meta");
|
|
1949
|
-
const
|
|
1950
|
-
return {
|
|
1950
|
+
const session = await resolveSessionId(ctx.fallbackSessionId, extra);
|
|
1951
|
+
return { ...session, scrubbedMeta };
|
|
1951
1952
|
}
|
|
1952
1953
|
async function openCall(ctx, toolName, extra, params, registered = true) {
|
|
1953
1954
|
await maybeEmitSurfaceSnapshot(ctx);
|
|
1954
|
-
const { sessionId, scrubbedMeta } = await resolveEnvelopeParts(ctx, extra);
|
|
1955
|
+
const { sessionId, origin, scrubbedMeta } = await resolveEnvelopeParts(ctx, extra);
|
|
1955
1956
|
const dispositions = ctx.paramRegistry.get(toolName);
|
|
1956
1957
|
const rawIntent = extractGoalParam(params, USER_GOAL_PARAM_NAME, toolName, dispositions, registered);
|
|
1957
1958
|
const rawExpected = extractGoalParam(
|
|
@@ -1965,7 +1966,6 @@ async function openCall(ctx, toolName, extra, params, registered = true) {
|
|
|
1965
1966
|
const scrubbedIntent = scrubOrNull(ctx.scrubber, rawIntent, USER_GOAL_PARAM_NAME);
|
|
1966
1967
|
const scrubbedExpected = scrubOrNull(ctx.scrubber, rawExpected, EXPECTED_RESULT_PARAM_NAME);
|
|
1967
1968
|
const scrubbedWorkflow = scrubOrNull(ctx.scrubber, rawWorkflow, OVERALL_TASK_PARAM_NAME);
|
|
1968
|
-
const callId = uuid7();
|
|
1969
1969
|
const principal = await resolveCallPrincipal(
|
|
1970
1970
|
ctx.resolvePrincipal,
|
|
1971
1971
|
{ extra, toolName, arguments: params }
|
|
@@ -1975,35 +1975,21 @@ async function openCall(ctx, toolName, extra, params, registered = true) {
|
|
|
1975
1975
|
vendor_id: ctx.vendorId,
|
|
1976
1976
|
session_id: sessionId,
|
|
1977
1977
|
consent_token: ctx.consentToken,
|
|
1978
|
-
// Every `...common` site is an event
|
|
1979
|
-
// is deliberately not among them: it describes the
|
|
1980
|
-
// outside any call, so it has no caller, transport
|
|
1978
|
+
// Every `...common` site is an event of this call, so `call_id` rides in
|
|
1979
|
+
// it. `surface_snapshot` is deliberately not among them: it describes the
|
|
1980
|
+
// SERVER and is captured outside any call, so it has no caller, transport
|
|
1981
|
+
// or client to name.
|
|
1981
1982
|
principal,
|
|
1982
1983
|
transport_observed: observeTransport(extra),
|
|
1984
|
+
session_id_origin: origin,
|
|
1983
1985
|
client_observed: observeClient(extra, ctx),
|
|
1984
|
-
runtime_meta: scrubbedMeta
|
|
1986
|
+
runtime_meta: scrubbedMeta,
|
|
1987
|
+
call_id: uuid7()
|
|
1985
1988
|
};
|
|
1986
|
-
if (scrubbedIntent !== null && ctx.tracker.claim(sessionId)) {
|
|
1987
|
-
await emit(
|
|
1988
|
-
ctx.sink,
|
|
1989
|
-
() => AnnotationEventSchema.parse({
|
|
1990
|
-
...common,
|
|
1991
|
-
sequence_number: ctx.counter.next(sessionId),
|
|
1992
|
-
captured_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1993
|
-
payload: {
|
|
1994
|
-
intent: scrubbedIntent,
|
|
1995
|
-
expected_outcome: scrubbedExpected,
|
|
1996
|
-
intent_source: INTENT_SOURCE_PARAM,
|
|
1997
|
-
tool_name: toolName
|
|
1998
|
-
}
|
|
1999
|
-
})
|
|
2000
|
-
);
|
|
2001
|
-
}
|
|
2002
1989
|
await emit(
|
|
2003
1990
|
ctx.sink,
|
|
2004
1991
|
() => ToolCallStartEventSchema.parse({
|
|
2005
1992
|
...common,
|
|
2006
|
-
call_id: callId,
|
|
2007
1993
|
sequence_number: ctx.counter.next(sessionId),
|
|
2008
1994
|
captured_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2009
1995
|
payload: {
|
|
@@ -2017,7 +2003,7 @@ async function openCall(ctx, toolName, extra, params, registered = true) {
|
|
|
2017
2003
|
}
|
|
2018
2004
|
})
|
|
2019
2005
|
);
|
|
2020
|
-
return { common,
|
|
2006
|
+
return { common, sessionId };
|
|
2021
2007
|
}
|
|
2022
2008
|
function batonWrap(nameRef, original, ctx) {
|
|
2023
2009
|
return async (...callArgs) => {
|
|
@@ -2026,7 +2012,7 @@ function batonWrap(nameRef, original, ctx) {
|
|
|
2026
2012
|
if (slot) slot.innerFired = true;
|
|
2027
2013
|
const extra = callArgs[callArgs.length - 1];
|
|
2028
2014
|
const params = (callArgs.length > 1 ? callArgs[0] : void 0) ?? {};
|
|
2029
|
-
const { common,
|
|
2015
|
+
const { common, sessionId } = await openCall(ctx, toolName, extra, params);
|
|
2030
2016
|
const terminate = async (build, replacement) => {
|
|
2031
2017
|
if (!slot) {
|
|
2032
2018
|
await emit(ctx.sink, build);
|
|
@@ -2052,7 +2038,6 @@ function batonWrap(nameRef, original, ctx) {
|
|
|
2052
2038
|
await parkFailure(
|
|
2053
2039
|
() => ToolCallErrorEventSchema.parse({
|
|
2054
2040
|
...common,
|
|
2055
|
-
call_id: callId,
|
|
2056
2041
|
sequence_number: ctx.counter.next(sessionId),
|
|
2057
2042
|
captured_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2058
2043
|
payload: {
|
|
@@ -2088,7 +2073,6 @@ function batonWrap(nameRef, original, ctx) {
|
|
|
2088
2073
|
await parkFailure(
|
|
2089
2074
|
() => ToolCallErrorEventSchema.parse({
|
|
2090
2075
|
...common,
|
|
2091
|
-
call_id: callId,
|
|
2092
2076
|
sequence_number: ctx.counter.next(sessionId),
|
|
2093
2077
|
captured_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2094
2078
|
payload: {
|
|
@@ -2119,7 +2103,6 @@ function batonWrap(nameRef, original, ctx) {
|
|
|
2119
2103
|
await parkSuccess(
|
|
2120
2104
|
() => ToolCallEndEventSchema.parse({
|
|
2121
2105
|
...common,
|
|
2122
|
-
call_id: callId,
|
|
2123
2106
|
sequence_number: ctx.counter.next(sessionId),
|
|
2124
2107
|
captured_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2125
2108
|
payload: {
|
|
@@ -2136,7 +2119,6 @@ function batonWrap(nameRef, original, ctx) {
|
|
|
2136
2119
|
// CALLER saw fail, which is a success the product invented.
|
|
2137
2120
|
(outcome) => ToolCallErrorEventSchema.parse({
|
|
2138
2121
|
...common,
|
|
2139
|
-
call_id: callId,
|
|
2140
2122
|
sequence_number: ctx.counter.next(sessionId),
|
|
2141
2123
|
captured_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2142
2124
|
payload: {
|
|
@@ -2365,6 +2347,7 @@ async function openLifecycleCall(ctx, spec, requestParams, extra) {
|
|
|
2365
2347
|
consent_token: ctx.consentToken,
|
|
2366
2348
|
principal,
|
|
2367
2349
|
transport_observed: observeTransport(extra),
|
|
2350
|
+
session_id_origin: parts.origin,
|
|
2368
2351
|
client_observed: observeClient(extra, ctx),
|
|
2369
2352
|
runtime_meta: parts.scrubbedMeta
|
|
2370
2353
|
}
|
|
@@ -2529,7 +2512,7 @@ async function emitRequestSideFailure(outcome, args, toolEntry, ctx) {
|
|
|
2529
2512
|
const entry = toolEntry(toolName);
|
|
2530
2513
|
if (entry != null && dispatchTarget(entry)?.[BATON_WRAPPED] !== true) return;
|
|
2531
2514
|
const params = { ...request?.params?.arguments ?? {} };
|
|
2532
|
-
const { common,
|
|
2515
|
+
const { common, sessionId } = await openCall(
|
|
2533
2516
|
ctx,
|
|
2534
2517
|
toolName,
|
|
2535
2518
|
args[1],
|
|
@@ -2541,7 +2524,6 @@ async function emitRequestSideFailure(outcome, args, toolEntry, ctx) {
|
|
|
2541
2524
|
ctx.sink,
|
|
2542
2525
|
() => ToolCallErrorEventSchema.parse({
|
|
2543
2526
|
...common,
|
|
2544
|
-
call_id: callId,
|
|
2545
2527
|
sequence_number: ctx.counter.next(sessionId),
|
|
2546
2528
|
captured_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2547
2529
|
payload: {
|
|
@@ -2702,6 +2684,7 @@ function install(server, supplied, resolved, emittedSurfaceHashes) {
|
|
|
2702
2684
|
tenant_id: tenantId,
|
|
2703
2685
|
vendor_id: config.vendorId,
|
|
2704
2686
|
session_id: sessionId,
|
|
2687
|
+
session_id_origin: "minted",
|
|
2705
2688
|
consent_token: config.consentToken,
|
|
2706
2689
|
sequence_number: counter2.next(sessionId),
|
|
2707
2690
|
captured_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -2750,7 +2733,6 @@ function install(server, supplied, resolved, emittedSurfaceHashes) {
|
|
|
2750
2733
|
return { type: "object", properties: {} };
|
|
2751
2734
|
}
|
|
2752
2735
|
};
|
|
2753
|
-
const tracker = new ProactiveTracker();
|
|
2754
2736
|
const ctx = {
|
|
2755
2737
|
sink,
|
|
2756
2738
|
counter: counter2,
|
|
@@ -2768,7 +2750,6 @@ function install(server, supplied, resolved, emittedSurfaceHashes) {
|
|
|
2768
2750
|
vendorToolJsonSchema,
|
|
2769
2751
|
bustSchemaMemo,
|
|
2770
2752
|
dropSubagentClause,
|
|
2771
|
-
tracker,
|
|
2772
2753
|
surfaceState,
|
|
2773
2754
|
emitSurface
|
|
2774
2755
|
};
|