import { FrameworkInfo, TestingInfo } from '../../models'; /** * Stack summary for a project. */ interface StackSummary { /** Frontend framework IDs */ frontend: string[]; /** Backend framework IDs */ backend: string[]; /** Testing framework IDs */ testing: string[]; /** Build tool IDs */ build: string[]; /** Type system IDs */ typeSystem: string[]; /** Linting tool IDs */ linting: string[]; } /** * Framework identification result. */ interface FrameworkIdentification { /** Primary framework (highest confidence) */ primary?: FrameworkInfo; /** Frontend frameworks */ frontend: FrameworkInfo[]; /** Backend frameworks */ backend: FrameworkInfo[]; /** Testing frameworks */ testing: TestingInfo[]; /** Meta-frameworks (Next.js, Nuxt, etc.) */ metaFrameworks: FrameworkInfo[]; /** Summary string (e.g., "React + Next.js with Jest") */ summary: string; /** Stack summary */ stack: StackSummary; } /** * Options for framework identification. */ interface IdentifyFrameworksOptions { /** Minimum confidence threshold (0-100) */ minConfidence?: number; /** Skip cache lookup (force fresh detection) */ skipCache?: boolean; } /** * Identify all frameworks in project. * * Runs all technology detectors and aggregates results into a comprehensive * framework identification with confidence scoring. * * @param projectPath - Project directory path * @param options - Identification options * @returns Framework identification result * * @example Identifying all frameworks in project * ```typescript * import { identifyFrameworks } from '@hyperfrontend/project-scope' * * const result = identifyFrameworks('./my-react-app') * console.log(result.summary) // 'React + Next.js with Jest' * console.log(result.primary?.name) // 'React' * console.log(result.stack.frontend) // ['react', 'nextjs'] * console.log(result.stack.testing) // ['jest'] * ``` */ declare function identifyFrameworks(projectPath: string, options?: IdentifyFrameworksOptions): FrameworkIdentification; /** * Clear the framework identification cache. * * Useful for testing or when the project files have changed. * * @example Clearing the framework cache * ```typescript * import { clearFrameworkIdentificationCache } from '@hyperfrontend/project-scope' * * // Reset cache before re-identifying frameworks * clearFrameworkIdentificationCache() * ``` */ declare function clearFrameworkIdentificationCache(): void; /** * Check if a project uses a specific framework. * * @param projectPath - Project directory path * @param frameworkId - Framework identifier to check * @param minConfidence - Minimum confidence threshold (default: 50) * @returns True if the framework is detected with sufficient confidence * * @example Checking for a specific framework * ```typescript * import { usesFramework } from '@hyperfrontend/project-scope' * * if (usesFramework('/path/to/project', 'react', 70)) { * console.log('Project uses React with high confidence') * } * ``` */ declare function usesFramework(projectPath: string, frameworkId: string, minConfidence?: number): boolean; export { clearFrameworkIdentificationCache, identifyFrameworks, usesFramework }; export type { FrameworkIdentification, IdentifyFrameworksOptions, StackSummary };