import type { SessionInfo } from "../../../core/session-manager.ts";
/** A session tree node for hierarchical display */
export interface SessionTreeNode {
    session: SessionInfo;
    children: SessionTreeNode[];
    latestActivity: number;
}
/** Flattened node for display with tree structure info */
export interface FlatSessionNode {
    session: SessionInfo;
    depth: number;
    isLast: boolean;
    /** For each ancestor level, whether there are more siblings after it */
    ancestorContinues: boolean[];
}
export type CanonicalPathResolver = (path: string | undefined) => string | undefined;
/**
 * {@link canonicalizePath} memoized per path. Create one per sessions array: a rebuilt list gets a
 * fresh resolver, so its answers are as current as the listing they belong to, while tree
 * rebuilds and per-row current-session checks on the same list stop hitting the filesystem.
 */
export declare function createCanonicalPathResolver(): CanonicalPathResolver;
/**
 * Build a tree structure from sessions based on parentSessionPath.
 * Returns root nodes sorted by modified date (descending).
 */
export declare function buildSessionTree(sessions: SessionInfo[], canonicalize: CanonicalPathResolver): SessionTreeNode[];
/**
 * Flatten tree into display list with tree structure metadata.
 */
export declare function flattenSessionTree(roots: SessionTreeNode[]): FlatSessionNode[];
//# sourceMappingURL=session-selector-tree.d.ts.map