import type { RuntimePromotionProjectRootAuthority } from './runtime-promotion-root-authority.js'; import type { BigIntStats } from 'node:fs'; export interface AuthoredEntryIdentity { 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 StableAuthoredRoot { readonly path: string; readonly identity: AuthoredEntryIdentity; } export interface StableAuthoredEntry { readonly path: string; readonly type: 'directory' | 'file'; readonly identity: AuthoredEntryIdentity; } export type DurableFileWriteCheckpoint = 'opened' | 'partial-written' | 'fsynced'; export declare function readBoundedAuthoredDirectory(path: string, maxEntries: number, maxNameBytes: number, description: string): readonly string[]; export declare function authoredTransactionFailure(message: string, cause?: unknown): never; export declare function authoredEntryIdentity(stat: BigIntStats): AuthoredEntryIdentity; export declare function sameAuthoredEntryIdentity(left: AuthoredEntryIdentity, right: AuthoredEntryIdentity): boolean; export declare function sameAuthoredDirectoryAuthority(left: AuthoredEntryIdentity, right: AuthoredEntryIdentity): boolean; export declare function assertSafeAuthoredOwnerMode(stat: BigIntStats, field: string): void; export declare function openStableAuthoredRoot(projectRoot: string): StableAuthoredRoot; export declare function assertStableAuthoredRoot(root: StableAuthoredRoot): void; export declare function bindStableAuthoredEntry(path: string, type: StableAuthoredEntry['type'], description: string): StableAuthoredEntry; export declare function assertStableAuthoredEntry(entry: StableAuthoredEntry, description: string): void; export declare function fsyncStableAuthoredRoot(root: StableAuthoredRoot): void; export declare function fsyncStableAuthoredDirectory(directory: StableAuthoredEntry, description: string): void; export declare function assertAuthoredRootMatchesPromotionAuthority(root: StableAuthoredRoot, authority: RuntimePromotionProjectRootAuthority): void; /** Bind one transaction handle to the canonical root selected by its lease. */ export declare function bindStableAuthoredRoot(projectRoot: string, coordinationKey: string): StableAuthoredRoot; /** Reuse the initially opened root only while its directory authority is exact. */ export declare function transactionAuthoredRoot(root: StableAuthoredRoot): StableAuthoredRoot; export declare function resolveAuthoredTarget(root: StableAuthoredRoot, relativePath: string): string; export declare function assertSafeAuthoredAncestors(root: StableAuthoredRoot, relativePath: string, nonDirectoryMeansAbsent?: boolean): boolean; export declare function readStableArtifactFile(path: string): { readonly digest: string; readonly bytes: Buffer; readonly mode: number; }; //# sourceMappingURL=authored-state-transaction-fs.d.ts.map