import { fetchLatestCliVersion, type UpdateCheckResult } from './update-check'; export type DoctorFindingSeverity = 'error' | 'warning' | 'info'; export interface DoctorFinding { readonly severity: DoctorFindingSeverity; readonly code: string; readonly message: string; readonly fixHint?: string; } export interface DoctorCredentialSummary { readonly alias: string; readonly instanceUrl: string; readonly status: 'Active' | 'Expired' | 'Unknown'; readonly isDefault: boolean; readonly expiresAt?: string; } export type DoctorConnectivityOutcome = 'ok' | 'unreachable' | 'timeout' | 'non-json' | 'http-error' | 'skipped'; export interface DoctorConnectivity { readonly targetUrl: string | null; readonly outcome: DoctorConnectivityOutcome; readonly httpStatus?: number; readonly latencyMs?: number; readonly detail?: string; readonly coreVersion?: string; readonly cliCompatibilityVersion?: string; } export interface DoctorReport { readonly cli: { readonly version: string; readonly gitSha: string; readonly nodeVersion: string; readonly platform: string; }; readonly config: { readonly file: string; readonly exists: boolean; readonly parseOk: boolean; readonly parseError?: string; readonly baseUrl: string; readonly baseUrlSource: 'env-or-config' | 'default-localhost'; readonly envAuthToken: boolean; }; readonly credentials: { readonly orgs: ReadonlyArray; readonly unreadableAliases: ReadonlyArray; }; readonly environment: ReadonlyArray<{ readonly name: string; readonly value: string | true; }>; readonly workspace: { readonly found: boolean; readonly manifestPath?: string; readonly projectName?: string; readonly compatibleCoreVersion?: string; readonly coreCompatible?: boolean; readonly cliSupportedCoreVersionRange?: string; readonly compatibilityBasis?: string; readonly manifestError?: string; }; readonly connectivity: DoctorConnectivity; readonly update: UpdateCheckResult; readonly versionDrift?: { readonly cliVersion: string; readonly coreExpected: string; }; readonly findings: ReadonlyArray; } export declare function probeHealthEndpoint(baseUrl: string, timeoutMs?: number): Promise>; export interface DoctorDependencies { readonly probeHealth?: (baseUrl: string, timeoutMs: number) => Promise>; readonly probeTimeoutMs?: number; readonly fetchLatest?: typeof fetchLatestCliVersion; } export declare function deriveDoctorFindings(input: { config: DoctorReport['config']; credentials: DoctorReport['credentials']; workspace: DoctorReport['workspace']; connectivity: DoctorConnectivity; update?: UpdateCheckResult; versionDrift?: DoctorReport['versionDrift']; }): ReadonlyArray; export declare function collectDoctorReport(dependencies?: DoctorDependencies): Promise;