import http from 'node:http';
import { type ChildProcess } from 'node:child_process';
import type { ProjectInfo } from './devShared';
import type { DevRuntimeAssetManifestRegistration } from './devRuntimeAssets';
export interface StartDevServerOptions {
    appName: string;
    appType: string;
    creatorUsername: string;
    htmlPath: string;
    port: number;
    projectInfo: ProjectInfo;
    runtimeAssetManifest?: DevRuntimeAssetManifestRegistration | null;
}
export interface DevServerHandle {
    server: null;
    devProcess: ChildProcess | null;
    startedDevProcess: boolean;
    appUrl: string;
    close(): Promise<void>;
}
export declare const DEV_ROUTER_PORT = 8888;
type MountConflictDetails = {
    ref: string;
    ownerPid: number;
    repoRoot: string;
    htmlPath: string;
};
export declare function parseMountConflictError(message: string): MountConflictDetails | null;
export declare function buildLocalDevAppUrl(input: {
    creatorUsername: string;
    appType: string;
    appName: string;
    port?: number;
}): string;
export declare function terminateChildProcessTree(child: ChildProcess | null, timeoutMs?: number): Promise<void>;
export declare function ensureDevRouterRunning(port?: number): Promise<void>;
export declare function updateMountedDevRuntimeAssetManifest(input: {
    creatorUsername: string;
    appName: string;
    runtimeAssetManifest: DevRuntimeAssetManifestRegistration | null;
    port?: number;
}): Promise<void>;
export declare function startDevServer(options: StartDevServerOptions): Promise<DevServerHandle>;
export declare function isDevServerAvailable(input: {
    creatorUsername: string;
    appType: string;
    appName: string;
    port?: number;
}, timeoutMs?: number): Promise<boolean>;
export declare function createDevRouterServer(initialPort?: number): http.Server;
export declare function listenDevRouterServer(server: http.Server, port?: number): Promise<number>;
export declare function runDevRouterServer(port?: number): Promise<void>;
export {};
