import { type AgentGenome, type GenomeMutation } from './genome'; export type VariantStatus = 'active' | 'archived' | 'promoted'; export type AgentVariant = { id: string; parentId: string | null; agentId: string; taskType: string; genomeHash: string; genome: AgentGenome; status: VariantStatus; sampleCount: number; repScore: number; notes: string | null; createdAt: number; promotedAt: number | null; archivedAt: number | null; }; export type CreateVariantInput = { agentId: string; taskType: string; genome: AgentGenome; parentId?: string | null; notes?: string | null; }; export type CreateVariantResult = { variant: AgentVariant; created: boolean; }; export declare function createVariant(input: CreateVariantInput): CreateVariantResult; export declare function forkVariant(parentId: string, patch: GenomeMutation, notes?: string): AgentVariant; export declare function getVariant(id: string): AgentVariant | null; export declare function listActiveVariants(taskType: string, agentId?: string): AgentVariant[]; export type LeaderboardEntry = { variantId: string; agentId: string; status: VariantStatus; genomeHash: string; sampleCount: number; mean: number; ci95: [number, number]; createdAt: number; promotedAt: number | null; notes: string | null; }; export declare function getLeaderboard(taskType: string, limit?: number): LeaderboardEntry[]; export declare function getVariantScores(variantId: string): number[]; export declare function thompsonSample(variants: AgentVariant[]): AgentVariant | null; export type PromotionResult = { promoted: false; reason: string; } | { promoted: true; variantId: string; previousDefaultId: string | null; pValue: number; uplift: number; sampleCount: number; eventId: string; }; export declare function evaluateAndPromote(taskType: string, options?: { minSamples?: number; pThreshold?: number; receiptId?: string | null; }): PromotionResult; export type RecordEntryResult = { ok: true; totalCost: number; } | { ok: false; error: string; }; export declare function recordTournamentEntry(params: { tournamentId: string; variantId: string; performanceEventId?: string | null; qualityScore?: number | null; cost?: number | null; latencyMs?: number | null; outcome?: string | null; }): RecordEntryResult; export type RecordScoreInput = { variantId: string; qualityScore: number; cost?: number; latencyMs?: number; }; export declare function recordScore(input: RecordScoreInput): RecordEntryResult;