/**
 * Fast tail read of a session transcript.
 *
 * The live `--active` view needs the *last* few events of a possibly-huge JSONL
 * to infer state — parsing the whole file per row would make the view crawl. We
 * read only the final chunk from an fd (mirroring the bounded head-read in
 * active.ts's `quickExtractTopic`), drop a partial leading line, and hand the
 * chunk to the existing content parsers so there's zero duplicated parse logic.
 */
import type { SessionAgentId, SessionEvent } from './types.js';
/** A tail read: the last few normalized events plus the raw text they came from. */
export interface SessionTail {
    events: SessionEvent[];
    /** The raw JSONL chunk (leading partial line dropped), for content-level math. */
    content: string;
}
/**
 * Read the last `maxBytes` of a JSONL transcript as cleaned text. A tail that
 * begins mid-file yields one malformed leading line, which is dropped here so
 * downstream per-line parsers only see whole lines. Returns '' on any error or
 * empty file.
 */
export declare function readSessionTailContent(filePath: string, maxBytes?: number): string;
/**
 * Read the last `maxBytes` of a JSONL transcript and return its last
 * `maxEvents` normalized events *and* the raw text they were parsed from — the
 * raw text feeds content-level readouts (e.g. token throughput) that need the
 * lines the event model discards (Codex `token_count`). Only Claude and Codex
 * are supported (the prioritized harnesses for live state); other agents return
 * an empty tail.
 */
export declare function readSessionTailWithRaw(filePath: string, agent: SessionAgentId, maxBytes?: number, maxEvents?: number): SessionTail;
/**
 * Read the last `maxEvents` normalized events from a JSONL transcript tail. Thin
 * wrapper over {@link readSessionTailWithRaw} for callers that only need events.
 */
export declare function readSessionTail(filePath: string, agent: SessionAgentId, maxBytes?: number, maxEvents?: number): SessionEvent[];
