import type { DatabaseAdapter } from "./db.js";
import { type ResolverEnvironment } from "./sources.js";
/**
 * Why a source shows what it shows. "0" alone cannot tell real inactivity from a pipeline that
 * never saw the data, so every source gets an explicit state:
 * - root_missing: no source root exists on this machine (client not installed or custom root);
 * - no_candidates: a root exists but no candidate file was ever recorded (not scanned yet or empty);
 * - parser_unsupported: every failure is an unsupported schema and nothing was imported;
 * - failed: files failed and nothing was imported;
 * - partial: some files failed, or imported rows come from an older adapter projection;
 * - zero_activity: files were imported but they contain no sessions/events;
 * - available: imported data present and no failures.
 * No raw path, session id or content is ever reported.
 */
export type SourceDiagnosticState = "available" | "zero_activity" | "root_missing" | "no_candidates" | "partial" | "parser_unsupported" | "failed";
export interface SourceDiagnostic {
    state: SourceDiagnosticState;
    root_status: "found" | "missing";
    root_resolution: string;
    adapter_version: string;
    files_imported: number;
    files_failed: number;
    files_pending_reprojection: number;
    files_no_longer_candidates: number;
    failures_by_code: Record<string, number>;
    sessions: number;
    main_sessions_with_messages: number;
    runtime_events: number;
    token_coverage?: {
        available: number;
        missing: number;
    };
    parser_counters?: Record<string, number>;
}
export declare function buildSourceDiagnostics(db: DatabaseAdapter, hookLogPath: string, options?: ResolverEnvironment): Promise<Record<string, SourceDiagnostic>>;
