/** * resultToView — the single `CommandResult → ViewNode` mapping. * * This is the cli-side counterpart to the cli-ui interpreters: each * command result is expressed once as a renderer-agnostic view-model node, * which the seam (`bootstrap/render.ts`) then renders through `renderToInk` * (TTY) or `renderToText` (pipe/CI). Because both media consume the same * node, interactive and non-interactive output cannot drift. * * This mapping is total — every `CommandResult` variant has a view. The * Ink `App` shell adds only the banner/project chrome around the body this * produces; there is no separate per-type rendering anymore. * * cli may depend on both `@opensip-cli/contracts` (for `CommandResult`) * and `@opensip-cli/cli-ui` (for the view-model). The keystone boundary * only forbids the reverse — cli-ui must never import contracts. */ import { type ViewNode } from '@opensip-cli/cli-ui'; import type { CommandResult, RunPresentation, SignalEnvelope, VerboseDetail } from '@opensip-cli/contracts'; /** * Render a tool's verbose detail body (ADR-0021) as a `ViewNode`, switching on * the union `kind`. `lines` → verbatim text (graph's catalog/findings dump); * `findings` → the shared coloured findings blocks (fit/sim). Rendered through * the same seam as everything else, so a tool's `--verbose` output is identical * in a TTY and a pipe. */ export declare function renderVerboseDetail(detail: VerboseDetail): ViewNode; /** * The shared envelope → terminal view. Used by every migrated tool's * RunPresentation. The per-tool `rows`/`reportLines` legacy derivations it once * fell back to were retired in Phase 7 (ADR-0011). * * When `verboseDetail` is present (a `--verbose` run), its rendered body is * prepended above the per-unit table (ADR-0021). Without verbose detail, callers * can suppress the table for the compact default run surface. * * `durationOverride` is the host-owned display duration (ADR-0051), threaded by * `presentationToView` from `RunPresentation.durationMs`. It WINS over the * envelope unit-sum: tools whose units carry no per-unit duration (graph stamps * `durationMs: 0`) would otherwise render a `0ms` summary. fit/sim units carry * real durations, so they are unaffected when no override is supplied (the * unit-sum fallback stays exact). */ export declare function envelopeToTableView(envelope: SignalEnvelope, verboseDetail?: VerboseDetail, durationOverride?: number, showTable?: boolean): ViewNode; /** * The single render path for a {@link RunPresentation} (envelope-first-presentation * plan). Renders `p.banners` as muted lines above the run body (graph's * resolution caveat), delegates the verbose table+summary or default summary to * `envelopeToTableView` (threading `p.durationMs` as the host-owned duration * override), and applies the shared default footer when platform policy says the * run is compact — preserving the live default surface: summary only, no * per-unit table. * * This is the sole `resultToView` `case 'run-presentation'` target; it superseded * the three per-tool `*DoneResult` render cases (hard-removed in RP-3). */ export declare function presentationToView(p: RunPresentation): ViewNode; /** Map any CommandResult to its view-model node (total — every variant covered). */ export declare function resultToView(result: CommandResult): ViewNode; //# sourceMappingURL=result-to-view.d.ts.map