import type { RdfEngineLike } from '../../storage/rdf'; import type { StoreContext } from '../chatkit/store'; import type { RunAuthContextRegistry } from '../runs/RunAuthContextRegistry'; import { type RdfSearchIndexingService } from './RdfSearchIndexingService'; import type { RdfSearchReconciliationRepository } from '../../search/RdfSearchReconciliationRepository'; export interface RdfSearchReconciliationWorkerOptions { repository: RdfSearchReconciliationRepository; indexingService?: RdfSearchIndexingService; contextRegistry: RunAuthContextRegistry; store?: { getAiConfig(context: StoreContext): Promise | RdfSearchEmbeddingConfig | undefined; }; rdfEngine?: Pick; workerId?: string; now?: () => number; leaseDurationMs?: number; maxBatchSize?: number; intervalMs?: number; reconcileIntervalMs?: number; retryBaseDelayMs?: number; retryMaxDelayMs?: number; sourcePageSize?: number; onError?: (error: unknown, input: RdfSearchReconciliationWorkerErrorInput) => void; } export interface RdfSearchEmbeddingConfig { providerId: string; baseUrl: string; proxyUrl?: string; defaultModel?: string; embeddingModel?: string; embeddingModelVersion?: string; apiKey: string; credentialId: string; } export interface RdfSearchReconciliationDrainResult { processed: number; } export interface RdfSearchRememberedContextReconciliationResult { contexts: number; sources: number; } export interface RdfSearchReconciliationWorkerErrorInput { phase: 'tick' | 'drain' | 'reconcile'; sourceKey?: string; sourceUri?: string; } export declare class RdfSearchReconciliationWorker { private readonly repository; private readonly indexingService?; private readonly contextRegistry; private readonly store?; private readonly rdfEngine?; private readonly workerId; private readonly now; private readonly leaseDurationMs; private readonly maxBatchSize; private readonly intervalMs; private readonly reconcileIntervalMs; private readonly retryBaseDelayMs; private readonly retryMaxDelayMs; private readonly sourcePageSize; private readonly onError?; private timer; private running; constructor(options: RdfSearchReconciliationWorkerOptions); start(): void; stop(): void; drain(): Promise; reconcileRememberedContexts(): Promise; private process; private recordResult; private contextForSource; private desiredProfile; private nextAttemptAt; private reportError; }