import type { SessionInfo } from "../types.js";
export type SessionSortMode = "recent" | "relevance";
export type SessionScope = "current" | "all";
type TokenKind = "fuzzy" | "phrase";
interface ParsedSearchQuery {
    mode: "tokens" | "regex";
    tokens: {
        kind: TokenKind;
        value: string;
    }[];
    regex: RegExp | null;
    error?: string;
}
export interface SessionBrowserProgress {
    loaded: number;
    total: number;
}
export declare function wrapSelectionIndex(current: number, direction: 1 | -1, length: number): number;
export declare function parseSessionSearchQuery(query: string): ParsedSearchQuery;
export declare function filterAndSortSessions(sessions: SessionInfo[], query: string, sortMode: SessionSortMode): {
    items: SessionInfo[];
    error?: string;
};
export declare function formatSessionAge(lastModified: number): string;
export declare function formatSessionSize(bytes: number): string;
export declare function shrinkSessionId(id: string): string;
export {};
