/** * CodeIntelligenceProvider — optional structural code understanding (ARCHITECTURE §4.7). * * Powers the `code_outline` / `code_symbol` tools and *optionally* enriches extractors via * `ExtractorContext.codeIndex`. Tree-sitter WASM is the first-party impl; LSP is a richer * impl layered on top. Remove the module and the core still compacts (load-bearing #2). * * After provider initialization, all methods are synchronous structural reads; * `invalidate` is the cache-busting hook. */ export interface SymbolInfo { name: string; kind: string; /** 0-based [startLine, endLine] inclusive. */ range?: [number, number]; signature?: string; } export interface CodeIntelligenceProvider { /** High-level file outline. */ outline(path: string): SymbolInfo[]; /** Resolve every exact symbol-name match, preserving source order. */ symbol(path: string, name: string): SymbolInfo[]; /** Signatures of all top-level declarations in a file. */ signatures(path: string): string[]; /** Drop cached parse data for a path (called after a write/edit). */ invalidate(path: string): void; }