import { Output } from 'ai'; import { type ZodType } from 'zod'; /** * Bridge between ContractSpec SchemaModel and AI SDK Output. * * This module provides utilities to convert ContractSpec schema definitions * to AI SDK v6 Output.* structured output configurations. */ type ObjectOutputReturn = ReturnType; type ArrayOutputReturn = ReturnType; type ChoiceOutputReturn = ReturnType; type TextOutputReturn = ReturnType; /** * Create an AI SDK Output.object from a JSON Schema. * * @param schema - JSON Schema object * @returns AI SDK Output configuration */ export declare function jsonSchemaToOutput(schema: Record): ObjectOutputReturn; /** * Create an AI SDK Output.array from a JSON Schema items definition. * * @param itemSchema - JSON Schema for array items * @returns AI SDK Output configuration */ export declare function jsonSchemaToArrayOutput(itemSchema: Record): ArrayOutputReturn; /** * Create an AI SDK Output.choice from enum values. * * @param choices - Array of choice values * @returns AI SDK Output configuration */ export declare function enumToChoiceOutput(choices: string[]): ChoiceOutputReturn; /** * Create an AI SDK Output from a Zod schema directly. * * @param schema - Zod schema * @returns AI SDK Output configuration */ export declare function zodToOutput(schema: T): ObjectOutputReturn; /** * Create a simple text output configuration. * * @returns AI SDK Output configuration for text */ export declare function textOutput(): TextOutputReturn; /** * Output builder that can be used fluently. */ export declare const SchemaOutput: { /** * Create an object output from JSON Schema. */ readonly fromJsonSchema: typeof jsonSchemaToOutput; /** * Create an array output from JSON Schema. */ readonly arrayFromJsonSchema: typeof jsonSchemaToArrayOutput; /** * Create a choice output from enum. */ readonly fromEnum: typeof enumToChoiceOutput; /** * Create an output from Zod schema. */ readonly fromZod: typeof zodToOutput; /** * Create a text output. */ readonly text: typeof textOutput; }; export {};