import type { RetainedArtifactMetadata } from "@opengeni/sdk"; import type { createWorkspaceRetainedArtifactLoader } from "../../../timeline/index.js"; type RetainedArtifactLoader = ReturnType; export declare class RetainedImageCache { private entries; private bytes; /** The settled value, if this key has one that is still fresh. */ peek(key: string): T | undefined; get(key: string, create: () => Promise, describe?: (value: T) => { size?: number | undefined; expiresAt?: number | undefined; retain?: boolean | undefined; }): Promise; /** Forget every key under a prefix (an artifact's metadata and bytes). */ forget(prefix: string): void; private fresh; private remove; private trim; } /** One cache per authenticated client, so a new sign-in never sees old bytes. */ export declare function retainedImageCache(client: object): RetainedImageCache; export declare function resetRetainedImageCaches(): void; /** Key prefix for one artifact under one access-key version and workspace. */ export declare function retainedImageScope(accessKeyVersion: number, workspaceId: string, artifactId: string): string; export declare function cachedRetainedMetadata(cache: RetainedImageCache, scope: string, fetch: () => Promise): Promise; /** * Share one download per artifact version. The shared request is not tied to * the first caller's abort signal: a card unmounted mid-load still fills the * cache for its next mount, and callers ignore results after their own abort. */ export declare function cachedRetainedArtifactLoader(cache: RetainedImageCache, accessKeyVersion: number, workspaceId: string, load: RetainedArtifactLoader): RetainedArtifactLoader; export {};