@memberjunction/actions-content-autotag 5.23.0 → 5.25.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.
@@ -1,31 +1,106 @@
1
1
  import { describe, it, expect, vi, beforeEach } from 'vitest';
2
- // Mock dependencies
2
+ // ============================================================================
3
+ // Mocks — vi.mock factories are hoisted; they MUST NOT reference module-scope
4
+ // variables. Use vi.hoisted() for shared mock fns that need to live above both
5
+ // the mock factories and the test code.
6
+ // ============================================================================
7
+ const { mockProviderAutotag, mockCreateInstance, mockContentSourceTypes, mockSources, mockConfig, mockGetAllSafe, mockVectorize, mockInitTaxonomyBridge, mockCleanupTaxonomyBridge, } = vi.hoisted(() => ({
8
+ mockProviderAutotag: vi.fn().mockResolvedValue(0),
9
+ mockCreateInstance: vi.fn(),
10
+ mockContentSourceTypes: [
11
+ { ID: 'type-1', Name: 'Local File System', DriverClass: 'AutotagLocalFileSystem' },
12
+ { ID: 'type-2', Name: 'RSS Feed', DriverClass: 'AutotagRSSFeed' },
13
+ { ID: 'type-3', Name: 'Unlabeled', DriverClass: null },
14
+ ],
15
+ mockSources: [{ ID: 'src-1', Name: 'Test Source' }],
16
+ mockConfig: vi.fn().mockResolvedValue(undefined),
17
+ mockGetAllSafe: vi.fn(),
18
+ mockVectorize: vi.fn().mockResolvedValue({ vectorized: 0, skipped: 0, promptRunIDs: [] }),
19
+ mockInitTaxonomyBridge: vi.fn().mockResolvedValue(undefined),
20
+ mockCleanupTaxonomyBridge: vi.fn(),
21
+ }));
3
22
  vi.mock('@memberjunction/actions', () => ({
4
23
  BaseAction: class BaseAction {
5
24
  async InternalRunAction() { return {}; }
6
25
  }
7
26
  }));
