import { type RuntimePromotionPathSnapshot } from './runtime-promotion-path-snapshot.js'; import type { RuntimeExclusiveLease, RuntimeExclusivePosture } from '@opensip-cli/core'; interface RuntimePromotionFreshProjectRootToken { readonly projectRoot: string; readonly coordinationKey: string; readonly projectRootSnapshot: RuntimePromotionPathSnapshot; readonly destinationParentDir: string; readonly destinationParent: RuntimePromotionPathSnapshot; } /** * Attempt-local project-root identity. It deliberately stays out of the * path-stable journal and ignores directory timestamps that owned child * mutations legitimately change. */ export interface RuntimePromotionProjectRootAuthority { readonly version: 1; readonly projectRoot: string; readonly coordinationKey: string; readonly leasePosture: Extract; readonly identity: { readonly dev: string; readonly ino: string; readonly uid: string; readonly mode: string; }; /** * Attempt-local identity for a destination parent that existed at authority * capture time. A null binding deliberately permits the operation-owned * absent -> created transition; created parents are instead bound by their * journal-derived owner marker. */ readonly destinationParent: { readonly path: string; readonly identity: { readonly dev: string; readonly ino: string; readonly uid: string; readonly mode: string; }; } | null; } /** * Bind a current exact root after the caller validates its operation context. * * @throws {RuntimePromotionPreflightError} When root, parent, or lease authority changed. */ export declare function captureRuntimePromotionProjectRootAuthority(input: { readonly lease: RuntimeExclusiveLease; readonly projectRoot: string; readonly expectedPosture: RuntimePromotionProjectRootAuthority['leasePosture']; }): RuntimePromotionProjectRootAuthority; /** * Bind a recovery attempt without accidentally promoting an operation-created * destination parent into attempt-local preexisting authority. * * @throws {RuntimePromotionPreflightError} When recovery root or parent authority changed. */ export declare function captureRuntimePromotionRecoveryProjectRootAuthority(input: { readonly lease: RuntimeExclusiveLease; readonly projectRoot: string; readonly destinationParentPreexisting: boolean; }): RuntimePromotionProjectRootAuthority; /** * Capture the exact root selected by fresh preflight for this in-memory * attempt. Recovery must bind a new authority after validating its journal. * * @throws {RuntimePromotionPreflightError} When fresh preflight authority cannot be rebound. */ export declare function bindRuntimePromotionFreshProjectRootAuthority(input: { readonly lease: RuntimeExclusiveLease; readonly token: RuntimePromotionFreshProjectRootToken; }): RuntimePromotionProjectRootAuthority; /** * Reassert attempt-local root authority at every root-dependent boundary. * dev/ino/uid/mode are stable while owned descendants may change timestamps. * * @throws {RuntimePromotionPreflightError} When the lease, root, or parent authority changed. */ export declare function assertRuntimePromotionProjectRootAuthority(input: { readonly lease: RuntimeExclusiveLease; readonly authority: RuntimePromotionProjectRootAuthority; }): void; /** * Reassert the exact fresh-attempt root before entering a root-dependent * phase. The authored and filesystem layers then pin that same identity for * the duration of their individual calls. */ export declare function assertFreshRuntimePromotionProjectRoot(operation: { readonly dependencies: { readonly assertProjectRootAuthority: (input: { readonly lease: RuntimeExclusiveLease; readonly authority: RuntimePromotionProjectRootAuthority; }) => void; }; readonly lease: RuntimeExclusiveLease; readonly projectRootAuthority: RuntimePromotionProjectRootAuthority; }): void; export {}; //# sourceMappingURL=runtime-promotion-root-authority.d.ts.map