import type { TAssistantMessage, TChatMessage } from "../../../types/index.js";
import type { OpenAIStreamEventLike } from "../types/index.js";
export type ConsumeStreamCallbacks = {
    baseMessages: TChatMessage[];
    getAssistantMessageId: (index: number) => string;
    /** When the API sends `response.output_item.added` for a message, exposes OpenAI item id (e.g. msg-cc-…) for reactions. */
    onAssistantMessageIdResolved?: (previousId: string, openaiItemId: string) => void;
    onContentUpdate: (messageId: string, content: TAssistantMessage['content']) => void;
    onNewMessage: (messageId: string) => void;
    onEnd: (finalMessages: TChatMessage[], status: 'done' | 'error', error?: Error) => void;
    getIsCancelled: () => boolean;
};
/** Consumes stream, invokes callbacks. State/setters live in caller. */
export declare function consumeOpenAIStream(stream: AsyncIterable<OpenAIStreamEventLike>, callbacks: ConsumeStreamCallbacks): Promise<void>;
