/** * GitHub Copilot login — GitHub OAuth **device flow** (no loopback server). * Headless port of the CLI's `github-copilot-oauth.ts`. * * 1. POST github.com/login/device/code → user_code + verification_uri. * 2. Poll login/oauth/access_token until GitHub returns an OAuth token. * 3. Exchange it at api.github.com/copilot_internal/v2/token for a * short-lived Copilot token. The GitHub OAuth token is the refresh token. */ import type { BeginOAuthDeps, OAuthSession } from './types.js'; export declare const COPILOT_PROVIDER_ID = "github-copilot"; interface CopilotModelEntry { id?: unknown; is_chat_default?: unknown; is_chat_fallback?: unknown; vendor?: unknown; supported_endpoints?: unknown; policy?: { state?: unknown; } | undefined; capabilities?: { type?: unknown; supports?: { tool_calls?: unknown; } | undefined; } | undefined; } /** Whether a Copilot `/models` entry is a chat model drivable over this wire. */ export declare function isUsableCopilotChatModel(item: CopilotModelEntry): boolean; export declare function beginCopilotLogin(_deps: BeginOAuthDeps | undefined, signal?: AbortSignal): Promise; export {}; //# sourceMappingURL=copilot.d.ts.map