/**
 * report-to-markdown.ts — Canonical PR-comment markdown renderer (W0150).
 *
 * Single source of truth for rendering an AILF report as PR-comment
 * markdown. Used by:
 *   - the API gateway (`/v1/reports/:id/markdown`)
 *   - the eval pipeline (`ailf pr-comment` CLI / `pipeline/pr-comment.ts`)
 *
 * Operates on a structurally lenient `RenderableReport` shape so callers
 * can pass either the persisted slim Report (Sanity doc) or an in-memory
 * envelope built from `score-summary.json` + `comparison-report.json`.
 *
 * Canonical formatting decisions (W0150):
 *   - Header: level-1 (`# {emoji} AI Literacy Score Report`).
 *   - Footer: markdown link form `[view detailed results](url)`. The link
 *     URL comes from `provenance.promptfooUrls[0].url`.
 *   - Source verification block (sourceVerification + sourceIsolation) is
 *     rendered when present on the summary — preserves info from agentic
 *     / sandboxed local-mode runs without breaking remote-mode reports
 *     that don't carry those fields.
 */
import { type CacheBearingManifest } from "./report-cache-state.js";
export interface RenderableReport {
    /** Sanity report id; absent for local-only runs. */
    id?: string;
    /** ISO timestamp; falls back to `summary.timestamp` when absent. */
    completedAt?: string;
    /** Run duration in ms; absent for local-only runs. */
    durationMs?: number;
    /** Run tag/label. */
    tag?: string;
    /** Slim or full summary. Structurally lenient. */
    summary: unknown;
    /** Comparison report (delta against a baseline). */
    comparison?: unknown;
    /** Provenance — surfaces promptfooUrls for the footer link. */
    provenance?: unknown;
    /**
     * Artifact manifest. Top-level on the in-memory domain `Report` (pipeline
     * pr-comment path); on the persisted Sanity doc it lives under
     * `summary.artifactManifest` (API gateway path). The renderer reads
     * whichever is present to derive cache provenance.
     */
    artifactManifest?: CacheBearingManifest;
}
export declare function reportToMarkdown(report: RenderableReport): string;
