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