import type { VerifiedRuntimeManifest } from './runtime-manifest.js'; import type { RuntimeManifestIdentity, RuntimePromotionJournal } from './runtime-promotion-journal-schema.js'; import type { DurableClosedPromotionJournal, DurableOpenPromotionJournal, DurablePromotionJournal } from './runtime-promotion-journal.js'; import type { RuntimePromotionRecoveryExplicitInputs, RuntimePromotionRecoveryOperation } from './runtime-promotion-recovery-types.js'; export declare function recoveryInputsCompatible(journal: RuntimePromotionJournal, explicit: RuntimePromotionRecoveryExplicitInputs | undefined): boolean; export declare function recoveryFailureReason(error: unknown, journal: RuntimePromotionJournal | undefined): 'operation-failed' | 'journal-malformed' | 'journal-oversize' | 'journal-key-mismatch' | 'journal-phase-invalid' | 'artifact-mismatch' | 'state-ambiguous'; export declare function deriveRecoverySourceRuntime(journal: RuntimePromotionJournal, ephemeralProjectsDir: string): string | undefined; export declare function assertRecoveryProjectRoot(operation: RuntimePromotionRecoveryOperation): void; /** @throws {Error} When the selected recovery source no longer has exact authority. */ export declare function assertRecoverySourceAuthority(operation: RuntimePromotionRecoveryOperation): string; /** @throws {Error} When the recovery source is absent or no longer canonically located. */ export declare function assertRecoverySourceLocation(operation: RuntimePromotionRecoveryOperation): string; export declare function refreshRecoveryJournal(operation: RuntimePromotionRecoveryOperation, expectedReceipt?: DurablePromotionJournal): Promise; /** @throws {Error} When a durable recovery receipt is not open. */ export declare function asRecoveryOpen(operation: RuntimePromotionRecoveryOperation): DurableOpenPromotionJournal; /** @throws {Error} When a durable recovery receipt is not closed. */ export declare function asRecoveryClosed(operation: RuntimePromotionRecoveryOperation): DurableClosedPromotionJournal; /** @throws {Error} When required durable recovery manifest evidence is absent. */ export declare function requireManifest(manifest: RuntimeManifestIdentity | null, description: string): RuntimeManifestIdentity; /** @throws {Error} When observed recovery manifest identity differs from the journal. */ export declare function inspectExactRecoveryManifest(operation: RuntimePromotionRecoveryOperation, runtimeDir: string, posture: 'cache-source' | 'project-runtime', expected: RuntimeManifestIdentity): VerifiedRuntimeManifest; type RecoveryAuthoredTransaction = NonNullable; export declare function bindRecoveryAuthoredReceipt(operation: RuntimePromotionRecoveryOperation): Promise; export declare function loadRecoveryAuthored(operation: RuntimePromotionRecoveryOperation): Promise; export declare function recoveryAuthoredWasMaterialized(journal: RuntimePromotionJournal): boolean; export declare function recoveryRuntimeAuthority(input: { readonly journal: RuntimePromotionJournal; readonly outcome: 'committed' | 'rolled-back'; }): { readonly location: 'project' | 'cache' | 'none'; readonly manifest: RuntimeManifestIdentity | null; }; /** @throws {Error} When open recovery runtime authority cannot be proven exactly. */ export declare function inspectOpenRecoveryRuntimeAuthority(operation: RuntimePromotionRecoveryOperation, outcome: 'committed' | 'rolled-back'): RuntimeManifestIdentity | null; export {}; //# sourceMappingURL=runtime-promotion-recovery-common.d.ts.map