import type { OAuthCredentials } from "./types"; export declare const COPILOT_USER_AGENT: "opencode/1.3.15"; export declare const OPENCODE_HEADERS: { readonly "User-Agent": "opencode/1.3.15"; }; export type ParsedGitHubCopilotApiKey = { accessToken: string; enterpriseUrl?: string; }; export declare function normalizeGitHubCopilotEnterpriseDomain(input: string | undefined): string | undefined; export declare function parseGitHubCopilotApiKey(apiKeyRaw: string): ParsedGitHubCopilotApiKey; export declare function normalizeDomain(input: string): string | null; export declare function getGitHubCopilotBaseUrl(enterpriseDomain?: string): string; /** * Refresh GitHub Copilot token. * With the opencode OAuth flow, the GitHub token is used directly — no JWT exchange needed. */ export declare function refreshGitHubCopilotToken(refreshToken: string, enterpriseDomain?: string): OAuthCredentials; /** * 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: { onAuth: (url: string, instructions?: string) => void; onPrompt: (prompt: { message: string; placeholder?: string; allowEmpty?: boolean; }) => Promise; onProgress?: (message: string) => void; signal?: AbortSignal; pollIntervalFloorMs?: number; pollIntervalScaleMs?: number; }): Promise;