import type { Session } from "@stigmer/protos/ai/stigmer/agentic/session/v1/api_pb";
import type { SearchResult } from "@stigmer/protos/ai/stigmer/search/v1/io_pb";
/** A time-based group of sessions produced by {@link groupSessionsByTime}. */
export interface SessionGroup {
    /** Display label for this group (e.g. "Today", "Yesterday"). */
    readonly label: string;
    /** Sessions belonging to this group, in their original input order. */
    readonly sessions: readonly Session[];
}
/** A time-based group of search results produced by {@link groupSearchResultsByTime}. */
export interface SearchResultGroup {
    /** Display label for this group (e.g. "Today", "Yesterday"). */
    readonly label: string;
    /** Search results belonging to this group, in their original input order. */
    readonly entries: readonly SearchResult[];
}
/**
 * Groups sessions by their creation timestamp into time-based buckets:
 * "Today", "Yesterday", "Previous 7 Days", "Previous 30 Days", "Older".
 *
 * Empty groups are omitted. Sessions with missing timestamps are placed
 * in the last group. Input order is preserved within each group.
 *
 * @param sessions - List of sessions to group (typically from `useSessionList`).
 * @param now - Reference time for grouping; defaults to the current time.
 *              Accepts an explicit value for deterministic testing.
 *
 * @example
 * ```tsx
 * function GroupedSessionList() {
 *   const { sessions } = useSessionList();
 *   const groups = groupSessionsByTime(sessions);
 *
 *   return (
 *     <div>
 *       {groups.map((group) => (
 *         <section key={group.label}>
 *           <h3>{group.label}</h3>
 *           <ul>
 *             {group.sessions.map((s) => (
 *               <li key={s.metadata?.id}>{s.status?.subject}</li>
 *             ))}
 *           </ul>
 *         </section>
 *       ))}
 *     </div>
 *   );
 * }
 * ```
 */
export declare function groupSessionsByTime(sessions: readonly Session[], now?: Date): readonly SessionGroup[];
/**
 * Groups SearchResult entries by their `createdAt` timestamp into time-based
 * buckets, identical to {@link groupSessionsByTime} but for lightweight
 * search results.
 *
 * @param entries - SearchResult entries (from SearchService session search).
 * @param now - Reference time for grouping; defaults to current time.
 */
export declare function groupSearchResultsByTime(entries: readonly SearchResult[], now?: Date): readonly SearchResultGroup[];
//# sourceMappingURL=group-sessions.d.ts.map