export type ProjectSource = "ggcoder" | "claude-code" | "codex";
export interface DiscoveredProject {
    name: string;
    path: string;
    lastActiveMs: number;
    lastActiveDisplay: string;
    /** Sorted, deduped list of stores this project showed up in. */
    sources: ProjectSource[];
}
/**
 * Scan ggcoder + Claude Code + Codex session stores and return one row per
 * project, sorted most-recent first. Duplicates (same cwd) are collapsed; the
 * `sources` field lists every store the project appeared in so the picker can
 * show a combined badge.
 */
export declare function discoverProjects(): Promise<DiscoveredProject[]>;
export interface RecentSession {
    /** Session id. */
    id: string;
    /** Absolute path to the session .jsonl (passed back to reopen it). */
    path: string;
    /** First user message, trimmed to a short preview (may be empty). */
    preview: string;
    /** Relative "3h ago" string from last activity. */
    lastActiveDisplay: string;
    messageCount: number;
}
/**
 * List the most recent ggcoder sessions for a project cwd, newest first, each
 * with a short preview built from its first user message. Used by the new-window
 * project picker to offer "resume a session" alongside "new session".
 *
 * Fast path: instead of fully reading every session file in the project (what
 * SessionManager.list does to count messages), sort files by mtime and read
 * only the newest `limit`. Each chosen file is parsed in ONE pass for its
 * header id, message count, last activity, and first user preview. For projects
 * with many/large sessions this is the difference between scanning everything
 * and scanning ~5 files.
 */
export declare function listRecentSessions(cwd: string, limit?: number): Promise<RecentSession[]>;
//# sourceMappingURL=project-discovery.d.ts.map