/**
 * OBSERVE.2 — `opensquid trace` CLI verb.
 *
 * Three subcommands, all backed by `TraceReader` (OBSERVE.1):
 *
 *   opensquid trace <runId>                        — render a timeline
 *   opensquid trace tail [--follow]                — live event stream
 *   opensquid trace export <runId> --format <fmt>  — json | md | otel to stdout
 *
 * Duration bar is 20-char by default; widens to `min(60, stdout.columns - 40)`
 * when the terminal is wider than 80 cols. Color via picocolors'
 * `createColors(enabled)` — enabled iff `stdout.isTTY` and `NO_COLOR` is unset.
 * `--follow` uses an AbortController + SIGINT handler that detaches itself so
 * the process exits with no leaked timer. JSON + OTEL export delegate to
 * `TraceReader.export`; MD renders inline (no duplicate logic for json/otel).
 *
 * Imports from: commander, picocolors, ../../runtime/observability/index.js.
 * Imported by: src/cli.ts (register subcommand).
 */
import type { Client } from '@libsql/client';
import type { Command } from 'commander';
import type { TraceEvent, TraceTimeline } from '../../runtime/observability/index.js';
export interface RenderOpts {
    /** Forced bar width — tests pass a fixed value for deterministic snapshots. */
    barWidth?: number;
    /** Force enable/disable color regardless of TTY. */
    color?: boolean;
}
/**
 * Pure renderer. Returns a multi-line string. Exported for snapshot tests so
 * every styling decision flows through the injected `opts` deterministically.
 */
export declare function renderTimeline(t: TraceTimeline, opts?: RenderOpts): string;
/** GFM-safe markdown export. No ANSI, no `█` glyph. Pasteable into a PR. */
export declare function renderMarkdown(t: TraceTimeline): string;
/** Compact one-line representation for `tail --follow`. */
export declare function renderTailEvent(e: TraceEvent, opts?: RenderOpts): string;
export interface TraceCliDeps {
    /** Factory so tests can inject an in-memory client. */
    openClient?: (dbPath: string) => Client;
    stdout?: (s: string) => void;
    stderr?: (s: string) => void;
    /** Override the abort controller (tests force-abort `--follow` deterministically). */
    abort?: AbortController;
}
/**
 * Register `opensquid trace` on the parent program. Every IO boundary
 * (db open, stdout, stderr, abort signal) is overridable via `deps` so the
 * commander tree is the same code path in tests as in production.
 */
export declare function registerTraceCommand(program: Command, deps?: TraceCliDeps): Command;
//# sourceMappingURL=trace.d.ts.map