import type { Datum } from "../charts/shared/datumTypes";
export type FieldType = "numeric" | "categorical" | "date" | "unknown";
export interface NumericFieldSummary {
    type: "numeric";
    min: number;
    max: number;
    mean: number;
    median: number;
}
export interface DateFieldSummary {
    type: "date";
    min: string;
    max: string;
}
export interface CategoricalFieldSummary {
    type: "categorical";
    distinctCount: number;
    topValues: ReadonlyArray<{
        value: string;
        count: number;
    }>;
    distinctValues?: ReadonlyArray<string>;
}
export interface UnknownFieldSummary {
    type: "unknown";
}
export type FieldSummary = NumericFieldSummary | DateFieldSummary | CategoricalFieldSummary | UnknownFieldSummary;
export interface DataSummary {
    rowCount: number;
    fields: Record<string, FieldSummary>;
    sample: ReadonlyArray<Datum>;
}
export interface SummarizeOptions {
    maxDistinct?: number;
    sampleSize?: number;
    /** Scan up to this many rows when discovering field keys (handles ragged rows). */
    keyScanRows?: number;
}
/**
 * Summarize a dataset for an LLM. Returns row count, per-field statistics, and a small sample.
 *
 * Designed so a model can answer questions about ranges, peaks, distributions, and categories
 * without seeing the full dataset.
 */
export declare function summarizeData(data: ReadonlyArray<Datum> | null | undefined, options?: SummarizeOptions): DataSummary;
