import type { AssistantMessage } from "@earendil-works/pi-ai";
export declare const IMAGE_GENERATION_CALL_SUBTYPE = "image_generation_call";
/** The completed shape this pass externalizes. Everything else stays untouched. */
interface CompletedNativeImage {
    id?: string;
    result: string;
    revisedPrompt?: string;
}
/**
 * Recognizes a completed native image call carrying a base64 payload. Non-completed
 * and already-scrubbed items return undefined: they carry no bytes to externalize.
 */
export declare function readCompletedNativeImage(raw: unknown): CompletedNativeImage | undefined;
/**
 * Detects the container from the decoded magic bytes. The Responses API does not
 * contractually pin the encoding of `result`, so an undetectable payload defaults
 * to png rather than being rejected.
 */
export declare function detectImageExtension(bytes: Buffer): "png" | "jpg" | "webp";
/**
 * Replaces every completed native image block with text pointing at a saved file.
 * Returns undefined when the message carries no image bytes, so unrelated messages
 * pass through by reference.
 */
export declare function externalizeNativeImages(message: AssistantMessage, cwd: string): Promise<AssistantMessage | undefined>;
export {};
//# sourceMappingURL=externalize.d.ts.map