/** * Doctor check primitives: the pure logic behind * `npx @cavuno/board doctor` — env validation, JSON-LD extraction, * sitemap parsing, and the pass/fail/skip summary. Everything here is * synchronous and I/O-free so it unit-tests without a network; the * orchestrator in run.ts owns the fetches. */ type CheckStatus = 'pass' | 'fail' | 'skip' | 'warn'; interface CheckResult { id: string; /** 1 static · 2 read probes. */ tier: 1 | 2; status: CheckStatus; detail: string; } interface DoctorEnv { apiUrl?: string; boardKey?: string; } interface DoctorSummary { exitCode: 0 | 1; passed: string[]; failed: string[]; skipped: string[]; /** Clone leftovers and similar — counted separately; does not fail the run. */ warned: string[]; } /** * Public project diagnostics: static configuration checks and optional read * probes against the consumer's frontend. The command is intentionally * non-destructive and needs no Cavuno operator credentials. */ interface RunDoctorOptions { env: DoctorEnv; /** The tenant's frontend base URL (`--frontend`). Read tier skips loudly without it. */ frontendUrl?: string; /** Consumer project root for the skills-freshness check. Default: cwd. */ projectRoot?: string; fetchImpl?: typeof fetch; } interface DoctorRun { results: CheckResult[]; summary: DoctorSummary; } declare function runDoctor(options: RunDoctorOptions): Promise; export { type CheckResult, type CheckStatus, type DoctorEnv, type DoctorRun, type DoctorSummary, type RunDoctorOptions, runDoctor };