/**
 * Digest summary types — the aggregated trend shape a scheduled sweep
 * formats and delivers.
 *
 * These live in the domain kernel (not in `packages/eval`) so the
 * notification port (`ports/notification.ts`) can describe a digest payload
 * without core depending on eval. The eval digest *engine*
 * (`packages/eval/src/schedules/digest.ts`) computes and re-exports these
 * shapes; the dependency flows inward only (D0002 / D0045).
 */
/** Trend direction for a feature area or overall score. */
export type TrendDirection = "improving" | "regressing" | "stable";
/** Trend analysis for a single feature area. */
export interface AreaTrend {
    /** Feature area name */
    area: string;
    /** Score at the start of the window */
    firstScore: number;
    /** Score at the end of the window */
    lastScore: number;
    /** Number of data points in the window */
    reportCount: number;
    /** Net score change (last - first) */
    scoreDelta: number;
    /** Trend direction */
    trend: TrendDirection;
}
/** The complete digest summary. */
export interface DigestSummary {
    /** Per-area trend breakdown */
    areaTrends: AreaTrend[];
    /** Areas that improved by more than the noise threshold */
    improved: string[];
    /** End of the lookback window (usually "now") */
    lookbackEnd: string;
    /** Start of the lookback window */
    lookbackStart: string;
    /** Overall score delta across the window */
    overallDelta: number;
    /** Overall score at the end of the window */
    overallLatest: number;
    /** Overall trend direction */
    overallTrend: TrendDirection;
    /** Areas that regressed by more than the noise threshold */
    regressed: string[];
    /** Total number of reports in the window */
    reportCount: number;
    /** Areas with score changes within the noise threshold */
    stable: string[];
    /**
     * Fresh evaluation spend in the window (if available). Excludes reports
     * served from the remote cache, whose cost was inherited from a source run
     * (often outside the window) rather than spent this period — see
     * `cachedReportCount` (W-cache-provenance-notifications).
     */
    totalCost?: number;
    /**
     * Number of reports in the window whose cost was excluded from `totalCost`
     * because they were served (fully or partially) from the remote cache.
     * Drives a "excludes N cache-served run(s)" footnote on the digest.
     */
    cachedReportCount?: number;
}
