import type { Database } from "bun:sqlite";
import type { CreateProjectInput, CreateProjectSourceInput, Project, ProjectSource } from "../types/index.js";
export declare function slugify(name: string): string;
export declare function createProject(input: CreateProjectInput, db?: Database): Project;
export declare function getProject(id: string, db?: Database): Project | null;
export declare function getProjectByPath(path: string, db?: Database): Project | null;
export declare function listProjects(db?: Database): Project[];
export declare function updateProject(id: string, input: Partial<Pick<Project, "name" | "description" | "task_list_id" | "path">>, db?: Database): Project;
/**
 * Rename a project: update name and/or task_list_id (slug).
 * Cascades slug change to any task_list whose slug matched the old task_list_id.
 * Validates new slug is unique if provided.
 */
export declare function renameProject(id: string, input: {
    name?: string;
    new_slug?: string;
}, db?: Database): {
    project: Project;
    task_lists_updated: number;
};
export declare function deleteProject(id: string, db?: Database): boolean;
export declare function addProjectSource(input: CreateProjectSourceInput, db?: Database): ProjectSource;
export declare function removeProjectSource(id: string, db?: Database): boolean;
export declare function listProjectSources(projectId: string, db?: Database): ProjectSource[];
export declare function getProjectWithSources(id: string, db?: Database): Project | null;
export declare function nextTaskShortId(projectId: string, db?: Database): string | null;
export declare function ensureProject(name: string, path: string, db?: Database): Project;
export interface ProjectMachinePath {
    id: string;
    project_id: string;
    machine_id: string;
    path: string;
    created_at: string;
    updated_at: string;
}
/**
 * Set (upsert) the local path for a project on the current machine.
 * Safe to call at any time — idempotent if path hasn't changed.
 */
export declare function setMachineLocalPath(projectId: string, path: string, db?: Database): ProjectMachinePath;
/**
 * Get the local path for a project on the current machine.
 * Falls back to the project's global path if no override is set.
 */
export declare function getMachineLocalPath(projectId: string, db?: Database): string | null;
/**
 * List all machine path overrides for a project.
 */
export declare function listMachineLocalPaths(projectId: string, db?: Database): ProjectMachinePath[];
/**
 * Remove the local path override for a project on a specific machine (default: current).
 */
export declare function removeMachineLocalPath(projectId: string, machineId?: string, db?: Database): boolean;
//# sourceMappingURL=projects.d.ts.map