/** * Trust Score — evaluates npm packages for reliability and safety. * Used by evolve mode to rank plugin recommendations. * * Factors (max 108): * recency (25), popularity (25), quality (20), repository (15), * safety (15), provenance (8), dependency_risk (0 or -5 penalty) * * Levels (by percentage of 108): * 90%+ HIGH | 70-89% MEDIUM | 40-69% LOW | <40% RISKY */ export declare const MAX_TRUST_SCORE = 108; export interface PackageMetadata { name: string; version?: string; description?: string; license?: string; /** Whether npm provenance/attestation is available */ hasProvenance?: boolean; /** ISO date string of last publish */ lastPublished?: string; /** Weekly npm downloads */ weeklyDownloads?: number; /** GitHub stars (0 if no repo) */ stars?: number; /** GitHub repo URL */ repository?: string; /** Whether the package has a README */ hasReadme?: boolean; /** Number of maintainers */ maintainerCount?: number; /** Number of dependencies */ dependencyCount?: number; } export interface TrustScoreResult { score: number; level: "high" | "medium" | "low" | "risky"; factors: TrustFactor[]; summary: string; } export interface TrustFactor { name: string; score: number; maxScore: number; detail: string; } export declare function computeTrustScore(meta: PackageMetadata): TrustScoreResult; export declare function isTyposquatSuspect(name: string): boolean; /** Check if package name suggests high-privilege access (PTY, exec, shell, sudo) */ export declare function isHighPrivilege(name: string): boolean; /** * Format trust scores as a markdown table for evolve output. */ export declare function formatTrustTable(results: Array<{ meta: PackageMetadata; score: TrustScoreResult; }>): string;