/** * badge-health.ts — Heartbeat Badge status computation * * Red Team Fix #9: Dynamic badge that reflects real-time verification * activity. Prevents frameworks from passing conformance once and then * silently removing the integration while keeping the badge. * * The badge color is computed from trailing 7-day run statistics. */ /** Badge color enum for rendering. */ export type BadgeColor = 'green' | 'yellow' | 'gray' | 'red'; /** Input statistics for badge computation. */ export interface BadgeStats { /** Number of verification runs in the last 7 days. */ runs_7d: number; /** Number of policy violations in the last 7 days. */ violations_7d: number; /** ISO 8601 timestamp of the most recent run. */ last_run_at: string; } /** Computed badge status. */ export interface BadgeStatus { /** Badge color for rendering. */ color: BadgeColor; /** Human-readable label. */ label: string; /** Whether the badge represents a healthy integration. */ healthy: boolean; } /** * Compute the badge status from trailing 7-day run statistics. * * Color logic: * - Green: runs_7d >= 10 AND violations_7d == 0 * - Yellow: runs_7d >= 10 AND violations_7d > 0 (but within 10%) * - Gray: runs_7d < 10 (insufficient recent activity) * - Red: violations_7d > runs_7d * 0.1 (>10% violation rate) */ export declare function computeBadgeStatus(stats: BadgeStats): BadgeStatus; //# sourceMappingURL=badge-health.d.ts.map