import type{LyraToolStatus}from'../../../internal/shared-unions.js';export type LyraSpanKind='agent'|'llm'|'tool'|'retriever'|'embedding'|'other'; /** The same tool-lifecycle vocabulary ``'s `ToolCallStatus` and * ``'s `ToolResultStatus` resolve to -- a span standing in for a call reads * identically to the call itself. */ export type LyraSpanStatus=LyraToolStatus; /** Normalizes foreign provider data before it reaches closed span-kind maps. */ export declare function normalizeLyraSpanKind(value:unknown):LyraSpanKind; /** Normalizes foreign provider data before it reaches closed span-status maps. */ export declare function normalizeLyraSpanStatus(value:unknown):LyraSpanStatus; /** * One span in an agent/LLM trace. The same flat `LyraSpan[]` array powers * both `` (hierarchy projection, via `parentId`) and * `` (timeline projection, via `startMs`/`endMs`) — two * views of one trace, never two separate data shapes. */ export interface LyraSpan{ /** Nonblank stable identity. Surrounding whitespace in a nonblank ID is preserved. */ id:string; /** A span whose `parentId` is missing or doesn't resolve to another span in the same array renders as a root — never dropped. */ parentId?:string;name:string;kind:LyraSpanKind; /** Milliseconds relative to the trace start (not a wall-clock timestamp). */ startMs:number; /** Milliseconds relative to the trace start. Absent while the span is still running. */ endMs?:number; /** Same vocabulary as the library's existing tool-lifecycle status. */ status:LyraSpanStatus;tokensIn?:number;tokensOut?:number; /** Preformatted by the host (e.g. `"$0.0012"`) — rendered verbatim, never parsed or summed. */ costText?:string; /** Secondary text rendered under/after the span's name. */ detail?:string;}export declare const MAX_RENDERED_LYRA_SPANS=500;export interface LyraSpanProjection{spans:LyraSpan[];byId:Map;truncated:boolean; /** * The greatest trace-relative end across every span in the source array, measured BEFORE the * `MAX_RENDERED_LYRA_SPANS` cap drops anything — never below `0`. A maximum, not the last * element's end: `normalizeLyraSpans()` preserves input order, so an unsorted `spans` can put * the latest-ending span anywhere in the array. * * A timeline view has to scale to this, not to `spans`'s own extent: the cap keeps the first * spans, so on a trace whose long tail is truncated the surviving extent collapses and every * remaining bar stretches to fill the track. `` then drew a 1s span in a 10s * trace at 100% width, and `` did the same, both silently. Truncating the ROWS is * a resource bound; rescaling the AXIS underneath them is a misreport. */ extentEndMs:number;} /** One bounded, runtime-safe projection shared by every agent trace view. Invalid records and * later duplicate ids are omitted, while closed provider enums normalize to their documented * fallbacks. When `activeSpanId` resolves, that span and as much of its nearest ancestor path as * fits reserve positions inside the 500-row ceiling; ordinary rows then fill the remaining * positions in input order. */ export declare function normalizeLyraSpans(values:readonly unknown[],activeSpanId?:string|null):LyraSpanProjection;