import { type ImageAttachmentRef } from '@deepseek-ai/dsh-attachment'; import { type SessionId as SessionIdType } from '@deepseek-ai/dsh-session'; import type { ImageGenerationQuality, ImageGenerationSize, ImageOutputFormat } from './config.ts'; declare const generationIdBrand: unique symbol; /** Opaque identity for one image generation or edit request. */ export type GenerationId = string & { readonly [generationIdBrand]: true; }; /** Brand one validated generation record id. */ export declare function GenerationId(value: string): GenerationId; interface GenerationBase { id: GenerationId; sessionId: SessionIdType; createdAt: number; durationMs: number; operation: 'generate' | 'edit'; backendId: string; model: string; prompt: string; sourceAttachments: ImageAttachmentRef[]; size: ImageGenerationSize; quality: ImageGenerationQuality; outputFormat: ImageOutputFormat; } /** Successful image operation with its durable output attachment. */ export interface GenerationSuccess extends GenerationBase { status: 'success'; outputAttachment: ImageAttachmentRef; } /** Failed image operation retained for the session sidebar. */ export interface GenerationFailure extends GenerationBase { status: 'error'; error: string; } /** One persisted image generation or edit record. */ export type GenerationRecord = GenerationSuccess | GenerationFailure; /** Session-isolated persistence for image generation and edit records. */ export declare class GenerationHistory { private readonly root; private readonly queues; constructor(root: string); /** Append one settled image operation. */ append(record: GenerationRecord): Promise; /** Return one session's operations newest first. */ list(sessionId: SessionIdType): Promise; /** Resolve one generation only inside its owning session. */ get(sessionId: SessionIdType, id: GenerationId): Promise; } export {}; //# sourceMappingURL=generation-history.d.ts.map