UNPKG

@context-sync/server

Version:

MCP server for AI context sync with persistent memory, workspace file access, and intelligent code operations

71 lines 1.89 kB
import { WorkspaceDetector } from './workspace-detector.js'; export interface FileMatch { path: string; name: string; size: number; language: string; } export interface ContentMatch { path: string; line: number; content: string; match: string; context: { before: string[]; after: string[]; }; } export interface SearchOptions { maxResults?: number; ignoreCase?: boolean; filePattern?: string; } export interface ContentSearchOptions extends SearchOptions { regex?: boolean; caseSensitive?: boolean; contextLines?: number; } export declare class FileSearcher { private workspaceDetector; private patternCache; constructor(workspaceDetector: WorkspaceDetector); /** * Search for files by name or pattern */ searchFiles(pattern: string, options?: SearchOptions): FileMatch[]; /** * Search file contents for text or regex */ searchContent(query: string, options?: ContentSearchOptions): ContentMatch[]; /** * Find symbol definitions (functions, classes, etc.) */ findSymbol(symbol: string, type?: 'function' | 'class' | 'variable' | 'all'): ContentMatch[]; /** * Get unique file extensions in workspace */ getFileExtensions(): Map<string, number>; /** * Get file statistics */ getFileStats(): { totalFiles: number; totalSize: number; byExtension: Map<string, { count: number; size: number; }>; }; private searchRecursive; private searchContentRecursive; private createSearchRegex; private getSymbolPatterns; private getContext; private matchesPattern; private isTextFile; private detectLanguage; private shouldIgnore; private countExtensions; private calculateStats; } //# sourceMappingURL=file-searcher.d.ts.map