import type { AgentMessage } from "@oh-my-pi/pi-agent-core";
import { BlobStore } from "./blob-store.js";
import { type FileEntry, type SessionTitleSlotEntry } from "./session-entries.js";
import { type SessionStorage } from "./session-storage.js";
import { type SessionTitleUpdate } from "./session-title-slot.js";
/** Parse session JSONL while stripping and folding the optional fixed title slot. */
export declare function parseSessionContent(content: string): {
    entries: FileEntry[];
    titleSlot: SessionTitleUpdate | undefined;
};
/** Exported for testing — the ≥8MiB streaming path (works on any file size). */
export declare function loadEntriesFromFileStream(filePath: string): Promise<{
    entries: FileEntry[];
    titleSlot: SessionTitleUpdate | undefined;
}>;
/** Read only the fixed-size head window to detect a physical title slot. */
export declare function readTitleSlotFromFile(filePath: string, storage?: SessionStorage): Promise<SessionTitleSlotEntry | undefined>;
/** Exported for compaction.test.ts */
export declare function parseSessionEntries(content: string): FileEntry[];
/** Exported for testing */
export declare function loadEntriesFromFile(filePath: string, storage?: SessionStorage): Promise<FileEntry[]>;
export declare function resolveBlobRefsInEntries(entries: FileEntry[], blobStore: BlobStore): Promise<void>;
/**
 * Read-only message view of a session file: load entries, migrate to the
 * current version, resolve blob refs, and build the context along the
 * persisted leaf path (last entry). Does NOT create a writer or take the
 * session lock — safe to call against a file another session is writing.
 */
export declare function loadSessionMessagesReadOnly(filePath: string): Promise<AgentMessage[]>;
