/** * Shared OAuth flow for Google-style providers (Gemini CLI, Antigravity). * * Both providers use the same authorization-code flow shape; only the client * credentials, scopes, endpoint constants, and project-discovery logic differ. */ import { OAuthCallbackFlow } from "./callback-server"; import type { OAuthController, OAuthCredentials } from "./types"; export interface GoogleOAuthFlowConfig { clientId: string; clientSecret: string; authUrl: string; tokenUrl: string; scopes: string[]; callbackPort: number; callbackPath: string; discoverProject: (accessToken: string, onProgress?: (message: string) => void) => Promise; } export declare class GoogleOAuthFlow extends OAuthCallbackFlow { private readonly config; constructor(ctrl: OAuthController, config: GoogleOAuthFlowConfig); generateAuthUrl(state: string, redirectUri: string): Promise<{ url: string; instructions?: string; }>; exchangeToken(code: string, _state: string, redirectUri: string): Promise; } export declare function runGoogleOAuthLogin(ctrl: OAuthController, config: GoogleOAuthFlowConfig): Promise;