#!/usr/bin/env node import { authorize, exchange } from '@cortexkit/anthropic-auth-core'; /** * Minimal fetch shape relaySetup needs. Narrower than `typeof fetch` (no * `preconnect`) so test stubs and the global `fetch` are both assignable * without a cast. The global `fetch` satisfies this structurally. */ type FetchLike = (input: string | URL | Request, init?: RequestInit) => Promise; /** * Dependencies relaySetup talks to the outside world through. Both default to * the real implementations (global fetch, the readline-backed prompt) so the * production `relay setup` path is unchanged; tests inject deterministic stubs * to exercise the full setup logic in-process without a subprocess. */ export interface RelaySetupDeps { fetchImpl?: FetchLike; prompt?: (message: string) => Promise; } export declare function relaySetup(deps?: RelaySetupDeps): Promise; /** * Dependencies the `login` command talks to the outside world through. All * default to the real implementations (the readline-backed prompt, and the * core authorize/exchange helpers) so the production `login` path is * unchanged; tests inject deterministic stubs to exercise the full login flow * in-process without a subprocess, real network, or stdin. */ export interface LoginDeps { prompt?: (message: string) => Promise; authorize?: typeof authorize; exchange?: typeof exchange; } export declare function login(labelArg?: string, deps?: LoginDeps): Promise; /** * Dependencies the `api add` command talks to the outside world through. The * prompt defaults to the real readline-backed prompt so the production * `api add` path is unchanged; tests inject canned answers to exercise the * full route-add flow in-process without a subprocess or stdin. */ export interface ApiAddDeps { prompt?: (message: string) => Promise; } export declare function addApiRoute(labelArg?: string, deps?: ApiAddDeps): Promise; export {};