import type { Asker } from "#setup/ask.js"; import type { Prompter } from "#setup/prompter.js"; import type { VercelProjectReference } from "#setup/project-resolution.js"; import type { RegistrySetupCompletion } from "#setup/registry-setup-protocol.js"; import type { IntegrationSetupEnvironment } from "./shared/environment.js"; export interface SetupExternalAction { complete(): void; } export type SetupPresenter = Pick & { nextSteps(lines: readonly string[]): void; beginExternalAction(input: { url: string; userCode?: string; message: string; }): SetupExternalAction; }; export interface SetupPrepareContext { /** Selected agent project where authored files are changed. */ readonly appRoot: string; /** Project root for shared dependencies, Vercel links, and environment files. */ readonly projectRoot: string; readonly asker: Asker; readonly environment: IntegrationSetupEnvironment; readonly presenter: SetupPresenter; readonly resolveVercelProject: (integration: string) => Promise; signal?: AbortSignal; force?: boolean; } export interface SetupApplyContext { /** Selected agent project where authored files are changed. */ readonly appRoot: string; /** Project root for shared dependencies, Vercel links, and environment files. */ readonly projectRoot: string; readonly presenter: SetupPresenter; signal?: AbortSignal; force?: boolean; } export type IntegrationSetupResult = { readonly kind: "done"; readonly completion: RegistrySetupCompletion; } | { readonly kind: "cancelled"; }; interface SetupIntegrationDefinition { readonly kind: string; readonly label: string; readonly hint?: string; describeEnvironment?(environment: IntegrationSetupEnvironment): string; prepare(context: SetupPrepareContext): Promise; apply(plan: Plan, context: SetupApplyContext): Promise; } export interface SetupIntegration { readonly kind: string; readonly label: string; hint?: string; describeEnvironment?(environment: IntegrationSetupEnvironment): string; run(input: { prepare: SetupPrepareContext; apply: SetupApplyContext; }): Promise; } /** Captures an integration's private plan type behind one executable lifecycle. */ export declare function defineSetupIntegration(definition: SetupIntegrationDefinition): SetupIntegration; export {};