/** * TypeScript types for validation results and errors * * Used by module ID validation to report errors and suggestions */ export interface ModuleIdError { module: string; message: string; suggestions: string[]; } export declare class ModuleNotFoundError extends Error { readonly module: string; readonly suggestions: string[]; constructor(module: string, suggestions?: string[]); } export interface ValidationResult { valid: boolean; errors?: ModuleIdError[]; /** Canonical module IDs to store (after alias resolution). Only present when valid=true. */ canonical?: string[]; } /** * Result of module ID resolution (validation + auto-correction) */ export interface ResolutionResult { /** The resolved (potentially auto-corrected) module ID */ resolved: string; /** The original input module ID */ original: string; /** Confidence score (0-1) where 1.0 is exact match */ confidence: number; /** Whether auto-correction was applied */ corrected: boolean; /** Edit distance from original to resolved (0 for exact match) */ editDistance: number; /** Source of the resolution */ source?: "exact" | "alias" | "fuzzy" | "substring"; }