ultimate-mcp-server
Version:
The definitive all-in-one Model Context Protocol server for AI-assisted coding across 30+ platforms
77 lines • 2.05 kB
TypeScript
/**
* Code Context Manager
* Manages code context extraction, caching, and intelligent context window building
*/
import { CodeContext, ContextWindow, ContextExtractionOptions, FileContext } from './types.js';
/**
* Main context manager
*/
export declare class CodeContextManager {
private extractors;
private cache;
private strategies;
constructor();
/**
* Extract contexts from a file
*/
extractFromFile(filePath: string, options?: ContextExtractionOptions): Promise<CodeContext[]>;
/**
* Extract file-level context information
*/
getFileContext(filePath: string): Promise<FileContext | null>;
/**
* Build a context window from multiple files
*/
buildContextWindow(files: string[], options?: ContextExtractionOptions): Promise<ContextWindow>;
/**
* Build context window focused on a specific query
*/
buildQueryFocusedWindow(query: string, files: string[], options?: ContextExtractionOptions): Promise<ContextWindow>;
/**
* Find definition of a symbol
*/
findDefinition(symbol: string, searchPaths: string[]): Promise<CodeContext | null>;
/**
* Find references to a symbol
*/
findReferences(symbol: string, searchPaths: string[]): Promise<CodeContext[]>;
/**
* Score context relevance to a query
*/
private scoreContextRelevance;
/**
* Estimate token count
*/
private estimateTokens;
/**
* Truncate context to fit token limit
*/
private truncateContext;
/**
* Generate cache key
*/
private getCacheKey;
/**
* Find files recursively
*/
private findFiles;
/**
* Extract context around a specific line
*/
private extractAroundLine;
/**
* Generate window summary
*/
private generateWindowSummary;
/**
* Clear cache
*/
clearCache(): void;
/**
* Get cache statistics
*/
getCacheStats(): {
size: number;
};
}
//# sourceMappingURL=context-manager.d.ts.map