import type { ApiShapeId, AuthProvider } from "./types.js"; import type { SecretStore } from "../../auth-store/dist/index.js"; import type { ApiKeyLoginOptions } from "./auth/api-key.js"; import type { PromptForSecret } from "./auth/types.js"; export interface LoginContext { promptForSecret?: PromptForSecret; envVars?: Record; store?: SecretStore; resolvePreferredLogin?: (input: { provider: AuthProvider; apiKey?: string; envValue?: string; }) => Promise; } export type ProviderStoreFactory = (provider: AuthProvider) => SecretStore; export interface ProviderRegistryOptions { envVars?: Record; } export interface ProviderAgent { id: string; apiShapes?: readonly ApiShapeId[]; } export declare class ProviderRegistry { private readonly providers; private readonly byId; private readonly storeFactory?; private readonly envVars; constructor(providers: readonly AuthProvider[], storeFactory?: ProviderStoreFactory, options?: ProviderRegistryOptions); list(): readonly AuthProvider[]; get(id: string): AuthProvider | undefined; forAgent(agent: ProviderAgent): readonly AuthProvider[]; isLoggedIn(id: string, options?: { readOnly?: boolean; }): Promise; login(id: string, options: ApiKeyLoginOptions, context?: LoginContext): Promise; resolveCredential(id: string, options?: ApiKeyLoginOptions, context?: Pick & { readOnly?: boolean; }): Promise; logout(id: string, options?: { store?: SecretStore; }): Promise; private requireProvider; private requireStore; }