/**
 * @fileoverview Adaptive timing controller for respawn idle detection.
 *
 * Extracted from respawn-controller.ts for modularity. Tracks historical timing
 * data and adjusts the completion confirm timeout dynamically based on the 75th
 * percentile of recent idle detection durations.
 *
 * @module respawn-adaptive-timing
 */
import type { TimingHistory } from './types.js';
/**
 * Configuration for adaptive timing bounds.
 */
export interface AdaptiveTimingConfig {
    /** Minimum adaptive completion confirm timeout (ms) */
    adaptiveMinConfirmMs: number;
    /** Maximum adaptive completion confirm timeout (ms) */
    adaptiveMaxConfirmMs: number;
}
/**
 * Manages adaptive timing for respawn idle detection.
 *
 * Uses historical idle detection durations to calculate an optimal completion
 * confirm timeout. The timeout is based on the 75th percentile of recent
 * durations with a 20% safety buffer, clamped to configured bounds.
 */
export declare class RespawnAdaptiveTiming {
    private config;
    private timingHistory;
    constructor(config: AdaptiveTimingConfig);
    /**
     * Record timing data from a completed cycle for adaptive adjustments.
     *
     * @param idleDetectionMs - Time spent detecting idle
     * @param cycleDurationMs - Total cycle duration
     */
    recordTimingData(idleDetectionMs: number, cycleDurationMs: number): void;
    /**
     * Get the current adaptive completion confirm timeout.
     * Returns the calculated value, or the default if not enough samples.
     *
     * @returns Completion confirm timeout in milliseconds
     */
    getAdaptiveCompletionConfirmMs(): number;
    /**
     * Get the current timing history for monitoring.
     * @returns Copy of timing history
     */
    getTimingHistory(): TimingHistory;
    /**
     * Reset all timing history.
     */
    reset(): void;
    /**
     * Recalculate the adaptive completion confirm timeout based on historical data.
     * Uses the 75th percentile of recent idle detection times as the new timeout,
     * with a 20% buffer for safety.
     */
    private updateAdaptiveTiming;
}
//# sourceMappingURL=respawn-adaptive-timing.d.ts.map