export interface SessionDirectorySource { entry: T; cwd: string; sortTimestamp: number; } export interface SessionDirectoryNode { /** Exact path used when starting a new session. Empty only for the synthetic unknown group. */ path: string; /** Compact path segment label. Single-child ancestors are folded into this label. */ name: string; /** User-defined workspace label. Clients display this in preference to name. */ customName?: string; synthetic: boolean; /** Sessions whose cwd is exactly this node. */ directCount: number; /** Sessions at this node or any descendant node. */ totalCount: number; latestTimestamp: number; entries: T[]; children: SessionDirectoryNode[]; } export interface SessionDirectoryTree { roots: SessionDirectoryNode[]; totalSessions: number; /** Number of distinct real working directories, excluding ancestor-only and unknown nodes. */ directoryCount: number; } export declare function normalizeSessionDirectory(value: string): string; export declare function buildDirectoryTree(sources: readonly SessionDirectorySource[], unknownLabel?: string, customNames?: ReadonlyMap): SessionDirectoryTree;