/** * log10x_signin_start + log10x_signin_complete: two-tool sign-in chain. * * Why split into two tools? Auth0 Device Authorization Flow is * inherently asynchronous: we hand the user a code, they confirm it * in their browser, then we poll Auth0 for the access token. There is * no in-band channel inside a single tool call to surface the * verification code BEFORE we block on polling. We tried mid-tool * `notifications/message` push, but Cursor (and most other hosts * today) does not render that channel during a tool execution, so the * user never sees the code and the tool just hangs until expiry. * * Splitting the flow into two tools sidesteps the host limitation: the * `_start` tool returns the code immediately as plain markdown, the * model relays it to the user, and the `_complete` tool resumes the * flow by polling for the access token using the device_code returned * by `_start`. Works in every MCP host, no notification API required. * * The two tools share `log10x_signin_complete`: * - With `device_code`: finishes the browser flow started by `_start`. * - With `api_key`: pasted-key path (no browser, no IdP). The user * already has a key from console.log10x.com and just needs the * MCP to validate + persist it. * * On success either path writes the API key to `~/.log10x/credentials` * (mode 0600), hot-reloads envs in-place, and clears * `LOG10X_API_KEY` from `process.env` if set so the freshly written * file wins the priority chain. */ import { z } from 'zod'; import type { Environments } from '../lib/environments.js'; import { type StructuredOutput } from '../lib/output-types.js'; export declare const signinStartSchema: {}; export interface SigninStartResult { markdown: string; } export declare function executeSigninStart(_args?: Record): Promise; export declare const signinCompleteSchema: { device_code: z.ZodOptional; api_key: z.ZodOptional; wait_seconds: z.ZodOptional; }; export declare function executeSigninComplete(args: { device_code?: string; api_key?: string; wait_seconds?: number; }, envs: Environments): Promise;