/** * Pure IR → JSON Schema converter. * Converts IRType and IRValue to Draft-07 JSON Schema for OpenAPI/Anthropic/Vercel tool schemas. */ import type { IRType, IRValue, IRParameter } from '../ir'; import type { JsonSchema } from './types'; /** * Convert an IRType to a minimal Draft-07 JSON Schema. * * Rules: * - Primitive scalar types → corresponding JSON type * - Array → { type: 'array', items: } * - Nullable type → oneOf with null (permissive, includes the base type) * - Date/DateTime → string with date-time format * - Email → string with email format * - URL → string with uri format * - Unknown type name → { type: 'string' } (permissive best-effort) */ export declare function irTypeToJsonSchema(type: IRType): JsonSchema; /** * Convert an array of IRParameters to a JSON Schema object with properties + required. */ export declare function irParametersToJsonSchema(params: IRParameter[]): JsonSchema; /** * Convert an IRValue to a plain JSON value. * Used for populating schema default values. */ export declare function irValueToJson(v: IRValue): unknown; //# sourceMappingURL=json-schema.d.ts.map