/** * Doctor Command * * Diagnoses common issues with vat setup: * - Environment checks (Node.js version, git) * - Configuration validation * - Version checks */ import type { Command } from 'commander'; /** * Result of a single doctor check */ export interface DoctorCheckResult { /** Name of the check */ name: string; /** Whether the check passed */ passed: boolean; /** Message describing the result */ message: string; /** Optional suggestion for fixing the issue */ suggestion?: string; } /** * Project context information */ export interface ProjectContext { /** Current working directory */ currentDir: string; /** Detected project root (null if not found) */ projectRoot: string | null; /** Detected config file path (null if not found) */ configPath: string | null; } /** * Overall doctor diagnostic result */ export interface DoctorResult { /** Whether all checks passed */ allPassed: boolean; /** Individual check results */ checks: DoctorCheckResult[]; /** Total number of checks run */ totalChecks: number; /** Number of checks that passed */ passedChecks: number; /** Project context information */ projectContext: ProjectContext; } /** * Version checker interface for dependency injection (enables fast tests) */ export interface VersionChecker { /** Fetch latest version from npm registry */ fetchLatestVersion(): Promise; } /** * Options for running doctor checks */ export interface DoctorOptions { /** Show all checks including passing ones */ verbose?: boolean; /** Version checker (for testing) */ versionChecker?: VersionChecker; } /** * Check Node.js version meets requirements */ export declare function checkNodeVersion(): DoctorCheckResult; /** * Check if git is installed */ export declare function checkGitInstalled(): DoctorCheckResult; /** * Check if current directory is a git repository */ export declare function checkGitRepository(): DoctorCheckResult; /** * Check if configuration file exists * * Uses findConfigPath() to walk up directory tree. */ export declare function checkConfigFile(): DoctorCheckResult; /** * Check if configuration is valid */ export declare function checkConfigValid(): DoctorCheckResult; /** * Check if vat version is up to date (advisory only) */ export declare function checkVatVersion(versionChecker?: VersionChecker): Promise; /** * Check if CLI build is in sync with source code (development mode only) */ export declare function checkCliBuildSync(): DoctorCheckResult; /** * Run all doctor checks * * @param options - Doctor options * @returns Doctor result */ export declare function runDoctor(options?: DoctorOptions): Promise; /** * Main command handler for Commander.js */ export declare function doctorCommand(program: Command): void; //# sourceMappingURL=doctor.d.ts.map