/**
 * Training data collector — auto-collects high-quality sessions.
 *
 * On session end, scores quality. If above threshold, appends JSONL
 * to ~/.owlcoda/training/collected.jsonl and updates manifest.
 *
 * Part of L3 data pipeline.
 */
import type { Session } from '../history/sessions.js';
export interface CollectorConfig {
    /** Master switch — defaults to false (opt-in). Override at runtime via
     *  config.trainingCollection or env OWLCODA_TRAINING_COLLECTION=1 */
    enabled: boolean;
    /** Min quality score to collect (default: 60) */
    minQuality: number;
    /** Min messages to consider (default: 4) */
    minMessages: number;
    /** Max collected file size in bytes before rotation (default: 50MB) */
    maxFileSize: number;
    /** Output directory (default: ~/.owlcoda/training) */
    outputDir: string;
}
export interface CollectResult {
    collected: boolean;
    quality: number;
    reason?: string;
    path?: string;
}
export interface CollectorManifest {
    totalCollected: number;
    totalSkipped: number;
    lastCollectedAt: string;
    averageQuality: number;
    qualitySum: number;
}
export declare function configureCollector(overrides: Partial<CollectorConfig>): void;
export declare function getCollectorConfig(): Readonly<CollectorConfig>;
export declare function resetCollectorConfig(): void;
/** Authoritative gate — env var wins over config to allow ad-hoc enable/disable
 *  without restart. Returns true only when collection is explicitly enabled. */
export declare function isTrainingCollectionEnabled(): boolean;
/**
 * Evaluate and optionally collect a session for training.
 * Appends to collected.jsonl if quality threshold is met.
 */
export declare function collectSession(session: Session): Promise<CollectResult>;
/**
 * Fire-and-forget wrapper — logs but never throws.
 */
export declare function onSessionEndCollect(session: Session): Promise<CollectResult>;
