/** * APIClaw CLI auth — browser-loopback flow (Modal/gh/vercel pattern). * * `apiclaw auth login` * 1. Generate PKCE verifier + challenge, random state. * 2. Start ephemeral HTTP listener on an OS-assigned port. * 3. POST cliAuth:start to Convex → get {authId, browserUrl}. * 4. Open browserUrl in default browser (open / xdg-open / start). * 5. Stay in front of the human: poll whoami / the session file / cliAuth:poll, * reprint the login URL every few seconds, and wait for /callback on * loopback (max 5 min). Printing the URL is not success. Localhost is * optional — whoami redeems a claimed authId from pending-login. * 6. Validate state, POST cliAuth:exchange with {code, codeVerifier} → session+key. * 7. Write ~/.apiclaw.toml, verify, then POST /v1/execute (provider nasa * action apod, frankfurter /latest fallback). Print a one-line result, not Done. */ import { type AuthConfig } from '../../auth-config.js'; import { type FirstExecuteResult } from '../../first-call.js'; interface AuthLoginOptions { printMcpToken?: boolean; force?: boolean; noOpen?: boolean; } export type AuthLoginResult = AuthConfig & { firstCall?: FirstExecuteResult; }; export declare function authLoginCommand(options?: AuthLoginOptions): Promise; export declare function authFirstCallCommand(): Promise; export declare function authLogoutCommand(): Promise; export declare function authWhoamiCommand(): Promise; export {}; //# sourceMappingURL=auth.d.ts.map