UNPKG

@wildcard-ai/deepcodex

Version:

Advanced codebase indexing and semantic search MCP server

113 lines 3.58 kB
#!/usr/bin/env node /** * Standalone MCP Integration * Provides intelligent codebase indexing and search capabilities via Model Context Protocol. * Delegates to specialized services for file processing, namespace management, and search coordination. */ import { IndexingOrchestrator } from './core/indexing/IndexingOrchestrator.js'; import { IndexedCodebase } from './services/NamespaceManagerService.js'; import { CodeChunk } from './types/core.js'; import { McpConfig } from './services/ConfigurationService.js'; export declare class StandaloneCodexMcp { private config; indexingOrchestrator: IndexingOrchestrator; private languageDetector; private logger; private jinaApiService; private turbopufferService; private configurationService; private namespaceManagerService; private fileProcessingService; private searchCoordinationService; private symbolExtractor; private semanticSubChunker; constructor(config?: Partial<McpConfig>); /** * Index a codebase using the enhanced IndexingOrchestrator */ indexCodebase(codebasePath: string, forceReindex?: boolean): Promise<{ success: boolean; namespace: string; filesProcessed: number; chunksCreated: number; processingTimeMs: number; message: string; errors?: Array<{ file: string; error: string; }>; }>; /** * Hybrid search using SearchCoordinationService */ searchHybrid(codebasePath: string, query: string, options?: { limit?: number; vectorWeight?: number; bm25Weight?: number; fileTypes?: string[]; enableReranking?: boolean; }): Promise<{ success: boolean; results: any[]; searchTime: number; strategy: string; metadata: { vectorResults: number; bm25Results: number; totalMatches: number; reranked: boolean; }; }>; /** * BM25 search using SearchCoordinationService */ searchBM25(codebasePath: string, query: string, options?: { limit?: number; fileTypes?: string[]; offset?: number; enableReranking?: boolean; }): Promise<{ success: boolean; results: any[]; searchTime: number; strategy: string; }>; /** * Intelligent search using SearchCoordinationService */ searchWithIntelligence(query: string, codebasePath?: string, maxResults?: number): Promise<{ success: boolean; results: CodeChunk[]; totalResults: number; searchTimeMs: number; message: string; }>; /** * Get indexing status via NamespaceManagerService */ getIndexingStatus(codebasePath?: string): Promise<{ indexedCodebases: IndexedCodebase[]; currentCodebase?: IndexedCodebase; incrementalStats?: any; indexed: boolean; fileCount: number; }>; /** * Clear index via NamespaceManagerService */ clearIndex(codebasePath?: string): Promise<{ success: boolean; message: string; namespacesCleared: string[]; }>; /** * Extract relevant connection context using TreeSitterSymbolExtractorFull */ private extractConnectionContext; /** * Ensure the index is up-to-date by running hash-based incremental indexing before searches */ private ensureUpToDateIndex; initialize(): Promise<void>; } //# sourceMappingURL=standalone-mcp-integration.d.ts.map