import type { OAuthServerInfo } from "@modelcontextprotocol/sdk/client/auth.js";
import type { AuthorizationServerMetadata, OAuthTokens } from "@modelcontextprotocol/sdk/shared/auth.js";
import type { FetchLike } from "@modelcontextprotocol/sdk/shared/transport.js";
import type { McpOAuthProvider } from "./oauth-provider.ts";
import type { McpStoredAuth } from "./token-store.ts";
export interface RefreshManagerOptions {
    fetchFn?: FetchLike;
    maxRetries?: number;
    retryDelayMs?: number;
    discover?: (serverUrl: string) => Promise<OAuthServerInfo>;
}
export declare function isTokenStale(record: McpStoredAuth | undefined, now: number): boolean;
export declare function assertS256Supported(metadata: AuthorizationServerMetadata | undefined, serverName: string): void;
export declare class McpRefreshManager {
    #private;
    constructor(provider: McpOAuthProvider, options?: RefreshManagerOptions);
    ensureFresh(): Promise<OAuthTokens | undefined>;
    refresh(): Promise<OAuthTokens>;
}
//# sourceMappingURL=oauth-refresh.d.ts.map