import type { OAuthAuth } from "@earendil-works/pi-ai"; export interface PiOAuthLoginIo { readonly ask: (question: string) => Promise; readonly write: (text: string) => void; } export interface RunPiOAuthLoginOptions { readonly authPath?: string; readonly provider?: OAuthAuth; readonly io?: PiOAuthLoginIo; } /** * Run Pi's provider-owned OAuth implementation with a complete terminal * callback surface. In particular, Anthropic races its localhost callback * against `onManualCodeInput`; Pi's generic CLI omits that callback even though * it prints instructions saying a final redirect URL can be pasted. * * The raw line is intentionally handed to the provider unchanged. Anthropic's * shipped parser extracts code/state from the full URL and validates state * against the PKCE verifier before token exchange. */ export declare function runPiOAuthLogin(providerId: string, options?: RunPiOAuthLoginOptions): Promise; /** @internal Exported only for deterministic platform-policy tests. */ export declare function assertPiOAuthLoginPersistenceSupported(platform: NodeJS.Platform): void; //# sourceMappingURL=pi-oauth-login.d.ts.map