import type { ContextCompactionEntry, ContextDeletionFilters, FileEntry, SessionContext, SessionEntry, SessionTreeNode } from "./session-manager-types.ts";
export declare function getLatestCompactionBoundaryEntry(entries: SessionEntry[]): ContextCompactionEntry | null;
/**
 * Build raw deletion filters from persisted context_compaction entries.
 *
 * These raw filters do not apply replay-safety repair for assistant
 * thinking/redacted_thinking turns or their paired tool results. Production
 * context rebuild paths should prefer `buildEffectiveContextDeletionFilters`
 * or `buildContextDeletionFilteredPath(path)` unless they intentionally need
 * the un-repaired historical deletion plan for diagnostics.
 */
export declare function buildContextDeletionFilters(path: SessionEntry[]): ContextDeletionFilters;
export declare function buildEffectiveContextDeletionFilters(path: SessionEntry[]): ContextDeletionFilters;
/**
 * Return the active branch path after applying logical context-deletion entries.
 * Whole-entry deletions remove the entry from the path. Content-block deletions
 * clone only affected message/custom-message entries so retained blocks stay verbatim.
 * The optional filters parameter is for callers that already computed effective
 * filters with `buildEffectiveContextDeletionFilters(path)` and want to avoid
 * repeating the repair pass.
 */
export declare function buildContextDeletionFilteredPath(path: SessionEntry[], effectiveFilters?: ContextDeletionFilters): SessionEntry[];
/**
 * Build the session context from entries using tree traversal.
 * If leafId is provided, walks from that entry to root.
 * Applies context-deletion filtering 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