ultimate-mcp-server
Version:
The definitive all-in-one Model Context Protocol server for AI-assisted coding across 30+ platforms
65 lines • 1.69 kB
TypeScript
/**
* File Collector for Large Context Analysis
* Recursively collects files matching patterns for analysis
*/
import { LargeContextOptions, FileCollection, DirectoryTree } from './types.js';
export declare class FileCollector {
private readonly defaultExcludes;
/**
* Collect files matching the specified pattern
*/
collect(options: LargeContextOptions): Promise<FileCollection>;
/**
* Generate directory tree structure
*/
generateDirectoryTree(rootDir: string, options?: {
maxDepth?: number;
includeFiles?: boolean;
pattern?: string;
}): Promise<DirectoryTree>;
/**
* Collect files recursively
*/
private collectRecursive;
/**
* Collect a single file
*/
private collectFile;
/**
* Build directory tree recursively
*/
private buildDirectoryTree;
/**
* Compile pattern to regex
*/
private compilePattern;
/**
* Check if path should be excluded
*/
private shouldExclude;
/**
* Detect programming language from file extension
*/
private detectLanguage;
/**
* Estimate token count (rough approximation)
*/
private estimateTokens;
/**
* Sort files by specified criteria
*/
private sortFiles;
/**
* Calculate collection metadata
*/
private calculateMetadata;
/**
* Format collection as context
*/
formatAsContext(collection: FileCollection, format?: 'plain' | 'structured' | 'xml' | 'json'): string;
private formatPlain;
private formatStructured;
private formatXML;
private escapeXML;
}
//# sourceMappingURL=file-collector.d.ts.map