import { UtilityTelemetryTarget, UtilityTelemetryDecision, UtilityTelemetryOutcome } from './utility-telemetry.js';

interface UtilityLearningWeight {
    target: UtilityTelemetryTarget;
    decision: UtilityTelemetryDecision;
    eventCount: number;
    learnedWeight: number;
    averageUtilityScore: number;
    confidence: number;
    outcomeCounts: Partial<Record<UtilityTelemetryOutcome, number>>;
    updatedAt: string;
}
interface UtilityLearningSnapshot {
    version: 1;
    updatedAt: string;
    windowDays: number;
    minEventCount: number;
    maxWeightMagnitude: number;
    weights: UtilityLearningWeight[];
}
interface UtilityLearningStatus {
    enabled: boolean;
    promotionByOutcomeEnabled: boolean;
    rootDir: string;
    statePath: string;
    snapshot: UtilityLearningSnapshot | null;
    weights: {
        total: number;
        positive: number;
        negative: number;
        zero: number;
        latestUpdatedAt?: string;
    };
}
interface UtilityLearningResult {
    applied: boolean;
    reason: "disabled" | "insufficient_events" | "learned";
    statePath: string;
    snapshot: UtilityLearningSnapshot | null;
}
declare function resolveUtilityLearningStatePath(memoryDir: string, utilityTelemetryDir?: string): string;
declare function readUtilityLearningSnapshot(memoryDir: string, utilityTelemetryDir?: string): Promise<UtilityLearningSnapshot | null>;
declare function learnUtilityPromotionWeights(options: {
    memoryDir: string;
    utilityTelemetryDir?: string;
    enabled: boolean;
    now?: Date;
    learningWindowDays: number;
    minEventCount: number;
    maxWeightMagnitude: number;
}): Promise<UtilityLearningResult>;
declare function getUtilityLearningStatus(options: {
    memoryDir: string;
    utilityTelemetryDir?: string;
    enabled: boolean;
    promotionByOutcomeEnabled?: boolean;
}): Promise<UtilityLearningStatus>;

export { type UtilityLearningResult, type UtilityLearningSnapshot, type UtilityLearningStatus, type UtilityLearningWeight, getUtilityLearningStatus, learnUtilityPromotionWeights, readUtilityLearningSnapshot, resolveUtilityLearningStatePath };
