import type { Logger } from './types.js';
import type { UserTitleStore } from './user-title-store.js';
export interface DehydratedSession {
    /** Claude session id (basename of the JSONL file, no extension). */
    claudeSessionId: string;
    /** Absolute path of the JSONL on disk. */
    jsonlPath: string;
    /** mtime of the JSONL, ISO-8601. Newest write wins as the row's startedAt. */
    startedAt: string;
    /** Byte size of the JSONL, for ordering tiebreaker and operator surfaces. */
    sizeBytes: number;
    /** Resolved display name: user override (UserTitleStore) when set,
     *  else tail.aiTitle verbatim, else null. Task 253 added the
     *  operator-stamped layer over Task 146's aiTitle-only resolution. */
    displayName: string | null;
    /** Provenance of `displayName`. 'user' when a user override resolved
     *  it; 'ai' when the JSONL's aiTitle resolved it; null when neither
     *  source had a value (pre-first-turn session with no rename yet). */
    titleSource: 'user' | 'ai' | null;
    /** last ai-title line parsed from the JSONL tail, or null. The
     * Claude desktop client writes `{"type":"ai-title","aiTitle":"…"}` once it
     * has enough turns to summarise a session; we read the most recent such
     * line and surface it as the second-tier display name. */
    aiTitle: string | null;
    /** ISO timestamp of the last user|assistant turn in the parsed tail, or null. */
    lastMessageAt: string | null;
    /** Count of user|assistant turns found in the parsed tail. Lower bound when capped. */
    turnCount: number;
    /** True when the tail was clipped to tailMaxBytes — turnCount is a lower bound. */
    capped: boolean;
    /** Model id from the most recent assistant turn in the parsed tail
     *  (`message.model` field claude writes on every assistant line). Null
     *  when no assistant turn is in the window — alive session pre-first-turn
     *  or tail clipped above any assistant line. */
    model: string | null;
}
/**
 * Find a single dehydrated row by claudeSessionId. Returns null if the JSONL
 * is missing. Drives /:sessionId/meta, the /events SSE rowToPayload, and the
 * /spawn + /rc-spawn return-payload builders via http-server's `toPayload`.
 */
export declare function readJsonlSession(spawnCwd: string, claudeSessionId: string, tailMaxBytes: number, logger?: Logger, userTitleStore?: UserTitleStore): DehydratedSession | null;
//# sourceMappingURL=jsonl-enumerator.d.ts.map