import type { DashboardImageReferenceDto } from "../shared/protocol.js"; import { type ImagePreviewGenerator } from "./image-preview.js"; export declare const DASHBOARD_IMAGE_CACHE_BYTES: number; export declare const DASHBOARD_IMAGE_CACHE_RECORDS = 2000; export declare const DASHBOARD_IMAGE_ID_PATTERN: RegExp; export declare const DASHBOARD_IMAGE_MIME_TYPES: Set<"image/gif" | "image/jpeg" | "image/png" | "image/webp">; export interface DashboardImageScope { runtimeKey: string; agentId?: string; } export interface DashboardImageBinary { bytes: Uint8Array; mimeType: DashboardImageReferenceDto["mimeType"]; } export interface DashboardImageRepositoryOptions { maxBytes?: number; maxRecords?: number; } /** Strict standard base64 decode: whitespace, data URLs, and non-canonical padding are rejected. */ export declare function decodeDashboardImage(value: unknown, mimeType: unknown): DashboardImageBinary | undefined; export declare function dashboardImageId(mimeType: string, bytes: Uint8Array): string; export declare function isDashboardImageReference(value: unknown): value is DashboardImageReferenceDto; export declare class DashboardImageNotFoundError extends Error { } export declare class DashboardImagePreviewError extends Error { } /** Synchronous projection + bounded original/preview repository. */ export declare class DashboardImageService { private readonly previews; private readonly images; private readonly originalFlights; private readonly previewFlights; private readonly maxBytes; private readonly maxRecords; private usedBytes; private usedRecords; private clock; constructor(previews: ImagePreviewGenerator, options?: DashboardImageRepositoryOptions); get byteSize(): number; get recordCount(): number; /** Project a browser-facing event without mutating the authoritative source. */ projectEvent(event: Record, scope: DashboardImageScope): Record; /** Project messages/snapshots before JSON serialization. */ project(value: T, scope: DashboardImageScope): T; original(scope: DashboardImageScope, id: string, loadAuthoritative: () => Promise): Promise; preview(scope: DashboardImageScope, id: string, loadAuthoritative: () => Promise): Promise; removeRuntime(runtimeKey: string): void; close(): Promise; private projectNode; private insertOriginal; private cachedVariant; private recoverOriginal; private putVariant; private evict; private deleteImage; } //# sourceMappingURL=dashboard-images.d.ts.map