/** * Human-readable + JSON renderers for preflight results. */ import type { DiffResult } from './diff.js'; import type { ScoreResult } from './score.js'; export type PreflightStatus = 'FRESH' | 'STALE' | 'ERROR'; export interface PerFileEntry { filePath: string; weight: number; hub: boolean; /** Highest fan-in across nodes in the file (for "why is this a hub"). */ maxFanIn: number; /** True if the file isn't represented in the graph at all. */ unknown: boolean; } export interface PreflightSummary { status: PreflightStatus; graphBuiltAt: string | null; graphCommit: string | null; workingCommit: string | null; changedFiles: string[]; unknownFiles: string[]; /** Per-file detail with weight + hub flag. Same order as `changedFiles`. */ perFile: PerFileEntry[]; hubCount: number; leafCount: number; stalenessScore: number; threshold: number; mechanism: 'git' | 'mtime'; warnings: string[]; message: string; } export interface BuildSummaryInput { diff: DiffResult; score: ScoreResult; graphBuiltAt: string | null; graphCommit: string | null; threshold: number; } export declare function buildSummary(input: BuildSummaryInput): PreflightSummary; export declare function renderHuman(s: PreflightSummary): string; /** * Emit GitHub Actions workflow-command annotations so that stale files * appear inline in the PR diff UI when this runs in CI. No-op outside of * GHA. Format docs: * https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions */ export declare function renderGithubAnnotations(s: PreflightSummary): string; export declare function renderJson(s: PreflightSummary): string; //# sourceMappingURL=report.d.ts.map