import { type BrowserProbe } from './web-install-service.js'; /** * `live` = reachable, `orphaned` = alive but not answering, `stale` = the pid * is gone. Only `live` may be reported as usable. */ export type WebInstanceState = 'live' | 'orphaned' | 'stale'; export interface WebStatusInstance { readonly pid: number; readonly port: number; readonly state: WebInstanceState; readonly startedAt: string; } export interface WebStatusReport { readonly projectRoot: string; readonly sessionId: string; /** * At most one entry: there is one daemon per `(projectRoot, sessionId)` * (design §10.2). It is a list because a leftover record and a live daemon * can coexist until the record is reaped. */ readonly instances: readonly WebStatusInstance[]; /** * The same thing, unsugared: `instances[0]` or `null`. AC5's matrix reads * `data.instance === null` for a session with no daemon, and `instances: []` * is the list — one of the two has to be the caller-visible answer. */ readonly instance: WebStatusInstance | null; /** S3: the diagnosis path must be able to say WHY nothing will run. */ readonly disabled: boolean; readonly browser: BrowserProbe; } /** Probe this session's daemon records. Never throws: a probe failure is a state, not an error. */ export declare function buildStatusReport(projectRoot: string, sessionId: string): Promise;