import type { OAuthClientProvider, OAuthDiscoveryState } from '@modelcontextprotocol/sdk/client/auth.js'; import type { OAuthClientInformationMixed, OAuthTokens, OAuthClientMetadata } from '@modelcontextprotocol/sdk/shared/auth.js'; export interface KeychainBackend { read(): string | undefined; write(blob: string): void; } export interface OauthPendingEntry { status: 'oauth_pending'; authorizationUrl: string; timestamp: number; } export declare function readOauthPending(): Record; export declare function clearOauthPending(serverName: string): void; export declare class KeychainOAuthProvider implements OAuthClientProvider { private readonly serverName; private readonly backend; constructor(serverName: string, backend?: KeychainBackend); get redirectUrl(): string; get clientMetadata(): OAuthClientMetadata; clientInformation(): OAuthClientInformationMixed | undefined; saveClientInformation(info: OAuthClientInformationMixed): void; tokens(): OAuthTokens | undefined; saveTokens(tokens: OAuthTokens): void; saveCodeVerifier(codeVerifier: string): void; codeVerifier(): string; state(): string; saveDiscoveryState(state: OAuthDiscoveryState): void; discoveryState(): OAuthDiscoveryState | undefined; invalidateCredentials(scope: 'all' | 'client' | 'tokens' | 'verifier' | 'discovery'): void; redirectToAuthorization(authorizationUrl: URL): Promise; private _readSlot; private _updateSlot; }