/** * Terminal (plain-text) rendering over the M8 contract (M9). Consumes the * report/envelope only - never re-derives from raw data. Honest footer, no * em-dash. Color is via picocolors and fully optional (off = clean capture). */ import pc from 'picocolors'; import type { AuditReport } from '../audit/index.js'; import type { ShareOfVoiceRow } from '../types.js'; import { type PartialRunLike, type VisibilityEnvelope } from './envelope.js'; export { FOOTER_CTA } from './footer.js'; /** Options common to text renderers. `color` off yields ANSI-free output. */ export interface TextRenderOptions { /** Force color on/off; defaults to picocolors' auto-detection. */ color?: boolean; /** Path to the persisted snapshot, shown as the report location. */ reportPath?: string; } export declare function renderAuditText(report: AuditReport, opts?: TextRenderOptions): string; /** Stable pretty JSON for `--json`. */ export declare function renderAuditJson(report: AuditReport): string; /** Stable pretty JSON of the check envelope for `--json` (no ANSI, the contract). */ export declare function renderCheckJson(env: VisibilityEnvelope): string; /** The picocolors palette shape returned by `createColors`. */ export type Palette = ReturnType; /** * The shared "Share of voice" block (brand marked `(you)`). Returns `[]` when * there are no rows, so `check` and `sources` render it identically. */ export declare function renderShareOfVoice(rows: ShareOfVoiceRow[], c: Palette): string[]; /** * A titled `! note` block (honesty notes, diff caveats). Returns `[]` when there * are no notes, so every renderer presents caveats identically (rule #6). */ export declare function renderNoteBlock(title: string, notes: string[], c: Palette): string[]; /** * The shared "Run notes" block as a single string, for a caller that has notes * but no envelope to render (the `generate_buyer_queries` pack). Exists so an * entrypoint never hand-rolls the note formatting or reaches for picocolors * itself - the palette stays inside `core/output`. Empty notes render as "". */ export declare function renderRunNotes(notes: string[], opts?: TextRenderOptions): string; /** "1 prompt" / "3 prompts" - honest, grammatical count text. */ export declare function plural(n: number, word: string): string; /** The shared honest sampling line for both renderers. */ export declare function samplingLine(env: VisibilityEnvelope): string; /** * The `check` landing output: headline AI Visibility Score, the honest sampling * caveat, per-engine lines (grounded vs parametric shown separately), share of * voice, notable findings, any honesty flags, and the report path. Consumes the * envelope only. */ export declare function renderCheckText(env: VisibilityEnvelope, opts?: TextRenderOptions): string; /** * The `sources` view: where AI engines drew their answers from (cited domains) * and the share-of-voice split, read from the latest saved snapshot. Consumes * the envelope only; honest about a partial run and about an empty citation set * (parametric-only runs cite nothing). Ends with the shared footer CTA. */ export declare function renderSourcesText(env: VisibilityEnvelope, opts?: TextRenderOptions): string; /** * Human-readable honesty notes for a partial/degraded run (rule #6). Takes the * structural {@link PartialRunLike} so the check envelope and the shopping * envelope produce the SAME notes from the same flags. */ export declare function honestyNotes(env: PartialRunLike): string[];