/**
 * tree-builder.ts
 * Build entity hierarchy and span tree structures for frontend display
 */
import type { Agent, Model, Span, Tool, TokenUsage, AgentToolDefinition } from '../types';
export interface EntityNode {
    id: string;
    type: 'agent' | 'tool' | 'model';
    name: string;
    description?: string;
    spanId: string;
    parentSpanId: string | null;
    duration: number;
    tokens?: number;
    ttft?: number;
    /**
     * Rollups for descendant model calls (present for agent/tool nodes).
     */
    ttftList?: number[];
    cumulativeDurationMs?: number;
    cumulativeTokenUsage?: TokenUsage;
    children: EntityNode[];
    depth: number;
    toolDefinations?: AgentToolDefinition[];
    argument_defination?: any;
    argument?: any;
    output?: any;
}
export interface SpanTreeNode {
    span: Span;
    children: SpanTreeNode[];
    depth: number;
}
/**
 * Build entity hierarchy tree from agents, tools, models, and spans
 */
export declare function buildEntityHierarchy(agents: Agent[], tools: Tool[], models: Model[], spans: Span[]): EntityNode[];
/**
 * Build span tree from spans
 */
export declare function buildSpanTree(spans: Span[]): SpanTreeNode[];
//# sourceMappingURL=treeBuilder.d.ts.map