@kya-os/mcp-i-core 1.2.2-canary.27 → 1.2.2-canary.29

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