/**
 * @license
 * Copyright 2025 Vybestack LLC
 * SPDX-License-Identifier: Apache-2.0
 */
/**
 * Coordinates token refresh operations for the credential proxy server.
 * Provides rate limiting, concurrent deduplication, and retry logic.
 *
 * @plan PLAN-20250214-CREDPROXY.P18
 * @requirement R5, R6
 * @pseudocode analysis/pseudocode/006-refresh-coordinator.md
 */
import type { TokenStore, OAuthToken } from '@vybestack/llxprt-code-core';
export interface RefreshResult {
    status: 'ok' | 'rate_limited' | 'auth_error' | 'error';
    token?: OAuthToken;
    retryAfter?: number;
    error?: string;
}
export interface RefreshCoordinatorOptions {
    tokenStore: TokenStore;
    refreshFn: (provider: string, currentToken: OAuthToken) => Promise<OAuthToken>;
    cooldownMs?: number;
}
export declare class RefreshCoordinator {
    private readonly options;
    private readonly cooldownMs;
    private readonly lastRefreshMap;
    private readonly inflightMap;
    constructor(options: RefreshCoordinatorOptions);
    refresh(provider: string, bucket?: string): Promise<RefreshResult>;
    reset(): void;
    private executeRefresh;
}
