import { Trace } from "../models/trace.model"; /** * Pure-function renderers for `Trace` objects. Used by `ConsoleTracer` (writes to * stdout) and the observability tracer (persists to the store) so the visual output is * identical regardless of destination. All methods are stateless — instantiate once and reuse, or use the * exported singleton `traceRenderer` if you don't care. */ export declare class TraceRenderer { /** * Indented ASCII tree mirroring the span hierarchy. Right-aligned durations, slowest * leaf span flagged as `← bottleneck`. Best for human readers. * * Internal/parent spans are skipped for bottleneck detection on purpose: a parent's * duration is the sum of its children's work, so it would always dwarf any single * leaf and the flag would never highlight where the actual time was spent. */ renderTree(trace: Trace): string; /** * One line per span sorted by start time, no indentation. Best for grep / log * aggregation. */ renderFlat(trace: Trace): string; /** * Pretty-printed JSON dump of the trace + every span. Best for piping into a downstream * tool that wants structured access. */ renderJson(trace: Trace): string; /** * Serializes a trace to a plain JSON-friendly object. Exposed for callers that want to * embed the structured form in a larger payload (e.g. a NDJSON line). */ serialize(trace: Trace): Record; private serializeSpan; /** Depth-first traversal helper. Visits the root and every descendant once. */ private walkSpans; } /** * Default singleton. Use this from any caller that doesn't care to construct its own — * the class is stateless so sharing is safe. */ export declare const traceRenderer: TraceRenderer;