import type { Api, AssistantMessage, Message, Model } from "../types.js";
export interface MessageTransformContext<TApi extends Api> {
    model: Model<TApi>;
    normalizeToolCallId?: (id: string, model: Model<TApi>, source: AssistantMessage) => string;
    debug?: (stage: string, details?: unknown) => void;
}
export interface MessageTransformation<TApi extends Api> {
    name: string;
    apply(messages: Message[], context: MessageTransformContext<TApi>): Message[];
}
export declare class MessageTransformationPipeline<TApi extends Api> {
    private transformations;
    addTransformation(transformation: MessageTransformation<TApi>): this;
    transform(messages: Message[], context: MessageTransformContext<TApi>): Message[];
}
/**
 * Push a conversation through the shared transformation pipeline so it can be
 * sent to any provider safely. Tool-call identifiers are the tricky part: some
 * providers hand back long ids that include characters like `|`, while others
 * only accept short word-character ids. The `normalizeToolCallId` callback
 * bridges those formats whenever messages cross a model or provider boundary.
 */
export declare function transformMessages<TApi extends Api>(messages: Message[], model: Model<TApi>, normalizeToolCallId?: (id: string, model: Model<TApi>, source: AssistantMessage) => string): Message[];
