/** * doctor (#368): turns "it's broken" into a one-line fix. * * Most coolify-mcp failure reports are the environment, not the server — a * Keychain that stored `${COOLIFY_ACCESS_TOKEN}` literally, a token missing * the `deploy` ability that 403s deep inside a tool call, a Cloudflare * Access policy 302ing every API call while /healthz stays green. Doctor * runs the checks that turn each of those into a named problem with a fix. * * Design rules: * - Every network probe is side-effect free: GETs only, on endpoints where * Coolify's middleware answers before any controller runs. * - Output never contains a secret: variable names and "set"/"unset", * never values. (The upstream 403 message is server-authored text that * names abilities, not credentials.) * - Fleet-shaped from day one (#367): checks run per instance over a list, * which today has exactly one entry. */ export type DoctorStatus = 'pass' | 'warn' | 'fail' | 'skipped' | 'inconclusive'; export interface DoctorCheck { check: string; status: DoctorStatus; detail: string; fix?: string; } export interface InstanceReport { instance: string; checks: DoctorCheck[]; } export interface DoctorReport { ok: boolean; instances: InstanceReport[]; /** Process-wide checks (runtime), not tied to any instance — this shape survives #367's fleet. */ checks: DoctorCheck[]; } type FetchLike = typeof fetch; export declare function runDoctor(env: NodeJS.ProcessEnv, fetchImpl?: FetchLike, nodeVersion?: string, cliHeaders?: Record): Promise; /** CLI front door: prints the report, returns the process exit code. */ export declare function runDoctorCli(env: NodeJS.ProcessEnv, json: boolean, fetchImpl?: FetchLike, out?: (line: string) => void, cliHeaders?: Record): Promise; export {};