import type { Dataset, DatasetStore, Experiment, ExperimentStore } from '../types/evaluate.js'; import { type PostgresLikeClient } from './client.js'; /** Options for the Postgres evaluation stores. */ export interface PostgresEvaluationStoreOptions { /** Datasets table. Defaults to `nexus_datasets`. */ datasetsTable?: string; /** Experiments table. Defaults to `nexus_experiments`. */ experimentsTable?: string; } /** The schema for both tables, as statements. */ export declare function evaluationStoreMigration(options?: PostgresEvaluationStoreOptions): string[]; /** * Dataset versions in Postgres, keyed by name and content version. * * Saving the same version twice replaces it, which is safe because a version is derived from the * examples: the same version is the same content. */ export declare class PostgresDatasetStore implements DatasetStore { private readonly client; private readonly options; private readonly table; constructor(client: PostgresLikeClient, options?: PostgresEvaluationStoreOptions); /** Creates both evaluation tables if they do not exist. Never runs implicitly. */ migrate(): Promise; /** Stores a dataset version, replacing one with the same name and version. */ save(dataset: Dataset): Promise; /** Returns a version, or the newest when none is given. */ get(name: string, version?: string): Promise; /** Every dataset name with its versions. */ list(): Promise>; } /** Experiments in Postgres, newest first by start time. */ export declare class PostgresExperimentStore implements ExperimentStore { private readonly client; private readonly options; private readonly table; constructor(client: PostgresLikeClient, options?: PostgresEvaluationStoreOptions); /** Creates both evaluation tables if they do not exist. Never runs implicitly. */ migrate(): Promise; /** Stores an experiment, replacing one with the same id. */ save(experiment: Experiment): Promise; /** Reads an experiment by id. */ get(id: string): Promise; /** Experiments, newest first, filtered by name or dataset. Defaults to 50. */ list(filter?: { name?: string; dataset?: string; limit?: number; }): Promise; }