@kya-os/mcp-i-core 1.2.2-canary.30 → 1.2.2-canary.32

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,2380 +0,0 @@
1
-
2
- > @kya-os/mcp-i-core@1.2.2-canary.28 test /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core
3
- > vitest run
4
-
5
-
6
- RUN v4.0.5 /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core
7
-
8
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - new endpoint format > should fetch from project-scoped endpoint when projectId is available
9
- [ToolProtectionService] Config loaded from API {
10
- source: 'api',
11
- toolCount: 2,
12
- protectedTools: [ 'checkout' ],
13
- agentDid: 'did:key:z6MkhaXgBZDv...',
14
- projectId: 'test-project-123',
15
- cacheTtlMs: 300000,
16
- cacheExpiresAt: '2025-11-24T00:12:31.646Z'
17
- }
18
-
19
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - new endpoint format > should handle new endpoint format with toolProtections object
20
- [ToolProtectionService] Config loaded from API {
21
- source: 'api',
22
- toolCount: 2,
23
- protectedTools: [ 'protected_tool' ],
24
- agentDid: 'did:key:z6MkhaXgBZDv...',
25
- projectId: 'test-project-123',
26
- cacheTtlMs: 300000,
27
- cacheExpiresAt: '2025-11-24T00:12:31.647Z'
28
- }
29
-
30
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - new endpoint format > should parse oauthProvider from new endpoint format (Phase 2)
31
- [ToolProtectionService] Config loaded from API {
32
- source: 'api',
33
- toolCount: 2,
34
- protectedTools: [ 'read_repos', 'send_email' ],
35
- agentDid: 'did:key:z6MkhaXgBZDv...',
36
- projectId: 'test-project-123',
37
- cacheTtlMs: 300000,
38
- cacheExpiresAt: '2025-11-24T00:12:31.647Z'
39
- }
40
-
41
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - new endpoint format > should preserve oauthProvider through cache operations
42
- [ToolProtectionService] Config loaded from API {
43
- source: 'api',
44
- toolCount: 1,
45
- protectedTools: [ 'read_repos' ],
46
- agentDid: 'did:key:z6MkhaXgBZDv...',
47
- projectId: 'test-project-123',
48
- cacheTtlMs: 300000,
49
- cacheExpiresAt: '2025-11-24T00:12:31.648Z'
50
- }
51
-
52
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should fetch from agent-scoped endpoint when projectId is not available
53
- [ToolProtectionService] Config loaded from API {
54
- source: 'api',
55
- toolCount: 2,
56
- protectedTools: [ 'checkout' ],
57
- agentDid: 'did:key:z6MkhaXgBZDv...',
58
- projectId: 'none',
59
- cacheTtlMs: 300000,
60
- cacheExpiresAt: '2025-11-24T00:12:31.648Z'
61
- }
62
-
63
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should handle old endpoint format with tools array
64
- [ToolProtectionService] Config loaded from API {
65
- source: 'api',
66
- toolCount: 2,
67
- protectedTools: [ 'tool1' ],
68
- agentDid: 'did:key:z6MkhaXgBZDv...',
69
- projectId: 'none',
70
- cacheTtlMs: 300000,
71
- cacheExpiresAt: '2025-11-24T00:12:31.648Z'
72
- }
73
-
74
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should parse oauthProvider from old endpoint format (tools array)
75
- [ToolProtectionService] Config loaded from API {
76
- source: 'api',
77
- toolCount: 2,
78
- protectedTools: [ 'read_repos', 'send_email' ],
79
- agentDid: 'did:key:z6MkhaXgBZDv...',
80
- projectId: 'none',
81
- cacheTtlMs: 300000,
82
- cacheExpiresAt: '2025-11-24T00:12:31.648Z'
83
- }
84
-
85
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should handle old endpoint format with tools object
86
- [ToolProtectionService] Config loaded from API {
87
- source: 'api',
88
- toolCount: 2,
89
- protectedTools: [ 'tool1' ],
90
- agentDid: 'did:key:z6MkhaXgBZDv...',
91
- projectId: 'none',
92
- cacheTtlMs: 300000,
93
- cacheExpiresAt: '2025-11-24T00:12:31.648Z'
94
- }
95
-
96
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should parse oauthProvider from old endpoint format (tools object)
97
- [ToolProtectionService] Config loaded from API {
98
- source: 'api',
99
- toolCount: 2,
100
- protectedTools: [ 'read_repos', 'send_email' ],
101
- agentDid: 'did:key:z6MkhaXgBZDv...',
102
- projectId: 'none',
103
- cacheTtlMs: 300000,
104
- cacheExpiresAt: '2025-11-24T00:12:31.649Z'
105
- }
106
-
107
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should skip tools without name in array format
108
- [ToolProtectionService] Cache miss, fetching from API {
109
- source: 'api-fetch-start',
110
- cacheKey: 'agent:did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK',
111
- agentDid: 'did:key:z6MkhaXgBZDv...',
112
- projectId: 'none',
113
- apiUrl: 'https://kya.vouched.id',
114
- endpoint: '/api/v1/bouncer/config?agent_did=did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK'
115
- }
116
- [ToolProtectionService] Fetching from API: https://kya.vouched.id/api/v1/bouncer/config?agent_did=did%3Akey%3Az6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK {
117
- method: 'config?agent_did (old)',
118
- projectId: 'none',
119
- apiKeyPresent: true,
120
- apiKeyLength: 18,
121
- apiKeyMasked: 'test-api...'
122
- }
123
-
124
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should skip tools without name in array format
125
- [ToolProtectionService] API response received {
126
- source: 'api-fetch-complete',
127
- agentDid: 'did:key:z6MkhaXgBZDv...',
128
- projectId: 'none',
129
- responseKeys: [ 'success', 'data', 'metadata' ],
130
- dataKeys: [ 'tools' ],
131
- rawToolProtections: null,
132
- rawTools: [
133
- { name: 'valid_tool', requiresDelegation: true },
134
- { requiresDelegation: false }
135
- ],
136
- responseMetadata: {}
137
- }
138
-
139
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should skip tools without name in array format
140
- [ToolProtectionService] Config loaded from API {
141
- source: 'api',
142
- toolCount: 1,
143
- protectedTools: [ 'valid_tool' ],
144
- agentDid: 'did:key:z6MkhaXgBZDv...',
145
- projectId: 'none',
146
- cacheTtlMs: 300000,
147
- cacheExpiresAt: '2025-11-24T00:12:31.649Z'
148
- }
149
- [ToolProtectionService] API fetch successful, config cached {
150
- source: 'cache-write',
151
- agentDid: 'did:key:z6MkhaXgBZDv...',
152
- cacheKey: 'agent:did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK',
153
- toolCount: 1,
154
- tools: [ { name: 'valid_tool', requiresDelegation: true, scopeCount: 0 } ],
155
- ttlMs: 300000,
156
- ttlMinutes: 5,
157
- expiresAt: '2025-11-24T00:12:31.649Z',
158
- expiresIn: '300s'
159
- }
160
-
161
- stderr | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch error handling > should handle network errors gracefully
162
- [ToolProtectionService] API fetch failed, no fallback, failing closed (deny-all) {
163
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > caching behavior > should cache successful API responses
164
- agentDid: 'did:key:z6MkhaXgBZDv...',
165
- [ToolProtectionService] Config loaded from API {
166
- source: 'api',
167
- toolCount: 1,
168
- protectedTools: [ 'tool1' ],
169
- error: 'ECONNREFUSED',
170
- cacheKey: 'agent:did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK'
171
- agentDid: 'did:key:z6MkhaXgBZDv...',
172
- }
173
-
174
- projectId: 'none',
175
- cacheTtlMs: 300000,
176
- cacheExpiresAt: '2025-11-24T00:12:31.652Z'
177
- }
178
-
179
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > caching behavior > should use default cache TTL when not specified
180
- [ToolProtectionService] Config loaded from API {
181
- source: 'api',
182
- toolCount: 0,
183
- protectedTools: [],
184
- agentDid: 'did:key:z6MkhaXgBZDv...',
185
- projectId: 'none',
186
- cacheTtlMs: 300000,
187
- cacheExpiresAt: '2025-11-24T00:12:31.652Z'
188
- }
189
-
190
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > caching behavior > should use custom cache TTL when specified
191
- [ToolProtectionService] Config loaded from API {
192
- source: 'api',
193
- toolCount: 0,
194
- protectedTools: [],
195
- agentDid: 'did:key:z6MkhaXgBZDv...',
196
- projectId: 'none',
197
- cacheTtlMs: 600000,
198
- cacheExpiresAt: '2025-11-24T00:17:31.652Z'
199
- }
200
-
201
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > edge cases > should handle empty toolProtections object
202
- [ToolProtectionService] Config loaded from API {
203
- source: 'api',
204
- toolCount: 0,
205
- protectedTools: [],
206
- agentDid: 'did:key:z6MkhaXgBZDv...',
207
- projectId: 'none',
208
- cacheTtlMs: 300000,
209
- cacheExpiresAt: '2025-11-24T00:12:31.652Z'
210
- }
211
-
212
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > edge cases > should handle null requiredScopes
213
- [ToolProtectionService] Config loaded from API {
214
- source: 'api',
215
- toolCount: 1,
216
- protectedTools: [ 'tool1' ],
217
- agentDid: 'did:key:z6MkhaXgBZDv...',
218
- projectId: 'none',
219
- cacheTtlMs: 300000,
220
- cacheExpiresAt: '2025-11-24T00:12:31.653Z'
221
- }
222
-
223
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > edge cases > should handle mixed camelCase and snake_case in response
224
- [ToolProtectionService] Config loaded from API {
225
- source: 'api',
226
- toolCount: 2,
227
- protectedTools: [ 'tool1' ],
228
- agentDid: 'did:key:z6MkhaXgBZDv...',
229
- projectId: 'none',
230
- cacheTtlMs: 300000,
231
- cacheExpiresAt: '2025-11-24T00:12:31.653Z'
232
- }
233
-
234
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return null when tool has no protection
235
- [ToolProtectionService] Config loaded from API {
236
- source: 'api',
237
- toolCount: 1,
238
- protectedTools: [],
239
- agentDid: 'did:key:z6MkhaXgBZDv...',
240
- projectId: 'none',
241
- cacheTtlMs: 300000,
242
- cacheExpiresAt: '2025-11-24T00:12:31.653Z'
243
- }
244
-
245
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return null when tool is not in config
246
- [ToolProtectionService] Config loaded from API {
247
- source: 'api',
248
- toolCount: 1,
249
- protectedTools: [ 'other_tool' ],
250
- agentDid: 'did:key:z6MkhaXgBZDv...',
251
- projectId: 'none',
252
- cacheTtlMs: 300000,
253
- cacheExpiresAt: '2025-11-24T00:12:31.653Z'
254
- }
255
-
256
- stderr | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should use wildcard protection in fail-safe deny-all mode
257
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return null when tool is not in config
258
- [ToolProtectionService] Protection check {
259
- [ToolProtectionService] API fetch failed, no fallback, failing closed (deny-all) {
260
- tool: 'unknown_tool',
261
- agentDid: 'did:key:z6MkhaXgBZDv...',
262
- found: false,
263
- isWildcard: true,
264
- agentDid: 'did:key:z6MkhaXgBZDv...',
265
- error: 'Network error',
266
- requiresDelegation: false,
267
- availableTools: [ 'other_tool' ]
268
- }
269
- cacheKey: 'agent:did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK'
270
-
271
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return wildcard protection when tool not found and wildcard exists
272
- [ToolProtectionService] Config loaded from API {
273
- }
274
- source: 'api',
275
- toolCount: 2,
276
-
277
- protectedTools: [ '*' ],
278
- agentDid: 'did:key:z6MkhaXgBZDv...',
279
- projectId: 'none',
280
- cacheTtlMs: 300000,
281
- cacheExpiresAt: '2025-11-24T00:12:31.653Z'
282
- }
283
-
284
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return wildcard protection when tool not found and wildcard exists
285
- [ToolProtectionService] Protection check {
286
- tool: 'unknown_tool',
287
- agentDid: 'did:key:z6MkhaXgBZDv...',
288
- found: true,
289
- isWildcard: true,
290
- requiresDelegation: true,
291
- availableTools: [ '*', 'specific_tool' ]
292
- }
293
-
294
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should prioritize specific tool protection over wildcard
295
- [ToolProtectionService] Config loaded from API {
296
- source: 'api',
297
- toolCount: 2,
298
- protectedTools: [ '*' ],
299
- agentDid: 'did:key:z6MkhaXgBZDv...',
300
- projectId: 'none',
301
- cacheTtlMs: 300000,
302
- cacheExpiresAt: '2025-11-24T00:12:31.654Z'
303
- }
304
-
305
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should use wildcard protection in fail-safe deny-all mode
306
- [ToolProtectionService] Protection check {
307
- tool: 'any_tool',
308
- agentDid: 'did:key:z6MkhaXgBZDv...',
309
- found: true,
310
- isWildcard: true,
311
- requiresDelegation: true,
312
- availableTools: [ '*' ]
313
- }
314
-
315
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return protection config when tool requires delegation
316
- [ToolProtectionService] Config loaded from API {
317
- source: 'api',
318
- toolCount: 1,
319
- protectedTools: [ 'protected_tool' ],
320
- agentDid: 'did:key:z6MkhaXgBZDv...',
321
- projectId: 'none',
322
- cacheTtlMs: 300000,
323
- cacheExpiresAt: '2025-11-24T00:12:31.654Z'
324
- }
325
-
326
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return protection config when tool requires delegation
327
- [ToolProtectionService] Protection check {
328
- tool: 'protected_tool',
329
- agentDid: 'did:key:z6MkhaXgBZDv...',
330
- found: true,
331
- isWildcard: false,
332
- requiresDelegation: true,
333
- availableTools: [ 'protected_tool' ]
334
- }
335
-
336
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > integration with NoOpToolProtectionCache > should work with NoOpToolProtectionCache
337
- [ToolProtectionService] Config loaded from API {
338
- source: 'api',
339
- toolCount: 1,
340
- protectedTools: [ 'tool1' ],
341
- agentDid: 'did:key:z6MkhaXgBZDv...',
342
- projectId: 'none',
343
- cacheTtlMs: 300000,
344
- cacheExpiresAt: '2025-11-24T00:12:31.655Z'
345
- }
346
-
347
- stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > integration with NoOpToolProtectionCache > should work with NoOpToolProtectionCache
348
- [ToolProtectionService] Config loaded from API {
349
- source: 'api',
350
- toolCount: 1,
351
- protectedTools: [ 'tool1' ],
352
- agentDid: 'did:key:z6MkhaXgBZDv...',
353
- projectId: 'none',
354
- cacheTtlMs: 300000,
355
- cacheExpiresAt: '2025-11-24T00:12:31.655Z'
356
- }
357
-
358
- stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > API Authentication > should use X-API-Key header for new endpoint
359
- [ToolProtectionService] Config loaded from API {
360
- source: 'api',
361
- toolCount: 0,
362
- protectedTools: [],
363
- agentDid: 'did:key:z6MkhaXgBZDv...',
364
- projectId: 'test-project-123',
365
- cacheTtlMs: 300000,
366
- cacheExpiresAt: '2025-11-24T00:12:31.678Z'
367
- }
368
-
369
- stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > API Authentication > should use Authorization Bearer header for old endpoint
370
- [ToolProtectionService] Config loaded from API {
371
- source: 'api',
372
- toolCount: 0,
373
- protectedTools: [],
374
- agentDid: 'did:key:z6MkhaXgBZDv...',
375
- projectId: 'none',
376
- cacheTtlMs: 300000,
377
- cacheExpiresAt: '2025-11-24T00:12:31.683Z'
378
- }
379
-
380
- ✓ src/__tests__/services/tool-protection.service.test.ts (49 tests) 15ms
381
- stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Endpoint Selection > should use project-scoped endpoint when projectId is available
382
- stderr | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Error Handling > should handle network timeout
383
- [ToolProtectionService] Config loaded from API {
384
- source: 'api',
385
- toolCount: 0,
386
- [ToolProtectionService] API fetch failed, using fallback config { agentDid: 'did:key:z6MkhaXgBZDv...', error: 'Network timeout' }
387
- protectedTools: [],
388
- agentDid: 'did:key:z6MkhaXgBZDv...',
389
- projectId: 'test-project-123',
390
-
391
- cacheTtlMs: 300000,
392
- cacheExpiresAt: '2025-11-24T00:12:31.686Z'
393
- }
394
-
395
- stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Endpoint Selection > should use agent-scoped endpoint when projectId is not available
396
- [ToolProtectionService] Config loaded from API {
397
- source: 'api',
398
- toolCount: 0,
399
- protectedTools: [],
400
- agentDid: 'did:key:z6MkhaXgBZDv...',
401
- projectId: 'none',
402
- cacheTtlMs: 300000,
403
- cacheExpiresAt: '2025-11-24T00:12:31.687Z'
404
- stderr | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Fallback Behavior > should cache fallback config
405
- }
406
-
407
- stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Endpoint Selection > should encode projectId in URL
408
- [ToolProtectionService] Config loaded from API {
409
- source: 'api',
410
- toolCount: 0,
411
- protectedTools: [],
412
- [ToolProtectionService] API fetch failed, using fallback config { agentDid: 'did:key:z6MkhaXgBZDv...', error: 'Network error' }
413
- agentDid: 'did:key:z6MkhaXgBZDv...',
414
-
415
- projectId: 'project/with/special-chars',
416
- cacheTtlMs: 300000,
417
- cacheExpiresAt: '2025-11-24T00:12:31.687Z'
418
- }
419
-
420
- stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Endpoint Selection > should encode agent DID in URL
421
- [ToolProtectionService] Config loaded from API {
422
- source: 'api',
423
- toolCount: 0,
424
- protectedTools: [],
425
- agentDid: 'did:key:z6MkhaXgBZDv...',
426
- projectId: 'none',
427
- cacheTtlMs: 300000,
428
- cacheExpiresAt: '2025-11-24T00:12:31.688Z'
429
- }
430
-
431
- stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Response Format Compatibility > should handle new endpoint format (toolProtections object)
432
- [ToolProtectionService] Config loaded from API {
433
- source: 'api',
434
- toolCount: 2,
435
- protectedTools: [ 'checkout' ],
436
- agentDid: 'did:key:z6MkhaXgBZDv...',
437
- projectId: 'test-project-123',
438
- cacheTtlMs: 300000,
439
- cacheExpiresAt: '2025-11-24T00:12:31.688Z'
440
- }
441
-
442
- stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Response Format Compatibility > should handle old endpoint format (tools array)
443
- [ToolProtectionService] Config loaded from API {
444
- source: 'api',
445
- toolCount: 2,
446
- protectedTools: [ 'checkout' ],
447
- agentDid: 'did:key:z6MkhaXgBZDv...',
448
- projectId: 'none',
449
- cacheTtlMs: 300000,
450
- cacheExpiresAt: '2025-11-24T00:12:31.688Z'
451
- }
452
-
453
- stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Response Format Compatibility > should handle old endpoint format (tools object)
454
- [ToolProtectionService] Config loaded from API {
455
- source: 'api',
456
- toolCount: 2,
457
- protectedTools: [ 'checkout' ],
458
- agentDid: 'did:key:z6MkhaXgBZDv...',
459
- projectId: 'none',
460
- cacheTtlMs: 300000,
461
- cacheExpiresAt: '2025-11-24T00:12:31.689Z'
462
- }
463
-
464
- stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Response Format Compatibility > should handle snake_case field names
465
- [ToolProtectionService] Config loaded from API {
466
- source: 'api',
467
- toolCount: 1,
468
- protectedTools: [ 'tool1' ],
469
- agentDid: 'did:key:z6MkhaXgBZDv...',
470
- projectId: 'test-project-123',
471
- cacheTtlMs: 300000,
472
- cacheExpiresAt: '2025-11-24T00:12:31.689Z'
473
- }
474
-
475
- stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Response Format Compatibility > should handle camelCase field names
476
- [ToolProtectionService] Config loaded from API {
477
- source: 'api',
478
- toolCount: 1,
479
- protectedTools: [ 'tool1' ],
480
- agentDid: 'did:key:z6MkhaXgBZDv...',
481
- projectId: 'test-project-123',
482
- cacheTtlMs: 300000,
483
- cacheExpiresAt: '2025-11-24T00:12:31.689Z'
484
- }
485
-
486
- stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Response Format Compatibility > should prefer camelCase over snake_case when both present
487
- [ToolProtectionService] Config loaded from API {
488
- source: 'api',
489
- toolCount: 1,
490
- protectedTools: [ 'tool1' ],
491
- agentDid: 'did:key:z6MkhaXgBZDv...',
492
- projectId: 'test-project-123',
493
- cacheTtlMs: 300000,
494
- cacheExpiresAt: '2025-11-24T00:12:31.689Z'
495
- }
496
-
497
- stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Caching Integration > should cache successful API responses
498
- [ToolProtectionService] Config loaded from API {
499
- source: 'api',
500
- toolCount: 1,
501
- protectedTools: [ 'tool1' ],
502
- agentDid: 'did:key:z6MkhaXgBZDv...',
503
- projectId: 'test-project-123',
504
- cacheTtlMs: 300000,
505
- cacheExpiresAt: '2025-11-24T00:12:31.692Z'
506
- }
507
-
508
- stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Caching Integration > should respect cache TTL
509
- [ToolProtectionService] Config loaded from API {
510
- source: 'api',
511
- toolCount: 0,
512
- protectedTools: [],
513
- agentDid: 'did:key:z6MkhaXgBZDv...',
514
- projectId: 'test-project-123',
515
- cacheTtlMs: 1000,
516
- cacheExpiresAt: '2025-11-24T00:07:32.692Z'
517
- }
518
-
519
- stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should submit proofs successfully
520
- [AccessControl] 🔍 RAW API RESPONSE (before parsing): {
521
- correlationId: 'cdf89417-bb4e-43ad-a8a9-447046ca7443',
522
- status: 200,
523
- statusText: '',
524
- headers: { 'content-type': 'application/json' },
525
- responseTextLength: 100,
526
- responseTextPreview: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}',
527
- fullResponseText: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}'
528
- }
529
- [AccessControl] 🔍 PARSED RESPONSE DATA: {
530
- correlationId: 'cdf89417-bb4e-43ad-a8a9-447046ca7443',
531
- status: 200,
532
- responseDataType: 'object',
533
- responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
534
- responseData: '{\n' +
535
- ' "success": true,\n' +
536
- ' "accepted": 1,\n' +
537
- ' "rejected": 0,\n' +
538
- ' "outcomes": {\n' +
539
- ' "success": 1,\n' +
540
- ' "failed": 0,\n' +
541
- ' "blocked": 0,\n' +
542
- ' "error": 0\n' +
543
- ' }\n' +
544
- '}'
545
- }
546
- [AccessControl] Raw response received: {
547
- "success": true,
548
- "accepted": 1,
549
- "rejected": 0,
550
- "outcomes": {
551
- "success": 1,
552
- "failed": 0,
553
- "blocked": 0,
554
- "error": 0
555
- }
556
- }
557
-
558
- stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle all_proofs_rejected error gracefully
559
- [AccessControl] 🔍 RAW API RESPONSE (before parsing): {
560
- correlationId: '33847abb-0cf4-4314-ac3b-b001281354e9',
561
- status: 400,
562
- statusText: '',
563
- headers: { 'content-type': 'application/json' },
564
- responseTextLength: 209,
565
- responseTextPreview: '{"success":false,"error":{"code":"all_proofs_rejected","message":"All proofs rejected","details":{"rejected":1,"errors":[{"proof_index":0,"error":{"code":"invalid_signature","message":"Invalid signature"}}]}}}',
566
- fullResponseText: '{"success":false,"error":{"code":"all_proofs_rejected","message":"All proofs rejected","details":{"rejected":1,"errors":[{"proof_index":0,"error":{"code":"invalid_signature","message":"Invalid signature"}}]}}}'
567
- }
568
- [AccessControl] 🔍 PARSED RESPONSE DATA: {
569
- correlationId: '33847abb-0cf4-4314-ac3b-b001281354e9',
570
- status: 400,
571
- responseDataType: 'object',
572
- responseDataKeys: [ 'success', 'error' ],
573
- responseData: '{\n' +
574
- ' "success": false,\n' +
575
- ' "error": {\n' +
576
- ' "code": "all_proofs_rejected",\n' +
577
- ' "message": "All proofs rejected",\n' +
578
- ' "details": {\n' +
579
- ' "rejected": 1,\n' +
580
- ' "errors": [\n' +
581
- ' {\n' +
582
- ' "proof_index": 0,\n' +
583
- ' "error": {\n' +
584
- ' "code": "invalid_signature",\n' +
585
- ' "message": "Invalid signature"\n' +
586
- ' }\n' +
587
- ' }\n' +
588
- ' ]\n' +
589
- ' }\n' +
590
- ' }\n' +
591
- '}'
592
- }
593
-
594
- stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle wrapped response format
595
- [AccessControl] 🔍 RAW API RESPONSE (before parsing): {
596
- correlationId: '95f2790c-d1b6-4fbf-aa56-a15e0e2165e0',
597
- status: 200,
598
- statusText: '',
599
- headers: { 'content-type': 'application/json' },
600
- responseTextLength: 206,
601
- responseTextPreview: '{"success":true,"data":{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}},"metadata":{"requestId":"test-request-id","timestamp":"2025-11-24T00:07:31.731Z"}}',
602
- fullResponseText: '{"success":true,"data":{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}},"metadata":{"requestId":"test-request-id","timestamp":"2025-11-24T00:07:31.731Z"}}'
603
- }
604
- [AccessControl] 🔍 PARSED RESPONSE DATA: {
605
- correlationId: '95f2790c-d1b6-4fbf-aa56-a15e0e2165e0',
606
- status: 200,
607
- responseDataType: 'object',
608
- responseDataKeys: [ 'success', 'data', 'metadata' ],
609
- responseData: '{\n' +
610
- ' "success": true,\n' +
611
- ' "data": {\n' +
612
- ' "success": true,\n' +
613
- ' "accepted": 1,\n' +
614
- ' "rejected": 0,\n' +
615
- ' "outcomes": {\n' +
616
- ' "success": 1,\n' +
617
- ' "failed": 0,\n' +
618
- ' "blocked": 0,\n' +
619
- ' "error": 0\n' +
620
- ' }\n' +
621
- ' },\n' +
622
- ' "metadata": {\n' +
623
- ' "requestId": "test-request-id",\n' +
624
- ' "timestamp": "2025-11-24T00:07:31.731Z"\n' +
625
- ' }\n' +
626
- '}'
627
- }
628
- [AccessControl] Raw response received: {
629
- "success": true,
630
- "data": {
631
- "success": true,
632
- "accepted": 1,
633
- "rejected": 0,
634
- "outcomes": {
635
- "success": 1,
636
- "failed": 0,
637
- "blocked": 0,
638
- "error": 0
639
- }
640
- },
641
- "metadata": {
642
- "requestId": "test-request-id",
643
- "timestamp": "2025-11-24T00:07:31.731Z"
644
- }
645
- }
646
- [AccessControl] 🔍 DATA OBJECT STRUCTURE: {
647
- correlationId: '95f2790c-d1b6-4fbf-aa56-a15e0e2165e0',
648
- dataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
649
- hasAccepted: true,
650
- hasRejected: true,
651
- hasOutcomes: true,
652
- hasErrors: false,
653
- acceptedType: 'number',
654
- rejectedType: 'number',
655
- outcomesType: 'object',
656
- errorsType: 'undefined',
657
- errorsIsArray: false,
658
- fullData: '{\n' +
659
- ' "success": true,\n' +
660
- ' "accepted": 1,\n' +
661
- ' "rejected": 0,\n' +
662
- ' "outcomes": {\n' +
663
- ' "success": 1,\n' +
664
- ' "failed": 0,\n' +
665
- ' "blocked": 0,\n' +
666
- ' "error": 0\n' +
667
- ' }\n' +
668
- '}'
669
- }
670
-
671
- stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle response with missing outcomes field (outcomes is optional)
672
- [AccessControl] 🔍 RAW API RESPONSE (before parsing): {
673
- correlationId: '8b230c4d-7525-401e-9840-92ffe27b6a9b',
674
- status: 200,
675
- statusText: '',
676
- headers: { 'content-type': 'application/json' },
677
- responseTextLength: 42,
678
- responseTextPreview: '{"success":true,"accepted":1,"rejected":0}',
679
- fullResponseText: '{"success":true,"accepted":1,"rejected":0}'
680
- }
681
- [AccessControl] 🔍 PARSED RESPONSE DATA: {
682
- correlationId: '8b230c4d-7525-401e-9840-92ffe27b6a9b',
683
- status: 200,
684
- responseDataType: 'object',
685
- responseDataKeys: [ 'success', 'accepted', 'rejected' ],
686
- responseData: '{\n "success": true,\n "accepted": 1,\n "rejected": 0\n}'
687
- }
688
- [AccessControl] Raw response received: {
689
- "success": true,
690
- "accepted": 1,
691
- "rejected": 0
692
- }
693
-
694
- stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle response with missing outcomes field (outcomes is optional)
695
- [AccessControl] 🔍 RAW API RESPONSE (before parsing): {
696
- correlationId: '19533ac6-9d3e-48d0-a81d-2b02656d2f22',
697
- status: 200,
698
- statusText: '',
699
- headers: { 'content-type': 'application/json' },
700
- responseTextLength: 100,
701
- responseTextPreview: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}',
702
- fullResponseText: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}'
703
- }
704
- [AccessControl] 🔍 PARSED RESPONSE DATA: {
705
- correlationId: '19533ac6-9d3e-48d0-a81d-2b02656d2f22',
706
- status: 200,
707
- responseDataType: 'object',
708
- responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
709
- responseData: '{\n' +
710
- ' "success": true,\n' +
711
- ' "accepted": 1,\n' +
712
- ' "rejected": 0,\n' +
713
- ' "outcomes": {\n' +
714
- ' "success": 1,\n' +
715
- ' "failed": 0,\n' +
716
- ' "blocked": 0,\n' +
717
- ' "error": 0\n' +
718
- ' }\n' +
719
- '}'
720
- }
721
- [AccessControl] Raw response received: {
722
- "success": true,
723
- "accepted": 1,
724
- "rejected": 0,
725
- "outcomes": {
726
- "success": 1,
727
- "failed": 0,
728
- "blocked": 0,
729
- "error": 0
730
- }
731
- }
732
-
733
- stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle response with missing outcomes field (outcomes is optional)
734
- [AccessControl] 🔍 RAW API RESPONSE (before parsing): {
735
- correlationId: '730acd89-1153-4885-bf14-4d126eaf93f2',
736
- status: 200,
737
- statusText: '',
738
- headers: { 'content-type': 'application/json' },
739
- responseTextLength: 56,
740
- responseTextPreview: '{"success":true,"accepted":1,"rejected":0,"outcomes":{}}',
741
- fullResponseText: '{"success":true,"accepted":1,"rejected":0,"outcomes":{}}'
742
- }
743
- [AccessControl] 🔍 PARSED RESPONSE DATA: {
744
- correlationId: '730acd89-1153-4885-bf14-4d126eaf93f2',
745
- status: 200,
746
- responseDataType: 'object',
747
- responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
748
- responseData: '{\n "success": true,\n "accepted": 1,\n "rejected": 0,\n "outcomes": {}\n}'
749
- }
750
- [AccessControl] Raw response received: {
751
- "success": true,
752
- "accepted": 1,
753
- "rejected": 0,
754
- "outcomes": {}
755
- }
756
-
757
- stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle wrapped response with invalid data structure
758
- [AccessControl] 🔍 RAW API RESPONSE (before parsing): {
759
- correlationId: 'c6deaac1-4e9e-4ec5-b541-d2bac59c2179',
760
- status: 200,
761
- statusText: '',
762
- headers: { 'content-type': 'application/json' },
763
- responseTextLength: 52,
764
- responseTextPreview: '{"success":true,"data":{"message":"Invalid format"}}',
765
- fullResponseText: '{"success":true,"data":{"message":"Invalid format"}}'
766
- }
767
- [AccessControl] 🔍 PARSED RESPONSE DATA: {
768
- correlationId: 'c6deaac1-4e9e-4ec5-b541-d2bac59c2179',
769
- status: 200,
770
- responseDataType: 'object',
771
- responseDataKeys: [ 'success', 'data' ],
772
- responseData: '{\n "success": true,\n "data": {\n "message": "Invalid format"\n }\n}'
773
- }
774
- [AccessControl] Raw response received: {
775
- "success": true,
776
- "data": {
777
- "message": "Invalid format"
778
- }
779
- }
780
- [AccessControl] 🔍 DATA OBJECT STRUCTURE: {
781
- correlationId: 'c6deaac1-4e9e-4ec5-b541-d2bac59c2179',
782
- dataKeys: [ 'message' ],
783
- hasAccepted: false,
784
- hasRejected: false,
785
- hasOutcomes: false,
786
- hasErrors: false,
787
- acceptedType: 'undefined',
788
- rejectedType: 'undefined',
789
- outcomesType: 'undefined',
790
- errorsType: 'undefined',
791
- errorsIsArray: false,
792
- fullData: '{\n "message": "Invalid format"\n}'
793
- }
794
- [AccessControl] Wrapped response validation failed {
795
- correlationId: 'c6deaac1-4e9e-4ec5-b541-d2bac59c2179',
796
- zodErrors: [
797
- {
798
- code: 'invalid_type',
799
- expected: 'number',
800
- received: 'undefined',
801
- path: [Array],
802
- message: 'Required'
803
- },
804
- {
805
- code: 'invalid_type',
806
- expected: 'number',
807
- received: 'undefined',
808
- path: [Array],
809
- message: 'Required'
810
- }
811
- ],
812
- zodErrorDetails: '[\n' +
813
- ' {\n' +
814
- ' "code": "invalid_type",\n' +
815
- ' "expected": "number",\n' +
816
- ' "received": "undefined",\n' +
817
- ' "path": [\n' +
818
- ' "accepted"\n' +
819
- ' ],\n' +
820
- ' "message": "Required"\n' +
821
- ' },\n' +
822
- ' {\n' +
823
- ' "code": "invalid_type",\n' +
824
- ' "expected": "number",\n' +
825
- ' "received": "undefined",\n' +
826
- ' "path": [\n' +
827
- ' "rejected"\n' +
828
- ' ],\n' +
829
- ' "message": "Required"\n' +
830
- ' }\n' +
831
- ']',
832
- dataToValidate: '{\n "message": "Invalid format"\n}',
833
- dataWithSuccess: '{\n "message": "Invalid format",\n "success": true\n}',
834
- dataKeys: [ 'message' ],
835
- originalResponse: '{\n "success": true,\n "data": {\n "message": "Invalid format"\n }\n}'
836
- }
837
- [AccessControl] Original wrapped response: {
838
- "success": true,
839
- "data": {
840
- "message": "Invalid format"
841
- }
842
- }
843
- [AccessControl] ❌ ZOD VALIDATION FAILED - 2 error(s):
844
- [AccessControl] Error 1: {
845
- path: 'accepted',
846
- message: 'Required',
847
- code: 'invalid_type',
848
- received: 'undefined',
849
- expected: 'number'
850
- }
851
- [AccessControl] Error 2: {
852
- path: 'rejected',
853
- message: 'Required',
854
- code: 'invalid_type',
855
- received: 'undefined',
856
- expected: 'number'
857
- }
858
- [AccessControl] ❌ Full ZOD errors JSON: [
859
- {
860
- "code": "invalid_type",
861
- "expected": "number",
862
- "received": "undefined",
863
- "path": [
864
- "accepted"
865
- ],
866
- "message": "Required"
867
- },
868
- {
869
- "code": "invalid_type",
870
- "expected": "number",
871
- "received": "undefined",
872
- "path": [
873
- "rejected"
874
- ],
875
- "message": "Required"
876
- }
877
- ]
878
- [AccessControl] Response validation failed {
879
- zodErrors: [
880
- {
881
- code: 'invalid_type',
882
- expected: 'number',
883
- received: 'undefined',
884
- path: [Array],
885
- message: 'Required'
886
- },
887
- {
888
- code: 'invalid_type',
889
- expected: 'number',
890
- received: 'undefined',
891
- path: [Array],
892
- message: 'Required'
893
- }
894
- ],
895
- responseData: { success: true, data: { message: 'Invalid format' } }
896
- }
897
- [AccessControl] Response validation failed {
898
- correlationId: 'c6deaac1-4e9e-4ec5-b541-d2bac59c2179',
899
- zodErrors: [
900
- {
901
- code: 'invalid_type',
902
- expected: 'number',
903
- received: 'undefined',
904
- path: [Array],
905
- message: 'Required'
906
- },
907
- {
908
- code: 'invalid_type',
909
- expected: 'number',
910
- received: 'undefined',
911
- path: [Array],
912
- message: 'Required'
913
- }
914
- ],
915
- zodErrorDetails: '[\n' +
916
- ' {\n' +
917
- ' "code": "invalid_type",\n' +
918
- ' "expected": "number",\n' +
919
- ' "received": "undefined",\n' +
920
- ' "path": [\n' +
921
- ' "accepted"\n' +
922
- ' ],\n' +
923
- ' "message": "Required"\n' +
924
- ' },\n' +
925
- ' {\n' +
926
- ' "code": "invalid_type",\n' +
927
- ' "expected": "number",\n' +
928
- ' "received": "undefined",\n' +
929
- ' "path": [\n' +
930
- ' "rejected"\n' +
931
- ' ],\n' +
932
- ' "message": "Required"\n' +
933
- ' }\n' +
934
- ']',
935
- responseData: '{\n "success": true,\n "data": {\n "message": "Invalid format"\n }\n}',
936
- responseDataType: 'object',
937
- responseKeys: [ 'success', 'data' ],
938
- httpStatus: 200,
939
- httpStatusText: ''
940
- }
941
- [AccessControl] ❌ ZOD VALIDATION FAILED (direct) - 2 error(s):
942
- [AccessControl] Error 1: {
943
- path: 'accepted',
944
- message: 'Required',
945
- code: 'invalid_type',
946
- received: 'undefined',
947
- expected: 'number'
948
- }
949
- [AccessControl] Error 2: {
950
- path: 'rejected',
951
- message: 'Required',
952
- code: 'invalid_type',
953
- received: 'undefined',
954
- expected: 'number'
955
- }
956
- [AccessControl] ❌ Full ZOD errors JSON: [
957
- {
958
- "code": "invalid_type",
959
- "expected": "number",
960
- "received": "undefined",
961
- "path": [
962
- "accepted"
963
- ],
964
- "message": "Required"
965
- },
966
- {
967
- "code": "invalid_type",
968
- "expected": "number",
969
- "received": "undefined",
970
- "path": [
971
- "rejected"
972
- ],
973
- "message": "Required"
974
- }
975
- ]
976
- [AccessControl] ❌ ACTUAL RESPONSE DATA: {
977
- "success": true,
978
- "data": {
979
- "message": "Invalid format"
980
- }
981
- }
982
-
983
- ✓ src/services/__tests__/access-control.service.test.ts (23 tests) 37ms
984
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should allow tool execution when no protection required
985
- [MCP-I] Checking tool protection: {
986
- tool: 'unprotectedTool',
987
- agentDid: 'did:key:zmock123...',
988
- hasDelegation: false
989
- }
990
-
991
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should allow tool execution when no protection required
992
- [MCP-I] Tool protection check passed (no delegation required) {
993
- tool: 'unprotectedTool',
994
- agentDid: 'did:key:zmock123...',
995
- reason: 'Tool not configured to require delegation'
996
- }
997
-
998
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should block tool execution when protection required and no delegation
999
- [MCP-I] Checking tool protection: {
1000
- tool: 'protectedTool',
1001
- agentDid: 'did:key:zmock123...',
1002
- hasDelegation: false
1003
- }
1004
-
1005
- stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should block tool execution when protection required and no delegation
1006
- [MCP-I] BLOCKED: Tool requires delegation but none provided {
1007
- tool: 'protectedTool',
1008
- requiredScopes: [ 'files:write' ],
1009
- agentDid: 'did:key:zmock123...',
1010
- resumeToken: 'resume_ubsac5_mice138y',
1011
- consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_ubsac5_mice138y'
1012
- }
1013
-
1014
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should allow tool execution when protection required and delegation provided
1015
- [MCP-I] Checking tool protection: {
1016
- tool: 'protectedTool',
1017
- agentDid: 'did:key:zmock123...',
1018
- hasDelegation: true
1019
- }
1020
-
1021
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should allow tool execution when protection required and delegation provided
1022
- [MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
1023
- tool: 'protectedTool',
1024
- agentDid: 'did:key:zmock123...',
1025
- hasDelegationToken: true,
1026
- hasConsentProof: false,
1027
- requiredScopes: [ 'files:write' ]
1028
- }
1029
-
1030
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should allow tool execution when protection required and delegation provided
1031
- [MCP-I] ✅ Delegation verification SUCCEEDED {
1032
- tool: 'protectedTool',
1033
- agentDid: 'did:key:zmock123...',
1034
- delegationId: 'test-delegation-id',
1035
- credentialScopes: [ 'files:write' ],
1036
- requiredScopes: [ 'files:write' ]
1037
- }
1038
-
1039
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should allow tool execution when protection required and consentProof provided
1040
- [MCP-I] Checking tool protection: {
1041
- tool: 'protectedTool',
1042
- agentDid: 'did:key:zmock123...',
1043
- hasDelegation: true
1044
- }
1045
-
1046
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should allow tool execution when protection required and consentProof provided
1047
- [MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
1048
- tool: 'protectedTool',
1049
- agentDid: 'did:key:zmock123...',
1050
- hasDelegationToken: false,
1051
- hasConsentProof: true,
1052
- requiredScopes: [ 'files:write' ]
1053
- }
1054
-
1055
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should allow tool execution when protection required and consentProof provided
1056
- [MCP-I] ✅ Delegation verification SUCCEEDED {
1057
- tool: 'protectedTool',
1058
- agentDid: 'did:key:zmock123...',
1059
- delegationId: 'test-delegation-id',
1060
- credentialScopes: [ 'files:write' ],
1061
- requiredScopes: [ 'files:write' ]
1062
- }
1063
-
1064
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should block tool execution when delegation verification fails
1065
- [MCP-I] Checking tool protection: {
1066
- tool: 'protectedTool',
1067
- agentDid: 'did:key:zmock123...',
1068
- hasDelegation: true
1069
- }
1070
-
1071
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should block tool execution when delegation verification fails
1072
- [MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
1073
- stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should block tool execution when delegation verification fails
1074
- tool: 'protectedTool',
1075
- agentDid: 'did:key:zmock123...',
1076
- hasDelegationToken: true,
1077
- [MCP-I] ❌ Delegation verification FAILED {
1078
- tool: 'protectedTool',
1079
- hasConsentProof: false,
1080
- requiredScopes: [ 'files:write' ]
1081
- agentDid: 'did:key:zmock123...',
1082
- reason: 'Delegation token expired',
1083
- }
1084
-
1085
- errorCode: undefined,
1086
- errorMessage: undefined,
1087
- requiredScopes: [ 'files:write' ]
1088
- }
1089
-
1090
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should block tool execution when delegation has wrong scopes
1091
- [MCP-I] Checking tool protection: {
1092
- tool: 'protectedTool',
1093
- agentDid: 'did:key:zmock123...',
1094
- hasDelegation: true
1095
- }
1096
-
1097
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should block tool execution when delegation has wrong scopes
1098
- [MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
1099
- tool: 'protectedTool',
1100
- agentDid: 'did:key:zmock123...',
1101
- hasDelegationToken: true,
1102
- hasConsentProof: false,
1103
- requiredScopes: [ 'files:write' ]
1104
- }
1105
-
1106
- stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should block tool execution when delegation has wrong scopes
1107
- [MCP-I] ❌ Delegation verification FAILED {
1108
- tool: 'protectedTool',
1109
- agentDid: 'did:key:zmock123...',
1110
- reason: 'Insufficient scopes',
1111
- errorCode: undefined,
1112
- errorMessage: undefined,
1113
- requiredScopes: [ 'files:write' ]
1114
- }
1115
-
1116
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should handle API errors during verification gracefully
1117
- [MCP-I] Checking tool protection: {
1118
- tool: 'protectedTool',
1119
- agentDid: 'did:key:zmock123...',
1120
- hasDelegation: true
1121
- }
1122
-
1123
- stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should handle API errors during verification gracefully
1124
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should handle API errors during verification gracefully
1125
- [MCP-I] ❌ Delegation verification error (API failure) {
1126
- [MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
1127
- tool: 'protectedTool',
1128
- agentDid: 'did:key:zmock123...',
1129
- hasDelegationToken: true,
1130
- hasConsentProof: false,
1131
- requiredScopes: [ 'files:write' ]
1132
- }
1133
- tool: 'protectedTool',
1134
-
1135
- agentDid: 'did:key:zmock123...',
1136
- errorCode: 'network_error',
1137
- errorMessage: 'API unavailable',
1138
- errorDetails: {}
1139
- }
1140
-
1141
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should allow tool execution when access control service not configured (graceful degradation)
1142
- [MCP-I] Checking tool protection: {
1143
- tool: 'protectedTool',
1144
- agentDid: 'did:key:zmock123...',
1145
- hasDelegation: true
1146
- }
1147
- stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should allow tool execution when access control service not configured (graceful degradation)
1148
- [MCP-I] ⚠️ Delegation token provided but AccessControlApiService not configured - skipping verification {
1149
-
1150
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > user_identifier validation > should reject delegation when user_identifier does not match session userDid
1151
- [MCP-I] Checking tool protection: {
1152
- tool: 'protectedTool',
1153
- tool: 'protectedTool',
1154
- agentDid: 'did:key:zmock123...',
1155
- hasDelegation: true
1156
- }
1157
-
1158
- agentDid: 'did:key:zmock123...',
1159
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > user_identifier validation > should reject delegation when user_identifier does not match session userDid
1160
- [MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
1161
- tool: 'protectedTool',
1162
- hasDelegationToken: true,
1163
- agentDid: 'did:key:zmock123...',
1164
- hasDelegationToken: true,
1165
- hasConsentProof: false,
1166
- requiredScopes: [ 'files:write' ]
1167
- }
1168
-
1169
- hasConsentProof: false
1170
- }
1171
-
1172
- stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > user_identifier validation > should reject delegation when user_identifier does not match session userDid
1173
- [MCP-I] 🔒 SECURITY: User identifier validation FAILED {
1174
- tool: 'protectedTool',
1175
- agentDid: 'did:key:zmock123...',
1176
- delegationUserIdentifier: 'did:key:zUserB987654...',
1177
- sessionUserDid: 'did:key:zUserA123456...',
1178
- sessionId: 'session123...',
1179
- reason: 'user_identifier_mismatch',
1180
- severity: 'high'
1181
- }
1182
-
1183
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > user_identifier validation > should accept delegation when user_identifier matches session userDid
1184
- [MCP-I] Checking tool protection: {
1185
- tool: 'protectedTool',
1186
- agentDid: 'did:key:zmock123...',
1187
- hasDelegation: true
1188
- }
1189
-
1190
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > user_identifier validation > should accept delegation when user_identifier matches session userDid
1191
- [MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
1192
- tool: 'protectedTool',
1193
- agentDid: 'did:key:zmock123...',
1194
- hasDelegationToken: true,
1195
- hasConsentProof: false,
1196
- requiredScopes: [ 'files:write' ]
1197
- }
1198
-
1199
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > user_identifier validation > should accept delegation when user_identifier matches session userDid
1200
- [MCP-I] ✅ User identifier validation PASSED {
1201
- tool: 'protectedTool',
1202
- agentDid: 'did:key:zmock123...',
1203
- userDid: 'did:key:zUserA123456...',
1204
- sessionId: 'session123...'
1205
- }
1206
- [MCP-I] ✅ Delegation verification SUCCEEDED {
1207
- tool: 'protectedTool',
1208
- agentDid: 'did:key:zmock123...',
1209
- delegationId: 'test-delegation-id',
1210
- credentialScopes: [ 'files:write' ],
1211
- requiredScopes: [ 'files:write' ]
1212
- }
1213
-
1214
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > user_identifier validation > should handle missing user_identifier gracefully (backward compatibility)
1215
- [MCP-I] Checking tool protection: {
1216
- tool: 'protectedTool',
1217
- agentDid: 'did:key:zmock123...',
1218
- hasDelegation: true
1219
- }
1220
-
1221
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > user_identifier validation > should handle missing user_identifier gracefully (backward compatibility)
1222
- [MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
1223
- tool: 'protectedTool',
1224
- agentDid: 'did:key:zmock123...',
1225
- hasDelegationToken: true,
1226
- hasConsentProof: false,
1227
- requiredScopes: [ 'files:write' ]
1228
- }
1229
-
1230
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > user_identifier validation > should handle missing user_identifier gracefully (backward compatibility)
1231
- [MCP-I] ✅ Delegation verification SUCCEEDED {
1232
- tool: 'protectedTool',
1233
- agentDid: 'did:key:zmock123...',
1234
- delegationId: 'test-delegation-id',
1235
- credentialScopes: [ 'files:write' ],
1236
- requiredScopes: [ 'files:write' ]
1237
- }
1238
-
1239
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > user_identifier validation > should handle missing session userDid gracefully
1240
- [MCP-I] Checking tool protection: {
1241
- tool: 'protectedTool',
1242
- agentDid: 'did:key:zmock123...',
1243
- hasDelegation: true
1244
- }
1245
-
1246
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > user_identifier validation > should handle missing session userDid gracefully
1247
- [MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
1248
- tool: 'protectedTool',
1249
- agentDid: 'did:key:zmock123...',
1250
- hasDelegationToken: true,
1251
- hasConsentProof: false,
1252
- requiredScopes: [ 'files:write' ]
1253
- }
1254
-
1255
- stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > user_identifier validation > should handle missing session userDid gracefully
1256
- [MCP-I] ⚠️ Delegation has user_identifier but session missing userDid {
1257
- tool: 'protectedTool',
1258
- agentDid: 'did:key:zmock123...',
1259
- delegationUserIdentifier: 'did:key:zUserA123456...',
1260
- sessionId: 'session123...'
1261
- }
1262
-
1263
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > user_identifier validation > should handle missing session userDid gracefully
1264
- [MCP-I] ✅ Delegation verification SUCCEEDED {
1265
- tool: 'protectedTool',
1266
- agentDid: 'did:key:zmock123...',
1267
- delegationId: 'test-delegation-id',
1268
- credentialScopes: [ 'files:write' ],
1269
- requiredScopes: [ 'files:write' ]
1270
- }
1271
-
1272
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should create proof after successful tool execution
1273
- [MCP-I] Checking tool protection: {
1274
- tool: 'unprotectedTool',
1275
- agentDid: 'did:key:zmock123...',
1276
- hasDelegation: false
1277
- }
1278
-
1279
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should create proof after successful tool execution
1280
- [MCP-I] Tool protection check passed (no delegation required) {
1281
- tool: 'unprotectedTool',
1282
- agentDid: 'did:key:zmock123...',
1283
- reason: 'Tool not configured to require delegation'
1284
- }
1285
-
1286
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should not create proof when tool execution is blocked
1287
- [MCP-I] Checking tool protection: {
1288
- tool: 'protectedTool',
1289
- agentDid: 'did:key:zmock123...',
1290
- hasDelegation: false
1291
- }
1292
-
1293
- stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should not create proof when tool execution is blocked
1294
- [MCP-I] BLOCKED: Tool requires delegation but none provided {
1295
- tool: 'protectedTool',
1296
- requiredScopes: [ 'files:write' ],
1297
- agentDid: 'did:key:zmock123...',
1298
- resumeToken: 'resume_ubsa59_mice1395',
1299
- consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_ubsa59_mice1395'
1300
- }
1301
-
1302
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include tool name in error
1303
- [MCP-I] Checking tool protection: {
1304
- tool: 'protectedTool',
1305
- agentDid: 'did:key:zmock123...',
1306
- hasDelegation: false
1307
- }
1308
-
1309
- stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include tool name in error
1310
- [MCP-I] BLOCKED: Tool requires delegation but none provided {
1311
- tool: 'protectedTool',
1312
- requiredScopes: [ 'files:write' ],
1313
- agentDid: 'did:key:zmock123...',
1314
- resumeToken: 'resume_ubsa59_mice1395',
1315
- consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_ubsa59_mice1395'
1316
- }
1317
-
1318
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include required scopes in error
1319
- [MCP-I] Checking tool protection: {
1320
- tool: 'protectedTool',
1321
- agentDid: 'did:key:zmock123...',
1322
- hasDelegation: false
1323
- }
1324
- stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include required scopes in error
1325
- [MCP-I] BLOCKED: Tool requires delegation but none provided {
1326
-
1327
- tool: 'protectedTool',
1328
- requiredScopes: [ 'files:write', 'files:read' ],
1329
- agentDid: 'did:key:zmock123...',
1330
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include consent URL in error
1331
- [MCP-I] Checking tool protection: {
1332
- resumeToken: 'resume_ubsa59_mice1395',
1333
- tool: 'protectedTool',
1334
- consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite%2Cfiles%3Aread&session_id=session123&agent_did=&resume_token=resume_ubsa59_mice1395'
1335
- }
1336
- agentDid: 'did:key:zmock123...',
1337
- hasDelegation: false
1338
- }
1339
-
1340
-
1341
- stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include consent URL in error
1342
- [MCP-I] BLOCKED: Tool requires delegation but none provided {
1343
- tool: 'protectedTool',
1344
- requiredScopes: [ 'files:write' ],
1345
- agentDid: 'did:key:zmock123...',
1346
- resumeToken: 'resume_ubs9mb_mice1396',
1347
- consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_ubs9mb_mice1396'
1348
- }
1349
-
1350
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include resume token in error
1351
- [MCP-I] Checking tool protection: {
1352
- stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include resume token in error
1353
- tool: 'protectedTool',
1354
- [MCP-I] BLOCKED: Tool requires delegation but none provided {
1355
- agentDid: 'did:key:zmock123...',
1356
- hasDelegation: false
1357
- }
1358
-
1359
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include intercepted call context in error
1360
- [MCP-I] Checking tool protection: {
1361
- tool: 'protectedTool',
1362
- agentDid: 'did:key:zmock123...',
1363
- hasDelegation: false
1364
- }
1365
- tool: 'protectedTool',
1366
- requiredScopes: [ 'files:write' ],
1367
- agentDid: 'did:key:zmock123...',
1368
- resumeToken: 'resume_ubs9mb_mice1396',
1369
- consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_ubs9mb_mice1396'
1370
- }
1371
-
1372
- stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include intercepted call context in error
1373
- [MCP-I] BLOCKED: Tool requires delegation but none provided {
1374
- tool: 'protectedTool',
1375
- requiredScopes: [ 'files:write' ],
1376
- agentDid: 'did:key:zmock123...',
1377
- resumeToken: 'resume_e522e0_mice1396',
1378
- consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_e522e0_mice1396'
1379
- }
1380
-
1381
-
1382
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > audit logging > should log tool protection check when audit enabled
1383
- [MCP-I] Checking tool protection: {
1384
- tool: 'testTool',
1385
- agentDid: 'did:key:zmock123...',
1386
- hasDelegation: false
1387
- }
1388
-
1389
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > audit logging > should log tool protection check when audit enabled
1390
- [MCP-I] Tool protection check passed (no delegation required) {
1391
- tool: 'testTool',
1392
- agentDid: 'did:key:zmock123...',
1393
- reason: 'Tool not configured to require delegation'
1394
- }
1395
-
1396
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > audit logging > should log blocked tool call when audit enabled
1397
- [MCP-I] Checking tool protection: {
1398
- tool: 'protectedTool',
1399
- agentDid: 'did:key:zmock123...',
1400
- hasDelegation: false
1401
- }
1402
-
1403
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > tool protection service integration > should use agent DID from identity for protection check
1404
- [MCP-I] Checking tool protection: {
1405
- tool: 'testTool',
1406
- agentDid: 'did:key:zmock123...',
1407
- hasDelegation: false
1408
- }
1409
-
1410
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > tool protection service integration > should use agent DID from identity for protection check
1411
- [MCP-I] Tool protection check passed (no delegation required) {
1412
- tool: 'testTool',
1413
- agentDid: 'did:key:zmock123...',
1414
- reason: 'Tool not configured to require delegation'
1415
- }
1416
-
1417
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > tool protection service integration > should handle tool protection service errors gracefully
1418
- [MCP-I] Checking tool protection: {
1419
- tool: 'testTool',
1420
- agentDid: 'did:key:zmock123...',
1421
- hasDelegation: false
1422
- }
1423
-
1424
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle empty required scopes array
1425
- [MCP-I] Checking tool protection: {
1426
- tool: 'protectedTool',
1427
- agentDid: 'did:key:zmock123...',
1428
- hasDelegation: false
1429
- }
1430
-
1431
- stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle empty required scopes array
1432
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle multiple required scopes
1433
- [MCP-I] Checking tool protection: {
1434
- tool: 'protectedTool',
1435
- agentDid: 'did:key:zmock123...',
1436
- [MCP-I] BLOCKED: Tool requires delegation but none provided {
1437
- hasDelegation: false
1438
- }
1439
-
1440
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle session without id
1441
- tool: 'protectedTool',
1442
- requiredScopes: [],
1443
- [MCP-I] Checking tool protection: {
1444
- agentDid: 'did:key:zmock123...',
1445
- tool: 'protectedTool',
1446
- resumeToken: 'resume_ubs9lg_mice1397',
1447
- agentDid: 'did:key:zmock123...',
1448
- consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=&session_id=session123&agent_did=&resume_token=resume_ubs9lg_mice1397'
1449
- hasDelegation: false
1450
- }
1451
-
1452
- stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle multiple required scopes
1453
- [MCP-I] BLOCKED: Tool requires delegation but none provided {
1454
- }
1455
-
1456
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle handler errors independently of protection
1457
- tool: 'protectedTool',
1458
- [MCP-I] Checking tool protection: {
1459
- tool: 'errorTool',
1460
- agentDid: 'did:key:zmock123...',
1461
- hasDelegation: false
1462
- requiredScopes: [ 'scope1', 'scope2', 'scope3' ],
1463
- }
1464
- agentDid: 'did:key:zmock123...',
1465
-
1466
- resumeToken: 'resume_ubs9h5_mice139c',
1467
- consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=scope1%2Cscope2%2Cscope3&session_id=session123&agent_did=&resume_token=resume_ubs9h5_mice139c'
1468
- }
1469
- stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle handler errors independently of protection
1470
- [MCP-I] Tool protection check passed (no delegation required) {
1471
- tool: 'errorTool',
1472
-
1473
- agentDid: 'did:key:zmock123...',
1474
- reason: 'Tool not configured to require delegation'
1475
- }
1476
-
1477
- stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle session without id
1478
- [MCP-I] BLOCKED: Tool requires delegation but none provided {
1479
- tool: 'protectedTool',
1480
- requiredScopes: [ 'files:write' ],
1481
- agentDid: 'did:key:zmock123...',
1482
- resumeToken: 'resume_h9q92f_mice139c',
1483
- consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=&agent_did=&resume_token=resume_h9q92f_mice139c'
1484
- }
1485
-
1486
- ✓ src/delegation/__tests__/vc-verifier.test.ts (35 tests) 84ms
1487
- stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Tool protection enforcement flow > should allow unprotected tool calls
1488
- [ToolProtectionService] Config loaded from API {
1489
- source: 'api',
1490
- toolCount: 1,
1491
- protectedTools: [],
1492
- agentDid: 'did:key:z6MkhaXgBZDv...',
1493
- projectId: 'test-project',
1494
- cacheTtlMs: 300000,
1495
- cacheExpiresAt: '2025-11-24T00:12:31.773Z'
1496
- }
1497
-
1498
- stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Tool protection enforcement flow > should intercept protected tool calls without delegation
1499
- [ToolProtectionService] Config loaded from API {
1500
- source: 'api',
1501
- toolCount: 1,
1502
- protectedTools: [ 'checkout' ],
1503
- agentDid: 'did:key:z6MkhaXgBZDv...',
1504
- projectId: 'test-project',
1505
- cacheTtlMs: 300000,
1506
- cacheExpiresAt: '2025-11-24T00:12:31.775Z'
1507
- }
1508
-
1509
- stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Tool protection enforcement flow > should intercept protected tool calls without delegation
1510
- stderr | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > AgentShield integration flow > should use fallback config when API fails
1511
- [ToolProtectionService] Protection check {
1512
- [ToolProtectionService] API fetch failed, using fallback config { agentDid: 'did:key:z6MkhaXgBZDv...', error: 'Network error' }
1513
-
1514
- tool: 'checkout',
1515
- agentDid: 'did:key:z6MkhaXgBZDv...',
1516
- found: true,
1517
- stderr | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Error handling in full flow > should handle tool protection service errors gracefully
1518
- isWildcard: false,
1519
- requiresDelegation: true,
1520
- [ToolProtectionService] API fetch failed, no fallback, failing closed (deny-all) {
1521
- agentDid: 'did:key:z6MkhaXgBZDv...',
1522
- availableTools: [ 'checkout' ]
1523
- }
1524
-
1525
- stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > AgentShield integration flow > should fetch tool protection config from AgentShield
1526
- error: 'Network error',
1527
- cacheKey: 'config:tool-protections:test-project'
1528
- }
1529
- [ToolProtectionService] Config loaded from API {
1530
-
1531
- source: 'api',
1532
- toolCount: 1,
1533
- protectedTools: [ 'protected_tool' ],
1534
- agentDid: 'did:key:z6MkhaXgBZDv...',
1535
- projectId: 'test-project',
1536
- cacheTtlMs: 300000,
1537
- cacheExpiresAt: '2025-11-24T00:12:31.775Z'
1538
- }
1539
-
1540
- stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > AgentShield integration flow > should cache tool protection config
1541
- [ToolProtectionService] Config loaded from API {
1542
- source: 'api',
1543
- toolCount: 1,
1544
- protectedTools: [ 'tool1' ],
1545
- agentDid: 'did:key:z6MkhaXgBZDv...',
1546
- projectId: 'test-project',
1547
- cacheTtlMs: 300000,
1548
- cacheExpiresAt: '2025-11-24T00:12:31.776Z'
1549
- }
1550
-
1551
- stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Cache integration in full flow > should share cache across multiple service instances
1552
- [ToolProtectionService] Config loaded from API {
1553
- stderr | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Error handling in full flow > should handle network timeouts
1554
- source: 'api',
1555
- toolCount: 1,
1556
- [ToolProtectionService] API fetch failed, using fallback config { agentDid: 'did:key:z6MkhaXgBZDv...', error: 'Network timeout' }
1557
-
1558
- protectedTools: [ 'tool1' ],
1559
- agentDid: 'did:key:z6MkhaXgBZDv...',
1560
- projectId: 'test-project',
1561
- cacheTtlMs: 300000,
1562
- cacheExpiresAt: '2025-11-24T00:12:31.779Z'
1563
- }
1564
-
1565
- ✓ src/__tests__/runtime/tool-protection-enforcement.test.ts (29 tests) 21ms
1566
- stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Cache integration in full flow > should clear cache when needed
1567
- [ToolProtectionService] Config loaded from API {
1568
- source: 'api',
1569
- toolCount: 1,
1570
- protectedTools: [ 'tool1' ],
1571
- agentDid: 'did:key:z6MkhaXgBZDv...',
1572
- projectId: 'test-project',
1573
- cacheTtlMs: 300000,
1574
- cacheExpiresAt: '2025-11-24T00:12:31.779Z'
1575
- }
1576
-
1577
- stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Cache integration in full flow > should clear cache when needed
1578
- [ToolProtectionService] Config loaded from API {
1579
- source: 'api',
1580
- toolCount: 1,
1581
- protectedTools: [ 'tool1' ],
1582
- agentDid: 'did:key:z6MkhaXgBZDv...',
1583
- projectId: 'test-project',
1584
- cacheTtlMs: 300000,
1585
- cacheExpiresAt: '2025-11-24T00:12:31.779Z'
1586
- }
1587
-
1588
- stderr | src/services/__tests__/access-control.integration.test.ts > AccessControlApiService Integration > Proof Submission Flow > should submit proof end-to-end
1589
- [AccessControl] 🔍 RAW API RESPONSE (before parsing): {
1590
- correlationId: 'b9f3bfd5-7493-4d84-9433-945207c1aecf',
1591
- status: 200,
1592
- statusText: '',
1593
- headers: { 'content-type': 'application/json' },
1594
- responseTextLength: 100,
1595
- responseTextPreview: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}',
1596
- fullResponseText: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}'
1597
- }
1598
- [AccessControl] 🔍 PARSED RESPONSE DATA: {
1599
- correlationId: 'b9f3bfd5-7493-4d84-9433-945207c1aecf',
1600
- status: 200,
1601
- responseDataType: 'object',
1602
- responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
1603
- responseData: '{\n' +
1604
- ' "success": true,\n' +
1605
- ' "accepted": 1,\n' +
1606
- ' "rejected": 0,\n' +
1607
- ' "outcomes": {\n' +
1608
- ' "success": 1,\n' +
1609
- ' "failed": 0,\n' +
1610
- ' "blocked": 0,\n' +
1611
- ' "error": 0\n' +
1612
- ' }\n' +
1613
- '}'
1614
- }
1615
- [AccessControl] Raw response received: {
1616
- "success": true,
1617
- "accepted": 1,
1618
- "rejected": 0,
1619
- "outcomes": {
1620
- "success": 1,
1621
- "failed": 0,
1622
- "blocked": 0,
1623
- "error": 0
1624
- }
1625
- }
1626
-
1627
- stderr | src/services/__tests__/access-control.integration.test.ts > AccessControlApiService Integration > Proof Submission Flow > should handle proof submission with errors
1628
- [AccessControl] 🔍 RAW API RESPONSE (before parsing): {
1629
- correlationId: '427b30ad-3c1c-4298-b6f8-ca91bc973942',
1630
- status: 200,
1631
- statusText: '',
1632
- headers: { 'content-type': 'application/json' },
1633
- responseTextLength: 200,
1634
- responseTextPreview: '{"success":true,"accepted":0,"rejected":1,"outcomes":{"success":0,"failed":1,"blocked":0,"error":0},"errors":[{"proof_index":0,"error":{"code":"invalid_signature","message":"Invalid JWS signature"}}]}',
1635
- fullResponseText: '{"success":true,"accepted":0,"rejected":1,"outcomes":{"success":0,"failed":1,"blocked":0,"error":0},"errors":[{"proof_index":0,"error":{"code":"invalid_signature","message":"Invalid JWS signature"}}]}'
1636
- }
1637
- [AccessControl] 🔍 PARSED RESPONSE DATA: {
1638
- correlationId: '427b30ad-3c1c-4298-b6f8-ca91bc973942',
1639
- status: 200,
1640
- responseDataType: 'object',
1641
- responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes', 'errors' ],
1642
- responseData: '{\n' +
1643
- ' "success": true,\n' +
1644
- ' "accepted": 0,\n' +
1645
- ' "rejected": 1,\n' +
1646
- ' "outcomes": {\n' +
1647
- ' "success": 0,\n' +
1648
- ' "failed": 1,\n' +
1649
- ' "blocked": 0,\n' +
1650
- ' "error": 0\n' +
1651
- ' },\n' +
1652
- ' "errors": [\n' +
1653
- ' {\n' +
1654
- ' "proof_index": 0,\n' +
1655
- ' "error": {\n' +
1656
- ' "code": "invalid_signature",\n' +
1657
- ' "message": "Invalid JWS signature"\n' +
1658
- ' }\n' +
1659
- ' }\n' +
1660
- ' ]\n' +
1661
- '}'
1662
- }
1663
- [AccessControl] Raw response received: {
1664
- "success": true,
1665
- "accepted": 0,
1666
- "rejected": 1,
1667
- "outcomes": {
1668
- "success": 0,
1669
- "failed": 1,
1670
- "blocked": 0,
1671
- "error": 0
1672
- },
1673
- "errors": [
1674
- {
1675
- "proof_index": 0,
1676
- "error": {
1677
- "code": "invalid_signature",
1678
- "message": "Invalid JWS signature"
1679
- }
1680
- }
1681
- ]
1682
- }
1683
-
1684
- stderr | src/services/__tests__/access-control.integration.test.ts > AccessControlApiService Integration > Proof Verification Flow > should verify proof using ProofVerifier
1685
- [CryptoService] Key ID mismatch
1686
-
1687
- stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Real-world e-commerce scenario > should handle complete e-commerce flow with tool protection
1688
- [ToolProtectionService] Config loaded from API {
1689
- source: 'api',
1690
- toolCount: 3,
1691
- protectedTools: [ 'add_to_cart', 'checkout' ],
1692
- agentDid: 'did:key:z6MkhaXgBZDv...',
1693
- projectId: 'test-project',
1694
- cacheTtlMs: 300000,
1695
- cacheExpiresAt: '2025-11-24T00:12:31.779Z'
1696
- }
1697
-
1698
- stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Real-world e-commerce scenario > should handle complete e-commerce flow with tool protection
1699
- [ToolProtectionService] Protection check {
1700
- tool: 'add_to_cart',
1701
- agentDid: 'did:key:z6MkhaXgBZDv...',
1702
- found: true,
1703
- isWildcard: false,
1704
- requiresDelegation: true,
1705
- availableTools: [ 'search_products', 'add_to_cart', 'checkout' ]
1706
- }
1707
-
1708
- stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Concurrent operations > should handle concurrent cache operations
1709
- [ToolProtectionService] Config loaded from API {
1710
- source: 'api',
1711
- toolCount: 1,
1712
- protectedTools: [ 'tool1' ],
1713
- agentDid: 'did:key:z6MkhaXgBZDv...',
1714
- projectId: 'test-project',
1715
- cacheTtlMs: 300000,
1716
- cacheExpiresAt: '2025-11-24T00:12:31.780Z'
1717
- }
1718
- [ToolProtectionService] Config loaded from API {
1719
- source: 'api',
1720
- toolCount: 1,
1721
- protectedTools: [ 'tool1' ],
1722
- agentDid: 'did:key:z6MkhaXgBZDv...',
1723
- projectId: 'test-project',
1724
- cacheTtlMs: 300000,
1725
- cacheExpiresAt: '2025-11-24T00:12:31.780Z'
1726
- }
1727
- [ToolProtectionService] Config loaded from API {
1728
- source: 'api',
1729
- toolCount: 1,
1730
- protectedTools: [ 'tool1' ],
1731
- agentDid: 'did:key:z6MkhaXgBZDv...',
1732
- projectId: 'test-project',
1733
- cacheTtlMs: 300000,
1734
- cacheExpiresAt: '2025-11-24T00:12:31.780Z'
1735
- }
1736
-
1737
- ✓ src/__tests__/integration/full-flow.test.ts (21 tests) 12ms
1738
- ✓ src/__tests__/runtime/base.test.ts (55 tests) 13ms
1739
- stderr | src/services/__tests__/proof-verifier.integration.test.ts > ProofVerifier Integration - Real DID Resolution > did:web Resolution (HTTP) > should handle HTTP errors gracefully
1740
- [ProofVerifier] Failed to fetch public key from DID: Error: Failed to resolve did:web:nonexistent-domain-that-does-not-exist-12345.com: fetch failed
1741
- at Object.resolveDID (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/proof-verifier.integration.test.ts:143:19)
1742
- at processTicksAndRejections (node:internal/process/task_queues:103:5)
1743
- at ProofVerifier.fetchPublicKeyFromDID (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/proof-verifier.ts:348:22)
1744
- at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/proof-verifier.integration.test.ts:252:7
1745
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:20
1746
-
1747
- stderr | src/services/__tests__/proof-verifier.integration.test.ts > ProofVerifier Integration - Real DID Resolution > did:web Resolution (HTTP) > should handle HTTP errors gracefully
1748
- [ProofVerifier] Failed to fetch public key from DID: Error: Failed to resolve did:web:nonexistent-domain-that-does-not-exist-12345.com: fetch failed
1749
- at Object.resolveDID (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/proof-verifier.integration.test.ts:143:19)
1750
- at processTicksAndRejections (node:internal/process/task_queues:103:5)
1751
- at ProofVerifier.fetchPublicKeyFromDID (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/proof-verifier.ts:348:22)
1752
- at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/proof-verifier.integration.test.ts:257:9
1753
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:20
1754
-
1755
- ✓ src/__tests__/runtime/base-extensions.test.ts (38 tests) 10ms
1756
- ✓ src/services/__tests__/proof-verifier.integration.test.ts (13 tests | 1 skipped) 53ms
1757
- ✓ src/__tests__/runtime/route-interception.test.ts (21 tests) 25ms
1758
- ✓ src/delegation/__tests__/vc-issuer.test.ts (21 tests) 94ms
1759
- ✓ src/__tests__/cache/tool-protection-cache.test.ts (49 tests) 166ms
1760
- ✓ src/services/__tests__/access-control.integration.test.ts (9 tests) 126ms
1761
- stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Caching Integration > should respect cache TTL
1762
- [ToolProtectionService] Config loaded from API {
1763
- source: 'api',
1764
- stderr | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Real-world Scenarios > should handle API rate limiting gracefully
1765
- toolCount: 0,
1766
- [ToolProtectionService] API fetch failed, using fallback config {
1767
- protectedTools: [],
1768
- agentDid: 'did:key:z6MkhaXgBZDv...',
1769
- projectId: 'test-project-123',
1770
- cacheTtlMs: 1000,
1771
- agentDid: 'did:key:z6MkhaXgBZDv...',
1772
- cacheExpiresAt: '2025-11-24T00:07:33.793Z'
1773
- error: 'Failed to fetch bouncer config: 429 Too Many Requests - Rate limit exceeded'
1774
- }
1775
-
1776
- }
1777
-
1778
- stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Real-world Scenarios > should handle typical e-commerce tool protection config
1779
- [ToolProtectionService] Config loaded from API {
1780
- source: 'api',
1781
- toolCount: 4,
1782
- protectedTools: [ 'add_to_cart', 'checkout' ],
1783
- agentDid: 'did:key:z6MkhaXgBZDv...',
1784
- projectId: 'test-project-123',
1785
- cacheTtlMs: 300000,
1786
- cacheExpiresAt: '2025-11-24T00:12:32.794Z'
1787
- }
1788
-
1789
- stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Real-world Scenarios > should handle concurrent requests
1790
- [ToolProtectionService] Config loaded from API {
1791
- source: 'api',
1792
- toolCount: 1,
1793
- protectedTools: [ 'tool1' ],
1794
- agentDid: 'did:key:z6MkhaXgBZDv...',
1795
- projectId: 'test-project-123',
1796
- cacheTtlMs: 300000,
1797
- cacheExpiresAt: '2025-11-24T00:12:32.795Z'
1798
- }
1799
- [ToolProtectionService] Config loaded from API {
1800
- source: 'api',
1801
- toolCount: 1,
1802
- protectedTools: [ 'tool1' ],
1803
- agentDid: 'did:key:z6MkhaXgBZDv...',
1804
- projectId: 'test-project-123',
1805
- cacheTtlMs: 300000,
1806
- cacheExpiresAt: '2025-11-24T00:12:32.795Z'
1807
- }
1808
- [ToolProtectionService] Config loaded from API {
1809
- source: 'api',
1810
- toolCount: 1,
1811
- protectedTools: [ 'tool1' ],
1812
- agentDid: 'did:key:z6MkhaXgBZDv...',
1813
- projectId: 'test-project-123',
1814
- cacheTtlMs: 300000,
1815
- cacheExpiresAt: '2025-11-24T00:12:32.795Z'
1816
- }
1817
-
1818
- ✓ src/__tests__/services/agentshield-integration.test.ts (30 tests) 1119ms
1819
- ✓ should respect cache TTL 1102ms
1820
- stderr | src/config/__tests__/remote-config.spec.ts > fetchRemoteConfig > Error handling > should return null if API request fails
1821
- [RemoteConfig] API returned 404: Not Found
1822
-
1823
- stderr | src/config/__tests__/remote-config.spec.ts > fetchRemoteConfig > Error handling > should return null if API throws error
1824
- [RemoteConfig] Failed to fetch config: Error: Network error
1825
- at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/config/__tests__/remote-config.spec.ts:170:35
1826
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
1827
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
1828
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
1829
- at new Promise (<anonymous>)
1830
- at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
1831
- at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
1832
- at processTicksAndRejections (node:internal/process/task_queues:103:5)
1833
- at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
1834
- at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
1835
-
1836
- stderr | src/config/__tests__/remote-config.spec.ts > fetchRemoteConfig > Error handling > should return null if neither projectId nor agentDid provided
1837
- [RemoteConfig] Neither projectId nor agentDid provided
1838
-
1839
- stderr | src/config/__tests__/remote-config.spec.ts > fetchRemoteConfig > Error handling > should handle cache read errors gracefully
1840
- [RemoteConfig] Cache read failed: Error: Cache error
1841
- at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/config/__tests__/remote-config.spec.ts:198:50
1842
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
1843
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
1844
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
1845
- at new Promise (<anonymous>)
1846
- at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
1847
- at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
1848
- at processTicksAndRejections (node:internal/process/task_queues:103:5)
1849
- at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
1850
- at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
1851
-
1852
- ✓ src/config/__tests__/remote-config.spec.ts (9 tests) 5ms
1853
- stderr | src/services/__tests__/storage.service.test.ts > StorageService > createStorageProviders > should prefer Redis over KV when both are configured
1854
- [StorageService] Failed to connect to Redis, falling back to memory: Redis package not available
1855
-
1856
- stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyEd25519 > should return false on verification error
1857
- [CryptoService] Ed25519 verification error: Error: Verification failed
1858
- at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:62:9
1859
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
1860
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
1861
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
1862
- at new Promise (<anonymous>)
1863
- at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
1864
- at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
1865
- at processTicksAndRejections (node:internal/process/task_queues:103:5)
1866
- at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
1867
- at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
1868
-
1869
- stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject invalid JWK format
1870
- [CryptoService] Invalid Ed25519 JWK format
1871
-
1872
- stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject JWK with wrong kty
1873
- [CryptoService] Invalid Ed25519 JWK format
1874
-
1875
- stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject JWK with wrong crv
1876
- [CryptoService] Invalid Ed25519 JWK format
1877
-
1878
- stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject JWK with missing x field
1879
- [CryptoService] Invalid Ed25519 JWK format
1880
-
1881
- stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject JWK with empty x field
1882
- [CryptoService] Invalid Ed25519 JWK format
1883
-
1884
- stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject malformed JWS
1885
- [CryptoService] Invalid JWS format: Error: Invalid header base64: Unexpected token 'ž', "ž‹" is not valid JSON
1886
- at CryptoService.parseJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:91:13)
1887
- at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
1888
- at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:230:42
1889
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
1890
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
1891
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
1892
- at new Promise (<anonymous>)
1893
- at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
1894
- at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
1895
- at processTicksAndRejections (node:internal/process/task_queues:103:5)
1896
-
1897
- stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject non-EdDSA algorithms
1898
- [CryptoService] Unsupported algorithm: RS256, expected EdDSA
1899
-
1900
- stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject HS256 algorithm
1901
- [CryptoService] Unsupported algorithm: HS256, expected EdDSA
1902
-
1903
- stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle empty JWS components
1904
- [CryptoService] Invalid JWS format: Error: Invalid header base64: Unexpected end of JSON input
1905
- at CryptoService.parseJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:91:13)
1906
- at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
1907
- at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:271:42
1908
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
1909
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
1910
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
1911
- at new Promise (<anonymous>)
1912
- at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
1913
- at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
1914
- at processTicksAndRejections (node:internal/process/task_queues:103:5)
1915
-
1916
- stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle malformed JWS - single part
1917
- [CryptoService] Invalid JWS format: Error: Invalid JWS format: expected header.payload.signature
1918
- at CryptoService.parseJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:78:13)
1919
- at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
1920
- at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:279:42
1921
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
1922
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
1923
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
1924
- at new Promise (<anonymous>)
1925
- at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
1926
- at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
1927
- at processTicksAndRejections (node:internal/process/task_queues:103:5)
1928
-
1929
- stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle malformed JWS - two parts
1930
- [CryptoService] Invalid JWS format: Error: Invalid JWS format: expected header.payload.signature
1931
- at CryptoService.parseJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:78:13)
1932
- at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
1933
- at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:287:42
1934
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
1935
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
1936
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
1937
- at new Promise (<anonymous>)
1938
- at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
1939
- at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
1940
- at processTicksAndRejections (node:internal/process/task_queues:103:5)
1941
-
1942
- stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle malformed JWS - four parts
1943
- [CryptoService] Invalid JWS format: Error: Invalid JWS format: expected header.payload.signature
1944
- at CryptoService.parseJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:78:13)
1945
- at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
1946
- at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:302:42
1947
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
1948
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
1949
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
1950
- at new Promise (<anonymous>)
1951
- at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
1952
- at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
1953
- at processTicksAndRejections (node:internal/process/task_queues:103:5)
1954
-
1955
- stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle malformed JWS - invalid JSON header
1956
- [CryptoService] Invalid JWS format: Error: Invalid header base64: Unexpected token 'o', "notjson" is not valid JSON
1957
- at CryptoService.parseJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:91:13)
1958
- at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
1959
- at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:316:42
1960
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
1961
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
1962
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
1963
- at new Promise (<anonymous>)
1964
- at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
1965
- at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
1966
- at processTicksAndRejections (node:internal/process/task_queues:103:5)
1967
-
1968
- stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle malformed JWS - invalid base64
1969
- [CryptoService] Invalid JWS format: Error: Invalid payload base64: Invalid base64url string: Invalid character
1970
- at CryptoService.parseJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:107:15)
1971
- at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
1972
- at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:334:42
1973
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
1974
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
1975
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
1976
- at new Promise (<anonymous>)
1977
- at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
1978
- at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
1979
- at processTicksAndRejections (node:internal/process/task_queues:103:5)
1980
-
1981
- stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should validate expectedKid option
1982
- [CryptoService] Key ID mismatch
1983
-
1984
- stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should validate alg option
1985
- [CryptoService] Unsupported algorithm: EdDSA, expected RS256
1986
-
1987
- stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should validate Ed25519 key length
1988
- [CryptoService] Failed to extract public key: Error: Invalid Ed25519 public key length: 5
1989
- at CryptoService.jwkToBase64PublicKey (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:295:13)
1990
- at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:249:32)
1991
- at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:398:42
1992
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
1993
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
1994
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
1995
- at new Promise (<anonymous>)
1996
- at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
1997
- at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
1998
- at processTicksAndRejections (node:internal/process/task_queues:103:5)
1999
-
2000
- stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle signature verification error
2001
- [CryptoService] Ed25519 verification error: Error: Crypto error
2002
- at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:449:61
2003
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
2004
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
2005
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
2006
- at new Promise (<anonymous>)
2007
- at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
2008
- at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
2009
- at processTicksAndRejections (node:internal/process/task_queues:103:5)
2010
- at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
2011
- at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
2012
-
2013
- ✓ src/services/__tests__/crypto.service.test.ts (34 tests) 17ms
2014
- stderr | src/services/__tests__/storage.service.test.ts > StorageService > createStorageProviders > should prefer Redis over KV when both are configured
2015
- [StorageService] Failed to initialize KV, falling back to memory: Failed to import Cloudflare storage providers: Cannot find package '@kya-os/mcp-i-cloudflare/providers/storage' imported from '/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/storage.service.ts'
2016
-
2017
- stderr | src/services/__tests__/storage.service.test.ts > StorageService > createStorageProviders > should fall back to memory when Redis connection fails
2018
- [StorageService] Failed to connect to Redis, falling back to memory: Redis package not available
2019
-
2020
- stderr | src/services/__tests__/storage.service.test.ts > StorageService > createStorageProviders > should use KV namespace when provided
2021
- [StorageService] Failed to initialize KV, falling back to memory: Failed to import Cloudflare storage providers: Cannot find package '@kya-os/mcp-i-cloudflare/providers/storage' imported from '/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/storage.service.ts'
2022
-
2023
- stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > New endpoint format (toolProtections object) > should parse oauthProvider from camelCase field
2024
- [ToolProtectionService] Config loaded from API {
2025
- source: 'api',
2026
- toolCount: 2,
2027
- protectedTools: [ 'read_repos', 'send_email' ],
2028
- agentDid: 'did:key:z6MkhaXgBZDv...',
2029
- projectId: 'test-project-123',
2030
- cacheTtlMs: 300000,
2031
- cacheExpiresAt: '2025-11-24T00:12:33.003Z'
2032
- }
2033
-
2034
- stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > New endpoint format (toolProtections object) > should parse oauthProvider from snake_case field
2035
- [ToolProtectionService] Config loaded from API {
2036
- source: 'api',
2037
- toolCount: 1,
2038
- protectedTools: [ 'read_repos' ],
2039
- agentDid: 'did:key:z6MkhaXgBZDv...',
2040
- projectId: 'test-project-123',
2041
- cacheTtlMs: 300000,
2042
- cacheExpiresAt: '2025-11-24T00:12:33.009Z'
2043
- }
2044
-
2045
- stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > New endpoint format (toolProtections object) > should prefer camelCase over snake_case when both present
2046
- [ToolProtectionService] Config loaded from API {
2047
- source: 'api',
2048
- toolCount: 1,
2049
- protectedTools: [ 'read_repos' ],
2050
- agentDid: 'did:key:z6MkhaXgBZDv...',
2051
- projectId: 'test-project-123',
2052
- cacheTtlMs: 300000,
2053
- cacheExpiresAt: '2025-11-24T00:12:33.010Z'
2054
- }
2055
-
2056
- stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > New endpoint format (toolProtections object) > should handle missing oauthProvider field (backward compatible)
2057
- [ToolProtectionService] Config loaded from API {
2058
- source: 'api',
2059
- toolCount: 1,
2060
- protectedTools: [ 'read_repos' ],
2061
- agentDid: 'did:key:z6MkhaXgBZDv...',
2062
- projectId: 'test-project-123',
2063
- cacheTtlMs: 300000,
2064
- cacheExpiresAt: '2025-11-24T00:12:33.010Z'
2065
- }
2066
-
2067
- stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > Old endpoint format (tools array) > should parse oauthProvider from array format with camelCase
2068
- [ToolProtectionService] Config loaded from API {
2069
- source: 'api',
2070
- toolCount: 2,
2071
- protectedTools: [ 'read_repos', 'send_email' ],
2072
- agentDid: 'did:key:z6MkhaXgBZDv...',
2073
- projectId: 'none',
2074
- cacheTtlMs: 300000,
2075
- cacheExpiresAt: '2025-11-24T00:12:33.011Z'
2076
- }
2077
-
2078
- stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > Old endpoint format (tools array) > should parse oauthProvider from array format with snake_case
2079
- [ToolProtectionService] Config loaded from API {
2080
- source: 'api',
2081
- toolCount: 1,
2082
- protectedTools: [ 'read_repos' ],
2083
- agentDid: 'did:key:z6MkhaXgBZDv...',
2084
- projectId: 'none',
2085
- cacheTtlMs: 300000,
2086
- cacheExpiresAt: '2025-11-24T00:12:33.011Z'
2087
- }
2088
-
2089
- stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > Old endpoint format (tools array) > should prefer camelCase over snake_case in array format
2090
- [ToolProtectionService] Config loaded from API {
2091
- source: 'api',
2092
- toolCount: 1,
2093
- protectedTools: [ 'read_repos' ],
2094
- agentDid: 'did:key:z6MkhaXgBZDv...',
2095
- projectId: 'none',
2096
- cacheTtlMs: 300000,
2097
- cacheExpiresAt: '2025-11-24T00:12:33.011Z'
2098
- }
2099
-
2100
- stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > Old endpoint format (tools object) > should parse oauthProvider from object format with camelCase
2101
- [ToolProtectionService] Config loaded from API {
2102
- source: 'api',
2103
- toolCount: 2,
2104
- protectedTools: [ 'read_repos', 'send_email' ],
2105
- agentDid: 'did:key:z6MkhaXgBZDv...',
2106
- projectId: 'none',
2107
- cacheTtlMs: 300000,
2108
- cacheExpiresAt: '2025-11-24T00:12:33.011Z'
2109
- }
2110
-
2111
- stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > Old endpoint format (tools object) > should parse oauthProvider from object format with snake_case
2112
- [ToolProtectionService] Config loaded from API {
2113
- source: 'api',
2114
- toolCount: 1,
2115
- protectedTools: [ 'read_repos' ],
2116
- agentDid: 'did:key:z6MkhaXgBZDv...',
2117
- projectId: 'none',
2118
- cacheTtlMs: 300000,
2119
- cacheExpiresAt: '2025-11-24T00:12:33.011Z'
2120
- }
2121
-
2122
- stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > Old endpoint format (tools object) > should prefer camelCase over snake_case in object format
2123
- [ToolProtectionService] Config loaded from API {
2124
- source: 'api',
2125
- toolCount: 1,
2126
- protectedTools: [ 'read_repos' ],
2127
- agentDid: 'did:key:z6MkhaXgBZDv...',
2128
- projectId: 'none',
2129
- cacheTtlMs: 300000,
2130
- cacheExpiresAt: '2025-11-24T00:12:33.012Z'
2131
- }
2132
-
2133
- stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > Caching > should cache oauthProvider field correctly
2134
- [ToolProtectionService] Config loaded from API {
2135
- source: 'api',
2136
- toolCount: 1,
2137
- protectedTools: [ 'read_repos' ],
2138
- agentDid: 'did:key:z6MkhaXgBZDv...',
2139
- projectId: 'test-project-123',
2140
- cacheTtlMs: 300000,
2141
- cacheExpiresAt: '2025-11-24T00:12:33.012Z'
2142
- }
2143
-
2144
- stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > oauthProvider field inclusion > should include oauthProvider in returned ToolProtection objects when present
2145
- [ToolProtectionService] Config loaded from API {
2146
- source: 'api',
2147
- toolCount: 2,
2148
- protectedTools: [ 'tool_with_provider', 'tool_without_provider' ],
2149
- agentDid: 'did:key:z6MkhaXgBZDv...',
2150
- projectId: 'test-project-123',
2151
- cacheTtlMs: 300000,
2152
- cacheExpiresAt: '2025-11-24T00:12:33.013Z'
2153
- }
2154
-
2155
- stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > oauthProvider field inclusion > should handle empty string oauthProvider gracefully
2156
- [ToolProtectionService] Config loaded from API {
2157
- source: 'api',
2158
- toolCount: 1,
2159
- protectedTools: [ 'tool_with_empty_provider' ],
2160
- agentDid: 'did:key:z6MkhaXgBZDv...',
2161
- projectId: 'test-project-123',
2162
- cacheTtlMs: 300000,
2163
- cacheExpiresAt: '2025-11-24T00:12:33.013Z'
2164
- }
2165
-
2166
- ✓ src/__tests__/services/tool-protection-oauth-provider.test.ts (14 tests) 11ms
2167
- ✓ src/__tests__/runtime/delegation-flow.test.ts (4 tests) 4ms
2168
- ✓ src/delegation/__tests__/delegation-graph.test.ts (28 tests) 35ms
2169
- ✓ src/compliance/__tests__/schema-verifier.test.ts (30 tests) 43ms
2170
- ✓ src/services/__tests__/storage.service.test.ts (17 tests) 81ms
2171
- stderr | src/__tests__/identity/user-did-manager.test.ts > UserDidManager > error handling > should handle storage.get errors gracefully
2172
- [UserDidManager] Storage.get failed, generating new DID: Error: Storage error
2173
- at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/__tests__/identity/user-did-manager.test.ts:187:67
2174
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
2175
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
2176
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
2177
- at new Promise (<anonymous>)
2178
- at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
2179
- at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
2180
- at processTicksAndRejections (node:internal/process/task_queues:103:5)
2181
- at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
2182
- at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
2183
-
2184
- stderr | src/__tests__/identity/user-did-manager.test.ts > UserDidManager > error handling > should handle storage.set errors gracefully
2185
- [UserDidManager] Storage.set failed, continuing with cached DID: Error: Storage error
2186
- at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/__tests__/identity/user-did-manager.test.ts:196:67
2187
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
2188
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
2189
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
2190
- at new Promise (<anonymous>)
2191
- at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
2192
- at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
2193
- at processTicksAndRejections (node:internal/process/task_queues:103:5)
2194
- at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
2195
- at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
2196
-
2197
- stderr | src/__tests__/identity/user-did-manager.test.ts > UserDidManager > error handling > should handle storage.delete errors gracefully
2198
- [UserDidManager] Storage.delete failed, continuing: Error: Storage error
2199
- at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/__tests__/identity/user-did-manager.test.ts:206:70
2200
- at processTicksAndRejections (node:internal/process/task_queues:103:5)
2201
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:20
2202
-
2203
- ✓ src/__tests__/identity/user-did-manager.test.ts (17 tests) 6ms
2204
- ✓ src/__tests__/providers/memory.test.ts (34 tests) 42ms
2205
- stdout | src/__tests__/integration.test.ts > Integration Tests > Full handshake and tool execution flow > should complete full authentication and tool execution cycle
2206
- [AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zgawzmezJZQ6wgeXt7HYTSNpnhRFYVBOF","environment":"development","userDidGeneration":"disabled"},"timestamp":1763942853304,"timestampFormatted":"2025-11-24T00:07:33.304Z"}
2207
-
2208
- stdout | src/__tests__/integration.test.ts > Integration Tests > Full handshake and tool execution flow > should complete full authentication and tool execution cycle
2209
- [AUDIT] {"event":"tool_executed","data":{"tool":"greetingTool","sessionId":"fc3e2ac26e26d1afcf44f37e8734cc77","timestamp":1763942853304},"timestamp":1763942853304,"timestampFormatted":"2025-11-24T00:07:33.304Z"}
2210
-
2211
- stdout | src/__tests__/integration.test.ts > Integration Tests > Session expiry handling > should handle expired sessions correctly
2212
- [AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:ze9fflR5vjBAYUnZX928lRvPuRcxjSk-z","environment":"development","userDidGeneration":"disabled"},"timestamp":1763942853307,"timestampFormatted":"2025-11-24T00:07:33.307Z"}
2213
-
2214
- stdout | src/__tests__/integration.test.ts > Integration Tests > Key rotation flow > should handle key rotation and maintain functionality
2215
- [AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:z3ZDZtNttwmtt7ELJWFCeIzqlL8nzjMcH","environment":"development","userDidGeneration":"disabled"},"timestamp":1763942853307,"timestampFormatted":"2025-11-24T00:07:33.307Z"}
2216
-
2217
- stdout | src/__tests__/integration.test.ts > Integration Tests > Key rotation flow > should handle key rotation and maintain functionality
2218
- [AUDIT] {"event":"keys_rotated","data":{"oldDid":"did:key:z3ZDZtNttwmtt7ELJWFCeIzqlL8nzjMcH","newDid":"did:key:z4J4RwFFWLeP9-gRswfbNpWtnaEVMBQwt","timestamp":1763942853307},"timestamp":1763942853307,"timestampFormatted":"2025-11-24T00:07:33.307Z"}
2219
-
2220
- stdout | src/__tests__/integration.test.ts > Integration Tests > Well-known endpoints > should provide identity discovery endpoints
2221
- [AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:z7vYoHwFRIEPr3gdS3vF692iZw-bYe9fH","environment":"development","userDidGeneration":"disabled"},"timestamp":1763942853308,"timestampFormatted":"2025-11-24T00:07:33.308Z"}
2222
-
2223
- stdout | src/__tests__/integration.test.ts > Integration Tests > Nonce replay protection > should prevent nonce reuse
2224
- [AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zO7YtLrN6P77XvtYcNzcZ1tbn2VrCV7Xo","environment":"development","userDidGeneration":"disabled"},"timestamp":1763942853308,"timestampFormatted":"2025-11-24T00:07:33.308Z"}
2225
-
2226
- stdout | src/__tests__/integration.test.ts > Integration Tests > Error handling > should handle network errors gracefully
2227
- [AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zH8ooTd1wnDFYDUQAbOaeDNDv7VzURDE7","environment":"development","userDidGeneration":"disabled"},"timestamp":1763942853308,"timestampFormatted":"2025-11-24T00:07:33.308Z"}
2228
-
2229
- stdout | src/__tests__/integration.test.ts > Integration Tests > Error handling > should handle malformed DID documents
2230
- [AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zb5ziS5X4pWwyrngBvH0HMSjeDlBIMCzK","environment":"development","userDidGeneration":"disabled"},"timestamp":1763942853308,"timestampFormatted":"2025-11-24T00:07:33.308Z"}
2231
-
2232
- stdout | src/__tests__/integration.test.ts > Integration Tests > Debug endpoint > should provide debug information in development
2233
- [AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:z_K5ogsrvWrR3jcXVCAqoUe8Mg7YJabC8","environment":"development","userDidGeneration":"disabled"},"timestamp":1763942853309,"timestampFormatted":"2025-11-24T00:07:33.309Z"}
2234
-
2235
- stdout | src/__tests__/integration.test.ts > Integration Tests > Debug endpoint > should be disabled in production
2236
- [AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zzYWh9Bo-lzescoRstmmSjQCiMfkE4hlh","environment":"development","userDidGeneration":"disabled"},"timestamp":1763942853309,"timestampFormatted":"2025-11-24T00:07:33.309Z"}
2237
-
2238
- ✓ src/__tests__/integration.test.ts (9 tests) 6ms
2239
- stderr | src/services/__tests__/proof-verifier.test.ts > ProofVerifier Security > Signature Verification > should handle signature verification errors gracefully
2240
- [CryptoService] Ed25519 verification error: Error: Crypto error
2241
- at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/proof-verifier.test.ts:328:9
2242
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
2243
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
2244
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
2245
- at new Promise (<anonymous>)
2246
- at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
2247
- at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
2248
- at processTicksAndRejections (node:internal/process/task_queues:103:5)
2249
- at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
2250
- at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
2251
-
2252
- ✓ src/services/__tests__/proof-verifier.test.ts (21 tests) 13ms
2253
- ✓ src/__tests__/providers/base.test.ts (14 tests) 4ms
2254
- stdout | src/__tests__/regression/phase2-regression.test.ts > Phase 2 Regression Tests > Backward Compatibility > Phase 1 tools (no oauthProvider) > should work with Phase 1 tools that don't specify oauthProvider
2255
- [ToolProtectionService] Config loaded from API {
2256
- source: 'api',
2257
- toolCount: 1,
2258
- protectedTools: [ 'phase1_tool' ],
2259
- agentDid: 'did:key:z6MkhaXgBZDv...',
2260
- projectId: 'none',
2261
- cacheTtlMs: 300000,
2262
- cacheExpiresAt: '2025-11-24T00:12:33.429Z'
2263
- }
2264
-
2265
- stderr | src/__tests__/regression/phase2-regression.test.ts > Phase 2 Regression Tests > No Regressions > Phase 1 OAuth flow > should still work with Phase 1 OAuth flow (no oauthProvider)
2266
- stdout | src/__tests__/regression/phase2-regression.test.ts > Phase 2 Regression Tests > Backward Compatibility > Old API endpoint format > should still support old endpoint format (tools array)
2267
- [ProviderResolver] Tool does not specify oauthProvider. Using first configured provider "github" as fallback. This is deprecated - configure oauthProvider in AgentShield dashboard for Phase 2+.
2268
- [ToolProtectionService] Config loaded from API {
2269
- source: 'api',
2270
- toolCount: 1,
2271
- protectedTools: [ 'old_tool' ],
2272
- agentDid: 'did:key:z6MkhaXgBZDv...',
2273
- projectId: 'none',
2274
- cacheTtlMs: 300000,
2275
- cacheExpiresAt: '2025-11-24T00:12:33.433Z'
2276
- }
2277
-
2278
- stdout | src/__tests__/regression/phase2-regression.test.ts > Phase 2 Regression Tests > Backward Compatibility > Old API endpoint format > should still support old endpoint format (tools object)
2279
- [ToolProtectionService] Config loaded from API {
2280
-
2281
- source: 'api',
2282
- toolCount: 1,
2283
- protectedTools: [ 'old_tool' ],
2284
- agentDid: 'did:key:z6MkhaXgBZDv...',
2285
- projectId: 'none',
2286
- cacheTtlMs: 300000,
2287
- cacheExpiresAt: '2025-11-24T00:12:33.433Z'
2288
- }
2289
-
2290
- stdout | src/__tests__/regression/phase2-regression.test.ts > Phase 2 Regression Tests > Backward Compatibility > snake_case field names > should still support snake_case field names
2291
- [ToolProtectionService] Config loaded from API {
2292
- source: 'api',
2293
- toolCount: 1,
2294
- protectedTools: [ 'tool_with_snake_case' ],
2295
- agentDid: 'did:key:z6MkhaXgBZDv...',
2296
- projectId: 'test-project-123',
2297
- cacheTtlMs: 300000,
2298
- cacheExpiresAt: '2025-11-24T00:12:33.433Z'
2299
- }
2300
-
2301
- stdout | src/__tests__/regression/phase2-regression.test.ts > Phase 2 Regression Tests > Mixed Phase 1 and Phase 2 tools > should handle mix of Phase 1 and Phase 2 tools in same project
2302
- [ToolProtectionService] Config loaded from API {
2303
- source: 'api',
2304
- toolCount: 2,
2305
- protectedTools: [ 'phase1_tool', 'phase2_tool' ],
2306
- agentDid: 'did:key:z6MkhaXgBZDv...',
2307
- projectId: 'test-project-123',
2308
- cacheTtlMs: 300000,
2309
- cacheExpiresAt: '2025-11-24T00:12:33.434Z'
2310
- }
2311
-
2312
- ✓ src/__tests__/regression/phase2-regression.test.ts (12 tests) 6ms
2313
- stdout | src/services/__tests__/provider-resolver.test.ts > ProviderResolver > resolveProvider - Priority 2: Scope inference > should infer provider from github scope prefix
2314
- [ProviderResolver] Inferred provider "github" from scopes
2315
-
2316
- stdout | src/services/__tests__/provider-resolver.test.ts > ProviderResolver > resolveProvider - Priority 2: Scope inference > should infer provider from gmail scope prefix (maps to google)
2317
- stderr | src/services/__tests__/provider-resolver.test.ts > ProviderResolver > resolveProvider - Priority 2: Scope inference > should return null for ambiguous scopes
2318
- [ProviderResolver] Tool does not specify oauthProvider. Using first configured provider "github" as fallback. This is deprecated - configure oauthProvider in AgentShield dashboard for Phase 2+.
2319
-
2320
- stderr | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Scope inference edge cases (Priority 2) > should handle empty scopes array
2321
- [ProviderResolver] Inferred provider "google" from scopes
2322
- [ProviderResolver] Tool does not specify oauthProvider. Using first configured provider "github" as fallback. This is deprecated - configure oauthProvider in AgentShield dashboard for Phase 2+.
2323
-
2324
- ✓ src/delegation/__tests__/cascading-revocation.test.ts (23 tests) 8ms
2325
- stdout | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Scope inference edge cases (Priority 2) > should verify gmail → google mapping works
2326
- [ProviderResolver] Inferred provider "google" from scopes
2327
-
2328
- stderr | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Scope inference edge cases (Priority 2) > should handle ambiguous scopes (multiple providers inferred)
2329
- [ProviderResolver] Tool does not specify oauthProvider. Using first configured provider "github" as fallback. This is deprecated - configure oauthProvider in AgentShield dashboard for Phase 2+.
2330
-
2331
-
2332
- stderr | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Scope inference edge cases (Priority 2) > should handle unknown scope prefixes
2333
- stdout | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Scope inference edge cases (Priority 2) > should verify calendar → google mapping works
2334
- [ProviderResolver] Inferred provider "google" from scopes
2335
-
2336
- stdout | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Scope inference edge cases (Priority 2) > should verify outlook → microsoft mapping works
2337
- [ProviderResolver] Inferred provider "microsoft" from scopes
2338
- [ProviderResolver] Tool does not specify oauthProvider. Using first configured provider "github" as fallback. This is deprecated - configure oauthProvider in AgentShield dashboard for Phase 2+.
2339
-
2340
- stderr | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Scope inference edge cases (Priority 2) > should handle scopes without colons
2341
-
2342
- [ProviderResolver] Tool does not specify oauthProvider. Using first configured provider "github" as fallback. This is deprecated - configure oauthProvider in AgentShield dashboard for Phase 2+.
2343
-
2344
- stderr | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Scope inference edge cases (Priority 2) > should handle inferred provider not in registry
2345
- [ProviderResolver] Tool does not specify oauthProvider. Using first configured provider "google" as fallback. This is deprecated - configure oauthProvider in AgentShield dashboard for Phase 2+.
2346
-
2347
- stderr | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Fallback behavior (Priority 3) > should use first configured provider when oauthProvider not specified
2348
- [ProviderResolver] Tool does not specify oauthProvider. Using first configured provider "github" as fallback. This is deprecated - configure oauthProvider in AgentShield dashboard for Phase 2+.
2349
-
2350
- stdout | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Provider name case sensitivity > should handle provider names case-insensitively in inference
2351
- [ProviderResolver] Inferred provider "github" from scopes
2352
-
2353
- stdout | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Multiple scopes with same provider > should handle multiple scopes from same provider
2354
- [ProviderResolver] Inferred provider "github" from scopes
2355
-
2356
- ✓ src/__tests__/services/provider-resolver-edge-cases.test.ts (19 tests | 1 skipped) 9ms
2357
- ✓ src/delegation/storage/__tests__/memory-statuslist-storage.test.ts (14 tests) 2ms
2358
- ✓ src/delegation/__tests__/bitstring.test.ts (30 tests) 4ms
2359
- ✓ src/delegation/storage/__tests__/memory-graph-storage.test.ts (27 tests) 4ms
2360
- ✓ src/services/__tests__/provider-resolver.test.ts (8 tests) 5ms
2361
- ✓ src/__tests__/runtime/proof-client-did.test.ts (17 tests) 8ms
2362
- ✓ src/services/__tests__/batch-delegation.service.test.ts (11 tests) 4ms
2363
- stderr | src/services/__tests__/provider-resolution.integration.test.ts > Provider Resolution Integration > Backward compatibility > should work with Phase 1 tools (no oauthProvider field)
2364
- [ProviderResolver] Tool does not specify oauthProvider. Using first configured provider "github" as fallback. This is deprecated - configure oauthProvider in AgentShield dashboard for Phase 2+.
2365
-
2366
- ✓ src/services/__tests__/provider-resolution.integration.test.ts (6 tests) 3ms
2367
- ✓ src/services/__tests__/oauth-provider-registry.test.ts (9 tests) 5ms
2368
- ✓ src/__tests__/runtime/audit-logger.test.ts (9 tests) 3ms
2369
- ✓ src/__tests__/config/provider-runtime-config.test.ts (9 tests) 2ms
2370
- ✓ src/delegation/__tests__/utils.test.ts (28 tests) 110ms
2371
- ✓ src/utils/__tests__/did-helpers.test.ts (11 tests) 4ms
2372
- ✓ src/delegation/__tests__/audience-validator.test.ts (5 tests) 11ms
2373
- ↓ src/__tests__/delegation-e2e.test.ts (14 tests | 14 skipped)
2374
- ✓ src/__tests__/index.test.ts (4 tests) 2ms
2375
-
2376
- Test Files 42 passed | 1 skipped (43)
2377
- Tests 864 passed | 16 skipped (880)
2378
- Start at 18:07:30
2379
- Duration 3.88s (transform 7.04s, setup 0ms, collect 13.19s, tests 2.23s, environment 13ms, prepare 1.77s)
2380
-