/** * Interactive `whoop-ai-mcp setup` wizard. * * Walks a user through: * 1. WHOOP OAuth credential entry (prompted, secrets masked) * 2. (optional) `--verify` runs the full OAuth flow + a profile fetch * to prove credentials and refresh tokens both work * 3. Generates client configuration: * - claude-desktop: merges a `whoop` entry into the existing config * file (creates `.bak` first; restores on failure) * - claude-code: prints the `claude mcp add ...` command to run * - codex: prints the `codex mcp add ...` command to run * - copilot: prints the `code --add-mcp ...` command to run * - other local clients: prints configuration / registration instructions * - remote clients: prints deployment guidance without collecting secrets * * No new runtime dependencies — uses only Node's built-in modules. * All output goes to stdout; errors throw and surface via the dispatcher. */ import type { OAuthConfig } from "../auth/oauth.js"; import { type ClientTarget, type ServerEnv } from "./config-generators.js"; export interface SetupOptions { readonly telemetry?: "on" | "off"; readonly clientId?: string; readonly clientSecret?: string; readonly client?: ClientTarget; readonly verify?: boolean; /** Optional override for the Claude Desktop config path (used by tests). */ readonly configPath?: string; } /** * Parse `setup`-subcommand arguments. * * Supported flags: * --client-id= | --client-id * --client-secret= | --client-secret * --client= (see CLIENT_TARGETS) * --verify * --config-path= (test hook) */ export declare function parseSetupArgs(argv: readonly string[]): SetupOptions; interface PromptIO { readonly input: NodeJS.ReadableStream; readonly output: NodeJS.WritableStream; } export interface RunSetupDeps { readonly confirmTelemetry?: (io: PromptIO) => Promise; readonly io?: PromptIO; readonly authenticate?: (config: OAuthConfig) => Promise; /** Fetch the profile after authenticate() to prove the access token works. */ readonly fetchProfile?: (accessToken: string) => Promise; readonly fs?: { readFile: (path: string, encoding: "utf8") => Promise; writeFile: (path: string, data: string) => Promise; rename: (from: string, to: string) => Promise; mkdir: (path: string, opts: { recursive: true; }) => Promise; }; } /** * Run the setup wizard. Resolves after writing config / printing instructions, * or rejects with a human-readable Error if anything goes wrong. */ export declare function runSetup(options?: SetupOptions, deps?: RunSetupDeps): Promise>; export {}; //# sourceMappingURL=setup.d.ts.map