/** * Project a run {@link SignalEnvelope} onto the attention-only result summary — * the 3-way unit counts + one item per unit that both the static render * (`result-to-view`) and the live done-body (`cli-live`) turn into the shared * `viewResultSummary` block. It lives in `contracts` (beside {@link deriveOutcome} * and {@link buildSignalEnvelope}) because the derivation is envelope SEMANTICS, * not styling: it yields DATA (label, outcome, a compact detail string), and the * UI layer owns the glyphs/tones. Keeping it here lets the engine live runners * (layer 4) and the cli composition root (layer 6) share one derivation without a * same-layer import. * * Granularity is UNIT-centric (one item per check/rule/scenario), so the count * line and bullets both count units and line up. A failing unit's detail is its * finding LOCATIONS (`file:line`); a faulted unit's detail is its runtime error * message (the check that threw, named). A run that faults at the RUN level (the * tool itself failing to load/parse) never reaches here — ADR-0060 makes that a * command-error before the envelope. */ import { type RunOutcome } from './run-outcome.js'; import type { SignalEnvelope, UnitResult } from './signal-envelope.js'; /** A unit's 3-way outcome: a per-unit `error` is a fault; otherwise pass/fail from `passed`. */ export declare function unitOutcome(unit: UnitResult): RunOutcome; /** One row of the attention list — the data a `viewResultSummary` bullet renders. */ export interface ResultSummaryItem { readonly label: string; readonly outcome: RunOutcome; readonly detail?: string; } /** * The attention-only projection of a run envelope: the 3-way unit counts * (passed/failed/faulted) plus one {@link ResultSummaryItem} per unit. Both the * static render and the live done-body turn this into the shared * `viewResultSummary` block. */ export interface EnvelopeResultSummary { readonly counts: { readonly passed: number; readonly failed: number; readonly faulted: number; }; readonly items: readonly ResultSummaryItem[]; } /** * Project the envelope onto {@link EnvelopeResultSummary}: 3-way unit counts and * one item per unit. Returns `undefined` when nothing needs attention (no failed * and no faulted units) — the caller keeps the compact headline-only surface. */ export declare function envelopeToResultSummary(envelope: SignalEnvelope): EnvelopeResultSummary | undefined; //# sourceMappingURL=result-summary.d.ts.map