/**
 * GeminiCapacityEscalationMonitor — observe-only escalation for LONG Gemini
 * capacity blocks.
 *
 * #708's gemini capacity policy correctly DEFERS calls when Gemini reports a
 * quota reset window (e.g. "retry after 46758s" → ~13h), refusing doomed
 * subprocesses until the window passes. But it only schedules/defers — it never
 * ESCALATES. A short defer (a few minutes) is fine to absorb silently; a
 * multi-HOUR block means the agent/mentee is invisibly unavailable for half a
 * day, which the operator should know about. Item-3's original intent was
 * "detect quota → schedule/retry/ESCALATE, not silently stall" — this closes the
 * missing escalate half.
 *
 * Design = observe-and-escalate (NOT a callback threaded into the two low-level
 * provider call sites): the deferral state is already a queryable module-global
 * via getGeminiCapacityGate(), so a monitor riding the existing cadence reads it
 * and raises ONE attention item per deferral episode. Observe-only — it never
 * mutates the gate, never blocks a call, never auto-recovers. Ships OFF.
 *
 * Mirrors ApprenticeshipCycleSlaMonitor: injectable clock + gate reader +
 * raiseAttention for testability, per-episode dedup, enabled gate.
 */
import { type GeminiCapacityGate } from '../providers/adapters/gemini-cli/observability/geminiCapacityPolicy.js';
export interface GeminiCapacityEscalationConfig {
    enabled?: boolean;
    /** Only escalate when the remaining defer window is at/above this. Default 60. */
    escalateAfterMinutes?: number;
}
export interface GeminiCapacityEscalationAttention {
    id: string;
    title: string;
    summary: string;
    category: string;
    priority: 'LOW' | 'NORMAL' | 'HIGH' | 'URGENT';
    sourceContext: string;
}
export interface GeminiCapacityEscalationMonitorOptions {
    config?: GeminiCapacityEscalationConfig;
    now?: () => number;
    /** Reads the live capacity gate. Defaults to the module-global getGeminiCapacityGate. */
    gateReader?: (now: number) => GeminiCapacityGate;
    raiseAttention?: (item: GeminiCapacityEscalationAttention) => Promise<unknown> | unknown;
}
export interface GeminiCapacityEscalationTickResult {
    enabled: boolean;
    blocked: boolean;
    remainingMs: number;
    escalated: boolean;
}
export declare class GeminiCapacityEscalationMonitor {
    private readonly config;
    private readonly now;
    private readonly gateReader;
    private readonly raiseAttention;
    /** The `deferredUntil` value of the episode we've already escalated (dedup key). */
    private escalatedEpisode;
    constructor(opts?: GeminiCapacityEscalationMonitorOptions);
    get enabled(): boolean;
    /** Live view: is Gemini currently capacity-blocked, and for how much longer. */
    status(): {
        blocked: boolean;
        remainingMs: number;
        deferredUntil: number | null;
        reason: string | null;
    };
    tick(): Promise<GeminiCapacityEscalationTickResult>;
}
//# sourceMappingURL=GeminiCapacityEscalationMonitor.d.ts.map