import { type TurnTally } from "../logsViewer/timeline/turns.js"; /** One advance reads one chunk of the line reader. */ export declare const STATELOG_SCAN_CHUNK_BYTES: number; /** Per-trace totals the accumulator derives. */ export type TraceTotals = { costUsd: number; models: string[]; firstTsMs: number | null; lastTsMs: number | null; /** The trace's turns, so the explorer's duration is working time: a * session that sat between two messages did not take that long. */ turns: TurnTally; agentName?: string; eventCount: number; }; export type ScanResult = { kind: "ok"; traces: Record; warnings: string[]; } | { kind: "failed"; warning: string; }; export type StatelogScan = { /** Read at most one chunk; parse only the complete lines in it. * Returns true when the file is exhausted (or unopenable). */ advance(): boolean; /** Totals accumulated so far — the "is it making progress" window. */ peekTraces(): Record; /** Terminal result. Only meaningful after advance() returned true. */ result(): ScanResult; }; export declare function createStatelogScan(file: string): StatelogScan; /** Drive a scan to its terminal result. The synchronous completion path * (CSV export, tests); the interactive shell calls advance() itself. */ export declare function runScanToEnd(scan: StatelogScan): ScanResult;