/** * Response validation through the Standard Schema interface, so the shared * client works with any validator that implements it. The MCP passes Zod * schemas and the CLI valibot ones; this module depends on neither. */ import type { StandardSchemaV1 } from "./standard-schema.js"; /** A schema the host supplies to check a response body. */ export type ResponseSchema = StandardSchemaV1; /** A response did not match the schema the caller validated it with. */ export declare class ApiResponseValidationError extends Error { readonly issues: readonly StandardSchemaV1.Issue[]; constructor(issues: readonly StandardSchemaV1.Issue[]); } /** * Validate `data` with `schema` and return the schema's output. * * Responses are validated synchronously, as every caller does today, so a * schema with async refinements is rejected rather than awaited. * * @throws {ApiResponseValidationError} When `data` does not match */ export declare function validateResponse(schema: Schema, data: unknown): StandardSchemaV1.InferOutput;