/** * AST-aware code chunking using tree-sitter (WASM). * * Parses source files into syntax trees and extracts meaningful code constructs * (functions, classes, methods, structs, etc.) as individual chunks. Gaps between * extracted nodes are captured as file-level chunks when substantial. */ import type { Chunk, TreeSitterLanguage } from "./types.js"; /** * Initialize the tree-sitter WASM runtime. Must be called before parsing. * Safe to call multiple times — subsequent calls are no-ops. */ export declare function initTreeSitter(): Promise; /** * Parse a source file with tree-sitter and extract AST-aware chunks. * * Returns chunks for functions, classes, methods, and other language-specific * constructs, plus file-level chunks for substantial gaps between them. * * @param content - Raw source code text * @param filePath - Relative file path (stored in chunk metadata) * @param language - Tree-sitter language identifier */ export declare function chunkWithTreeSitter(content: string, filePath: string, language: TreeSitterLanguage): Promise; //# sourceMappingURL=tree-sitter-chunker.d.ts.map