/**
 * External task link persistence — DB-backed link tracking for reconciliation.
 *
 * Manages the external_task_links table in tasks.db. Used by the reconciliation
 * engine to match external tasks to existing CLEO tasks and track sync history.
 */
import type { ExternalTaskLink } from '@cleocode/contracts';
/**
 * Find all links for a given provider.
 */
export declare function getLinksByProvider(providerId: string, cwd?: string): Promise<ExternalTaskLink[]>;
/**
 * Find a link by provider + external ID.
 */
export declare function getLinkByExternalId(providerId: string, externalId: string, cwd?: string): Promise<ExternalTaskLink | null>;
/**
 * Find all links for a given CLEO task.
 */
export declare function getLinksByTaskId(taskId: string, cwd?: string): Promise<ExternalTaskLink[]>;
/**
 * Create a new external task link.
 */
export declare function createLink(params: {
    taskId: string;
    providerId: string;
    externalId: string;
    externalUrl?: string;
    externalTitle?: string;
    linkType: ExternalTaskLink['linkType'];
    syncDirection?: ExternalTaskLink['syncDirection'];
    metadata?: Record<string, unknown>;
}, cwd?: string): Promise<ExternalTaskLink>;
/**
 * Update the lastSyncAt and optionally the title/metadata for an existing link.
 */
export declare function touchLink(linkId: string, updates?: {
    externalTitle?: string;
    metadata?: Record<string, unknown>;
}, cwd?: string): Promise<void>;
/**
 * Remove all links for a provider (used during provider deregistration).
 */
export declare function removeLinksByProvider(providerId: string, cwd?: string): Promise<number>;
//# sourceMappingURL=link-store.d.ts.map