import { RuntimeStore } from './runtime-store.js';
import type { CodoriConfig, ConfigOverrides, ProjectRecord, ProjectStatusRecord, StartProjectResult } from './types.js';
type CommandFactory = (port: number, project: ProjectRecord) => {
    command: string;
    args: string[];
};
type ProjectSessionLease = {
    touchActivity: (at?: number) => ProjectStatusRecord;
    release: () => void;
};
type RuntimeManagerOptions = {
    homeDir?: string;
    configOverrides?: ConfigOverrides;
    config?: CodoriConfig;
    commandFactory?: CommandFactory;
};
export declare class RuntimeManager {
    readonly config: CodoriConfig;
    readonly store: RuntimeStore;
    private readonly commandFactory;
    private readonly activeSessions;
    private idleReaper;
    private idleSweepInFlight;
    constructor(options?: RuntimeManagerOptions);
    listProjects(): ProjectRecord[];
    private resolveProject;
    private normalizeStatus;
    private getActiveSessionCount;
    private resolveIdleDeadline;
    private writeRuntime;
    private touchRuntimeRecord;
    private incrementActiveSessions;
    private decrementActiveSessions;
    private loadActiveRuntime;
    private readRunningRuntime;
    private touchProjectRuntime;
    noteProjectActivity(projectId: string, at?: number): ProjectStatusRecord;
    acquireProjectSession(projectId: string): ProjectSessionLease;
    listProjectStatuses(): ProjectStatusRecord[];
    getProjectStatus(projectId: string): ProjectStatusRecord;
    startProject(projectId: string): Promise<StartProjectResult>;
    stopProject(projectId: string): Promise<ProjectStatusRecord>;
    reapIdleRuntimes(): Promise<number>;
    dispose(): void;
}
export declare const createRuntimeManager: (options?: RuntimeManagerOptions) => RuntimeManager;
export {};
