import { type LanguageModel, type ModelMessage, type TelemetryOptions } from 'ai'; import { type ZodTypeAny } from 'zod'; export type StructuredExtractionOutput = TSchema['_output']; export interface StructuredExtractionOptions { model: LanguageModel; schema: TSchema; userMessage: string; systemPrompt?: string; contextMessages?: ModelMessage[]; telemetry?: TelemetryOptions; abortSignal?: AbortSignal; } export declare function extractStructuredFields(options: StructuredExtractionOptions): Promise>; /** * Build a tool/input schema for extraction submissions. * * Unlike the completion schema, extraction submissions must allow partial * payloads so the model can report only explicitly collected fields instead of * fabricating placeholder values to satisfy required constraints. */ export declare function toExtractionSubmissionSchema(schema: ZodTypeAny): ZodTypeAny; export declare function mergeExtractionData(current: Record, extracted: Record | null | undefined): Record; export declare function computeMissingFields(data: Record, requiredFields: readonly string[]): string[]; export declare function buildMissingFieldsMessage(missingFields: readonly string[]): string;