/**
 * Cross-reference management between BRAIN memory entries and tasks.
 *
 * Provides linking/unlinking and query functions for relationships
 * between decisions, patterns, learnings and CLEO tasks.
 *
 * @task T5156
 * @epic T5149
 */
import type { BRAIN_LINK_TYPES, BRAIN_MEMORY_TYPES, BrainDecisionRow, BrainLearningRow, BrainMemoryLinkRow, BrainPatternRow } from '../store/brain-schema.js';
type MemoryType = (typeof BRAIN_MEMORY_TYPES)[number];
type LinkType = (typeof BRAIN_LINK_TYPES)[number];
/** A link to be created in bulk. */
export interface BulkLinkEntry {
    memoryType: MemoryType;
    memoryId: string;
    taskId: string;
    linkType: LinkType;
}
/**
 * Link a memory entry to a task.
 *
 * @task T5156
 */
export declare function linkMemoryToTask(projectRoot: string, memoryType: MemoryType, memoryId: string, taskId: string, linkType: LinkType): Promise<BrainMemoryLinkRow>;
/**
 * Remove a link between a memory entry and a task.
 *
 * @task T5156
 */
export declare function unlinkMemoryFromTask(projectRoot: string, memoryType: MemoryType, memoryId: string, taskId: string, linkType: LinkType): Promise<void>;
/**
 * Get all memory entries linked to a specific task.
 *
 * @task T5156
 */
export declare function getTaskLinks(projectRoot: string, taskId: string): Promise<BrainMemoryLinkRow[]>;
/**
 * Get all tasks linked to a specific memory entry.
 *
 * @task T5156
 */
export declare function getMemoryLinks(projectRoot: string, memoryType: MemoryType, memoryId: string): Promise<BrainMemoryLinkRow[]>;
/**
 * Batch create multiple links at once.
 *
 * @task T5156
 */
export declare function bulkLink(projectRoot: string, links: BulkLinkEntry[]): Promise<{
    created: number;
    skipped: number;
}>;
/**
 * Get all decisions linked to a task.
 * Convenience method that fetches full decision rows.
 *
 * @task T5156
 */
export declare function getLinkedDecisions(projectRoot: string, taskId: string): Promise<BrainDecisionRow[]>;
/**
 * Get all patterns linked to a task.
 * Convenience method that fetches full pattern rows.
 *
 * @task T5156
 */
export declare function getLinkedPatterns(projectRoot: string, taskId: string): Promise<BrainPatternRow[]>;
/**
 * Get all learnings linked to a task.
 * Convenience method that fetches full learning rows.
 *
 * @task T5156
 */
export declare function getLinkedLearnings(projectRoot: string, taskId: string): Promise<BrainLearningRow[]>;
export {};
//# sourceMappingURL=brain-links.d.ts.map