import type { Database } from "bun:sqlite";
export declare const RELATIONSHIP_TYPES: readonly ["related_to", "conflicts_with", "similar_to", "duplicates", "supersedes", "modifies_same_file"];
export type RelationshipType = (typeof RELATIONSHIP_TYPES)[number];
export interface TaskRelationship {
    id: string;
    source_task_id: string;
    target_task_id: string;
    relationship_type: RelationshipType;
    metadata: Record<string, unknown>;
    created_by: string | null;
    created_at: string;
}
export interface AddTaskRelationshipInput {
    source_task_id: string;
    target_task_id: string;
    relationship_type: RelationshipType;
    metadata?: Record<string, unknown>;
    created_by?: string;
}
export declare function addTaskRelationship(input: AddTaskRelationshipInput, db?: Database): TaskRelationship;
export declare function getTaskRelationship(id: string, db?: Database): TaskRelationship | null;
export declare function removeTaskRelationship(id: string, db?: Database): boolean;
export declare function removeTaskRelationshipByPair(sourceTaskId: string, targetTaskId: string, relationshipType: RelationshipType, db?: Database): boolean;
/**
 * Get all relationships for a task (both as source and target).
 */
export declare function getTaskRelationships(taskId: string, relationshipType?: RelationshipType, db?: Database): TaskRelationship[];
/**
 * Find tasks related to a given task (returns the "other" task IDs).
 */
export declare function findRelatedTaskIds(taskId: string, relationshipType?: RelationshipType, db?: Database): string[];
/**
 * Auto-detect tasks that modify the same file and create modifies_same_file relationships.
 */
export declare function autoDetectFileRelationships(taskId: string, db?: Database): TaskRelationship[];
//# sourceMappingURL=task-relationships.d.ts.map