/** * @nahisaho/musubix-codegraph - GraphRAG Search * * Graph-based retrieval augmented generation search * * @see REQ-CG-RAG-001 - Community detection * @see REQ-CG-RAG-002 - Global search * @see REQ-CG-RAG-003 - Local search * @see DES-CG-005 * @see TSK-CG-040 */ import type { SearchResult, Community, GraphRAGOptions, GlobalSearchOptions, LocalSearchOptions } from '../types.js'; import type { GraphEngine } from '../graph/index.js'; /** * GraphRAG Search Engine * * Implements Microsoft's GraphRAG approach for code understanding: * - Community detection via Leiden algorithm * - Hierarchical summaries for global queries * - Local context retrieval for specific queries */ export declare class GraphRAGSearch { private graph; private _options; private communities; private entityCommunityMap; constructor(graph: GraphEngine, options?: Partial); /** * Get current options */ getOptions(): Required; /** * Detect communities in the code graph * * Uses a simplified Leiden-inspired algorithm for code communities */ detectCommunities(): Promise; /** * Generate community summary */ generateCommunitySummary(communityId: string): Promise; /** * Global search across all communities * * Searches community summaries for high-level understanding */ globalSearch(query: string, options?: GlobalSearchOptions): Promise; /** * Local search in entity neighborhood * * Searches within a specific entity's local context */ localSearch(entityName: string, options?: LocalSearchOptions): Promise; /** * Collect neighbors within radius */ private collectNeighbors; /** * Get all communities */ getCommunities(): Community[]; /** * Get community for entity */ getCommunityForEntity(entityId: string): Community | undefined; } //# sourceMappingURL=graphrag-search.d.ts.map