import { type DesktopSidebarReader } from "./desktop-sidebar-metadata.js"; import { type DesktopSidebarMembership, type DesktopSidebarSummary } from "./desktop-sidebar-selection.js"; import type { DesktopThreadIdentity } from "./desktop-types.js"; import { type DesktopMetadataBatch, type DesktopMetadataReader, type DesktopMetadataSource } from "./desktop-metadata-reader.js"; export interface DesktopCatalogProvenance { database: string; table: "threads" | "local_thread_catalog"; sourceKind: string | null; threadSource: string | null; } export interface DesktopCatalogEntry extends DesktopThreadIdentity { conversationId: string; title: string; cwd: string | null; updatedAtMs: number; originator: string | null; projectId: string | null; sourceKind: string | null; threadSource: string | null; catalogMembership: "desktop_catalog" | "state_metadata"; localVerifiable: boolean; /** Directory membership does not establish a current owner, loaded state, or send capability. */ metadataOnly: true; provenance: DesktopCatalogProvenance[]; archived?: boolean; threadSectionId?: string | null; sectionPosition?: number; sidebar?: DesktopSidebarMembership; } export interface DesktopCatalogListOptions { view?: "sidebar" | "history"; limit?: number; cursor?: string; search?: string; /** Exact project ID or normalized absolute project directory. */ project?: string; } export interface DesktopCatalogPage { sessions: DesktopCatalogEntry[]; nextCursor?: string; total: number; sources: DesktopMetadataSource[]; /** All available supported sources were read; not a claim of live or cloud completeness. */ complete: boolean; view?: "sidebar" | "history"; historyTotal?: number; sidebar?: DesktopSidebarSummary; } export interface DesktopSessionCatalogOptions { codexHomes?: string[]; readMetadata?: DesktopMetadataReader; readSidebar?: DesktopSidebarReader; } export declare class DesktopSessionCatalog { private readonly homes; private readonly readMetadata; private readonly readSidebar; constructor(options?: DesktopSessionCatalogOptions); list(options?: DesktopCatalogListOptions): Promise; get(identity: DesktopThreadIdentity): Promise; private collect; } /** Catalog evidence outranks state evidence; owner availability is deliberately not an input. */ export declare function mergeDesktopMetadata(batches: DesktopMetadataBatch[]): { sessions: DesktopCatalogEntry[]; sources: DesktopMetadataSource[]; archivedIds: Set; };