import type { IdentityDatabase } from '../identity/drizzle/db'; export type RdfSearchReconciliationState = 'waiting-config' | 'retryable' | 'blocked-config' | 'applied' | 'ready' | 'in-progress'; export interface RdfSearchDesiredProfile { providerId: string; model: string; modelVersion?: string; configFingerprint: string; sourceHash?: string; sourceVersion?: string; } export interface RdfSearchReconciliationInput extends RdfSearchDesiredProfile { sourceKey: string; sourceUri: string; podRoot: string; reason: string; } export interface RdfSearchRetryableInput extends RdfSearchReconciliationInput { failureCategory: string; nextAttemptAt: Date; } export interface RdfSearchAppliedInput extends RdfSearchReconciliationInput { } export interface RdfSearchBlockedConfigInput extends RdfSearchReconciliationInput { failureCategory: string; } export interface RdfSearchConfigWaitInput { sourceKey: string; sourceUri: string; podRoot: string; sourceHash?: string; sourceVersion?: string; reason: string; failureCategory?: string; } export interface RdfSearchReconciliationRow { sourceKey: string; sourceUri: string; podRoot: string; providerId?: string; model?: string; modelVersion?: string; configFingerprint?: string; sourceHash?: string; sourceVersion?: string; state: RdfSearchReconciliationState; reason: string; attemptCount: number; nextAttemptAt: Date; leaseOwner?: string; leaseExpiresAt?: Date; failureCategory?: string; updatedAt: Date; } /** * Durable product queue for RDF FTS/VEC parity work. * * SolidFS writes may complete before the user's Pod has an embedding profile or * provider quota. This repository keeps one desired embedding profile per * source so skipped vector indexing remains recoverable after config, quota, or * model changes. */ export declare class RdfSearchReconciliationRepository { private readonly db; private readonly ready; constructor(db: IdentityDatabase); waitForConfig(input: RdfSearchConfigWaitInput, now?: Date): Promise; upsertDesired(input: RdfSearchReconciliationInput, now?: Date): Promise; upsertRetryable(input: RdfSearchRetryableInput, now?: Date): Promise; upsertApplied(input: RdfSearchAppliedInput, now?: Date): Promise; upsertBlockedConfig(input: RdfSearchBlockedConfigInput, now?: Date): Promise; get(sourceKey: string): Promise; listRunnable(now?: Date, limit?: number): Promise; claimNext(workerId: string, now?: Date, leaseDurationMs?: number): Promise; markRetryable(sourceKey: string, workerId: string, failureCategory: string, nextAttemptAt: Date, now?: Date): Promise; markBlockedConfig(sourceKey: string, workerId: string, failureCategory: string, now?: Date): Promise; complete(sourceKey: string, workerId: string, now?: Date): Promise; deleteSource(sourceKey: string): Promise; listPodRoots(): Promise; private initialize; private assertSourceIdentity; }