UNPKG

@toponextech/smartembed-mcp-server

Version:

MCP server for intelligent embedded development with PlatformIO - AI-powered project creation, error diagnosis, and device detection

90 lines 2.52 kB
/** * Context-Aware Suggestion Generator for SmartEmbed * Provides intelligent suggestions based on current project state */ import { ParsedDevice, DeviceIdentification } from '../parsers/device-parser.js'; import { BestPractice } from '../knowledge/best-practices-kb.js'; export interface ProjectContext { board?: string; framework?: string; libraries?: string[]; features?: string[]; errors?: string[]; currentStage?: ProjectStage; hasWifi?: boolean; hasBluetooth?: boolean; hasSensors?: boolean; fileStructure?: string[]; } export declare enum ProjectStage { INITIAL_SETUP = "initial_setup", DEVELOPMENT = "development", TESTING = "testing", OPTIMIZATION = "optimization", DEPLOYMENT = "deployment" } export interface ContextualSuggestion { type: SuggestionType; priority: SuggestionPriority; title: string; description: string; actions?: string[]; codeSnippet?: string; relatedPractices?: BestPractice[]; tags: string[]; } export declare enum SuggestionType { SETUP = "setup", CONFIGURATION = "configuration", OPTIMIZATION = "optimization", DEBUG = "debug", FEATURE = "feature", LIBRARY = "library", BEST_PRACTICE = "best_practice", WARNING = "warning" } export declare enum SuggestionPriority { CRITICAL = "critical", HIGH = "high", MEDIUM = "medium", LOW = "low" } export declare class ContextSuggestionGenerator { /** * Generate suggestions based on device identification */ generateDeviceSuggestions(device: ParsedDevice, identification: DeviceIdentification): ContextualSuggestion[]; /** * Generate suggestions based on project context */ generateProjectSuggestions(context: ProjectContext): ContextualSuggestion[]; /** * Get setup stage suggestions */ private getSetupSuggestions; /** * Get development stage suggestions */ private getDevelopmentSuggestions; /** * Get optimization suggestions */ private getOptimizationSuggestions; /** * Get WiFi-related suggestions */ private getWifiSuggestions; /** * Get sensor-related suggestions */ private getSensorSuggestions; /** * Get error-based suggestions */ private getErrorSuggestions; /** * Generate next step suggestions */ generateNextSteps(context: ProjectContext): ContextualSuggestion[]; } //# sourceMappingURL=context-suggestion-generator.d.ts.map