import { S as Span, b as TraceEvent, T as TraceStore } from './store-Db2Bv8Cf.js';

/**
 * Trajectory — ordered, structured view over a run's spans.
 *
 * A pure function `buildTrajectory(store, runId) → Trajectory` returns
 * a topologically ordered list of `TrajectoryStep` with parent-child
 * grouping collapsed into a single line-of-agent-work. Separate
 * analyzers (stuck-loop detection, waste ratio) live in
 * `pipelines/` and consume the trajectory.
 */

interface TrajectoryStep {
    index: number;
    span: Span;
    /** Depth in the span tree from the root. 0 = top-level. */
    depth: number;
    /** Events attached to this span. */
    events: TraceEvent[];
}
interface Trajectory {
    runId: string;
    steps: TrajectoryStep[];
    llmTurns: number;
    toolCalls: number;
    judgeVerdicts: number;
    retrievals: number;
    totalDurationMs: number;
}
declare function buildTrajectory(store: TraceStore, runId: string): Promise<Trajectory>;

export { type Trajectory as T, type TrajectoryStep as a, buildTrajectory as b };
