/**
 * featureRollout — pure rollout-stage logic for the Graduated Feature Rollout
 * standard (GRADUATED-FEATURE-ROLLOUT-SPEC §4.2-4.3). No I/O, no tracker, no
 * config reads — just the deterministic mapping the reconciler/driver depend on,
 * so every rule is unit-testable in isolation.
 *
 * THE safety invariant: the rollout stage is DERIVED from observing the feature's
 * config flag + its shipped default — it is NEVER computed from anything the
 * driver could write. A feature can only reach `default-on` when its shipped
 * ConfigDefaults default is enabled (a human code change), so the driver can
 * never silently promote a feature.
 */
import type { RolloutStage, InitiativePhaseStatus } from './InitiativeTracker.js';
/** Observed flag state for a ships-staged feature, read from live config +
 *  the shipped ConfigDefaults default. All fields are observations, never writes. */
export interface RolloutFlagObservation {
    /** `flagPath.enabled` in the agent's live config. */
    flagEnabled?: boolean;
    /** `flagPath.dryRun` in the agent's live config. */
    flagDryRun?: boolean;
    /** The SHIPPED ConfigDefaults default for `flagPath.enabled` — true ⇒ the
     *  feature is on for all new agents = default-on. Source-of-truth for the
     *  terminal stage; a human flipping it (code change) is the only way here. */
    defaultEnabled?: boolean;
}
/** The rollout phases of a ships-staged track, in order. `dark` is the implicit
 *  pre-phase (feature present but off) — not a phase entry. */
export declare const ROLLOUT_PHASE_IDS: readonly ["dry-run", "live", "default-on"];
export type RolloutPhaseId = (typeof ROLLOUT_PHASE_IDS)[number];
/**
 * Derive the rollout stage from observation alone.
 *  - shipped default enabled ⇒ `default-on` (terminal; only a code change reaches it)
 *  - flag not enabled ⇒ `dark`
 *  - enabled + dryRun ⇒ `dry-run`
 *  - enabled + not dryRun ⇒ `live`
 */
export declare function deriveRolloutStage(obs: RolloutFlagObservation): RolloutStage;
/**
 * Phase statuses for an observed stage. CRITICAL (spec §4.3): at `default-on`
 * the final phase is left `in-progress`, NOT `done` — the reconciler archives
 * the track instead of letting all-phases-`done` flip the initiative to the
 * immutable terminal `completed`/`succeeded` state (which would block a later
 * regression from reopening it).
 */
export declare function rolloutPhaseStatuses(stage: RolloutStage): Record<RolloutPhaseId, InitiativePhaseStatus>;
/** True when the observed stage means the track should be archived (reopenable),
 *  not driven to completion. */
export declare function shouldArchiveAtStage(stage: RolloutStage): boolean;
/** True when `to` is earlier than `from` — a regression (e.g. default-on → live
 *  after a revert). The reconciler writes `pipelineStage:'regressed'` + reactivates. */
export declare function isRegression(from: RolloutStage, to: RolloutStage): boolean;
//# sourceMappingURL=featureRollout.d.ts.map