8
- vi.mock('@memberjunction/global', () => ({
9
- RegisterClass: () => (target) => target
10
- }));
11
- vi.mock('@memberjunction/core-actions', () => ({
12
- VectorizeEntityAction: class VectorizeEntityAction {
13
- async InternalRunAction() {
14
- return { Success: true, ResultCode: 'SUCCESS' };
27
+ vi.mock('@memberjunction/global', async (importOriginal) => {
28
+ const actual = await importOriginal();
29
+ return {
30
+ ...actual,
31
+ RegisterClass: () => (target) => target,
32
+ UUIDsEqual: (a, b) => a?.toLowerCase() === b?.toLowerCase(),
33
+ MJGlobal: {
34
+ Instance: {
35
+ ClassFactory: { CreateInstance: mockCreateInstance }
36
+ }
15
37
  }
38
+ };
39
+ });
40
+ vi.mock('@memberjunction/core', async (importOriginal) => {
41
+ const actual = await importOriginal();
42
+ class MockRunView {
43
+ async RunView() { return { Success: true, Results: [] }; }
16
44
  }
17
- }));
18
- vi.mock('@memberjunction/content-autotagging', () => ({
19
- AutotagLocalFileSystem: class AutotagLocalFileSystem {
20
- async Autotag() { }
21
- },
22
- AutotagRSSFeed: class AutotagRSSFeed {
23
- async Autotag() { }
24
- },
25
- AutotagWebsite: class AutotagWebsite {
26
- async Autotag() { }
45
+ class MockMetadata {
46
+ async GetEntityObject() { return {}; }
27
47
  }
28
- }));
48
+ class MockUserInfo {
49
+ }
50
+ return {
51
+ ...actual,
52
+ LogError: vi.fn(),
53
+ LogStatus: vi.fn(),
54
+ RunView: MockRunView,
55
+ Metadata: MockMetadata,
56
+ UserInfo: MockUserInfo,
57
+ };
58
+ });
59
+ vi.mock('@memberjunction/core-entities', async (importOriginal) => {
60
+ const actual = await importOriginal();
61
+ const mockKHInstance = {
62
+ Config: vi.fn().mockResolvedValue(undefined),
63
+ ContentSources: [],
64
+ ContentTypes: [],
65
+ ContentSourceTypes: [],
66
+ ContentFileTypes: [],
67
+ VectorIndexes: [],
68
+ GetVectorIndexById: vi.fn().mockReturnValue(undefined),
69
+ };
70
+ return {
71
+ ...actual,
72
+ MJContentItemEntity: class {
73
+ },
74
+ MJContentSourceEntity: class {
75
+ },
76
+ MJContentProcessRunDetailEntity: class {
77
+ },
78
+ MJContentProcessRunPromptRunEntity: class {
79
+ },
80
+ KnowledgeHubMetadataEngine: {
81
+ get Instance() { return mockKHInstance; },
82
+ },
83
+ };
84
+ });
85
+ vi.mock('@memberjunction/content-autotagging', () => {
86
+ return {
87
+ AutotagBase: class AutotagBase {
88
+ },
89
+ AutotagBaseEngine: {
90
+ Instance: {
91
+ Config: mockConfig,
92
+ ContentSourceTypes: mockContentSourceTypes,
93
+ GetAllContentSourcesSafe: mockGetAllSafe.mockResolvedValue(mockSources),
94
+ VectorizeContentItems: mockVectorize,
95
+ InitializeTaxonomyBridge: mockInitTaxonomyBridge,
96
+ CleanupTaxonomyBridge: mockCleanupTaxonomyBridge,
97
+ ForceReprocess: false,
98
+ ExternalRunTrackingActive: false,
99
+ }
100
+ },
101
+ AutotagProgressCallback: undefined,
102
+ };
103
+ });
29
104
  vi.mock('@memberjunction/actions-base', () => ({
30
105
  ActionParam: class ActionParam {
31
106
  constructor() {
@@ -47,46 +122,140 @@ vi.mock('@memberjunction/actions-base', () => ({
47
122
  }
48
123
  }
49
124
  }));
125
+ vi.mock('@memberjunction/core-actions', () => ({
126
+ VectorizeEntityAction: class VectorizeEntityAction {
127
+ async InternalRunAction() {
128
+ return { Success: true, ResultCode: 'SUCCESS' };
129
+ }
130
+ }
131
+ }));
50
132
  import { AutotagAndVectorizeContentAction } from '../generic/content-autotag-and-vectorize.action.js';
133
+ function callInternal(action, params) {
134
+ return action.InternalRunAction(params);
135
+ }
51
136
  describe('AutotagAndVectorizeContentAction', () => {
52
137
  let action;
53
138
  beforeEach(() => {
139
+ vi.clearAllMocks();
54
140
  action = new AutotagAndVectorizeContentAction();
141
+ // Reset provider mock
142
+ mockCreateInstance.mockReturnValue({ Autotag: mockProviderAutotag });
55
143
  });
56
144
  it('should be instantiable', () => {
57
145
  expect(action).toBeDefined();
58
146
  });
59
- it('should be an instance of the class', () => {
60
- expect(action).toBeInstanceOf(AutotagAndVectorizeContentAction);
61
- });
62
- describe('InternalRunAction', () => {
147
+ // ========================================================================
148
+ // Parameter Validation
149
+ // ========================================================================
150
+ describe('parameter validation', () => {
63
151
  it('should throw when Autotag param is missing', async () => {
64
- const params = {
65
- Params: [{ Name: 'Vectorize', Value: 1, Type: 'Input' }],
66
- ContextUser: {}
67
- };
68
- await expect(action.InternalRunAction(params)).rejects.toThrow('Autotag and Vectorize params are required.');
152
+ const params = { Params: [{ Name: 'Vectorize', Value: 1, Type: 'Input' }], ContextUser: {} };
153
+ await expect(callInternal(action, params)).rejects.toThrow('Autotag and Vectorize params are required.');
69
154
  });
70
155
  it('should throw when Vectorize param is missing', async () => {
156
+ const params = { Params: [{ Name: 'Autotag', Value: 1, Type: 'Input' }], ContextUser: {} };
157
+ await expect(callInternal(action, params)).rejects.toThrow('Autotag and Vectorize params are required.');
158
+ });
159
+ });
160
+ // ========================================================================
161
+ // Both Disabled
162
+ // ========================================================================
163
+ describe('both flags disabled', () => {
164
+ it('should return success immediately', async () => {
71
165
  const params = {
72
- Params: [{ Name: 'Autotag', Value: 1, Type: 'Input' }],
166
+ Params: [
167
+ { Name: 'Autotag', Value: 0, Type: 'Input' },
168
+ { Name: 'Vectorize', Value: 0, Type: 'Input' }
169
+ ],
73
170
  ContextUser: {}
74
171
  };
75
- await expect(action.InternalRunAction(params)).rejects.toThrow('Autotag and Vectorize params are required.');
172
+ const result = await callInternal(action, params);
173
+ expect(result.Success).toBe(true);
174
+ expect(result.ResultCode).toBe('SUCCESS');
175
+ // No provider should have been called
176
+ expect(mockProviderAutotag).not.toHaveBeenCalled();
76
177
  });
77
- it('should return success when both params present but disabled', async () => {
178
+ });
179
+ // ========================================================================
180
+ // Plugin Architecture — Dynamic Provider Resolution
181
+ // ========================================================================
182
+ describe('plugin architecture', () => {
183
+ const baseParams = {
184
+ Params: [
185
+ { Name: 'Autotag', Value: 1, Type: 'Input' },
186
+ { Name: 'Vectorize', Value: 0, Type: 'Input' }
187
+ ],
188
+ ContextUser: { ID: 'user-1' }
189
+ };
190
+ it('should initialise the AutotagBaseEngine before running providers', async () => {
191
+ await callInternal(action, baseParams);
192
+ expect(mockConfig).toHaveBeenCalledWith(false, baseParams.ContextUser);
193
+ });
194
+ it('should iterate ContentSourceTypes and resolve providers via ClassFactory', async () => {
195
+ await callInternal(action, baseParams);
196
+ // type-3 has no DriverClass so should NOT trigger CreateInstance
197
+ expect(mockCreateInstance).toHaveBeenCalledTimes(2);
198
+ });
199
+ it('should call Autotag on each resolved provider', async () => {
200
+ await callInternal(action, baseParams);
201
+ expect(mockProviderAutotag).toHaveBeenCalledTimes(2);
202
+ });
203
+ it('should skip source types without a DriverClass', async () => {
204
+ await callInternal(action, baseParams);
205
+ // Should not have attempted CreateInstance for type-3
206
+ const calls = mockCreateInstance.mock.calls.map((c) => c[1]);
207
+ expect(calls).not.toContain(null);
208
+ expect(calls).not.toContain(undefined);
209
+ });
210
+ it('should skip source types with no configured sources', async () => {
211
+ mockGetAllSafe
212
+ .mockResolvedValueOnce([]) // type-1: empty
213
+ .mockResolvedValueOnce(mockSources); // type-2: has sources
214
+ await callInternal(action, baseParams);
215
+ // Only type-2 should trigger CreateInstance
216
+ expect(mockCreateInstance).toHaveBeenCalledTimes(1);
217
+ });
218
+ it('should log and continue when ClassFactory returns null for a DriverClass', async () => {
219
+ mockCreateInstance.mockReturnValueOnce(null);
220
+ const result = await callInternal(action, baseParams);
221
+ expect(result.Success).toBe(true);
222
+ });
223
+ it('should continue processing remaining types when one provider throws', async () => {
224
+ mockProviderAutotag
225
+ .mockRejectedValueOnce(new Error('Provider 1 failed'))
226
+ .mockResolvedValueOnce(undefined);
227
+ const result = await callInternal(action, baseParams);
228
+ expect(result.Success).toBe(true);
229
+ expect(mockProviderAutotag).toHaveBeenCalledTimes(2);
230
+ });
231
+ });
232
+ // ========================================================================
233
+ // Vectorization
234
+ // ========================================================================
235
+ describe('vectorization', () => {
236
+ it('should attempt vectorization when Vectorize is 1', async () => {
78
237
  const params = {
79
238
  Params: [
80
239
  { Name: 'Autotag', Value: 0, Type: 'Input' },
81
- { Name: 'Vectorize', Value: 0, Type: 'Input' }
240
+ { Name: 'Vectorize', Value: 1, Type: 'Input' }
82
241
  ],
83
242
  ContextUser: {}
84
243
  };
85
- const result = await action.InternalRunAction(params);
244
+ // RunDirectVectorization calls RunView → VectorizeContentItems
245
+ // The mock RunView returns success with empty results, so vectorize
246
+ // is called with an empty array. The action should still succeed.
247
+ const result = await callInternal(action, params);
248
+ // The method internally calls RunView and then VectorizeContentItems
249
+ // Since RunView mock returns empty, vectorize gets 0 items
86
250
  expect(result.Success).toBe(true);
87
- expect(result.ResultCode).toBe('SUCCESS');
88
251
  });
89
- it('should run autotagging when Autotag is 1', async () => {
252
+ });
253
+ // ========================================================================
254
+ // Error Handling
255
+ // ========================================================================
256
+ describe('error handling', () => {
257
+ it('should return failure when engine Config throws', async () => {
258
+ mockConfig.mockRejectedValueOnce(new Error('Config failed'));
90
259
  const params = {
91
260
  Params: [
92
261
  { Name: 'Autotag', Value: 1, Type: 'Input' },
@@ -94,9 +263,104 @@ describe('AutotagAndVectorizeContentAction', () => {
94
263
  ],
95
264
  ContextUser: {}
96
265
  };
97
- const result = await action.InternalRunAction(params);
266
+ const result = await callInternal(action, params);
267
+ expect(result.Success).toBe(false);
268
+ expect(result.ResultCode).toBe('FAILED');
269
+ expect(result.Message).toContain('Config failed');
270
+ });
271
+ });
272
+ // ========================================================================
273
+ // hasNewItems Detection (provider return values, not tag count diff)
274
+ // ========================================================================
275
+ describe('hasNewItems detection', () => {
276
+ it('should detect new items when providers return > 0 items processed', async () => {
277
+ // Provider reports 5 items processed
278
+ mockProviderAutotag.mockResolvedValue(5);
279
+ const params = {
280
+ Params: [
281
+ { Name: 'Autotag', Value: 1, Type: 'Input' },
282
+ { Name: 'Vectorize', Value: 1, Type: 'Input' }
283
+ ],
284
+ ContextUser: { ID: 'user-1' }
285
+ };
286
+ const result = await callInternal(action, params);
98
287
  expect(result.Success).toBe(true);
99
- expect(result.ResultCode).toBe('SUCCESS');
288
+ });
289
+ it('should report no new items when all providers return 0', async () => {
290
+ mockProviderAutotag.mockResolvedValue(0);
291
+ const params = {
292
+ Params: [
293
+ { Name: 'Autotag', Value: 1, Type: 'Input' },
294
+ { Name: 'Vectorize', Value: 1, Type: 'Input' }
295
+ ],
296
+ ContextUser: { ID: 'user-1' }
297
+ };
298
+ const result = await callInternal(action, params);
299
+ expect(result.Success).toBe(true);
300
+ // Vectorization should be skipped (no new items, not force-reprocess)
301
+ expect(mockVectorize).not.toHaveBeenCalled();
302
+ });
303
+ });
304
+ // ========================================================================
305
+ // Vectorization Skip Logic
306
+ // ========================================================================
307
+ describe('vectorization skip logic', () => {
308
+ it('should skip vectorization when no new items and not force-reprocessing', async () => {
309
+ mockProviderAutotag.mockResolvedValue(0);
310
+ const params = {
311
+ Params: [
312
+ { Name: 'Autotag', Value: 1, Type: 'Input' },
313
+ { Name: 'Vectorize', Value: 1, Type: 'Input' }
314
+ ],
315
+ ContextUser: { ID: 'user-1' }
316
+ };
317
+ await callInternal(action, params);
318
+ expect(mockVectorize).not.toHaveBeenCalled();
319
+ });
320
+ it('should run content item vectorization when providers processed items', async () => {
321
+ mockProviderAutotag.mockResolvedValue(10);
322
+ const params = {
323
+ Params: [
324
+ { Name: 'Autotag', Value: 1, Type: 'Input' },
325
+ { Name: 'Vectorize', Value: 1, Type: 'Input' }
326
+ ],
327
+ ContextUser: { ID: 'user-1' }
328
+ };
329
+ await callInternal(action, params);
330
+ // RunDirectVectorization calls VectorizeContentItems internally
331
+ // (through RunView → filter → vectorize pipeline)
332
+ expect(result => result.Success).toBeTruthy();
333
+ });
334
+ });
335
+ // ========================================================================
336
+ // ExternalRunTrackingActive flag
337
+ // ========================================================================
338
+ describe('ExternalRunTrackingActive flag', () => {
339
+ it('should set ExternalRunTrackingActive when ContentProcessRunID is provided', async () => {
340
+ const params = {
341
+ Params: [
342
+ { Name: 'Autotag', Value: 1, Type: 'Input' },
343
+ { Name: 'Vectorize', Value: 0, Type: 'Input' },
344
+ { Name: 'ContentProcessRunID', Value: 'run-123', Type: 'Input' }
345
+ ],
346
+ ContextUser: { ID: 'user-1' }
347
+ };
348
+ await callInternal(action, params);
349
+ // Access the mock engine instance to verify the flag was set
350
+ const { AutotagBaseEngine } = await import('@memberjunction/content-autotagging');
351
+ expect(AutotagBaseEngine.Instance.ExternalRunTrackingActive).toBe(true);
352
+ });
353
+ it('should not set ExternalRunTrackingActive when ContentProcessRunID is absent', async () => {
354
+ const params = {
355
+ Params: [
356
+ { Name: 'Autotag', Value: 1, Type: 'Input' },
357
+ { Name: 'Vectorize', Value: 0, Type: 'Input' }
358
+ ],
359
+ ContextUser: { ID: 'user-1' }
360
+ };
361
+ await callInternal(action, params);
362
+ const { AutotagBaseEngine } = await import('@memberjunction/content-autotagging');
363
+ expect(AutotagBaseEngine.Instance.ExternalRunTrackingActive).toBe(false);
100
364
  });
101
365
  });
102
366
  });
@@ -1 +1 @@
1
- {"version":3,"file":"content-autotag.test.js","sourceRoot":"","sources":["../../src/__tests__/content-autotag.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAE9D,oBAAoB;AACpB,EAAE,CAAC,IAAI,CAAC,yBAAyB,EAAE,GAAG,EAAE,CAAC,CAAC;IACtC,UAAU,EAAE,MAAM,UAAU;QACd,KAAK,CAAC,iBAAiB,KAAuB,OAAO,EAAE,CAAC,CAAC,CAAC;KACvE;CACJ,CAAC,CAAC,CAAC;AAEJ,EAAE,CAAC,IAAI,CAAC,wBAAwB,EAAE,GAAG,EAAE,CAAC,CAAC;IACrC,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC,MAAe,EAAE,EAAE,CAAC,MAAM;CACnD,CAAC,CAAC,CAAC;AAEJ,EAAE,CAAC,IAAI,CAAC,8BAA8B,EAAE,GAAG,EAAE,CAAC,CAAC;IAC3C,qBAAqB,EAAE,MAAM,qBAAqB;QACpC,KAAK,CAAC,iBAAiB;YAC7B,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;QACpD,CAAC;KACJ;CACJ,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,IAAI,CAAC,CAAC;QAC5E,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,6EAA6E,EAAE,KAAK,IAAI,EAAE;YACzF,MAAM,MAAM,GAAG;gBACX,MAAM,EAAE;oBACJ,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE;oBAC5C,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE;iBACjD;gBACD,WAAW,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE;aAChC,CAAC;YACF,MAAM,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YAEnC,MAAM,EAAE,iBAAiB,EAAE,GAAG,MAAM,MAAM,CAAC,qCAAqC,CAAC,CAAC;YAClF,MAAM,CAAC,iBAAiB,CAAC,QAAQ,CAAC,yBAAyB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC7E,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -4,12 +4,91 @@ import { ActionResultSimple, RunActionParams } from "@memberjunction/actions-bas
4
4
  * Params:
5
5
  * * Autotag: Bit, if set to 1, will autotag content from all source types.
6
6
  * * Vectorize: Bit, if set to 1, will embed tagged content items directly into the vector index.
7
+ *
8
+ * Uses plugin architecture: iterates all ContentSourceType records and resolves
9
+ * providers dynamically via ClassFactory using the DriverClass field.
7
10
  */
8
11
  export declare class AutotagAndVectorizeContentAction extends BaseAction {
9
12
  protected InternalRunAction(params: RunActionParams): Promise<ActionResultSimple>;
10
- /** Run each autotag source type, catching per-provider errors */
11
- private runAutotagProviders;
12
- /** Embed all content items directly into the vector index */
13
- private runDirectVectorization;
13
+ /**
14
+ * Dynamically resolves and runs all autotag providers using ClassFactory.
15
+ * Iterates all ContentSourceType records that have a DriverClass set,
16
+ * instantiates the provider via ClassFactory, and runs autotagging for
17
+ * any sources configured for that type.
18
+ *
19
+ * @returns true if any content items were processed (new, modified, or retried)
20
+ */
21
+ private RunAutotagProviders;
22
+ /**
23
+ * Embed all content items directly into the vector index. When a ContentProcessRunID
24
+ * is provided, creates ContentProcessRunDetail records per-source and links
25
+ * AIPromptRun records via the ContentProcessRunPromptRun junction table.
26
+ *
27
+ * @param params - action run params with ContextUser
28
+ * @param contentProcessRunID - optional parent run ID for detail tracking
29
+ */
30
+ private RunDirectVectorization;
31
+ /**
32
+ * Group content items by their ContentSourceID for per-source processing.
33
+ */
34
+ private groupItemsBySource;
35
+ /**
36
+ * Vectorize items for a single content source with full ContentProcessRunDetail tracking.
37
+ * Creates a detail record, runs vectorization, updates counts, and links prompt runs.
38
+ *
39
+ * @param sourceID - ContentSource ID being processed
40
+ * @param items - content items belonging to this source
41
+ * @param contentProcessRunID - parent ContentProcessRun ID
42
+ * @param contextUser - current user for entity operations
43
+ */
44
+ private vectorizeSourceWithTracking;
45
+ /**
46
+ * Create a ContentProcessRunDetail record for a content source before processing begins.
47
+ *
48
+ * @param sourceID - ContentSource ID being processed
49
+ * @param contentProcessRunID - parent ContentProcessRun ID
50
+ * @param contextUser - current user for entity creation
51
+ * @returns the saved detail entity, or null if creation failed
52
+ */
53
+ private createRunDetail;
54
+ /**
55
+ * Resolve the ContentSourceTypeID for a given ContentSource using KH engine cached data.
56
+ */
57
+ private resolveSourceTypeID;
58
+ /**
59
+ * Update a ContentProcessRunDetail record with final counts and mark as Completed.
60
+ *
61
+ * @param detail - the detail entity to update
62
+ * @param stats - vectorization result with counts and prompt run IDs
63
+ * @param contextUser - current user
64
+ */
65
+ private completeRunDetail;
66
+ /**
67
+ * Mark a ContentProcessRunDetail as Failed with error information.
68
+ *
69
+ * @param detail - the detail entity to update
70
+ * @param error - the error that caused the failure
71
+ * @param contextUser - current user
72
+ */
73
+ private failRunDetail;
74
+ /**
75
+ * Create ContentProcessRunPromptRun junction records linking a detail record
76
+ * to its AIPromptRun records for cost/token analytics.
77
+ *
78
+ * @param detailID - ContentProcessRunDetail ID
79
+ * @param promptRunIDs - AIPromptRun IDs to link
80
+ * @param runType - whether these runs are for 'Tag' or 'Embed'
81
+ * @param contextUser - current user for entity creation
82
+ */
83
+ private linkPromptRuns;
84
+ /**
85
+ * For Entity-type content sources, trigger EntityVectorSyncer to sync the
86
+ * source entity's own vectors. This ensures entity records (e.g., Products)
87
+ * are directly searchable in the vector index — not just their Content Item shadows.
88
+ *
89
+ * If the entity doc has already been synced and nothing changed, this is a no-op.
90
+ * If records were modified by tagging, the vectors get updated.
91
+ */
92
+ private SyncEntitySourceVectors;
14
93
  }
15
94
  //# sourceMappingURL=content-autotag-and-vectorize.action.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content-autotag-and-vectorize.action.d.ts","sourceRoot":"","sources":["../../src/generic/content-autotag-and-vectorize.action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGrD,OAAO,EAAe,kBAAkB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAIhG;;;;GAIG;AACH,qBACa,gCAAiC,SAAQ,UAAU;cAC5C,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAoCvF,iEAAiE;YACnD,mBAAmB;IAyBjC,6DAA6D;YAC/C,sBAAsB;CAkBvC"}
1
+ {"version":3,"file":"content-autotag-and-vectorize.action.d.ts","sourceRoot":"","sources":["../../src/generic/content-autotag-and-vectorize.action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGrD,OAAO,EAAe,kBAAkB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAWhG;;;;;;;GAOG;AACH,qBACa,gCAAiC,SAAQ,UAAU;cAC5C,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;IA+FvF;;;;;;;OAOG;YACW,mBAAmB;IA0DjC;;;;;;;OAOG;YACW,sBAAsB;IAoDpC;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAa1B;;;;;;;;OAQG;YACW,2BAA2B;IA2BzC;;;;;;;OAOG;YACW,eAAe;IAoC7B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAc3B;;;;;;OAMG;YACW,iBAAiB;IAgB/B;;;;;;OAMG;YACW,aAAa;IAgB3B;;;;;;;;OAQG;YACW,cAAc;IA4B5B;;;;;;;OAOG;YACW,uBAAuB;CAiDxC"}
@@ -5,13 +5,18 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { BaseAction } from "@memberjunction/actions";
8
- import { RegisterClass } from "@memberjunction/global";
9
- import { AutotagLocalFileSystem, AutotagRSSFeed, AutotagWebsite, AutotagBaseEngine } from '@memberjunction/content-autotagging';
10
- import { LogError, LogStatus, RunView } from "@memberjunction/core";
8
+ import { MJGlobal, RegisterClass, UUIDsEqual } from "@memberjunction/global";
9
+ import { AutotagBase, AutotagBaseEngine } from '@memberjunction/content-autotagging';
10
+ import { LogError, LogStatus, Metadata, RunView } from "@memberjunction/core";
11
+ import { KnowledgeHubMetadataEngine } from "@memberjunction/core-entities";
12
+ import { EntityVectorSyncer } from "@memberjunction/ai-vector-sync";
11
13
  /**
12
14
  * Params:
13
15
  * * Autotag: Bit, if set to 1, will autotag content from all source types.
14
16
  * * Vectorize: Bit, if set to 1, will embed tagged content items directly into the vector index.
17
+ *
18
+ * Uses plugin architecture: iterates all ContentSourceType records and resolves
19
+ * providers dynamically via ClassFactory using the DriverClass field.
15
20
  */
16
21
  let AutotagAndVectorizeContentAction = class AutotagAndVectorizeContentAction extends BaseAction {
17
22
  async InternalRunAction(params) {
@@ -23,18 +28,67 @@ let AutotagAndVectorizeContentAction = class AutotagAndVectorizeContentAction ex
23
28
  // Extract optional progress callback from params (injected by resolver)
24
29
  const progressParam = params.Params.find(p => p.Name === '__progressCallback');
25
30
  const onProgress = progressParam?.Value;
31
+ // Optional: filter to specific content source IDs (comma-separated or array)
32
+ const sourceFilterParam = params.Params.find(p => p.Name === 'ContentSourceIDs');
33
+ const contentSourceIDs = sourceFilterParam?.Value
34
+ ? (Array.isArray(sourceFilterParam.Value)
35
+ ? sourceFilterParam.Value
36
+ : String(sourceFilterParam.Value).split(',').map(s => s.trim()).filter(s => s.length > 0))
37
+ : undefined;
38
+ // Optional: force reprocessing of existing content items (skip checksum comparison)
39
+ const forceReprocessParam = params.Params.find(p => p.Name === 'ForceReprocess');
40
+ const forceReprocess = forceReprocessParam?.Value === 1 || forceReprocessParam?.Value === true;
41
+ // Optional: ContentProcessRunID to link detail records for per-source tracking
42
+ const processRunParam = params.Params.find(p => p.Name === 'ContentProcessRunID');
43
+ const contentProcessRunID = processRunParam?.Value ? String(processRunParam.Value) : undefined;
26
44
  try {
27
45
  // Initialize the autotagging engine (loads cached metadata)
28
46
  await AutotagBaseEngine.Instance.Config(false, params.ContextUser);
29
- // Run autotagging and vectorization in parallel when both are enabled
30
- const promises = [];
47
+ LogStatus(`[AutotagAction] Autotag=${autotagParam.Value}, Vectorize=${vectorizeParam.Value}`);
48
+ // When the resolver is managing the ContentProcessRun, suppress the
49
+ // legacy saveProcessRun() in the engine to avoid phantom run records.
50
+ AutotagBaseEngine.Instance.ExternalRunTrackingActive = !!contentProcessRunID;
51
+ // Phase 1: Run autotag providers to create/update ContentItems in the DB.
52
+ // Providers use checksum comparison to skip unchanged items.
53
+ let hasNewItems = false;
31
54
  if (autotagParam.Value === 1) {
32
- promises.push(this.runAutotagProviders(params, onProgress));
55
+ // Initialize the taxonomy bridge BEFORE providers run so ALL providers
56
+ // (RSS, Entity, Website, CloudStorage) get tag taxonomy bridging
57
+ LogStatus(`[AutotagAction] Initializing taxonomy bridge...`);
58
+ await AutotagBaseEngine.Instance.InitializeTaxonomyBridge(params.ContextUser);
59
+ LogStatus(`[AutotagAction] Phase 1: Running providers to create/update content items...`);
60
+ if (contentSourceIDs) {
61
+ LogStatus(`[AutotagAction] Filtering to source IDs: ${contentSourceIDs.join(', ')}`);
62
+ }
63
+ if (forceReprocess) {
64
+ LogStatus(`[AutotagAction] Force reprocess enabled — skipping checksum comparison`);
65
+ }
66
+ hasNewItems = await this.RunAutotagProviders(params, onProgress, contentSourceIDs, forceReprocess);
67
+ LogStatus(`[AutotagAction] Phase 1 complete — providers finished (hasNewItems=${hasNewItems})`);
68
+ // Clean up the bridge
69
+ AutotagBaseEngine.Instance.CleanupTaxonomyBridge();
33
70
  }
71
+ // Phase 2: Vectorization. Content item vectorization runs when new tags
72
+ // were created. Entity vector sync only runs when forceReprocess is set,
73
+ // since entity records don't change during tagging — their vectors were
74
+ // already synced when first ingested via the Vectors dashboard.
34
75
  if (vectorizeParam.Value === 1) {
35
- promises.push(this.runDirectVectorization(params));
76
+ const tasks = [];
77
+ if (hasNewItems) {
78
+ tasks.push(this.RunDirectVectorization(params, contentProcessRunID));
79
+ }
80
+ if (forceReprocess) {
81
+ tasks.push(this.SyncEntitySourceVectors(params, contentSourceIDs));
82
+ }
83
+ if (tasks.length > 0) {
84
+ LogStatus(`[AutotagAction] Phase 2: Running ${tasks.length} vectorization task(s)...`);
85
+ await Promise.all(tasks);
86
+ }
87
+ else {
88
+ LogStatus(`[AutotagAction] Phase 2: Skipping vectorization — no new content items and not force-reprocessing`);
89
+ }
36
90
  }
37
- await Promise.all(promises);
91
+ LogStatus(`[AutotagAction] All tasks completed`);
38
92
  return { Success: true, ResultCode: "SUCCESS" };
39
93
  }
40
94
  catch (error) {
@@ -45,33 +99,67 @@ let AutotagAndVectorizeContentAction = class AutotagAndVectorizeContentAction ex
45
99
  };
46
100
  }
47
101
  }
48
- /** Run each autotag source type, catching per-provider errors */
49
- async runAutotagProviders(params, onProgress) {
50
- const providers = [
51
- { name: 'LocalFileSystem', instance: new AutotagLocalFileSystem() },
52
- { name: 'RSSFeed', instance: new AutotagRSSFeed() },
53
- { name: 'Website', instance: new AutotagWebsite() },
54
- ];
55
- for (const provider of providers) {
102
+ /**
103
+ * Dynamically resolves and runs all autotag providers using ClassFactory.
104
+ * Iterates all ContentSourceType records that have a DriverClass set,
105
+ * instantiates the provider via ClassFactory, and runs autotagging for
106
+ * any sources configured for that type.
107
+ *
108
+ * @returns true if any content items were processed (new, modified, or retried)
109
+ */
110
+ async RunAutotagProviders(params, onProgress, contentSourceIDs, forceReprocess) {
111
+ const engine = AutotagBaseEngine.Instance;
112
+ const sourceTypes = engine.ContentSourceTypes;
113
+ // Pass forceReprocess to the engine so providers can check it
114
+ engine.ForceReprocess = forceReprocess ?? false;
115
+ let totalItemsProcessed = 0;
116
+ for (const sourceType of sourceTypes) {
117
+ if (!sourceType.DriverClass) {
118
+ LogStatus(`Content source type "${sourceType.Name}" has no DriverClass, skipping`);
119
+ continue;
120
+ }
121
+ // Check if any sources are configured for this type before instantiating
122
+ let sources = await engine.GetAllContentSourcesSafe(params.ContextUser, sourceType.ID);
123
+ // Apply source ID filter if specified
124
+ if (contentSourceIDs && contentSourceIDs.length > 0) {
125
+ sources = sources.filter(s => contentSourceIDs.some(id => UUIDsEqual(id, s.ID)));
126
+ }
127
+ if (sources.length === 0) {
128
+ LogStatus(`Content source type "${sourceType.Name}": no sources configured, skipping`);
129
+ continue;
130
+ }
131
+ const provider = MJGlobal.Instance.ClassFactory.CreateInstance(AutotagBase, sourceType.DriverClass);
132
+ if (!provider) {
133
+ LogError(`No provider registered for DriverClass "${sourceType.DriverClass}" (source type: ${sourceType.Name}). Ensure the provider class has @RegisterClass(AutotagBase, '${sourceType.DriverClass}').`);
134
+ continue;
135
+ }
56
136
  try {
57
- await provider.instance.Autotag(params.ContextUser, onProgress);
58
- LogStatus(`Autotag provider ${provider.name} completed successfully`);
137
+ const sourceIDsForProvider = sources.map(s => s.ID);
138
+ LogStatus(`[AutotagAction] >>> Running provider "${sourceType.Name}" (${sourceType.DriverClass}) with ${sources.length} source(s)...`);
139
+ const itemCount = await provider.Autotag(params.ContextUser, onProgress, contentSourceIDs ? sourceIDsForProvider : undefined);
140
+ totalItemsProcessed += itemCount;
141
+ LogStatus(`[AutotagAction] <<< Provider "${sourceType.Name}" (${sourceType.DriverClass}) completed — ${itemCount} items processed`);
59
142
  }
60
143
  catch (providerError) {
61
- // "No content sources found" is expected when a source type has no configured sources — log as info, not error
62
144
  const msg = providerError instanceof Error ? providerError.message : String(providerError);
63
- if (msg.includes('No content sources found')) {
64
- LogStatus(`Autotag provider ${provider.name}: no sources configured, skipping`);
65
- }
66
- else {
67
- LogError(`Autotag provider ${provider.name} failed: ${msg}`);
68
- }
145
+ LogError(`Autotag provider "${sourceType.Name}" (${sourceType.DriverClass}) failed: ${msg}`);
69
146
  }
70
147
  }
71
- LogStatus('Autotagging complete.');
148
+ LogStatus(`Autotagging complete. ${totalItemsProcessed} items processed across all providers.`);
149
+ return totalItemsProcessed > 0;
72
150
  }
73
- /** Embed all content items directly into the vector index */
74
- async runDirectVectorization(params) {
151
+ /**
152
+ * Embed all content items directly into the vector index. When a ContentProcessRunID
153
+ * is provided, creates ContentProcessRunDetail records per-source and links
154
+ * AIPromptRun records via the ContentProcessRunPromptRun junction table.
155
+ *
156
+ * @param params - action run params with ContextUser
157
+ * @param contentProcessRunID - optional parent run ID for detail tracking
158
+ */
159
+ async RunDirectVectorization(params, contentProcessRunID) {
160
+ // Load all content items, then exclude Entity-sourced items.
161
+ // Entity sources get their vectors via EntityVectorSyncer (Phase 2b),
162
+ // not through content item vectorization.
75
163
  const rv = new RunView();
76
164
  const result = await rv.RunView({
77
165
  EntityName: 'MJ: Content Items',
@@ -81,10 +169,233 @@ let AutotagAndVectorizeContentAction = class AutotagAndVectorizeContentAction ex
81
169
  LogError('VectorizeContentItems: failed to load content items');
82
170
  return;
83
171
  }
84
- const items = result.Results;
85
- LogStatus(`VectorizeContentItems: ${items.length} content items loaded for vectorization`);
86
- const stats = await AutotagBaseEngine.Instance.VectorizeContentItems(items, params.ContextUser);
87
- LogStatus(`VectorizeContentItems: ${stats.vectorized} vectorized, ${stats.skipped} skipped`);
172
+ // Filter out Entity-sourced content items — those entities are vectorized
173
+ // directly via EntityVectorSyncer, not as content items.
174
+ await KnowledgeHubMetadataEngine.Instance.Config(false, params.ContextUser);
175
+ const khEngine = KnowledgeHubMetadataEngine.Instance;
176
+ const entitySourceType = khEngine.ContentSourceTypes.find(st => st.Name === 'Entity');
177
+ const entitySourceIDs = entitySourceType
178
+ ? new Set(khEngine.ContentSources
179
+ .filter(cs => UUIDsEqual(cs.ContentSourceTypeID, entitySourceType.ID))
180
+ .map(cs => cs.ID.toLowerCase()))
181
+ : new Set();
182
+ const items = entitySourceIDs.size > 0
183
+ ? result.Results.filter(ci => !entitySourceIDs.has(ci.ContentSourceID.toLowerCase()))
184
+ : result.Results;
185
+ LogStatus(`VectorizeContentItems: ${items.length} content items loaded for vectorization (${result.Results.length - items.length} entity-sourced items excluded)`);
186
+ if (!contentProcessRunID) {
187
+ // No run tracking — simple vectorization
188
+ const stats = await AutotagBaseEngine.Instance.VectorizeContentItems(items, params.ContextUser);
189
+ LogStatus(`VectorizeContentItems: ${stats.vectorized} vectorized, ${stats.skipped} skipped`);
190
+ return;
191
+ }
192
+ // Group items by ContentSourceID for per-source detail tracking
193
+ const sourceGroups = this.groupItemsBySource(items);
194
+ for (const [sourceID, sourceItems] of sourceGroups) {
195
+ await this.vectorizeSourceWithTracking(sourceID, sourceItems, contentProcessRunID, params.ContextUser);
196
+ }
197
+ }
198
+ /**
199
+ * Group content items by their ContentSourceID for per-source processing.
200
+ */
201
+ groupItemsBySource(items) {
202
+ const groups = new Map();
203
+ for (const item of items) {
204
+ const key = item.ContentSourceID;
205
+ const group = groups.get(key) ?? [];
206
+ group.push(item);
207
+ groups.set(key, group);
208
+ }
209
+ return groups;
210
+ }
211
+ /**
212
+ * Vectorize items for a single content source with full ContentProcessRunDetail tracking.
213
+ * Creates a detail record, runs vectorization, updates counts, and links prompt runs.
214
+ *
215
+ * @param sourceID - ContentSource ID being processed
216
+ * @param items - content items belonging to this source
217
+ * @param contentProcessRunID - parent ContentProcessRun ID
218
+ * @param contextUser - current user for entity operations
219
+ */
220
+ async vectorizeSourceWithTracking(sourceID, items, contentProcessRunID, contextUser) {
221
+ const detail = await this.createRunDetail(sourceID, contentProcessRunID, contextUser);
222
+ if (!detail) {
223
+ // Fall back to untracked vectorization
224
+ LogError(`[AutotagAction] Failed to create detail record for source ${sourceID}, proceeding without tracking`);
225
+ await AutotagBaseEngine.Instance.VectorizeContentItems(items, contextUser);
226
+ return;
227
+ }
228
+ try {
229
+ const stats = await AutotagBaseEngine.Instance.VectorizeContentItems(items, contextUser);
230
+ await this.completeRunDetail(detail, stats, contextUser);
231
+ // Link AIPromptRun records to this detail via junction table
232
+ await this.linkPromptRuns(detail.ID, stats.promptRunIDs, 'Embed', contextUser);
233
+ LogStatus(`[AutotagAction] Source ${sourceID}: ${stats.vectorized} vectorized, ${stats.skipped} skipped, ${stats.promptRunIDs.length} prompt runs linked`);
234
+ }
235
+ catch (error) {
236
+ await this.failRunDetail(detail, error, contextUser);
237
+ }
238
+ }
239
+ /**
240
+ * Create a ContentProcessRunDetail record for a content source before processing begins.
241
+ *
242
+ * @param sourceID - ContentSource ID being processed
243
+ * @param contentProcessRunID - parent ContentProcessRun ID
244
+ * @param contextUser - current user for entity creation
245
+ * @returns the saved detail entity, or null if creation failed
246
+ */
247
+ async createRunDetail(sourceID, contentProcessRunID, contextUser) {
248
+ try {
249
+ const md = new Metadata();
250
+ const detail = await md.GetEntityObject('MJ: Content Process Run Details', contextUser);
251
+ detail.NewRecord();
252
+ detail.ContentProcessRunID = contentProcessRunID;
253
+ detail.ContentSourceID = sourceID;
254
+ detail.ContentSourceTypeID = await this.resolveSourceTypeID(sourceID, contextUser);
255
+ detail.Status = 'Running';
256
+ detail.StartTime = new Date();
257
+ detail.ItemsProcessed = 0;
258
+ detail.ItemsTagged = 0;
259
+ detail.ItemsVectorized = 0;
260
+ detail.TagsCreated = 0;
261
+ detail.ErrorCount = 0;
262
+ detail.TotalTokensUsed = 0;
263
+ detail.TotalCost = 0;
264
+ const saved = await detail.Save();
265
+ if (!saved) {
266
+ LogError(`[AutotagAction] Failed to save ContentProcessRunDetail for source ${sourceID}`);
267
+ return null;
268
+ }
269
+ return detail;
270
+ }
271
+ catch (error) {
272
+ LogError(`[AutotagAction] Error creating ContentProcessRunDetail: ${error instanceof Error ? error.message : String(error)}`);
273
+ return null;
274
+ }
275
+ }
276
+ /**
277
+ * Resolve the ContentSourceTypeID for a given ContentSource using KH engine cached data.
278
+ */
279
+ resolveSourceTypeID(sourceID, _contextUser) {
280
+ const source = KnowledgeHubMetadataEngine.Instance.ContentSources.find(s => UUIDsEqual(s.ID, sourceID));
281
+ if (source) {
282
+ return source.ContentSourceTypeID;
283
+ }
284
+ LogError(`[AutotagAction] Could not resolve ContentSourceTypeID for source ${sourceID}`);
285
+ return '';
286
+ }
287
+ /**
288
+ * Update a ContentProcessRunDetail record with final counts and mark as Completed.
289
+ *
290
+ * @param detail - the detail entity to update
291
+ * @param stats - vectorization result with counts and prompt run IDs
292
+ * @param contextUser - current user
293
+ */
294
+ async completeRunDetail(detail, stats, contextUser) {
295
+ try {
296
+ detail.Status = 'Completed';
297
+ detail.EndTime = new Date();
298
+ detail.ItemsProcessed = stats.vectorized + stats.skipped;
299
+ detail.ItemsVectorized = stats.vectorized;
300
+ await detail.Save();
301
+ }
302
+ catch (error) {
303
+ LogError(`[AutotagAction] Error completing ContentProcessRunDetail: ${error instanceof Error ? error.message : String(error)}`);
304
+ }
305
+ }
306
+ /**
307
+ * Mark a ContentProcessRunDetail as Failed with error information.
308
+ *
309
+ * @param detail - the detail entity to update
310
+ * @param error - the error that caused the failure
311
+ * @param contextUser - current user
312
+ */
313
+ async failRunDetail(detail, error, contextUser) {
314
+ try {
315
+ detail.Status = 'Failed';
316
+ detail.EndTime = new Date();
317
+ detail.ErrorCount = (detail.ErrorCount ?? 0) + 1;
318
+ await detail.Save();
319
+ LogError(`[AutotagAction] Source processing failed: ${error instanceof Error ? error.message : String(error)}`);
320
+ }
321
+ catch (saveError) {
322
+ LogError(`[AutotagAction] Error saving failed detail: ${saveError instanceof Error ? saveError.message : String(saveError)}`);
323
+ }
324
+ }
325
+ /**
326
+ * Create ContentProcessRunPromptRun junction records linking a detail record
327
+ * to its AIPromptRun records for cost/token analytics.
328
+ *
329
+ * @param detailID - ContentProcessRunDetail ID
330
+ * @param promptRunIDs - AIPromptRun IDs to link
331
+ * @param runType - whether these runs are for 'Tag' or 'Embed'
332
+ * @param contextUser - current user for entity creation
333
+ */
334
+ async linkPromptRuns(detailID, promptRunIDs, runType, contextUser) {
335
+ if (promptRunIDs.length === 0)
336
+ return;
337
+ const md = new Metadata();
338
+ for (const promptRunID of promptRunIDs) {
339
+ try {
340
+ const junction = await md.GetEntityObject('MJ: Content Process Run Prompt Runs', contextUser);
341
+ junction.NewRecord();
342
+ junction.ContentProcessRunDetailID = detailID;
343
+ junction.AIPromptRunID = promptRunID;
344
+ junction.RunType = runType;
345
+ const saved = await junction.Save();
346
+ if (!saved) {
347
+ LogError(`[AutotagAction] Failed to save prompt run junction: detail=${detailID}, promptRun=${promptRunID}`);
348
+ }
349
+ }
350
+ catch (error) {
351
+ LogError(`[AutotagAction] Error linking prompt run: ${error instanceof Error ? error.message : String(error)}`);
352
+ }
353
+ }
354
+ }
355
+ /**
356
+ * For Entity-type content sources, trigger EntityVectorSyncer to sync the
357
+ * source entity's own vectors. This ensures entity records (e.g., Products)
358
+ * are directly searchable in the vector index — not just their Content Item shadows.
359
+ *
360
+ * If the entity doc has already been synced and nothing changed, this is a no-op.
361
+ * If records were modified by tagging, the vectors get updated.
362
+ */
363
+ async SyncEntitySourceVectors(params, contentSourceIDs) {
364
+ try {
365
+ await KnowledgeHubMetadataEngine.Instance.Config(false, params.ContextUser);
366
+ const engine = KnowledgeHubMetadataEngine.Instance;
367
+ // Find Entity-type source type
368
+ const entitySourceType = engine.ContentSourceTypes.find(st => st.Name === 'Entity');
369
+ if (!entitySourceType)
370
+ return;
371
+ // Get entity sources (filtered if source IDs specified)
372
+ let entitySources = engine.ContentSources.filter(cs => UUIDsEqual(cs.ContentSourceTypeID, entitySourceType.ID));
373
+ if (contentSourceIDs && contentSourceIDs.length > 0) {
374
+ entitySources = entitySources.filter(cs => contentSourceIDs.some(id => UUIDsEqual(id, cs.ID)));
375
+ }
376
+ if (entitySources.length === 0)
377
+ return;
378
+ const syncer = new EntityVectorSyncer();
379
+ await syncer.Config(false, params.ContextUser);
380
+ for (const source of entitySources) {
381
+ if (!source.EntityID || !source.EntityDocumentID)
382
+ continue;
383
+ try {
384
+ LogStatus(`[AutotagAction] Syncing entity vectors for "${source.Name}" (Entity: ${source.EntityID}, Doc: ${source.EntityDocumentID})`);
385
+ await syncer.VectorizeEntity({ entityID: source.EntityID, entityDocumentID: source.EntityDocumentID }, params.ContextUser);
386
+ LogStatus(`[AutotagAction] Entity vector sync complete for "${source.Name}"`);
387
+ }
388
+ catch (syncError) {
389
+ const msg = syncError instanceof Error ? syncError.message : String(syncError);
390
+ LogError(`[AutotagAction] Entity vector sync failed for "${source.Name}": ${msg}`);
391
+ // Non-fatal — continue with other sources
392
+ }
393
+ }
394
+ }
395
+ catch (error) {
396
+ const msg = error instanceof Error ? error.message : String(error);
397
+ LogError(`[AutotagAction] SyncEntitySourceVectors failed: ${msg}`);
398
+ }
88
399
  }
89
400
  };
90
401
  AutotagAndVectorizeContentAction = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"content-autotag-and-vectorize.action.js","sourceRoot":"","sources":["../../src/generic/content-autotag-and-vectorize.action.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,cAAc,EAAE,iBAAiB,EAA2B,MAAM,qCAAqC,CAAC;AAEzJ,OAAO,EAAE,QAAQ,EA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C,CAAC,CAAC;gBACpF,CAAC;qBAAM,CAAC;oBACJ,QAAQ,CAAC,oBAAoB,QAAQ,CAAC,IAAI,YAAY,GAAG,EAAE,CAAC,CAAC;gBACjE,CAAC;YACL,CAAC;QACL,CAAC;QAED,SAAS,CAAC,uBAAuB,CAAC,CAAC;IACvC,CAAC;IAED,6DAA6D;IACrD,KAAK,CAAC,sBAAsB,CAAC,MAAuB;QACxD,MAAM,EAAE,GAAG,IAAI,OAAO,EAAE,CAAC;QACzB,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,OAAO,CAAsB;YACjD,UAAU,EAAE,mBAAmB;YAC/B,UAAU,EAAE,eAAe;SAC9B,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;QAEvB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YAClB,QAAQ,CAAC,qDAAqD,CAAC,CAAC;YAChE,OAAO;QACX,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC;QAC7B,SAAS,CAAC,0BAA0B,KAAK,CAAC,MAAM,yCAAyC,CAAC,CAAC;QAE3F,MAAM,KAAK,GAAG,MAAM,iBAAiB,CAAC,QAAQ,CAAC,qBAAqB,CAAC,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;QAChG,SAAS,CAAC,0BAA0B,KAAK,CAAC,UAAU,gBAAgB,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;IACjG,CAAC;CACJ,CAAA;AAlFY,gCAAgC;IAD5C,aAAa,CAAC,UAAU,EAAE,8BAA8B,CAAC;GAC7C,gCAAgC,CAkF5C"}
1
+ {"version":3,"file":"content-autotag-and-vectorize.action.js","sourceRoot":"","sources":["../../src/generic/content-autotag-and-vectorize.action.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC7E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 -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@memberjunction/actions-content-autotag",
3
3
  "type": "module",
4
- "version": "5.23.0",
4
+ "version": "5.25.0",
5
5
  "description": "Action classes that execute the content autotagging and vectorization actions.",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -11,22 +11,25 @@
11
11
  "scripts": {
12
12
  "start": "ts-node-dev src/index.ts",
13
13
  "build": "tsc && tsc-alias -f",
14
- "test": "echo \"No tests configured yet\""
14
+ "test": "vitest run",
15
+ "test:watch": "vitest"
15
16
  },
16
17
  "author": "MemberJunction.com",
17
18
  "license": "ISC",
18
19
  "devDependencies": {
19
20
  "ts-node-dev": "^2.0.0",
20
- "typescript": "^5.9.3"
21
+ "typescript": "^5.9.3",
22
+ "vitest": "^4.0.18"
21
23
  },
22
24
  "dependencies": {
23
- "@memberjunction/actions": "5.23.0",
24
- "@memberjunction/actions-base": "5.23.0",
25
- "@memberjunction/content-autotagging": "5.23.0",
26
- "@memberjunction/core": "5.23.0",
27
- "@memberjunction/core-actions": "5.23.0",
28
- "@memberjunction/core-entities": "5.23.0",
29
- "@memberjunction/global": "5.23.0",
25
+ "@memberjunction/actions": "5.25.0",
26
+ "@memberjunction/actions-base": "5.25.0",
27
+ "@memberjunction/content-autotagging": "5.25.0",
28
+ "@memberjunction/core": "5.25.0",
29
+ "@memberjunction/core-actions": "5.25.0",
30
+ "@memberjunction/core-entities": "5.25.0",
31
+ "@memberjunction/global": "5.25.0",
32
+ "@memberjunction/ai-vector-sync": "5.25.0",
30
33
  "axios": "^1.13.4"
31
34
  },
32
35
  "repository": {