/** * Type definitions for SD metadata parsing * Based on stable-diffusion-inspector reference implementation */ export interface SDMetadata { prompt?: string; negativePrompt?: string; steps?: string; sampler?: string; cfgScale?: string; seed?: string; size?: string; model?: string; parameters?: string; naiBasePrompt?: string; naiCharPrompts?: string[]; naiNegBasePrompt?: string; naiNegCharPrompts?: string[]; naiVibe?: boolean; naiCharRefs?: string[]; exifFallback?: Record; } export interface ImageSegment { type: string; attrs?: Record; data?: Record; _source?: string; [key: string]: any; } export interface FetchImageResult { buffer: Buffer; source: string; sourceType: 'data-uri' | 'base64' | 'local' | 'bot-file'; } export interface PNGTextChunks { [key: string]: string; } export interface JPEGAppSegments { [key: string]: string; } export interface ComfyUINode { id?: number; type: string; widgets_values?: any[]; inputs?: Array<{ name?: string; type?: string; link?: number; }>; outputs?: any[]; } export interface ComfyUIWorkflow { nodes?: ComfyUINode[]; links?: Array; prompt?: any; [key: string]: any; } export interface NovelAIComment { uc?: string; steps?: number; scale?: number; seed?: number; sampler?: string; uncond_per_vibe?: boolean; v4_prompt?: { caption: { base_caption?: string; char_captions?: any[]; }; }; v4_negative_prompt?: { caption: { base_caption?: string; char_captions?: any[]; }; }; director_reference_descriptions?: any[]; director_reference_strengths?: number[]; director_reference_secondary_strengths?: number[]; } export interface StealthPNGHeader { magic: string; dataLength: number; compressedData: Buffer; } /** * Bit reader for Stealth PNG LSB extraction */ export declare class BitReader { private data; private index; constructor(data: number[] | Uint8Array); readBit(): number; readNBits(n: number): number[]; readByte(): number; readNBytes(n: number): Uint8Array; readInt32(): number; } /** * Image format types */ export type ImageFormat = 'png' | 'webp' | 'jpeg' | null; /** * Parse result with error information */ export interface ParseResult { success: boolean; data?: T; error?: string; }