import type { Database } from "bun:sqlite";
import type { Task } from "../types/index.js";
export interface FindDuplicateTasksOptions {
    threshold?: number;
    limit?: number;
    include_archived?: boolean;
}
export interface DuplicateTaskCandidate {
    primary_task: Task;
    duplicate_task: Task;
    score: number;
    reasons: string[];
}
export interface MergeDuplicateTaskInput {
    primary_task_id: string;
    duplicate_task_id: string;
    agent_id?: string;
    reason?: string;
}
export interface TaskMergeMovedCounts {
    comments: number;
    dependencies: number;
    dependents: number;
    runs: number;
    run_events: number;
    run_commands: number;
    run_artifacts: number;
    files: number;
    inbox_items: number;
    verifications: number;
    history: number;
    relationships: number;
    git_refs: number;
    commits: number;
    checklists: number;
}
export interface TaskMergeResult {
    primary_task: Task;
    archived_duplicate: Task;
    relationship_id: string;
    moved: TaskMergeMovedCounts;
}
export declare function findDuplicateTasks(options?: FindDuplicateTasksOptions, db?: Database): DuplicateTaskCandidate[];
export declare function mergeDuplicateTask(input: MergeDuplicateTaskInput, db?: Database): TaskMergeResult;
export declare const findDuplicateCandidates: typeof findDuplicateTasks;
//# sourceMappingURL=task-dedupe.d.ts.map