/** * Type definitions for Module ID Alias Resolution * * Provides interfaces for alias table structure and resolution results. */ /** * Single alias entry mapping an alias to its canonical module ID */ export interface AliasEntry { /** The canonical module ID in lexmap.policy.json */ canonical: string; /** Confidence score (1.0 for explicit aliases) */ confidence: number; /** Human-readable reason for the alias (e.g., "shorthand", "refactored 2025-10-15") */ reason?: string; } /** * Alias table structure loaded from aliases.json */ export interface AliasTable { /** Map of alias string to canonical module ID */ aliases: Record; } /** * Result of resolving a module ID through the alias system */ export interface AliasResolution { /** The canonical module ID to use (may be same as original if no alias found) */ canonical: string; /** Confidence score (1.0 for exact match or explicit alias, 0.0 for unknown) */ confidence: number; /** The original input string */ original: string; /** Source of the resolution */ source: "exact" | "alias" | "fuzzy" | "substring"; } /** * Options for module ID resolution */ export interface ResolverOptions { /** Disable substring matching (default: false) */ noSubstring?: boolean; /** Minimum substring length for matching (default: 3) */ minSubstringLength?: number; /** Maximum number of ambiguous matches to show in error (default: 5) */ maxAmbiguousMatches?: number; } /** * Error thrown when a substring matches multiple modules */ export declare class AmbiguousSubstringError extends Error { readonly substring: string; readonly matches: string[]; constructor(substring: string, matches: string[], maxShow?: number); } /** * Error thrown when no match is found for a module ID */ export declare class NoMatchFoundError extends Error { readonly moduleId: string; readonly suggestions: string[]; constructor(moduleId: string, suggestions?: string[]); }