import { appendEnv } from "../append-env.js"; import type { Prompter } from "../prompter.js"; import { validateGatewayApiKey } from "../validate-gateway-key.js"; import { getVercelAuthStatus } from "../vercel-project.js"; import { runLinkFlow, type LinkFlowResult } from "./link.js"; export declare const PROVIDER_QUESTION = "Which model provider do you want to use?"; export declare const CONNECTION_QUESTION = "How do you want to connect to AI Gateway?"; export declare const EXTERNAL_PROVIDER_INSTRUCTIONS_TITLE = "Using another model provider"; export declare const EXTERNAL_PROVIDER_INSTRUCTIONS: readonly string[]; /** Injected for tests; defaults to the real link flow, env write, and key check. */ export interface VercelFlowDeps { getVercelAuthStatus: typeof getVercelAuthStatus; runLinkFlow: typeof runLinkFlow; appendEnv: typeof appendEnv; validateGatewayApiKey: typeof validateGatewayApiKey; } export type VercelFlowResult = LinkFlowResult | { kind: "done"; /** The user runs a non-gateway provider; nothing was linked or written. */ outcome: "external-provider"; }; /** * THE PROVIDER FLOW behind the dev TUI `/model` menu's provider row * (`eve link` keeps {@link runLinkFlow}'s shape). Two entry questions make * the provider choice explicit before any link machinery runs: a provider * gate (AI Gateway, or instructions for everything else) and a connection * gate (link a project, or paste an `AI_GATEWAY_API_KEY` that lands in * `.env.local`). The "Connect via a project" branch runs the link flow in * create-or-link mode (link detection and all), so a project-less agent can * create its first project rather than dead-end on an empty list. */ export declare function runVercelFlow(input: { appRoot: string; prompter: Prompter; signal?: AbortSignal; deps?: Partial; }): Promise;