/** * SDK for Vercel CLI, exported from plugins/vercel-cli. * * Coordinate API changes with Vercel CLI and get maintainer approval. * Keep these types independent of installer internals, and copy returned fields * explicitly so internal refactors do not change the API. */ interface PluginVercelCLISdk { /** * Clients that support installing the Vercel plugin for the current user across * projects. Includes clients not detected on this machine. */ listSupportedClients(): readonly PluginVercelCLIClient[]; /** Supported clients detected on this machine; installation can still fail. */ listInstallableClients(): Promise; /** * Installs the Vercel plugin for the current user. * Dry runs report changes without installing, but may download files. * The SDK handles temporary-file cleanup, including after failure. * Returns operational failures per client and rejects invalid arguments. * Does not prompt, print output, or change process globals or exit status. */ install(options: PluginVercelCLIInstallOptions): Promise; } interface PluginVercelCLISdkOptions { readonly cwd: string; readonly env?: Readonly>; } interface PluginVercelCLIClient { readonly id: string; readonly name: string; } interface PluginVercelCLIInstallOptions { readonly clients: readonly string[]; readonly dryRun: boolean; } interface PluginVercelCLIInstallResult { readonly dryRun: boolean; readonly clients: readonly PluginVercelCLIClientInstallResult[]; readonly warnings: readonly string[]; } interface PluginVercelCLIClientInstallResult { readonly clientId: string; /** planned means a dry run; failed can include partial changes. */ readonly status: 'planned' | 'succeeded' | 'unchanged' | 'failed'; /** Planned changes; a failed installation may have applied some of them. */ readonly changes: readonly PluginVercelCLIChange[]; readonly warnings: readonly string[]; /** Whether the plan configures local MCP commands; server startup is not checked. */ readonly configuresLocalMcpServers: boolean; /** Present when status is failed. */ readonly error?: PluginVercelCLIInstallError; } interface PluginVercelCLIChange { readonly kind: 'skill' | 'mcp-server' | 'package'; readonly name: string; readonly action: 'add' | 'update' | 'remove' | 'manage' | 'release' | 'configure'; /** Absolute paths affected by the plan, for display. */ readonly paths: readonly string[]; } interface PluginVercelCLIInstallError { readonly message: string; readonly details: readonly string[]; } /** * Vercel CLI handles client selection and confirmation; the SDK handles installation * and cleanup. See vercel-cli-types.ts before changing the API. * * Installing follows `plugins add vercel/vercel-plugin --yes` for the selected * clients, without its terminal output or telemetry. */ declare function createPluginVercelCLISdk(options: PluginVercelCLISdkOptions): PluginVercelCLISdk; export { type PluginVercelCLIChange, type PluginVercelCLIClient, type PluginVercelCLIClientInstallResult, type PluginVercelCLIInstallError, type PluginVercelCLIInstallOptions, type PluginVercelCLIInstallResult, type PluginVercelCLISdk, type PluginVercelCLISdkOptions, createPluginVercelCLISdk };