/**
 * Span Builder
 *
 * Builds hierarchical span trees from trace events for execution flow visualization.
 */
import type { TraceEventWithId, SpanNode } from "../types.js";
export declare class SpanBuilder {
    /**
     * Build a span tree from trace events
     */
    buildTree(events: TraceEventWithId[]): SpanNode[];
    /**
     * Create a span node from an event
     */
    private createNodeFromEvent;
    /**
     * Get a human-readable name for a span
     */
    private getSpanName;
    /**
     * Flatten a span tree to a list (depth-first)
     */
    flatten(tree: SpanNode[]): SpanNode[];
    /**
     * Get span summary statistics
     */
    getTreeStats(tree: SpanNode[]): {
        totalSpans: number;
        maxDepth: number;
        totalDurationMs: number;
        byType: Record<string, number>;
    };
}
//# sourceMappingURL=span-builder.d.ts.map