/** * The Claude Code session file: one JSON object per line. * * The store holds ten entry types (C-3). This module reads the few that carry turns and writes * exactly two, `user` and `assistant` (C-9) — fewer types, fewer ways to corrupt the store. */ export declare const ENTRY_TYPE_USER = "user"; export declare const ENTRY_TYPE_ASSISTANT = "assistant"; export declare const ENTRY_TYPE_SUMMARY = "summary"; /** The only entry types `serialize` writes (C-9). */ export declare const WRITTEN_ENTRY_TYPES: readonly string[]; export type RawEntry = Record; export interface JsonlParse { entries: RawEntry[]; /** Set when a line is not a complete entry — the file is cut mid-entry. */ unreadable: string | null; } export interface ActiveEntryPath { entries: RawEntry[]; unreadable: string | null; } /** Parse a session file. A line that is not a complete entry makes the whole file unreadable. */ export declare function parseJsonl(text: string): JsonlParse; /** Follow the last non-sidechain UUID record to the root of Claude's active transcript. */ export declare function resolveActiveEntryPath(entries: RawEntry[]): ActiveEntryPath; export declare function asString(value: unknown): string | null; export declare function asObject(value: unknown): Record | null; export declare function asArray(value: unknown): unknown[] | null; /** ISO-8601 UTC, the vocabulary every timestamp of the canonical model uses. */ export declare function toIsoUtc(value: unknown): string | null;