import type { CharacterDescription } from "./describer.js"; import type { AestheticProfile } from "../storyboard/prompt-builder.js"; import type { VeniceClient } from "../venice/client.js"; /** Persistent lock for a character's visual identity. */ export interface CharacterLock { /** Canonical character name. */ name: string; /** Full character description used to generate references. */ description: CharacterDescription; /** Base64-encoded PNG reference images from four canonical angles. */ referenceImages: { front: string; threeQuarter: string; profile: string; fullBody: string; }; /** Whether this character's visual identity has been locked. */ locked: boolean; /** Seed used for generation reproducibility. */ seed: number; /** * Model that generated each reference angle. Used by the Seedance 2.0 * pre-flight gate to confirm refs were produced by a compatible family * (e.g. `seedream-v5-lite`). Missing entries are treated as "unknown". */ referenceImageModels?: { front?: string; threeQuarter?: string; profile?: string; fullBody?: string; }; } /** * Manages generation, persistence, and retrieval of character reference * images. Each character gets a dedicated directory under the output * path containing four reference angle PNGs and a metadata JSON file. */ export declare class ReferenceManager { private readonly outputDir; /** * @param outputDir - Base directory for storing all character references. * Character-specific subdirectories are created under * `outputDir/characters/CHARACTER_NAME/`. */ constructor(outputDir: string); /** * Resolve the directory path for a specific character. */ private characterDir; /** * Generate all four reference images for a character and return a * locked character reference. Images are also saved to disk. * * The front face is generated first, then used as a reference image * for the remaining angles to maintain visual consistency. * * @param client - Venice API client instance. * @param description - Full character description to use as prompt basis. * @param aesthetic - Optional aesthetic profile to style-match references. * @returns A `CharacterLock` containing all reference images and metadata. */ generateReferences(client: VeniceClient, description: CharacterDescription, aesthetic?: AestheticProfile | null): Promise; /** * Load a previously saved character lock from disk. * * @param name - Character name to look up. * @returns The `CharacterLock` if found, or `null` if no saved data exists. */ loadReferences(name: string): Promise; /** * Save a character lock to disk. Reference images are written as PNG * files and metadata is written as JSON. * * @param lock - The `CharacterLock` to persist. */ saveReferences(lock: CharacterLock): Promise; /** * Return the front-facing reference image as a base64 string. * This is the primary image used for face-reference injection into * scene generation prompts. * * @param lock - A loaded or generated `CharacterLock`. * @returns Base64-encoded PNG of the front face reference. */ getBase64Face(lock: CharacterLock): string; /** * List the names of all characters that have been locked (saved to disk). * Reads the characters directory and returns names derived from each * subdirectory that contains a valid metadata file. * * @returns Array of character names that have persisted locks. */ listLocked(): Promise; } //# sourceMappingURL=reference-manager.d.ts.map