@memberjunction/ai-agents 5.0.0 → 5.2.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.
- package/dist/agent-types/base-agent-type.d.ts +3 -3
- package/dist/agent-types/base-agent-type.d.ts.map +1 -1
- package/dist/agent-types/flow-agent-type.d.ts +3 -3
- package/dist/agent-types/flow-agent-type.d.ts.map +1 -1
- package/dist/agent-types/flow-agent-type.js +1 -1
- package/dist/agent-types/loop-agent-type.d.ts +3 -3
- package/dist/agent-types/loop-agent-type.d.ts.map +1 -1
- package/dist/agent-types/loop-agent-type.js +1 -1
- package/dist/base-agent.d.ts +43 -43
- package/dist/base-agent.d.ts.map +1 -1
- package/dist/base-agent.js +15 -15
- package/dist/base-agent.js.map +1 -1
- package/dist/memory-cleanup-agent.d.ts.map +1 -1
- package/dist/memory-cleanup-agent.js.map +1 -1
- package/dist/memory-manager-agent.d.ts.map +1 -1
- package/dist/memory-manager-agent.js.map +1 -1
- package/package.json +12 -12
- package/dist/__tests__/action-changes.test.d.ts +0 -15
- package/dist/__tests__/action-changes.test.d.ts.map +0 -1
- package/dist/__tests__/action-changes.test.js +0 -394
- package/dist/__tests__/action-changes.test.js.map +0 -1
- package/dist/__tests__/agent-memory-features.test.d.ts +0 -123
- package/dist/__tests__/agent-memory-features.test.d.ts.map +0 -1
- package/dist/__tests__/agent-memory-features.test.js +0 -596
- package/dist/__tests__/agent-memory-features.test.js.map +0 -1
- package/dist/__tests__/agent-type-prompt-params.test.d.ts +0 -14
- package/dist/__tests__/agent-type-prompt-params.test.d.ts.map +0 -1
- package/dist/__tests__/agent-type-prompt-params.test.js +0 -583
- package/dist/__tests__/agent-type-prompt-params.test.js.map +0 -1
- package/dist/__tests__/chat-handling-option.test.d.ts +0 -54
- package/dist/__tests__/chat-handling-option.test.d.ts.map +0 -1
- package/dist/__tests__/chat-handling-option.test.js +0 -222
- package/dist/__tests__/chat-handling-option.test.js.map +0 -1
- package/dist/services/AgentEmbeddingService.d.ts +0 -16
- package/dist/services/AgentEmbeddingService.d.ts.map +0 -1
- package/dist/services/AgentEmbeddingService.js +0 -158
- package/dist/services/AgentEmbeddingService.js.map +0 -1
- package/dist/types/AgentMatchResult.d.ts +0 -18
- package/dist/types/AgentMatchResult.d.ts.map +0 -1
- package/dist/types/AgentMatchResult.js +0 -3
- package/dist/types/AgentMatchResult.js.map +0 -1
|
@@ -1,394 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unit tests for Runtime Action Changes functionality.
|
|
3
|
-
*
|
|
4
|
-
* These tests verify the core logic for action change processing:
|
|
5
|
-
* - doesChangeScopeApply(): Determines if a change applies to an agent
|
|
6
|
-
* - applyActionChanges(): Applies changes to a base action set
|
|
7
|
-
* - filterActionChangesForSubAgent(): Filters changes for sub-agent propagation
|
|
8
|
-
*
|
|
9
|
-
* To run these tests, you can use ts-node:
|
|
10
|
-
* npx ts-node src/__tests__/action-changes.test.ts
|
|
11
|
-
*
|
|
12
|
-
* @since 2.123.0
|
|
13
|
-
*/
|
|
14
|
-
// ============================================================================
|
|
15
|
-
// Test Helpers - Standalone implementations of the methods for testing
|
|
16
|
-
// These mirror the implementations in BaseAgent but without class dependencies
|
|
17
|
-
// ============================================================================
|
|
18
|
-
/**
|
|
19
|
-
* Determines if an action change scope applies to the current agent.
|
|
20
|
-
*/
|
|
21
|
-
function doesChangeScopeApply(scope, agentId, isRoot, agentIds) {
|
|
22
|
-
switch (scope) {
|
|
23
|
-
case 'global':
|
|
24
|
-
return true;
|
|
25
|
-
case 'root':
|
|
26
|
-
return isRoot;
|
|
27
|
-
case 'all-subagents':
|
|
28
|
-
return !isRoot;
|
|
29
|
-
case 'specific':
|
|
30
|
-
return agentIds?.includes(agentId) ?? false;
|
|
31
|
-
default:
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Mock action registry for testing applyActionChanges
|
|
37
|
-
*/
|
|
38
|
-
const mockActionRegistry = [
|
|
39
|
-
{ ID: 'action-1', Name: 'Send Email', Status: 'Active' },
|
|
40
|
-
{ ID: 'action-2', Name: 'Create Record', Status: 'Active' },
|
|
41
|
-
{ ID: 'action-3', Name: 'Delete Record', Status: 'Active' },
|
|
42
|
-
{ ID: 'action-4', Name: 'Execute SQL', Status: 'Active' },
|
|
43
|
-
{ ID: 'action-5', Name: 'LMS Query', Status: 'Active' },
|
|
44
|
-
{ ID: 'action-6', Name: 'CRM Search', Status: 'Active' },
|
|
45
|
-
];
|
|
46
|
-
/**
|
|
47
|
-
* Applies runtime action changes to a base set of actions.
|
|
48
|
-
* Also returns any dynamic action limits that were specified.
|
|
49
|
-
*/
|
|
50
|
-
function applyActionChanges(baseActions, actionChanges, agentId, isRoot) {
|
|
51
|
-
let actions = [...baseActions];
|
|
52
|
-
const dynamicLimits = {};
|
|
53
|
-
for (const change of actionChanges) {
|
|
54
|
-
if (!doesChangeScopeApply(change.scope, agentId, isRoot, change.agentIds)) {
|
|
55
|
-
continue;
|
|
56
|
-
}
|
|
57
|
-
if (change.mode === 'add') {
|
|
58
|
-
for (const actionId of change.actionIds) {
|
|
59
|
-
if (!actions.some(a => a.ID === actionId)) {
|
|
60
|
-
const actionToAdd = mockActionRegistry.find(a => a.ID === actionId);
|
|
61
|
-
if (actionToAdd) {
|
|
62
|
-
actions.push(actionToAdd);
|
|
63
|
-
// Store execution limit if provided
|
|
64
|
-
if (change.actionLimits?.[actionId] != null) {
|
|
65
|
-
dynamicLimits[actionId] = change.actionLimits[actionId];
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
else if (change.mode === 'remove') {
|
|
72
|
-
actions = actions.filter(a => !change.actionIds.includes(a.ID));
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return { actions, dynamicLimits };
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Filters and transforms action changes for propagation to a sub-agent.
|
|
79
|
-
*/
|
|
80
|
-
function filterActionChangesForSubAgent(actionChanges) {
|
|
81
|
-
if (!actionChanges?.length) {
|
|
82
|
-
return undefined;
|
|
83
|
-
}
|
|
84
|
-
const filtered = [];
|
|
85
|
-
for (const change of actionChanges) {
|
|
86
|
-
switch (change.scope) {
|
|
87
|
-
case 'root':
|
|
88
|
-
// Don't propagate - only applied to root
|
|
89
|
-
continue;
|
|
90
|
-
case 'global':
|
|
91
|
-
// Propagate as-is - applies to everyone
|
|
92
|
-
filtered.push(change);
|
|
93
|
-
break;
|
|
94
|
-
case 'all-subagents':
|
|
95
|
-
// Propagate as 'global' since from sub-agent's perspective,
|
|
96
|
-
// it and its children should all get this
|
|
97
|
-
filtered.push({ ...change, scope: 'global' });
|
|
98
|
-
break;
|
|
99
|
-
case 'specific':
|
|
100
|
-
// Propagate as-is, each agent checks if it's in the list
|
|
101
|
-
filtered.push(change);
|
|
102
|
-
break;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
return filtered.length > 0 ? filtered : undefined;
|
|
106
|
-
}
|
|
107
|
-
// ============================================================================
|
|
108
|
-
// Test Framework (simple assertion-based)
|
|
109
|
-
// ============================================================================
|
|
110
|
-
let testsPassed = 0;
|
|
111
|
-
let testsFailed = 0;
|
|
112
|
-
function assert(condition, message) {
|
|
113
|
-
if (condition) {
|
|
114
|
-
console.log(` ✅ ${message}`);
|
|
115
|
-
testsPassed++;
|
|
116
|
-
}
|
|
117
|
-
else {
|
|
118
|
-
console.log(` ❌ ${message}`);
|
|
119
|
-
testsFailed++;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
function assertDeepEqual(actual, expected, message) {
|
|
123
|
-
const actualStr = JSON.stringify(actual, null, 2);
|
|
124
|
-
const expectedStr = JSON.stringify(expected, null, 2);
|
|
125
|
-
if (actualStr === expectedStr) {
|
|
126
|
-
console.log(` ✅ ${message}`);
|
|
127
|
-
testsPassed++;
|
|
128
|
-
}
|
|
129
|
-
else {
|
|
130
|
-
console.log(` ❌ ${message}`);
|
|
131
|
-
console.log(` Expected: ${expectedStr}`);
|
|
132
|
-
console.log(` Actual: ${actualStr}`);
|
|
133
|
-
testsFailed++;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
function testGroup(name, fn) {
|
|
137
|
-
console.log(`\n📋 ${name}`);
|
|
138
|
-
fn();
|
|
139
|
-
}
|
|
140
|
-
// ============================================================================
|
|
141
|
-
// Tests for doesChangeScopeApply
|
|
142
|
-
// ============================================================================
|
|
143
|
-
testGroup('doesChangeScopeApply - global scope', () => {
|
|
144
|
-
assert(doesChangeScopeApply('global', 'agent-1', true) === true, 'global scope applies to root agent');
|
|
145
|
-
assert(doesChangeScopeApply('global', 'agent-2', false) === true, 'global scope applies to sub-agent');
|
|
146
|
-
});
|
|
147
|
-
testGroup('doesChangeScopeApply - root scope', () => {
|
|
148
|
-
assert(doesChangeScopeApply('root', 'agent-1', true) === true, 'root scope applies to root agent');
|
|
149
|
-
assert(doesChangeScopeApply('root', 'agent-2', false) === false, 'root scope does NOT apply to sub-agent');
|
|
150
|
-
});
|
|
151
|
-
testGroup('doesChangeScopeApply - all-subagents scope', () => {
|
|
152
|
-
assert(doesChangeScopeApply('all-subagents', 'agent-1', true) === false, 'all-subagents scope does NOT apply to root agent');
|
|
153
|
-
assert(doesChangeScopeApply('all-subagents', 'agent-2', false) === true, 'all-subagents scope applies to sub-agent');
|
|
154
|
-
});
|
|
155
|
-
testGroup('doesChangeScopeApply - specific scope', () => {
|
|
156
|
-
const specificAgents = ['agent-2', 'agent-3'];
|
|
157
|
-
assert(doesChangeScopeApply('specific', 'agent-1', true, specificAgents) === false, 'specific scope does NOT apply to agent not in list (root)');
|
|
158
|
-
assert(doesChangeScopeApply('specific', 'agent-2', false, specificAgents) === true, 'specific scope applies to agent in list');
|
|
159
|
-
assert(doesChangeScopeApply('specific', 'agent-4', false, specificAgents) === false, 'specific scope does NOT apply to agent not in list (sub-agent)');
|
|
160
|
-
assert(doesChangeScopeApply('specific', 'agent-1', true, undefined) === false, 'specific scope with undefined agentIds returns false');
|
|
161
|
-
assert(doesChangeScopeApply('specific', 'agent-1', true, []) === false, 'specific scope with empty agentIds returns false');
|
|
162
|
-
});
|
|
163
|
-
// ============================================================================
|
|
164
|
-
// Tests for applyActionChanges
|
|
165
|
-
// ============================================================================
|
|
166
|
-
testGroup('applyActionChanges - add mode with global scope', () => {
|
|
167
|
-
const baseActions = [
|
|
168
|
-
{ ID: 'action-1', Name: 'Send Email', Status: 'Active' },
|
|
169
|
-
];
|
|
170
|
-
const changes = [
|
|
171
|
-
{ scope: 'global', mode: 'add', actionIds: ['action-5', 'action-6'] }
|
|
172
|
-
];
|
|
173
|
-
const { actions: result } = applyActionChanges(baseActions, changes, 'agent-1', true);
|
|
174
|
-
assert(result.length === 3, 'should have 3 actions after adding 2');
|
|
175
|
-
assert(result.some(a => a.ID === 'action-5'), 'should include action-5 (LMS Query)');
|
|
176
|
-
assert(result.some(a => a.ID === 'action-6'), 'should include action-6 (CRM Search)');
|
|
177
|
-
});
|
|
178
|
-
testGroup('applyActionChanges - add mode does not duplicate', () => {
|
|
179
|
-
const baseActions = [
|
|
180
|
-
{ ID: 'action-1', Name: 'Send Email', Status: 'Active' },
|
|
181
|
-
{ ID: 'action-5', Name: 'LMS Query', Status: 'Active' },
|
|
182
|
-
];
|
|
183
|
-
const changes = [
|
|
184
|
-
{ scope: 'global', mode: 'add', actionIds: ['action-5', 'action-6'] }
|
|
185
|
-
];
|
|
186
|
-
const { actions: result } = applyActionChanges(baseActions, changes, 'agent-1', true);
|
|
187
|
-
assert(result.length === 3, 'should have 3 actions (no duplicate action-5)');
|
|
188
|
-
assert(result.filter(a => a.ID === 'action-5').length === 1, 'should have exactly one action-5');
|
|
189
|
-
});
|
|
190
|
-
testGroup('applyActionChanges - remove mode', () => {
|
|
191
|
-
const baseActions = [
|
|
192
|
-
{ ID: 'action-1', Name: 'Send Email', Status: 'Active' },
|
|
193
|
-
{ ID: 'action-3', Name: 'Delete Record', Status: 'Active' },
|
|
194
|
-
{ ID: 'action-4', Name: 'Execute SQL', Status: 'Active' },
|
|
195
|
-
];
|
|
196
|
-
const changes = [
|
|
197
|
-
{ scope: 'global', mode: 'remove', actionIds: ['action-3', 'action-4'] }
|
|
198
|
-
];
|
|
199
|
-
const { actions: result } = applyActionChanges(baseActions, changes, 'agent-1', true);
|
|
200
|
-
assert(result.length === 1, 'should have 1 action after removing 2');
|
|
201
|
-
assert(result[0].ID === 'action-1', 'should only have action-1 remaining');
|
|
202
|
-
});
|
|
203
|
-
testGroup('applyActionChanges - scope filtering (root only)', () => {
|
|
204
|
-
const baseActions = [
|
|
205
|
-
{ ID: 'action-1', Name: 'Send Email', Status: 'Active' },
|
|
206
|
-
];
|
|
207
|
-
const changes = [
|
|
208
|
-
{ scope: 'root', mode: 'add', actionIds: ['action-5'] }
|
|
209
|
-
];
|
|
210
|
-
const { actions: rootResult } = applyActionChanges(baseActions, changes, 'root-agent', true);
|
|
211
|
-
const { actions: subAgentResult } = applyActionChanges(baseActions, changes, 'sub-agent', false);
|
|
212
|
-
assert(rootResult.length === 2, 'root agent should have 2 actions');
|
|
213
|
-
assert(subAgentResult.length === 1, 'sub-agent should still have 1 action (change not applied)');
|
|
214
|
-
});
|
|
215
|
-
testGroup('applyActionChanges - scope filtering (all-subagents)', () => {
|
|
216
|
-
const baseActions = [
|
|
217
|
-
{ ID: 'action-1', Name: 'Send Email', Status: 'Active' },
|
|
218
|
-
{ ID: 'action-3', Name: 'Delete Record', Status: 'Active' },
|
|
219
|
-
];
|
|
220
|
-
const changes = [
|
|
221
|
-
{ scope: 'all-subagents', mode: 'remove', actionIds: ['action-3'] }
|
|
222
|
-
];
|
|
223
|
-
const { actions: rootResult } = applyActionChanges(baseActions, changes, 'root-agent', true);
|
|
224
|
-
const { actions: subAgentResult } = applyActionChanges(baseActions, changes, 'sub-agent', false);
|
|
225
|
-
assert(rootResult.length === 2, 'root agent should still have 2 actions (change not applied)');
|
|
226
|
-
assert(subAgentResult.length === 1, 'sub-agent should have 1 action after removal');
|
|
227
|
-
});
|
|
228
|
-
testGroup('applyActionChanges - scope filtering (specific)', () => {
|
|
229
|
-
const baseActions = [
|
|
230
|
-
{ ID: 'action-1', Name: 'Send Email', Status: 'Active' },
|
|
231
|
-
];
|
|
232
|
-
const changes = [
|
|
233
|
-
{
|
|
234
|
-
scope: 'specific',
|
|
235
|
-
mode: 'add',
|
|
236
|
-
actionIds: ['action-5'],
|
|
237
|
-
agentIds: ['special-agent']
|
|
238
|
-
}
|
|
239
|
-
];
|
|
240
|
-
const { actions: normalResult } = applyActionChanges(baseActions, changes, 'normal-agent', false);
|
|
241
|
-
const { actions: specialResult } = applyActionChanges(baseActions, changes, 'special-agent', false);
|
|
242
|
-
assert(normalResult.length === 1, 'normal agent should have 1 action (not in agentIds)');
|
|
243
|
-
assert(specialResult.length === 2, 'special agent should have 2 actions (in agentIds)');
|
|
244
|
-
});
|
|
245
|
-
testGroup('applyActionChanges - multiple changes applied in order', () => {
|
|
246
|
-
const baseActions = [
|
|
247
|
-
{ ID: 'action-1', Name: 'Send Email', Status: 'Active' },
|
|
248
|
-
{ ID: 'action-2', Name: 'Create Record', Status: 'Active' },
|
|
249
|
-
];
|
|
250
|
-
const changes = [
|
|
251
|
-
// First remove action-2
|
|
252
|
-
{ scope: 'global', mode: 'remove', actionIds: ['action-2'] },
|
|
253
|
-
// Then add action-5
|
|
254
|
-
{ scope: 'global', mode: 'add', actionIds: ['action-5'] }
|
|
255
|
-
];
|
|
256
|
-
const { actions: result } = applyActionChanges(baseActions, changes, 'agent-1', true);
|
|
257
|
-
assert(result.length === 2, 'should have 2 actions');
|
|
258
|
-
assert(!result.some(a => a.ID === 'action-2'), 'should not have action-2 (removed)');
|
|
259
|
-
assert(result.some(a => a.ID === 'action-5'), 'should have action-5 (added)');
|
|
260
|
-
});
|
|
261
|
-
testGroup('applyActionChanges - actionLimits stored for added actions', () => {
|
|
262
|
-
const baseActions = [
|
|
263
|
-
{ ID: 'action-1', Name: 'Send Email', Status: 'Active' },
|
|
264
|
-
];
|
|
265
|
-
const changes = [
|
|
266
|
-
{
|
|
267
|
-
scope: 'global',
|
|
268
|
-
mode: 'add',
|
|
269
|
-
actionIds: ['action-5', 'action-6'],
|
|
270
|
-
actionLimits: {
|
|
271
|
-
'action-5': 10,
|
|
272
|
-
'action-6': 5
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
];
|
|
276
|
-
const { actions, dynamicLimits } = applyActionChanges(baseActions, changes, 'agent-1', true);
|
|
277
|
-
assert(actions.length === 3, 'should have 3 actions after adding 2');
|
|
278
|
-
assert(dynamicLimits['action-5'] === 10, 'action-5 should have limit of 10');
|
|
279
|
-
assert(dynamicLimits['action-6'] === 5, 'action-6 should have limit of 5');
|
|
280
|
-
assert(dynamicLimits['action-1'] === undefined, 'action-1 should have no limit (was in base)');
|
|
281
|
-
});
|
|
282
|
-
testGroup('applyActionChanges - actionLimits partial (some actions without limits)', () => {
|
|
283
|
-
const baseActions = [];
|
|
284
|
-
const changes = [
|
|
285
|
-
{
|
|
286
|
-
scope: 'global',
|
|
287
|
-
mode: 'add',
|
|
288
|
-
actionIds: ['action-5', 'action-6'],
|
|
289
|
-
actionLimits: {
|
|
290
|
-
'action-5': 3 // Only action-5 has a limit
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
];
|
|
294
|
-
const { actions, dynamicLimits } = applyActionChanges(baseActions, changes, 'agent-1', true);
|
|
295
|
-
assert(actions.length === 2, 'should have 2 actions');
|
|
296
|
-
assert(dynamicLimits['action-5'] === 3, 'action-5 should have limit of 3');
|
|
297
|
-
assert(dynamicLimits['action-6'] === undefined, 'action-6 should have no limit');
|
|
298
|
-
});
|
|
299
|
-
testGroup('applyActionChanges - actionLimits ignored for remove mode', () => {
|
|
300
|
-
const baseActions = [
|
|
301
|
-
{ ID: 'action-1', Name: 'Send Email', Status: 'Active' },
|
|
302
|
-
{ ID: 'action-5', Name: 'LMS Query', Status: 'Active' },
|
|
303
|
-
];
|
|
304
|
-
const changes = [
|
|
305
|
-
{
|
|
306
|
-
scope: 'global',
|
|
307
|
-
mode: 'remove',
|
|
308
|
-
actionIds: ['action-5'],
|
|
309
|
-
actionLimits: {
|
|
310
|
-
'action-5': 10 // Should be ignored for remove mode
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
];
|
|
314
|
-
const { actions, dynamicLimits } = applyActionChanges(baseActions, changes, 'agent-1', true);
|
|
315
|
-
assert(actions.length === 1, 'should have 1 action after removal');
|
|
316
|
-
assert(Object.keys(dynamicLimits).length === 0, 'should have no dynamic limits (remove mode)');
|
|
317
|
-
});
|
|
318
|
-
// ============================================================================
|
|
319
|
-
// Tests for filterActionChangesForSubAgent
|
|
320
|
-
// ============================================================================
|
|
321
|
-
testGroup('filterActionChangesForSubAgent - empty/undefined input', () => {
|
|
322
|
-
assert(filterActionChangesForSubAgent(undefined) === undefined, 'undefined input returns undefined');
|
|
323
|
-
assert(filterActionChangesForSubAgent([]) === undefined, 'empty array returns undefined');
|
|
324
|
-
});
|
|
325
|
-
testGroup('filterActionChangesForSubAgent - global scope propagated as-is', () => {
|
|
326
|
-
const changes = [
|
|
327
|
-
{ scope: 'global', mode: 'add', actionIds: ['action-1'] }
|
|
328
|
-
];
|
|
329
|
-
const result = filterActionChangesForSubAgent(changes);
|
|
330
|
-
assert(result !== undefined, 'should return a result');
|
|
331
|
-
assert(result.length === 1, 'should have 1 change');
|
|
332
|
-
assert(result[0].scope === 'global', 'scope should remain global');
|
|
333
|
-
assert(result[0].mode === 'add', 'mode should remain add');
|
|
334
|
-
assertDeepEqual(result[0].actionIds, ['action-1'], 'actionIds should be preserved');
|
|
335
|
-
});
|
|
336
|
-
testGroup('filterActionChangesForSubAgent - root scope NOT propagated', () => {
|
|
337
|
-
const changes = [
|
|
338
|
-
{ scope: 'root', mode: 'add', actionIds: ['action-1'] }
|
|
339
|
-
];
|
|
340
|
-
const result = filterActionChangesForSubAgent(changes);
|
|
341
|
-
assert(result === undefined, 'root scope should not be propagated');
|
|
342
|
-
});
|
|
343
|
-
testGroup('filterActionChangesForSubAgent - all-subagents becomes global', () => {
|
|
344
|
-
const changes = [
|
|
345
|
-
{ scope: 'all-subagents', mode: 'remove', actionIds: ['action-3'] }
|
|
346
|
-
];
|
|
347
|
-
const result = filterActionChangesForSubAgent(changes);
|
|
348
|
-
assert(result !== undefined, 'should return a result');
|
|
349
|
-
assert(result.length === 1, 'should have 1 change');
|
|
350
|
-
assert(result[0].scope === 'global', 'scope should be transformed to global');
|
|
351
|
-
assert(result[0].mode === 'remove', 'mode should remain remove');
|
|
352
|
-
});
|
|
353
|
-
testGroup('filterActionChangesForSubAgent - specific scope propagated as-is', () => {
|
|
354
|
-
const changes = [
|
|
355
|
-
{ scope: 'specific', mode: 'add', actionIds: ['action-5'], agentIds: ['agent-x', 'agent-y'] }
|
|
356
|
-
];
|
|
357
|
-
const result = filterActionChangesForSubAgent(changes);
|
|
358
|
-
assert(result !== undefined, 'should return a result');
|
|
359
|
-
assert(result.length === 1, 'should have 1 change');
|
|
360
|
-
assert(result[0].scope === 'specific', 'scope should remain specific');
|
|
361
|
-
assertDeepEqual(result[0].agentIds, ['agent-x', 'agent-y'], 'agentIds should be preserved');
|
|
362
|
-
});
|
|
363
|
-
testGroup('filterActionChangesForSubAgent - mixed scopes', () => {
|
|
364
|
-
const changes = [
|
|
365
|
-
{ scope: 'global', mode: 'add', actionIds: ['action-1'] },
|
|
366
|
-
{ scope: 'root', mode: 'add', actionIds: ['action-2'] },
|
|
367
|
-
{ scope: 'all-subagents', mode: 'remove', actionIds: ['action-3'] },
|
|
368
|
-
{ scope: 'specific', mode: 'add', actionIds: ['action-4'], agentIds: ['agent-x'] }
|
|
369
|
-
];
|
|
370
|
-
const result = filterActionChangesForSubAgent(changes);
|
|
371
|
-
assert(result !== undefined, 'should return a result');
|
|
372
|
-
assert(result.length === 3, 'should have 3 changes (root filtered out)');
|
|
373
|
-
// Check each expected change
|
|
374
|
-
const globalChange = result.find(c => c.actionIds.includes('action-1'));
|
|
375
|
-
const transformedChange = result.find(c => c.actionIds.includes('action-3'));
|
|
376
|
-
const specificChange = result.find(c => c.actionIds.includes('action-4'));
|
|
377
|
-
assert(globalChange !== undefined, 'global change should be present');
|
|
378
|
-
assert(globalChange.scope === 'global', 'global change should remain global');
|
|
379
|
-
assert(transformedChange !== undefined, 'all-subagents change should be transformed');
|
|
380
|
-
assert(transformedChange.scope === 'global', 'all-subagents should become global');
|
|
381
|
-
assert(specificChange !== undefined, 'specific change should be present');
|
|
382
|
-
assert(specificChange.scope === 'specific', 'specific change should remain specific');
|
|
383
|
-
});
|
|
384
|
-
// ============================================================================
|
|
385
|
-
// Test Summary
|
|
386
|
-
// ============================================================================
|
|
387
|
-
console.log('\n' + '='.repeat(60));
|
|
388
|
-
console.log(`📊 Test Results: ${testsPassed} passed, ${testsFailed} failed`);
|
|
389
|
-
console.log('='.repeat(60));
|
|
390
|
-
if (testsFailed > 0) {
|
|
391
|
-
process.exit(1);
|
|
392
|
-
}
|
|
393
|
-
export {};
|
|
394
|
-
//# sourceMappingURL=action-changes.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"action-changes.test.js","sourceRoot":"","sources":["../../src/__tests__/action-changes.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,+EAA+E;AAC/E,uEAAuE;AACvE,+EAA+E;AAC/E,+EAA+E;AAE/E;;GAEG;AACH,SAAS,oBAAoB,CACzB,KAAwB,EACxB,OAAe,EACf,MAAe,EACf,QAAmB;IAEnB,QAAQ,KAAK,EAAE,CAAC;QACZ,KAAK,QAAQ;YACT,OAAO,IAAI,CAAC;QAChB,KAAK,MAAM;YACP,OAAO,MAAM,CAAC;QAClB,KAAK,eAAe;YAChB,OAAO,CAAC,MAAM,CAAC;QACnB,KAAK,UAAU;YACX,OAAO,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,CA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QAAQ,EAAE,oCAAoC,CAAC,CAAC;IAE/E,MAAM,CAAC,iBAAiB,KAAK,SAAS,EAAE,4CAA4C,CAAC,CAAC;IACtF,MAAM,CAAC,iBAAkB,CAAC,KAAK,KAAK,QAAQ,EAAE,oCAAoC,CAAC,CAAC;IAEpF,MAAM,CAAC,cAAc,KAAK,SAAS,EAAE,mCAAmC,CAAC,CAAC;IAC1E,MAAM,CAAC,cAAe,CAAC,KAAK,KAAK,UAAU,EAAE,wCAAwC,CAAC,CAAC;AAC3F,CAAC,CAAC,CAAC;AAEH,+EAA+E;AAC/E,eAAe;AACf,+EAA+E;AAE/E,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;AACnC,OAAO,CAAC,GAAG,CAAC,oBAAoB,WAAW,YAAY,WAAW,SAAS,CAAC,CAAC;AAC7E,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;AAE5B,IAAI,WAAW,GAAG,CAAC,EAAE,CAAC;IAClB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC"}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unit tests for Agent Memory Features (Phase 1-3 improvements).
|
|
3
|
-
*
|
|
4
|
-
* These tests verify:
|
|
5
|
-
* - PayloadFeedbackManager functionality
|
|
6
|
-
* - AgentContextInjector formatting with precedence instructions
|
|
7
|
-
* - Multi-tenant scope determination
|
|
8
|
-
*
|
|
9
|
-
* To run these tests:
|
|
10
|
-
* npx ts-node src/__tests__/agent-memory-features.test.ts
|
|
11
|
-
*
|
|
12
|
-
* @since 2.130.0
|
|
13
|
-
*/
|
|
14
|
-
interface MockNote {
|
|
15
|
-
ID: string;
|
|
16
|
-
Type: string;
|
|
17
|
-
Note: string;
|
|
18
|
-
AgentID: string | null;
|
|
19
|
-
UserID: string | null;
|
|
20
|
-
CompanyID: string | null;
|
|
21
|
-
PrimaryScopeRecordID: string | null;
|
|
22
|
-
SecondaryScopes: string | null;
|
|
23
|
-
__mj_CreatedAt?: Date;
|
|
24
|
-
}
|
|
25
|
-
interface MockPayloadWarning {
|
|
26
|
-
type: 'content_truncation' | 'key_removal' | 'type_change' | 'pattern_anomaly';
|
|
27
|
-
path: string;
|
|
28
|
-
message: string;
|
|
29
|
-
severity: 'high' | 'medium' | 'low';
|
|
30
|
-
details: Record<string, unknown>;
|
|
31
|
-
requiresFeedback: boolean;
|
|
32
|
-
}
|
|
33
|
-
interface MockFeedbackQuestion {
|
|
34
|
-
id: string;
|
|
35
|
-
question: string;
|
|
36
|
-
warning: MockPayloadWarning;
|
|
37
|
-
context?: {
|
|
38
|
-
path: string;
|
|
39
|
-
changeType: string;
|
|
40
|
-
details: unknown;
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Determine MJ scope description for a note (mirrors AgentContextInjector)
|
|
45
|
-
*/
|
|
46
|
-
declare function determineNoteScope(note: MockNote): string;
|
|
47
|
-
/**
|
|
48
|
-
* Determine secondary scope description for a note (multi-tenant feature)
|
|
49
|
-
*/
|
|
50
|
-
declare function determineSecondaryScope(note: MockNote): string | null;
|
|
51
|
-
/**
|
|
52
|
-
* Format notes for injection with optional memory policy (mirrors AgentContextInjector)
|
|
53
|
-
*/
|
|
54
|
-
declare function formatNotesForInjection(notes: MockNote[], includeMemoryPolicy?: boolean): string;
|
|
55
|
-
/**
|
|
56
|
-
* Generate feedback questions from warnings (mirrors PayloadFeedbackManager)
|
|
57
|
-
*/
|
|
58
|
-
declare function generateQuestions(warnings: MockPayloadWarning[]): MockFeedbackQuestion[];
|
|
59
|
-
/**
|
|
60
|
-
* Map LLM responses to feedback format (mirrors PayloadFeedbackManager)
|
|
61
|
-
*/
|
|
62
|
-
declare function mapLLMResponsesToFeedback(questions: MockFeedbackQuestion[], llmResponses: Array<{
|
|
63
|
-
questionNumber: number;
|
|
64
|
-
intended: boolean;
|
|
65
|
-
explanation?: string;
|
|
66
|
-
}>): Array<{
|
|
67
|
-
questionId: string;
|
|
68
|
-
intended: boolean;
|
|
69
|
-
explanation?: string;
|
|
70
|
-
}>;
|
|
71
|
-
declare const mockNotes: MockNote[];
|
|
72
|
-
declare const mockWarnings: MockPayloadWarning[];
|
|
73
|
-
declare let testsPassed: number;
|
|
74
|
-
declare let testsFailed: number;
|
|
75
|
-
declare function runTest(name: string, fn: () => void): void;
|
|
76
|
-
declare function assertEqual<T>(actual: T, expected: T, message?: string): void;
|
|
77
|
-
declare function assertTrue(condition: boolean, message?: string): void;
|
|
78
|
-
declare function assertContains(str: string, substring: string, message?: string): void;
|
|
79
|
-
/**
|
|
80
|
-
* Calculate cutoff date for retention (mirrors MemoryCleanupAgent)
|
|
81
|
-
*/
|
|
82
|
-
declare function getCutoffDate(retentionDays: number): string;
|
|
83
|
-
/**
|
|
84
|
-
* Get note retention days with default (mirrors MemoryCleanupAgent)
|
|
85
|
-
*/
|
|
86
|
-
declare function getNoteRetentionDays(agent: {
|
|
87
|
-
NoteRetentionDays?: number | null;
|
|
88
|
-
}): number;
|
|
89
|
-
/**
|
|
90
|
-
* Get example retention days with default (mirrors MemoryCleanupAgent)
|
|
91
|
-
*/
|
|
92
|
-
declare function getExampleRetentionDays(agent: {
|
|
93
|
-
ExampleRetentionDays?: number | null;
|
|
94
|
-
}): number;
|
|
95
|
-
/**
|
|
96
|
-
* Check if auto-archive is enabled (mirrors MemoryCleanupAgent)
|
|
97
|
-
*/
|
|
98
|
-
declare function getAutoArchiveEnabled(agent: {
|
|
99
|
-
AutoArchiveEnabled?: boolean;
|
|
100
|
-
}): boolean;
|
|
101
|
-
/**
|
|
102
|
-
* Build cleanup summary message (mirrors MemoryCleanupAgent)
|
|
103
|
-
*/
|
|
104
|
-
declare function buildCleanupSummary(result: {
|
|
105
|
-
notesArchived: number;
|
|
106
|
-
examplesArchived: number;
|
|
107
|
-
notesExpired: number;
|
|
108
|
-
examplesExpired: number;
|
|
109
|
-
errors: string[];
|
|
110
|
-
}): string;
|
|
111
|
-
/**
|
|
112
|
-
* Check if content contains ephemeral phrases (should not be stored)
|
|
113
|
-
*/
|
|
114
|
-
declare function containsEphemeralPhrase(content: string): boolean;
|
|
115
|
-
/**
|
|
116
|
-
* Check if content contains durable phrases (should be stored at org/global scope)
|
|
117
|
-
*/
|
|
118
|
-
declare function containsDurablePhrase(content: string): boolean;
|
|
119
|
-
/**
|
|
120
|
-
* Check if content contains PII that should not be extracted
|
|
121
|
-
*/
|
|
122
|
-
declare function containsPII(content: string): boolean;
|
|
123
|
-
//# sourceMappingURL=agent-memory-features.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-memory-features.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/agent-memory-features.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,UAAU,QAAQ;IACd,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,cAAc,CAAC,EAAE,IAAI,CAAC;CACzB;AAED,UAAU,kBAAkB;IACxB,IAAI,EAAE,oBAAoB,GAAG,aAAa,GAAG,aAAa,GAAG,iBAAiB,CAAC;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,gBAAgB,EAAE,OAAO,CAAC;CA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