@bryan-thompson/inspector-assessment-client 1.30.1 → 1.31.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.
Files changed (52) hide show
  1. package/dist/assets/{OAuthCallback-BbE88qbF.js → OAuthCallback-CXcl26vR.js} +1 -1
  2. package/dist/assets/{OAuthDebugCallback-CfRYq1JG.js → OAuthDebugCallback-J9s4SF_c.js} +1 -1
  3. package/dist/assets/{index-cHhcEXbr.css → index-BoUA5OL1.css} +3 -0
  4. package/dist/assets/{index-CsUB73MT.js → index-_HAw2b2G.js} +3746 -115
  5. package/dist/index.html +2 -2
  6. package/lib/lib/assessment/configTypes.d.ts +6 -0
  7. package/lib/lib/assessment/configTypes.d.ts.map +1 -1
  8. package/lib/lib/assessment/extendedTypes.d.ts +74 -0
  9. package/lib/lib/assessment/extendedTypes.d.ts.map +1 -1
  10. package/lib/lib/assessment/resultTypes.d.ts +3 -1
  11. package/lib/lib/assessment/resultTypes.d.ts.map +1 -1
  12. package/lib/lib/assessment/sharedSchemas.d.ts +140 -0
  13. package/lib/lib/assessment/sharedSchemas.d.ts.map +1 -0
  14. package/lib/lib/assessment/sharedSchemas.js +113 -0
  15. package/lib/lib/securityPatterns.d.ts.map +1 -1
  16. package/lib/lib/securityPatterns.js +2 -2
  17. package/lib/services/assessment/AssessmentOrchestrator.d.ts +1 -0
  18. package/lib/services/assessment/AssessmentOrchestrator.d.ts.map +1 -1
  19. package/lib/services/assessment/AssessmentOrchestrator.js +34 -1
  20. package/lib/services/assessment/ResponseValidator.d.ts +10 -0
  21. package/lib/services/assessment/ResponseValidator.d.ts.map +1 -1
  22. package/lib/services/assessment/ResponseValidator.js +30 -6
  23. package/lib/services/assessment/config/performanceConfig.d.ts +2 -0
  24. package/lib/services/assessment/config/performanceConfig.d.ts.map +1 -1
  25. package/lib/services/assessment/config/performanceConfig.js +5 -33
  26. package/lib/services/assessment/config/performanceConfigSchemas.d.ts +111 -0
  27. package/lib/services/assessment/config/performanceConfigSchemas.d.ts.map +1 -0
  28. package/lib/services/assessment/config/performanceConfigSchemas.js +123 -0
  29. package/lib/services/assessment/modules/ConformanceAssessor.d.ts +60 -0
  30. package/lib/services/assessment/modules/ConformanceAssessor.d.ts.map +1 -0
  31. package/lib/services/assessment/modules/ConformanceAssessor.js +308 -0
  32. package/lib/services/assessment/modules/ResourceAssessor.d.ts +14 -0
  33. package/lib/services/assessment/modules/ResourceAssessor.d.ts.map +1 -1
  34. package/lib/services/assessment/modules/ResourceAssessor.js +221 -0
  35. package/lib/services/assessment/modules/TemporalAssessor.d.ts +14 -0
  36. package/lib/services/assessment/modules/TemporalAssessor.d.ts.map +1 -1
  37. package/lib/services/assessment/modules/TemporalAssessor.js +29 -1
  38. package/lib/services/assessment/modules/annotations/AlignmentChecker.d.ts +9 -0
  39. package/lib/services/assessment/modules/annotations/AlignmentChecker.d.ts.map +1 -1
  40. package/lib/services/assessment/modules/annotations/AlignmentChecker.js +97 -5
  41. package/lib/services/assessment/modules/annotations/DescriptionPoisoningDetector.d.ts +6 -4
  42. package/lib/services/assessment/modules/annotations/DescriptionPoisoningDetector.d.ts.map +1 -1
  43. package/lib/services/assessment/modules/annotations/DescriptionPoisoningDetector.js +58 -0
  44. package/lib/services/assessment/modules/annotations/index.d.ts +1 -1
  45. package/lib/services/assessment/modules/annotations/index.d.ts.map +1 -1
  46. package/lib/services/assessment/modules/annotations/index.js +2 -1
  47. package/lib/services/assessment/modules/securityTests/SecurityResponseAnalyzer.d.ts.map +1 -1
  48. package/lib/services/assessment/modules/securityTests/SecurityResponseAnalyzer.js +3 -3
  49. package/lib/services/assessment/responseValidatorSchemas.d.ts +751 -0
  50. package/lib/services/assessment/responseValidatorSchemas.d.ts.map +1 -0
  51. package/lib/services/assessment/responseValidatorSchemas.js +244 -0
  52. package/package.json +1 -1
