import { KIEClient } from './kie-client.js';
import { TemplateManager } from './templates.js';
import type { CharacterDNA, MasterJSONPrompt } from '../../types/character.js';
import type { SceneTemplate } from '../../types/api.js';
export interface GenerateImageOptions {
    model?: string;
    aspectRatio?: string;
}
export declare class ImageEngine {
    private kieClient;
    private templateManager;
    /** Tracks retry attempts per original generation request */
    private retryMap;
    constructor(kieClient?: KIEClient, templateManager?: TemplateManager);
    /**
     * Combines Scene Template + Character DNA + Master JSON Prompt into a final prompt string.
     */
    buildFinalPrompt(dna: CharacterDNA, masterPrompt: MasterJSONPrompt, template: SceneTemplate): string;
    /**
     * Queues an image generation task. Returns the queue task ID.
     */
    generateImage(characterId: string, templateId: string, options?: GenerateImageOptions): Promise<string>;
    /**
     * Processes a completed image result from webhook callback.
     * Downloads and saves the image to the character's generated-images directory.
     */
    handleWebhookResult(taskId: string, resultUrl: string): Promise<void>;
    /**
     * Handles a failed image generation task. Auto-retries up to MAX_RETRIES.
     */
    handleFailure(taskId: string, error: string): Promise<void>;
}
//# sourceMappingURL=index.d.ts.map