import type { Server } from "node:http";
import { type SpawnOptions, type ChildProcess } from "node:child_process";
import { type UiHandlerDeps } from "@oscharko-dev/keiko-server";
import type { EnvSource } from "@oscharko-dev/keiko-model-gateway";
import type { CliIo } from "./runner.js";
export interface UiCliArgs {
    readonly port: number;
    readonly evidenceDir: string | undefined;
    readonly config: string | undefined;
    readonly uiDbPath: string | undefined;
}
type UiParseResult = UiCliArgs | "help" | null;
export interface UiCliDeps {
    readonly createServer?: (deps: {
        staticRoot: string;
        csp: string;
        port: number;
        handlerDeps: UiHandlerDeps;
    }) => Server | Promise<Server>;
    readonly staticRoot?: string;
    readonly hashesFile?: string;
    readonly sqliteProbe?: () => boolean;
    readonly spawnFn?: SpawnFn;
    readonly currentExecArgv?: () => readonly string[];
    readonly cwd?: string | undefined;
}
export type SpawnFn = (command: string, args: readonly string[], opts: SpawnOptions) => ChildProcess;
export declare function parseUiArgs(args: readonly string[]): UiParseResult;
export declare function applyServerTimeouts(server: Server): void;
export declare function waitForShutdown(server: Server): Promise<void>;
export declare function reExecWithSqliteFlag(_env: EnvSource, spawnFn: SpawnFn): Promise<number>;
export declare function runUiCli(args: readonly string[], io: CliIo, env: EnvSource, deps?: UiCliDeps): Promise<number>;
export {};
//# sourceMappingURL=ui.d.ts.map