/**
 * Smart Context Preloader
 *
 * Intelligently preloads relevant context based on:
 * - User's recent activity patterns
 * - Project structure analysis
 * - Git changes and history
 * - Import/dependency graphs
 * - Predictive models based on task type
 */
import { EventEmitter } from 'events';
export interface PreloadedContext {
    files: PreloadedFile[];
    symbols: PreloadedSymbol[];
    gitContext: GitContext;
    projectInfo: ProjectInfo;
    relevanceScore: number;
    loadTime: number;
}
export interface PreloadedFile {
    path: string;
    content: string;
    relevance: number;
    reason: PreloadReason;
    tokens: number;
}
export interface PreloadedSymbol {
    name: string;
    type: 'function' | 'class' | 'interface' | 'variable' | 'type';
    file: string;
    line: number;
    signature?: string;
}
export interface GitContext {
    branch: string;
    recentCommits: GitCommit[];
    changedFiles: string[];
    stagedFiles: string[];
    untrackedFiles: string[];
}
export interface GitCommit {
    hash: string;
    message: string;
    author: string;
    date: string;
    files: string[];
}
export interface ProjectInfo {
    type: ProjectType;
    mainLanguage: string;
    frameworks: string[];
    entryPoints: string[];
    configFiles: string[];
    testDirs: string[];
}
export type ProjectType = 'node' | 'python' | 'rust' | 'go' | 'java' | 'unknown';
export type PreloadReason = 'recently_modified' | 'git_changed' | 'import_dependency' | 'entry_point' | 'config_file' | 'test_file' | 'pattern_match' | 'user_pattern';
export interface PreloaderConfig {
    maxFiles: number;
    maxTokens: number;
    includeTests: boolean;
    includeConfigs: boolean;
    gitDepth: number;
    patternHistory: number;
    cacheTimeout: number;
}
export interface UserPattern {
    pattern: string;
    frequency: number;
    lastUsed: number;
    files: string[];
}
export declare class SmartContextPreloader extends EventEmitter {
    private config;
    private projectRoot;
    private userPatterns;
    private cache;
    private projectInfo;
    constructor(projectRoot: string, config?: Partial<PreloaderConfig>);
    /**
     * Preload context for a task
     */
    preload(taskHint?: string): Promise<PreloadedContext>;
    /**
     * Analyze project structure
     */
    private analyzeProject;
    /**
     * Get git context
     */
    private getGitContext;
    /**
     * Get recently modified files
     */
    private getRecentlyModifiedFiles;
    /**
     * Get files based on import/dependency analysis
     */
    private getDependencyFiles;
    /**
     * Get files based on user patterns
     */
    private getPatternBasedFiles;
    /**
     * Merge and rank files
     */
    private mergeAndRank;
    /**
     * Load file contents
     */
    private loadFileContents;
    /**
     * Extract symbols from files
     */
    private extractSymbols;
    /**
     * Extract TypeScript/JavaScript symbols
     */
    private extractTSSymbols;
    /**
     * Extract Python symbols
     */
    private extractPythonSymbols;
    /**
     * Record user pattern
     */
    recordPattern(pattern: string, files: string[]): void;
    /**
     * Calculate relevance score
     */
    private calculateRelevanceScore;
    /**
     * Extract keywords from text
     */
    private extractKeywords;
    /**
     * Check if file is a source file
     */
    private isSourceFile;
    /**
     * List files recursively
     */
    private listFiles;
    /**
     * Execute git command
     */
    private execGit;
    /**
     * Estimate token count
     */
    private estimateTokens;
    /**
     * Clear cache
     */
    clearCache(): void;
    /**
     * Dispose
     */
    dispose(): void;
}
export declare function createSmartPreloader(projectRoot: string, config?: Partial<PreloaderConfig>): SmartContextPreloader;
