import type { DevToolsSys } from "../../types.js";
import type { CLIArgs } from "../index.js";
import type { AnalysisResult, CheckResult, ConnectivityFetchFn, ProgressEvent, Test } from "#ai-utils";
/**
 * Re-exported for backward compatibility with callers that import BUILDER_TESTS
 * directly from this module (e.g. dsi-mcp.ts).
 */
export declare const BUILDER_TESTS: Test[];
/**
 * Wrapper around safeFetch for connectivity checks. safeFetch throws on 5xx
 * errors, but httpCheck needs to inspect the status code to properly classify
 * server errors. This wrapper catches NetworkError with a statusCode and
 * returns a synthetic response instead of throwing.
 */
export declare const connectivityFetch: ConnectivityFetchFn;
export interface DoctorReport {
    pkgVersion: string;
    gitHost: string | null;
    results: CheckResult[];
    analysis?: AnalysisResult;
    passed: number;
    failed: number;
    durationMs: number;
}
export type DoctorProgressEvent = {
    type: "git-host:detected";
    gitHost: string | null;
} | {
    type: "checks:start";
    total: number;
} | ProgressEvent | {
    type: "analysis:start";
} | {
    type: "analysis:complete";
    analysis?: AnalysisResult;
} | {
    type: "analysis:skipped";
    reason: "no-credentials" | "no-git-host";
};
export interface RunDoctorOptions {
    sys: DevToolsSys;
    args?: CLIArgs;
    onProgress?: (event: DoctorProgressEvent) => void;
    /** Skip the cloud-side `/projects/connectivity/analyze` POST */
    skipCloudAnalysis?: boolean;
}
/**
 * Pure orchestration for the `doctor` command. Returns a structured
 * `DoctorReport` with no rendering side-effects. Use `onProgress` to drive
 * spinners or other UIs in the calling surface.
 */
export declare function runDoctor(opts: RunDoctorOptions): Promise<DoctorReport>;
