/**
 * Context Extractor
 *
 * Extracts only relevant regions of file content around findings,
 * reducing token usage by ~40-60% for large files while preserving
 * imports and sufficient context for AI validation.
 */
export interface LineRange {
    /** 1-based inclusive start line */
    start: number;
    /** 1-based inclusive end line */
    end: number;
}
export interface ExtractedContext {
    /** Formatted content with line numbers and omission markers */
    content: string;
    /** Whether the full file was sent (no omissions) */
    isFullFile: boolean;
    /** Number of lines included in the output */
    linesSent: number;
    /** Total lines in the original file */
    totalLines: number;
}
export interface ExtractionConfig {
    /** Lines of context around each finding (default: 30) */
    padding: number;
    /** Always include first N lines for imports (default: 15) */
    importLines: number;
    /** Send full file if merged ranges cover >60% of lines (default: 0.6) */
    fullFileThreshold: number;
    /** Files with this many lines or fewer always get full content (default: 100) */
    smallFileThreshold: number;
}
/**
 * Extract relevant context regions from file content around finding locations.
 *
 * Algorithm:
 * 1. Small files (<=smallFileThreshold lines) -> send full content
 * 2. Build ranges: imports (1-importLines) + padding around each finding
 * 3. Merge overlapping/adjacent ranges
 * 4. If merged coverage > fullFileThreshold of file -> send full content
 * 5. Format with omission markers between gaps
 *
 * @param fileContent - The full file content as a string
 * @param findingLineNumbers - 1-based line numbers of findings
 * @param config - Optional extraction configuration overrides
 * @returns Extracted context with metadata
 */
export declare function extractRelevantContext(fileContent: string, findingLineNumbers: number[], config?: Partial<ExtractionConfig>): ExtractedContext;
/**
 * Merge overlapping or adjacent line ranges.
 * Sorts by start line, then merges any ranges that overlap or are adjacent.
 */
export declare function mergeRanges(ranges: LineRange[]): LineRange[];
//# sourceMappingURL=context-extractor.d.ts.map