import type { OAuthClientProvider } from '@modelcontextprotocol/sdk/client/auth.js'; import type { OAuthClientInformationMixed, OAuthClientMetadata, OAuthTokens } from '@modelcontextprotocol/sdk/shared/auth.js'; /** * Non-interactive provider for stored logins: returns a provider only when a * prior `agentgate auth login` saved tokens for the server's origin. Never * starts a browser flow — an expired/rejected token surfaces as an auth error. */ export declare function storedProviderFor(serverUrl: string): FileOAuthProvider | undefined; /** * File-backed OAuthClientProvider for the interactive `agentgate auth login` * flow. Client registration and tokens persist in the agentgate config dir; * the PKCE verifier lives only for the duration of one login. */ export declare class FileOAuthProvider implements OAuthClientProvider { private readonly serverUrl; private readonly redirect?; private readonly staticClientId?; private verifier?; private authorizationUrl?; constructor(serverUrl: string, redirect?: string | undefined, staticClientId?: string | undefined); get redirectUrl(): string | undefined; get clientMetadata(): OAuthClientMetadata; clientInformation(): OAuthClientInformationMixed | undefined; saveClientInformation(clientInformation: OAuthClientInformationMixed): void; tokens(): OAuthTokens | undefined; saveTokens(tokens: OAuthTokens): void; redirectToAuthorization(authorizationUrl: URL): void; /** The URL captured by redirectToAuthorization during auth(), if any. */ pendingAuthorizationUrl(): URL | undefined; saveCodeVerifier(codeVerifier: string): void; codeVerifier(): string; }