/**
 * @fileoverview Pure health scoring functions for respawn controller.
 *
 * Extracted from respawn-controller.ts for modularity. All functions are pure
 * (no side effects, no state) and take a HealthInputs interface that decouples
 * them from direct access to Session, RalphTracker, or AiChecker instances.
 *
 * @module respawn-health
 */
import type { RespawnAggregateMetrics, RalphLoopHealthScore, CircuitBreakerStatus } from './types.js';
/**
 * Input data for health score calculation.
 * Decouples the health calculation from direct access to controller internals.
 */
export interface HealthInputs {
    /** Aggregate cycle metrics */
    aggregateMetrics: RespawnAggregateMetrics;
    /** Current circuit breaker status */
    circuitBreakerStatus: CircuitBreakerStatus | null;
    /** Iteration stall metrics, or null if tracker unavailable */
    iterationStallMetrics: {
        stallDurationMs: number;
        warningThresholdMs: number;
        criticalThresholdMs: number;
    } | null;
    /** AI checker state summary */
    aiCheckerState: {
        status: string;
        consecutiveErrors: number;
    };
    /** Number of stuck-state recovery attempts */
    stuckRecoveryCount: number;
    /** Maximum allowed stuck recoveries */
    maxStuckRecoveries: number;
}
/**
 * Calculate a comprehensive health score for the Ralph Loop system.
 * Aggregates multiple health signals into a single score (0-100).
 *
 * @param inputs - Health calculation inputs
 * @returns Health score with component breakdown
 */
export declare function calculateHealthScore(inputs: HealthInputs): RalphLoopHealthScore;
/**
 * Determine whether to skip the /clear step based on current context usage.
 * Skips if token count is below the configured threshold percentage.
 *
 * @param lastTokenCount - Current token count from the session
 * @param skipClearThresholdPercent - Threshold percentage below which to skip /clear
 * @param maxContextTokens - Approximate max context window size
 * @returns True if /clear should be skipped
 */
export declare function shouldSkipClear(lastTokenCount: number, skipClearThresholdPercent: number, maxContextTokens: number): boolean;
//# sourceMappingURL=respawn-health.d.ts.map