import { type AuthCredential, AuthStorageBackend, type ExternalAuthCredentialStore } from '../auth/auth-storage.js';
import { type McpOAuthAgentSettings, type OAuthClientInformationRecord, type OAuthDiscoveryRecord } from '../auth/mcp-oauth-state.js';
export interface McpOAuthStoreOptions {
    authPath?: string;
    settings?: McpOAuthAgentSettings;
    isManagedMcpOAuthProvider?: (provider: string) => boolean;
}
/**
 * MCP-owned OAuth protocol state.
 *
 * Owns hosted-MCP credentials, client registration, and discovery metadata
 * using the shared auth backend plus optional keychain storage.
 */
export declare class McpOAuthStore implements ExternalAuthCredentialStore {
    private readonly storage;
    private readonly persistence;
    private credentials;
    private clientInfo;
    private discoveryInfo;
    constructor(storage: AuthStorageBackend, options?: Pick<McpOAuthStoreOptions, 'settings' | 'isManagedMcpOAuthProvider'>);
    private readonly isManagedProvider;
    static create(options?: McpOAuthStoreOptions): McpOAuthStore;
    static createReadOnly(options?: McpOAuthStoreOptions): McpOAuthStore;
    static fromStorage(storage: AuthStorageBackend, options?: McpOAuthStoreOptions): McpOAuthStore;
    static inMemory(options?: Pick<McpOAuthStoreOptions, 'settings'>): McpOAuthStore;
    reload(): void;
    getSettings(): Required<McpOAuthAgentSettings>;
    setSettings(settings: McpOAuthAgentSettings | undefined): void;
    owns(provider: string): boolean;
    listProviders(): string[];
    has(provider: string): boolean;
    get(provider: string): AuthCredential | undefined;
    set(provider: string, credential: AuthCredential): void;
    remove(provider: string): void;
    mutateCredentialWithLock<T>(provider: string, mutate: (credential: AuthCredential | undefined) => Promise<{
        result: T;
        credential?: AuthCredential;
    }>): Promise<T>;
    getClientInfo(provider: string): OAuthClientInformationRecord | undefined;
    setClientInfo(provider: string, info: OAuthClientInformationRecord): void;
    removeClientInfo(provider: string): void;
    getDiscoveryState(provider: string): OAuthDiscoveryRecord | undefined;
    setDiscoveryState(provider: string, info: OAuthDiscoveryRecord): void;
    removeDiscoveryState(provider: string): void;
    clear(provider: string): void;
    private applyState;
    private persistProviderPayload;
}
//# sourceMappingURL=oauth-state-store.d.ts.map