import type { SandboxArchiveLimits } from '../../client';
import { type RemoteSnapshotSpec, type SnapshotSpec } from '../../snapshot';
import type { LocalSandboxSnapshot, LocalSandboxSnapshotSpec, LocalSnapshot, LocalSnapshotSpec } from '../types';
import type { Stats } from 'node:fs';
import type { Manifest } from '../../manifest';
export declare const LOCAL_SNAPSHOT_FINGERPRINT_VERSION = "workspace_tree_sha256_v1";
export type LocalSnapshotFingerprint = {
    fingerprint: string;
    version: typeof LOCAL_SNAPSHOT_FINGERPRINT_VERSION;
};
type LocalSnapshotState = {
    workspaceRootPath: string;
    manifest: Manifest;
    snapshotExcludedPaths?: Iterable<string>;
    snapshotSpec?: SnapshotSpec | null;
    snapshot?: LocalSandboxSnapshot | null;
    snapshotFingerprint?: string | null;
    snapshotFingerprintVersion?: string | null;
};
export declare function createLocalSnapshot(state: LocalSnapshotState, spec?: LocalSnapshotSpec): Promise<LocalSnapshot>;
export declare function persistLocalSnapshot<TState extends LocalSnapshotState>(providerName: string, state: TState, spec: SnapshotSpec | null, capture?: <T>(operation: () => Promise<T>) => Promise<T>): Promise<LocalSandboxSnapshot | null>;
export declare function serializeLocalSnapshotSpec(spec: LocalSandboxSnapshotSpec | null | undefined): Record<string, unknown> | null;
export declare function rehydrateLocalSnapshotSpec(serialized: unknown, configured: LocalSandboxSnapshotSpec | null | undefined): LocalSandboxSnapshotSpec | null;
export declare function replaceLocalSnapshot<TState extends LocalSnapshotState>(state: TState, snapshot: LocalSandboxSnapshot | null): Promise<void>;
export declare function canReuseLocalSnapshotWorkspace(state: LocalSnapshotState): Promise<boolean>;
export declare function localSnapshotIsRestorable(state: LocalSnapshotState): Promise<boolean>;
export declare function restoreLocalSnapshotToWorkspace<TState extends LocalSnapshotState>(state: TState, workspaceRootPath: string, options?: {
    archiveLimits?: SandboxArchiveLimits | null;
}): Promise<TState>;
export declare function computeLocalSnapshotFingerprint(state: LocalSnapshotState): Promise<LocalSnapshotFingerprint>;
export declare function copyDirectory(sourceRoot: string, destinationRoot: string, excludedLogicalPaths?: Set<string>, currentRelativePath?: string, expectedSourceStats?: Stats, destinationRootPath?: string): Promise<void>;
export declare function isRemoteSnapshotSpec(spec: SnapshotSpec | null | undefined): spec is RemoteSnapshotSpec;
export {};
