import type { JTDSchemaJson, SignalDescriptorJson } from '../api';
/** JSON Schema subset supported by OpenAI structured output (strict mode). */
export interface OpenAISchema {
    type?: string | string[];
    description?: string;
    properties?: Record<string, OpenAISchema>;
    required?: string[];
    additionalProperties?: false;
    enum?: (string | number | null)[];
    format?: string;
    items?: OpenAISchema;
    minimum?: number;
    maximum?: number;
    anyOf?: OpenAISchema[];
    $defs?: Record<string, OpenAISchema>;
    $ref?: string;
}
export interface ConvertSuccess {
    success: true;
    data: unknown;
}
export interface ConvertFailure {
    success: false;
    errors: string[];
}
export type ConvertResult = ConvertSuccess | ConvertFailure;
export interface OpenAIConversionResult {
    /** OpenAI strict mode compatible JSON Schema. */
    schema: OpenAISchema;
    /** Whether the schema supports strict mode. False for unstructured (empty) schemas. */
    strict: boolean;
    /** Convert OpenAI JSON output back to JTD-conforming JSON. */
    convert: (openaiJson: unknown) => ConvertResult;
}
/**
 * Convert a JTD schema to an OpenAI strict mode compatible JSON Schema, with a
 * converter function that transforms and validates OpenAI output against
 * the original JTD schema.
 *
 * @throws {Error} if the JTD schema contains forms that cannot be represented.
 */
export declare function convertToOpenAISchema(jtdSchema: JTDSchemaJson): OpenAIConversionResult;
/**
 * Convert a SignalDescriptorJson to an OpenAI strict mode compatible JSON Schema.
 *
 * Handles single and multi-format signals:
 * - Single format: schema is the converted format directly.
 * - Multiple formats: wrapper object with `format_0`, `format_1`, etc.
 *   All format properties are required and nullable (OAI strict mode).
 *   The model sets exactly one to a value and the rest to null.
 *
 * @throws {Error} if the descriptor has no formats.
 */
export declare function convertSignalToOpenAISchema(descriptor: SignalDescriptorJson): OpenAIConversionResult;
//# sourceMappingURL=index.d.ts.map