/** * Auth / login flows for the interactive mode (/login, /logout). * * Owns the provider auth-type selector, the OAuth and API-key login dialogs, * and post-login model selection. Extracted from * interactive-mode.ts behind a narrow LoginControllerDeps interface; the * `/login` and `/logout` commands call `showOAuthSelector`. */ import { type Model } from "@kolisachint/hoocode-ai"; import type { Component, Container, TUI } from "@kolisachint/hoocode-tui"; import type { AgentSession } from "../../core/agent-session.js"; export declare function isApiKeyLoginProvider(providerId: string, oauthProviderIds: ReadonlySet, builtInProviderIds?: ReadonlySet): boolean; /** The slice of the interactive mode the login flows need. */ export interface LoginControllerDeps { ui: TUI; /** The active session (read at call time; the session can be swapped). */ get session(): AgentSession; /** The prompt editor (read at call time; the editor can be swapped). */ getEditor(): Component; /** Container that hosts the prompt editor and login dialogs. */ editorContainer: Container; showSelector(create: (done: () => void) => { component: Component; focus: Component; }): void; showStatus(message: string): void; /** A status the transcript keeps — see `InteractiveMode.showRecord`. */ showRecord(message: string): void; showError(errorMessage: string): void; /** Recompute the footer's available provider count. */ updateAvailableProviderCount(): Promise; updateEditorBorderColor(): void; invalidateFooter(): void; maybeWarnAboutAnthropicSubscriptionAuth(model?: Model): Promise; } export declare class LoginController { private readonly deps; constructor(deps: LoginControllerDeps); private get session(); private restoreEditor; private getLoginProviderOptions; private getLogoutProviderOptions; private showLoginAuthTypeSelector; private showLoginProviderSelector; showOAuthSelector(mode: "login" | "logout"): Promise; private completeProviderAuthentication; private showApiKeyLoginDialog; private showOAuthLoginSelect; private showLoginDialog; } //# sourceMappingURL=login-controller.d.ts.map