/**
 * Layer 3: Package Hallucination Check (Story C - Hallucination Firewall)
 *
 * Verifies if imported packages actually exist and assesses their risk
 * Prevents typosquatting, dependency confusion, and AI-hallucinated packages
 *
 * Features:
 * - Registry metadata fetching (npm, PyPI)
 * - Risk score calculation based on multiple factors
 * - Typosquatting detection via Levenshtein distance
 * - Package age and popularity analysis
 */
import type { Vulnerability, VulnerabilitySeverity } from '../types';
import { type NPMPackageMetadata, type PyPIPackageMetadata, type ExtractedDependency } from '../utils/registry-clients';
declare const POPULAR_NPM_PACKAGES: Set<string>;
declare const POPULAR_PYTHON_PACKAGES: Set<string>;
declare const LEGITIMATE_PACKAGES: Set<string>;
interface RiskFactor {
    name: string;
    score: number;
    description: string;
}
interface DependencyRiskScore {
    package: string;
    ecosystem: 'npm' | 'python';
    totalScore: number;
    factors: RiskFactor[];
    recommendation: 'allow' | 'review' | 'block';
    severity: VulnerabilitySeverity;
}
/**
 * Calculate Levenshtein distance between two strings
 */
declare function levenshteinDistance(a: string, b: string): number;
/**
 * Check if package name is similar to a popular package (potential typosquat)
 */
declare function checkTyposquatting(packageName: string, ecosystem: 'npm' | 'python'): {
    isSimilar: boolean;
    similarTo?: string;
    distance?: number;
};
/**
 * Check for suspicious naming patterns
 */
declare function hasSuspiciousNamingPattern(packageName: string): {
    suspicious: boolean;
    pattern?: string;
};
/**
 * Compute risk score for an npm package
 */
declare function computeNPMRiskScore(dep: ExtractedDependency, metadata: NPMPackageMetadata | null): Promise<DependencyRiskScore>;
/**
 * Compute risk score for a Python package
 */
declare function computePyPIRiskScore(dep: ExtractedDependency, metadata: PyPIPackageMetadata | null): Promise<DependencyRiskScore>;
/**
 * Check packages in a file for hallucination and risk indicators
 */
export declare function checkPackages(content: string, filePath: string): Promise<Vulnerability[]>;
export { levenshteinDistance, checkTyposquatting, hasSuspiciousNamingPattern, computeNPMRiskScore, computePyPIRiskScore, POPULAR_NPM_PACKAGES, POPULAR_PYTHON_PACKAGES, LEGITIMATE_PACKAGES, };
//# sourceMappingURL=package-check.d.ts.map