import type { FetchImpl } from "../../types.js"; import type { OAuthController, OAuthCredentials, OAuthPrompt } from "./types.js"; type GitHubCopilotLoginOptions = { onAuth: (url: string, instructions?: string) => void; onPrompt: (prompt: OAuthPrompt) => Promise; onProgress?: (message: string) => void; copilotIntegrationId?: unknown; signal?: AbortSignal; pollIntervalFloorMs?: number; pollIntervalScaleMs?: number; fetch?: FetchImpl; }; /** * Refresh GitHub Copilot token. * GitHub OAuth tokens from both the OpenCode app and the Copilot CLI app * remain directly usable, so existing logins need no token exchange or migration. */ export declare function refreshGitHubCopilotToken(refreshToken: string, enterpriseDomain?: string, apiEndpoint?: string): OAuthCredentials; export declare function refreshGitHubCopilotHook(credentials: OAuthCredentials): Promise; /** * Login with GitHub Copilot OAuth (device code flow) * * @param options.onAuth - Callback with URL and optional instructions (user code) * @param options.onPrompt - Callback to prompt user for input * @param options.onProgress - Optional progress callback * @param options.signal - Optional AbortSignal for cancellation */ export declare function loginGitHubCopilot(options: GitHubCopilotLoginOptions): Promise; export declare function loginGitHubCopilotHook(callbacks: OAuthController): Promise; export {};