import { type ChildProcess, type SpawnOptions } from "node:child_process";
import type { EnvSource } from "@oscharko-dev/keiko-model-gateway";
import type { CliIo } from "./runner.js";
type LifecycleCommand = "start" | "stop" | "status" | "restart";
type SpawnFn = (command: string, args: readonly string[], opts: SpawnOptions) => ChildProcess;
type FetchFn = (input: string, init?: RequestInit) => Promise<Response>;
type SleepFn = (ms: number) => Promise<void>;
type ProcessKiller = (pid: number, signal?: NodeJS.Signals | 0) => void;
type PortAvailabilityFn = (host: string, port: number) => Promise<boolean>;
export interface LifecycleCliDeps {
    readonly cwd?: string | undefined;
    readonly spawnFn?: SpawnFn | undefined;
    readonly fetchImpl?: FetchFn | undefined;
    readonly sleep?: SleepFn | undefined;
    readonly isProcessAlive?: ((pid: number) => boolean) | undefined;
    readonly killProcess?: ProcessKiller | undefined;
    readonly isPortAvailable?: PortAvailabilityFn | undefined;
}
export declare function runLifecycleCli(command: LifecycleCommand, args: readonly string[], io: CliIo, env: EnvSource, deps?: LifecycleCliDeps): Promise<number>;
export {};
//# sourceMappingURL=lifecycle.d.ts.map