import { type RotationTracking } from './types.js'; /** * Update grace period metrics gauge. */ export declare function updateGraceMetrics(graceExpiresAtMs: number): void; /** * Grace period polling manager. * Schedules safety polls when WS events are not received. */ export declare class GracePeriodPoller { private readonly timer; private readonly isRunning; private readonly getTracking; private readonly onPoll; constructor(options: { isRunning: () => boolean; getTracking: () => RotationTracking; onPoll: () => Promise<{ graceExpiresAt?: string; } | null>; }); /** * Schedule a grace period safety poll. * If we haven't received a WebSocket rotation event by the time 50% of the * grace period has elapsed, poll the server to detect rotations. */ schedule(graceExpiresAt: Date | null): void; private executePoll; stop(): void; } /** * Heartbeat monitor that detects stale keys. * Periodically checks if the key should have rotated but we missed it. */ export declare class HeartbeatMonitor { private readonly timer; private readonly isRunning; private readonly getTracking; private readonly onStale; private readonly onRefreshSchedule; constructor(options: { isRunning: () => boolean; getTracking: () => RotationTracking; onStale: () => Promise<{ nextRotationAt?: string; graceExpiresAt?: string; } | null>; onRefreshSchedule: (response: { nextRotationAt?: string; graceExpiresAt?: string; } | null) => void; }); /** * Start the heartbeat freshness monitor. * Every 60 seconds, checks if the current key should have rotated but we missed it. */ start(): void; private check; stop(): void; } /** * Retry rotation handling with exponential backoff. */ export declare class RotationRetryHandler { private readonly isRunning; private readonly onRetry; private readonly onSuccess; private readonly maxAttempts; constructor(options: { isRunning: () => boolean; onRetry: () => Promise<{ nextRotationAt?: string; graceExpiresAt?: string; } | null>; onSuccess: (response: { nextRotationAt?: string; graceExpiresAt?: string; }) => void; maxAttempts: number; }); /** * Schedule a retry with exponential backoff. */ schedule(keyName: string, attempt: number): void; private executeRetry; } //# sourceMappingURL=safety-rails.d.ts.map