UNPKG

mcp-adr-analysis-server

Version:

MCP server for analyzing Architectural Decision Records and project architecture

86 lines 2.18 kB
/** * Platform Detector * * Automatically detects which platforms and technologies a project uses * by analyzing project files, dependencies, and configurations. * * This enables automatic selection of appropriate validated patterns. */ import { PlatformType } from './validated-pattern-definitions.js'; /** * Platform detection result with confidence scores */ export interface PlatformDetectionResult { detectedPlatforms: DetectedPlatform[]; primaryPlatform: PlatformType | null; confidence: number; evidence: Evidence[]; recommendations: string[]; } /** * Individual detected platform with metadata */ export interface DetectedPlatform { type: PlatformType; confidence: number; indicators: string[]; version?: string; } /** * Evidence for platform detection */ export interface Evidence { file: string; indicator: string; platforms: PlatformType[]; weight: number; } /** * Platform Detector class */ export declare class PlatformDetector { private projectPath; private evidence; constructor(projectPath: string); /** * Detect all platforms used by the project */ detectPlatforms(): Promise<PlatformDetectionResult>; /** * Check a specific platform indicator */ private checkIndicator; /** * Check if file exists */ private checkFileExists; /** * Check file content for pattern */ private checkFileContent; /** * Check if dependency exists in package.json or requirements.txt */ private checkDependency; /** * Find files matching pattern */ private findFiles; /** * Calculate confidence scores for each platform */ private calculatePlatformScores; /** * Generate recommendations based on detected platforms */ private generateRecommendations; /** * Detect which pattern files are missing for a platform */ private detectMissingPatternFiles; } /** * Helper function to detect platforms */ export declare function detectPlatforms(projectPath: string): Promise<PlatformDetectionResult>; //# sourceMappingURL=platform-detector.d.ts.map