@@ -0,0 +1,751 @@
1
+ /**
2
+ * Zod Schemas for Response Validation Types
3
+ *
4
+ * Runtime validation schemas for MCP tool response validation.
5
+ * Provides safe parsing of MCP SDK response types to replace type assertions.
6
+ *
7
+ * @module assessment/responseValidatorSchemas
8
+ * @see ResponseValidator.ts - Consumer of these schemas
9
+ * @see resultTypes.ts - ResponseMetadata interface definition
10
+ */
11
+ import { z } from "zod";
12
+ import { ZOD_SCHEMA_VERSION } from "../../lib/assessment/sharedSchemas.js";
13
+ export { ZOD_SCHEMA_VERSION };
14
+ /**
15
+ * Schema for MCP content type enum values.
16
+ */
17
+ export declare const ContentTypeSchema: z.ZodEnum<["text", "image", "resource", "resource_link", "audio"]>;
18
+ export type ContentType = z.infer<typeof ContentTypeSchema>;
19
+ /**
20
+ * Schema for a text content block.
21
+ */
22
+ export declare const TextContentBlockSchema: z.ZodObject<{
23
+ type: z.ZodLiteral<"text">;
24
+ text: z.ZodString;
25
+ }, "strip", z.ZodTypeAny, {
26
+ text?: string;
27
+ type?: "text";
28
+ }, {
29
+ text?: string;
30
+ type?: "text";
31
+ }>;
32
+ /**
33
+ * Schema for an image content block.
34
+ */
35
+ export declare const ImageContentBlockSchema: z.ZodObject<{
36
+ type: z.ZodLiteral<"image">;
37
+ data: z.ZodString;
38
+ mimeType: z.ZodString;
39
+ }, "strip", z.ZodTypeAny, {
40
+ type?: "image";
41
+ mimeType?: string;
42
+ data?: string;
43
+ }, {
44
+ type?: "image";
45
+ mimeType?: string;
46
+ data?: string;
47
+ }>;
48
+ /**
49
+ * Schema for a resource content block.
50
+ */
51
+ export declare const ResourceContentBlockSchema: z.ZodObject<{
52
+ type: z.ZodUnion<[z.ZodLiteral<"resource">, z.ZodLiteral<"resource_link">]>;
53
+ uri: z.ZodOptional<z.ZodString>;
54
+ mimeType: z.ZodOptional<z.ZodString>;
55
+ }, "strip", z.ZodTypeAny, {
56
+ type?: "resource_link" | "resource";
57
+ mimeType?: string;
58
+ uri?: string;
59
+ }, {
60
+ type?: "resource_link" | "resource";
61
+ mimeType?: string;
62
+ uri?: string;
63
+ }>;
64
+ /**
65
+ * Schema for an audio content block.
66
+ */
67
+ export declare const AudioContentBlockSchema: z.ZodObject<{
68
+ type: z.ZodLiteral<"audio">;
69
+ data: z.ZodString;
70
+ mimeType: z.ZodOptional<z.ZodString>;
71
+ }, "strip", z.ZodTypeAny, {
72
+ type?: "audio";
73
+ mimeType?: string;
74
+ data?: string;
75
+ }, {
76
+ type?: "audio";
77
+ mimeType?: string;
78
+ data?: string;
79
+ }>;
80
+ /**
81
+ * Generic content block schema that accepts any type string.
82
+ * Used as fallback for unknown content types.
83
+ */
84
+ export declare const GenericContentBlockSchema: z.ZodObject<{
85
+ type: z.ZodString;
86
+ text: z.ZodOptional<z.ZodString>;
87
+ data: z.ZodOptional<z.ZodString>;
88
+ mimeType: z.ZodOptional<z.ZodString>;
89
+ uri: z.ZodOptional<z.ZodString>;
90
+ }, "strip", z.ZodTypeAny, {
91
+ text?: string;
92
+ type?: string;
93
+ mimeType?: string;
94
+ data?: string;
95
+ uri?: string;
96
+ }, {
97
+ text?: string;
98
+ type?: string;
99
+ mimeType?: string;
100
+ data?: string;
101
+ uri?: string;
102
+ }>;
103
+ /**
104
+ * Union of all known content block types, with fallback for unknown types.
105
+ */
106
+ export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
107
+ type: z.ZodLiteral<"text">;
108
+ text: z.ZodString;
109
+ }, "strip", z.ZodTypeAny, {
110
+ text?: string;
111
+ type?: "text";
112
+ }, {
113
+ text?: string;
114
+ type?: "text";
115
+ }>, z.ZodObject<{
116
+ type: z.ZodLiteral<"image">;
117
+ data: z.ZodString;
118
+ mimeType: z.ZodString;
119
+ }, "strip", z.ZodTypeAny, {
120
+ type?: "image";
121
+ mimeType?: string;
122
+ data?: string;
123
+ }, {
124
+ type?: "image";
125
+ mimeType?: string;
126
+ data?: string;
127
+ }>, z.ZodObject<{
128
+ type: z.ZodUnion<[z.ZodLiteral<"resource">, z.ZodLiteral<"resource_link">]>;
129
+ uri: z.ZodOptional<z.ZodString>;
130
+ mimeType: z.ZodOptional<z.ZodString>;
131
+ }, "strip", z.ZodTypeAny, {
132
+ type?: "resource_link" | "resource";
133
+ mimeType?: string;
134
+ uri?: string;
135
+ }, {
136
+ type?: "resource_link" | "resource";
137
+ mimeType?: string;
138
+ uri?: string;
139
+ }>, z.ZodObject<{
140
+ type: z.ZodLiteral<"audio">;
141
+ data: z.ZodString;
142
+ mimeType: z.ZodOptional<z.ZodString>;
143
+ }, "strip", z.ZodTypeAny, {
144
+ type?: "audio";
145
+ mimeType?: string;
146
+ data?: string;
147
+ }, {
148
+ type?: "audio";
149
+ mimeType?: string;
150
+ data?: string;
151
+ }>, z.ZodObject<{
152
+ type: z.ZodString;
153
+ text: z.ZodOptional<z.ZodString>;
154
+ data: z.ZodOptional<z.ZodString>;
155
+ mimeType: z.ZodOptional<z.ZodString>;
156
+ uri: z.ZodOptional<z.ZodString>;
157
+ }, "strip", z.ZodTypeAny, {
158
+ text?: string;
159
+ type?: string;
160
+ mimeType?: string;
161
+ data?: string;
162
+ uri?: string;
163
+ }, {
164
+ text?: string;
165
+ type?: string;
166
+ mimeType?: string;
167
+ data?: string;
168
+ uri?: string;
169
+ }>]>;
170
+ export type ContentBlock = z.infer<typeof ContentBlockSchema>;
171
+ /**
172
+ * Schema for content array in MCP responses.
173
+ * Uses ContentBlockSchema union for stricter type discrimination.
174
+ */
175
+ export declare const ContentArraySchema: z.ZodArray<z.ZodUnion<[z.ZodObject<{
176
+ type: z.ZodLiteral<"text">;
177
+ text: z.ZodString;
178
+ }, "strip", z.ZodTypeAny, {
179
+ text?: string;
180
+ type?: "text";
181
+ }, {
182
+ text?: string;
183
+ type?: "text";
184
+ }>, z.ZodObject<{
185
+ type: z.ZodLiteral<"image">;
186
+ data: z.ZodString;
187
+ mimeType: z.ZodString;
188
+ }, "strip", z.ZodTypeAny, {
189
+ type?: "image";
190
+ mimeType?: string;
191
+ data?: string;
192
+ }, {
193
+ type?: "image";
194
+ mimeType?: string;
195
+ data?: string;
196
+ }>, z.ZodObject<{
197
+ type: z.ZodUnion<[z.ZodLiteral<"resource">, z.ZodLiteral<"resource_link">]>;
198
+ uri: z.ZodOptional<z.ZodString>;
199
+ mimeType: z.ZodOptional<z.ZodString>;
200
+ }, "strip", z.ZodTypeAny, {
201
+ type?: "resource_link" | "resource";
202
+ mimeType?: string;
203
+ uri?: string;
204
+ }, {
205
+ type?: "resource_link" | "resource";
206
+ mimeType?: string;
207
+ uri?: string;
208
+ }>, z.ZodObject<{
209
+ type: z.ZodLiteral<"audio">;
210
+ data: z.ZodString;
211
+ mimeType: z.ZodOptional<z.ZodString>;
212
+ }, "strip", z.ZodTypeAny, {
213
+ type?: "audio";
214
+ mimeType?: string;
215
+ data?: string;
216
+ }, {
217
+ type?: "audio";
218
+ mimeType?: string;
219
+ data?: string;
220
+ }>, z.ZodObject<{
221
+ type: z.ZodString;
222
+ text: z.ZodOptional<z.ZodString>;
223
+ data: z.ZodOptional<z.ZodString>;
224
+ mimeType: z.ZodOptional<z.ZodString>;
225
+ uri: z.ZodOptional<z.ZodString>;
226
+ }, "strip", z.ZodTypeAny, {
227
+ text?: string;
228
+ type?: string;
229
+ mimeType?: string;
230
+ data?: string;
231
+ uri?: string;
232
+ }, {
233
+ text?: string;
234
+ type?: string;
235
+ mimeType?: string;
236
+ data?: string;
237
+ uri?: string;
238
+ }>]>, "many">;
239
+ export type ContentArray = z.infer<typeof ContentArraySchema>;
240
+ /**
241
+ * Schema for output schema validation result.
242
+ */
243
+ export declare const OutputSchemaValidationSchema: z.ZodObject<{
244
+ hasOutputSchema: z.ZodBoolean;
245
+ isValid: z.ZodBoolean;
246
+ error: z.ZodOptional<z.ZodString>;
247
+ }, "strip", z.ZodTypeAny, {
248
+ error?: string;
249
+ hasOutputSchema?: boolean;
250
+ isValid?: boolean;
251
+ }, {
252
+ error?: string;
253
+ hasOutputSchema?: boolean;
254
+ isValid?: boolean;
255
+ }>;
256
+ export type OutputSchemaValidationParsed = z.infer<typeof OutputSchemaValidationSchema>;
257
+ /**
258
+ * Schema for response metadata tracking.
259
+ * Matches ResponseMetadata interface in resultTypes.ts.
260
+ */
261
+ export declare const ResponseMetadataSchema: z.ZodObject<{
262
+ contentTypes: z.ZodArray<z.ZodEnum<["text", "image", "resource", "resource_link", "audio"]>, "many">;
263
+ hasStructuredContent: z.ZodBoolean;
264
+ hasMeta: z.ZodBoolean;
265
+ textBlockCount: z.ZodNumber;
266
+ imageCount: z.ZodNumber;
267
+ resourceCount: z.ZodNumber;
268
+ outputSchemaValidation: z.ZodOptional<z.ZodObject<{
269
+ hasOutputSchema: z.ZodBoolean;
270
+ isValid: z.ZodBoolean;
271
+ error: z.ZodOptional<z.ZodString>;
272
+ }, "strip", z.ZodTypeAny, {
273
+ error?: string;
274
+ hasOutputSchema?: boolean;
275
+ isValid?: boolean;
276
+ }, {
277
+ error?: string;
278
+ hasOutputSchema?: boolean;
279
+ isValid?: boolean;
280
+ }>>;
281
+ }, "strip", z.ZodTypeAny, {
282
+ contentTypes?: ("text" | "image" | "audio" | "resource_link" | "resource")[];
283
+ hasStructuredContent?: boolean;
284
+ hasMeta?: boolean;
285
+ textBlockCount?: number;
286
+ imageCount?: number;
287
+ resourceCount?: number;
288
+ outputSchemaValidation?: {
289
+ error?: string;
290
+ hasOutputSchema?: boolean;
291
+ isValid?: boolean;
292
+ };
293
+ }, {
294
+ contentTypes?: ("text" | "image" | "audio" | "resource_link" | "resource")[];
295
+ hasStructuredContent?: boolean;
296
+ hasMeta?: boolean;
297
+ textBlockCount?: number;
298
+ imageCount?: number;
299
+ resourceCount?: number;
300
+ outputSchemaValidation?: {
301
+ error?: string;
302
+ hasOutputSchema?: boolean;
303
+ isValid?: boolean;
304
+ };
305
+ }>;
306
+ export type ResponseMetadataParsed = z.infer<typeof ResponseMetadataSchema>;
307
+ /**
308
+ * Schema for validation classification enum.
309
+ */
310
+ export declare const ValidationClassificationSchema: z.ZodEnum<["fully_working", "partially_working", "connectivity_only", "broken", "error"]>;
311
+ export type ValidationClassification = z.infer<typeof ValidationClassificationSchema>;
312
+ /**
313
+ * Schema for validation result.
314
+ * Matches ValidationResult interface in ResponseValidator.ts.
315
+ */
316
+ export declare const ValidationResultSchema: z.ZodObject<{
317
+ isValid: z.ZodBoolean;
318
+ isError: z.ZodBoolean;
319
+ confidence: z.ZodNumber;
320
+ issues: z.ZodArray<z.ZodString, "many">;
321
+ evidence: z.ZodArray<z.ZodString, "many">;
322
+ classification: z.ZodEnum<["fully_working", "partially_working", "connectivity_only", "broken", "error"]>;
323
+ responseMetadata: z.ZodOptional<z.ZodObject<{
324
+ contentTypes: z.ZodArray<z.ZodEnum<["text", "image", "resource", "resource_link", "audio"]>, "many">;
325
+ hasStructuredContent: z.ZodBoolean;
326
+ hasMeta: z.ZodBoolean;
327
+ textBlockCount: z.ZodNumber;
328
+ imageCount: z.ZodNumber;
329
+ resourceCount: z.ZodNumber;
330
+ outputSchemaValidation: z.ZodOptional<z.ZodObject<{
331
+ hasOutputSchema: z.ZodBoolean;
332
+ isValid: z.ZodBoolean;
333
+ error: z.ZodOptional<z.ZodString>;
334
+ }, "strip", z.ZodTypeAny, {
335
+ error?: string;
336
+ hasOutputSchema?: boolean;
337
+ isValid?: boolean;
338
+ }, {
339
+ error?: string;
340
+ hasOutputSchema?: boolean;
341
+ isValid?: boolean;
342
+ }>>;
343
+ }, "strip", z.ZodTypeAny, {
344
+ contentTypes?: ("text" | "image" | "audio" | "resource_link" | "resource")[];
345
+ hasStructuredContent?: boolean;
346
+ hasMeta?: boolean;
347
+ textBlockCount?: number;
348
+ imageCount?: number;
349
+ resourceCount?: number;
350
+ outputSchemaValidation?: {
351
+ error?: string;
352
+ hasOutputSchema?: boolean;
353
+ isValid?: boolean;
354
+ };
355
+ }, {
356
+ contentTypes?: ("text" | "image" | "audio" | "resource_link" | "resource")[];
357
+ hasStructuredContent?: boolean;
358
+ hasMeta?: boolean;
359
+ textBlockCount?: number;
360
+ imageCount?: number;
361
+ resourceCount?: number;
362
+ outputSchemaValidation?: {
363
+ error?: string;
364
+ hasOutputSchema?: boolean;
365
+ isValid?: boolean;
366
+ };
367
+ }>>;
368
+ }, "strip", z.ZodTypeAny, {
369
+ evidence?: string[];
370
+ confidence?: number;
371
+ isError?: boolean;
372
+ issues?: string[];
373
+ isValid?: boolean;
374
+ classification?: "error" | "broken" | "fully_working" | "partially_working" | "connectivity_only";
375
+ responseMetadata?: {
376
+ contentTypes?: ("text" | "image" | "audio" | "resource_link" | "resource")[];
377
+ hasStructuredContent?: boolean;
378
+ hasMeta?: boolean;
379
+ textBlockCount?: number;
380
+ imageCount?: number;
381
+ resourceCount?: number;
382
+ outputSchemaValidation?: {
383
+ error?: string;
384
+ hasOutputSchema?: boolean;
385
+ isValid?: boolean;
386
+ };
387
+ };
388
+ }, {
389
+ evidence?: string[];
390
+ confidence?: number;
391
+ isError?: boolean;
392
+ issues?: string[];
393
+ isValid?: boolean;
394
+ classification?: "error" | "broken" | "fully_working" | "partially_working" | "connectivity_only";
395
+ responseMetadata?: {
396
+ contentTypes?: ("text" | "image" | "audio" | "resource_link" | "resource")[];
397
+ hasStructuredContent?: boolean;
398
+ hasMeta?: boolean;
399
+ textBlockCount?: number;
400
+ imageCount?: number;
401
+ resourceCount?: number;
402
+ outputSchemaValidation?: {
403
+ error?: string;
404
+ hasOutputSchema?: boolean;
405
+ isValid?: boolean;
406
+ };
407
+ };
408
+ }>;
409
+ export type ValidationResultParsed = z.infer<typeof ValidationResultSchema>;
410
+ /**
411
+ * Schema for MCP tool call result (CompatibilityCallToolResult).
412
+ * Validates the structure of tool responses from MCP SDK.
413
+ */
414
+ export declare const MCPToolCallResultSchema: z.ZodObject<{
415
+ content: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
416
+ type: z.ZodLiteral<"text">;
417
+ text: z.ZodString;
418
+ }, "strip", z.ZodTypeAny, {
419
+ text?: string;
420
+ type?: "text";
421
+ }, {
422
+ text?: string;
423
+ type?: "text";
424
+ }>, z.ZodObject<{
425
+ type: z.ZodLiteral<"image">;
426
+ data: z.ZodString;
427
+ mimeType: z.ZodString;
428
+ }, "strip", z.ZodTypeAny, {
429
+ type?: "image";
430
+ mimeType?: string;
431
+ data?: string;
432
+ }, {
433
+ type?: "image";
434
+ mimeType?: string;
435
+ data?: string;
436
+ }>, z.ZodObject<{
437
+ type: z.ZodUnion<[z.ZodLiteral<"resource">, z.ZodLiteral<"resource_link">]>;
438
+ uri: z.ZodOptional<z.ZodString>;
439
+ mimeType: z.ZodOptional<z.ZodString>;
440
+ }, "strip", z.ZodTypeAny, {
441
+ type?: "resource_link" | "resource";
442
+ mimeType?: string;
443
+ uri?: string;
444
+ }, {
445
+ type?: "resource_link" | "resource";
446
+ mimeType?: string;
447
+ uri?: string;
448
+ }>, z.ZodObject<{
449
+ type: z.ZodLiteral<"audio">;
450
+ data: z.ZodString;
451
+ mimeType: z.ZodOptional<z.ZodString>;
452
+ }, "strip", z.ZodTypeAny, {
453
+ type?: "audio";
454
+ mimeType?: string;
455
+ data?: string;
456
+ }, {
457
+ type?: "audio";
458
+ mimeType?: string;
459
+ data?: string;
460
+ }>, z.ZodObject<{
461
+ type: z.ZodString;
462
+ text: z.ZodOptional<z.ZodString>;
463
+ data: z.ZodOptional<z.ZodString>;
464
+ mimeType: z.ZodOptional<z.ZodString>;
465
+ uri: z.ZodOptional<z.ZodString>;
466
+ }, "strip", z.ZodTypeAny, {
467
+ text?: string;
468
+ type?: string;
469
+ mimeType?: string;
470
+ data?: string;
471
+ uri?: string;
472
+ }, {
473
+ text?: string;
474
+ type?: string;
475
+ mimeType?: string;
476
+ data?: string;
477
+ uri?: string;
478
+ }>]>, "many">>;
479
+ isError: z.ZodOptional<z.ZodBoolean>;
480
+ structuredContent: z.ZodOptional<z.ZodUnknown>;
481
+ _meta: z.ZodOptional<z.ZodUnknown>;
482
+ }, "strip", z.ZodTypeAny, {
483
+ content?: ({
484
+ text?: string;
485
+ type?: "text";
486
+ } | {
487
+ type?: "image";
488
+ mimeType?: string;
489
+ data?: string;
490
+ } | {
491
+ type?: "resource_link" | "resource";
492
+ mimeType?: string;
493
+ uri?: string;
494
+ } | {
495
+ type?: "audio";
496
+ mimeType?: string;
497
+ data?: string;
498
+ } | {
499
+ text?: string;
500
+ type?: string;
501
+ mimeType?: string;
502
+ data?: string;
503
+ uri?: string;
504
+ })[];
505
+ isError?: boolean;
506
+ _meta?: unknown;
507
+ structuredContent?: unknown;
508
+ }, {
509
+ content?: ({
510
+ text?: string;
511
+ type?: "text";
512
+ } | {
513
+ type?: "image";
514
+ mimeType?: string;
515
+ data?: string;
516
+ } | {
517
+ type?: "resource_link" | "resource";
518
+ mimeType?: string;
519
+ uri?: string;
520
+ } | {
521
+ type?: "audio";
522
+ mimeType?: string;
523
+ data?: string;
524
+ } | {
525
+ text?: string;
526
+ type?: string;
527
+ mimeType?: string;
528
+ data?: string;
529
+ uri?: string;
530
+ })[];
531
+ isError?: boolean;
532
+ _meta?: unknown;
533
+ structuredContent?: unknown;
534
+ }>;
535
+ export type MCPToolCallResultParsed = z.infer<typeof MCPToolCallResultSchema>;
536
+ /**
537
+ * Validate content array from MCP response.
538
+ *
539
+ * @param content - Content array to validate
540
+ * @returns Array of validation error messages (empty if valid)
541
+ */
542
+ export declare function validateContentArray(content: unknown): string[];
543
+ /**
544
+ * Safely parse content array without throwing.
545
+ *
546
+ * @param content - Raw content array
547
+ * @returns SafeParseResult with success status and data/error
548
+ */
549
+ export declare function safeParseContentArray(content: unknown): z.SafeParseReturnType<({
550
+ text?: string;
551
+ type?: "text";
552
+ } | {
553
+ type?: "image";
554
+ mimeType?: string;
555
+ data?: string;
556
+ } | {
557
+ type?: "resource_link" | "resource";
558
+ mimeType?: string;
559
+ uri?: string;
560
+ } | {
561
+ type?: "audio";
562
+ mimeType?: string;
563
+ data?: string;
564
+ } | {
565
+ text?: string;
566
+ type?: string;
567
+ mimeType?: string;
568
+ data?: string;
569
+ uri?: string;
570
+ })[], ({
571
+ text?: string;
572
+ type?: "text";
573
+ } | {
574
+ type?: "image";
575
+ mimeType?: string;
576
+ data?: string;
577
+ } | {
578
+ type?: "resource_link" | "resource";
579
+ mimeType?: string;
580
+ uri?: string;
581
+ } | {
582
+ type?: "audio";
583
+ mimeType?: string;
584
+ data?: string;
585
+ } | {
586
+ text?: string;
587
+ type?: string;
588
+ mimeType?: string;
589
+ data?: string;
590
+ uri?: string;
591
+ })[]>;
592
+ /**
593
+ * Safely parse MCP tool call result.
594
+ *
595
+ * @param result - Raw tool call result
596
+ * @returns SafeParseResult with success status and data/error
597
+ */
598
+ export declare function safeParseMCPToolCallResult(result: unknown): z.SafeParseReturnType<{
599
+ content?: ({
600
+ text?: string;
601
+ type?: "text";
602
+ } | {
603
+ type?: "image";
604
+ mimeType?: string;
605
+ data?: string;
606
+ } | {
607
+ type?: "resource_link" | "resource";
608
+ mimeType?: string;
609
+ uri?: string;
610
+ } | {
611
+ type?: "audio";
612
+ mimeType?: string;
613
+ data?: string;
614
+ } | {
615
+ text?: string;
616
+ type?: string;
617
+ mimeType?: string;
618
+ data?: string;
619
+ uri?: string;
620
+ })[];
621
+ isError?: boolean;
622
+ _meta?: unknown;
623
+ structuredContent?: unknown;
624
+ }, {
625
+ content?: ({
626
+ text?: string;
627
+ type?: "text";
628
+ } | {
629
+ type?: "image";
630
+ mimeType?: string;
631
+ data?: string;
632
+ } | {
633
+ type?: "resource_link" | "resource";
634
+ mimeType?: string;
635
+ uri?: string;
636
+ } | {
637
+ type?: "audio";
638
+ mimeType?: string;
639
+ data?: string;
640
+ } | {
641
+ text?: string;
642
+ type?: string;
643
+ mimeType?: string;
644
+ data?: string;
645
+ uri?: string;
646
+ })[];
647
+ isError?: boolean;
648
+ _meta?: unknown;
649
+ structuredContent?: unknown;
650
+ }>;
651
+ /**
652
+ * Validate validation result structure.
653
+ *
654
+ * @param result - Validation result to validate
655
+ * @returns Array of validation error messages (empty if valid)
656
+ */
657
+ export declare function validateValidationResult(result: unknown): string[];
658
+ /**
659
+ * Parse validation result with validation.
660
+ *
661
+ * @param result - Raw validation result
662
+ * @returns Validated result
663
+ * @throws ZodError if validation fails
664
+ */
665
+ export declare function parseValidationResult(result: unknown): ValidationResultParsed;
666
+ /**
667
+ * Safely parse validation result without throwing.
668
+ *
669
+ * @param result - Raw validation result
670
+ * @returns SafeParseResult with success status and data/error
671
+ */
672
+ export declare function safeParseValidationResult(result: unknown): z.SafeParseReturnType<{
673
+ evidence?: string[];
674
+ confidence?: number;
675
+ isError?: boolean;
676
+ issues?: string[];
677
+ isValid?: boolean;
678
+ classification?: "error" | "broken" | "fully_working" | "partially_working" | "connectivity_only";
679
+ responseMetadata?: {
680
+ contentTypes?: ("text" | "image" | "audio" | "resource_link" | "resource")[];
681
+ hasStructuredContent?: boolean;
682
+ hasMeta?: boolean;
683
+ textBlockCount?: number;
684
+ imageCount?: number;
685
+ resourceCount?: number;
686
+ outputSchemaValidation?: {
687
+ error?: string;
688
+ hasOutputSchema?: boolean;
689
+ isValid?: boolean;
690
+ };
691
+ };
692
+ }, {
693
+ evidence?: string[];
694
+ confidence?: number;
695
+ isError?: boolean;
696
+ issues?: string[];
697
+ isValid?: boolean;
698
+ classification?: "error" | "broken" | "fully_working" | "partially_working" | "connectivity_only";
699
+ responseMetadata?: {
700
+ contentTypes?: ("text" | "image" | "audio" | "resource_link" | "resource")[];
701
+ hasStructuredContent?: boolean;
702
+ hasMeta?: boolean;
703
+ textBlockCount?: number;
704
+ imageCount?: number;
705
+ resourceCount?: number;
706
+ outputSchemaValidation?: {
707
+ error?: string;
708
+ hasOutputSchema?: boolean;
709
+ isValid?: boolean;
710
+ };
711
+ };
712
+ }>;
713
+ /**
714
+ * Validate response metadata structure.
715
+ *
716
+ * @param metadata - Response metadata to validate
717
+ * @returns Array of validation error messages (empty if valid)
718
+ */
719
+ export declare function validateResponseMetadata(metadata: unknown): string[];
720
+ /**
721
+ * Safely parse response metadata without throwing.
722
+ *
723
+ * @param metadata - Raw response metadata
724
+ * @returns SafeParseResult with success status and data/error
725
+ */
726
+ export declare function safeParseResponseMetadata(metadata: unknown): z.SafeParseReturnType<{
727
+ contentTypes?: ("text" | "image" | "audio" | "resource_link" | "resource")[];
728
+ hasStructuredContent?: boolean;
729
+ hasMeta?: boolean;
730
+ textBlockCount?: number;
731
+ imageCount?: number;
732
+ resourceCount?: number;
733
+ outputSchemaValidation?: {
734
+ error?: string;
735
+ hasOutputSchema?: boolean;
736
+ isValid?: boolean;
737
+ };
738
+ }, {
739
+ contentTypes?: ("text" | "image" | "audio" | "resource_link" | "resource")[];
740
+ hasStructuredContent?: boolean;
741
+ hasMeta?: boolean;
742
+ textBlockCount?: number;
743
+ imageCount?: number;
744
+ resourceCount?: number;
745
+ outputSchemaValidation?: {
746
+ error?: string;
747
+ hasOutputSchema?: boolean;
748
+ isValid?: boolean;
749
+ };
750
+ }>;
751
+ //# sourceMappingURL=responseValidatorSchemas.d.ts.map