UNPKG

vibe-coder-mcp

Version:

Production-ready MCP server with complete agent integration, multi-transport support, and comprehensive development automation tools for AI-assisted workflows.

192 lines (191 loc) 7 kB
export const DEFAULT_ENHANCEMENT_CONFIG = { enableOptimizations: true, maxOptimizationLevel: 'maximum', universalOptimization: { eliminateVerboseDiagrams: true, reduceClassDetails: true, consolidateRepetitiveContent: true, focusOnPublicInterfaces: true, adaptiveOptimization: true }, patternConsolidation: { enabled: true, maxComponentsShown: 3, groupArchitecturalPatterns: true, groupFunctionPatterns: true, consolidationThreshold: 3 }, qualityThresholds: { minSemanticCompleteness: 90, minArchitecturalIntegrity: 95, maxInformationLoss: 15 }, pathCompression: { enabled: true, maxAbbreviationLength: 3, preserveImportantSegments: true }, functionCompression: { enabled: true, compressTypeNames: true, compressParameterNames: true }, semanticCompression: { enabled: true, removeRedundantPhrases: true, compressDescriptions: true }, contentDensity: { enabled: true, importanceThreshold: 6.0, maxContentLength: 0, layeredDetailLevels: 'aggressive', fileImportanceScoring: true } }; export const QUALITY_FIRST_PRESETS = { conservative: { maxOptimizationLevel: 'conservative', qualityThresholds: { minSemanticCompleteness: 98, minArchitecturalIntegrity: 99, maxInformationLoss: 5 }, universalOptimization: { eliminateVerboseDiagrams: false, reduceClassDetails: false, consolidateRepetitiveContent: true, focusOnPublicInterfaces: false, adaptiveOptimization: false }, contentDensity: { enabled: true, importanceThreshold: 7.0, maxContentLength: 120, layeredDetailLevels: 'standard', fileImportanceScoring: true } }, balanced: { maxOptimizationLevel: 'balanced', qualityThresholds: { minSemanticCompleteness: 95, minArchitecturalIntegrity: 97, maxInformationLoss: 8 }, universalOptimization: { eliminateVerboseDiagrams: true, reduceClassDetails: true, consolidateRepetitiveContent: true, focusOnPublicInterfaces: true, adaptiveOptimization: true }, contentDensity: { enabled: true, importanceThreshold: 5.0, maxContentLength: 80, layeredDetailLevels: 'moderate', fileImportanceScoring: true } }, maximum: { maxOptimizationLevel: 'maximum', qualityThresholds: { minSemanticCompleteness: 90, minArchitecturalIntegrity: 95, maxInformationLoss: 15 }, universalOptimization: { eliminateVerboseDiagrams: true, reduceClassDetails: true, consolidateRepetitiveContent: true, focusOnPublicInterfaces: true, adaptiveOptimization: true }, patternConsolidation: { enabled: true, maxComponentsShown: 3, groupArchitecturalPatterns: true, groupFunctionPatterns: true, consolidationThreshold: 3 }, contentDensity: { enabled: true, importanceThreshold: 6.0, maxContentLength: 0, layeredDetailLevels: 'aggressive', fileImportanceScoring: true } } }; export class EnhancementConfigManager { static instance; config; constructor() { this.config = { ...DEFAULT_ENHANCEMENT_CONFIG }; this.applyPreset('maximum'); } static getInstance() { if (!EnhancementConfigManager.instance) { EnhancementConfigManager.instance = new EnhancementConfigManager(); } return EnhancementConfigManager.instance; } getConfig() { return { ...this.config }; } updateConfig(updates) { this.config = { ...this.config, ...updates }; } setOptimizationLevel(level) { const presetLevel = level === 'aggressive' ? 'maximum' : level; this.applyPreset(presetLevel); } applyPreset(preset) { const presetConfig = QUALITY_FIRST_PRESETS[preset]; this.config.maxOptimizationLevel = presetConfig.maxOptimizationLevel; this.config.qualityThresholds = { ...presetConfig.qualityThresholds }; this.config.universalOptimization = { ...presetConfig.universalOptimization }; this.config.contentDensity = { ...this.config.contentDensity, ...presetConfig.contentDensity }; if ('patternConsolidation' in presetConfig) { this.config.patternConsolidation = { ...presetConfig.patternConsolidation }; } } enableAggressiveOptimizations() { this.config.enableOptimizations = true; this.config.maxOptimizationLevel = 'maximum'; this.config.pathCompression.enabled = true; this.config.functionCompression.enabled = true; this.config.semanticCompression.enabled = true; this.config.contentDensity.enabled = true; this.config.contentDensity.importanceThreshold = 6.0; this.config.contentDensity.maxContentLength = 0; this.config.universalOptimization.eliminateVerboseDiagrams = true; this.config.universalOptimization.reduceClassDetails = true; this.config.universalOptimization.consolidateRepetitiveContent = true; this.config.universalOptimization.focusOnPublicInterfaces = true; this.config.universalOptimization.adaptiveOptimization = true; this.config.patternConsolidation.enabled = true; this.config.patternConsolidation.maxComponentsShown = 3; this.config.patternConsolidation.groupArchitecturalPatterns = true; this.config.patternConsolidation.groupFunctionPatterns = true; this.config.patternConsolidation.consolidationThreshold = 3; } disableOptimizations() { this.config.enableOptimizations = false; this.config.pathCompression.enabled = false; this.config.functionCompression.enabled = false; this.config.semanticCompression.enabled = false; this.config.contentDensity.enabled = false; this.config.universalOptimization.eliminateVerboseDiagrams = false; this.config.universalOptimization.reduceClassDetails = false; this.config.universalOptimization.consolidateRepetitiveContent = false; this.config.universalOptimization.focusOnPublicInterfaces = false; this.config.universalOptimization.adaptiveOptimization = false; this.config.patternConsolidation.enabled = false; } resetToDefaults() { this.config = { ...DEFAULT_ENHANCEMENT_CONFIG }; this.applyPreset('maximum'); } }