export interface ProjectConfig {
    id: string;
    name: string;
    path: string;
    colorDot: string;
    addedAt: string;
    lastActiveAt?: string;
}
export interface WorkspaceConfig {
    version: 1;
    activeProjectId: string | null;
    projects: ProjectConfig[];
}
/**
 * Load the workspace from disk. Seeds a default empty config if the file
 * does not exist or is unparseable. Does NOT create the directory.
 */
export declare function loadWorkspace(workspaceDir: string): WorkspaceConfig;
/**
 * Save the workspace atomically (tmp file + rename). Creates workspaceDir if
 * needed. Caller is responsible for passing a valid config.
 */
export declare function saveWorkspace(workspaceDir: string, ws: WorkspaceConfig): void;
export interface AddProjectInput {
    path: string;
    name?: string;
}
export declare function addProject(workspaceDir: string, ws: WorkspaceConfig, input: AddProjectInput): WorkspaceConfig;
export declare function removeProject(workspaceDir: string, ws: WorkspaceConfig, id: string): WorkspaceConfig;
export declare function setActiveProject(workspaceDir: string, ws: WorkspaceConfig, id: string | null): WorkspaceConfig;
/**
 * Deterministic, path-stable id. Uses the first 10 hex chars of sha256(path).
 * Short enough for JSON + URL use, long enough to avoid collisions at
 * realistic workspace sizes (~10^12 addressable ids).
 */
export declare function projectIdFromPath(absolutePath: string): string;
