import type { SessionEvent } from '../types';
import { type PromotionGateConfig, type PromotionGateResult } from './promotionGate';
export interface LearningCandidateOptions {
    minToolSuccessRate?: number;
    minQualityScore?: number;
}
export interface SessionLearningCandidate {
    id: string;
    sessionId: string;
    createdAt: string;
    prompt: string;
    outcome: string;
    toolNames: string[];
    sourceEventIds: string[];
    qualityScore: number;
    accepted: boolean;
    rejectionReasons: string[];
}
export interface PromotedLearningCandidate {
    id: string;
    promotedAt: string;
    memoryPath: string;
}
export type LearningCandidateReviewAction = 'promote' | 'reject';
export interface LearningCandidateReview {
    candidateId: string;
    action: LearningCandidateReviewAction;
    reviewedAt: string;
    reason?: string;
    memoryPath?: string;
}
export interface ReviewedLearningCandidate extends SessionLearningCandidate {
    review?: LearningCandidateReview;
    reviewStatus: 'pending' | LearningCandidateReviewAction;
}
export interface LearningCandidateProvenanceEvent {
    id: string;
    timestamp: string;
    type: SessionEvent['type'];
    kind: SessionEvent['data']['kind'];
    summary: string;
}
export interface LearningCandidateProvenance {
    candidate: ReviewedLearningCandidate;
    events: LearningCandidateProvenanceEvent[];
    missingEventIds: string[];
}
export declare function extractLearningCandidate(sessionId: string, events: SessionEvent[], options?: LearningCandidateOptions): SessionLearningCandidate;
export declare function appendLearningCandidate(projectDir: string, candidate: SessionLearningCandidate): Promise<string>;
export declare function listLearningCandidates(projectDir: string, limit?: number): Promise<SessionLearningCandidate[]>;
export declare function listLearningCandidateReviews(projectDir: string, limit?: number): Promise<LearningCandidateReview[]>;
export declare function listReviewedLearningCandidates(projectDir: string, limit?: number): Promise<ReviewedLearningCandidate[]>;
export declare function reviewLearningCandidate(projectDir: string, candidateId: string, action: LearningCandidateReviewAction, reason?: string): Promise<LearningCandidateReview>;
/**
 * Stand-alone wrapper used by the promotion gate REST endpoint and by
 * `reviewLearningCandidate` above. Looks up the candidate by id, pulls
 * the recent eval-run history, and runs the pure gate evaluator.
 */
export declare function evaluatePromotionGateForCandidate(projectDir: string, candidateId: string, config?: PromotionGateConfig): Promise<PromotionGateResult & {
    candidateId: string;
    candidateFound: boolean;
}>;
export declare function getLearningCandidateProvenance(projectDir: string, candidateId: string, eventLimit?: number): Promise<LearningCandidateProvenance>;
export declare function promoteLearningCandidate(projectDir: string, candidate: SessionLearningCandidate): Promise<PromotedLearningCandidate | null>;
//# sourceMappingURL=sessionLearning.d.ts.map