import type { ChildProcess } from 'node:child_process'; export declare function allocateFreePort(host: string): Promise; interface ServeCommand { readonly command: string; readonly baseArgs: readonly string[]; } export declare function resolveCliVersion(): string | undefined; export declare function cliSupportsApiKeyFile(serveBinPath?: string): boolean; export declare function writeApiKeyFile(configPath: string, apiKey: string): string; export declare function resolveServeCommand(serveBinPath?: string): ServeCommand; export interface SpawnServeOptions { readonly apiKey: string; readonly configPath: string; readonly port: number; readonly host?: string; readonly startTimeoutMs?: number; readonly serveBinPath?: string; readonly fetchImpl?: typeof fetch; } export interface SpawnedServe { readonly child: ChildProcess; readonly pid: number; readonly port: number; readonly host: string; readonly baseURL: string; } export declare function spawnServe(options: SpawnServeOptions): Promise; export declare function stopServe(child: ChildProcess, graceMs?: number): Promise; export {}; //# sourceMappingURL=serve-process.d.ts.map