import type { EventEnvelope, EventData } from "../statelog/wireTypes.js"; export type { EventEnvelope, EventData }; export type TreeNode = { id: string; traceId: string; parentId: string | null; children: TreeNode[]; nodeKind: "trace" | "span" | "event" | "jsonLine" | "convoLine" | "rawDataToggle"; label: string; summary: string; duration?: number; tokens?: number; cost?: number; firstTs?: number; event?: EventEnvelope; }; export type ViewerState = { roots: TreeNode[]; expanded: Set; cursorId: string; scrollTop: number; quit: boolean; query?: string; matches?: string[]; matchIdx?: number; helpOpen?: boolean; followOn?: boolean; messageBar?: string; viewportCols?: number; };