import type { Database } from "bun:sqlite";
export interface TaskFile {
    id: string;
    task_id: string;
    path: string;
    status: "planned" | "active" | "modified" | "reviewed" | "removed";
    agent_id: string | null;
    note: string | null;
    created_at: string;
    updated_at: string;
}
export interface AddTaskFileInput {
    task_id: string;
    path: string;
    status?: TaskFile["status"];
    agent_id?: string;
    note?: string;
}
export declare function addTaskFile(input: AddTaskFileInput, db?: Database): TaskFile;
export declare function getTaskFile(id: string, db?: Database): TaskFile | null;
export declare function listTaskFiles(taskId: string, db?: Database): TaskFile[];
export declare function findTasksByFile(path: string, db?: Database): TaskFile[];
export declare function updateTaskFileStatus(taskId: string, path: string, status: TaskFile["status"], agentId?: string, db?: Database): TaskFile | null;
export declare function removeTaskFile(taskId: string, path: string, db?: Database): boolean;
export interface FileConflict {
    path: string;
    conflicting_task_id: string;
    conflicting_agent_id: string | null;
    conflicting_task_title: string;
    conflicting_task_status: string;
}
/**
 * Check if adding a file to a task would conflict with another in-progress task.
 * Returns conflicts (not a hard block — caller decides what to do).
 */
export declare function detectFileConflicts(taskId: string, paths: string[], db?: Database): FileConflict[];
export interface BulkFileResult {
    path: string;
    tasks: TaskFile[];
    has_conflict: boolean;
    in_progress_count: number;
}
export declare function bulkFindTasksByFiles(paths: string[], db?: Database): BulkFileResult[];
export interface ActiveFileInfo {
    path: string;
    file_status: TaskFile["status"];
    file_agent_id: string | null;
    note: string | null;
    updated_at: string;
    task_id: string;
    task_short_id: string | null;
    task_title: string;
    task_status: string;
    task_locked_by: string | null;
    task_locked_at: string | null;
    agent_id: string | null;
    agent_name: string | null;
}
export declare function listActiveFiles(db?: Database): ActiveFileInfo[];
export interface FileHeatMapEntry {
    path: string;
    edit_count: number;
    unique_agents: number;
    agent_ids: string[];
    last_edited_at: string;
    active_task_count: number;
}
export declare function getFileHeatMap(opts?: {
    limit?: number;
    project_id?: string;
    min_edits?: number;
}, db?: Database): FileHeatMapEntry[];
export declare function bulkAddTaskFiles(taskId: string, paths: string[], agentId?: string, db?: Database): TaskFile[];
//# sourceMappingURL=task-files.d.ts.map