/**
 * 3-gate evaluation logic for memory consolidation.
 *
 * Gates are evaluated cheapest-first:
 *   1. Time gate — is it too soon since the last consolidation?
 *   2. Session scan throttle — avoid expensive session scans too frequently
 *   3. Session gate — enough sessions since the last consolidation?
 *   4. File gate — enough daily notes to justify an LLM call?
 *
 * @module
 */
/** 10-minute throttle when the time gate passes but session gate doesn't. */
export declare const SESSION_SCAN_INTERVAL_MS: number;
export interface ConsolidationGateConfig {
    /** Master switch for automatic consolidation. */
    enabled: boolean;
    /** Number of daily-note files required before consolidation (default: 7). */
    fileThreshold: number;
    /** Minimum hours since the last successful consolidation (default: 24). */
    minHoursSinceLastConsolidation: number;
    /** Minimum completed sessions since the last consolidation (default: 5). */
    minSessionsSinceLastConsolidation: number;
}
export interface ConsolidationGateState {
    /** Unix timestamp (ms) of the last successful consolidation, or null if never run. */
    lastConsolidatedAt: number | null;
    /** Unix timestamp (ms) of the last session-count scan, for throttling. */
    lastSessionScanAt: number | null;
}
export interface GateResult {
    /** Whether all gates passed and consolidation should proceed. */
    shouldConsolidate: boolean;
    /** Human-readable reason for the decision. */
    reason: string;
    /** If set, the caller can retry after this many ms (used by scan throttle). */
    retryAfterMs?: number;
}
/** Create a ConsolidationGateConfig with production defaults. */
export declare function createDefaultGateConfig(): ConsolidationGateConfig;
/**
 * Evaluate all consolidation gates in order (cheapest first).
 *
 * @param config     Gate thresholds and master switch.
 * @param state      Persisted timestamps for time-gate and throttle.
 * @param dailyNoteCount   Number of daily-note files currently in memory/.
 * @param recentSessionCount  Sessions completed since the last consolidation.
 * @param now        Current time in ms (injectable for testing).
 * @returns A {@link GateResult} describing the verdict.
 */
/**
 * Evaluate cheap gates (no I/O): master switch, time, scan throttle.
 *
 * Returns a blocking {@link GateResult} if any cheap gate fails,
 * or `null` if all cheap gates pass and expensive checks should proceed.
 */
export declare function evaluateCheapGates(config: ConsolidationGateConfig, state: ConsolidationGateState, now?: number): GateResult | null;
/**
 * Evaluate expensive gates (after I/O): session count, file count.
 *
 * Only call after {@link evaluateCheapGates} returns `null`.
 */
export declare function evaluateExpensiveGates(config: ConsolidationGateConfig, dailyNoteCount: number, recentSessionCount: number): GateResult;
/**
 * Evaluate all consolidation gates in order (cheapest first).
 *
 * @param config     Gate thresholds and master switch.
 * @param state      Persisted timestamps for time-gate and throttle.
 * @param dailyNoteCount   Number of daily-note files currently in memory/.
 * @param recentSessionCount  Sessions completed since the last consolidation.
 * @param now        Current time in ms (injectable for testing).
 * @returns A {@link GateResult} describing the verdict.
 */
export declare function evaluateConsolidationGates(config: ConsolidationGateConfig, state: ConsolidationGateState, dailyNoteCount: number, recentSessionCount: number, now?: number): GateResult;
