import { BaseSqliteRepository } from './base-sqlite-repository.js'; import type { DrizzleDb } from './db.js'; import type { Workspace } from '../schema/index.js'; export type ProjectRow = Workspace; export interface ThreadRow { id: string; workspace_id: string | null; platform: string; title: string | null; first_message: string | null; last_message: string | null; message_count: number; created_at: string; updated_at: string; metadata: string | null; } export interface ThreadWithAgentRow extends ThreadRow { agent_id: string | null; } export declare class WorkspaceRepository extends BaseSqliteRepository { private readonly dbRoot?; constructor(opts?: { dbRoot?: string; }); resolveDbPath(): string; private openHandle; resolveSlug(db: DrizzleDb, workspaceId: string, workspacePath: string): string; normalizeLegacySlugs(): { updated: number; checked: number; }; ensureRow(db: DrizzleDb, opts: { id: string; slug: string; name: string; workspacePath: string; }): void; registerWorkspace(workspacePath: string): { id: string; slug: string; }; listProjects(params: { isActive?: boolean; limit: number; offset: number; }): { rows: ProjectRow[]; total: number; }; findById(id: string): ProjectRow | undefined; findAgentsByProject(id: string): string[]; findThreadsByProject(id: string, params: { limit: number; offset: number; }): { rows: ThreadWithAgentRow[]; total: number; }; findBySlug(slug: string): ProjectRow | undefined; slugExists(slug: string, excludeId?: string): boolean; insert(id: string, slug: string, name: string, repoPath: string | null): ProjectRow; update(id: string, updates: string[], args: (string | number | null)[]): ProjectRow; cleanupOrphanWorkspaces(): { softDeleted: number; checked: number; }; delete(id: string): void; }