import type { Writable } from 'node:stream'; import { type AppPortCandidate } from './app-ports.js'; import type { ProviderInput } from '../types.js'; export type AppPortPromptDecision = 'accepted' | 'rejected' | 'edited'; export interface AppPortPromptResult { decision: AppPortPromptDecision; /** Inferred app ports the user chose to expose. */ selected: number[]; } export interface AppPortPromptOptions { stdin: ProviderInput; stderr: Writable; /** Trusted explicit app ports; retained regardless of the answer. */ configured: readonly number[]; /** App ports confirmed on an earlier run; kept when the answer is empty. */ retained?: readonly number[]; candidates: readonly AppPortCandidate[]; /** True when one framework produced several literal ports. */ conflicting: boolean; /** * Make an empty answer keep the current set instead of accepting the * candidates. A resume is usually "get me back in", so Enter must not be the * key that publishes a new port. */ keepOnEmptyAnswer?: boolean; /** Injection seam for tests; defaults to a readline question on stdin. */ ask?: (question: string) => Promise; } /** Prompt the user to expose the detected app ports. */ export declare function promptForAppPorts(options: AppPortPromptOptions): Promise;