/** * License utilities: file reading, SPDX detection, normalization, compatibility. * This module has NO dependencies on providers or backend to avoid circular dependencies. */ /** * Find LICENSE file path in the same directory as the manifest. * @param {string} manifestPath * @returns {string|null} - path to LICENSE file or null if not found */ export declare function findLicenseFilePath(manifestPath: string): string | null; /** * Very simple SPDX detection from common license text (first ~500 chars). * @param {string} text * @returns {string|null} */ export declare function detectSpdxFromText(text: string): string | null; /** * Read LICENSE file and detect SPDX identifier. * @param {string} manifestPath - path to manifest * @returns {string|null} - SPDX identifier from LICENSE file or null */ export declare function readLicenseFile(manifestPath: string): string | null; /** * Get project license from manifest or LICENSE file. * Returns manifestLicense if provided, otherwise tries LICENSE file. * @param {string|null} manifestLicense - license from manifest (or null) * @param {string} manifestPath - path to manifest * @returns {string|null} - SPDX identifier or null */ export declare function getLicense(manifestLicense: string | null, manifestPath: string): string | null; /** * Normalize SPDX identifier for comparison (lowercase, strip common suffixes). * @param {string} spdxOrName * @returns {string} */ export declare function normalizeSpdx(spdxOrName: string): string; /** * Check if a dependency's license is compatible with the project license based on backend categories. * * @param {string} [projectCategory] - backend category for project license: PERMISSIVE | WEAK_COPYLEFT | STRONG_COPYLEFT | UNKNOWN * @param {string} [dependencyCategory] - backend category for dependency license: PERMISSIVE | WEAK_COPYLEFT | STRONG_COPYLEFT | UNKNOWN * @returns {'compatible'|'incompatible'|'unknown'} */ export declare function getCompatibility(projectCategory?: string, dependencyCategory?: string): 'compatible' | 'incompatible' | 'unknown';