mushcode-mcp-server
Version:
A specialized Model Context Protocol server for MUSHCODE development assistance. Provides AI-powered code generation, validation, optimization, and examples for MUD development.
115 lines • 2.83 kB
TypeScript
/**
* MUSHCODE code explanation engine
*/
import { MushcodeKnowledgeBase } from '../knowledge/base.js';
export interface ExplanationRequest {
code: string;
detailLevel: 'basic' | 'intermediate' | 'advanced';
focusAreas?: string[];
serverType?: string;
includeExamples?: boolean;
}
export interface CodeSection {
lineNumber: number;
code: string;
explanation: string;
concepts: string[];
complexity: 'simple' | 'moderate' | 'complex';
functions?: string[];
securityNotes?: string[];
}
export interface ExplanationResult {
explanation: string;
codeBreakdown: CodeSection[];
conceptsUsed: string[];
relatedExamples: string[];
difficultyLevel: string;
learningResources?: string[];
securityConsiderations?: string[];
performanceNotes?: string[];
}
export declare class MushcodeExplainer {
private knowledgeBase;
constructor(knowledgeBase: MushcodeKnowledgeBase);
/**
* Explain MUSHCODE functionality
*/
explain(request: ExplanationRequest): Promise<ExplanationResult>;
/**
* Validate the explanation request
*/
private validateRequest;
/**
* Parse code into logical sections
*/
private parseCodeSections;
/**
* Analyze each code section
*/
private analyzeCodeSections;
/**
* Analyze a single code section
*/
private analyzeCodeSection;
/**
* Identify MUSHCODE functions in code
*/
private identifyFunctions;
/**
* Identify MUSHCODE concepts in code
*/
private identifyConcepts;
/**
* Check for security considerations
*/
private checkSecurity;
/**
* Generate explanation for a code section
*/
private generateSectionExplanation;
/**
* Get explanations for functions
*/
private getFunctionExplanations;
/**
* Get explanations for concepts
*/
private getConceptExplanations;
/**
* Get explanations for specific focus areas
*/
private getFocusAreaExplanations;
/**
* Determine complexity of a code section
*/
private determineComplexity;
/**
* Generate overall explanation
*/
private generateOverallExplanation;
/**
* Extract all concepts used in the code
*/
private extractConcepts;
/**
* Find related examples
*/
private findRelatedExamples;
/**
* Determine overall difficulty level
*/
private determineDifficultyLevel;
/**
* Generate learning resources
*/
private generateLearningResources;
/**
* Extract security considerations
*/
private extractSecurityConsiderations;
/**
* Extract performance notes
*/
private extractPerformanceNotes;
}
//# sourceMappingURL=explainer.d.ts.map