/** * Doctor diagnostics module for system health checks. */ /** Status levels for doctor checks */ export type DoctorStatus = "ok" | "warn" | "error"; /** Individual check result */ export interface DoctorCheckResult { name: string; status: DoctorStatus; message: string; } /** Complete doctor check result */ export interface DoctorResult { checks: DoctorCheckResult[]; summary: string; } /** * Options for running doctor checks. */ export interface DoctorOptions { /** Current working directory (defaults to process.cwd()) */ cwd?: string; /** Resource loader for getting loaded resources */ resourceLoader?: { getExtensions: () => { extensions: unknown[]; }; getSkills: () => { skills: unknown[]; }; getThemes: () => { themes: unknown[]; }; }; /** Model registry for checking model configuration */ modelRegistry?: { getAvailable: () => Array<{ id: string; provider: string; }>; getApiKey: (model: { provider: string; }) => Promise; }; /** Current model (if set) */ currentModel?: { id: string; provider: string; }; /** Extension runner for checking loaded extensions */ extensionRunner?: { getExtensionPaths: () => string[]; getRegisteredCommands: () => unknown[]; }; } /** * Result of a PowerShell validation probe. */ export interface PowerShellDoctorResult { /** Whether getPowerShellConfig() succeeded */ configured: boolean; /** Whether the pwsh executable was found on PATH */ executableFound: boolean; /** Absolute path to the pwsh executable, or null */ executablePath: string | null; /** Whether pwsh --version succeeded */ versionDetected: boolean; /** The detected version string, or null */ version: string | null; /** Whether the non-interactive probe (pwsh -NoProfile -NonInteractive -Command 'exit 0') passed */ nonInteractiveProbePassed: boolean; /** Whether the exit code probe (exit 0) correctly returned exit code 0 */ exitCodeProbePassed: boolean; } /** * Check the TODO subsystem health. Read-only. * Accepts an optional diagnostics snapshot from an active TodoEngine. */ export declare function checkTodoHealth(diagnostics?: { scopeId?: string; progressEpoch?: number; snapshotCount?: number; ledgerCount?: number; eventCount?: number; chainActive?: boolean; chainConsecutive?: number; isLoopBlocked?: boolean; }): DoctorCheckResult; /** * Run all doctor diagnostics checks. */ export declare function runDoctorChecks(options?: DoctorOptions): Promise; /** * Format doctor result as colored text for display in TUI. * The theme object should have fg(color, text) and bold(text) methods. */ export declare function formatDoctorResult(result: DoctorResult, theme: { fg: (color: any, text: string) => string; bold: (text: string) => string; }): string; //# sourceMappingURL=doctor.d.ts.map