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.
86 lines • 2.21 kB
TypeScript
/**
* MUSHCODE code generation engine
*/
import { MushcodeKnowledgeBase } from '../knowledge/base.js';
export interface GenerationRequest {
description: string;
serverType?: string | undefined;
functionType?: string | undefined;
parameters?: string[] | undefined;
securityLevel?: string | undefined;
includeComments?: boolean | undefined;
}
export interface GenerationResult {
code: string;
explanation: string;
usageExample: string;
compatibility: string[];
securityNotes?: string | undefined;
patternUsed?: string | undefined;
warnings?: string[] | undefined;
}
export declare class MushcodeGenerator {
private knowledgeBase;
constructor(knowledgeBase: MushcodeKnowledgeBase);
/**
* Generate MUSHCODE based on user specifications
*/
generate(request: GenerationRequest): Promise<GenerationResult>;
/**
* Validate the generation request
*/
private validateRequest;
/**
* Find the best matching pattern for the request
*/
private findBestPattern;
/**
* Select the best pattern from search results
*/
private selectBestPattern;
/**
* Generate code from pattern and request
*/
private generateCode;
/**
* Add explanatory comments to the code
*/
private addComments;
/**
* Apply security considerations to the generated code
*/
private applySecurityConsiderations;
/**
* Generate permission check code
*/
private generatePermissionCheck;
/**
* Generate input validation code
*/
private generateInputValidation;
/**
* Generate explanation for the code
*/
private generateExplanation;
/**
* Get description for security level
*/
private getSecurityLevelDescription;
/**
* Generate usage example
*/
private generateUsageExample;
/**
* Determine server compatibility
*/
private determineCompatibility;
/**
* Generate security notes
*/
private generateSecurityNotes;
/**
* Generate warnings for potential issues
*/
private generateWarnings;
}
//# sourceMappingURL=generator.d.ts.map