/** * Compute a SHA-256 hash of the given content. * Used for incremental indexing — only re-embed files whose hash has changed. */ declare function hashContent(content: string): string; interface FileEntry { /** File path relative to repo root. */ filePath: string; /** SHA-256 content hash. */ contentHash: string; /** Optional: IDs of chunks generated from this file. */ chunkIds?: string[]; } interface ChangedFiles { /** Files that are new (not in old set). */ added: string[]; /** Files that exist in both but have different content hashes. */ modified: string[]; /** Files that were in old set but not in new set. */ deleted: string[]; /** Files that are unchanged. */ unchanged: string[]; } /** Mapping from file extension to tree-sitter grammar name. */ interface GrammarMapping { extension: string; language: string; treeSitterGrammar: string; } /** * Compare old and new file entry lists to determine which files were * added, modified, deleted, or unchanged. * * Uses content hashes for comparison — two files with identical content * are considered unchanged even if their metadata differs. */ declare function resolveChanges(oldEntries: FileEntry[], newEntries: FileEntry[]): ChangedFiles; declare const INDEXABLE_EXTENSIONS: Set; declare function shouldIndexFile(path: string, size: number): boolean; /** Languages that have tree-sitter grammar support for AST chunking. */ declare const AST_SUPPORTED_LANGUAGES: Set; declare function detectLanguage(path: string): string; /** * Get the tree-sitter grammar name for a file extension. * Returns empty string if no grammar is available (falls back to line chunker). */ declare function getTreeSitterGrammar(path: string): string; export { AST_SUPPORTED_LANGUAGES, type ChangedFiles, type FileEntry, type GrammarMapping, INDEXABLE_EXTENSIONS, detectLanguage, getTreeSitterGrammar, hashContent, resolveChanges, shouldIndexFile };