import { type ProviderLoginMode, type ProviderLoginStatusResponse } from '../../shared/provider-login.js'; import { type ProviderRuntimeCommandsConfig } from '../../shared/provider-runtime-commands.js'; import type { ProviderUsageKind } from '../../shared/provider-usage.js'; import type { ProviderCliCommandRunner } from '../provider-cli/types.js'; import { startChildProcess } from './child-process.js'; interface ProviderLoginSettings { getProviderRuntimeCommands(): Promise; } interface ProviderLoginServiceOptions { env?: NodeJS.ProcessEnv; runCommand?: ProviderCliCommandRunner; settings?: ProviderLoginSettings; spawn?: typeof startChildProcess; } export declare class ProviderLoginError extends Error { readonly statusCode: 404 | 409; constructor(statusCode: 404 | 409, message: string); } /** * Reads the sign-in URL and one-time code out of a provider login transcript. * Both login commands print the link on its own line; device auth prints the * code on its own line as upper-case groups joined by dashes. Terminal color * codes are stripped first so a colored line still matches. The local callback * address the browser flow announces is not a sign-in link. */ export declare function parseProviderLoginOutput(lines: readonly string[]): { code?: string; url?: string; }; export declare function stripAnsi(text: string): string; export declare class ProviderLoginService { private readonly env; private readonly runCommand; private readonly settings; private readonly spawn; private readonly operations; private readonly statusCache; private active?; constructor(options?: ProviderLoginServiceOptions); status(options?: { force?: boolean; }): Promise; start(provider: ProviderUsageKind, mode: ProviderLoginMode): Promise; cancel(provider: ProviderUsageKind): Promise; private row; private check; } export declare const defaultProviderLoginService: ProviderLoginService; export {}; //# sourceMappingURL=login.service.d.ts.map