import { EventEmitter } from 'node:events';
/**
 * Monitors a single worker via periodic ping checks.
 * Emits 'worker-dead' when the worker has been silent beyond maxSilenceMs.
 * Uses setTimeout loops (not setInterval) for clean teardown.
 */
export declare class WorkerHeartbeat extends EventEmitter {
    private readonly workerName;
    private readonly intervalMs;
    private readonly maxSilenceMs;
    private lastPing;
    private timer;
    private running;
    constructor(workerName: string, options?: {
        intervalMs?: number;
        maxSilenceMs?: number;
    });
    /** Start the heartbeat monitoring loop. Idempotent. */
    start(): void;
    /** Stop the heartbeat loop. Safe to call multiple times. */
    stop(): void;
    /**
     * Called by the worker process to signal it is alive.
     * Resets the silence counter.
     */
    ping(): void;
    /** Returns true if the worker pinged recently (within maxSilenceMs). */
    isAlive(): boolean;
    /** Returns the timestamp of the last ping, or null if never pinged. */
    getLastPing(): Date | null;
    private scheduleCheck;
    private check;
}
//# sourceMappingURL=worker-heartbeat.d.ts.map