import type { EventRouterConfig } from './types.js';
/**
 * Circuit breaker for event loop detection and per-workflow rate limiting.
 *
 * Two-layer protection:
 * 1. Chain depth: Rejects events exceeding configurable max chain depth.
 * 2. Rate limiting: Sliding-window per-workflow rate limiter.
 */
export declare class EventCircuitBreaker {
    private readonly config;
    private rateLimiter;
    constructor(config: EventRouterConfig);
    /**
     * Check if the current chain depth is within limits.
     */
    checkChainDepth(currentDepth: number): {
        allowed: boolean;
        reason?: string;
    };
    /**
     * Check if a workflow is within its per-minute rate limit.
     * Uses a sliding window of 60 seconds.
     */
    checkRateLimit(workflowKey: string): {
        allowed: boolean;
        retryAfterMs?: number;
    };
    /**
     * Clear all rate limit state (for testing).
     */
    reset(): void;
}
//# sourceMappingURL=circuit-breaker.d.ts.map