@goodtiming/baton-sdk 1.1.0 → 1.2.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.
- package/README.md +2 -1
- package/dist/index.cjs +1194 -694
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +67 -7
- package/dist/index.d.ts +67 -7
- package/dist/index.js +1194 -694
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
declare const SDK_VERSION = "ts-1.
|
|
3
|
+
declare const SDK_VERSION = "ts-1.2.0";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Zod schemas + TS types for the Baton event stream per SPEC §11.4.
|
|
@@ -132,6 +132,7 @@ declare const CaptureObservedSchema: z.ZodObject<{
|
|
|
132
132
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
133
133
|
audience: z.ZodOptional<z.ZodString>;
|
|
134
134
|
overlay: z.ZodOptional<z.ZodString>;
|
|
135
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
135
136
|
}, z.core.$strict>;
|
|
136
137
|
type CaptureObserved = z.infer<typeof CaptureObservedSchema>;
|
|
137
138
|
declare const EventTypeSchema: z.ZodEnum<{
|
|
@@ -330,6 +331,7 @@ declare const ToolCallStartEventSchema: z.ZodObject<{
|
|
|
330
331
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
331
332
|
audience: z.ZodOptional<z.ZodString>;
|
|
332
333
|
overlay: z.ZodOptional<z.ZodString>;
|
|
334
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
333
335
|
}, z.core.$strict>>>;
|
|
334
336
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
335
337
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -381,6 +383,7 @@ declare const ToolCallEndEventSchema: z.ZodObject<{
|
|
|
381
383
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
382
384
|
audience: z.ZodOptional<z.ZodString>;
|
|
383
385
|
overlay: z.ZodOptional<z.ZodString>;
|
|
386
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
384
387
|
}, z.core.$strict>>>;
|
|
385
388
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
386
389
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -435,6 +438,7 @@ declare const ToolCallErrorEventSchema: z.ZodObject<{
|
|
|
435
438
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
436
439
|
audience: z.ZodOptional<z.ZodString>;
|
|
437
440
|
overlay: z.ZodOptional<z.ZodString>;
|
|
441
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
438
442
|
}, z.core.$strict>>>;
|
|
439
443
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
440
444
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -489,6 +493,7 @@ declare const AnnotationEventSchema: z.ZodObject<{
|
|
|
489
493
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
490
494
|
audience: z.ZodOptional<z.ZodString>;
|
|
491
495
|
overlay: z.ZodOptional<z.ZodString>;
|
|
496
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
492
497
|
}, z.core.$strict>>>;
|
|
493
498
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
494
499
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -542,6 +547,7 @@ declare const SurfaceSnapshotEventSchema: z.ZodObject<{
|
|
|
542
547
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
543
548
|
audience: z.ZodOptional<z.ZodString>;
|
|
544
549
|
overlay: z.ZodOptional<z.ZodString>;
|
|
550
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
545
551
|
}, z.core.$strict>>>;
|
|
546
552
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
547
553
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -591,6 +597,7 @@ declare const ClientReportEventSchema: z.ZodObject<{
|
|
|
591
597
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
592
598
|
audience: z.ZodOptional<z.ZodString>;
|
|
593
599
|
overlay: z.ZodOptional<z.ZodString>;
|
|
600
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
594
601
|
}, z.core.$strict>>>;
|
|
595
602
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
596
603
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -638,6 +645,7 @@ declare const ResourceListStartEventSchema: z.ZodObject<{
|
|
|
638
645
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
639
646
|
audience: z.ZodOptional<z.ZodString>;
|
|
640
647
|
overlay: z.ZodOptional<z.ZodString>;
|
|
648
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
641
649
|
}, z.core.$strict>>>;
|
|
642
650
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
643
651
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -687,6 +695,7 @@ declare const ResourceListEndEventSchema: z.ZodObject<{
|
|
|
687
695
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
688
696
|
audience: z.ZodOptional<z.ZodString>;
|
|
689
697
|
overlay: z.ZodOptional<z.ZodString>;
|
|
698
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
690
699
|
}, z.core.$strict>>>;
|
|
691
700
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
692
701
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -737,6 +746,7 @@ declare const ResourceListErrorEventSchema: z.ZodObject<{
|
|
|
737
746
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
738
747
|
audience: z.ZodOptional<z.ZodString>;
|
|
739
748
|
overlay: z.ZodOptional<z.ZodString>;
|
|
749
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
740
750
|
}, z.core.$strict>>>;
|
|
741
751
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
742
752
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -786,6 +796,7 @@ declare const ResourceReadStartEventSchema: z.ZodObject<{
|
|
|
786
796
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
787
797
|
audience: z.ZodOptional<z.ZodString>;
|
|
788
798
|
overlay: z.ZodOptional<z.ZodString>;
|
|
799
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
789
800
|
}, z.core.$strict>>>;
|
|
790
801
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
791
802
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -835,6 +846,7 @@ declare const ResourceReadEndEventSchema: z.ZodObject<{
|
|
|
835
846
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
836
847
|
audience: z.ZodOptional<z.ZodString>;
|
|
837
848
|
overlay: z.ZodOptional<z.ZodString>;
|
|
849
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
838
850
|
}, z.core.$strict>>>;
|
|
839
851
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
840
852
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -886,6 +898,7 @@ declare const ResourceReadErrorEventSchema: z.ZodObject<{
|
|
|
886
898
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
887
899
|
audience: z.ZodOptional<z.ZodString>;
|
|
888
900
|
overlay: z.ZodOptional<z.ZodString>;
|
|
901
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
889
902
|
}, z.core.$strict>>>;
|
|
890
903
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
891
904
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -932,6 +945,7 @@ declare const PromptListStartEventSchema: z.ZodObject<{
|
|
|
932
945
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
933
946
|
audience: z.ZodOptional<z.ZodString>;
|
|
934
947
|
overlay: z.ZodOptional<z.ZodString>;
|
|
948
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
935
949
|
}, z.core.$strict>>>;
|
|
936
950
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
937
951
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -981,6 +995,7 @@ declare const PromptListEndEventSchema: z.ZodObject<{
|
|
|
981
995
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
982
996
|
audience: z.ZodOptional<z.ZodString>;
|
|
983
997
|
overlay: z.ZodOptional<z.ZodString>;
|
|
998
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
984
999
|
}, z.core.$strict>>>;
|
|
985
1000
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
986
1001
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -1031,6 +1046,7 @@ declare const PromptListErrorEventSchema: z.ZodObject<{
|
|
|
1031
1046
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
1032
1047
|
audience: z.ZodOptional<z.ZodString>;
|
|
1033
1048
|
overlay: z.ZodOptional<z.ZodString>;
|
|
1049
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
1034
1050
|
}, z.core.$strict>>>;
|
|
1035
1051
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1036
1052
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -1080,6 +1096,7 @@ declare const PromptGetStartEventSchema: z.ZodObject<{
|
|
|
1080
1096
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
1081
1097
|
audience: z.ZodOptional<z.ZodString>;
|
|
1082
1098
|
overlay: z.ZodOptional<z.ZodString>;
|
|
1099
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
1083
1100
|
}, z.core.$strict>>>;
|
|
1084
1101
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1085
1102
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -1129,6 +1146,7 @@ declare const PromptGetEndEventSchema: z.ZodObject<{
|
|
|
1129
1146
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
1130
1147
|
audience: z.ZodOptional<z.ZodString>;
|
|
1131
1148
|
overlay: z.ZodOptional<z.ZodString>;
|
|
1149
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
1132
1150
|
}, z.core.$strict>>>;
|
|
1133
1151
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1134
1152
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -1180,6 +1198,7 @@ declare const PromptGetErrorEventSchema: z.ZodObject<{
|
|
|
1180
1198
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
1181
1199
|
audience: z.ZodOptional<z.ZodString>;
|
|
1182
1200
|
overlay: z.ZodOptional<z.ZodString>;
|
|
1201
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
1183
1202
|
}, z.core.$strict>>>;
|
|
1184
1203
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1185
1204
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -1226,6 +1245,7 @@ declare const ToolListStartEventSchema: z.ZodObject<{
|
|
|
1226
1245
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
1227
1246
|
audience: z.ZodOptional<z.ZodString>;
|
|
1228
1247
|
overlay: z.ZodOptional<z.ZodString>;
|
|
1248
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
1229
1249
|
}, z.core.$strict>>>;
|
|
1230
1250
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1231
1251
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -1275,6 +1295,7 @@ declare const ToolListEndEventSchema: z.ZodObject<{
|
|
|
1275
1295
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
1276
1296
|
audience: z.ZodOptional<z.ZodString>;
|
|
1277
1297
|
overlay: z.ZodOptional<z.ZodString>;
|
|
1298
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
1278
1299
|
}, z.core.$strict>>>;
|
|
1279
1300
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1280
1301
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -1325,6 +1346,7 @@ declare const ToolListErrorEventSchema: z.ZodObject<{
|
|
|
1325
1346
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
1326
1347
|
audience: z.ZodOptional<z.ZodString>;
|
|
1327
1348
|
overlay: z.ZodOptional<z.ZodString>;
|
|
1349
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
1328
1350
|
}, z.core.$strict>>>;
|
|
1329
1351
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1330
1352
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -1381,6 +1403,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1381
1403
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
1382
1404
|
audience: z.ZodOptional<z.ZodString>;
|
|
1383
1405
|
overlay: z.ZodOptional<z.ZodString>;
|
|
1406
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
1384
1407
|
}, z.core.$strict>>>;
|
|
1385
1408
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1386
1409
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -1430,6 +1453,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1430
1453
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
1431
1454
|
audience: z.ZodOptional<z.ZodString>;
|
|
1432
1455
|
overlay: z.ZodOptional<z.ZodString>;
|
|
1456
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
1433
1457
|
}, z.core.$strict>>>;
|
|
1434
1458
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1435
1459
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -1482,6 +1506,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1482
1506
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
1483
1507
|
audience: z.ZodOptional<z.ZodString>;
|
|
1484
1508
|
overlay: z.ZodOptional<z.ZodString>;
|
|
1509
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
1485
1510
|
}, z.core.$strict>>>;
|
|
1486
1511
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1487
1512
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -1534,6 +1559,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1534
1559
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
1535
1560
|
audience: z.ZodOptional<z.ZodString>;
|
|
1536
1561
|
overlay: z.ZodOptional<z.ZodString>;
|
|
1562
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
1537
1563
|
}, z.core.$strict>>>;
|
|
1538
1564
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1539
1565
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -1585,6 +1611,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1585
1611
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
1586
1612
|
audience: z.ZodOptional<z.ZodString>;
|
|
1587
1613
|
overlay: z.ZodOptional<z.ZodString>;
|
|
1614
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
1588
1615
|
}, z.core.$strict>>>;
|
|
1589
1616
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1590
1617
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -1632,6 +1659,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1632
1659
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
1633
1660
|
audience: z.ZodOptional<z.ZodString>;
|
|
1634
1661
|
overlay: z.ZodOptional<z.ZodString>;
|
|
1662
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
1635
1663
|
}, z.core.$strict>>>;
|
|
1636
1664
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1637
1665
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -1676,6 +1704,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1676
1704
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
1677
1705
|
audience: z.ZodOptional<z.ZodString>;
|
|
1678
1706
|
overlay: z.ZodOptional<z.ZodString>;
|
|
1707
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
1679
1708
|
}, z.core.$strict>>>;
|
|
1680
1709
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1681
1710
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -1723,6 +1752,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1723
1752
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
1724
1753
|
audience: z.ZodOptional<z.ZodString>;
|
|
1725
1754
|
overlay: z.ZodOptional<z.ZodString>;
|
|
1755
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
1726
1756
|
}, z.core.$strict>>>;
|
|
1727
1757
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1728
1758
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -1771,6 +1801,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1771
1801
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
1772
1802
|
audience: z.ZodOptional<z.ZodString>;
|
|
1773
1803
|
overlay: z.ZodOptional<z.ZodString>;
|
|
1804
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
1774
1805
|
}, z.core.$strict>>>;
|
|
1775
1806
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1776
1807
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -1818,6 +1849,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1818
1849
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
1819
1850
|
audience: z.ZodOptional<z.ZodString>;
|
|
1820
1851
|
overlay: z.ZodOptional<z.ZodString>;
|
|
1852
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
1821
1853
|
}, z.core.$strict>>>;
|
|
1822
1854
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1823
1855
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -1865,6 +1897,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1865
1897
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
1866
1898
|
audience: z.ZodOptional<z.ZodString>;
|
|
1867
1899
|
overlay: z.ZodOptional<z.ZodString>;
|
|
1900
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
1868
1901
|
}, z.core.$strict>>>;
|
|
1869
1902
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1870
1903
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -1914,6 +1947,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1914
1947
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
1915
1948
|
audience: z.ZodOptional<z.ZodString>;
|
|
1916
1949
|
overlay: z.ZodOptional<z.ZodString>;
|
|
1950
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
1917
1951
|
}, z.core.$strict>>>;
|
|
1918
1952
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1919
1953
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -1958,6 +1992,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1958
1992
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
1959
1993
|
audience: z.ZodOptional<z.ZodString>;
|
|
1960
1994
|
overlay: z.ZodOptional<z.ZodString>;
|
|
1995
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
1961
1996
|
}, z.core.$strict>>>;
|
|
1962
1997
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1963
1998
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -2005,6 +2040,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2005
2040
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
2006
2041
|
audience: z.ZodOptional<z.ZodString>;
|
|
2007
2042
|
overlay: z.ZodOptional<z.ZodString>;
|
|
2043
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
2008
2044
|
}, z.core.$strict>>>;
|
|
2009
2045
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
2010
2046
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -2053,6 +2089,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2053
2089
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
2054
2090
|
audience: z.ZodOptional<z.ZodString>;
|
|
2055
2091
|
overlay: z.ZodOptional<z.ZodString>;
|
|
2092
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
2056
2093
|
}, z.core.$strict>>>;
|
|
2057
2094
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
2058
2095
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -2100,6 +2137,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2100
2137
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
2101
2138
|
audience: z.ZodOptional<z.ZodString>;
|
|
2102
2139
|
overlay: z.ZodOptional<z.ZodString>;
|
|
2140
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
2103
2141
|
}, z.core.$strict>>>;
|
|
2104
2142
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
2105
2143
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -2147,6 +2185,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2147
2185
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
2148
2186
|
audience: z.ZodOptional<z.ZodString>;
|
|
2149
2187
|
overlay: z.ZodOptional<z.ZodString>;
|
|
2188
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
2150
2189
|
}, z.core.$strict>>>;
|
|
2151
2190
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
2152
2191
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -2196,6 +2235,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2196
2235
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
2197
2236
|
audience: z.ZodOptional<z.ZodString>;
|
|
2198
2237
|
overlay: z.ZodOptional<z.ZodString>;
|
|
2238
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
2199
2239
|
}, z.core.$strict>>>;
|
|
2200
2240
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
2201
2241
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -2240,6 +2280,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2240
2280
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
2241
2281
|
audience: z.ZodOptional<z.ZodString>;
|
|
2242
2282
|
overlay: z.ZodOptional<z.ZodString>;
|
|
2283
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
2243
2284
|
}, z.core.$strict>>>;
|
|
2244
2285
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
2245
2286
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -2287,6 +2328,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2287
2328
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
2288
2329
|
audience: z.ZodOptional<z.ZodString>;
|
|
2289
2330
|
overlay: z.ZodOptional<z.ZodString>;
|
|
2331
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
2290
2332
|
}, z.core.$strict>>>;
|
|
2291
2333
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
2292
2334
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -2335,6 +2377,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2335
2377
|
settings_version: z.ZodOptional<z.ZodNumber>;
|
|
2336
2378
|
audience: z.ZodOptional<z.ZodString>;
|
|
2337
2379
|
overlay: z.ZodOptional<z.ZodString>;
|
|
2380
|
+
candidate: z.ZodOptional<z.ZodString>;
|
|
2338
2381
|
}, z.core.$strict>>>;
|
|
2339
2382
|
transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
2340
2383
|
session_id_origin: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -2406,9 +2449,8 @@ declare function identityScrub(value: unknown): unknown;
|
|
|
2406
2449
|
*
|
|
2407
2450
|
* The same four sinks as `sinks.py`:
|
|
2408
2451
|
*
|
|
2409
|
-
* - `StdoutSink` — JSONL to a
|
|
2410
|
-
*
|
|
2411
|
-
* JSON-RPC framing).
|
|
2452
|
+
* - `StdoutSink` — JSONL to stderr, or to a stream the vendor passes (MCP
|
|
2453
|
+
* stdio transport reserves stdout for JSON-RPC framing).
|
|
2412
2454
|
* - `FileSink` — JSONL appended to a file.
|
|
2413
2455
|
* - `HttpSink` — POST batches to any HTTP endpoint with bearer auth;
|
|
2414
2456
|
* bounded buffer, retry with backoff, circuit breaker. This is the contract a
|
|
@@ -2434,9 +2476,10 @@ declare class SinkClosedError extends Error {
|
|
|
2434
2476
|
name: string;
|
|
2435
2477
|
}
|
|
2436
2478
|
interface StdoutSinkOptions {
|
|
2437
|
-
/** Defaults to `process.stderr`
|
|
2438
|
-
*
|
|
2439
|
-
*
|
|
2479
|
+
/** Defaults to stderr (`console.warn` where `process.stderr` is missing or
|
|
2480
|
+
* cannot write): the MCP
|
|
2481
|
+
* stdio transport reserves stdout for JSON-RPC framing. Pass
|
|
2482
|
+
* `process.stdout` for non-MCP (library API) use if preferred. */
|
|
2440
2483
|
stream?: NodeJS.WritableStream;
|
|
2441
2484
|
}
|
|
2442
2485
|
declare class StdoutSink implements Sink {
|
|
@@ -2556,6 +2599,8 @@ declare class HttpSink implements Sink {
|
|
|
2556
2599
|
/** Set for the life of the sink by a 404 or 405 on the batch path. */
|
|
2557
2600
|
private batchless;
|
|
2558
2601
|
private exitHooks;
|
|
2602
|
+
/** The `process` the exit hooks were last tried on, so a refusal is not retried per write. */
|
|
2603
|
+
private exitHooksTriedOn;
|
|
2559
2604
|
/** The least time between two of this sink's loss reports. */
|
|
2560
2605
|
private static reportIntervalMs;
|
|
2561
2606
|
/** Totals only grow, so their sum tells whether they changed. */
|
|
@@ -3373,6 +3418,21 @@ declare function reportTool(options: {
|
|
|
3373
3418
|
name?: string;
|
|
3374
3419
|
}): ReportTool;
|
|
3375
3420
|
|
|
3421
|
+
/**
|
|
3422
|
+
* Shared LLM-facing text: server instructions + annotation tool
|
|
3423
|
+
* description. Byte-for-byte port of `baton` (Python)'s
|
|
3424
|
+
* `integrations/_llm_text.py` template strings; see that module's
|
|
3425
|
+
* docstring for the rationale. Kept in sync by hand, as there is no
|
|
3426
|
+
* cross-language codegen for prose, and checked:
|
|
3427
|
+
* `test/integrations/mcp/llmTextVectors.json` is Python's own rendering,
|
|
3428
|
+
* compared string-for-string.
|
|
3429
|
+
*
|
|
3430
|
+
* **Python's text.** Under `reportMode: "on"` it renders what Python
|
|
3431
|
+
* renders: the instructions are one sentence pointing at the
|
|
3432
|
+
* annotation tool, and the tool's description holds the triggers, the
|
|
3433
|
+
* recovery rule and the fields, so each rule is written once.
|
|
3434
|
+
*/
|
|
3435
|
+
|
|
3376
3436
|
/** The server instructions a vendor serving MCP itself puts in its
|
|
3377
3437
|
* `initialize` result beside `user_goal` (SPEC §5.6), and all of Baton's
|
|
3378
3438
|
* instructions under `reportMode: "off"`. */
|