import type { Context } from '@deepseek-ai/cordis'; import type { Agent } from '@deepseek-ai/dsh-agent'; export interface WorkspaceRow { id: string; title: string; path: string; sessionIds: string[]; } export interface SessionRow { sessionId: string; title: string; cwd?: string; blank: boolean; running: boolean; origin?: string; updatedAt: number; } export interface CatalogSnapshot { workspaces: WorkspaceRow[]; sessionsById: Map; archivedIds: Set; } /** Load workspaces + sessions aligned with Web UI (via apiProxy when available). */ export declare function loadCatalog(ctx: Context): Promise; /** Sessions visible under one workspace (Web-like filters). */ export declare function visibleSessionsForWorkspace(catalog: CatalogSnapshot, workspace: WorkspaceRow): SessionRow[]; export declare function workspacesWithVisibleSessions(catalog: CatalogSnapshot): WorkspaceRow[]; export declare function truncateButton(text: string, max?: number): string; /** Fallback when apiProxy is unavailable: group live agents by cwd. */ export declare function catalogFromLiveAgents(agents: Agent[], ctx?: Context): CatalogSnapshot;