export declare const HEAD_BYTES: number; export declare const TAIL_BYTES: number; export declare const TITLE_MAX = 120; export declare const TOOL_TEXT_MAX = 16000; export declare const HISTORY_EVENT_PAYLOAD_MAX_CHARS = 32000; export declare const SESSION_ID_RE: RegExp; export interface HistoryEvent { id: string; seq: number; turn_id: string; type: string; payload: Record; created_at: string; } export declare function isRecord(value: unknown): value is Record; export declare function truncate(text: string, max: number): string; export declare function cleanTitle(text: string): string; export declare function isSyntheticPrompt(text: string): boolean; export declare function textOfBlocks(content: unknown): string; export declare function parseJsonObject(value: unknown): Record | null; export declare function toEpochMs(value: unknown): number | null; export declare function readChunk(path: string, position: number, length: number): Promise; export declare function parseLines(chunk: string, dropFirst?: boolean, dropLast?: boolean): Record[]; export declare function walkJsonl(dir: string, depth: number, out: string[]): Promise; export declare function readJsonlRecords(path: string): AsyncGenerator>; export declare function boundHistoryPayload(payload: Record): Record; export declare class BoundedHistory { #private; private readonly limit; constructor(limit: number); push(item: T): void; items(): T[]; get total(): number; get offset(): number; } export declare function fitHistoryBytes; }>(events: T[], maxBytes: number): T[]; export declare function statJsonlFiles(paths: string[], statFn: (p: string) => Promise<{ size: number; mtimeMs: number; }>): Promise>;