import nunjucks from 'nunjucks';
import { type EvalWithMetadata, type EvaluateResult, type EvaluateSummary, type EvaluateTable, type NunjucksFilterMap, type PromptWithMetadata, type ResultsFile, type TestCase, type TestCasesWithMetadata, type UnifiedConfig, type OutputFile, type Prompt, type CompletedPrompt } from './types';
export declare function maybeReadConfig(configPath: string): Promise<UnifiedConfig | undefined>;
export declare function dereferenceConfig(rawConfig: UnifiedConfig): Promise<UnifiedConfig>;
export declare function readConfig(configPath: string): Promise<UnifiedConfig>;
/**
 * Reads multiple configuration files and combines them into a single UnifiedConfig.
 *
 * @param {string[]} configPaths - An array of paths to configuration files. Supports glob patterns.
 * @returns {Promise<UnifiedConfig>} A promise that resolves to a unified configuration object.
 */
export declare function readConfigs(configPaths: string[]): Promise<UnifiedConfig>;
export declare function writeMultipleOutputs(outputPaths: string[], evalId: string | null, results: EvaluateSummary, config: Partial<UnifiedConfig>, shareableUrl: string | null): Promise<void>;
export declare function writeOutput(outputPath: string, evalId: string | null, results: EvaluateSummary, config: Partial<UnifiedConfig>, shareableUrl: string | null): Promise<void>;
export declare function readOutput(outputPath: string): Promise<OutputFile>;
export declare function getConfigDirectoryPath(createIfNotExists?: boolean): string;
export declare function setConfigDirectoryPath(newPath: string): void;
/**
 * TODO(ian): Remove this
 * @deprecated Use readLatestResults directly instead.
 */
export declare function getLatestResultsPath(): string;
export declare function writeResultsToDatabase(results: EvaluateSummary, config: Partial<UnifiedConfig>, createdAt?: Date): Promise<string>;
/**
 *
 * @returns Last n evals in descending order.
 */
export declare function listPreviousResults(limit?: number, filterDescription?: string): {
    evalId: string;
    description?: string | null;
}[];
/**
 * @deprecated Used only for migration to sqlite
 */
export declare function listPreviousResultFilenames_fileSystem(): string[];
/**
 * @deprecated Used only for migration to sqlite
 */
export declare function listPreviousResults_fileSystem(): {
    fileName: string;
    description?: string;
}[];
export declare function migrateResultsFromFileSystemToDatabase(): Promise<void>;
export declare function cleanupOldFileResults(remaining?: number): void;
export declare function filenameToDate(filename: string): Date;
export declare function dateToFilename(date: Date): string;
export declare function readResult(id: string): Promise<{
    id: string;
    result: ResultsFile;
    createdAt: Date;
} | undefined>;
/**
 * @deprecated Used only for migration to sqlite
 */
export declare function readResult_fileSystem(name: string): {
    id: string;
    result: ResultsFile;
    createdAt: Date;
} | undefined;
export declare function updateResult(id: string, newConfig?: Partial<UnifiedConfig>, newTable?: EvaluateTable): Promise<void>;
export declare function readLatestResults(filterDescription?: string): Promise<ResultsFile | undefined>;
export declare function getPromptsForTestCases(testCases: TestCase[]): Promise<PromptWithMetadata[]>;
export declare function getPromptsForTestCasesHash(testCasesSha256: string, limit?: number): Promise<PromptWithMetadata[]>;
export declare function sha256(str: string): string;
export declare function getPrompts(limit?: number): Promise<PromptWithMetadata[]>;
export declare function getPromptsWithPredicate(predicate: (result: ResultsFile) => boolean, limit: number): Promise<PromptWithMetadata[]>;
export declare function getTestCases(limit?: number): Promise<TestCasesWithMetadata[]>;
export declare function getTestCasesWithPredicate(predicate: (result: ResultsFile) => boolean, limit: number): Promise<TestCasesWithMetadata[]>;
export declare function getPromptFromHash(hash: string): Promise<PromptWithMetadata | undefined>;
export declare function getDatasetFromHash(hash: string): Promise<TestCasesWithMetadata | undefined>;
export declare function getEvals(limit?: number): Promise<EvalWithMetadata[]>;
export declare function getEvalFromId(hash: string): Promise<EvalWithMetadata | undefined>;
export declare function getEvalsWithPredicate(predicate: (result: ResultsFile) => boolean, limit: number): Promise<EvalWithMetadata[]>;
export declare function deleteEval(evalId: string): Promise<void>;
export declare function readFilters(filters: Record<string, string>): Promise<NunjucksFilterMap>;
export declare function getNunjucksEngine(filters?: NunjucksFilterMap): nunjucks.Environment | {
    renderString: (template: string) => string;
};
export declare function printBorder(): void;
export declare function transformOutput(codeOrFilepath: string, output: string | object | undefined, context: {
    vars?: Record<string, string | object | undefined>;
    prompt: Partial<Prompt>;
}): Promise<any>;
export declare function setupEnv(envPath: string | undefined): void;
export type StandaloneEval = CompletedPrompt & {
    evalId: string;
    datasetId: string | null;
    promptId: string | null;
};
export declare function getStandaloneEvals(limit?: number): StandaloneEval[];
export declare function providerToIdentifier(provider: TestCase['provider']): string | undefined;
export declare function varsMatch(vars1: Record<string, string | string[] | object> | undefined, vars2: Record<string, string | string[] | object> | undefined): boolean;
export declare function resultIsForTestCase(result: EvaluateResult, testCase: TestCase): boolean;
export declare function safeJsonStringify(value: any, prettyPrint?: boolean): string;
export declare function renderVarsInObject<T>(obj: T, vars?: Record<string, string | object>): T;
//# sourceMappingURL=util.d.ts.map