/** * OAuth Token Manager for MAMA Standalone * * Manages Claude Pro OAuth tokens from ~/.claude/.credentials.json * - Reads tokens from Claude Code credentials file * - Caches tokens with TTL * - Auto-refreshes tokens before expiry * - Writes refreshed tokens back to file */ import type { TokenStatus, OAuthManagerOptions } from './types.js'; export declare class OAuthManager { private readonly credentialsPath; private readonly cacheTtlMs; private readonly refreshBufferMs; private readonly fetchFn; private cache; constructor(options?: OAuthManagerOptions); /** * Get a valid access token, refreshing if necessary * * @returns Access token string * @throws OAuthError if token cannot be obtained */ getToken(): Promise; /** * Get token status information * * @returns Token status including validity, expiry, and subscription info */ getStatus(): Promise; /** * Force refresh the token * * @returns New access token * @throws OAuthError if refresh fails */ forceRefresh(): Promise; /** * Clear the token cache */ clearCache(): void; /** * Check if token needs refresh (expires within buffer time) */ private needsRefresh; /** * Read credentials from file */ private readCredentials; /** * Refresh the OAuth token */ private refreshToken; /** * Write refreshed credentials to file */ private writeCredentials; } //# sourceMappingURL=oauth-manager.d.ts.map