import { type CanonicalChatRequest, type CanonicalChatResponse } from './schema/index.js';
import { type ProtocolPipelineHooks, type ProtocolPipelineContext, type ProtocolValidationErrorDetail } from './hooks/protocol-hooks.js';
import { ConversionMetaBag, type ConversionMetaInput } from './meta/meta-bag.js';
export interface ProtocolInboundPipelineOptions<TWire> {
    payload: TWire;
    context?: ProtocolPipelineContext;
    meta?: ConversionMetaInput;
}
export interface ProtocolOutboundPipelineOptions<TCanonical> {
    canonical: TCanonical;
    context?: ProtocolPipelineContext;
    meta?: ConversionMetaInput;
}
export interface ProtocolInboundPipelineResult<TCanonical> {
    canonical: TCanonical;
    meta: ConversionMetaBag;
    context: ProtocolPipelineContext;
}
export interface ProtocolOutboundPipelineResult<TWire> {
    payload: TWire;
    meta: ConversionMetaBag;
    context: ProtocolPipelineContext;
}
export declare class PipelineValidationError extends Error {
    readonly stage: string;
    readonly errors: ProtocolValidationErrorDetail[];
    constructor(stage: string, errors: ProtocolValidationErrorDetail[]);
}
export declare class ProtocolConversionPipeline<TInboundWire = Record<string, unknown>, TOutboundWire = Record<string, unknown>, TCanonicalInbound = CanonicalChatRequest, TCanonicalOutbound = CanonicalChatResponse> {
    private readonly hooks;
    constructor(hooks: ProtocolPipelineHooks<TInboundWire, TOutboundWire, TCanonicalInbound, TCanonicalOutbound>);
    convertInbound(options: ProtocolInboundPipelineOptions<TInboundWire>): Promise<ProtocolInboundPipelineResult<TCanonicalInbound>>;
    convertOutbound(options: ProtocolOutboundPipelineOptions<TCanonicalOutbound>): Promise<ProtocolOutboundPipelineResult<TOutboundWire>>;
    private runValidation;
}
