import type { FileHandle } from "fs/promises"; export type RegularFileSyncOutcome = "synced" | "unsupported-windows-eperm"; export type DirectorySyncOutcome = "synced" | "unsupported-windows-eperm"; export type DurabilityWarningSubsystem = "session pointer start/reconcile" | "session pointer end" | "native-hook setup" | "native-hook uninstall" | "native-hook claim-journal recovery" | "plugin cache publication"; export interface RegularFileDurabilityTracker { degraded: boolean; regularFileDegraded?: boolean; directoryDegraded?: boolean; } export declare function isUnsupportedWindowsSync(error: unknown, platform?: NodeJS.Platform): boolean; /** * Windows can report EPERM when fsync is unsupported for an otherwise valid * regular-file handle. Only that platform/error pair is a durability * capability limitation; every other failure remains fatal. */ export declare function syncRegularFile(handle: Pick, platform?: NodeJS.Platform): Promise; /** * Windows can also report EPERM when fsync is unsupported for an otherwise * valid directory handle. Keep the capability boundary as narrow as the * regular-file fallback: every other platform/error pair remains fatal. */ export declare function syncDirectory(handle: Pick, platform?: NodeJS.Platform): Promise; /** * Synchronous counterpart for call sites that must stay synchronous, such as * Team startup state that is persisted before any worker pane exists. The * capability boundary is identical to the async helpers: only Windows EPERM is * a durability limitation, every other failure stays fatal. */ export declare function syncFileDescriptorSync(descriptor: number, platform?: NodeJS.Platform, syncImpl?: (fd: number) => void): RegularFileSyncOutcome; export declare function recordRegularFileSyncOutcome(tracker: RegularFileDurabilityTracker, outcome: RegularFileSyncOutcome): void; export declare function recordDirectorySyncOutcome(tracker: RegularFileDurabilityTracker, outcome: DirectorySyncOutcome): void; export declare function emitDegradedDurabilityWarning(subsystem: DurabilityWarningSubsystem, tracker: RegularFileDurabilityTracker): void; //# sourceMappingURL=file-durability.d.ts.map