UNPKG

@bonginkan/maria

Version:

MARIA OS v5.9.5 – Self-Evolving Organizational Intelligence OS | Speed Improvement Phase 3: LLM Optimization + Command Refactoring | Performance Measurement + Run Evidence System | Zero ESLint/TypeScript Errors | 人とAIが役割を持ち、学び、進化し続けるための仕事のOS | GraphRAG ×

86 lines (85 loc) 2.54 kB
/** * Filename Inference Service * Intelligently infers appropriate filenames from user intent and code content */ import { BaseService } from '../base/BaseService.js'; import type { FilenameResult, ProjectContext, FilenameInferenceOptions } from './types/filename-inference.types.js'; /** * Main service for intelligent filename inference */ export declare class FilenameInferenceService extends BaseService { id: string; version: string; private explicitAnalyzer; private contextualAnalyzer; private semanticAnalyzer; private extensionDetector; private config; constructor(options?: FilenameInferenceOptions); /** * Infer the best filename based on user input and generated code */ inferFilename(userInput: string, generatedCode: string, projectContext?: ProjectContext): Promise<FilenameResult>; /** * Intelligently organize file into appropriate directory */ determineDirectory(filename: string, code: string, projectContext?: ProjectContext): Promise<string>; /** * Track relationships between files */ trackFileRelationship(newFile: string, relatedFiles: string[], relationship: 'imports' | 'exports' | 'tests' | 'styles' | 'documentation'): Promise<void>; /** * Select the best candidate from multiple options */ private selectBestCandidate; /** * Apply project naming conventions */ private applyConventions; /** * Ensure filename is unique in target directory */ private ensureUniqueFilename; /** * Check if file exists */ private fileExists; /** * Ensure directory exists */ private ensureDirectoryExists; /** * Create result object */ private createResult; /** * Get lightweight service statistics (used by UX layer) */ getStats(): { id: string; version: string; confidenceThreshold: number; }; /** * Clear caches (best-effort) */ clearCache(): void; private toKebabCase; private toCamelCase; private toPascalCase; private toSnakeCase; /** * Learn from user corrections */ learnFromCorrection(originalFilename: string, correctedFilename: string, context: string): Promise<void>; /** * Extract learning pattern from correction */ private extractPattern; /** * Detect naming pattern change */ private detectNamingPattern; initialize(): Promise<void>; } export default FilenameInferenceService;