import type { AgentMessageRow } from './agent-db-models.js'; export interface SessionBranchPoint { index: number; messageId: number; preview: string; } export declare function rowById(rows: AgentMessageRow[]): Map; export declare function resolveDefaultLeafId(rows: AgentMessageRow[]): number | undefined; /** Walk from leaf to root; returns chronological path (root → leaf). */ export declare function buildActivePathRows(rows: AgentMessageRow[], activeLeafId?: number | null): AgentMessageRow[]; export declare function sortRowsChronologically(rows: AgentMessageRow[]): AgentMessageRow[]; /** List user messages on active path for /tree navigation. */ export declare function listUserBranchPoints(pathRows: AgentMessageRow[]): SessionBranchPoint[]; //# sourceMappingURL=session-tree.d.ts.map