/** * 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; /** * Find a link by provider + external ID. */ export declare function getLinkByExternalId(providerId: string, externalId: string, cwd?: string): Promise; /** * Find all links for a given CLEO task. */ export declare function getLinksByTaskId(taskId: string, cwd?: string): Promise; /** * Create a new external task link. * * Ensures the external_task_links table exists before inserting, providing * graceful degradation for older project databases that predate the * wave0-schema-hardening migration. */ export declare function createLink(params: { taskId: string; providerId: string; externalId: string; externalUrl?: string; externalTitle?: string; linkType: ExternalTaskLink['linkType']; syncDirection?: ExternalTaskLink['syncDirection']; metadata?: Record; }, cwd?: string): Promise; /** * Update the lastSyncAt and optionally the title/metadata for an existing link. */ export declare function touchLink(linkId: string, updates?: { externalTitle?: string; metadata?: Record; }, cwd?: string): Promise; /** * Remove all links for a provider (used during provider deregistration). */ export declare function removeLinksByProvider(providerId: string, cwd?: string): Promise; //# sourceMappingURL=link-store.d.ts.map