/**
 * Cross-reference extraction - extract task IDs from text content.
 * Ported from lib/tasks/crossref-extract.sh
 *
 * @epic T4454
 * @task T4529
 */
/** Valid relationship types for relates entries. */
export type RelatesType = 'relates-to' | 'spawned-from' | 'deferred-to' | 'supersedes' | 'duplicates';
/** A single relates entry. */
export interface RelatesEntry {
    taskId: string;
    type: RelatesType;
    reason?: string;
}
/**
 * Extract task IDs from text content.
 * Scans for patterns like T1234, T001, T42 (T followed by 3+ digits).
 */
export declare function extractTaskRefs(text: string, excludeId?: string): string[];
/**
 * Create relates entries from extracted task IDs.
 */
export declare function createRelatesEntries(refs: string[], relType?: RelatesType, reason?: string): RelatesEntry[];
/**
 * Merge new relates entries with existing ones.
 * Existing entries take precedence (dedup by taskId).
 */
export declare function mergeRelatesArrays(existing: RelatesEntry[], newEntries: RelatesEntry[]): RelatesEntry[];
/**
 * Validate that referenced task IDs exist.
 * Returns array of invalid (non-existent) task IDs.
 */
export declare function validateRelatesRefs(relates: RelatesEntry[], validTaskIds: string[]): string[];
/**
 * Convenience: extract task refs from text and create relates entries.
 */
export declare function extractAndCreateRelates(text: string, excludeId?: string, relType?: RelatesType, reason?: string): RelatesEntry[];
//# sourceMappingURL=crossref-extract.d.ts.map