import type { WorkerCrashMetrics } from '../../types/index.js';
import type { WorkerEngine } from './worker-engine.js';
import type { WorkerHeartbeat } from './worker-heartbeat.js';
export type { WorkerCrashMetrics };
/**
 * Listens for 'worker-dead' events from WorkerHeartbeat instances and
 * auto-restarts the dead worker via WorkerEngine with exponential backoff.
 * Stops restarting after maxRestarts consecutive crashes.
 */
export declare class WorkerCrashRecovery {
    private readonly engine;
    private readonly maxRestarts;
    private readonly metricsMap;
    private readonly timers;
    constructor(engine: WorkerEngine, options?: {
        maxRestarts?: number;
    });
    /**
     * Register a worker and its heartbeat monitor.
     * The recovery manager will listen for 'worker-dead' events and react.
     */
    registerWorker(workerName: string, heartbeat: WorkerHeartbeat): void;
    /** Returns current crash metrics for a given worker. */
    getMetrics(workerName: string): WorkerCrashMetrics;
    /** Reset crash counter for a worker (e.g. after manual intervention). */
    resetMetrics(workerName: string): void;
    private handleCrash;
    private computeBackoff;
}
//# sourceMappingURL=worker-crash-recovery.d.ts.map