export declare function loadGitHubToken(tokenPath: string): string | null; export declare function saveGitHubToken(tokenPath: string, token: string): void; export declare function exchangeCopilotToken(githubToken: string): Promise<{ token: string; expiresAt: number; }>; export declare function runDeviceFlow(clientId: string): Promise; /** * Ensure we have a valid GitHub token that can exchange for Copilot tokens. * * Flow: load cached token → try exchange → if 401, re-auth → save → return. * * When `allowInteractive` is false (e.g. a hidden boot/login launch with no * TTY), a missing or expired cached token does NOT fall back to the device * flow — it throws instead, so the proxy fails fast with a clear message rather * than hanging on a code/browser prompt nobody can see. */ export declare function ensureGitHubAuth(tokenPath: string, clientId: string, allowInteractive?: boolean): Promise;