export type NativePublishMutationState = "not_committed" | "committed" | "unknown"; export type NativePublishDurabilityState = "not_attempted" | "proven" | "not_provable"; export type NativePublishReason = "none" | "destination_exists" | "atomic_unavailable" | "cross_device" | "permission_denied" | "io_failure" | "interrupted" | "invalid_request" | "identity_violation" | "durability_not_provable" | "unknown"; export type NativePublishOperation = "direct_rename" | "retained_file" | "retained_tree"; export type NativePublishPrimitive = "renameat2_noreplace" | "linkat_noreplace" | "mkdirat_renameat_noreplace" | "renameatx_np_excl" | "windows_rename_noreplace" | "unsupported" | "unknown"; export type NativePublishPhase = "preflight" | "file_sync" | "rename" | "source_unlink" | "source_parent_sync" | "destination_parent_sync" | "terminal_identity" | "complete" | "unknown"; type SyncFailure = { phase: Exclude; parentRole: "source" | "destination" | "shared" | "staged_file"; osCode?: number; kind: "unsupported" | "io" | "permission" | "other"; }; type PublishDiagnostic = { schemaVersion: 1; collectionState: "complete" | "partial" | "unavailable"; osCode?: number; syncFailures?: readonly SyncFailure[]; }; export type NativePublishIdentity = { readonly dev: string; readonly ino: string; readonly size: string; readonly nlink?: string; readonly mtimeNs: string; readonly ctimeNs: string; readonly sha256?: string; }; export type NativePublishOutcome = { readonly ok: boolean; readonly code?: string; readonly identity?: NativePublishIdentity; readonly mutationState: NativePublishMutationState; readonly durabilityState: NativePublishDurabilityState; readonly reason: NativePublishReason; readonly primitive: NativePublishPrimitive; readonly phase: NativePublishPhase; readonly diagnostic: PublishDiagnostic; }; /** * Treat incompatible native results as an unknown mutation; never infer safety from legacy fields. * Retained descriptor operations have a stricter contract than direct rename: a reported success * includes the terminal identity and all required durability evidence. */ export declare function classifyNativePublishOutcome(value: unknown, operation?: NativePublishOperation): NativePublishOutcome; /** Only a fully validated pre-mutation result permits exact cleanup of current staging. */ export declare function mayCleanCurrentStaging(outcome: NativePublishOutcome): boolean; /** Stable, bounded text for startup errors. Native paths and messages are intentionally excluded. */ export declare function formatNativePublishDiagnostic(outcome: NativePublishOutcome): string; export {};