/**
 * StageAdvancer — the SOLE writer of `multiMachine.sessionPool.stage` and the
 * mechanical rollout gate (Multi-Machine Session Pool §Rollout). A stage activates
 * ONLY when the prior stage's Tier-3 E2E recorded `green` for the CURRENT commit;
 * otherwise the advance is refused and audited. If a live stage later records `red`,
 * the advancer mechanically REVERTS to the prior (safe) stage. Per "Structure >
 * Willpower" the gate is code, not prose: no other path may flip the stage (enforced
 * by a Config.ts write-guard that only honors writes carrying this module's token).
 */
import type { SessionPoolE2EResultStore } from './SessionPoolE2EResultStore.js';
export declare const STAGES: readonly ["dark", "shadow", "live-transfer", "rebalance"];
export type SessionPoolStage = (typeof STAGES)[number];
export declare function stageIndex(stage: SessionPoolStage): number;
export type AdvanceResult = {
    ok: true;
    stage: SessionPoolStage;
} | {
    ok: false;
    reason: 'e2e-gate-not-passed' | 'already-at-or-past' | 'invalid-stage';
    detail?: string;
};
export interface StageAdvancerDeps {
    resultStore: SessionPoolE2EResultStore;
    /** The commit the running build is on — the E2E result must match it. */
    currentCommitSha: () => string;
    /** Read the current configured stage. */
    readStage: () => SessionPoolStage;
    /** The ONLY stage-config write path. Config.ts must reject writes that don't come through here. */
    writeStageConfig: (stage: SessionPoolStage) => void;
    audit?: (event: string, detail: Record<string, unknown>) => void;
}
export declare class StageAdvancer {
    private readonly d;
    constructor(d: StageAdvancerDeps);
    /**
     * Advance to `targetStage`, gated on a matching `green` E2E for the PRIOR stage at
     * the current commit. A missing/`red`/stale-commit/tampered prior result → refused.
     */
    advanceTo(targetStage: SessionPoolStage): AdvanceResult;
    /**
     * Reconcile on each cycle: if the CURRENT stage's latest E2E is `red` (regression),
     * mechanically revert to the prior stage until a fresh `green` is recorded. Returns
     * the stage after reconciliation.
     */
    reconcile(): SessionPoolStage;
}
//# sourceMappingURL=StageAdvancer.d.ts.map