import type { FileArea } from "./config.js";
import type { TaskCategory } from "./task-intent.js";
export interface ContextFeedbackEntry {
    task: string;
    taskTokens?: string[];
    taskScope: string;
    taskCategory: TaskCategory;
    fileArea: FileArea;
    timestamp: string;
    selectedFiles: string[];
    usedFiles: string[];
    unusedFiles: string[];
    success: boolean;
    confidence: string;
    tokensSaved: number;
    runKey?: string;
    completionSource?: string | null;
}
export interface ContextFeedbackState {
    artifactType: "kiwi-control/context-feedback";
    version: 4;
    entries: ContextFeedbackEntry[];
    fileScores: Record<string, number>;
    scopeScores: Record<string, Record<string, number>>;
    totalRuns: number;
    successRate: number;
}
export interface AdaptiveWeights {
    boosted: Map<string, number>;
    penalized: Map<string, number>;
    basedOnPastRuns: boolean;
    reusedPattern: string | null;
    tunedWeights: {
        dependency: number;
        taskSimilarity: number;
        pastSuccess: number;
        recency: number;
    };
    similarRuns: Array<{
        task: string;
        similarity: number;
        usedFiles: string[];
        timestamp: string;
    }>;
}
export declare function loadContextFeedback(targetRoot: string): Promise<ContextFeedbackState>;
export declare function persistContextFeedback(targetRoot: string, state: ContextFeedbackState): Promise<string>;
export declare function recordContextFeedback(targetRoot: string, entry: Omit<ContextFeedbackEntry, "timestamp" | "taskScope" | "taskCategory" | "fileArea">): Promise<ContextFeedbackState>;
export declare function computeAdaptiveWeights(targetRoot: string, task: string): Promise<AdaptiveWeights>;
export interface FeedbackSummary {
    totalRuns: number;
    successRate: number;
    adaptationLevel: "limited" | "active";
    note: string;
    basedOnPastRuns: boolean;
    reusedPattern: string | null;
    similarTasks: Array<{
        task: string;
        similarity: number;
        timestamp: string;
    }>;
    recentEntries: Array<{
        task: string;
        success: boolean;
        filesSelected: number;
        filesUsed: number;
        filesWasted: number;
        timestamp: string;
    }>;
    topBoostedFiles: Array<{
        file: string;
        score: number;
    }>;
    topPenalizedFiles: Array<{
        file: string;
        score: number;
    }>;
}
export declare function buildFeedbackSummary(targetRoot: string, task?: string): Promise<FeedbackSummary>;
//# sourceMappingURL=context-feedback.d.ts.map