type BreakerPhase = 'closed' | 'open' | 'half-open';
declare class CircuitBreaker {
    private states;
    private threshold;
    private baseCooldownMs;
    constructor(threshold?: number, cooldownMs?: number);
    /** Record a failed invocation. Returns true if the breaker just opened. */
    recordFailure(agent: string): boolean;
    /** Record a successful invocation. Closes the breaker, resets counters. */
    recordSuccess(agent: string): void;
    /**
     * Check if an agent is currently blocked (breaker open AND cooldown still
     * active). After cooldown elapses we transition to half-open and *return
     * false for the first caller only* — that caller becomes the probe.
     */
    isOpen(agent: string): boolean;
    /** Get status for display / debug. */
    getStatus(agent: string): {
        failures: number;
        open: boolean;
        phase: BreakerPhase;
        openedAt: number | null;
        cooldownMs: number;
    };
    /** List all agents currently blocked (open or half-open with active probe). */
    listOpen(): string[];
    /**
     * Manually clear breaker state. Pass an agent name to reset just that
     * one, or no argument to reset everything. Useful for an operator
     * `/router reset <agent>` command.
     */
    reset(agent?: string): void;
    private get;
}
export declare const circuitBreaker: CircuitBreaker;
export {};
//# sourceMappingURL=circuit-breaker.d.ts.map