import type { CommitRecord } from '../parsers/log-parser.js'; import type { FileChangeRecord } from '../parsers/numstat-parser.js'; export interface BusFactorResult { scope: string; busFactor: number; topAuthors: { name: string; weightedCommits: number; }[]; } export interface SinglePointRisk { filePath: string; soleAuthor: string; totalChanges: number; authorPercentage: number; firstSeen: string; lastSeen: string; spanMonths: number; } export interface BusFactorData { overall: BusFactorResult; perDirectory: Map; singlePointRisks: SinglePointRisk[]; } /** * Analyze bus factor for the repository. * * @param commits - Parsed commit records (author identity resolved via .mailmap through %aN/%aE) * @param fileChanges - Parsed file change records * @param referenceDate - The --until date or current system time * @param scope - Optional path-scope filter; only file changes inside this * directory contribute to per-directory bus factors and * single-point risks. Overall bus factor uses commits as-is * because commit-level scoping is already applied upstream by * the git command builders. */ export declare function analyzeBusFactor(commits: CommitRecord[], fileChanges: FileChangeRecord[], referenceDate: Date, scope?: string): BusFactorData; //# sourceMappingURL=bus-factor.d.ts.map