/**
 * `olam kg doctor` — diagnostic table for the kg-service container.
 *
 * Probes (in order):
 *   1. container  — Container state (running / stopped / missing)
 *   2. health     — /health responds with ready=true (+ version + uptime)
 *   3. workspaces — /status lists at least one workspace (advisory; warn if empty)
 *   4. classify   — /classify round-trip works end-to-end (synthetic probe)
 *   5. savings     — cumulative KG-hit tally (advisory; "is the hook firing?")
 *
 * Exit 0 on all-green; non-zero on the first hard failure with a remedy hint.
 * Advisory warnings (empty workspaces, zero hits) never flip the exit code.
 * --json emits a machine-readable structure for monitoring pipelines.
 *
 * The probe walk is a pure, injectable function (`runKgDoctor`) so it can be
 * unit-tested without a live container — mirrors the `runKgStatus` /
 * `runDoctor` testability pattern used elsewhere in the CLI.
 */
import type { Command } from 'commander';
import { type ClassifyResponse, type HealthResponse, type SavingsResponse, type StatusResponse } from '@olam/core/src/kg/kg-service-client.js';
interface KgDoctorOptions {
    readonly json?: boolean;
}
interface ProbeResult {
    readonly name: string;
    readonly status: 'ok' | 'warn' | 'fail';
    readonly detail?: string;
    readonly remedy?: string;
}
/**
 * Minimal surface of `KgServiceContainerController` the probe walk needs.
 * Declaring it as an interface lets tests inject a fake without spawning
 * `docker inspect`.
 */
export interface KgDoctorContainerProbe {
    status(): {
        state: 'running' | 'stopped' | 'missing';
        port: number;
    };
    imageMissingEverywhere(): boolean;
}
/**
 * Injectable dependencies for `runKgDoctor`. Defaults wire the real
 * kg-service HTTP client + container controller; tests pass fakes.
 */
export interface KgDoctorDeps {
    readonly controller?: KgDoctorContainerProbe;
    readonly health?: (opts?: {
        timeoutMs?: number;
    }) => Promise<HealthResponse>;
    readonly status?: (opts?: {
        timeoutMs?: number;
    }) => Promise<StatusResponse>;
    readonly classify?: (req: {
        q: string;
        workspace?: string;
    }, opts?: {
        timeoutMs?: number;
    }) => Promise<ClassifyResponse>;
    readonly savings?: (opts?: {
        timeoutMs?: number;
    }) => Promise<SavingsResponse>;
}
export interface KgDoctorResult {
    readonly exitCode: number;
    readonly probes: ReadonlyArray<ProbeResult>;
}
/**
 * Pure, injectable probe walk. Renders to the configured output when not in
 * JSON mode and returns the structured result + exit code. Tests drive this
 * directly with fake deps; the commander action is a thin wrapper.
 */
export declare function runKgDoctor(opts: KgDoctorOptions, deps?: KgDoctorDeps): Promise<KgDoctorResult>;
export declare function registerKgDoctorCommand(kg: Command): void;
export {};
//# sourceMappingURL=kg-doctor.d.ts.map