/** * Go Language Index Module * * Provides Go-aware code search using: * - AST parsing via tree-sitter (with regex fallback) * - Local text embeddings for semantic similarity * - BM25 keyword matching for fast filtering * * Supported file types: .go * * Index location: .raggrep/index/language/go/ */ import { IndexModule, IndexContext, SearchContext, SearchOptions, FileIndex, SearchResult, ModuleConfig } from "../../../types"; /** Default minimum similarity score for search results */ export declare const DEFAULT_MIN_SCORE = 0.15; /** Default number of results to return */ export declare const DEFAULT_TOP_K = 10; /** File extensions supported by this module */ export declare const GO_EXTENSIONS: string[]; /** * Check if a file is supported by this module. */ export declare function isGoFile(filepath: string): boolean; export declare const supportsFile: typeof isGoFile; /** * Module-specific data stored alongside file index. */ export interface GoModuleData { embeddings: number[][]; embeddingModel: string; [key: string]: unknown; } export declare class GoModule implements IndexModule { readonly id = "language/go"; readonly name = "Go Search"; readonly description = "Go-aware code search with AST parsing and semantic embeddings"; readonly version = "1.0.0"; supportsFile(filepath: string): boolean; private embeddingConfig; private symbolicIndex; private literalIndex; private pendingSummaries; private pendingLiterals; private rootDir; private logger; initialize(config: ModuleConfig): Promise; indexFile(filepath: string, content: string, ctx: IndexContext): Promise; /** * Regex-based fallback parser for Go. */ private parseGoRegex; /** * Create file index from parsed chunks. */ private createFileIndex; finalize(ctx: IndexContext): Promise; search(query: string, ctx: SearchContext, options?: SearchOptions): Promise; }