/** * AuthManager interface and implementation for @a5c-ai/agent-mux. * * Provides read-only authentication state detection and setup guidance * for all supported agents. Delegates detection to agent adapters. * * @see 08-config-and-auth.md */ import type { AgentName } from './types.js'; import type { AdapterRegistry } from './adapter-registry.js'; export type { AuthMethod as AuthMethodType, AuthState as FullAuthState, AuthSetupGuidance as FullAuthSetupGuidance, AuthSetupStep, AuthEnvVar, } from './auth-types.js'; import type { AuthState } from './auth-types.js'; import type { AuthSetupGuidance } from './auth-types.js'; /** Authentication state detection and setup guidance. */ export interface AuthManager { /** Check authentication state for a single agent. */ check(agent: AgentName): Promise; /** Check authentication state for all registered agents. */ checkAll(): Promise>; /** Get structured setup guidance for authenticating with an agent. */ getSetupGuidance(agent: AgentName): AuthSetupGuidance; } /** * Implementation of AuthManager. * * Delegates detection to adapter.detectAuth() and guidance to * adapter.getAuthGuidance(). Each call to check() performs a fresh * detection (no caching). */ export declare class AuthManagerImpl implements AuthManager { private readonly _adapters; constructor(adapters: AdapterRegistry); private _getAdapter; check(agent: AgentName): Promise; checkAll(): Promise>; getSetupGuidance(agent: AgentName): AuthSetupGuidance; }