import { type DaemonControlDeps } from './daemon-control.js'; import type { DeclaredClientRoster } from '../provisioning/roster.js'; /** The npm name whose published version answers "am I behind?". */ export declare const PACKAGE_NAME = "@zhixuan92/multi-model-agent"; export interface DoctorDeps extends DaemonControlDeps { /** Version of the package this process is running from. */ cliVersion: string; /** Home directory (skills, plugin records, registrations all hang off it). */ homeDir: string; json?: boolean; stdout?: (s: string) => boolean; stderr?: (s: string) => boolean; /** Budget for the registry lookup. Short on purpose — doctor must stay usable offline. */ registryTimeoutMs?: number; /** Skip the network entirely. Used by tests and by --offline. */ offline?: boolean; /** Test seam replacing the registry lookup. */ fetchLatestVersion?: (pkg: string) => Promise; /** The declared client roster (`config.clients`). Undefined means the config * could not be read, which is reported as unknown rather than as "nothing * declared" — those are different states. */ declared?: DeclaredClientRoster; } export interface DoctorProblem { surface: string; detail: string; fix: string; } export interface DoctorReport { package: { installed: string; latest: string | null; offline: boolean; }; daemon: { running: boolean; version: string | null; pid: number | null; uptimeMs: number | null; }; plugin: { key: string | null; version: string | null; }; skills: Array<{ client: string; count: number; version: string | null; behind: number; providedByPlugin: boolean; }>; registrations: Array<{ client: string; status: string; }>; problems: DoctorProblem[]; } export declare const DoctorExitCode: { readonly HEALTHY: 0; readonly PROBLEMS: 1; }; /** * Order two versions: negative when `a` precedes `b`, 0 when equal. * * Enough semver for the one question asked here — is the installed package * older than the published one. Compares the numeric release triple, then * treats a prerelease as preceding its own release (`6.4.0-rc.1` < `6.4.0`), as * semver requires. Hand-written because the server package has no semver * dependency and adding one to answer this would be a poor trade. */ export declare function compareVersions(a: string, b: string): number; export declare function collectReport(deps: DoctorDeps): Promise; export declare function runDoctor(deps: DoctorDeps): Promise; //# sourceMappingURL=doctor.d.ts.map