import type { AgentResponse, Language, WorkflowStep } from '../../models/types.js';
export type StructuredOutputFailureReason = 'missing' | 'schema_error' | 'timeout' | 'provider_error';
export interface StructuredOutputNormalizeContext {
    readonly step: WorkflowStep;
    readonly language: Language | undefined;
}
export interface StructuredOutputFallbackContext extends StructuredOutputNormalizeContext {
    readonly response: AgentResponse;
    readonly failureReason: StructuredOutputFailureReason;
    readonly detail: string;
    readonly validate: (value: Record<string, unknown>) => void;
}
export interface StructuredOutputNormalizer {
    supports(step: WorkflowStep): boolean;
    normalize(value: Record<string, unknown>, context: StructuredOutputNormalizeContext): Record<string, unknown>;
    buildFailureFallback?(context: StructuredOutputFallbackContext): AgentResponse | undefined;
}
export interface StructuredOutputNormalizerRegistry {
    normalize(value: Record<string, unknown>, context: StructuredOutputNormalizeContext): Record<string, unknown>;
    buildFailureFallback(context: StructuredOutputFallbackContext): AgentResponse | undefined;
}
export declare function createStructuredOutputNormalizerRegistry(normalizers: readonly StructuredOutputNormalizer[]): StructuredOutputNormalizerRegistry;
//# sourceMappingURL=structured-output-normalizer.d.ts.map