il2cpp-dump-analyzer-mcp
Version:
Agentic RAG system for analyzing IL2CPP dump.cs files from Unity games
96 lines (95 loc) • 2.65 kB
TypeScript
import { Document } from '@langchain/core/documents';
import { Embeddings } from '@langchain/core/embeddings';
import { CodeChunk } from '../embeddings/chunker';
/**
* Enhanced search options
*/
export interface EnhancedSearchOptions {
/** Number of results to return */
k?: number;
/** Minimum similarity threshold */
threshold?: number;
/** Metadata filters */
filters?: Record<string, any>;
/** Enable hybrid search (vector + text) */
hybridSearch?: boolean;
/** Text search weight (for hybrid search) */
textWeight?: number;
/** Vector search weight (for hybrid search) */
vectorWeight?: number;
/** Cache results */
useCache?: boolean;
/** Cache TTL in milliseconds */
cacheTtlMs?: number;
}
/**
* Search result with enhanced metadata
*/
export interface EnhancedSearchResult {
document: Document;
similarity: number;
textScore?: number;
combinedScore?: number;
cached: boolean;
}
/**
* Enhanced Supabase vector store with performance optimizations,
* connection pooling, retry logic, and advanced search capabilities
*/
export declare class EnhancedSupabaseVectorStore {
private embeddings;
private tableName;
private connectionManager;
private retryManager;
private circuitBreaker;
private performanceMonitor;
private dimensions;
private isInitialized;
constructor(embeddings: Embeddings, tableName?: string);
/**
* Initialize the vector store
*/
initialize(): Promise<void>;
/**
* Add documents to the vector store with enhanced error handling
*/
addDocuments(documents: Document[]): Promise<void>;
/**
* Enhanced similarity search with caching and performance monitoring
*/
similaritySearch(query: string, options?: EnhancedSearchOptions): Promise<EnhancedSearchResult[]>;
/**
* Add code chunks with metadata enhancement
*/
addCodeChunks(chunks: CodeChunk[]): Promise<void>;
/**
* Get database statistics and health information
*/
getHealthStatus(): Promise<{
isHealthy: boolean;
connectionStats: any;
performanceStats: any;
cacheStats: any;
circuitBreakerStats: any;
}>;
/**
* Generate document hash for deduplication
*/
private generateDocumentHash;
/**
* Generate cache key for search operations
*/
private generateCacheKey;
/**
* Clear all caches
*/
clearCache(): void;
/**
* Export performance metrics
*/
exportMetrics(): string;
/**
* Cleanup resources
*/
cleanup(): Promise<void>;
}