@onlyflows/servicenow-mcp 2.3.0-dev.1 → 2.3.0-dev.2
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/CHANGELOG.md +258 -0
- package/README.md +141 -7
- package/dist/call-metrics.d.ts +42 -0
- package/dist/call-metrics.d.ts.map +1 -0
- package/dist/call-metrics.js +89 -0
- package/dist/call-metrics.js.map +1 -0
- package/dist/client.d.ts +14 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +40 -10
- package/dist/client.js.map +1 -1
- package/dist/encoded-query-policy.d.ts +9 -0
- package/dist/encoded-query-policy.d.ts.map +1 -1
- package/dist/encoded-query-policy.js +19 -1
- package/dist/encoded-query-policy.js.map +1 -1
- package/dist/http-runtime.js +16 -0
- package/dist/http-runtime.js.map +1 -1
- package/dist/metadata-cache.d.ts +97 -7
- package/dist/metadata-cache.d.ts.map +1 -1
- package/dist/metadata-cache.js +283 -21
- package/dist/metadata-cache.js.map +1 -1
- package/dist/setup-prompts.js +1 -1
- package/dist/setup-prompts.js.map +1 -1
- package/dist/setup.d.ts.map +1 -1
- package/dist/setup.js +10 -1
- package/dist/setup.js.map +1 -1
- package/dist/structured-query.d.ts +61 -2
- package/dist/structured-query.d.ts.map +1 -1
- package/dist/structured-query.js +376 -35
- package/dist/structured-query.js.map +1 -1
- package/dist/tools/codesearch.d.ts.map +1 -1
- package/dist/tools/codesearch.js +24 -4
- package/dist/tools/codesearch.js.map +1 -1
- package/dist/tools/flow-view-module.js +1 -1
- package/dist/tools/flow-view-module.js.map +1 -1
- package/dist/tools/get-module.js +1 -1
- package/dist/tools/get-module.js.map +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +24 -11
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/query-module.d.ts.map +1 -1
- package/dist/tools/query-module.js +205 -59
- package/dist/tools/query-module.js.map +1 -1
- package/dist/tools/result-envelope.d.ts +311 -0
- package/dist/tools/result-envelope.d.ts.map +1 -1
- package/dist/tools/result-envelope.js +314 -31
- package/dist/tools/result-envelope.js.map +1 -1
- package/dist/tools/schema-module.d.ts.map +1 -1
- package/dist/tools/schema-module.js +1 -1
- package/dist/tools/schema-module.js.map +1 -1
- package/dist/tools/truncation-hint.d.ts +125 -0
- package/dist/tools/truncation-hint.d.ts.map +1 -0
- package/dist/tools/truncation-hint.js +298 -0
- package/dist/tools/truncation-hint.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/CLIENT-SETUP.md +11 -1
- package/docs/PRODUCTION-SECURITY.md +17 -1
- package/package.json +1 -1
- package/server.json +2 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** Shared SNSDK-33 structured-result contracts and compatibility adapter. */
|
|
2
2
|
import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
+
import type { CallMetricsSnapshot } from "../call-metrics.js";
|
|
4
5
|
export declare const DEFAULT_RESULT_RECORD_LIMIT = 1000;
|
|
5
6
|
export declare const DEFAULT_RESULT_BYTE_LIMIT = 100000;
|
|
6
7
|
export declare const ATTACHMENT_RESULT_BYTE_LIMIT: number;
|
|
@@ -18,6 +19,17 @@ export declare const resultPaginationSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
18
19
|
order_by: z.ZodArray<z.ZodString>;
|
|
19
20
|
}, z.core.$strict>]>;
|
|
20
21
|
export declare const resultMetadataSchema: z.ZodObject<{
|
|
22
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
23
|
+
hit: "hit";
|
|
24
|
+
miss: "miss";
|
|
25
|
+
bypass: "bypass";
|
|
26
|
+
mixed: "mixed";
|
|
27
|
+
}>>;
|
|
28
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
29
|
+
total_ms: z.ZodNumber;
|
|
30
|
+
upstream_ms: z.ZodNumber;
|
|
31
|
+
watermark_ms: z.ZodNumber;
|
|
32
|
+
}, z.core.$strict>>;
|
|
21
33
|
kind: z.ZodEnum<{
|
|
22
34
|
collection: "collection";
|
|
23
35
|
operation: "operation";
|
|
@@ -52,6 +64,17 @@ export declare const resultMetadataSchema: z.ZodObject<{
|
|
|
52
64
|
export declare function withStructuredResultEnvelope<TSchema extends z.ZodType>(dataSchema: TSchema): z.ZodObject<Omit<{
|
|
53
65
|
data: TSchema;
|
|
54
66
|
metadata: z.ZodObject<{
|
|
67
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
68
|
+
hit: "hit";
|
|
69
|
+
miss: "miss";
|
|
70
|
+
bypass: "bypass";
|
|
71
|
+
mixed: "mixed";
|
|
72
|
+
}>>;
|
|
73
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
74
|
+
total_ms: z.ZodNumber;
|
|
75
|
+
upstream_ms: z.ZodNumber;
|
|
76
|
+
watermark_ms: z.ZodNumber;
|
|
77
|
+
}, z.core.$strict>>;
|
|
55
78
|
kind: z.ZodEnum<{
|
|
56
79
|
collection: "collection";
|
|
57
80
|
operation: "operation";
|
|
@@ -845,6 +868,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
845
868
|
results: z.ZodArray<z.ZodUnknown>;
|
|
846
869
|
}, z.core.$strict>;
|
|
847
870
|
metadata: z.ZodObject<{
|
|
871
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
872
|
+
hit: "hit";
|
|
873
|
+
miss: "miss";
|
|
874
|
+
bypass: "bypass";
|
|
875
|
+
mixed: "mixed";
|
|
876
|
+
}>>;
|
|
877
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
878
|
+
total_ms: z.ZodNumber;
|
|
879
|
+
upstream_ms: z.ZodNumber;
|
|
880
|
+
watermark_ms: z.ZodNumber;
|
|
881
|
+
}, z.core.$strict>>;
|
|
848
882
|
kind: z.ZodEnum<{
|
|
849
883
|
collection: "collection";
|
|
850
884
|
operation: "operation";
|
|
@@ -887,6 +921,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
887
921
|
hint: z.ZodOptional<z.ZodString>;
|
|
888
922
|
}, z.core.$strict>;
|
|
889
923
|
metadata: z.ZodObject<{
|
|
924
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
925
|
+
hit: "hit";
|
|
926
|
+
miss: "miss";
|
|
927
|
+
bypass: "bypass";
|
|
928
|
+
mixed: "mixed";
|
|
929
|
+
}>>;
|
|
930
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
931
|
+
total_ms: z.ZodNumber;
|
|
932
|
+
upstream_ms: z.ZodNumber;
|
|
933
|
+
watermark_ms: z.ZodNumber;
|
|
934
|
+
}, z.core.$strict>>;
|
|
890
935
|
kind: z.ZodEnum<{
|
|
891
936
|
collection: "collection";
|
|
892
937
|
operation: "operation";
|
|
@@ -931,6 +976,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
931
976
|
record: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
932
977
|
}, z.core.$strict>;
|
|
933
978
|
metadata: z.ZodObject<{
|
|
979
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
980
|
+
hit: "hit";
|
|
981
|
+
miss: "miss";
|
|
982
|
+
bypass: "bypass";
|
|
983
|
+
mixed: "mixed";
|
|
984
|
+
}>>;
|
|
985
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
986
|
+
total_ms: z.ZodNumber;
|
|
987
|
+
upstream_ms: z.ZodNumber;
|
|
988
|
+
watermark_ms: z.ZodNumber;
|
|
989
|
+
}, z.core.$strict>>;
|
|
934
990
|
kind: z.ZodEnum<{
|
|
935
991
|
collection: "collection";
|
|
936
992
|
operation: "operation";
|
|
@@ -973,6 +1029,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
973
1029
|
record: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
974
1030
|
}, z.core.$strict>;
|
|
975
1031
|
metadata: z.ZodObject<{
|
|
1032
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
1033
|
+
hit: "hit";
|
|
1034
|
+
miss: "miss";
|
|
1035
|
+
bypass: "bypass";
|
|
1036
|
+
mixed: "mixed";
|
|
1037
|
+
}>>;
|
|
1038
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
1039
|
+
total_ms: z.ZodNumber;
|
|
1040
|
+
upstream_ms: z.ZodNumber;
|
|
1041
|
+
watermark_ms: z.ZodNumber;
|
|
1042
|
+
}, z.core.$strict>>;
|
|
976
1043
|
kind: z.ZodEnum<{
|
|
977
1044
|
collection: "collection";
|
|
978
1045
|
operation: "operation";
|
|
@@ -1019,6 +1086,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
1019
1086
|
}>;
|
|
1020
1087
|
}, z.core.$strict>;
|
|
1021
1088
|
metadata: z.ZodObject<{
|
|
1089
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
1090
|
+
hit: "hit";
|
|
1091
|
+
miss: "miss";
|
|
1092
|
+
bypass: "bypass";
|
|
1093
|
+
mixed: "mixed";
|
|
1094
|
+
}>>;
|
|
1095
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
1096
|
+
total_ms: z.ZodNumber;
|
|
1097
|
+
upstream_ms: z.ZodNumber;
|
|
1098
|
+
watermark_ms: z.ZodNumber;
|
|
1099
|
+
}, z.core.$strict>>;
|
|
1022
1100
|
kind: z.ZodEnum<{
|
|
1023
1101
|
collection: "collection";
|
|
1024
1102
|
operation: "operation";
|
|
@@ -1065,6 +1143,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
1065
1143
|
}>;
|
|
1066
1144
|
}, z.core.$strict>;
|
|
1067
1145
|
metadata: z.ZodObject<{
|
|
1146
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
1147
|
+
hit: "hit";
|
|
1148
|
+
miss: "miss";
|
|
1149
|
+
bypass: "bypass";
|
|
1150
|
+
mixed: "mixed";
|
|
1151
|
+
}>>;
|
|
1152
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
1153
|
+
total_ms: z.ZodNumber;
|
|
1154
|
+
upstream_ms: z.ZodNumber;
|
|
1155
|
+
watermark_ms: z.ZodNumber;
|
|
1156
|
+
}, z.core.$strict>>;
|
|
1068
1157
|
kind: z.ZodEnum<{
|
|
1069
1158
|
collection: "collection";
|
|
1070
1159
|
operation: "operation";
|
|
@@ -1108,6 +1197,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
1108
1197
|
table: z.ZodString;
|
|
1109
1198
|
}, z.core.$strict>;
|
|
1110
1199
|
metadata: z.ZodObject<{
|
|
1200
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
1201
|
+
hit: "hit";
|
|
1202
|
+
miss: "miss";
|
|
1203
|
+
bypass: "bypass";
|
|
1204
|
+
mixed: "mixed";
|
|
1205
|
+
}>>;
|
|
1206
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
1207
|
+
total_ms: z.ZodNumber;
|
|
1208
|
+
upstream_ms: z.ZodNumber;
|
|
1209
|
+
watermark_ms: z.ZodNumber;
|
|
1210
|
+
}, z.core.$strict>>;
|
|
1111
1211
|
kind: z.ZodEnum<{
|
|
1112
1212
|
collection: "collection";
|
|
1113
1213
|
operation: "operation";
|
|
@@ -1164,6 +1264,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
1164
1264
|
failed: z.ZodOptional<z.ZodNumber>;
|
|
1165
1265
|
}, z.core.$strict>;
|
|
1166
1266
|
metadata: z.ZodObject<{
|
|
1267
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
1268
|
+
hit: "hit";
|
|
1269
|
+
miss: "miss";
|
|
1270
|
+
bypass: "bypass";
|
|
1271
|
+
mixed: "mixed";
|
|
1272
|
+
}>>;
|
|
1273
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
1274
|
+
total_ms: z.ZodNumber;
|
|
1275
|
+
upstream_ms: z.ZodNumber;
|
|
1276
|
+
watermark_ms: z.ZodNumber;
|
|
1277
|
+
}, z.core.$strict>>;
|
|
1167
1278
|
kind: z.ZodEnum<{
|
|
1168
1279
|
collection: "collection";
|
|
1169
1280
|
operation: "operation";
|
|
@@ -1205,6 +1316,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
1205
1316
|
result: z.ZodUnion<readonly [z.ZodNull, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodUnknown>]>;
|
|
1206
1317
|
}, z.core.$strict>;
|
|
1207
1318
|
metadata: z.ZodObject<{
|
|
1319
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
1320
|
+
hit: "hit";
|
|
1321
|
+
miss: "miss";
|
|
1322
|
+
bypass: "bypass";
|
|
1323
|
+
mixed: "mixed";
|
|
1324
|
+
}>>;
|
|
1325
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
1326
|
+
total_ms: z.ZodNumber;
|
|
1327
|
+
upstream_ms: z.ZodNumber;
|
|
1328
|
+
watermark_ms: z.ZodNumber;
|
|
1329
|
+
}, z.core.$strict>>;
|
|
1208
1330
|
kind: z.ZodEnum<{
|
|
1209
1331
|
collection: "collection";
|
|
1210
1332
|
operation: "operation";
|
|
@@ -1246,6 +1368,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
1246
1368
|
fields: z.ZodArray<z.ZodUnknown>;
|
|
1247
1369
|
}, z.core.$strict>;
|
|
1248
1370
|
metadata: z.ZodObject<{
|
|
1371
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
1372
|
+
hit: "hit";
|
|
1373
|
+
miss: "miss";
|
|
1374
|
+
bypass: "bypass";
|
|
1375
|
+
mixed: "mixed";
|
|
1376
|
+
}>>;
|
|
1377
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
1378
|
+
total_ms: z.ZodNumber;
|
|
1379
|
+
upstream_ms: z.ZodNumber;
|
|
1380
|
+
watermark_ms: z.ZodNumber;
|
|
1381
|
+
}, z.core.$strict>>;
|
|
1249
1382
|
kind: z.ZodEnum<{
|
|
1250
1383
|
collection: "collection";
|
|
1251
1384
|
operation: "operation";
|
|
@@ -1287,6 +1420,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
1287
1420
|
health: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1288
1421
|
}, z.core.$strict>;
|
|
1289
1422
|
metadata: z.ZodObject<{
|
|
1423
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
1424
|
+
hit: "hit";
|
|
1425
|
+
miss: "miss";
|
|
1426
|
+
bypass: "bypass";
|
|
1427
|
+
mixed: "mixed";
|
|
1428
|
+
}>>;
|
|
1429
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
1430
|
+
total_ms: z.ZodNumber;
|
|
1431
|
+
upstream_ms: z.ZodNumber;
|
|
1432
|
+
watermark_ms: z.ZodNumber;
|
|
1433
|
+
}, z.core.$strict>>;
|
|
1290
1434
|
kind: z.ZodEnum<{
|
|
1291
1435
|
collection: "collection";
|
|
1292
1436
|
operation: "operation";
|
|
@@ -1333,6 +1477,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
1333
1477
|
result: z.ZodUnion<readonly [z.ZodNull, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodUnknown>]>;
|
|
1334
1478
|
}, z.core.$strict>;
|
|
1335
1479
|
metadata: z.ZodObject<{
|
|
1480
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
1481
|
+
hit: "hit";
|
|
1482
|
+
miss: "miss";
|
|
1483
|
+
bypass: "bypass";
|
|
1484
|
+
mixed: "mixed";
|
|
1485
|
+
}>>;
|
|
1486
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
1487
|
+
total_ms: z.ZodNumber;
|
|
1488
|
+
upstream_ms: z.ZodNumber;
|
|
1489
|
+
watermark_ms: z.ZodNumber;
|
|
1490
|
+
}, z.core.$strict>>;
|
|
1336
1491
|
kind: z.ZodEnum<{
|
|
1337
1492
|
collection: "collection";
|
|
1338
1493
|
operation: "operation";
|
|
@@ -1377,6 +1532,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
1377
1532
|
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1378
1533
|
}, z.core.$strict>;
|
|
1379
1534
|
metadata: z.ZodObject<{
|
|
1535
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
1536
|
+
hit: "hit";
|
|
1537
|
+
miss: "miss";
|
|
1538
|
+
bypass: "bypass";
|
|
1539
|
+
mixed: "mixed";
|
|
1540
|
+
}>>;
|
|
1541
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
1542
|
+
total_ms: z.ZodNumber;
|
|
1543
|
+
upstream_ms: z.ZodNumber;
|
|
1544
|
+
watermark_ms: z.ZodNumber;
|
|
1545
|
+
}, z.core.$strict>>;
|
|
1380
1546
|
kind: z.ZodEnum<{
|
|
1381
1547
|
collection: "collection";
|
|
1382
1548
|
operation: "operation";
|
|
@@ -1425,6 +1591,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
1425
1591
|
results: z.ZodArray<z.ZodUnknown>;
|
|
1426
1592
|
}, z.core.$strict>;
|
|
1427
1593
|
metadata: z.ZodObject<{
|
|
1594
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
1595
|
+
hit: "hit";
|
|
1596
|
+
miss: "miss";
|
|
1597
|
+
bypass: "bypass";
|
|
1598
|
+
mixed: "mixed";
|
|
1599
|
+
}>>;
|
|
1600
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
1601
|
+
total_ms: z.ZodNumber;
|
|
1602
|
+
upstream_ms: z.ZodNumber;
|
|
1603
|
+
watermark_ms: z.ZodNumber;
|
|
1604
|
+
}, z.core.$strict>>;
|
|
1428
1605
|
kind: z.ZodEnum<{
|
|
1429
1606
|
collection: "collection";
|
|
1430
1607
|
operation: "operation";
|
|
@@ -1467,6 +1644,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
1467
1644
|
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1468
1645
|
}, z.core.$strict>;
|
|
1469
1646
|
metadata: z.ZodObject<{
|
|
1647
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
1648
|
+
hit: "hit";
|
|
1649
|
+
miss: "miss";
|
|
1650
|
+
bypass: "bypass";
|
|
1651
|
+
mixed: "mixed";
|
|
1652
|
+
}>>;
|
|
1653
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
1654
|
+
total_ms: z.ZodNumber;
|
|
1655
|
+
upstream_ms: z.ZodNumber;
|
|
1656
|
+
watermark_ms: z.ZodNumber;
|
|
1657
|
+
}, z.core.$strict>>;
|
|
1470
1658
|
kind: z.ZodEnum<{
|
|
1471
1659
|
collection: "collection";
|
|
1472
1660
|
operation: "operation";
|
|
@@ -1509,6 +1697,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
1509
1697
|
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1510
1698
|
}, z.core.$strict>;
|
|
1511
1699
|
metadata: z.ZodObject<{
|
|
1700
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
1701
|
+
hit: "hit";
|
|
1702
|
+
miss: "miss";
|
|
1703
|
+
bypass: "bypass";
|
|
1704
|
+
mixed: "mixed";
|
|
1705
|
+
}>>;
|
|
1706
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
1707
|
+
total_ms: z.ZodNumber;
|
|
1708
|
+
upstream_ms: z.ZodNumber;
|
|
1709
|
+
watermark_ms: z.ZodNumber;
|
|
1710
|
+
}, z.core.$strict>>;
|
|
1512
1711
|
kind: z.ZodEnum<{
|
|
1513
1712
|
collection: "collection";
|
|
1514
1713
|
operation: "operation";
|
|
@@ -1557,6 +1756,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
1557
1756
|
result: z.ZodUnion<readonly [z.ZodNull, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodUnknown>]>;
|
|
1558
1757
|
}, z.core.$strict>;
|
|
1559
1758
|
metadata: z.ZodObject<{
|
|
1759
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
1760
|
+
hit: "hit";
|
|
1761
|
+
miss: "miss";
|
|
1762
|
+
bypass: "bypass";
|
|
1763
|
+
mixed: "mixed";
|
|
1764
|
+
}>>;
|
|
1765
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
1766
|
+
total_ms: z.ZodNumber;
|
|
1767
|
+
upstream_ms: z.ZodNumber;
|
|
1768
|
+
watermark_ms: z.ZodNumber;
|
|
1769
|
+
}, z.core.$strict>>;
|
|
1560
1770
|
kind: z.ZodEnum<{
|
|
1561
1771
|
collection: "collection";
|
|
1562
1772
|
operation: "operation";
|
|
@@ -1673,6 +1883,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
1673
1883
|
warnings: z.ZodArray<z.ZodString>;
|
|
1674
1884
|
}, z.core.$strict>;
|
|
1675
1885
|
metadata: z.ZodObject<{
|
|
1886
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
1887
|
+
hit: "hit";
|
|
1888
|
+
miss: "miss";
|
|
1889
|
+
bypass: "bypass";
|
|
1890
|
+
mixed: "mixed";
|
|
1891
|
+
}>>;
|
|
1892
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
1893
|
+
total_ms: z.ZodNumber;
|
|
1894
|
+
upstream_ms: z.ZodNumber;
|
|
1895
|
+
watermark_ms: z.ZodNumber;
|
|
1896
|
+
}, z.core.$strict>>;
|
|
1676
1897
|
kind: z.ZodEnum<{
|
|
1677
1898
|
collection: "collection";
|
|
1678
1899
|
operation: "operation";
|
|
@@ -1861,6 +2082,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
1861
2082
|
message: z.ZodOptional<z.ZodString>;
|
|
1862
2083
|
}, z.core.$strict>;
|
|
1863
2084
|
metadata: z.ZodObject<{
|
|
2085
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
2086
|
+
hit: "hit";
|
|
2087
|
+
miss: "miss";
|
|
2088
|
+
bypass: "bypass";
|
|
2089
|
+
mixed: "mixed";
|
|
2090
|
+
}>>;
|
|
2091
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
2092
|
+
total_ms: z.ZodNumber;
|
|
2093
|
+
upstream_ms: z.ZodNumber;
|
|
2094
|
+
watermark_ms: z.ZodNumber;
|
|
2095
|
+
}, z.core.$strict>>;
|
|
1864
2096
|
kind: z.ZodEnum<{
|
|
1865
2097
|
collection: "collection";
|
|
1866
2098
|
operation: "operation";
|
|
@@ -1915,6 +2147,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
1915
2147
|
}, z.core.$strict>>;
|
|
1916
2148
|
}, z.core.$strict>;
|
|
1917
2149
|
metadata: z.ZodObject<{
|
|
2150
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
2151
|
+
hit: "hit";
|
|
2152
|
+
miss: "miss";
|
|
2153
|
+
bypass: "bypass";
|
|
2154
|
+
mixed: "mixed";
|
|
2155
|
+
}>>;
|
|
2156
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
2157
|
+
total_ms: z.ZodNumber;
|
|
2158
|
+
upstream_ms: z.ZodNumber;
|
|
2159
|
+
watermark_ms: z.ZodNumber;
|
|
2160
|
+
}, z.core.$strict>>;
|
|
1918
2161
|
kind: z.ZodEnum<{
|
|
1919
2162
|
collection: "collection";
|
|
1920
2163
|
operation: "operation";
|
|
@@ -1981,6 +2224,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
1981
2224
|
message: z.ZodOptional<z.ZodString>;
|
|
1982
2225
|
}, z.core.$strict>;
|
|
1983
2226
|
metadata: z.ZodObject<{
|
|
2227
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
2228
|
+
hit: "hit";
|
|
2229
|
+
miss: "miss";
|
|
2230
|
+
bypass: "bypass";
|
|
2231
|
+
mixed: "mixed";
|
|
2232
|
+
}>>;
|
|
2233
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
2234
|
+
total_ms: z.ZodNumber;
|
|
2235
|
+
upstream_ms: z.ZodNumber;
|
|
2236
|
+
watermark_ms: z.ZodNumber;
|
|
2237
|
+
}, z.core.$strict>>;
|
|
1984
2238
|
kind: z.ZodEnum<{
|
|
1985
2239
|
collection: "collection";
|
|
1986
2240
|
operation: "operation";
|
|
@@ -2351,6 +2605,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
2351
2605
|
}, z.core.$strict>;
|
|
2352
2606
|
}, z.core.$strict>;
|
|
2353
2607
|
metadata: z.ZodObject<{
|
|
2608
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
2609
|
+
hit: "hit";
|
|
2610
|
+
miss: "miss";
|
|
2611
|
+
bypass: "bypass";
|
|
2612
|
+
mixed: "mixed";
|
|
2613
|
+
}>>;
|
|
2614
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
2615
|
+
total_ms: z.ZodNumber;
|
|
2616
|
+
upstream_ms: z.ZodNumber;
|
|
2617
|
+
watermark_ms: z.ZodNumber;
|
|
2618
|
+
}, z.core.$strict>>;
|
|
2354
2619
|
kind: z.ZodEnum<{
|
|
2355
2620
|
collection: "collection";
|
|
2356
2621
|
operation: "operation";
|
|
@@ -2392,6 +2657,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
2392
2657
|
request: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2393
2658
|
}, z.core.$strict>;
|
|
2394
2659
|
metadata: z.ZodObject<{
|
|
2660
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
2661
|
+
hit: "hit";
|
|
2662
|
+
miss: "miss";
|
|
2663
|
+
bypass: "bypass";
|
|
2664
|
+
mixed: "mixed";
|
|
2665
|
+
}>>;
|
|
2666
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
2667
|
+
total_ms: z.ZodNumber;
|
|
2668
|
+
upstream_ms: z.ZodNumber;
|
|
2669
|
+
watermark_ms: z.ZodNumber;
|
|
2670
|
+
}, z.core.$strict>>;
|
|
2395
2671
|
kind: z.ZodEnum<{
|
|
2396
2672
|
collection: "collection";
|
|
2397
2673
|
operation: "operation";
|
|
@@ -2441,6 +2717,17 @@ export declare const productionToolOutputSchemas: Readonly<{
|
|
|
2441
2717
|
policy_card: z.ZodOptional<z.ZodString>;
|
|
2442
2718
|
}, z.core.$strict>;
|
|
2443
2719
|
metadata: z.ZodObject<{
|
|
2720
|
+
cache: z.ZodOptional<z.ZodEnum<{
|
|
2721
|
+
hit: "hit";
|
|
2722
|
+
miss: "miss";
|
|
2723
|
+
bypass: "bypass";
|
|
2724
|
+
mixed: "mixed";
|
|
2725
|
+
}>>;
|
|
2726
|
+
timing: z.ZodOptional<z.ZodObject<{
|
|
2727
|
+
total_ms: z.ZodNumber;
|
|
2728
|
+
upstream_ms: z.ZodNumber;
|
|
2729
|
+
watermark_ms: z.ZodNumber;
|
|
2730
|
+
}, z.core.$strict>>;
|
|
2444
2731
|
kind: z.ZodEnum<{
|
|
2445
2732
|
collection: "collection";
|
|
2446
2733
|
operation: "operation";
|
|
@@ -2498,6 +2785,11 @@ export interface EnvelopeTextRenderContext {
|
|
|
2498
2785
|
/** Trusted coordinator inputs to text rendering; never part of structuredContent. */
|
|
2499
2786
|
export interface EnvelopeTextRenderOptions {
|
|
2500
2787
|
readonly instanceOrigin?: string;
|
|
2788
|
+
/**
|
|
2789
|
+
* The most `max_response_bytes` this call may use when a raw-read rule holds
|
|
2790
|
+
* it below the schema maximum; a truncation hint never offers more.
|
|
2791
|
+
*/
|
|
2792
|
+
readonly maxResponseBytesCap?: number;
|
|
2501
2793
|
}
|
|
2502
2794
|
/**
|
|
2503
2795
|
* Human-readable text for one tool's successful result. It receives a deeply
|
|
@@ -2507,6 +2799,25 @@ export interface EnvelopeTextRenderOptions {
|
|
|
2507
2799
|
export type EnvelopeTextRenderer = (envelope: RenderableEnvelope, context: EnvelopeTextRenderContext) => string;
|
|
2508
2800
|
/** Register the text renderer for one production tool, once, before first use. */
|
|
2509
2801
|
export declare function registerEnvelopeTextRenderer(tool: ProductionToolName, renderer: EnvelopeTextRenderer): void;
|
|
2802
|
+
/**
|
|
2803
|
+
* Remove `metadata.cache` and `metadata.timing` from a handler's result. Only
|
|
2804
|
+
* the dispatcher reports them, from what it observed, so a value a handler
|
|
2805
|
+
* sets is never passed on, whether or not the dispatcher adds its own.
|
|
2806
|
+
*/
|
|
2807
|
+
export declare function withoutCallMetadata(result: CallToolResult): CallToolResult;
|
|
2808
|
+
/**
|
|
2809
|
+
* Add what the call reports about itself to a finished result's envelope
|
|
2810
|
+
* metadata. The two fields are not counted against the result's byte limit.
|
|
2811
|
+
*
|
|
2812
|
+
* They are diagnostics, so they never cost the caller anything: the result is
|
|
2813
|
+
* fitted to its limit first, exactly as before, with the fit, the paging
|
|
2814
|
+
* fields and the truncation hint knowing nothing about them, and the fields
|
|
2815
|
+
* are added after. A successful response therefore carries them always, on the
|
|
2816
|
+
* calls where the timing matters most (a truncated one is often fitted to
|
|
2817
|
+
* within a few bytes of the limit), and may exceed the limit by their size,
|
|
2818
|
+
* under 100 bytes. A result that is not an envelope comes back untouched.
|
|
2819
|
+
*/
|
|
2820
|
+
export declare function withCallMetadata(handlerResult: CallToolResult, snapshot: CallMetricsSnapshot): CallToolResult;
|
|
2510
2821
|
export declare function envelopeCompatibilityResult(name: ProductionToolName, args: Readonly<Record<string, unknown>>, result: CallToolResult): CallToolResult;
|
|
2511
2822
|
/**
|
|
2512
2823
|
* Replace handler text with coordinator-rendered text and enforce the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-envelope.d.ts","sourceRoot":"","sources":["../../src/tools/result-envelope.ts"],"names":[],"mappings":"AAEA,6EAA6E;AAE7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
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