/** * Calculate quality metrics from lens commands */ import type { PackageCommand, QualityMetrics, LensOperation, ConfigFile } from '../types/layer-types'; import { type LensReadiness } from '@principal-ai/codebase-quality-lenses'; import { type Ecosystem, type PackageData, type ToolAvailability, type InstallInstruction } from '../strategies'; interface DetectedLens { lensId: string; operations: Set; } export declare class QualityMetricsCalculator { /** * Detect lens commands from package commands */ static detectLensCommands(commands: PackageCommand[]): Map; /** * Detect lens ID from script content using patterns * The script content is stored in the description field */ private static detectLensFromScriptContent; /** * Apply fallback detection for common script patterns */ private static applyFallbackDetection; /** * Calculate quality metrics from detected lenses * @param detectedLenses - Map of detected lens IDs to lens info * @param lensScores - Optional map of lens IDs to real quality scores (0-100) * @returns Partial quality metrics hexagon with scores for available lenses */ static calculateMetrics(detectedLenses: Map, lensScores?: Map): Partial; /** * Get list of available lenses */ static getAvailableLenses(detectedLenses: Map): string[]; /** * Get list of missing standard lenses */ static getMissingLenses(detectedLenses: Map): string[]; /** * Full calculation - convenience method * @param commands - Package commands to analyze * @param lensScores - Optional map of lens IDs to real quality scores (0-100) * @returns Quality profile with hexagon, available lenses, and missing lenses */ static calculateQualityProfile(commands: PackageCommand[], lensScores?: Map): { hexagon: Partial; availableLenses: string[]; missingLenses: string[]; }; /** * Extended lens readiness result with ecosystem-aware install instructions */ static calculateLensReadiness(packageType: 'package' | 'node' | 'python' | 'cargo' | 'go', packageData: PackageData, configFiles: Record, lensIds?: string[]): Record; /** * Get install instructions for a tool in a specific ecosystem */ static getToolInstallInstructions(toolId: string, packageType: 'package' | 'node' | 'python' | 'cargo' | 'go', packageManager?: string): InstallInstruction; /** * Check if a tool is available in a package using ecosystem-specific detection */ static checkToolAvailability(toolId: string, packageType: 'package' | 'node' | 'python' | 'cargo' | 'go', packageData: PackageData, configFiles: Record): ToolAvailability; /** * Get the default command to run a tool */ static getToolDefaultCommand(toolId: string, packageType: 'package' | 'node' | 'python' | 'cargo' | 'go'): string; } /** * Extended lens readiness with ecosystem-specific information */ export interface LensReadinessExtended extends LensReadiness { /** The ecosystem this tool belongs to */ ecosystem: Ecosystem; /** Detailed tool availability information */ toolAvailability: ToolAvailability; /** Ecosystem-appropriate install instructions */ installInstructions: InstallInstruction; /** Default command to run the tool */ defaultCommand: string; /** Whether this is a built-in toolchain tool */ isToolchainTool: boolean; } export {}; //# sourceMappingURL=QualityMetricsCalculator.d.ts.map