/** * Reading a Claude Code session into the neutral vocabulary. * * Two rules shape everything here: no result body crosses (FR-24) and no system prompt, * environment value, token or hidden reasoning crosses (FR-28, NG-7). Both are enforced by * what this file builds, not by what a caller does with it. */ import type { CanonicalSession, CanonicalTurn, HomePath, SessionDescriptor } from "./contract.js"; /** FR-25: every dropped body is marked in text the model can read. */ export declare const DROPPED_MARKER = "(content dropped: imported session, may be stale)"; export declare const UNREADABLE_TITLE = "(unreadable session file)"; export declare const UNTITLED = "(no user message)"; export interface SessionReadResult { turns: CanonicalTurn[]; /** * Entries this adapter does not read: the other entry types of C-3, hidden reasoning, and * everything FR-28 excludes. `AgentAdapter` has no field for this count, so it is reported * here and asserted by T-CC-15. */ skipped: number; /** Set when the file is cut mid-entry. Then the session is not readable at all. */ unreadable: string | null; title: string; startedAt: string | null; updatedAt: string | null; repoPath: string | null; branch: string | null; changedPaths: string[]; } /** The redacted source arguments, shortened so one call stays one line. */ export declare function renderArguments(input: unknown): string; /** Read a whole session file into canonical turns. Pure: it takes the text, not a path. */ export declare function readSessionText(text: string): SessionReadResult; /** One row per session file of the home, newest first (FR-11, FR-14). */ export declare function listSessions(home: HomePath): Promise; /** One session in the neutral vocabulary. A file cut mid-entry is reported, never guessed at. */ export declare function loadSession(descriptor: SessionDescriptor): Promise;