/** * `scai doctor` — local-config + credentials diagnostics. * * Different from `scai cli health`, which probes the live deploy / * sites tenant: doctor stays local. It walks the operator's * sitecoreai.cli.json + keychain + Node setup and tells them what * needs fixing before any remote call should be expected to work. * * Categories of checks (in order): * * 1. Runtime — Node version meets the package.json engines floor. * 2. Config — sitecoreai.cli.json exists, parses, validates against * the JSON Schema, has a default env (or exactly one env). * 3. Per-env — required fields present, deploy token in keychain, * token freshness within TTL. * 4. Brand — for each `brand[orgId]` config block, the secret is in * keychain so brand operations have something to mint with. * * Each check produces a row in the result table. Failures are * actionable: every `fail` carries a `hint` naming the exact command * or env var that fixes it. * * Output: human-readable table (default) or `{ checks, summary }` * envelope when `--json`. Process exit is non-zero on any `fail`; * `--strict` also fails on `warn`. */ export type DoctorStatus = "ok" | "warn" | "fail" | "skip"; export interface DoctorCheck { /** Category label, e.g. "runtime", "config", "env:sandbox", "brand:org_ABC". */ category: string; /** Short check name, e.g. "node-version", "config-file", "deploy-token". */ name: string; status: DoctorStatus; /** One-line summary suitable for the human table. */ message: string; /** Optional next step the operator should take. */ hint?: string; } export interface DoctorResult { checks: DoctorCheck[]; summary: Record; } export interface RunDoctorOptions { config?: string; json?: boolean; quiet?: boolean; verbose?: boolean; trace?: boolean; logFile?: string; /** When true, exit non-zero on any `warn` (not just `fail`). */ strict?: boolean; } export declare const runDoctor: (options?: RunDoctorOptions) => Promise;