import { type TreeIndex } from "../forest.js"; import { type HostedCall } from "../hostedCalls.js"; import type { TreeNode } from "../types.js"; import type { DecisionLog } from "../../statelog/wireTypes.js"; /** Recorded identity, or a conservative span-local key for older logs. */ export type ThreadKey = { kind: "recorded" | "legacy"; id: string; }; export type Round = { /** `round::`. Leaf ids (`evt-`) shift under follow * mode when a promptStart becomes hidden; a span id and a count inside * it do not. */ id: string; /** 0-based across the trace, by end time. Screens print `index + 1`. */ index: number; spanId: string; ordinal: number; thread: ThreadKey; threadLabel: string | undefined; /** Ids of the tool calls this call ran inside, outermost first. */ toolPath: string[]; model: string; /** The company that ran the model, when a router such as OpenRouter * recorded it. */ servedBy: string | undefined; /** The model's unsigned reasoning text, when the provider sent it. */ reasoning: string | undefined; start: number; end: number; durationMs: number; cachedTokens: number; /** Fresh input plus cache writes: the model read both uncached. */ freshTokens: number; outputTokens: number; contextTokens: number; costUsd: number; /** What a decision model was sent and answered; undefined for a text call * and for logs from before the field was recorded. */ decision: DecisionLog | undefined; /** The tools the provider ran itself inside this call, such as a web * search. Read once here so every screen draws the same rows. */ hostedCalls: HostedCall[]; node: TreeNode; }; /** `z-ai/glm-5.3-flash via OpenInference`, or the bare model name. */ export declare function modelText(round: Round): string; export declare function roundId(spanId: string, ordinal: number): string; export declare function parseRoundId(id: string): { spanId: string; ordinal: number; } | undefined; export declare function sameThread(first: Round, second: Round): boolean; export declare function roundsOf(trace: TreeNode, index?: TreeIndex): Round[];