import type { VerbatimCompactionDetails } from "./compaction/compaction-types.js";
import type { CompactionEntry, FileEntry, SessionContext, SessionEntry, SessionTreeNode } from "./session-manager-types.ts";
export declare function getLatestCompactionBoundaryEntry(entries: SessionEntry[]): CompactionEntry<VerbatimCompactionDetails> | null;
/**
 * Build the session context from entries using tree traversal.
 * If leafId is provided, walks from that entry to root.
 * Emits the latest verbatim compaction boundary (compacted string as a custom-role
 * boundary message) followed by the kept tail when firstKeptEntryId is non-null,
 * and includes branch summaries along the path.
 */
export declare function buildSessionContext(entries: SessionEntry[], leafId?: string | null, byId?: Map<string, SessionEntry>): SessionContext;
export interface SessionIndex {
    byId: Map<string, SessionEntry>;
    labelsById: Map<string, string>;
    labelTimestampsById: Map<string, string>;
    leafId: string | null;
}
export declare function buildSessionIndex(fileEntries: FileEntry[]): SessionIndex;
export declare function getBranchPath(fromId: string | null | undefined, byId: Map<string, SessionEntry>): SessionEntry[];
export declare function buildSessionTree(entries: SessionEntry[], labelsById: ReadonlyMap<string, string>, labelTimestampsById: ReadonlyMap<string, string>): SessionTreeNode[];
//# sourceMappingURL=session-manager-history.d.ts.map