import * as plugins from './plugins.js'; export interface IDockerImageStoreConstructorOptions { /** Disposable archive-processing directory; persistent archives use SmartBucket. */ localDirPath: string; bucketDir: plugins.smartbucket.Directory; } export interface IDockerImageStoreOperationOptions { signal?: AbortSignal; } export interface IDockerImageArchiveReceipt { readonly schemaVersion: 1; readonly imageName: string; /** Path relative to the configured Directory, without the .tar suffix. */ readonly storagePath: string; /** Complete SmartBucket object key, including the .tar suffix. */ readonly objectPath: string; /** Digest of the repacked bytes consumed by storage, not the input archive. */ readonly archiveDigest: `sha256:${string}`; readonly byteLength: number; } export interface IDockerImageArchiveFailureState { readonly storagePath: string; readonly objectPath: string | null; readonly publication: 'not-published' | 'published' | 'ambiguous'; readonly storedArchive: IDockerImageArchiveReceipt | null; } /** Preserves the exact destination and any known stored receipt for reconciliation. */ export declare class DockerImageArchiveStoreError extends Error { readonly state: IDockerImageArchiveFailureState; constructor(state: IDockerImageArchiveFailureState, cause: unknown); } export declare class DockerImageStore { options: IDockerImageStoreConstructorOptions; private stopped; private stopPromise?; private readonly active; private readonly processingDirectories; constructor(optionsArg: IDockerImageStoreConstructorOptions); /** Atomically replaces the conventional name.tar object, preserving the legacy API. */ storeImage(imageName: string, tarStream: plugins.stream.Readable): Promise; /** Creates a unique immutable archive and returns only after joined storage and cleanup. */ storeImageArchive(imageName: string, tarStream: plugins.stream.Readable, options?: IDockerImageStoreOperationOptions): Promise; private track; private assertRunning; private requireDirectory; private beginStore; private rewriteImageMetadata; /** Ensures the shared scratch root exists without removing another operation's files. */ start(): Promise; /** Permanently stops new work, cancels active work, and joins owned processing cleanup. */ stop(): Promise; /** Retrieves from SmartBucket; ownership of a successful returned stream passes to the caller. */ getImage(storagePath: string, options?: IDockerImageStoreOperationOptions): Promise; }