UNPKG

il2cpp-dump-analyzer-mcp

Version:

Agentic RAG system for analyzing IL2CPP dump.cs files from Unity games

81 lines (80 loc) 2.73 kB
import { Document } from '@langchain/core/documents'; import { CodeChunk } from './chunker'; /** * Vector store for IL2CPP code chunks */ export declare class IL2CPPVectorStore { private vectorStore; private embeddings; private useSupabase; private documentHashes; private hashesFilePath; constructor(model?: string); /** * Load document hashes from file */ private loadDocumentHashes; /** * Save document hashes to file */ private saveDocumentHashes; /** * Generate a unique hash for a document based on its content and metadata * @param document Document to generate hash for * @returns SHA-256 hash of the document content and metadata */ private generateDocumentHash; /** * Add documents to the vector store * @param documents Array of documents to add */ addDocuments(documents: Document[]): Promise<void>; /** * Add code chunks to the vector store * @param chunks Array of code chunks to add */ addCodeChunks(chunks: CodeChunk[]): Promise<void>; /** * Search for similar documents based on a query string * @param query Query string * @param k Number of results to return * @returns Array of documents with similarity scores */ similaritySearch(query: string, k?: number): Promise<Document[]>; /** * Search for similar documents based on a query string with scores * @param query Query string * @param k Number of results to return * @returns Array of documents with similarity scores */ similaritySearchWithScore(query: string, k?: number): Promise<[Document, number][]>; /** * Search for similar documents based on a vector * @param embedding Embedding vector * @param k Number of results to return * @returns Array of documents with similarity scores */ similaritySearchVectorWithScore(embedding: number[], k?: number): Promise<[Document, number][]>; /** * Filter search results based on metadata * @param query Query string * @param filter Metadata filter * @param k Number of results to return * @returns Array of documents matching the filter */ searchWithFilter(query: string, filter: Record<string, any>, k?: number): Promise<Document[]>; /** * Get the total number of documents in the vector store * @returns Number of documents */ getDocumentCount(): Promise<number>; /** * Delete all documents from the vector store */ deleteAll(): Promise<void>; /** * Check if the vector store is using Supabase * @returns True if using Supabase, false otherwise */ isUsingSupabase(): boolean; }