import { RuntimeManifestError } from './runtime-manifest-model.js'; import type { BigIntStats } from 'node:fs'; export interface RuntimeStageEntryIdentity { readonly dev: bigint; readonly ino: bigint; readonly uid: bigint; readonly mode: bigint; readonly nlink: bigint; readonly size: bigint; readonly mtimeNs: bigint; readonly ctimeNs: bigint; } export interface StableRuntimeStageDirectory { readonly path: string; readonly descriptor?: number; readonly identity: RuntimeStageEntryIdentity; } /** @throws {RuntimeManifestError} Always; the stable stage proof failed. */ export declare function runtimeStageFail(reason: ConstructorParameters[0]): never; /** Capture the identity fields required by stage mutation proofs. */ export declare function runtimeStageIdentity(stat: BigIntStats): RuntimeStageEntryIdentity; /** Compare complete entry identity before and after a bounded operation. */ export declare function sameRuntimeStageIdentity(left: RuntimeStageEntryIdentity, right: RuntimeStageEntryIdentity): boolean; /** * Open and pin a safe directory when the platform supports directory handles. * * @throws {Error} When the path cannot be proven to be a stable safe directory. */ export declare function openStableRuntimeStageDirectory(path: string): StableRuntimeStageDirectory; /** Revalidate a pinned directory's path and optional descriptor authority. */ export declare function assertStableRuntimeStageDirectory(directory: StableRuntimeStageDirectory): void; /** Require and revalidate the stable parent already registered for a path. */ export declare function requireStableRuntimeStageParent(path: string, directories: ReadonlyMap): StableRuntimeStageDirectory; /** Durably sync a stable directory without weakening the Windows fallback. */ export declare function fsyncStableRuntimeStageParent(directory: StableRuntimeStageDirectory): void; /** * Finalize a staged directory's mode while retaining its pinned identity. * * @throws {Error} When the directory changes or cannot be durably finalized. */ export declare function finalizeStableRuntimeStageDirectoryMode(directory: StableRuntimeStageDirectory, mode: number): StableRuntimeStageDirectory; /** Close each unique directory descriptor exactly once. */ export declare function closeStableRuntimeStageDirectories(directories: ReadonlyMap): void; //# sourceMappingURL=runtime-stage-stable-directory.d.ts.map