export type ExplainabilityReason = "changed file" | "keyword match" | "import dependency" | "call dependency" | "dependency distance" | "based on past runs" | "reused pattern" | "proximity" | "recent file" | "repo context" | "adaptive boost" | "adaptive penalty" | "task fit" | "low relevance" | "selection filter" | "file-type mismatch" | "passive authority" | "out-of-directory";
export interface FileAnalysisEntry {
    file: string;
    reasons: ExplainabilityReason[];
    score?: number;
    note?: string;
    selectionWhy?: string;
    dependencyChain?: string[];
}
export interface SkippedPathEntry {
    path: string;
    reason: string;
    estimated?: boolean;
}
export interface ContextTraceStep {
    step: string;
    summary: string;
    filesAdded: string[];
    filesRemoved?: string[];
}
export interface ContextTraceState {
    artifactType: "kiwi-control/context-trace";
    version: 1;
    timestamp: string;
    task: string;
    fileAnalysis: {
        totalFiles: number;
        scannedFiles: number;
        skippedFiles: number;
        selectedFiles: number;
        excludedFiles: number;
        selected: FileAnalysisEntry[];
        excluded: FileAnalysisEntry[];
        skipped: SkippedPathEntry[];
    };
    initialSignals: {
        changedFiles: string[];
        recentFiles: string[];
        importNeighbors: string[];
        proximityFiles: string[];
        keywordMatches: string[];
        repoContextFiles: string[];
        dependencyDistances?: Record<string, number>;
        dependencyChains?: Record<string, string[]>;
    };
    expansionSteps: ContextTraceStep[];
    finalSelection: {
        include: string[];
        excludePatterns: string[];
        reason: string;
        confidence: string;
    };
    honesty: {
        heuristic: boolean;
        lowConfidence: boolean;
        partialScan: boolean;
    };
}
export interface IndexingState {
    artifactType: "kiwi-control/indexing";
    version: 1;
    timestamp: string;
    task: string;
    totalFiles: number;
    discoveredFiles: number;
    analyzedFiles: number;
    skippedFiles: number;
    visitedDirectories: number;
    skippedDirectories: number;
    maxDepthExplored: number;
    fileBudgetReached: boolean;
    directoryBudgetReached: boolean;
    partialScan: boolean;
    ignoreRulesApplied: string[];
    skipped: SkippedPathEntry[];
    indexedFiles?: number;
    indexUpdatedFiles?: number;
    indexReusedFiles?: number;
    impactFiles?: number;
}
export declare function persistContextTrace(targetRoot: string, trace: ContextTraceState): Promise<string>;
export declare function persistIndexingState(targetRoot: string, indexing: IndexingState): Promise<string>;
//# sourceMappingURL=context-trace.d.ts.map