/** A cited file location — either a bare path or a path with a line range. */ export type FindingFileRef = string | { path: string; line_start?: number; line_end?: number; }; /** * The fields the badge body renders — no `id`/`title`, so a projection that keys * its identity differently (e.g. the remediator's review item with `finding_id`) * still satisfies it without adapting. The shared `Finding` type satisfies it too. */ export interface FindingBadge { severity: string; confidence?: string; lens: string; summary?: string; affected_files?: ReadonlyArray; evidence?: readonly string[]; grounding?: { status: string; reason?: string; }; systemic?: boolean; impact?: string; likelihood?: string; } /** A badge plus the identity fields the full-block heading needs. */ export interface FindingDisplay extends FindingBadge { id: string; title: string; } export interface FindingDisplayOptions { /** Trim the file list to the first `maxFiles` + a `+N more` count. Default true. */ trimFiles?: boolean; /** Cap for `trimFiles`. Default 4. */ maxFiles?: number; /** Summarize evidence to a count + top item pointing at the JSON. Default true. */ summarizeEvidence?: boolean; /** Render the grounding line (always, even when no verdict). Default true. */ showGrounding?: boolean; /** * Render the advisory severity-color lines (`- Systemic` / `- Impact` / * `- Likelihood`). These orient a human reader but an implement worker never * acts on them, so a worker-dispatch view sets this false to drop the * decoration. Default true. */ showAdvisoryMeta?: boolean; /** Render the `- Files:` line. Default true. */ showFiles?: boolean; /** Render the `- Details:` (full summary) line. Default true. */ showDetails?: boolean; /** Render the `- Evidence:` line. Default true. */ showEvidence?: boolean; /** Where the full record lives, named in the evidence pointer. Default `audit-findings.json`. */ evidencePointer?: string; } /** First sentence of a summary, for the one-line lead above the badge body. */ export declare function findingLead(summary: string | undefined): string; /** `path:start–end` (en-dash), backticked; falls back to `path` with no lines. */ export declare function formatFindingFileRef(file: FindingFileRef): string; /** Grounding line — grounded / ungrounded / refuted / not assessed. */ export declare function findingGroundingLine(finding: FindingBadge): string; /** * The fixed-order labelled badge body — the `- ...` lines, no heading, no lead. * Same labels, same order, every finding: Severity → Confidence → Lens → * Grounding → [Systemic] → [Impact] → [Likelihood] → [Files] → [Details] → * [Evidence]. Callers compose a heading / lead / context-specific lines around it. */ export declare function renderFindingBadgeBody(finding: FindingBadge, opts?: FindingDisplayOptions): string[]; /** * The full standardized finding block as lines: `### id — title`, a blank line, a * one-line lead (when the summary has one), a blank line, then the badge body and * a trailing blank separator. Used wherever a finding is presented on its own. */ export declare function renderFindingBlockLines(finding: FindingDisplay, opts?: FindingDisplayOptions): string[]; /** Convenience: {@link renderFindingBlockLines} joined into one string. */ export declare function renderFindingBlock(finding: FindingDisplay, opts?: FindingDisplayOptions): string; //# sourceMappingURL=findingDisplay.d.ts.map