/** * Read-only, bounded projection of Init's fixed promotion journal. * * The core runtime plane owns the filesystem trust boundary and transports only * anchored, bounded bytes. Init owns the complete journal schema and reduces it * to the small customer-safe recovery vocabulary returned here. */ import { type AnchoredRecordReadResult, type RecoveryHeaderInspection } from '@opensip-cli/core'; import { type RuntimePromotionJournal } from './runtime-promotion-journal-schema.js'; import type { RuntimeRecoveryCommand, RuntimeRecoveryPhase, RuntimeRecoveryReasonCode } from '@opensip-cli/contracts'; export type RuntimePromotionStatusInspection = { readonly status: 'absent'; } | { readonly status: 'busy'; } | { readonly status: 'recovery-required'; readonly recoveryPhase: RuntimeRecoveryPhase; readonly recoveryReasonCode: RuntimeRecoveryReasonCode; readonly recoveryCommand: RuntimeRecoveryCommand; } | { readonly status: 'cleanup-pending'; readonly recoveryPhase: 'cleanup'; readonly recoveryReasonCode: 'cleanup-pending'; readonly recoveryCommand: 'opensip init'; readonly sourcePreserved?: boolean; }; /** Injectable journal-inspection seam for deterministic race and trust-boundary tests. */ export interface RuntimePromotionStatusDependencies { readonly coordinationKeyForProject: (projectRoot: string) => string; readonly inspectHeader: (projectRoot: string) => RecoveryHeaderInspection; readonly readJournal: (coordinationKey: string) => AnchoredRecordReadResult; } export interface InspectRuntimePromotionStatusInput { readonly projectRoot: string; readonly coordinationKey: string; readonly dependencies?: Partial; } /** * Reduce Init's internal phase machine to its deliberately coarser public * vocabulary. Direction is authoritative; a pending forward intent is more * current than the last completed idle phase. */ export declare function projectRuntimePromotionRecoveryPhase(journal: Pick): RuntimeRecoveryPhase; /** * Bracket one full anchored read with the core-owned bounded header. Any * publication or state transition observed across that window is reported as * busy rather than combining two journal generations. */ export declare function inspectRuntimePromotionStatus(input: InspectRuntimePromotionStatusInput): RuntimePromotionStatusInspection; //# sourceMappingURL=runtime-promotion-status.d.ts.map