@memberjunction/content-autotagging 5.23.0 → 5.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/CloudStorage/generic/CloudStorageBase.js +1 -1
  2. package/dist/CloudStorage/generic/CloudStorageBase.js.map +1 -1
  3. package/dist/CloudStorage/index.d.ts +5 -0
  4. package/dist/CloudStorage/index.d.ts.map +1 -1
  5. package/dist/CloudStorage/index.js +5 -0
  6. package/dist/CloudStorage/index.js.map +1 -1
  7. package/dist/CloudStorage/providers/AutotagCloudStorage.d.ts +61 -0
  8. package/dist/CloudStorage/providers/AutotagCloudStorage.d.ts.map +1 -0
  9. package/dist/CloudStorage/providers/AutotagCloudStorage.js +256 -0
  10. package/dist/CloudStorage/providers/AutotagCloudStorage.js.map +1 -0
  11. package/dist/Core/generic/AutotagBase.d.ts +7 -1
  12. package/dist/Core/generic/AutotagBase.d.ts.map +1 -1
  13. package/dist/Core/generic/AutotagBase.js.map +1 -1
  14. package/dist/Engine/generic/AutotagBaseEngine.d.ts +318 -18
  15. package/dist/Engine/generic/AutotagBaseEngine.d.ts.map +1 -1
  16. package/dist/Engine/generic/AutotagBaseEngine.js +1024 -176
  17. package/dist/Engine/generic/AutotagBaseEngine.js.map +1 -1
  18. package/dist/Engine/generic/RateLimiter.d.ts +49 -0
  19. package/dist/Engine/generic/RateLimiter.d.ts.map +1 -0
  20. package/dist/Engine/generic/RateLimiter.js +98 -0
  21. package/dist/Engine/generic/RateLimiter.js.map +1 -0
  22. package/dist/Engine/index.d.ts +1 -0
  23. package/dist/Engine/index.d.ts.map +1 -1
  24. package/dist/Engine/index.js +1 -0
  25. package/dist/Engine/index.js.map +1 -1
  26. package/dist/Entity/generic/AutotagEntity.d.ts +63 -14
  27. package/dist/Entity/generic/AutotagEntity.d.ts.map +1 -1
  28. package/dist/Entity/generic/AutotagEntity.js +362 -83
  29. package/dist/Entity/generic/AutotagEntity.js.map +1 -1
  30. package/dist/LocalFileSystem/generic/AutotagLocalFileSystem.js +1 -1
  31. package/dist/LocalFileSystem/generic/AutotagLocalFileSystem.js.map +1 -1
  32. package/dist/RSSFeed/generic/AutotagRSSFeed.d.ts +47 -16
  33. package/dist/RSSFeed/generic/AutotagRSSFeed.d.ts.map +1 -1
  34. package/dist/RSSFeed/generic/AutotagRSSFeed.js +238 -120
  35. package/dist/RSSFeed/generic/AutotagRSSFeed.js.map +1 -1
  36. package/dist/Websites/generic/AutotagWebsite.js +1 -1
  37. package/dist/Websites/generic/AutotagWebsite.js.map +1 -1
  38. package/dist/index.d.ts +1 -0
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +1 -0
  41. package/dist/index.js.map +1 -1
  42. package/package.json +16 -11
@@ -1,8 +1,21 @@
1
1
  import { BaseEngine, IMetadataProvider, UserInfo } from '@memberjunction/core';
2
- import { MJContentSourceEntity, MJContentItemEntity, MJContentFileTypeEntity, MJContentTypeEntity, MJContentSourceTypeEntity, MJContentTypeAttributeEntity, MJContentSourceTypeParamEntity } from '@memberjunction/core-entities';
2
+ import { MJContentSourceEntity, MJContentItemEntity, MJContentFileTypeEntity, MJContentProcessRunEntity, MJContentTypeEntity, MJContentSourceTypeEntity, MJContentTypeAttributeEntity, MJContentItemTagEntity, MJContentSourceTypeParamEntity, MJContentProcessRunEntity_IContentProcessRunConfiguration } from '@memberjunction/core-entities';
3
3
  import { ContentSourceParams, ContentSourceTypeParams, ContentSourceTypeParamValue } from './content.types.js';
