import type { AgentMessage } from '@earendil-works/pi-agent-core';
import type { TranscriptStoredRow } from '../session-context-for-llm.js';
export type TranscriptPageOptions = {
    limit: number;
    /** Exclusive end index into display message rows (default: total). */
    beforeIndex?: number;
    /** Tail offset (used when `beforeIndex` is omitted). */
    offset?: number;
};
export type TranscriptPageResult = {
    rows: TranscriptStoredRow[];
    total: number;
    startIndex: number;
    endIndex: number;
};
/**
 * Count persisted pi `type: message` rows (excludes context custom rows).
 */
export declare function countTranscriptMessageRows(absPath: string): Promise<number>;
/**
 * Read a page of display messages from transcript tail (newest page when cursors omitted).
 */
export declare function readDisplayMessagePageFromTranscriptFile(absPath: string, options: TranscriptPageOptions): Promise<TranscriptPageResult & {
    messages: AgentMessage[];
}>;
/**
 * Read a page of transcript rows from the tail (newest page when `beforeIndex` omitted).
 */
export declare function readTranscriptRowsPageFromFile(absPath: string, options: TranscriptPageOptions): Promise<TranscriptPageResult>;
