import type { InferSchema, Schema } from "./ExpoLocalLlm.types"; export type SchemaValidationError = { path: string; message: string; }; export type SchemaValidationResult = { ok: true; } | { ok: false; errors: SchemaValidationError[]; }; export declare class SchemaInvalidError extends Error { readonly code = "ERR_SCHEMA_INVALID"; readonly errors: SchemaValidationError[]; constructor(errors: SchemaValidationError[]); } export declare class StructuredOutputValidationError extends Error { readonly code = "ERR_STRUCTURED_OUTPUT_INVALID"; readonly errors: SchemaValidationError[]; constructor(errors: SchemaValidationError[]); } export declare function snapshotSchema(schema: Definition): Definition; export declare function validateSchema(schema: unknown): SchemaValidationResult; export declare function validateStructuredOutput(value: unknown, schema: Schema): SchemaValidationResult; /** * Parse a structured-output response and check it against the schema. Native * decoding is constrained, but the result is still verified before it is * typed as the schema's shape. */ export declare function parseStructuredOutput(text: string, schema: Definition): InferSchema; export type { Schema }; //# sourceMappingURL=validateSchema.d.ts.map