import { CategorizedSpan, FlowTransformResult, FlowTransformOptions } from '../../types/index.js'; /** * Detect if a span is a container span (wrapper for entire execution). * Container spans are excluded from flow nodes - only their children are shown. * * Uses multiple heuristics to support different agent implementations: * 1. OTEL GenAI semantic convention (gen_ai.operation.name) * 2. Name-based pattern matching * 3. Duration heuristic (span covers 90%+ of children duration) */ declare function isContainerSpan(span: CategorizedSpan): boolean; /** * Find the main flow spans (entry point for execution flow). * Adapts to different agent span structures. */ declare function findMainFlowSpans(spanTree: CategorizedSpan[]): CategorizedSpan[]; /** * Sort spans by startTime for execution order */ declare function sortByStartTime(spans: CategorizedSpan[]): CategorizedSpan[]; /** * Main transform function: Convert span tree to execution-order flow. * * Algorithm: * 1. Find main flow spans (skip container root if present) * 2. Process each level: create nodes, sequential edges between siblings * 3. For spans with children: create branch edges, recurse into children * 4. Apply dagre layout for positioning */ export declare function spansToExecutionFlow(spanTree: CategorizedSpan[], totalDuration: number, options?: FlowTransformOptions): FlowTransformResult; /** * Export utility functions for testing */ export { isContainerSpan, findMainFlowSpans, sortByStartTime }; //# sourceMappingURL=executionOrderTransform.d.ts.map