/**
 * Trajectory export — RLHF/DPO training data from agent traces.
 *
 * Sprint-563: B3 — exportTrajectory(runId, db, opts).
 *
 * Formats:
 *  - jsonl: one JSON object per line, auto-labeled (positive/negative/neutral)
 *  - openai-dpo: OpenAI-compatible DPO format with chosen/rejected pairs
 *
 * Auto-labeling: outcome.value_cents > 0 → positive, < 0 → negative, null → neutral.
 */
import type { DbClient } from "../tracking/agent-run-tracker.js";
export type TrajectoryFormat = "jsonl" | "openai-dpo";
export interface TrajectoryOptions {
    format: TrajectoryFormat;
    /** Minimum tokens to include a step (skip empty LLM calls). */
    minTokens?: number;
    /** Maximum steps to export (default 1000). */
    maxSteps?: number;
}
export interface TrajectoryStep {
    runId: string;
    stepIndex: number;
    phase: string;
    type: string;
    input?: unknown;
    output?: unknown;
    model?: string;
    provider?: string;
    inputTokens?: number;
    outputTokens?: number;
    costUsd?: number;
    durationMs?: number;
    timestamp?: string;
    /** Auto-label: positive | negative | neutral */
    label: "positive" | "negative" | "neutral";
}
export interface TrajectoryExport {
    steps: TrajectoryStep[];
    totalCost: number;
    totalTokens: number;
    format: TrajectoryFormat;
}
/**
 * Fetch trace steps from a run and export as training trajectory.
 * Uses the db client to query run_step rows.
 */
export declare function exportTrajectory(runId: string, db: DbClient, opts?: TrajectoryOptions): Promise<TrajectoryExport>;
/**
 * Serialize a trajectory export to the requested format.
 */
export declare function serializeTrajectory(exp: TrajectoryExport): string;
//# sourceMappingURL=trajectory.d.ts.map