4
+ import { RateLimiter } from './RateLimiter.js';
4
5
  import { ProcessRunParams, JsonObject, ContentItemProcessParams } from './process.types.js';
5
6
  import type { MJAIPromptEntityExtended } from '@memberjunction/ai-core-plus';
7
+ /**
8
+ * Result of a vectorization operation, including counts and AIPromptRun IDs
9
+ * for linking to ContentProcessRunDetail records.
10
+ */
11
+ export interface VectorizeResult {
12
+ /** Number of items successfully vectorized */
13
+ vectorized: number;
14
+ /** Number of items skipped (e.g., empty text) */
15
+ skipped: number;
16
+ /** AIPromptRun IDs created during embedding, for junction table linking */
17
+ promptRunIDs: string[];
18
+ }
6
19
  /**
7
20
  * Core engine for content autotagging. Extends BaseEngine to cache content metadata
8
21
  * (types, source types, file types, attributes) at startup. Uses AIEngine via composition
@@ -10,16 +23,15 @@ import type { MJAIPromptEntityExtended } from '@memberjunction/ai-core-plus';
10
23
  */
11
24
  export declare class AutotagBaseEngine extends BaseEngine<AutotagBaseEngine> {
12
25
  static get Instance(): AutotagBaseEngine;
13
- private _ContentTypes;
14
- private _ContentSourceTypes;
15
- private _ContentFileTypes;
16
26
  private _ContentTypeAttributes;
17
27
  private _ContentSourceTypeParams;
18
- /** All content types, cached at startup */
28
+ /** Shortcut to KnowledgeHubMetadataEngine */
29
+ private get khEngine();
30
+ /** All content types — delegated to KnowledgeHubMetadataEngine */
19
31
  get ContentTypes(): MJContentTypeEntity[];
20
- /** All content source types, cached at startup */
32
+ /** All content source types delegated to KnowledgeHubMetadataEngine */
21
33
  get ContentSourceTypes(): MJContentSourceTypeEntity[];
22
- /** All content file types, cached at startup */
34
+ /** All content file types delegated to KnowledgeHubMetadataEngine */
23
35
  get ContentFileTypes(): MJContentFileTypeEntity[];
24
36
  /** All content type attributes, cached at startup */
25
37
  get ContentTypeAttributes(): MJContentTypeAttributeEntity[];
@@ -30,7 +42,19 @@ export declare class AutotagBaseEngine extends BaseEngine<AutotagBaseEngine> {
30
42
  * Given a list of content items, extract the text from each and process with LLM for tagging.
31
43
  * Items are processed in configurable batches with controlled concurrency within each batch.
32
44
  */
33
- ExtractTextAndProcessWithLLM(contentItems: MJContentItemEntity[], contextUser: UserInfo, batchSize?: number, onProgress?: (processed: number, total: number, currentItem?: string) => void): Promise<void>;
45
+ /**
46
+ * Process content items through the LLM tagging pipeline with production-grade
47
+ * batch management: cursor-based resume, pause/cancel support, rate limiting,
48
+ * and circuit breaker. Each batch checkpoints progress so interrupted runs
49
+ * can be resumed from where they left off.
50
+ *
51
+ * @param contentItems - items to process
52
+ * @param contextUser - current user for permissions/audit
53
+ * @param processRun - optional ContentProcessRun entity for checkpoint tracking
54
+ * @param config - optional pipeline configuration for rate limits, thresholds
55
+ * @param onProgress - optional callback for UI progress updates
56
+ */
57
+ ExtractTextAndProcessWithLLM(contentItems: MJContentItemEntity[], contextUser: UserInfo, processRun?: MJContentProcessRunEntity, config?: MJContentProcessRunEntity_IContentProcessRunConfiguration, onProgress?: (processed: number, total: number, currentItem?: string) => void): Promise<void>;
34
58
  /**
35
59
  * Builds processing parameters for a single content item
36
60
  */
@@ -39,11 +63,76 @@ export declare class AutotagBaseEngine extends BaseEngine<AutotagBaseEngine> {
39
63
  * Process a content item's text with the LLM and save results.
40
64
  */
41
65
  ProcessContentItemText(params: ContentItemProcessParams, contextUser: UserInfo): Promise<void>;
66
+ /** Update embedding status for a batch of content items */
67
+ private updateEmbeddingStatusBatch;
68
+ /** Update a content item's TaggingStatus and LastTaggedAt */
69
+ private updateContentItemTaggingStatus;
42
70
  /**
43
71
  * Resolves the "Content Autotagging" prompt from the AIEngine cache.
44
72
  * Throws if the prompt is not found or not active.
45
73
  */
46
74
  private getAutotagPrompt;
75
+ /**
76
+ * Optional taxonomy JSON string to inject into the autotagging prompt.
77
+ * Set by the caller (e.g., AutotagEntity) before calling ExtractTextAndProcessWithLLM.
78
+ * When set, the prompt template receives an `existingTaxonomy` variable containing
79
+ * the JSON tree of existing tags so the LLM can prefer existing tags.
80
+ */
81
+ TaxonomyContext: string | null;
82
+ /**
83
+ * When true, skip checksum comparison and reprocess all content items
84
+ * even if their content hasn't changed. Useful when changing embedding models,
85
+ * LLM models, or vector databases.
86
+ */
87
+ ForceReprocess: boolean;
88
+ /** Rate limiter for LLM (tagging) API calls */
89
+ LLMRateLimiter: RateLimiter;
90
+ /** Rate limiter for embedding API calls */
91
+ EmbeddingRateLimiter: RateLimiter;
92
+ /** Rate limiter for vector DB API calls */
93
+ VectorDBRateLimiter: RateLimiter;
94
+ /**
95
+ * Initialize the taxonomy bridge so ALL content source types (RSS, Entity, Website, etc.)
96
+ * automatically create formal Tag + TaggedItem records from LLM-generated ContentItemTags.
97
+ *
98
+ * This sets up:
99
+ * 1. TagEngine with semantic embeddings for tag matching
100
+ * 2. TaxonomyContext for prompt injection (tells LLM about existing tags)
101
+ * 3. OnContentItemTagSaved callback that bridges ContentItemTag → Tag + TaggedItem
102
+ *
103
+ * Call this ONCE before running any providers. The bridge stays active until
104
+ * CleanupTaxonomyBridge() is called.
105
+ */
106
+ InitializeTaxonomyBridge(contextUser: UserInfo): Promise<void>;
107
+ /**
108
+ * Clean up the taxonomy bridge after all providers have finished.
109
+ */
110
+ CleanupTaxonomyBridge(): void;
111
+ /**
112
+ * Build a markdown-formatted taxonomy for LLM prompt injection.
113
+ * Uses heading levels for hierarchy depth (# for root, ## for child, etc.)
114
+ * so the LLM can return tag paths like "Root / Child / Grandchild".
115
+ */
116
+ private buildTaxonomyMarkdown;
117
+ /**
118
+ * Bridge a ContentItemTag to the formal MJ Tag taxonomy.
119
+ * Uses TagEngine.ResolveTag() in auto-grow mode by default.
120
+ *
121
+ * After resolving/creating the formal Tag, also creates a TaggedItem record:
122
+ * - For Entity sources: tags the original entity record (e.g., Products row)
123
+ * - For non-Entity sources (RSS, Website, etc.): tags the ContentItem itself
124
+ */
125
+ private BridgeContentItemTagToTaxonomy;
126
+ /**
127
+ * Creates a TaggedItem record linking a formal Tag to the appropriate entity record.
128
+ *
129
+ * For Entity-sourced content items: resolves the EntityRecordDocument to find the
130
+ * original entity (e.g., Products) and record ID, then tags that entity record.
131
+ *
132
+ * For non-Entity-sourced content items (RSS, Website, Cloud Storage): tags the
133
+ * ContentItem itself (EntityID = "MJ: Content Items" entity, RecordID = content item ID).
134
+ */
135
+ private createTaggedItemFromContentItemTag;
47
136
  /**
48
137
  * Builds template data for the autotagging prompt from processing params and chunk context.
49
138
  */
@@ -71,9 +160,19 @@ export declare class AutotagBaseEngine extends BaseEngine<AutotagBaseEngine> {
71
160
  * Simple character-based chunking as fallback
72
161
  */
73
162
  private fallbackChunkText;
163
+ /**
164
+ * Optional callback invoked after each ContentItemTag is saved, enabling the
165
+ * tag taxonomy bridge (ContentItemTag → Tag + TaggedItem). Set by providers
166
+ * like AutotagEntity that want to link free-text tags to formal taxonomy entries.
167
+ *
168
+ * Parameters: (contentItemTag: MJContentItemTagEntity, parentTag: string | null, contextUser: UserInfo)
169
+ */
170
+ OnContentItemTagSaved: ((tag: MJContentItemTagEntity, parentTag: string | null, contextUser: UserInfo) => Promise<void>) | null;
74
171
  /**
75
172
  * Saves keyword tags from LLM results as Content Item Tags.
76
173
  * Uses batched saves for better performance.
174
+ * After each tag is saved, invokes the OnContentItemTagSaved callback (if set)
175
+ * for taxonomy bridge processing.
77
176
  */
78
177
  saveContentItemTags(contentItemID: string, LLMResults: JsonObject, contextUser: UserInfo): Promise<void>;
79
178
  /**
@@ -83,8 +182,14 @@ export declare class AutotagBaseEngine extends BaseEngine<AutotagBaseEngine> {
83
182
  saveResultsToContentItemAttribute(LLMResults: JsonObject, contextUser: UserInfo): Promise<void>;
84
183
  /**
85
184
  * Retrieves all content sources for a given content source type.
185
+ * Throws if no sources are found.
86
186
  */
87
187
  getAllContentSources(contextUser: UserInfo, contentSourceTypeID: string): Promise<MJContentSourceEntity[]>;
188
+ /**
189
+ * Retrieves all content sources for a given content source type.
190
+ * Returns an empty array (instead of throwing) when no sources are configured.
191
+ */
192
+ GetAllContentSourcesSafe(_contextUser: UserInfo, contentSourceTypeID: string): Promise<MJContentSourceEntity[]>;
88
193
  SetSubclassContentSourceType(subclass: string): string;
89
194
  getContentSourceParams(contentSource: MJContentSourceEntity, contextUser: UserInfo): Promise<Map<string, ContentSourceTypeParamValue>>;
90
195
  GetDefaultContentSourceTypeParams(contentSourceTypeParamID: string): ContentSourceTypeParams;
@@ -113,9 +218,33 @@ export declare class AutotagBaseEngine extends BaseEngine<AutotagBaseEngine> {
113
218
  getChecksumFromText(text: string): Promise<string>;
114
219
  getContentItemIDFromURL(contentSourceParams: ContentSourceParams, contextUser: UserInfo): Promise<string>;
115
220
  /**
116
- * Saves process run metadata to the database.
221
+ * Saves process run metadata to the database (backward-compatible simple version).
117
222
  */
118
223
  saveProcessRun(processRunParams: ProcessRunParams, contextUser: UserInfo): Promise<void>;
224
+ /**
225
+ * Create a new ContentProcessRun record for batched pipeline execution.
226
+ * Returns the entity so the caller can update cursor/status as batches complete.
227
+ * Uses the JSONType ConfigurationObject for strongly-typed configuration.
228
+ */
229
+ CreateBatchedProcessRun(sourceID: string, totalItemCount: number, batchSize: number, contextUser: UserInfo, config?: MJContentProcessRunEntity_IContentProcessRunConfiguration): Promise<MJContentProcessRunEntity>;
230
+ /**
231
+ * Update a batched process run's cursor position after a batch completes.
232
+ * Checks CancellationRequested to support pause/cancel.
233
+ * @returns true if processing should continue, false if cancelled/paused
234
+ */
235
+ UpdateBatchCursor(processRun: MJContentProcessRunEntity, processedCount: number, errorCount: number): Promise<boolean>;
236
+ /**
237
+ * Complete a batched process run (success or failure).
238
+ */
239
+ CompleteBatchedProcessRun(processRun: MJContentProcessRunEntity, status: 'Completed' | 'Failed' | 'Cancelled', errorMessage?: string): Promise<void>;
240
+ /**
241
+ * Create rate limiters from the pipeline configuration.
242
+ */
243
+ CreateRateLimiters(config?: MJContentProcessRunEntity_IContentProcessRunConfiguration): {
244
+ llm: RateLimiter;
245
+ embedding: RateLimiter;
246
+ vectorDB: RateLimiter;
247
+ };
119
248
  parsePDF(dataBuffer: Buffer): Promise<string>;
120
249
  parseDOCX(dataBuffer: Buffer): Promise<string>;
121
250
  parseHTML(data: string): Promise<string>;
@@ -126,16 +255,51 @@ export declare class AutotagBaseEngine extends BaseEngine<AutotagBaseEngine> {
126
255
  * from per-ContentSource overrides, per-ContentType defaults, or the global fallback
127
256
  * (first active VectorIndex). Each group is processed in configurable batches with
128
257
  * parallel upserts within each batch.
258
+ *
259
+ * Uses AIModelRunner to create AIPromptRun records for each embedding batch,
260
+ * enabling token/cost tracking and linking to ContentProcessRunDetail records.
261
+ *
262
+ * @param items - content items to vectorize
263
+ * @param contextUser - current user for permissions/audit
264
+ * @param onProgress - optional callback for progress updates
265
+ * @param batchSize - number of items per embedding batch
266
+ * @returns counts of vectorized/skipped items and collected AIPromptRun IDs
129
267
  */
130
- VectorizeContentItems(items: MJContentItemEntity[], contextUser: UserInfo, onProgress?: (processed: number, total: number) => void, batchSize?: number): Promise<{
131
- vectorized: number;
132
- skipped: number;
133
- }>;
268
+ VectorizeContentItems(items: MJContentItemEntity[], contextUser: UserInfo, onProgress?: (processed: number, total: number) => void, batchSize?: number): Promise<VectorizeResult>;
134
269
  /**
135
270
  * Process a single infrastructure group: embed texts in batches and upsert to vector DB.
136
- * Upserts within each batch run in parallel for throughput.
271
+ * Uses AIModelRunner for each embedding batch to create AIPromptRun records with
272
+ * token/cost tracking. Upserts within each batch run in parallel for throughput.
273
+ *
274
+ * @param items - content items in this infrastructure group
275
+ * @param infra - resolved embedding + vector DB infrastructure
276
+ * @param tagMap - pre-loaded tags for metadata enrichment
277
+ * @param batchSize - number of items per embedding batch
278
+ * @param contextUser - current user for AIModelRunner tracking
279
+ * @param onBatchComplete - callback invoked after each batch with item count
280
+ * @returns count of vectorized items and collected AIPromptRun IDs
137
281
  */
138
282
  private vectorizeGroup;
283
+ /**
284
+ * Resolve the "Content Embedding" prompt ID from AIEngine for AIModelRunner tracking.
285
+ * Returns undefined if the prompt is not found (AIModelRunner will fall back to
286
+ * the first active Embedding-type prompt).
287
+ */
288
+ private resolveEmbeddingPromptID;
289
+ /**
290
+ * Build text chunks for a batch of content items. Items with long text
291
+ * produce multiple chunks via TextChunker.
292
+ */
293
+ private buildChunksForBatch;
294
+ /**
295
+ * Build VectorRecord objects from embedding chunks and their corresponding vectors.
296
+ */
297
+ private buildVectorRecords;
298
+ /**
299
+ * Upsert vector records to the vector database in sub-batches with rate limiting.
300
+ * Returns true if all sub-batches succeeded.
301
+ */
302
+ private upsertVectorRecords;
139
303
  /**
140
304
  * Load content source and content type records for all unique source/type IDs
141
305
  * referenced by the given items. Returns maps keyed by normalized ID.
@@ -164,12 +328,12 @@ export declare class AutotagBaseEngine extends BaseEngine<AutotagBaseEngine> {
164
328
  */
165
329
  private buildVectorInfrastructure;
166
330
  /**
167
- * Fallback: resolve infrastructure from the first active VectorIndex (original behavior).
331
+ * Fallback: resolve infrastructure from the first available VectorIndex (original behavior).
168
332
  */
169
333
  private getDefaultVectorInfrastructure;
170
334
  /**
171
- * Shared helper: given a vector index record and embedding model ID, resolve all
172
- * driver instances needed for embedding + upsert.
335
+ * Shared helper: given vector index details and embedding model ID, resolve all
336
+ * driver instances needed for embedding + upsert. Uses AIEngine for Vector Databases.
173
337
  */
174
338
  private createInfrastructureFromIndex;
175
339
  /** Find an embedding model by ID in AIEngine, with helpful error reporting */
@@ -181,10 +345,146 @@ export declare class AutotagBaseEngine extends BaseEngine<AutotagBaseEngine> {
181
345
  /** SHA-1 deterministic vector ID for a content item */
182
346
  private contentItemVectorId;
183
347
  /** Build the text that gets embedded: Title + Description + full Text */
184
- private buildEmbeddingText;
348
+ /**
349
+ * Max tokens per embedding chunk. text-embedding-3-small supports 8,191 tokens.
350
+ * We use a conservative limit to avoid hitting the boundary.
351
+ */
352
+ private static readonly MAX_EMBEDDING_TOKENS;
353
+ /**
354
+ * Build the text to embed for a content item, and chunk it if it exceeds
355
+ * the embedding model's token limit. Returns one or more text chunks.
356
+ */
357
+ private buildEmbeddingChunks;
185
358
  /** Build metadata stored alongside the vector — truncate large text fields */
186
359
  private buildVectorMetadata;
187
360
  /** Load all tags for the given items in a single RunView call */
188
361
  private loadTagsForItems;
362
+ /**
363
+ * Attempts to recompute tag co-occurrence data after the LLM tagging pipeline completes.
364
+ * Uses dynamic import to avoid a hard dependency on the tag-engine package.
365
+ * If TagCoOccurrenceEngine is not available or fails, it logs a warning and continues.
366
+ */
367
+ private recomputeCoOccurrenceIfAvailable;
368
+ /**
369
+ * Detects duplicate content items by matching the given item's checksum against
370
+ * other content items from **different** content sources. When an exact checksum
371
+ * match is found, a {@link MJContentItemDuplicateEntity} record is created with
372
+ * `DetectionMethod = 'Checksum'` and `SimilarityScore = 1.0`.
373
+ *
374
+ * Duplicate pairs are stored in canonical order (lower ID = ContentItemAID) to
375
+ * prevent mirror duplicates. If a duplicate pair already exists for the same
376
+ * detection method, no new record is created.
377
+ *
378
+ * @param contentItem - The content item whose checksum should be checked for duplicates.
379
+ * Must already be saved (i.e., have a valid ID and Checksum).
380
+ * @param contextUser - The authenticated user context for data access and audit.
381
+ * @returns A promise that resolves when detection is complete. Does not throw on
382
+ * failure — errors are logged and swallowed to avoid disrupting the pipeline.
383
+ */
384
+ DetectChecksumDuplicates(contentItem: MJContentItemEntity, contextUser: UserInfo): Promise<void>;
385
+ /**
386
+ * Detects duplicate content items by matching the given item's title (Name field)
387
+ * against other content items from **different** content sources. When an exact
388
+ * title match is found, a {@link MJContentItemDuplicateEntity} record is created
389
+ * with `DetectionMethod = 'Title'` and `SimilarityScore = 1.0`.
390
+ *
391
+ * Duplicate pairs are stored in canonical order (lower ID = ContentItemAID) to
392
+ * prevent mirror duplicates. If a duplicate pair already exists for the same
393
+ * detection method, no new record is created.
394
+ *
395
+ * @param contentItem - The content item whose title should be checked for duplicates.
396
+ * Must already be saved (i.e., have a valid ID and Name).
397
+ * @param contextUser - The authenticated user context for data access and audit.
398
+ * @returns A promise that resolves when detection is complete. Does not throw on
399
+ * failure — errors are logged and swallowed to avoid disrupting the pipeline.
400
+ */
401
+ DetectTitleDuplicates(contentItem: MJContentItemEntity, contextUser: UserInfo): Promise<void>;
402
+ /**
403
+ * Runs all non-vector deduplication checks (checksum and title) for a content item.
404
+ * This is a convenience method intended to be called after saving/updating a content item.
405
+ *
406
+ * @param contentItem - The saved content item to check for duplicates.
407
+ * @param contextUser - The authenticated user context for data access and audit.
408
+ */
409
+ DetectDuplicates(contentItem: MJContentItemEntity, contextUser: UserInfo): Promise<void>;
410
+ /**
411
+ * Detects near-duplicate content items by querying the vector index for items
412
+ * with high cosine similarity (> 0.95 threshold). Only creates duplicate records
413
+ * for matches from DIFFERENT content sources to avoid self-matches.
414
+ *
415
+ * This is expensive so it only checks the top 3 most similar results.
416
+ * Controlled by the `enableVectorDedup` flag.
417
+ *
418
+ * @param contentItem - The content item to check (must have text and be vectorized).
419
+ * @param contextUser - The authenticated user context for data access and audit.
420
+ * @param enableVectorDedup - Whether to run vector-based dedup (default false).
421
+ */
422
+ DetectVectorDuplicates(contentItem: MJContentItemEntity, contextUser: UserInfo, enableVectorDedup?: boolean): Promise<void>;
423
+ /**
424
+ * Internal implementation of vector-based dedup. Resolves the vector infrastructure
425
+ * for the item, embeds its text, queries for similar vectors, and creates duplicate
426
+ * records for high-similarity matches from different sources.
427
+ */
428
+ private performVectorDedupCheck;
429
+ /**
430
+ * Check if a content item belongs to a different source than the given sourceID.
431
+ */
432
+ private isFromDifferentSource;
433
+ /**
434
+ * Resolves a duplicate record by updating its Status and Resolution fields.
435
+ *
436
+ * @param duplicateID - The ID of the ContentItemDuplicate record.
437
+ * @param resolution - The resolution choice: 'KeepA', 'KeepB', 'NotDuplicate'.
438
+ * @param contextUser - The authenticated user context.
439
+ */
440
+ ResolveContentDuplicate(duplicateID: string, resolution: 'KeepA' | 'KeepB' | 'NotDuplicate', contextUser: UserInfo): Promise<boolean>;
441
+ /**
442
+ * Applies the resolution to a duplicate record by setting the Status and Resolution fields.
443
+ */
444
+ private applyDuplicateResolution;
445
+ /**
446
+ * Finds content items with the same checksum from different content sources.
447
+ *
448
+ * @param checksum - The SHA-256 checksum to search for.
449
+ * @param excludeSourceID - The content source ID to exclude (the item's own source).
450
+ * @param excludeItemID - The content item ID to exclude (the item itself).
451
+ * @param contextUser - The authenticated user context.
452
+ * @returns An array of matching content items (simple objects with ID field).
453
+ */
454
+ private findItemsByChecksum;
455
+ /**
456
+ * Finds content items with the same title (Name) from different content sources.
457
+ *
458
+ * @param title - The title to search for (exact match).
459
+ * @param excludeSourceID - The content source ID to exclude (the item's own source).
460
+ * @param excludeItemID - The content item ID to exclude (the item itself).
461
+ * @param contextUser - The authenticated user context.
462
+ * @returns An array of matching content items (simple objects with ID field).
463
+ */
464
+ private findItemsByTitle;
465
+ /**
466
+ * Creates a {@link MJContentItemDuplicateEntity} record for a detected duplicate pair,
467
+ * but only if one does not already exist for the same pair and detection method.
468
+ *
469
+ * IDs are stored in canonical order: the lexicographically smaller ID is always
470
+ * ContentItemAID to prevent mirror duplicates (A,B) vs (B,A).
471
+ *
472
+ * @param itemAID - One of the duplicate item IDs.
473
+ * @param itemBID - The other duplicate item ID.
474
+ * @param similarityScore - The similarity score (0.0 to 1.0).
475
+ * @param detectionMethod - How the duplicate was detected.
476
+ * @param contextUser - The authenticated user context.
477
+ */
478
+ private createDuplicateRecordIfNotExists;
479
+ /**
480
+ * Checks whether a duplicate record already exists for the given pair and detection method.
481
+ *
482
+ * @param canonicalAID - The canonical (ordered) ContentItemAID.
483
+ * @param canonicalBID - The canonical (ordered) ContentItemBID.
484
+ * @param detectionMethod - The detection method to check.
485
+ * @param contextUser - The authenticated user context.
486
+ * @returns True if a record already exists.
487
+ */
488
+ private duplicatePairExists;
189
489
  }
190
490
  //# sourceMappingURL=AutotagBaseEngine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AutotagBaseEngine.d.ts","sourceRoot":"","sources":["../../../src/Engine/generic/AutotagBaseEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA4B,iBAAiB,EAAqB,QAAQ,EAAuB,MAAM,sBAAsB,CAAA;AAEhJ,OAAO,EACH,qBAAqB,EAAE,mBAAmB,EAAE,uBAAuB,EACxC,mBAAmB,EAAE,yBAAyB,EACzE,4BAA4B,EACE,8BAA8B,EAC/D,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAA;AAI3G,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CA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