/** What control.json records about the dashboard server. */ export interface ControlRecord { pid?: number; port?: number; url?: string; /** Absolute path of the server script the dashboard runs. */ server?: string; /** CLI version that started it. */ version?: string; startedAt?: string; } export interface ProcInfo { argv: string[]; cwd?: string; } export interface DashboardProbe { isPidAlive(pid: number): boolean; procInfo(pid: number): ProcInfo | null; exists(path: string): boolean; /** This CLI's version. */ version: string; } export type DashboardVerdict = { live: true; script?: string; } | { live: false; reason: string; /** Set only for a dashboard proven to be this project's own. */ stopPid?: number; }; /** The monomind dashboard script a process runs (`node …/ui/server.mjs` or * `node …/monomind ui`), or null when it runs something else. */ export declare function dashboardScript(argv: string[]): string | null; export declare function assessDashboard(c: ControlRecord, projectDir: string, p: DashboardProbe): DashboardVerdict; /** Find a dashboard already serving `projectDir` on 4242-4251 (the range * server.mjs's bindServer walks), so a heal reuses it instead of starting * another. A stale one of ours found on the way is stopped. */ export declare function findProjectDashboard(projectDir: string, p: DashboardProbe, identity: (port: number) => Promise<{ pid?: number; dir?: string; } | null>, stop: (pid: number) => void | Promise): Promise<{ pid: number; port: number; server?: string; } | null>; /** Version of the package this module ships in. */ export declare function cliVersion(): string; export declare const realDashboardProbe: () => DashboardProbe; export declare function fetchIdentity(port: number): Promise<{ pid?: number; dir?: string; } | null>; //# sourceMappingURL=dashboard-health.d.ts.map