/**
 * @fileoverview RalphStallDetector - Iteration stall detection
 *
 * Monitors iteration progress and emits warnings when the loop
 * appears to be stalled (no iteration changes for extended periods).
 *
 * Extracted from ralph-tracker.ts as part of domain splitting.
 *
 * @module ralph-stall-detector
 */
import { EventEmitter } from 'node:events';
/**
 * RalphStallDetector - Detects iteration stalls in the Ralph loop.
 *
 * Events emitted:
 * - `iterationStallWarning` - When iteration hasn't changed for warning threshold
 * - `iterationStallCritical` - When iteration hasn't changed for critical threshold
 */
export declare class RalphStallDetector extends EventEmitter {
    /** Timestamp when iteration count last changed */
    private _lastIterationChangeTime;
    /** Last observed iteration count for stall detection */
    private _lastObservedIteration;
    /** Timer for iteration stall detection */
    private _iterationStallTimer;
    /** Iteration stall warning threshold (ms) - default 10 minutes */
    private _iterationStallWarningMs;
    /** Iteration stall critical threshold (ms) - default 20 minutes */
    private _iterationStallCriticalMs;
    /** Whether stall warning has been emitted */
    private _iterationStallWarned;
    /** Whether the loop is currently active */
    private _loopActive;
    constructor();
    /**
     * Start iteration stall detection timer.
     * Should be called when the loop becomes active.
     */
    startIterationStallDetection(): void;
    /**
     * Stop iteration stall detection timer.
     */
    stopIterationStallDetection(): void;
    /**
     * Notify the detector that the iteration has changed.
     * Resets stall tracking state.
     */
    notifyIterationChanged(iteration: number): void;
    /**
     * Set whether the loop is currently active.
     * Stall detection only fires when loop is active.
     */
    setLoopActive(active: boolean): void;
    /**
     * Check for iteration stall and emit appropriate events.
     */
    private checkIterationStall;
    /**
     * Get iteration stall metrics for monitoring.
     */
    getIterationStallMetrics(): {
        lastIterationChangeTime: number;
        stallDurationMs: number;
        warningThresholdMs: number;
        criticalThresholdMs: number;
        isWarned: boolean;
        currentIteration: number;
    };
    /**
     * Configure iteration stall thresholds.
     * @param warningMs - Warning threshold in milliseconds
     * @param criticalMs - Critical threshold in milliseconds
     */
    configureIterationStallThresholds(warningMs: number, criticalMs: number): void;
    /**
     * Reset stall detector state.
     */
    reset(): void;
    /**
     * Clean up all resources.
     */
    destroy(): void;
}
//# sourceMappingURL=ralph-stall-detector.d.ts.map