/** * Follower-to-leader promotion manager (#1850). * * Handles the lifecycle of promoting a follower process to leader when the * current leader becomes unreachable. Extracted from UnifiedConsole.ts to * reduce complexity and allow per-instance state tracking. * * Each PromotionManager instance tracks its own attempt counter, so multiple * followers in the same process (unlikely but possible) don't interfere * with each other's promotion budgets. */ import { type ElectionResult } from './LeaderElection.js'; import type { LeaderForwardingLogSink, SessionHeartbeat } from './LeaderForwardingSink.js'; import type { UnifiedConsoleOptions } from './UnifiedConsole.js'; export declare class PromotionManager { private readonly options; private readonly consolePort; private readonly startAsLeader; private readonly startAsFollower; private inProgress; private attempts; constructor(options: UnifiedConsoleOptions, consolePort: number, startAsLeader: (options: UnifiedConsoleOptions, election: ElectionResult, consolePort: number) => Promise, startAsFollower: (options: UnifiedConsoleOptions, election: ElectionResult, consolePort: number) => Promise); /** * Attempt promotion. Safe to call from the ForwardingSink onLeaderDeath * callback — guards against concurrent and excessive attempts. */ promote(forwardingSink: LeaderForwardingLogSink, sessionHeartbeat: SessionHeartbeat): Promise; } //# sourceMappingURL=PromotionManager.d.ts.map