/**
 * CSV-based storage implementation for judge evaluations.
 *
 * Stores evaluation results in a CSV file with the following columns:
 * - timestamp: ISO 8601 timestamp
 * - promptId: Prompt identifier
 * - branchName: Git branch name
 * - commitSha: Git commit SHA
 * - appId: Application identifier
 * - prompt: The actual prompt text
 * - passed: Boolean pass/fail status
 * - score: Overall score (0-100)
 * - feedback: Summary feedback text
 *
 * CSV format provides simple, human-readable storage suitable for analysis
 * in spreadsheet applications or data processing tools.
 *
 * Configuration:
 * The storage location can be configured via the JUDGE_STORAGE_PATH environment variable:
 * - Directory path: `JUDGE_STORAGE_PATH=~/eval` (creates evaluations.csv inside)
 * - Full file path: `JUDGE_STORAGE_PATH=~/eval/results.csv`
 * - Supports ~ expansion for home directory
 * - Default: `<appRoot>/.superblocks/judge-evaluations/evaluations.csv`
 */
import type { JudgeStorage } from "./interface.js";
import type { StoredEvaluation, EvaluationQuery } from "./types.js";
/**
 * CSV-based implementation of JudgeStorage.
 *
 * Thread-safe through file system atomic operations.
 * Appends new evaluations to maintain chronological order.
 */
export declare class CsvJudgeStorage implements JudgeStorage {
    private readonly filePath;
    /**
     * Creates a new CSV storage instance.
     *
     * @param storageDir - Directory for storage (default: .superblocks/judge-evaluations)
     * @param filename - CSV filename (default: evaluations.csv)
     */
    constructor(storageDir?: string, filename?: string);
    /**
     * Ensures the storage directory and file exist.
     *
     * Creates directory if needed and initializes CSV with header row.
     */
    private ensureStorageExists;
    /**
     * Escapes a value for CSV format.
     *
     * Handles quotes and commas by wrapping in double quotes and escaping
     * internal quotes.
     */
    private escapeCsvValue;
    /**
     * Converts a StoredEvaluation to a CSV row.
     */
    private toCsvRow;
    /**
     * Parses a CSV row into a StoredEvaluation.
     *
     * Note: This is a simplified parser that doesn't handle all CSV edge cases.
     * For production use with complex data, consider a proper CSV parsing library.
     */
    private fromCsvRow;
    /**
     * Saves an evaluation result to the CSV file.
     *
     * Appends a new row to the file. Creates file and directory if needed.
     */
    saveEvaluation(evaluation: StoredEvaluation): Promise<void>;
    /**
     * Reads all evaluations from the CSV file.
     */
    private readAllEvaluations;
    /**
     * Filters evaluations based on query parameters.
     */
    private applyQuery;
    /**
     * Retrieves all evaluations matching the query.
     */
    getEvaluations(query?: EvaluationQuery): Promise<StoredEvaluation[]>;
    /**
     * Retrieves evaluations for a specific prompt.
     */
    getEvaluationsByPrompt(promptId: string): Promise<StoredEvaluation[]>;
    /**
     * Retrieves evaluations for a specific branch.
     */
    getEvaluationsByBranch(branchName: string): Promise<StoredEvaluation[]>;
    /**
     * Deletes all stored evaluations.
     *
     * Removes the CSV file. Use with caution.
     */
    clear(): Promise<void>;
}
//# sourceMappingURL=csv-storage.d.ts.map