export type ProvenanceTier = 'oracle:test-exec' | 'judge:fable' | 'proxy:structural'; export interface TrajectoryStep { action: string; tier: ProvenanceTier; } export interface Trajectory { id: string; steps: TrajectoryStep[]; outcome: 'success' | 'failure'; benchmarkTaskId?: string; inputs: unknown; recordedOutputs: unknown; } /** Re-execute a trajectory's recorded inputs and return the outputs. */ export type ReplayFn = (t: Trajectory) => unknown; export interface QualificationResult { qualified: boolean; reasons: string[]; } /** Fingerprint a trajectory by its shape (step actions + outcome) so identical failures dedupe. */ export declare function fingerprintTrajectory(t: Trajectory): string; /** * Invariant Q. `replay` is required — determinism cannot be asserted without * re-executing; a trajectory with no verifiable replay is REJECTED (fail-closed). */ export declare function qualifyTrajectory(t: Trajectory, replay?: ReplayFn): QualificationResult; export interface AntiPattern { fingerprint: string; stage: string; reasons: string[]; ts: number; } /** * File-backed avoid-list of rejected trajectories/mutations. JSONL, append-only * with a bounded cap: once the file exceeds `maxEntries` it is rewritten to the * newest `maxEntries` (rotation), so the archive can never grow unbounded — * runaway-storage guard. Deduped by fingerprint at the call site. */ export declare class AntiPatternArchive { private readonly filePath; private readonly maxEntries; constructor(filePath: string, maxEntries?: number); private load; record(entry: AntiPattern): void; has(fingerprint: string): boolean; list(): AntiPattern[]; } export interface AdmissionReport { qualified: Trajectory[]; rejected: Array<{ id: string; reasons: string[]; }>; admittedCount: number; rejectedCount: number; } /** * Admit a batch of observed trajectories into the candidate dataset. Rejects are * recorded to the anti-pattern archive (deduped by fingerprint). */ export declare function admitTrajectories(trajectories: Trajectory[], opts?: { replay?: ReplayFn; archive?: AntiPatternArchive; ts?: number; }): AdmissionReport; //# sourceMappingURL=harness-qualification.d.ts.map