import type { Server } from 'node:http';
export declare const TSF_DEV_STATE_FILE_ENV = "TSF_DEV_STATE_FILE";
export declare const TSF_DEV_RUN_ID_ENV = "TSF_DEV_RUN_ID";
export declare const TSF_DEV_RUNNER_PID_ENV = "TSF_DEV_RUNNER_PID";
export interface DevRunState {
    runId: string;
    runnerPid: number;
    appPid?: number;
    script: string;
    command: string[];
    devConsoleUrl?: string;
    startedAt: number;
    updatedAt: number;
}
export interface DevState {
    version: 2;
    ready: boolean;
    pids: number[];
    runs: Record<string, DevRunState>;
}
export interface DevStatePaths {
    stateFile: string;
    buildLockFile: string;
}
export declare function getDevStatePaths(projectDir: string): DevStatePaths;
export declare function readDevState(stateFile: string): DevState | undefined;
export declare function updateDevState(stateFile: string, update: (state: DevState) => void): DevState;
export declare function pruneDevState(stateFile: string): DevState | undefined;
export declare function registerDevRun(stateFile: string, run: DevRunState): void;
export declare function unregisterDevRun(stateFile: string, runId: string, runnerPid: number): void;
export declare function publishDevConsoleEndpoint(server: Server): (() => void) | undefined;
export declare function getLoopbackDevConsoleUrl(server: Server): string | undefined;
export declare function isPidAlive(pid: number | undefined): boolean;
//# sourceMappingURL=dev-state.d.ts.map