UNPKG

il2cpp-dump-analyzer-mcp

Version:

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

57 lines (56 loc) 2.01 kB
import { IL2CPPClass, IL2CPPEnum, IL2CPPInterface, IL2CPPMethod } from '../parser/enhanced-types'; /** * Specialized chunker for IL2CPP code that preserves semantic meaning * Enhanced with IL2CPP-specific optimizations for better RAG performance */ export declare class IL2CPPCodeChunker { private readonly chunkSize; private readonly chunkOverlap; private readonly methodChunkSize; private readonly methodChunkOverlap; private splitter; private methodSplitter; constructor(chunkSize?: number, chunkOverlap?: number, methodChunkSize?: number, methodChunkOverlap?: number); /** * Create chunks from a class definition * @param classEntity IL2CPP class entity * @returns Array of chunks with metadata */ chunkClass(classEntity: IL2CPPClass): Promise<CodeChunk[]>; /** * Create chunks from a method definition * @param methodEntity IL2CPP method entity * @param parentClass Parent class of the method * @returns Array of chunks with metadata */ chunkMethod(methodEntity: IL2CPPMethod, parentClass: IL2CPPClass): Promise<CodeChunk[]>; /** * Create chunks from an enum definition * @param enumEntity IL2CPP enum entity * @returns Array of chunks with metadata */ chunkEnum(enumEntity: IL2CPPEnum): Promise<CodeChunk[]>; /** * Create chunks from an interface definition * @param interfaceEntity IL2CPP interface entity * @returns Array of chunks with metadata */ chunkInterface(interfaceEntity: IL2CPPInterface): Promise<CodeChunk[]>; private formatClassDefinition; private formatMethodSignature; private formatEnumDefinition; private formatInterfaceDefinition; } /** * Represents a chunk of code with metadata */ export interface CodeChunk { text: string; metadata: { type: 'class' | 'method' | 'enum' | 'interface'; name: string; namespace?: string; fullName: string; [key: string]: any; }; }