/** * Canonical JSON debug rendering (SPEC.md §11). * * Non-contractual for the wire; contractual for golden vectors. Rendering * rules: frames in wire order with END omitted, field order per the SPEC * field tables, absent opt() fields omitted, binary fields as standard * base64, enums by their spec names, i64 as JSON numbers, json-typed * fields embedded as parsed JSON. */ import type { SyncMessage } from './message.js'; import type { RowColumn, SparseRowValue } from './row-codec.js'; import type { RowsSegment } from './segment.js'; export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; }; /** Standard base64 (§11.1 rule 4). Dependency- and runtime-agnostic. */ export declare function bytesToBase64(bytes: Uint8Array): string; export declare function renderMessageValue(message: SyncMessage): JsonValue; /** `render(bytes) → json` for SSP2 messages (§11). */ export declare function renderMessage(bytes: Uint8Array): JsonValue; export declare function renderRowsSegmentValue(segment: RowsSegment): JsonValue; /** `render(bytes) → json` for standalone SSG2 rows segments (§11 rule 8). */ export declare function renderRowsSegment(bytes: Uint8Array): JsonValue; /** * Render a decoded sparse row (RFC §6.1, §11 rule 11): the column table plus * `values` keyed by column name, carrying only the present columns, so an * absent column has no key and a present NULL renders as JSON `null`. */ export declare function renderSparseRowValue(columns: readonly RowColumn[], values: readonly SparseRowValue[]): JsonValue;