export type Severity = "blocking" | "error" | "warning" | "info"; export interface DoctorIssue { id: string; severity: Severity; detail: string; suggested_fix: string; } export interface DoctorProbe { /** May be async — realProbe() spawns a python, which must not block. */ pyocdInstalled: () => boolean | Promise; elfPath: () => string; elfExists: () => boolean; /** May be async — realProbe() spawns st-info, which must not block. */ stlinkProbe: () => { found: boolean; serial?: string; chipid?: string; } | Promise<{ found: boolean; serial?: string; chipid?: string; }>; udevRulesPresent: () => boolean; /** Which user-config keys are explicitly set (not on fallback). */ configKeysSet: () => string[]; /** §11.7 real probe-presence detection. Runs `pyocd list` (preferred, via the * daemon python) or `st-info --probe` with a short timeout. `present` = * at least one probe enumerated; `toolAvailable` distinguishes "no probe on * USB" from "neither pyocd nor st-info installed" (the latter must NOT be a * false "no probe"). */ probeList?: () => Promise<{ present: boolean; toolAvailable: boolean; }>; } export interface DoctorResult { ok: boolean; issues: DoctorIssue[]; probe?: { serial?: string; chipid?: string; }; } export declare function runDoctor(p: DoctorProbe): Promise; /** * Production wiring: reads the actual filesystem, runs st-info, and imports * pyocd to validate the environment. Safe to call even when tools are absent. */ export declare function realProbe(): DoctorProbe;