@kya-os/mcp-i-core 1.3.7-canary.clientinfo.20251126041014 → 1.3.8-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-test$colon$coverage.log +2913 -2246
- package/.turbo/turbo-test.log +1207 -2842
- package/coverage/coverage-final.json +57 -56
- package/dist/__tests__/utils/mock-providers.d.ts +2 -1
- package/dist/__tests__/utils/mock-providers.d.ts.map +1 -1
- package/dist/__tests__/utils/mock-providers.js.map +1 -1
- package/dist/config/remote-config.d.ts +51 -0
- package/dist/config/remote-config.d.ts.map +1 -1
- package/dist/config/remote-config.js +74 -0
- package/dist/config/remote-config.js.map +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +4 -1
- package/dist/config.js.map +1 -1
- package/dist/services/session-registration.service.d.ts.map +1 -1
- package/dist/services/session-registration.service.js +10 -66
- package/dist/services/session-registration.service.js.map +1 -1
- package/dist/services/tool-protection.service.d.ts +4 -1
- package/dist/services/tool-protection.service.d.ts.map +1 -1
- package/dist/services/tool-protection.service.js +31 -16
- package/dist/services/tool-protection.service.js.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/integration/full-flow.test.ts +23 -10
- package/src/__tests__/services/agentshield-integration.test.ts +10 -3
- package/src/__tests__/services/tool-protection-merged-config.test.ts +485 -0
- package/src/__tests__/services/tool-protection.service.test.ts +18 -11
- package/src/config/__tests__/merged-config.spec.ts +445 -0
- package/src/config/remote-config.ts +90 -0
- package/src/config.ts +3 -0
- package/src/services/session-registration.service.ts +26 -92
- package/src/services/tool-protection.service.ts +76 -48
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,2973 +1,1338 @@
|
|
|
1
1
|
|
|
2
|
-
> @kya-os/mcp-i-core@1.
|
|
2
|
+
> @kya-os/mcp-i-core@1.2.2-canary.8 test /Users/brian/Documents/@kya-os/modelcontextprotocol-identity/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]
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
package.json:12:6:
|
|
8
|
+
12 │ "types": "./dist/index.d.ts"
|
|
9
|
+
╵ ~~~~~~~
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
[ToolProtectionService] Config loaded from API {
|
|
10
|
-
source: 'api',
|
|
11
|
-
toolCount: 0,
|
|
12
|
-
protectedTools: [],
|
|
13
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
14
|
-
projectId: 'test-project-123',
|
|
15
|
-
cacheTtlMs: 300000,
|
|
16
|
-
cacheExpiresAt: '2025-11-25T17:44:45.668Z'
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > API Authentication > should use Authorization Bearer header for old endpoint
|
|
20
|
-
[ToolProtectionService] Config loaded from API {
|
|
21
|
-
source: 'api',
|
|
22
|
-
toolCount: 0,
|
|
23
|
-
protectedTools: [],
|
|
24
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
25
|
-
projectId: 'none',
|
|
26
|
-
cacheTtlMs: 300000,
|
|
27
|
-
cacheExpiresAt: '2025-11-25T17:44:45.671Z'
|
|
28
|
-
}
|
|
11
|
+
The "import" condition comes earlier and will be used for all "import" statements:
|
|
29
12
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
toolCount: 0,
|
|
34
|
-
protectedTools: [],
|
|
35
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
36
|
-
projectId: 'test-project-123',
|
|
37
|
-
cacheTtlMs: 300000,
|
|
38
|
-
cacheExpiresAt: '2025-11-25T17:44:45.673Z'
|
|
39
|
-
}
|
|
13
|
+
package.json:11:6:
|
|
14
|
+
11 │ "import": "./dist/index.js",
|
|
15
|
+
╵ ~~~~~~~~
|
|
40
16
|
|
|
41
|
-
|
|
42
|
-
[ToolProtectionService] Config loaded from API {
|
|
43
|
-
source: 'api',
|
|
44
|
-
toolCount: 0,
|
|
45
|
-
protectedTools: [],
|
|
46
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
47
|
-
projectId: 'none',
|
|
48
|
-
cacheTtlMs: 300000,
|
|
49
|
-
cacheExpiresAt: '2025-11-25T17:44:45.674Z'
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
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
|
|
53
|
-
[ToolProtectionService] Config loaded from API {
|
|
54
|
-
source: 'api',
|
|
55
|
-
toolCount: 2,
|
|
56
|
-
protectedTools: [ 'checkout' ],
|
|
57
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
58
|
-
projectId: 'test-project-123',
|
|
59
|
-
cacheTtlMs: 300000,
|
|
60
|
-
cacheExpiresAt: '2025-11-25T17:44:45.673Z'
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Endpoint Selection > should encode projectId in URL
|
|
64
|
-
[ToolProtectionService] Config loaded from API {
|
|
65
|
-
source: 'api',
|
|
66
|
-
toolCount: 0,
|
|
67
|
-
protectedTools: [],
|
|
68
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
69
|
-
projectId: 'project/with/special-chars',
|
|
70
|
-
cacheTtlMs: 300000,
|
|
71
|
-
cacheExpiresAt: '2025-11-25T17:44:45.674Z'
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Endpoint Selection > should encode agent DID in URL
|
|
75
|
-
[ToolProtectionService] Config loaded from API {
|
|
76
|
-
source: 'api',
|
|
77
|
-
toolCount: 0,
|
|
78
|
-
protectedTools: [],
|
|
79
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
80
|
-
projectId: 'none',
|
|
81
|
-
cacheTtlMs: 300000,
|
|
82
|
-
cacheExpiresAt: '2025-11-25T17:44:45.674Z'
|
|
83
|
-
}
|
|
17
|
+
The "require" condition comes earlier and will be used for all "require" calls:
|
|
84
18
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
toolCount: 2,
|
|
89
|
-
protectedTools: [ 'checkout' ],
|
|
90
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
91
|
-
projectId: 'test-project-123',
|
|
92
|
-
cacheTtlMs: 300000,
|
|
93
|
-
cacheExpiresAt: '2025-11-25T17:44:45.675Z'
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Response Format Compatibility > should handle old endpoint format (tools array)
|
|
97
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyEd25519 > should return false on verification error
|
|
98
|
-
[CryptoService] Ed25519 verification error: Error: Verification failed
|
|
99
|
-
[ToolProtectionService] Config loaded from API {
|
|
100
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:62:9
|
|
101
|
-
source: 'api',
|
|
102
|
-
toolCount: 2,
|
|
103
|
-
protectedTools: [ 'checkout' ],
|
|
104
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
105
|
-
projectId: 'none',
|
|
106
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
|
|
107
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
|
|
108
|
-
cacheTtlMs: 300000,
|
|
109
|
-
cacheExpiresAt: '2025-11-25T17:44:45.675Z'
|
|
110
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Response Format Compatibility > should handle old endpoint format (tools object)
|
|
114
|
-
at new Promise (<anonymous>)
|
|
115
|
-
at runWithTimeout (file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
|
|
116
|
-
at runTest (file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
|
|
117
|
-
[ToolProtectionService] Config loaded from API {
|
|
118
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
119
|
-
source: 'api',
|
|
120
|
-
toolCount: 2,
|
|
121
|
-
protectedTools: [ 'checkout' ],
|
|
122
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
123
|
-
at runSuite (file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
|
|
124
|
-
at runSuite (file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
|
|
125
|
-
projectId: 'none',
|
|
126
|
-
|
|
127
|
-
cacheTtlMs: 300000,
|
|
128
|
-
stderr | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Error Handling > should handle network timeout
|
|
129
|
-
[ToolProtectionService] API fetch failed, using fallback config { agentDid: 'did:key:z6MkhaXgBZDv...', error: 'Network timeout' }
|
|
130
|
-
cacheExpiresAt: '2025-11-25T17:44:45.676Z'
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Response Format Compatibility > should handle snake_case field names
|
|
134
|
-
[ToolProtectionService] Config loaded from API {
|
|
135
|
-
source: 'api',
|
|
19
|
+
package.json:10:6:
|
|
20
|
+
10 │ "require": "./dist/index.js",
|
|
21
|
+
╵ ~~~~~~~~~
|
|
136
22
|
|
|
137
|
-
|
|
138
|
-
protectedTools: [ 'tool1' ],
|
|
139
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
140
|
-
projectId: 'test-project-123',
|
|
141
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject invalid JWK format
|
|
142
|
-
[CryptoService] Invalid Ed25519 JWK format
|
|
143
|
-
cacheTtlMs: 300000,
|
|
23
|
+
▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json]
|
|
144
24
|
|
|
145
|
-
|
|
146
|
-
|
|
25
|
+
package.json:17:6:
|
|
26
|
+
17 │ "types": "./dist/config.d.ts"
|
|
27
|
+
╵ ~~~~~~~
|
|
147
28
|
|
|
148
|
-
|
|
149
|
-
[ToolProtectionService] Config loaded from API {
|
|
150
|
-
source: 'api',
|
|
151
|
-
toolCount: 1,
|
|
152
|
-
protectedTools: [ 'tool1' ],
|
|
153
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
154
|
-
projectId: 'test-project-123',
|
|
155
|
-
cacheTtlMs: 300000,
|
|
156
|
-
cacheExpiresAt: '2025-11-25T17:44:45.676Z'
|
|
157
|
-
}
|
|
29
|
+
The "import" condition comes earlier and will be used for all "import" statements:
|
|
158
30
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
toolCount: 1,
|
|
163
|
-
protectedTools: [ 'tool1' ],
|
|
164
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
165
|
-
projectId: 'test-project-123',
|
|
166
|
-
cacheTtlMs: 300000,
|
|
167
|
-
cacheExpiresAt: '2025-11-25T17:44:45.677Z'
|
|
168
|
-
}
|
|
31
|
+
package.json:16:6:
|
|
32
|
+
16 │ "import": "./dist/config.js",
|
|
33
|
+
╵ ~~~~~~~~
|
|
169
34
|
|
|
170
|
-
|
|
171
|
-
[ToolProtectionService] Config loaded from API {
|
|
172
|
-
source: 'api',
|
|
173
|
-
toolCount: 2,
|
|
174
|
-
protectedTools: [ 'protected_tool' ],
|
|
175
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
176
|
-
projectId: 'test-project-123',
|
|
177
|
-
cacheTtlMs: 300000,
|
|
178
|
-
cacheExpiresAt: '2025-11-25T17:44:45.678Z'
|
|
179
|
-
}
|
|
35
|
+
The "require" condition comes earlier and will be used for all "require" calls:
|
|
180
36
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
toolCount: 2,
|
|
185
|
-
protectedTools: [ 'read_repos', 'send_email' ],
|
|
186
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
187
|
-
projectId: 'test-project-123',
|
|
188
|
-
cacheTtlMs: 300000,
|
|
189
|
-
cacheExpiresAt: '2025-11-25T17:44:45.678Z'
|
|
190
|
-
}
|
|
37
|
+
package.json:15:6:
|
|
38
|
+
15 │ "require": "./dist/config.js",
|
|
39
|
+
╵ ~~~~~~~~~
|
|
191
40
|
|
|
192
|
-
|
|
193
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - new endpoint format > should preserve oauthProvider through cache operations
|
|
194
|
-
[ToolProtectionService] Config loaded from API {
|
|
195
|
-
source: 'api',
|
|
196
|
-
toolCount: 1,
|
|
197
|
-
protectedTools: [ 'read_repos' ],
|
|
198
|
-
[CryptoService] Invalid Ed25519 JWK format
|
|
41
|
+
▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json]
|
|
199
42
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
cacheTtlMs: 300000,
|
|
204
|
-
[CryptoService] Invalid Ed25519 JWK format
|
|
205
|
-
cacheExpiresAt: '2025-11-25T17:44:45.678Z'
|
|
206
|
-
}
|
|
43
|
+
package.json:22:6:
|
|
44
|
+
22 │ "types": "./dist/config/remote-config.d.ts"
|
|
45
|
+
╵ ~~~~~~~
|
|
207
46
|
|
|
47
|
+
The "import" condition comes earlier and will be used for all "import" statements:
|
|
208
48
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
source: 'api',
|
|
213
|
-
toolCount: 1,
|
|
214
|
-
protectedTools: [ 'tool1' ],
|
|
215
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
216
|
-
projectId: 'test-project-123',
|
|
217
|
-
cacheTtlMs: 300000,
|
|
218
|
-
[CryptoService] Invalid Ed25519 JWK format
|
|
49
|
+
package.json:21:6:
|
|
50
|
+
21 │ "import": "./dist/config/remote-config.js",
|
|
51
|
+
╵ ~~~~~~~~
|
|
219
52
|
|
|
220
|
-
|
|
221
|
-
}
|
|
53
|
+
The "require" condition comes earlier and will be used for all "require" calls:
|
|
222
54
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
55
|
+
package.json:20:6:
|
|
56
|
+
20 │ "require": "./dist/config/remote-config.js",
|
|
57
|
+
╵ ~~~~~~~~~
|
|
226
58
|
|
|
227
|
-
stderr | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Fallback Behavior > should cache fallback config
|
|
228
|
-
[ToolProtectionService] API fetch failed, using fallback config { agentDid: 'did:key:z6MkhaXgBZDv...', error: 'Network error' }
|
|
229
|
-
[ToolProtectionService] Config loaded from API {
|
|
230
59
|
|
|
231
|
-
|
|
232
|
-
toolCount: 0,
|
|
233
|
-
protectedTools: [],
|
|
234
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
235
|
-
projectId: 'test-project-123',
|
|
236
|
-
cacheTtlMs: 1000,
|
|
237
|
-
cacheExpiresAt: '2025-11-25T17:39:46.679Z'
|
|
238
|
-
}
|
|
60
|
+
[1m[46m RUN [49m[22m [36mv4.0.5 [39m[90m/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core[39m
|
|
239
61
|
|
|
240
|
-
|
|
241
|
-
[
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
projectId: 'none',
|
|
247
|
-
cacheTtlMs: 300000,
|
|
248
|
-
cacheExpiresAt: '2025-11-25T17:44:45.679Z'
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should handle old endpoint format with tools array
|
|
252
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject malformed JWS
|
|
253
|
-
[CryptoService] Invalid JWS format: Error: Invalid header base64: Unexpected token '', "" is not valid JSON
|
|
254
|
-
at CryptoService.parseJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:91:13)
|
|
255
|
-
[ToolProtectionService] Config loaded from API {
|
|
256
|
-
source: 'api',
|
|
257
|
-
at CryptoService.verifyJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
|
|
258
|
-
toolCount: 2,
|
|
259
|
-
protectedTools: [ 'tool1' ],
|
|
260
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:230:42
|
|
261
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
262
|
-
projectId: 'none',
|
|
263
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
|
|
264
|
-
cacheTtlMs: 300000,
|
|
265
|
-
cacheExpiresAt: '2025-11-25T17:44:45.679Z'
|
|
266
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
|
|
62
|
+
[90mstderr[2m | src/services/__tests__/crypto.service.test.ts[2m > [22m[2mCryptoService[2m > [22m[2mverifyEd25519[2m > [22m[2mshould return false on verification error
|
|
63
|
+
[22m[39m[CryptoService] Ed25519 verification error: Error: Verification failed
|
|
64
|
+
at [90m/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/__tests__/crypto.service.test.ts:62:9
|
|
65
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:157:11
|
|
66
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:753:26
|
|
67
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1636:20
|
|
270
68
|
at new Promise (<anonymous>)
|
|
271
|
-
at runWithTimeout (file:///Users/brian/Documents
|
|
272
|
-
at runTest (file:///Users/brian/Documents
|
|
273
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
[
|
|
281
|
-
[
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
[
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
[
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
at
|
|
300
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:271:42
|
|
301
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
|
|
302
|
-
protectedTools: [ 'tool1' ],
|
|
303
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
|
|
304
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
305
|
-
projectId: 'none',
|
|
306
|
-
cacheTtlMs: 300000,
|
|
307
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
|
|
308
|
-
cacheExpiresAt: '2025-11-25T17:44:45.679Z'
|
|
309
|
-
}
|
|
310
|
-
|
|
69
|
+
at runWithTimeout (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1602:10)
|
|
70
|
+
at runTest (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1309:12)
|
|
71
|
+
[90m at processTicksAndRejections (node:internal/process/task_queues:105:5)[39m
|
|
72
|
+
at runSuite (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1468:8)
|
|
73
|
+
at runSuite (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1468:8)
|
|
74
|
+
|
|
75
|
+
[90mstderr[2m | src/services/__tests__/crypto.service.test.ts[2m > [22m[2mCryptoService[2m > [22m[2mverifyJWS[2m > [22m[2mshould reject invalid JWK format
|
|
76
|
+
[22m[39m[CryptoService] Invalid Ed25519 JWK format
|
|
77
|
+
|
|
78
|
+
[90mstderr[2m | src/services/__tests__/crypto.service.test.ts[2m > [22m[2mCryptoService[2m > [22m[2mverifyJWS[2m > [22m[2mshould reject JWK with wrong kty
|
|
79
|
+
[22m[39m[CryptoService] Invalid Ed25519 JWK format
|
|
80
|
+
|
|
81
|
+
[90mstderr[2m | src/services/__tests__/crypto.service.test.ts[2m > [22m[2mCryptoService[2m > [22m[2mverifyJWS[2m > [22m[2mshould reject JWK with wrong crv
|
|
82
|
+
[22m[39m[CryptoService] Invalid Ed25519 JWK format
|
|
83
|
+
|
|
84
|
+
[90mstderr[2m | src/services/__tests__/crypto.service.test.ts[2m > [22m[2mCryptoService[2m > [22m[2mverifyJWS[2m > [22m[2mshould reject JWK with missing x field
|
|
85
|
+
[22m[39m[CryptoService] Invalid Ed25519 JWK format
|
|
86
|
+
|
|
87
|
+
[90mstderr[2m | src/services/__tests__/crypto.service.test.ts[2m > [22m[2mCryptoService[2m > [22m[2mverifyJWS[2m > [22m[2mshould reject JWK with empty x field
|
|
88
|
+
[22m[39m[CryptoService] Invalid Ed25519 JWK format
|
|
89
|
+
|
|
90
|
+
[90mstderr[2m | src/services/__tests__/crypto.service.test.ts[2m > [22m[2mCryptoService[2m > [22m[2mverifyJWS[2m > [22m[2mshould reject malformed JWS
|
|
91
|
+
[22m[39m[CryptoService] Invalid JWS format: Error: Invalid header base64: Unexpected token '', "" is not valid JSON
|
|
92
|
+
at CryptoService.parseJWS [90m(/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/crypto.service.ts:91:13[90m)[39m
|
|
93
|
+
at CryptoService.verifyJWS [90m(/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/crypto.service.ts:169:23[90m)[39m
|
|
94
|
+
at [90m/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/__tests__/crypto.service.test.ts:230:42
|
|
95
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:157:11
|
|
96
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:753:26
|
|
97
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1636:20
|
|
311
98
|
at new Promise (<anonymous>)
|
|
312
|
-
|
|
313
|
-
at
|
|
314
|
-
[
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
[
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
at
|
|
329
|
-
at
|
|
330
|
-
|
|
331
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:279:42
|
|
332
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
|
|
333
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should skip tools without name in array format
|
|
334
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
|
|
335
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
|
|
336
|
-
[ToolProtectionService] Cache miss, fetching from API {
|
|
99
|
+
at runWithTimeout (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1602:10)
|
|
100
|
+
at runTest (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1309:12)
|
|
101
|
+
[90m at processTicksAndRejections (node:internal/process/task_queues:105:5)[39m
|
|
102
|
+
|
|
103
|
+
[90mstderr[2m | src/services/__tests__/crypto.service.test.ts[2m > [22m[2mCryptoService[2m > [22m[2mverifyJWS[2m > [22m[2mshould reject non-EdDSA algorithms
|
|
104
|
+
[22m[39m[CryptoService] Unsupported algorithm: RS256, expected EdDSA
|
|
105
|
+
|
|
106
|
+
[90mstderr[2m | src/services/__tests__/crypto.service.test.ts[2m > [22m[2mCryptoService[2m > [22m[2mverifyJWS[2m > [22m[2mshould reject HS256 algorithm
|
|
107
|
+
[22m[39m[CryptoService] Unsupported algorithm: HS256, expected EdDSA
|
|
108
|
+
|
|
109
|
+
[90mstderr[2m | src/services/__tests__/crypto.service.test.ts[2m > [22m[2mCryptoService[2m > [22m[2mverifyJWS[2m > [22m[2mshould handle empty JWS components
|
|
110
|
+
[22m[39m[CryptoService] Invalid JWS format: Error: Invalid header base64: Unexpected end of JSON input
|
|
111
|
+
at CryptoService.parseJWS [90m(/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/crypto.service.ts:91:13[90m)[39m
|
|
112
|
+
at CryptoService.verifyJWS [90m(/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/crypto.service.ts:169:23[90m)[39m
|
|
113
|
+
at [90m/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/__tests__/crypto.service.test.ts:271:42
|
|
114
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:157:11
|
|
115
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:753:26
|
|
116
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1636:20
|
|
337
117
|
at new Promise (<anonymous>)
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
at
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
at
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
[ToolProtectionService] Fetching from API: https://kya.vouched.id/api/v1/bouncer/config?agent_did=did%3Akey%3Az6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK {
|
|
351
|
-
method: 'config?agent_did (old)',
|
|
352
|
-
[CryptoService] Invalid JWS format: Error: Invalid JWS format: expected header.payload.signature
|
|
353
|
-
projectId: 'none',
|
|
354
|
-
apiKeyPresent: true,
|
|
355
|
-
at CryptoService.parseJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:78:13)
|
|
356
|
-
apiKeyLength: 18,
|
|
357
|
-
apiKeyMasked: 'test-api...'
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
at CryptoService.verifyJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
|
|
361
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:287:42
|
|
362
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
|
|
363
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
|
|
364
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should skip tools without name in array format
|
|
365
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
|
|
366
|
-
[ToolProtectionService] API response received {
|
|
118
|
+
at runWithTimeout (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1602:10)
|
|
119
|
+
at runTest (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1309:12)
|
|
120
|
+
[90m at processTicksAndRejections (node:internal/process/task_queues:105:5)[39m
|
|
121
|
+
|
|
122
|
+
[90mstderr[2m | src/services/__tests__/crypto.service.test.ts[2m > [22m[2mCryptoService[2m > [22m[2mverifyJWS[2m > [22m[2mshould handle malformed JWS - single part
|
|
123
|
+
[22m[39m[CryptoService] Invalid JWS format: Error: Invalid JWS format: expected header.payload.signature
|
|
124
|
+
at CryptoService.parseJWS [90m(/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/crypto.service.ts:78:13[90m)[39m
|
|
125
|
+
at CryptoService.verifyJWS [90m(/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/crypto.service.ts:169:23[90m)[39m
|
|
126
|
+
at [90m/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/__tests__/crypto.service.test.ts:279:42
|
|
127
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:157:11
|
|
128
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:753:26
|
|
129
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1636:20
|
|
367
130
|
at new Promise (<anonymous>)
|
|
368
|
-
at runWithTimeout (file:///Users/brian/Documents
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
at
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
],
|
|
381
|
-
responseMetadata: {}
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should skip tools without name in array format
|
|
386
|
-
[ToolProtectionService] Config loaded from API {
|
|
387
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle malformed JWS - four parts
|
|
388
|
-
source: 'api',
|
|
389
|
-
toolCount: 1,
|
|
390
|
-
[CryptoService] Invalid JWS format: Error: Invalid JWS format: expected header.payload.signature
|
|
391
|
-
protectedTools: [ 'valid_tool' ],
|
|
392
|
-
at CryptoService.parseJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:78:13)
|
|
393
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
394
|
-
projectId: 'none',
|
|
395
|
-
at CryptoService.verifyJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
|
|
396
|
-
cacheTtlMs: 300000,
|
|
397
|
-
cacheExpiresAt: '2025-11-25T17:44:45.681Z'
|
|
398
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:302:42
|
|
399
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
|
|
400
|
-
}
|
|
401
|
-
[ToolProtectionService] API fetch successful, config cached {
|
|
402
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
|
|
403
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
|
|
404
|
-
source: 'cache-write',
|
|
405
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
131
|
+
at runWithTimeout (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1602:10)
|
|
132
|
+
at runTest (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1309:12)
|
|
133
|
+
[90m at processTicksAndRejections (node:internal/process/task_queues:105:5)[39m
|
|
134
|
+
|
|
135
|
+
[90mstderr[2m | src/services/__tests__/crypto.service.test.ts[2m > [22m[2mCryptoService[2m > [22m[2mverifyJWS[2m > [22m[2mshould handle malformed JWS - two parts
|
|
136
|
+
[22m[39m[CryptoService] Invalid JWS format: Error: Invalid JWS format: expected header.payload.signature
|
|
137
|
+
at CryptoService.parseJWS [90m(/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/crypto.service.ts:78:13[90m)[39m
|
|
138
|
+
at CryptoService.verifyJWS [90m(/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/crypto.service.ts:169:23[90m)[39m
|
|
139
|
+
at [90m/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/__tests__/crypto.service.test.ts:287:42
|
|
140
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:157:11
|
|
141
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:753:26
|
|
142
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1636:20
|
|
406
143
|
at new Promise (<anonymous>)
|
|
407
|
-
at runWithTimeout (file:///Users/brian/Documents
|
|
408
|
-
at runTest (file:///Users/brian/Documents
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
at
|
|
419
|
-
|
|
420
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle malformed JWS - invalid JSON header
|
|
421
|
-
[CryptoService] Invalid JWS format: Error: Invalid header base64: Unexpected token 'o', "notjson" is not valid JSON
|
|
422
|
-
at CryptoService.parseJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:91:13)
|
|
423
|
-
at CryptoService.verifyJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
|
|
424
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:316:42
|
|
425
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
|
|
426
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
|
|
427
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
|
|
144
|
+
at runWithTimeout (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1602:10)
|
|
145
|
+
at runTest (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1309:12)
|
|
146
|
+
[90m at processTicksAndRejections (node:internal/process/task_queues:105:5)[39m
|
|
147
|
+
|
|
148
|
+
[90mstderr[2m | src/services/__tests__/crypto.service.test.ts[2m > [22m[2mCryptoService[2m > [22m[2mverifyJWS[2m > [22m[2mshould handle malformed JWS - four parts
|
|
149
|
+
[22m[39m[CryptoService] Invalid JWS format: Error: Invalid JWS format: expected header.payload.signature
|
|
150
|
+
at CryptoService.parseJWS [90m(/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/crypto.service.ts:78:13[90m)[39m
|
|
151
|
+
at CryptoService.verifyJWS [90m(/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/crypto.service.ts:169:23[90m)[39m
|
|
152
|
+
at [90m/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/__tests__/crypto.service.test.ts:302:42
|
|
153
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:157:11
|
|
154
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:753:26
|
|
155
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1636:20
|
|
428
156
|
at new Promise (<anonymous>)
|
|
429
|
-
at runWithTimeout (file:///Users/brian/Documents
|
|
430
|
-
at runTest (file:///Users/brian/Documents
|
|
431
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
[CryptoService] Invalid JWS format: Error: Invalid
|
|
435
|
-
at CryptoService.parseJWS (/Users/brian/Documents
|
|
436
|
-
at CryptoService.verifyJWS (/Users/brian/Documents
|
|
437
|
-
at /Users/brian/Documents
|
|
438
|
-
at file:///Users/brian/Documents
|
|
439
|
-
at file:///Users/brian/Documents
|
|
440
|
-
at file:///Users/brian/Documents
|
|
157
|
+
at runWithTimeout (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1602:10)
|
|
158
|
+
at runTest (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1309:12)
|
|
159
|
+
[90m at processTicksAndRejections (node:internal/process/task_queues:105:5)[39m
|
|
160
|
+
|
|
161
|
+
[90mstderr[2m | src/services/__tests__/crypto.service.test.ts[2m > [22m[2mCryptoService[2m > [22m[2mverifyJWS[2m > [22m[2mshould handle malformed JWS - invalid JSON header
|
|
162
|
+
[22m[39m[CryptoService] Invalid JWS format: Error: Invalid header base64: Unexpected token 'o', "notjson" is not valid JSON
|
|
163
|
+
at CryptoService.parseJWS [90m(/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/crypto.service.ts:91:13[90m)[39m
|
|
164
|
+
at CryptoService.verifyJWS [90m(/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/crypto.service.ts:169:23[90m)[39m
|
|
165
|
+
at [90m/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/__tests__/crypto.service.test.ts:316:42
|
|
166
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:157:11
|
|
167
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:753:26
|
|
168
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1636:20
|
|
441
169
|
at new Promise (<anonymous>)
|
|
442
|
-
at runWithTimeout (file:///Users/brian/Documents
|
|
443
|
-
at runTest (file:///Users/brian/Documents
|
|
444
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
[CryptoService]
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
[
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
[
|
|
454
|
-
at CryptoService.jwkToBase64PublicKey (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:295:13)
|
|
455
|
-
at CryptoService.verifyJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:249:32)
|
|
456
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:398:42
|
|
457
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
|
|
458
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
|
|
459
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
|
|
170
|
+
at runWithTimeout (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1602:10)
|
|
171
|
+
at runTest (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1309:12)
|
|
172
|
+
[90m at processTicksAndRejections (node:internal/process/task_queues:105:5)[39m
|
|
173
|
+
|
|
174
|
+
[90mstderr[2m | src/services/__tests__/crypto.service.test.ts[2m > [22m[2mCryptoService[2m > [22m[2mverifyJWS[2m > [22m[2mshould handle malformed JWS - invalid base64
|
|
175
|
+
[22m[39m[CryptoService] Invalid JWS format: Error: Invalid payload base64: Invalid base64url string: Invalid character
|
|
176
|
+
at CryptoService.parseJWS [90m(/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/crypto.service.ts:107:15[90m)[39m
|
|
177
|
+
at CryptoService.verifyJWS [90m(/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/crypto.service.ts:169:23[90m)[39m
|
|
178
|
+
at [90m/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/__tests__/crypto.service.test.ts:334:42
|
|
179
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:157:11
|
|
180
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:753:26
|
|
181
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1636:20
|
|
460
182
|
at new Promise (<anonymous>)
|
|
461
|
-
at runWithTimeout (file:///Users/brian/Documents
|
|
462
|
-
at runTest (file:///Users/brian/Documents
|
|
463
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
[CryptoService]
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
183
|
+
at runWithTimeout (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1602:10)
|
|
184
|
+
at runTest (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1309:12)
|
|
185
|
+
[90m at processTicksAndRejections (node:internal/process/task_queues:105:5)[39m
|
|
186
|
+
|
|
187
|
+
[90mstderr[2m | src/services/__tests__/crypto.service.test.ts[2m > [22m[2mCryptoService[2m > [22m[2mverifyJWS[2m > [22m[2mshould validate expectedKid option
|
|
188
|
+
[22m[39m[CryptoService] Key ID mismatch
|
|
189
|
+
|
|
190
|
+
[90mstderr[2m | src/services/__tests__/crypto.service.test.ts[2m > [22m[2mCryptoService[2m > [22m[2mverifyJWS[2m > [22m[2mshould validate alg option
|
|
191
|
+
[22m[39m[CryptoService] Unsupported algorithm: EdDSA, expected RS256
|
|
192
|
+
|
|
193
|
+
[90mstderr[2m | src/services/__tests__/crypto.service.test.ts[2m > [22m[2mCryptoService[2m > [22m[2mverifyJWS[2m > [22m[2mshould validate Ed25519 key length
|
|
194
|
+
[22m[39m[CryptoService] Failed to extract public key: Error: Invalid Ed25519 public key length: 5
|
|
195
|
+
at CryptoService.jwkToBase64PublicKey [90m(/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/crypto.service.ts:295:13[90m)[39m
|
|
196
|
+
at CryptoService.verifyJWS [90m(/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/crypto.service.ts:249:32[90m)[39m
|
|
197
|
+
at [90m/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/__tests__/crypto.service.test.ts:398:42
|
|
198
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:157:11
|
|
199
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:753:26
|
|
200
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1636:20
|
|
471
201
|
at new Promise (<anonymous>)
|
|
472
|
-
at runWithTimeout (file:///Users/brian/Documents
|
|
473
|
-
at runTest (file:///Users/brian/Documents
|
|
474
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
202
|
+
at runWithTimeout (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1602:10)
|
|
203
|
+
at runTest (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1309:12)
|
|
204
|
+
[90m at processTicksAndRejections (node:internal/process/task_queues:105:5)[39m
|
|
205
|
+
|
|
206
|
+
[90mstderr[2m | src/services/__tests__/crypto.service.test.ts[2m > [22m[2mCryptoService[2m > [22m[2mverifyJWS[2m > [22m[2mshould handle signature verification error
|
|
207
|
+
[22m[39m[CryptoService] Ed25519 verification error: Error: Crypto error
|
|
208
|
+
at [90m/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/__tests__/crypto.service.test.ts:449:61
|
|
209
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:157:11
|
|
210
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:753:26
|
|
211
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1636:20
|
|
212
|
+
at new Promise (<anonymous>)
|
|
213
|
+
at runWithTimeout (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1602:10)
|
|
214
|
+
at runTest (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1309:12)
|
|
215
|
+
[90m at processTicksAndRejections (node:internal/process/task_queues:105:5)[39m
|
|
216
|
+
at runSuite (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1468:8)
|
|
217
|
+
at runSuite (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1468:8)
|
|
218
|
+
|
|
219
|
+
[32m✓[39m src/services/__tests__/crypto.service.test.ts [2m([22m[2m34 tests[22m[2m)[22m[32m 17[2mms[22m[39m
|
|
220
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mgetToolProtectionConfig[2m > [22m[2mAPI fetch - new endpoint format[2m > [22m[2mshould fetch from project-scoped endpoint when projectId is available
|
|
221
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
222
|
+
[90mstderr[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mgetToolProtectionConfig[2m > [22m[2mAPI fetch error handling[2m > [22m[2mshould handle network errors gracefully
|
|
223
|
+
source: [32m'api'[39m,
|
|
224
|
+
toolCount: [33m2[39m,
|
|
225
|
+
protectedTools: [ [32m'checkout'[39m ],
|
|
226
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
227
|
+
projectId: [32m'test-project-123'[39m,
|
|
228
|
+
cacheTtlMs: [33m300000[39m,
|
|
229
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.926Z'[39m
|
|
230
|
+
[22m[39m[ToolProtectionService] API fetch failed, no fallback, failing closed (deny-all) {
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mgetToolProtectionConfig[2m > [22m[2mAPI fetch - new endpoint format[2m > [22m[2mshould handle new endpoint format with toolProtections object
|
|
234
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
235
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
236
|
+
error: [32m'ECONNREFUSED'[39m,
|
|
237
|
+
source: [32m'api'[39m,
|
|
238
|
+
cacheKey: [32m'agent:did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK'[39m
|
|
239
|
+
toolCount: [33m2[39m,
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
protectedTools: [ [32m'protected_tool'[39m ],
|
|
243
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
244
|
+
projectId: [32m'test-project-123'[39m,
|
|
245
|
+
cacheTtlMs: [33m300000[39m,
|
|
246
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.927Z'[39m
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mgetToolProtectionConfig[2m > [22m[2mAPI fetch - old endpoint format[2m > [22m[2mshould fetch from agent-scoped endpoint when projectId is not available
|
|
250
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
251
|
+
source: [32m'api'[39m,
|
|
252
|
+
toolCount: [33m2[39m,
|
|
253
|
+
protectedTools: [ [32m'checkout'[39m ],
|
|
254
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
255
|
+
projectId: [32m'none'[39m,
|
|
256
|
+
cacheTtlMs: [33m300000[39m,
|
|
257
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.928Z'[39m
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mgetToolProtectionConfig[2m > [22m[2mAPI fetch - old endpoint format[2m > [22m[2mshould handle old endpoint format with tools array
|
|
261
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
262
|
+
source: [32m'api'[39m,
|
|
263
|
+
toolCount: [33m2[39m,
|
|
264
|
+
protectedTools: [ [32m'tool1'[39m ],
|
|
265
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
266
|
+
projectId: [32m'none'[39m,
|
|
267
|
+
cacheTtlMs: [33m300000[39m,
|
|
268
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.928Z'[39m
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mgetToolProtectionConfig[2m > [22m[2mAPI fetch - old endpoint format[2m > [22m[2mshould handle old endpoint format with tools object
|
|
272
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
273
|
+
source: [32m'api'[39m,
|
|
274
|
+
toolCount: [33m2[39m,
|
|
275
|
+
protectedTools: [ [32m'tool1'[39m ],
|
|
276
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
277
|
+
projectId: [32m'none'[39m,
|
|
278
|
+
cacheTtlMs: [33m300000[39m,
|
|
279
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.929Z'[39m
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mgetToolProtectionConfig[2m > [22m[2mAPI fetch - old endpoint format[2m > [22m[2mshould skip tools without name in array format
|
|
283
|
+
[22m[39m[ToolProtectionService] Cache miss, fetching from API {
|
|
284
|
+
source: [32m'api-fetch-start'[39m,
|
|
285
|
+
cacheKey: [32m'agent:did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK'[39m,
|
|
286
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
287
|
+
projectId: [32m'none'[39m,
|
|
288
|
+
apiUrl: [32m'https://kya.vouched.id'[39m,
|
|
289
|
+
endpoint: [32m'/api/v1/bouncer/config?agent_did=did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK'[39m
|
|
483
290
|
}
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
[
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
291
|
+
[ToolProtectionService] Fetching from API: https://kya.vouched.id/api/v1/bouncer/config?agent_did=did%3Akey%3Az6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK {
|
|
292
|
+
method: [32m'config?agent_did (old)'[39m,
|
|
293
|
+
projectId: [32m'none'[39m,
|
|
294
|
+
apiKeyPresent: [33mtrue[39m,
|
|
295
|
+
apiKeyLength: [33m18[39m,
|
|
296
|
+
apiKeyMasked: [32m'test-api...'[39m
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mgetToolProtectionConfig[2m > [22m[2mAPI fetch - old endpoint format[2m > [22m[2mshould skip tools without name in array format
|
|
300
|
+
[22m[39m[ToolProtectionService] API response received {
|
|
301
|
+
source: [32m'api-fetch-complete'[39m,
|
|
302
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
303
|
+
projectId: [32m'none'[39m,
|
|
304
|
+
responseKeys: [ [32m'success'[39m, [32m'data'[39m, [32m'metadata'[39m ],
|
|
305
|
+
dataKeys: [ [32m'tools'[39m ],
|
|
306
|
+
rawToolProtections: [1mnull[22m,
|
|
307
|
+
rawTools: [
|
|
308
|
+
{ name: [32m'valid_tool'[39m, requiresDelegation: [33mtrue[39m },
|
|
309
|
+
{ requiresDelegation: [33mfalse[39m }
|
|
310
|
+
],
|
|
311
|
+
responseMetadata: {}
|
|
494
312
|
}
|
|
495
313
|
|
|
496
|
-
|
|
497
|
-
[ToolProtectionService] Config loaded from API {
|
|
498
|
-
source: 'api',
|
|
499
|
-
toolCount:
|
|
500
|
-
protectedTools: [],
|
|
501
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
502
|
-
projectId: 'none',
|
|
503
|
-
cacheTtlMs:
|
|
504
|
-
cacheExpiresAt: '2025-11-
|
|
314
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mgetToolProtectionConfig[2m > [22m[2mAPI fetch - old endpoint format[2m > [22m[2mshould skip tools without name in array format
|
|
315
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
316
|
+
source: [32m'api'[39m,
|
|
317
|
+
toolCount: [33m1[39m,
|
|
318
|
+
protectedTools: [ [32m'valid_tool'[39m ],
|
|
319
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
320
|
+
projectId: [32m'none'[39m,
|
|
321
|
+
cacheTtlMs: [33m300000[39m,
|
|
322
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.929Z'[39m
|
|
505
323
|
}
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
[
|
|
509
|
-
|
|
510
|
-
toolCount:
|
|
324
|
+
[ToolProtectionService] API fetch successful, config cached {
|
|
325
|
+
source: [32m'cache-write'[39m,
|
|
326
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
327
|
+
cacheKey: [32m'agent:did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK'[39m,
|
|
328
|
+
toolCount: [33m1[39m,
|
|
329
|
+
tools: [ { name: [32m'valid_tool'[39m, requiresDelegation: [33mtrue[39m, scopeCount: [33m0[39m } ],
|
|
330
|
+
ttlMs: [33m300000[39m,
|
|
331
|
+
ttlMinutes: [33m5[39m,
|
|
332
|
+
expiresAt: [32m'2025-11-19T17:16:22.929Z'[39m,
|
|
333
|
+
expiresIn: [32m'300s'[39m
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mgetToolProtectionConfig[2m > [22m[2mcaching behavior[2m > [22m[2mshould cache successful API responses
|
|
337
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
338
|
+
source: [32m'api'[39m,
|
|
339
|
+
toolCount: [33m1[39m,
|
|
340
|
+
protectedTools: [ [32m'tool1'[39m ],
|
|
341
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
342
|
+
projectId: [32m'none'[39m,
|
|
343
|
+
cacheTtlMs: [33m300000[39m,
|
|
344
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.933Z'[39m
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mgetToolProtectionConfig[2m > [22m[2mcaching behavior[2m > [22m[2mshould use default cache TTL when not specified
|
|
348
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
349
|
+
source: [32m'api'[39m,
|
|
350
|
+
toolCount: [33m0[39m,
|
|
511
351
|
protectedTools: [],
|
|
512
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
513
|
-
projectId: 'none',
|
|
514
|
-
cacheTtlMs:
|
|
515
|
-
cacheExpiresAt: '2025-11-
|
|
352
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
353
|
+
projectId: [32m'none'[39m,
|
|
354
|
+
cacheTtlMs: [33m300000[39m,
|
|
355
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.933Z'[39m
|
|
516
356
|
}
|
|
517
357
|
|
|
518
|
-
|
|
519
|
-
[ToolProtectionService] Config loaded from API {
|
|
520
|
-
source: 'api',
|
|
521
|
-
toolCount:
|
|
358
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mgetToolProtectionConfig[2m > [22m[2mcaching behavior[2m > [22m[2mshould use custom cache TTL when specified
|
|
359
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
360
|
+
source: [32m'api'[39m,
|
|
361
|
+
toolCount: [33m0[39m,
|
|
522
362
|
protectedTools: [],
|
|
523
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
524
|
-
projectId: 'none',
|
|
525
|
-
cacheTtlMs:
|
|
526
|
-
cacheExpiresAt: '2025-11-
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > edge cases > should handle null requiredScopes
|
|
530
|
-
[ToolProtectionService] Config loaded from API {
|
|
531
|
-
source: 'api',
|
|
532
|
-
toolCount: 1,
|
|
533
|
-
protectedTools: [ 'tool1' ],
|
|
534
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
535
|
-
projectId: 'none',
|
|
536
|
-
cacheTtlMs: 300000,
|
|
537
|
-
cacheExpiresAt: '2025-11-25T17:44:45.684Z'
|
|
363
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
364
|
+
projectId: [32m'none'[39m,
|
|
365
|
+
cacheTtlMs: [33m600000[39m,
|
|
366
|
+
cacheExpiresAt: [32m'2025-11-19T17:21:22.933Z'[39m
|
|
538
367
|
}
|
|
539
368
|
|
|
540
|
-
|
|
541
|
-
[ToolProtectionService] Config loaded from API {
|
|
542
|
-
source: 'api',
|
|
543
|
-
toolCount:
|
|
544
|
-
protectedTools: [
|
|
545
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
546
|
-
projectId: 'none',
|
|
547
|
-
cacheTtlMs:
|
|
548
|
-
cacheExpiresAt: '2025-11-
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
[ToolProtectionService] Config loaded from API {
|
|
553
|
-
source: 'api',
|
|
554
|
-
toolCount:
|
|
369
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mgetToolProtectionConfig[2m > [22m[2medge cases[2m > [22m[2mshould handle empty toolProtections object
|
|
370
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
371
|
+
source: [32m'api'[39m,
|
|
372
|
+
toolCount: [33m0[39m,
|
|
373
|
+
protectedTools: [],
|
|
374
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
375
|
+
projectId: [32m'none'[39m,
|
|
376
|
+
cacheTtlMs: [33m300000[39m,
|
|
377
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.933Z'[39m
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mgetToolProtectionConfig[2m > [22m[2medge cases[2m > [22m[2mshould handle null requiredScopes
|
|
381
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
382
|
+
source: [32m'api'[39m,
|
|
383
|
+
toolCount: [33m1[39m,
|
|
384
|
+
protectedTools: [ [32m'tool1'[39m ],
|
|
385
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
386
|
+
projectId: [32m'none'[39m,
|
|
387
|
+
cacheTtlMs: [33m300000[39m,
|
|
388
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.933Z'[39m
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mgetToolProtectionConfig[2m > [22m[2medge cases[2m > [22m[2mshould handle mixed camelCase and snake_case in response
|
|
392
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
393
|
+
source: [32m'api'[39m,
|
|
394
|
+
toolCount: [33m2[39m,
|
|
395
|
+
protectedTools: [ [32m'tool1'[39m ],
|
|
396
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
397
|
+
projectId: [32m'none'[39m,
|
|
398
|
+
cacheTtlMs: [33m300000[39m,
|
|
399
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.933Z'[39m
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mcheckToolProtection[2m > [22m[2mshould return null when tool has no protection
|
|
403
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
404
|
+
source: [32m'api'[39m,
|
|
405
|
+
toolCount: [33m1[39m,
|
|
555
406
|
protectedTools: [],
|
|
556
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
557
|
-
projectId: 'none',
|
|
558
|
-
cacheTtlMs:
|
|
559
|
-
cacheExpiresAt: '2025-11-
|
|
407
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
408
|
+
projectId: [32m'none'[39m,
|
|
409
|
+
cacheTtlMs: [33m300000[39m,
|
|
410
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.934Z'[39m
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mcheckToolProtection[2m > [22m[2mshould return null when tool is not in config
|
|
414
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
415
|
+
source: [32m'api'[39m,
|
|
416
|
+
toolCount: [33m1[39m,
|
|
417
|
+
protectedTools: [ [32m'other_tool'[39m ],
|
|
418
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
419
|
+
projectId: [32m'none'[39m,
|
|
420
|
+
cacheTtlMs: [33m300000[39m,
|
|
421
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.934Z'[39m
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mcheckToolProtection[2m > [22m[2mshould return null when tool is not in config
|
|
425
|
+
[22m[39m[ToolProtectionService] Protection check {
|
|
426
|
+
tool: [32m'unknown_tool'[39m,
|
|
427
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
428
|
+
found: [33mfalse[39m,
|
|
429
|
+
isWildcard: [33mtrue[39m,
|
|
430
|
+
requiresDelegation: [33mfalse[39m,
|
|
431
|
+
availableTools: [ [32m'other_tool'[39m ]
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mcheckToolProtection[2m > [22m[2mshould return wildcard protection when tool not found and wildcard exists
|
|
435
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
436
|
+
source: [32m'api'[39m,
|
|
437
|
+
toolCount: [33m2[39m,
|
|
438
|
+
protectedTools: [ [32m'*'[39m ],
|
|
439
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
440
|
+
projectId: [32m'none'[39m,
|
|
441
|
+
cacheTtlMs: [33m300000[39m,
|
|
442
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.934Z'[39m
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mcheckToolProtection[2m > [22m[2mshould return wildcard protection when tool not found and wildcard exists
|
|
446
|
+
[22m[39m[ToolProtectionService] Protection check {
|
|
447
|
+
tool: [32m'unknown_tool'[39m,
|
|
448
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
449
|
+
found: [33mtrue[39m,
|
|
450
|
+
isWildcard: [33mtrue[39m,
|
|
451
|
+
requiresDelegation: [33mtrue[39m,
|
|
452
|
+
availableTools: [ [32m'*'[39m, [32m'specific_tool'[39m ]
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mcheckToolProtection[2m > [22m[2mshould prioritize specific tool protection over wildcard
|
|
456
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
457
|
+
source: [32m'api'[39m,
|
|
458
|
+
toolCount: [33m2[39m,
|
|
459
|
+
protectedTools: [ [32m'*'[39m ],
|
|
460
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
461
|
+
projectId: [32m'none'[39m,
|
|
462
|
+
cacheTtlMs: [33m300000[39m,
|
|
463
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.934Z'[39m
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mcheckToolProtection[2m > [22m[2mshould use wildcard protection in fail-safe deny-all mode
|
|
467
|
+
[22m[39m[ToolProtectionService] Protection check {
|
|
468
|
+
tool: [32m'any_tool'[39m,
|
|
469
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
470
|
+
[90mstderr[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mcheckToolProtection[2m > [22m[2mshould use wildcard protection in fail-safe deny-all mode
|
|
471
|
+
found: [33mtrue[39m,
|
|
472
|
+
[22m[39m[ToolProtectionService] API fetch failed, no fallback, failing closed (deny-all) {
|
|
473
|
+
isWildcard: [33mtrue[39m,
|
|
474
|
+
requiresDelegation: [33mtrue[39m,
|
|
475
|
+
availableTools: [ [32m'*'[39m ]
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mcheckToolProtection[2m > [22m[2mshould return protection config when tool requires delegation
|
|
479
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
480
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
481
|
+
error: [32m'Network error'[39m,
|
|
482
|
+
source: [32m'api'[39m,
|
|
483
|
+
toolCount: [33m1[39m,
|
|
484
|
+
cacheKey: [32m'agent:did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK'[39m
|
|
485
|
+
protectedTools: [ [32m'protected_tool'[39m ],
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
489
|
+
projectId: [32m'none'[39m,
|
|
490
|
+
cacheTtlMs: [33m300000[39m,
|
|
491
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.934Z'[39m
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mcheckToolProtection[2m > [22m[2mshould return protection config when tool requires delegation
|
|
495
|
+
[22m[39m[ToolProtectionService] Protection check {
|
|
496
|
+
tool: [32m'protected_tool'[39m,
|
|
497
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
498
|
+
found: [33mtrue[39m,
|
|
499
|
+
isWildcard: [33mfalse[39m,
|
|
500
|
+
requiresDelegation: [33mtrue[39m,
|
|
501
|
+
availableTools: [ [32m'protected_tool'[39m ]
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mintegration with NoOpToolProtectionCache[2m > [22m[2mshould work with NoOpToolProtectionCache
|
|
505
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
506
|
+
source: [32m'api'[39m,
|
|
507
|
+
toolCount: [33m1[39m,
|
|
508
|
+
protectedTools: [ [32m'tool1'[39m ],
|
|
509
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
510
|
+
projectId: [32m'none'[39m,
|
|
511
|
+
cacheTtlMs: [33m300000[39m,
|
|
512
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.935Z'[39m
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
[90mstdout[2m | src/__tests__/services/tool-protection.service.test.ts[2m > [22m[2mToolProtectionService[2m > [22m[2mintegration with NoOpToolProtectionCache[2m > [22m[2mshould work with NoOpToolProtectionCache
|
|
516
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
517
|
+
source: [32m'api'[39m,
|
|
518
|
+
toolCount: [33m1[39m,
|
|
519
|
+
protectedTools: [ [32m'tool1'[39m ],
|
|
520
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
521
|
+
projectId: [32m'none'[39m,
|
|
522
|
+
cacheTtlMs: [33m300000[39m,
|
|
523
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.935Z'[39m
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
[90mstdout[2m | src/__tests__/services/agentshield-integration.test.ts[2m > [22m[2mAgentShield Integration[2m > [22m[2mAPI Authentication[2m > [22m[2mshould use X-API-Key header for new endpoint
|
|
527
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
528
|
+
source: [32m'api'[39m,
|
|
529
|
+
toolCount: [33m0[39m,
|
|
530
|
+
protectedTools: [],
|
|
531
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
532
|
+
projectId: [32m'test-project-123'[39m,
|
|
533
|
+
cacheTtlMs: [33m300000[39m,
|
|
534
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.943Z'[39m
|
|
560
535
|
}
|
|
561
536
|
|
|
562
|
-
|
|
563
|
-
[ToolProtectionService] Config loaded from API {
|
|
564
|
-
source: 'api',
|
|
565
|
-
toolCount:
|
|
566
|
-
protectedTools: [
|
|
567
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
568
|
-
projectId: 'none',
|
|
569
|
-
cacheTtlMs:
|
|
570
|
-
cacheExpiresAt: '2025-11-
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return null when tool is not in config
|
|
574
|
-
[ToolProtectionService] Protection check {
|
|
575
|
-
tool: 'unknown_tool',
|
|
576
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
577
|
-
found: false,
|
|
578
|
-
isWildcard: true,
|
|
579
|
-
requiresDelegation: false,
|
|
580
|
-
availableTools: [ 'other_tool' ]
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return wildcard protection when tool not found and wildcard exists
|
|
584
|
-
[ToolProtectionService] Config loaded from API {
|
|
585
|
-
source: 'api',
|
|
586
|
-
toolCount: 2,
|
|
587
|
-
protectedTools: [ '*' ],
|
|
588
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
589
|
-
projectId: 'none',
|
|
590
|
-
cacheTtlMs: 300000,
|
|
591
|
-
cacheExpiresAt: '2025-11-25T17:44:45.685Z'
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return wildcard protection when tool not found and wildcard exists
|
|
595
|
-
[ToolProtectionService] Protection check {
|
|
596
|
-
tool: 'unknown_tool',
|
|
597
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
598
|
-
found: true,
|
|
599
|
-
isWildcard: true,
|
|
600
|
-
requiresDelegation: true,
|
|
601
|
-
availableTools: [ '*', 'specific_tool' ]
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should prioritize specific tool protection over wildcard
|
|
605
|
-
[ToolProtectionService] Config loaded from API {
|
|
606
|
-
source: 'api',
|
|
607
|
-
toolCount: 2,
|
|
608
|
-
protectedTools: [ '*' ],
|
|
609
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
610
|
-
projectId: 'none',
|
|
611
|
-
cacheTtlMs: 300000,
|
|
612
|
-
cacheExpiresAt: '2025-11-25T17:44:45.685Z'
|
|
537
|
+
[90mstdout[2m | src/__tests__/services/agentshield-integration.test.ts[2m > [22m[2mAgentShield Integration[2m > [22m[2mAPI Authentication[2m > [22m[2mshould use Authorization Bearer header for old endpoint
|
|
538
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
539
|
+
source: [32m'api'[39m,
|
|
540
|
+
toolCount: [33m0[39m,
|
|
541
|
+
protectedTools: [],
|
|
542
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
543
|
+
projectId: [32m'none'[39m,
|
|
544
|
+
cacheTtlMs: [33m300000[39m,
|
|
545
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.950Z'[39m
|
|
613
546
|
}
|
|
614
547
|
|
|
615
|
-
|
|
616
|
-
[ToolProtectionService]
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
548
|
+
[90mstdout[2m | src/__tests__/services/agentshield-integration.test.ts[2m > [22m[2mAgentShield Integration[2m > [22m[2mEndpoint Selection[2m > [22m[2mshould use project-scoped endpoint when projectId is available
|
|
549
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
550
|
+
source: [32m'api'[39m,
|
|
551
|
+
toolCount: [33m0[39m,
|
|
552
|
+
protectedTools: [],
|
|
553
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
554
|
+
projectId: [32m'test-project-123'[39m,
|
|
555
|
+
cacheTtlMs: [33m300000[39m,
|
|
556
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.951Z'[39m
|
|
620
557
|
}
|
|
621
558
|
|
|
622
|
-
|
|
623
|
-
[ToolProtectionService]
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
559
|
+
[90mstdout[2m | src/__tests__/services/agentshield-integration.test.ts[2m > [22m[2mAgentShield Integration[2m > [22m[2mEndpoint Selection[2m > [22m[2mshould use agent-scoped endpoint when projectId is not available
|
|
560
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
561
|
+
source: [32m'api'[39m,
|
|
562
|
+
toolCount: [33m0[39m,
|
|
563
|
+
protectedTools: [],
|
|
564
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
565
|
+
projectId: [32m'none'[39m,
|
|
566
|
+
cacheTtlMs: [33m300000[39m,
|
|
567
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.952Z'[39m
|
|
630
568
|
}
|
|
631
569
|
|
|
632
|
-
|
|
633
|
-
[ToolProtectionService] Config loaded from API {
|
|
634
|
-
source: 'api',
|
|
635
|
-
toolCount:
|
|
636
|
-
protectedTools: [
|
|
637
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
638
|
-
projectId: '
|
|
639
|
-
cacheTtlMs:
|
|
640
|
-
cacheExpiresAt: '2025-11-
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return protection config when tool requires delegation
|
|
644
|
-
[ToolProtectionService] Protection check {
|
|
645
|
-
tool: 'protected_tool',
|
|
646
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
647
|
-
found: true,
|
|
648
|
-
isWildcard: false,
|
|
649
|
-
requiresDelegation: true,
|
|
650
|
-
availableTools: [ 'protected_tool' ]
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > integration with NoOpToolProtectionCache > should work with NoOpToolProtectionCache
|
|
654
|
-
[ToolProtectionService] Config loaded from API {
|
|
655
|
-
source: 'api',
|
|
656
|
-
toolCount: 1,
|
|
657
|
-
protectedTools: [ 'tool1' ],
|
|
658
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
659
|
-
projectId: 'none',
|
|
660
|
-
cacheTtlMs: 300000,
|
|
661
|
-
cacheExpiresAt: '2025-11-25T17:44:45.685Z'
|
|
570
|
+
[90mstdout[2m | src/__tests__/services/agentshield-integration.test.ts[2m > [22m[2mAgentShield Integration[2m > [22m[2mEndpoint Selection[2m > [22m[2mshould encode projectId in URL
|
|
571
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
572
|
+
source: [32m'api'[39m,
|
|
573
|
+
toolCount: [33m0[39m,
|
|
574
|
+
protectedTools: [],
|
|
575
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
576
|
+
projectId: [32m'project/with/special-chars'[39m,
|
|
577
|
+
cacheTtlMs: [33m300000[39m,
|
|
578
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.952Z'[39m
|
|
662
579
|
}
|
|
663
580
|
|
|
664
|
-
|
|
665
|
-
[ToolProtectionService] Config loaded from API {
|
|
666
|
-
source: 'api',
|
|
667
|
-
toolCount:
|
|
668
|
-
protectedTools: [
|
|
669
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
670
|
-
projectId: 'none',
|
|
671
|
-
cacheTtlMs:
|
|
672
|
-
cacheExpiresAt: '2025-11-
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
[
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
[
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
[
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
[
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
[
|
|
777
|
-
|
|
778
|
-
status: 200,
|
|
779
|
-
responseDataType: 'object',
|
|
780
|
-
responseDataKeys: [ 'success', 'data', 'metadata' ],
|
|
781
|
-
responseData: '{\n' +
|
|
782
|
-
' "success": true,\n' +
|
|
783
|
-
' "data": {\n' +
|
|
784
|
-
' "success": true,\n' +
|
|
785
|
-
' "accepted": 1,\n' +
|
|
786
|
-
' "rejected": 0,\n' +
|
|
787
|
-
' "outcomes": {\n' +
|
|
788
|
-
' "success": 1,\n' +
|
|
789
|
-
' "failed": 0,\n' +
|
|
790
|
-
' "blocked": 0,\n' +
|
|
791
|
-
' "error": 0\n' +
|
|
792
|
-
' }\n' +
|
|
793
|
-
' },\n' +
|
|
794
|
-
' "metadata": {\n' +
|
|
795
|
-
' "requestId": "test-request-id",\n' +
|
|
796
|
-
' "timestamp": "2025-11-25T17:39:45.716Z"\n' +
|
|
797
|
-
' }\n' +
|
|
798
|
-
'}'
|
|
799
|
-
}
|
|
800
|
-
[AccessControl] Raw response received: {
|
|
801
|
-
"success": true,
|
|
802
|
-
"data": {
|
|
803
|
-
"success": true,
|
|
804
|
-
"accepted": 1,
|
|
805
|
-
"rejected": 0,
|
|
806
|
-
"outcomes": {
|
|
807
|
-
"success": 1,
|
|
808
|
-
"failed": 0,
|
|
809
|
-
"blocked": 0,
|
|
810
|
-
"error": 0
|
|
811
|
-
}
|
|
812
|
-
},
|
|
813
|
-
"metadata": {
|
|
814
|
-
"requestId": "test-request-id",
|
|
815
|
-
"timestamp": "2025-11-25T17:39:45.716Z"
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
[AccessControl] 🔍 DATA OBJECT STRUCTURE (after deep clone): {
|
|
819
|
-
correlationId: '0b4fe4b5-d799-4be6-b064-1076d8e44ce8',
|
|
820
|
-
dataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
|
|
821
|
-
hasAccepted: true,
|
|
822
|
-
hasRejected: true,
|
|
823
|
-
hasOutcomes: true,
|
|
824
|
-
hasErrors: false,
|
|
825
|
-
acceptedType: 'number',
|
|
826
|
-
acceptedValue: 1,
|
|
827
|
-
rejectedType: 'number',
|
|
828
|
-
rejectedValue: 0,
|
|
829
|
-
outcomesType: 'object',
|
|
830
|
-
outcomesValue: { success: 1, failed: 0, blocked: 0, error: 0 },
|
|
831
|
-
errorsType: 'undefined',
|
|
832
|
-
errorsIsArray: false,
|
|
833
|
-
fullData: '{\n' +
|
|
834
|
-
' "success": true,\n' +
|
|
835
|
-
' "accepted": 1,\n' +
|
|
836
|
-
' "rejected": 0,\n' +
|
|
837
|
-
' "outcomes": {\n' +
|
|
838
|
-
' "success": 1,\n' +
|
|
839
|
-
' "failed": 0,\n' +
|
|
840
|
-
' "blocked": 0,\n' +
|
|
841
|
-
' "error": 0\n' +
|
|
842
|
-
' }\n' +
|
|
843
|
-
'}'
|
|
844
|
-
}
|
|
845
|
-
[AccessControl] 🔍 VALIDATING DATA WITH SUCCESS: {
|
|
846
|
-
correlationId: '0b4fe4b5-d799-4be6-b064-1076d8e44ce8',
|
|
847
|
-
dataWithSuccessKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
|
|
848
|
-
hasSuccess: true,
|
|
849
|
-
successValue: true,
|
|
850
|
-
hasAccepted: true,
|
|
851
|
-
acceptedValue: 1,
|
|
852
|
-
hasRejected: true,
|
|
853
|
-
rejectedValue: 0,
|
|
854
|
-
hasOutcomes: true,
|
|
855
|
-
outcomesValue: { success: 1, failed: 0, blocked: 0, error: 0 },
|
|
856
|
-
fullDataWithSuccess: '{\n' +
|
|
857
|
-
' "success": true,\n' +
|
|
858
|
-
' "accepted": 1,\n' +
|
|
859
|
-
' "rejected": 0,\n' +
|
|
860
|
-
' "outcomes": {\n' +
|
|
861
|
-
' "success": 1,\n' +
|
|
862
|
-
' "failed": 0,\n' +
|
|
863
|
-
' "blocked": 0,\n' +
|
|
864
|
-
' "error": 0\n' +
|
|
865
|
-
' }\n' +
|
|
866
|
-
'}'
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle response with missing outcomes field (outcomes is optional)
|
|
870
|
-
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
871
|
-
correlationId: 'd78e6955-da22-4db8-bb04-ddde3cbaae0b',
|
|
872
|
-
status: 200,
|
|
873
|
-
statusText: '',
|
|
874
|
-
headers: { 'content-type': 'application/json' },
|
|
875
|
-
responseTextLength: 42,
|
|
876
|
-
responseTextPreview: '{"success":true,"accepted":1,"rejected":0}',
|
|
877
|
-
fullResponseText: '{"success":true,"accepted":1,"rejected":0}'
|
|
878
|
-
}
|
|
879
|
-
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
880
|
-
correlationId: 'd78e6955-da22-4db8-bb04-ddde3cbaae0b',
|
|
881
|
-
status: 200,
|
|
882
|
-
responseDataType: 'object',
|
|
883
|
-
responseDataKeys: [ 'success', 'accepted', 'rejected' ],
|
|
884
|
-
responseData: '{\n "success": true,\n "accepted": 1,\n "rejected": 0\n}'
|
|
885
|
-
}
|
|
886
|
-
[AccessControl] Raw response received: {
|
|
887
|
-
"success": true,
|
|
888
|
-
"accepted": 1,
|
|
889
|
-
"rejected": 0
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle response with missing outcomes field (outcomes is optional)
|
|
893
|
-
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
894
|
-
correlationId: 'a376fa6b-cca8-46bb-82f4-8abef62495de',
|
|
895
|
-
status: 200,
|
|
896
|
-
statusText: '',
|
|
897
|
-
headers: { 'content-type': 'application/json' },
|
|
898
|
-
responseTextLength: 100,
|
|
899
|
-
responseTextPreview: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}',
|
|
900
|
-
fullResponseText: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}'
|
|
901
|
-
}
|
|
902
|
-
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
903
|
-
correlationId: 'a376fa6b-cca8-46bb-82f4-8abef62495de',
|
|
904
|
-
status: 200,
|
|
905
|
-
responseDataType: 'object',
|
|
906
|
-
responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
|
|
907
|
-
responseData: '{\n' +
|
|
908
|
-
' "success": true,\n' +
|
|
909
|
-
' "accepted": 1,\n' +
|
|
910
|
-
' "rejected": 0,\n' +
|
|
911
|
-
' "outcomes": {\n' +
|
|
912
|
-
' "success": 1,\n' +
|
|
913
|
-
' "failed": 0,\n' +
|
|
914
|
-
' "blocked": 0,\n' +
|
|
915
|
-
' "error": 0\n' +
|
|
916
|
-
' }\n' +
|
|
917
|
-
'}'
|
|
918
|
-
}
|
|
919
|
-
[AccessControl] Raw response received: {
|
|
920
|
-
"success": true,
|
|
921
|
-
"accepted": 1,
|
|
922
|
-
"rejected": 0,
|
|
923
|
-
"outcomes": {
|
|
924
|
-
"success": 1,
|
|
925
|
-
"failed": 0,
|
|
926
|
-
"blocked": 0,
|
|
927
|
-
"error": 0
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle response with missing outcomes field (outcomes is optional)
|
|
932
|
-
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
933
|
-
correlationId: 'f420aae3-3a41-4e4c-befa-053ceed32465',
|
|
934
|
-
status: 200,
|
|
935
|
-
statusText: '',
|
|
936
|
-
headers: { 'content-type': 'application/json' },
|
|
937
|
-
responseTextLength: 56,
|
|
938
|
-
responseTextPreview: '{"success":true,"accepted":1,"rejected":0,"outcomes":{}}',
|
|
939
|
-
fullResponseText: '{"success":true,"accepted":1,"rejected":0,"outcomes":{}}'
|
|
940
|
-
}
|
|
941
|
-
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
942
|
-
correlationId: 'f420aae3-3a41-4e4c-befa-053ceed32465',
|
|
943
|
-
status: 200,
|
|
944
|
-
responseDataType: 'object',
|
|
945
|
-
responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
|
|
946
|
-
responseData: '{\n "success": true,\n "accepted": 1,\n "rejected": 0,\n "outcomes": {}\n}'
|
|
947
|
-
}
|
|
948
|
-
[AccessControl] Raw response received: {
|
|
949
|
-
"success": true,
|
|
950
|
-
"accepted": 1,
|
|
951
|
-
"rejected": 0,
|
|
952
|
-
"outcomes": {}
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
stderr | src/services/__tests__/proof-verifier.test.ts > ProofVerifier Security > Signature Verification > should handle signature verification errors gracefully
|
|
956
|
-
[CryptoService] Ed25519 verification error: Error: Crypto error
|
|
957
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/proof-verifier.test.ts:328:9
|
|
958
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
|
|
959
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
|
|
960
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
|
|
581
|
+
[90mstdout[2m | src/__tests__/services/agentshield-integration.test.ts[2m > [22m[2mAgentShield Integration[2m > [22m[2mEndpoint Selection[2m > [22m[2mshould encode agent DID in URL
|
|
582
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
583
|
+
source: [32m'api'[39m,
|
|
584
|
+
toolCount: [33m0[39m,
|
|
585
|
+
protectedTools: [],
|
|
586
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
587
|
+
projectId: [32m'none'[39m,
|
|
588
|
+
cacheTtlMs: [33m300000[39m,
|
|
589
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.952Z'[39m
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
[90mstdout[2m | src/__tests__/services/agentshield-integration.test.ts[2m > [22m[2mAgentShield Integration[2m > [22m[2mResponse Format Compatibility[2m > [22m[2mshould handle new endpoint format (toolProtections object)
|
|
593
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
594
|
+
source: [32m'api'[39m,
|
|
595
|
+
toolCount: [33m2[39m,
|
|
596
|
+
protectedTools: [ [32m'checkout'[39m ],
|
|
597
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
598
|
+
projectId: [32m'test-project-123'[39m,
|
|
599
|
+
cacheTtlMs: [33m300000[39m,
|
|
600
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.952Z'[39m
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
[90mstdout[2m | src/__tests__/services/agentshield-integration.test.ts[2m > [22m[2mAgentShield Integration[2m > [22m[2mResponse Format Compatibility[2m > [22m[2mshould handle old endpoint format (tools array)
|
|
604
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
605
|
+
source: [32m'api'[39m,
|
|
606
|
+
toolCount: [33m2[39m,
|
|
607
|
+
protectedTools: [ [32m'checkout'[39m ],
|
|
608
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
609
|
+
projectId: [32m'none'[39m,
|
|
610
|
+
cacheTtlMs: [33m300000[39m,
|
|
611
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.953Z'[39m
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
[90mstdout[2m | src/__tests__/services/agentshield-integration.test.ts[2m > [22m[2mAgentShield Integration[2m > [22m[2mResponse Format Compatibility[2m > [22m[2mshould handle old endpoint format (tools object)
|
|
615
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
616
|
+
source: [32m'api'[39m,
|
|
617
|
+
toolCount: [33m2[39m,
|
|
618
|
+
protectedTools: [ [32m'checkout'[39m ],
|
|
619
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
620
|
+
projectId: [32m'none'[39m,
|
|
621
|
+
cacheTtlMs: [33m300000[39m,
|
|
622
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.953Z'[39m
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
[90mstdout[2m | src/__tests__/services/agentshield-integration.test.ts[2m > [22m[2mAgentShield Integration[2m > [22m[2mResponse Format Compatibility[2m > [22m[2mshould handle snake_case field names
|
|
626
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
627
|
+
source: [32m'api'[39m,
|
|
628
|
+
toolCount: [33m1[39m,
|
|
629
|
+
protectedTools: [ [32m'tool1'[39m ],
|
|
630
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
631
|
+
projectId: [32m'test-project-123'[39m,
|
|
632
|
+
cacheTtlMs: [33m300000[39m,
|
|
633
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.954Z'[39m
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
[90mstdout[2m | src/__tests__/services/agentshield-integration.test.ts[2m > [22m[2mAgentShield Integration[2m > [22m[2mResponse Format Compatibility[2m > [22m[2mshould handle camelCase field names
|
|
637
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
638
|
+
source: [32m'api'[39m,
|
|
639
|
+
toolCount: [33m1[39m,
|
|
640
|
+
protectedTools: [ [32m'tool1'[39m ],
|
|
641
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
642
|
+
projectId: [32m'test-project-123'[39m,
|
|
643
|
+
cacheTtlMs: [33m300000[39m,
|
|
644
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.954Z'[39m
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
[90mstdout[2m | src/__tests__/services/agentshield-integration.test.ts[2m > [22m[2mAgentShield Integration[2m > [22m[2mResponse Format Compatibility[2m > [22m[2mshould prefer camelCase over snake_case when both present
|
|
648
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
649
|
+
source: [32m'api'[39m,
|
|
650
|
+
toolCount: [33m1[39m,
|
|
651
|
+
protectedTools: [ [32m'tool1'[39m ],
|
|
652
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
653
|
+
projectId: [32m'test-project-123'[39m,
|
|
654
|
+
cacheTtlMs: [33m300000[39m,
|
|
655
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.954Z'[39m
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
[90mstderr[2m | src/__tests__/services/agentshield-integration.test.ts[2m > [22m[2mAgentShield Integration[2m > [22m[2mError Handling[2m > [22m[2mshould handle network timeout
|
|
659
|
+
[22m[39m[ToolProtectionService] API fetch failed, using fallback config { agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m, error: [32m'Network timeout'[39m }
|
|
660
|
+
|
|
661
|
+
[90mstderr[2m | src/__tests__/services/agentshield-integration.test.ts[2m > [22m[2mAgentShield Integration[2m > [22m[2mFallback Behavior[2m > [22m[2mshould cache fallback config
|
|
662
|
+
[22m[39m[ToolProtectionService] API fetch failed, using fallback config { agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m, error: [32m'Network error'[39m }
|
|
663
|
+
|
|
664
|
+
[90mstdout[2m | src/__tests__/services/agentshield-integration.test.ts[2m > [22m[2mAgentShield Integration[2m > [22m[2mCaching Integration[2m > [22m[2mshould cache successful API responses
|
|
665
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
666
|
+
source: [32m'api'[39m,
|
|
667
|
+
toolCount: [33m1[39m,
|
|
668
|
+
protectedTools: [ [32m'tool1'[39m ],
|
|
669
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
670
|
+
projectId: [32m'test-project-123'[39m,
|
|
671
|
+
cacheTtlMs: [33m300000[39m,
|
|
672
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:22.955Z'[39m
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
[90mstdout[2m | src/__tests__/services/agentshield-integration.test.ts[2m > [22m[2mAgentShield Integration[2m > [22m[2mCaching Integration[2m > [22m[2mshould respect cache TTL
|
|
676
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
677
|
+
source: [32m'api'[39m,
|
|
678
|
+
toolCount: [33m0[39m,
|
|
679
|
+
protectedTools: [],
|
|
680
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
681
|
+
projectId: [32m'test-project-123'[39m,
|
|
682
|
+
cacheTtlMs: [33m1000[39m,
|
|
683
|
+
cacheExpiresAt: [32m'2025-11-19T17:11:23.956Z'[39m
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
[32m✓[39m src/services/__tests__/access-control.service.test.ts [2m([22m[2m20 tests[22m[2m)[22m[32m 23[2mms[22m[39m
|
|
687
|
+
[32m✓[39m src/__tests__/services/tool-protection.service.test.ts [2m([22m[2m45 tests[22m[2m)[22m[32m 14[2mms[22m[39m
|
|
688
|
+
[32m✓[39m src/__tests__/cache/tool-protection-cache.test.ts [2m([22m[2m49 tests[22m[2m)[22m[32m 159[2mms[22m[39m
|
|
689
|
+
[90mstderr[2m | src/services/__tests__/proof-verifier.test.ts[2m > [22m[2mProofVerifier Security[2m > [22m[2mSignature Verification[2m > [22m[2mshould handle signature verification errors gracefully
|
|
690
|
+
[22m[39m[CryptoService] Ed25519 verification error: Error: Crypto error
|
|
691
|
+
at [90m/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/__tests__/proof-verifier.test.ts:328:9
|
|
692
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:157:11
|
|
693
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:753:26
|
|
694
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1636:20
|
|
961
695
|
at new Promise (<anonymous>)
|
|
962
|
-
at runWithTimeout (file:///Users/brian/Documents
|
|
963
|
-
at runTest (file:///Users/brian/Documents
|
|
964
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
965
|
-
at runSuite (file:///Users/brian/Documents
|
|
966
|
-
at runSuite (file:///Users/brian/Documents
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
[
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
[
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
[
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
[
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
[
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
[
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
[
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
[
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
[
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
[
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
[
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
[
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
[
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
}
|
|
1143
|
-
|
|
1144
|
-
✓ src/services/__tests__/access-control.service.test.ts (23 tests) 39ms
|
|
1145
|
-
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should block tool execution when delegation has wrong scopes
|
|
1146
|
-
[MCP-I] Checking tool protection: {
|
|
1147
|
-
tool: 'protectedTool',
|
|
1148
|
-
agentDid: 'did:key:zmock123...',
|
|
1149
|
-
hasDelegation: true
|
|
1150
|
-
}
|
|
1151
|
-
|
|
1152
|
-
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should block tool execution when delegation has wrong scopes
|
|
1153
|
-
[MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
|
|
1154
|
-
tool: 'protectedTool',
|
|
1155
|
-
agentDid: 'did:key:zmock123...',
|
|
1156
|
-
hasDelegationToken: true,
|
|
1157
|
-
hasConsentProof: false,
|
|
1158
|
-
requiredScopes: [ 'files:write' ]
|
|
1159
|
-
}
|
|
1160
|
-
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should block tool execution when delegation has wrong scopes
|
|
1161
|
-
|
|
1162
|
-
[MCP-I] ❌ Delegation verification FAILED {
|
|
1163
|
-
tool: 'protectedTool',
|
|
1164
|
-
agentDid: 'did:key:zmock123...',
|
|
1165
|
-
reason: 'Insufficient scopes',
|
|
1166
|
-
errorCode: undefined,
|
|
1167
|
-
errorMessage: undefined,
|
|
1168
|
-
requiredScopes: [ 'files:write' ]
|
|
1169
|
-
}
|
|
1170
|
-
|
|
1171
|
-
✓ src/delegation/__tests__/vc-issuer.test.ts (21 tests) 60ms
|
|
1172
|
-
stderr | src/services/__tests__/access-control.integration.test.ts > AccessControlApiService Integration > Proof Submission Flow > should submit proof end-to-end
|
|
1173
|
-
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
1174
|
-
correlationId: 'f384070c-fd40-4213-9ce1-03a5a4ad41e3',
|
|
1175
|
-
status: 200,
|
|
1176
|
-
statusText: '',
|
|
1177
|
-
headers: { 'content-type': 'application/json' },
|
|
1178
|
-
responseTextLength: 100,
|
|
1179
|
-
responseTextPreview: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}',
|
|
1180
|
-
fullResponseText: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}'
|
|
1181
|
-
}
|
|
1182
|
-
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
1183
|
-
correlationId: 'f384070c-fd40-4213-9ce1-03a5a4ad41e3',
|
|
1184
|
-
status: 200,
|
|
1185
|
-
responseDataType: 'object',
|
|
1186
|
-
responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
|
|
1187
|
-
responseData: '{\n' +
|
|
1188
|
-
' "success": true,\n' +
|
|
1189
|
-
' "accepted": 1,\n' +
|
|
1190
|
-
' "rejected": 0,\n' +
|
|
1191
|
-
' "outcomes": {\n' +
|
|
1192
|
-
' "success": 1,\n' +
|
|
1193
|
-
' "failed": 0,\n' +
|
|
1194
|
-
' "blocked": 0,\n' +
|
|
1195
|
-
' "error": 0\n' +
|
|
1196
|
-
' }\n' +
|
|
1197
|
-
'}'
|
|
1198
|
-
}
|
|
1199
|
-
[AccessControl] Raw response received: {
|
|
1200
|
-
"success": true,
|
|
1201
|
-
"accepted": 1,
|
|
1202
|
-
"rejected": 0,
|
|
1203
|
-
"outcomes": {
|
|
1204
|
-
"success": 1,
|
|
1205
|
-
"failed": 0,
|
|
1206
|
-
"blocked": 0,
|
|
1207
|
-
"error": 0
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
stderr | src/services/__tests__/access-control.integration.test.ts > AccessControlApiService Integration > Proof Submission Flow > should handle proof submission with errors
|
|
1212
|
-
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
1213
|
-
correlationId: '8cb7cff9-433c-465d-a851-d9e329e3f8f0',
|
|
1214
|
-
status: 200,
|
|
1215
|
-
statusText: '',
|
|
1216
|
-
headers: { 'content-type': 'application/json' },
|
|
1217
|
-
responseTextLength: 200,
|
|
1218
|
-
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"}}]}',
|
|
1219
|
-
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"}}]}'
|
|
1220
|
-
}
|
|
1221
|
-
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
1222
|
-
correlationId: '8cb7cff9-433c-465d-a851-d9e329e3f8f0',
|
|
1223
|
-
status: 200,
|
|
1224
|
-
responseDataType: 'object',
|
|
1225
|
-
responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes', 'errors' ],
|
|
1226
|
-
responseData: '{\n' +
|
|
1227
|
-
' "success": true,\n' +
|
|
1228
|
-
' "accepted": 0,\n' +
|
|
1229
|
-
' "rejected": 1,\n' +
|
|
1230
|
-
' "outcomes": {\n' +
|
|
1231
|
-
' "success": 0,\n' +
|
|
1232
|
-
' "failed": 1,\n' +
|
|
1233
|
-
' "blocked": 0,\n' +
|
|
1234
|
-
' "error": 0\n' +
|
|
1235
|
-
' },\n' +
|
|
1236
|
-
' "errors": [\n' +
|
|
1237
|
-
' {\n' +
|
|
1238
|
-
' "proof_index": 0,\n' +
|
|
1239
|
-
' "error": {\n' +
|
|
1240
|
-
' "code": "invalid_signature",\n' +
|
|
1241
|
-
' "message": "Invalid JWS signature"\n' +
|
|
1242
|
-
' }\n' +
|
|
1243
|
-
' }\n' +
|
|
1244
|
-
' ]\n' +
|
|
1245
|
-
'}'
|
|
1246
|
-
}
|
|
1247
|
-
[AccessControl] Raw response received: {
|
|
1248
|
-
"success": true,
|
|
1249
|
-
"accepted": 0,
|
|
1250
|
-
"rejected": 1,
|
|
1251
|
-
"outcomes": {
|
|
1252
|
-
"success": 0,
|
|
1253
|
-
"failed": 1,
|
|
1254
|
-
"blocked": 0,
|
|
1255
|
-
"error": 0
|
|
1256
|
-
},
|
|
1257
|
-
"errors": [
|
|
1258
|
-
{
|
|
1259
|
-
"proof_index": 0,
|
|
1260
|
-
"error": {
|
|
1261
|
-
"code": "invalid_signature",
|
|
1262
|
-
"message": "Invalid JWS signature"
|
|
1263
|
-
}
|
|
1264
|
-
}
|
|
1265
|
-
]
|
|
1266
|
-
}
|
|
1267
|
-
|
|
1268
|
-
stderr | src/services/__tests__/access-control.integration.test.ts > AccessControlApiService Integration > Proof Verification Flow > should verify proof using ProofVerifier
|
|
1269
|
-
[CryptoService] Key ID mismatch
|
|
1270
|
-
|
|
1271
|
-
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should handle API errors during verification gracefully
|
|
1272
|
-
[MCP-I] Checking tool protection: {
|
|
1273
|
-
tool: 'protectedTool',
|
|
1274
|
-
agentDid: 'did:key:zmock123...',
|
|
1275
|
-
hasDelegation: true
|
|
1276
|
-
}
|
|
1277
|
-
|
|
1278
|
-
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should handle API errors during verification gracefully
|
|
1279
|
-
[MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
|
|
1280
|
-
tool: 'protectedTool',
|
|
1281
|
-
agentDid: 'did:key:zmock123...',
|
|
1282
|
-
hasDelegationToken: true,
|
|
1283
|
-
hasConsentProof: false,
|
|
1284
|
-
requiredScopes: [ 'files:write' ]
|
|
1285
|
-
}
|
|
1286
|
-
|
|
1287
|
-
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)
|
|
1288
|
-
[MCP-I] Checking tool protection: {
|
|
1289
|
-
tool: 'protectedTool',
|
|
1290
|
-
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should handle API errors during verification gracefully
|
|
1291
|
-
agentDid: 'did:key:zmock123...',
|
|
1292
|
-
[MCP-I] ❌ Delegation verification error (API failure) {
|
|
1293
|
-
tool: 'protectedTool',
|
|
1294
|
-
hasDelegation: true
|
|
1295
|
-
agentDid: 'did:key:zmock123...',
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
|
-
errorCode: 'network_error',
|
|
1299
|
-
errorMessage: 'API unavailable',
|
|
1300
|
-
errorDetails: {}
|
|
1301
|
-
}
|
|
1302
|
-
|
|
1303
|
-
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
|
|
1304
|
-
[MCP-I] Checking tool protection: {
|
|
1305
|
-
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)
|
|
1306
|
-
[MCP-I] ⚠️ Delegation token provided but AccessControlApiService not configured - skipping verification {
|
|
1307
|
-
tool: 'protectedTool',
|
|
1308
|
-
tool: 'protectedTool',
|
|
1309
|
-
agentDid: 'did:key:zmock123...',
|
|
1310
|
-
hasDelegation: true
|
|
1311
|
-
agentDid: 'did:key:zmock123...',
|
|
1312
|
-
hasDelegationToken: true,
|
|
1313
|
-
hasConsentProof: false
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
}
|
|
1317
|
-
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
|
|
1318
|
-
|
|
1319
|
-
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
|
|
1320
|
-
[MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
|
|
1321
|
-
tool: 'protectedTool',
|
|
1322
|
-
[MCP-I] 🔒 SECURITY: User identifier validation FAILED {
|
|
1323
|
-
agentDid: 'did:key:zmock123...',
|
|
1324
|
-
hasDelegationToken: true,
|
|
1325
|
-
hasConsentProof: false,
|
|
1326
|
-
requiredScopes: [ 'files:write' ]
|
|
1327
|
-
}
|
|
1328
|
-
tool: 'protectedTool',
|
|
1329
|
-
|
|
1330
|
-
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
|
|
1331
|
-
[MCP-I] Checking tool protection: {
|
|
1332
|
-
tool: 'protectedTool',
|
|
1333
|
-
agentDid: 'did:key:zmock123...',
|
|
1334
|
-
delegationUserIdentifier: 'did:key:zUserB987654...',
|
|
1335
|
-
agentDid: 'did:key:zmock123...',
|
|
1336
|
-
hasDelegation: true
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
|
-
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
|
|
1340
|
-
[MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
|
|
1341
|
-
tool: 'protectedTool',
|
|
1342
|
-
agentDid: 'did:key:zmock123...',
|
|
1343
|
-
sessionUserDid: 'did:key:zUserA123456...',
|
|
1344
|
-
sessionId: 'session123...',
|
|
1345
|
-
hasDelegationToken: true,
|
|
1346
|
-
reason: 'user_identifier_mismatch',
|
|
1347
|
-
severity: 'high'
|
|
1348
|
-
hasConsentProof: false,
|
|
1349
|
-
requiredScopes: [ 'files:write' ]
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
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
|
|
1355
|
-
[MCP-I] ✅ User identifier validation PASSED {
|
|
1356
|
-
tool: 'protectedTool',
|
|
1357
|
-
agentDid: 'did:key:zmock123...',
|
|
1358
|
-
userDid: 'did:key:zUserA123456...',
|
|
1359
|
-
sessionId: 'session123...'
|
|
1360
|
-
}
|
|
1361
|
-
[MCP-I] ✅ Delegation verification SUCCEEDED {
|
|
1362
|
-
tool: 'protectedTool',
|
|
1363
|
-
agentDid: 'did:key:zmock123...',
|
|
1364
|
-
delegationId: 'test-delegation-id',
|
|
1365
|
-
credentialScopes: [ 'files:write' ],
|
|
1366
|
-
requiredScopes: [ 'files:write' ]
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > user_identifier validation > should handle missing user_identifier gracefully (backward compatibility)
|
|
1370
|
-
[MCP-I] Checking tool protection: {
|
|
1371
|
-
tool: 'protectedTool',
|
|
1372
|
-
agentDid: 'did:key:zmock123...',
|
|
1373
|
-
hasDelegation: true
|
|
1374
|
-
}
|
|
1375
|
-
|
|
1376
|
-
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > user_identifier validation > should handle missing user_identifier gracefully (backward compatibility)
|
|
1377
|
-
[MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
|
|
1378
|
-
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
|
|
1379
|
-
tool: 'protectedTool',
|
|
1380
|
-
[MCP-I] ⚠️ Delegation has user_identifier but session missing userDid {
|
|
1381
|
-
tool: 'protectedTool',
|
|
1382
|
-
agentDid: 'did:key:zmock123...',
|
|
1383
|
-
hasDelegationToken: true,
|
|
1384
|
-
agentDid: 'did:key:zmock123...',
|
|
1385
|
-
hasConsentProof: false,
|
|
1386
|
-
requiredScopes: [ 'files:write' ]
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > user_identifier validation > should handle missing user_identifier gracefully (backward compatibility)
|
|
1390
|
-
[MCP-I] ✅ Delegation verification SUCCEEDED {
|
|
1391
|
-
delegationUserIdentifier: 'did:key:zUserA123456...',
|
|
1392
|
-
tool: 'protectedTool',
|
|
1393
|
-
agentDid: 'did:key:zmock123...',
|
|
1394
|
-
delegationId: 'test-delegation-id',
|
|
1395
|
-
credentialScopes: [ 'files:write' ],
|
|
1396
|
-
sessionId: 'session123...'
|
|
1397
|
-
}
|
|
1398
|
-
requiredScopes: [ 'files:write' ]
|
|
1399
|
-
|
|
1400
|
-
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
|
|
1401
|
-
}
|
|
1402
|
-
|
|
1403
|
-
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
|
|
1404
|
-
[MCP-I] Checking tool protection: {
|
|
1405
|
-
tool: 'protectedTool',
|
|
1406
|
-
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
1407
|
-
agentDid: 'did:key:zmock123...',
|
|
1408
|
-
hasDelegation: true
|
|
1409
|
-
}
|
|
1410
|
-
|
|
1411
|
-
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
|
|
1412
|
-
tool: 'protectedTool',
|
|
1413
|
-
requiredScopes: [ 'files:write' ],
|
|
1414
|
-
[MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
|
|
1415
|
-
agentDid: 'did:key:zmock123...',
|
|
1416
|
-
resumeToken: 'resume_vyl74l_miev24el',
|
|
1417
|
-
tool: 'protectedTool',
|
|
1418
|
-
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_vyl74l_miev24el'
|
|
1419
|
-
}
|
|
1420
|
-
agentDid: 'did:key:zmock123...',
|
|
1421
|
-
hasDelegationToken: true,
|
|
1422
|
-
|
|
1423
|
-
hasConsentProof: false,
|
|
1424
|
-
requiredScopes: [ 'files:write' ]
|
|
1425
|
-
}
|
|
1426
|
-
|
|
1427
|
-
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
|
|
1428
|
-
[MCP-I] ✅ Delegation verification SUCCEEDED {
|
|
1429
|
-
tool: 'protectedTool',
|
|
1430
|
-
agentDid: 'did:key:zmock123...',
|
|
1431
|
-
delegationId: 'test-delegation-id',
|
|
1432
|
-
credentialScopes: [ 'files:write' ],
|
|
1433
|
-
requiredScopes: [ 'files:write' ]
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should create proof after successful tool execution
|
|
1437
|
-
[MCP-I] Checking tool protection: {
|
|
1438
|
-
tool: 'unprotectedTool',
|
|
1439
|
-
agentDid: 'did:key:zmock123...',
|
|
1440
|
-
hasDelegation: false
|
|
1441
|
-
}
|
|
1442
|
-
|
|
1443
|
-
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should create proof after successful tool execution
|
|
1444
|
-
[MCP-I] Tool protection check passed (no delegation required) {
|
|
1445
|
-
tool: 'unprotectedTool',
|
|
1446
|
-
agentDid: 'did:key:zmock123...',
|
|
1447
|
-
reason: 'Tool not configured to require delegation'
|
|
696
|
+
at runWithTimeout (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1602:10)
|
|
697
|
+
at runTest (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1309:12)
|
|
698
|
+
[90m at processTicksAndRejections (node:internal/process/task_queues:105:5)[39m
|
|
699
|
+
at runSuite (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1468:8)
|
|
700
|
+
at runSuite (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1468:8)
|
|
701
|
+
|
|
702
|
+
[90mstdout[2m | src/__tests__/integration/full-flow.test.ts[2m > [22m[2mFull Flow Integration[2m > [22m[2mTool protection enforcement flow[2m > [22m[2mshould allow unprotected tool calls
|
|
703
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
704
|
+
source: [32m'api'[39m,
|
|
705
|
+
toolCount: [33m1[39m,
|
|
706
|
+
protectedTools: [],
|
|
707
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
708
|
+
projectId: [32m'test-project'[39m,
|
|
709
|
+
cacheTtlMs: [33m300000[39m,
|
|
710
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:23.121Z'[39m
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
[90mstdout[2m | src/__tests__/integration/full-flow.test.ts[2m > [22m[2mFull Flow Integration[2m > [22m[2mTool protection enforcement flow[2m > [22m[2mshould intercept protected tool calls without delegation
|
|
714
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
715
|
+
source: [32m'api'[39m,
|
|
716
|
+
toolCount: [33m1[39m,
|
|
717
|
+
protectedTools: [ [32m'checkout'[39m ],
|
|
718
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
719
|
+
projectId: [32m'test-project'[39m,
|
|
720
|
+
cacheTtlMs: [33m300000[39m,
|
|
721
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:23.122Z'[39m
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
[90mstdout[2m | src/__tests__/integration/full-flow.test.ts[2m > [22m[2mFull Flow Integration[2m > [22m[2mTool protection enforcement flow[2m > [22m[2mshould intercept protected tool calls without delegation
|
|
725
|
+
[22m[39m[ToolProtectionService] Protection check {
|
|
726
|
+
tool: [32m'checkout'[39m,
|
|
727
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
728
|
+
[90mstderr[2m | src/__tests__/integration/full-flow.test.ts[2m > [22m[2mFull Flow Integration[2m > [22m[2mAgentShield integration flow[2m > [22m[2mshould use fallback config when API fails
|
|
729
|
+
found: [33mtrue[39m,
|
|
730
|
+
[22m[39m[ToolProtectionService] API fetch failed, using fallback config { agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m, error: [32m'Network error'[39m }
|
|
731
|
+
isWildcard: [33mfalse[39m,
|
|
732
|
+
requiresDelegation: [33mtrue[39m,
|
|
733
|
+
|
|
734
|
+
[90mstderr[2m | src/__tests__/integration/full-flow.test.ts[2m > [22m[2mFull Flow Integration[2m > [22m[2mError handling in full flow[2m > [22m[2mshould handle tool protection service errors gracefully
|
|
735
|
+
availableTools: [ [32m'checkout'[39m ]
|
|
736
|
+
}
|
|
737
|
+
[22m[39m[ToolProtectionService] API fetch failed, no fallback, failing closed (deny-all) {
|
|
738
|
+
|
|
739
|
+
[90mstdout[2m | src/__tests__/integration/full-flow.test.ts[2m > [22m[2mFull Flow Integration[2m > [22m[2mAgentShield integration flow[2m > [22m[2mshould fetch tool protection config from AgentShield
|
|
740
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
741
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
742
|
+
error: [32m'Network error'[39m,
|
|
743
|
+
cacheKey: [32m'config:tool-protections:test-project'[39m
|
|
744
|
+
source: [32m'api'[39m,
|
|
745
|
+
toolCount: [33m1[39m,
|
|
746
|
+
protectedTools: [ [32m'protected_tool'[39m ],
|
|
747
|
+
}
|
|
748
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
749
|
+
projectId: [32m'test-project'[39m,
|
|
750
|
+
cacheTtlMs: [33m300000[39m,
|
|
751
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:23.123Z'[39m
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
[90mstdout[2m | src/__tests__/integration/full-flow.test.ts[2m > [22m[2mFull Flow Integration[2m > [22m[2mAgentShield integration flow[2m > [22m[2mshould cache tool protection config
|
|
755
|
+
|
|
756
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
757
|
+
source: [32m'api'[39m,
|
|
758
|
+
toolCount: [33m1[39m,
|
|
759
|
+
protectedTools: [ [32m'tool1'[39m ],
|
|
760
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
761
|
+
projectId: [32m'test-project'[39m,
|
|
762
|
+
cacheTtlMs: [33m300000[39m,
|
|
763
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:23.125Z'[39m
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
[90mstdout[2m | src/__tests__/integration/full-flow.test.ts[2m > [22m[2mFull Flow Integration[2m > [22m[2mCache integration in full flow[2m > [22m[2mshould share cache across multiple service instances
|
|
767
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
768
|
+
source: [32m'api'[39m,
|
|
769
|
+
toolCount: [33m1[39m,
|
|
770
|
+
protectedTools: [ [32m'tool1'[39m ],
|
|
771
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
772
|
+
[90mstderr[2m | src/__tests__/integration/full-flow.test.ts[2m > [22m[2mFull Flow Integration[2m > [22m[2mError handling in full flow[2m > [22m[2mshould handle network timeouts
|
|
773
|
+
projectId: [32m'test-project'[39m,
|
|
774
|
+
cacheTtlMs: [33m300000[39m,
|
|
775
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:23.127Z'[39m
|
|
776
|
+
[22m[39m[ToolProtectionService] API fetch failed, using fallback config { agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m, error: [32m'Network timeout'[39m }
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
[90mstdout[2m | src/__tests__/integration/full-flow.test.ts[2m > [22m[2mFull Flow Integration[2m > [22m[2mCache integration in full flow[2m > [22m[2mshould clear cache when needed
|
|
780
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
781
|
+
source: [32m'api'[39m,
|
|
782
|
+
toolCount: [33m1[39m,
|
|
783
|
+
protectedTools: [ [32m'tool1'[39m ],
|
|
784
|
+
|
|
785
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
786
|
+
projectId: [32m'test-project'[39m,
|
|
787
|
+
cacheTtlMs: [33m300000[39m,
|
|
788
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:23.127Z'[39m
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
[90mstdout[2m | src/__tests__/integration/full-flow.test.ts[2m > [22m[2mFull Flow Integration[2m > [22m[2mCache integration in full flow[2m > [22m[2mshould clear cache when needed
|
|
792
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
793
|
+
source: [32m'api'[39m,
|
|
794
|
+
toolCount: [33m1[39m,
|
|
795
|
+
protectedTools: [ [32m'tool1'[39m ],
|
|
796
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
797
|
+
projectId: [32m'test-project'[39m,
|
|
798
|
+
cacheTtlMs: [33m300000[39m,
|
|
799
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:23.128Z'[39m
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
[90mstdout[2m | src/__tests__/integration/full-flow.test.ts[2m > [22m[2mFull Flow Integration[2m > [22m[2mReal-world e-commerce scenario[2m > [22m[2mshould handle complete e-commerce flow with tool protection
|
|
803
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
804
|
+
source: [32m'api'[39m,
|
|
805
|
+
toolCount: [33m3[39m,
|
|
806
|
+
protectedTools: [ [32m'add_to_cart'[39m, [32m'checkout'[39m ],
|
|
807
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
808
|
+
projectId: [32m'test-project'[39m,
|
|
809
|
+
cacheTtlMs: [33m300000[39m,
|
|
810
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:23.128Z'[39m
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
[90mstdout[2m | src/__tests__/integration/full-flow.test.ts[2m > [22m[2mFull Flow Integration[2m > [22m[2mReal-world e-commerce scenario[2m > [22m[2mshould handle complete e-commerce flow with tool protection
|
|
814
|
+
[22m[39m[ToolProtectionService] Protection check {
|
|
815
|
+
tool: [32m'add_to_cart'[39m,
|
|
816
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
817
|
+
found: [33mtrue[39m,
|
|
818
|
+
isWildcard: [33mfalse[39m,
|
|
819
|
+
requiresDelegation: [33mtrue[39m,
|
|
820
|
+
availableTools: [ [32m'search_products'[39m, [32m'add_to_cart'[39m, [32m'checkout'[39m ]
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
[32m✓[39m src/services/__tests__/proof-verifier.test.ts [2m([22m[2m21 tests[22m[2m)[22m[32m 14[2mms[22m[39m
|
|
824
|
+
[90mstdout[2m | src/__tests__/integration/full-flow.test.ts[2m > [22m[2mFull Flow Integration[2m > [22m[2mConcurrent operations[2m > [22m[2mshould handle concurrent cache operations
|
|
825
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
826
|
+
source: [32m'api'[39m,
|
|
827
|
+
toolCount: [33m1[39m,
|
|
828
|
+
protectedTools: [ [32m'tool1'[39m ],
|
|
829
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
830
|
+
projectId: [32m'test-project'[39m,
|
|
831
|
+
cacheTtlMs: [33m300000[39m,
|
|
832
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:23.128Z'[39m
|
|
833
|
+
}
|
|
834
|
+
[ToolProtectionService] Config loaded from API {
|
|
835
|
+
source: [32m'api'[39m,
|
|
836
|
+
toolCount: [33m1[39m,
|
|
837
|
+
protectedTools: [ [32m'tool1'[39m ],
|
|
838
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
839
|
+
projectId: [32m'test-project'[39m,
|
|
840
|
+
cacheTtlMs: [33m300000[39m,
|
|
841
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:23.129Z'[39m
|
|
842
|
+
}
|
|
843
|
+
[ToolProtectionService] Config loaded from API {
|
|
844
|
+
source: [32m'api'[39m,
|
|
845
|
+
toolCount: [33m1[39m,
|
|
846
|
+
protectedTools: [ [32m'tool1'[39m ],
|
|
847
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
848
|
+
projectId: [32m'test-project'[39m,
|
|
849
|
+
cacheTtlMs: [33m300000[39m,
|
|
850
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:23.129Z'[39m
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mprocessToolCall with tool protection[2m > [22m[2mshould allow tool execution when no protection required
|
|
854
|
+
[22m[39m[MCP-I] Checking tool protection: {
|
|
855
|
+
tool: [32m'unprotectedTool'[39m,
|
|
856
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
857
|
+
hasDelegation: [33mfalse[39m
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mprocessToolCall with tool protection[2m > [22m[2mshould allow tool execution when no protection required
|
|
861
|
+
[22m[39m[MCP-I] Tool protection check passed (no delegation required) {
|
|
862
|
+
tool: [32m'unprotectedTool'[39m,
|
|
863
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
864
|
+
reason: [32m'Tool not configured to require delegation'[39m
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
[32m✓[39m src/__tests__/integration/full-flow.test.ts [2m([22m[2m21 tests[22m[2m)[22m[32m 13[2mms[22m[39m
|
|
868
|
+
[90mstderr[2m | src/services/__tests__/storage.service.test.ts[2m > [22m[2mStorageService[2m > [22m[2mcreateStorageProviders[2m > [22m[2mshould prefer Redis over KV when both are configured
|
|
869
|
+
[22m[39m[StorageService] Failed to connect to Redis, falling back to memory: Redis package not available
|
|
870
|
+
|
|
871
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mprocessToolCall with tool protection[2m > [22m[2mshould block tool execution when protection required and no delegation
|
|
872
|
+
[22m[39m[MCP-I] Checking tool protection: {
|
|
873
|
+
tool: [32m'protectedTool'[39m,
|
|
874
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
875
|
+
hasDelegation: [33mfalse[39m
|
|
1448
876
|
}
|
|
1449
877
|
|
|
1450
|
-
|
|
1451
|
-
[MCP-I] Checking tool protection: {
|
|
1452
|
-
tool: 'protectedTool',
|
|
1453
|
-
agentDid: 'did:key:zmock123...',
|
|
1454
|
-
hasDelegation:
|
|
1455
|
-
}
|
|
1456
|
-
|
|
1457
|
-
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include tool name in error
|
|
1458
|
-
[MCP-I] Checking tool protection: {
|
|
1459
|
-
tool: 'protectedTool',
|
|
1460
|
-
agentDid: 'did:key:zmock123...',
|
|
1461
|
-
hasDelegation: false
|
|
1462
|
-
}
|
|
878
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mprocessToolCall with tool protection[2m > [22m[2mshould allow tool execution when protection required and delegation provided
|
|
879
|
+
[22m[39m[MCP-I] Checking tool protection: {
|
|
880
|
+
tool: [32m'protectedTool'[39m,
|
|
881
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
882
|
+
hasDelegation: [33mtrue[39m
|
|
883
|
+
}
|
|
1463
884
|
|
|
1464
|
-
|
|
1465
|
-
[MCP-I]
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
885
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mprocessToolCall with tool protection[2m > [22m[2mshould allow tool execution when protection required and delegation provided
|
|
886
|
+
[22m[39m[MCP-I] Tool protection check passed (delegation provided) { tool: [32m'protectedTool'[39m, agentDid: [32m'did:key:zmock123...'[39m }
|
|
887
|
+
[90mstderr[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mprocessToolCall with tool protection[2m > [22m[2mshould block tool execution when protection required and no delegation
|
|
888
|
+
|
|
889
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mprocessToolCall with tool protection[2m > [22m[2mshould allow tool execution when protection required and consentProof provided
|
|
890
|
+
[22m[39m[MCP-I] Checking tool protection: {
|
|
891
|
+
tool: [32m'protectedTool'[39m,
|
|
892
|
+
[22m[39m[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
893
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
894
|
+
tool: [32m'protectedTool'[39m,
|
|
895
|
+
hasDelegation: [33mtrue[39m
|
|
896
|
+
requiredScopes: [ [32m'files:write'[39m ],
|
|
897
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
898
|
+
resumeToken: [32m'resume_jgyjal_mi69einx'[39m,
|
|
899
|
+
consentUrl: [32m'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_jgyjal_mi69einx'[39m
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
[90mstderr[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mprocessToolCall with tool protection[2m > [22m[2mshould not create proof when tool execution is blocked
|
|
905
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mprocessToolCall with tool protection[2m > [22m[2mshould allow tool execution when protection required and consentProof provided
|
|
906
|
+
[22m[39m[MCP-I] Tool protection check passed (delegation provided) { tool: [32m'protectedTool'[39m, agentDid: [32m'did:key:zmock123...'[39m }
|
|
907
|
+
|
|
908
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mprocessToolCall with tool protection[2m > [22m[2mshould create proof after successful tool execution
|
|
909
|
+
[22m[39m[MCP-I] Checking tool protection: {
|
|
910
|
+
[22m[39m[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
911
|
+
tool: [32m'unprotectedTool'[39m,
|
|
912
|
+
tool: [32m'protectedTool'[39m,
|
|
913
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
914
|
+
hasDelegation: [33mfalse[39m
|
|
1471
915
|
}
|
|
1472
916
|
|
|
1473
|
-
|
|
1474
|
-
[MCP-I]
|
|
1475
|
-
tool: '
|
|
1476
|
-
agentDid: 'did:key:zmock123...',
|
|
1477
|
-
|
|
1478
|
-
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include required scopes in error
|
|
1479
|
-
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
917
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mprocessToolCall with tool protection[2m > [22m[2mshould create proof after successful tool execution
|
|
918
|
+
[22m[39m[MCP-I] Tool protection check passed (no delegation required) {
|
|
919
|
+
tool: [32m'unprotectedTool'[39m,
|
|
920
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
921
|
+
reason: [32m'Tool not configured to require delegation'[39m
|
|
1480
922
|
}
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
requiredScopes: [ 'files:write'
|
|
1484
|
-
agentDid: 'did:key:zmock123...',
|
|
1485
|
-
|
|
1486
|
-
|
|
923
|
+
|
|
924
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mprocessToolCall with tool protection[2m > [22m[2mshould not create proof when tool execution is blocked
|
|
925
|
+
requiredScopes: [ [32m'files:write'[39m ],
|
|
926
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
927
|
+
[22m[39m[MCP-I] Checking tool protection: {
|
|
928
|
+
tool: [32m'protectedTool'[39m,
|
|
929
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
930
|
+
resumeToken: [32m'resume_jgyjd6_mi69einz'[39m,
|
|
931
|
+
hasDelegation: [33mfalse[39m
|
|
932
|
+
consentUrl: [32m'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_jgyjd6_mi69einz'[39m
|
|
1487
933
|
}
|
|
1488
|
-
|
|
1489
|
-
✓ src/__tests__/runtime/route-interception.test.ts (21 tests) 22ms
|
|
1490
|
-
✓ src/__tests__/runtime/base.test.ts (55 tests) 20ms
|
|
1491
|
-
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include consent URL in error
|
|
1492
|
-
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include consent URL in error
|
|
1493
|
-
[MCP-I] Checking tool protection: {
|
|
1494
|
-
tool: 'protectedTool',
|
|
1495
|
-
agentDid: 'did:key:zmock123...',
|
|
1496
|
-
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
1497
|
-
hasDelegation: false
|
|
1498
934
|
}
|
|
1499
|
-
tool: 'protectedTool',
|
|
1500
|
-
requiredScopes: [ 'files:write' ],
|
|
1501
935
|
|
|
1502
|
-
|
|
1503
|
-
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include resume token in error
|
|
1504
|
-
[MCP-I] Checking tool protection: {
|
|
1505
|
-
resumeToken: 'resume_vyl76b_miev24em',
|
|
1506
|
-
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_vyl76b_miev24em'
|
|
1507
|
-
tool: 'protectedTool',
|
|
1508
|
-
agentDid: 'did:key:zmock123...',
|
|
1509
|
-
hasDelegation: false
|
|
1510
|
-
}
|
|
1511
|
-
}
|
|
936
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mDelegationRequiredError details[2m > [22m[2mshould include tool name in error
|
|
1512
937
|
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
[
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
hasDelegation: false
|
|
1521
|
-
tool: 'protectedTool',
|
|
938
|
+
[22m[39m[MCP-I] Checking tool protection: {
|
|
939
|
+
[90mstderr[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mDelegationRequiredError details[2m > [22m[2mshould include tool name in error
|
|
940
|
+
tool: [32m'protectedTool'[39m,
|
|
941
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
942
|
+
[22m[39m[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
943
|
+
hasDelegation: [33mfalse[39m
|
|
944
|
+
tool: [32m'protectedTool'[39m,
|
|
1522
945
|
}
|
|
1523
|
-
requiredScopes: [ 'files:write' ],
|
|
1524
|
-
agentDid: 'did:key:zmock123...',
|
|
1525
|
-
resumeToken: 'resume_vyl76b_miev24en',
|
|
1526
946
|
|
|
1527
|
-
|
|
1528
|
-
[MCP-I] Checking tool protection: {
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
hasDelegation: false
|
|
1533
|
-
}
|
|
947
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mDelegationRequiredError details[2m > [22m[2mshould include required scopes in error
|
|
948
|
+
[22m[39m[MCP-I] Checking tool protection: {
|
|
949
|
+
tool: [32m'protectedTool'[39m,
|
|
950
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
951
|
+
hasDelegation: [33mfalse[39m
|
|
1534
952
|
}
|
|
1535
953
|
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
requiredScopes: [ 'files:write' ],
|
|
1541
|
-
agentDid: 'did:key:zmock123...',
|
|
1542
|
-
resumeToken: 'resume_mvsnjn_miev24en',
|
|
1543
|
-
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_mvsnjn_miev24en'
|
|
954
|
+
requiredScopes: [ [32m'files:write'[39m ],
|
|
955
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
956
|
+
resumeToken: [32m'resume_jgyjd6_mi69einz'[39m,
|
|
957
|
+
consentUrl: [32m'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_jgyjd6_mi69einz'[39m
|
|
1544
958
|
}
|
|
959
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mDelegationRequiredError details[2m > [22m[2mshould include consent URL in error
|
|
960
|
+
[22m[39m[MCP-I] Checking tool protection: {
|
|
1545
961
|
|
|
1546
|
-
|
|
1547
|
-
[
|
|
1548
|
-
|
|
1549
|
-
agentDid: 'did:key:zmock123...',
|
|
1550
|
-
reason: 'Tool not configured to require delegation'
|
|
962
|
+
tool: [32m'protectedTool'[39m,
|
|
963
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
964
|
+
hasDelegation: [33mfalse[39m
|
|
1551
965
|
}
|
|
1552
966
|
|
|
1553
|
-
|
|
1554
|
-
[MCP-I]
|
|
1555
|
-
tool: 'protectedTool',
|
|
1556
|
-
|
|
1557
|
-
|
|
967
|
+
[90mstderr[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mDelegationRequiredError details[2m > [22m[2mshould include required scopes in error
|
|
968
|
+
[22m[39m[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
969
|
+
tool: [32m'protectedTool'[39m,
|
|
970
|
+
requiredScopes: [ [32m'files:write'[39m, [32m'files:read'[39m ],
|
|
971
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
972
|
+
resumeToken: [32m'resume_jgyjd6_mi69einz'[39m,
|
|
973
|
+
consentUrl: [32m'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite%2Cfiles%3Aread&session_id=session123&agent_did=&resume_token=resume_jgyjd6_mi69einz'[39m
|
|
1558
974
|
}
|
|
1559
975
|
|
|
1560
|
-
|
|
1561
|
-
[MCP-I]
|
|
1562
|
-
tool: '
|
|
1563
|
-
|
|
1564
|
-
|
|
976
|
+
[90mstderr[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mDelegationRequiredError details[2m > [22m[2mshould include consent URL in error
|
|
977
|
+
[22m[39m[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
978
|
+
tool: [32m'protectedTool'[39m,
|
|
979
|
+
requiredScopes: [ [32m'files:write'[39m ],
|
|
980
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
981
|
+
resumeToken: [32m'resume_jgyje1_mi69eio0'[39m,
|
|
982
|
+
consentUrl: [32m'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_jgyje1_mi69eio0'[39m
|
|
1565
983
|
}
|
|
1566
984
|
|
|
1567
|
-
|
|
1568
|
-
[MCP-I]
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
985
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mDelegationRequiredError details[2m > [22m[2mshould include resume token in error
|
|
986
|
+
[22m[39m[MCP-I] Checking tool protection: {
|
|
987
|
+
[90mstderr[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mDelegationRequiredError details[2m > [22m[2mshould include resume token in error
|
|
988
|
+
tool: [32m'protectedTool'[39m,
|
|
989
|
+
[22m[39m[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
990
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
991
|
+
hasDelegation: [33mfalse[39m
|
|
992
|
+
tool: [32m'protectedTool'[39m,
|
|
1572
993
|
}
|
|
1573
994
|
|
|
1574
|
-
|
|
1575
|
-
[MCP-I] Checking tool protection: {
|
|
1576
|
-
tool: '
|
|
1577
|
-
|
|
1578
|
-
|
|
995
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mDelegationRequiredError details[2m > [22m[2mshould include intercepted call context in error
|
|
996
|
+
[22m[39m[MCP-I] Checking tool protection: {
|
|
997
|
+
tool: [32m'protectedTool'[39m,
|
|
998
|
+
requiredScopes: [ [32m'files:write'[39m ],
|
|
999
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
1000
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
1001
|
+
hasDelegation: [33mfalse[39m
|
|
1579
1002
|
}
|
|
1003
|
+
resumeToken: [32m'resume_jgyje1_mi69eio0'[39m,
|
|
1580
1004
|
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
[MCP-I]
|
|
1584
|
-
tool: '
|
|
1585
|
-
[MCP-I] Checking tool protection: {
|
|
1586
|
-
requiredScopes: [],
|
|
1587
|
-
tool: 'protectedTool',
|
|
1588
|
-
agentDid: 'did:key:zmock123...',
|
|
1589
|
-
agentDid: 'did:key:zmock123...',
|
|
1590
|
-
hasDelegation: false
|
|
1591
|
-
}
|
|
1592
|
-
|
|
1593
|
-
resumeToken: 'resume_vyl781_miev24ep',
|
|
1594
|
-
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=&session_id=session123&agent_did=&resume_token=resume_vyl781_miev24ep'
|
|
1595
|
-
}
|
|
1596
|
-
|
|
1597
|
-
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle multiple required scopes
|
|
1598
|
-
[MCP-I] Checking tool protection: {
|
|
1599
|
-
tool: 'protectedTool',
|
|
1600
|
-
agentDid: 'did:key:zmock123...',
|
|
1601
|
-
hasDelegation: false
|
|
1602
|
-
}
|
|
1603
|
-
|
|
1604
|
-
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle multiple required scopes
|
|
1605
|
-
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
1606
|
-
tool: 'protectedTool',
|
|
1607
|
-
requiredScopes: [ 'scope1', 'scope2', 'scope3' ],
|
|
1608
|
-
agentDid: 'did:key:zmock123...',
|
|
1609
|
-
resumeToken: 'resume_vyl78w_miev24ep',
|
|
1610
|
-
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=scope1%2Cscope2%2Cscope3&session_id=session123&agent_did=&resume_token=resume_vyl78w_miev24ep'
|
|
1611
|
-
}
|
|
1612
|
-
|
|
1613
|
-
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle session without id
|
|
1614
|
-
[MCP-I] Checking tool protection: {
|
|
1615
|
-
tool: 'protectedTool',
|
|
1616
|
-
agentDid: 'did:key:zmock123...',
|
|
1617
|
-
hasDelegation: false
|
|
1618
|
-
}
|
|
1619
|
-
|
|
1620
|
-
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle session without id
|
|
1621
|
-
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
1622
|
-
tool: 'protectedTool',
|
|
1623
|
-
requiredScopes: [ 'files:write' ],
|
|
1624
|
-
agentDid: 'did:key:zmock123...',
|
|
1625
|
-
resumeToken: 'resume_q0gubi_miev24ep',
|
|
1626
|
-
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=&agent_did=&resume_token=resume_q0gubi_miev24ep'
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle handler errors independently of protection
|
|
1630
|
-
[MCP-I] Checking tool protection: {
|
|
1631
|
-
tool: 'errorTool',
|
|
1632
|
-
agentDid: 'did:key:zmock123...',
|
|
1633
|
-
hasDelegation: false
|
|
1634
|
-
}
|
|
1635
|
-
|
|
1636
|
-
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle handler errors independently of protection
|
|
1637
|
-
[MCP-I] Tool protection check passed (no delegation required) {
|
|
1638
|
-
tool: 'errorTool',
|
|
1639
|
-
agentDid: 'did:key:zmock123...',
|
|
1640
|
-
reason: 'Tool not configured to require delegation'
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
|
-
✓ src/__tests__/runtime/tool-protection-enforcement.test.ts (29 tests) 28ms
|
|
1644
|
-
stderr | src/services/__tests__/proof-verifier.integration.test.ts > ProofVerifier Integration - Real DID Resolution > did:web Resolution (HTTP) > should handle HTTP errors gracefully
|
|
1645
|
-
[ProofVerifier] Failed to fetch public key from DID: Error: Failed to resolve did:web:nonexistent-domain-that-does-not-exist-12345.com: fetch failed
|
|
1646
|
-
at Object.resolveDID (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/proof-verifier.integration.test.ts:143:19)
|
|
1647
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
1648
|
-
at ProofVerifier.fetchPublicKeyFromDID (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/proof-verifier.ts:348:22)
|
|
1649
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/proof-verifier.integration.test.ts:252:7
|
|
1650
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:20
|
|
1651
|
-
|
|
1652
|
-
stderr | src/services/__tests__/proof-verifier.integration.test.ts > ProofVerifier Integration - Real DID Resolution > did:web Resolution (HTTP) > should handle HTTP errors gracefully
|
|
1653
|
-
[ProofVerifier] Failed to fetch public key from DID: Error: Failed to resolve did:web:nonexistent-domain-that-does-not-exist-12345.com: fetch failed
|
|
1654
|
-
at Object.resolveDID (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/proof-verifier.integration.test.ts:143:19)
|
|
1655
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
1656
|
-
at ProofVerifier.fetchPublicKeyFromDID (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/proof-verifier.ts:348:22)
|
|
1657
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/proof-verifier.integration.test.ts:257:9
|
|
1658
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:20
|
|
1659
|
-
|
|
1660
|
-
✓ src/services/__tests__/proof-verifier.integration.test.ts (13 tests | 1 skipped) 83ms
|
|
1661
|
-
✓ src/__tests__/cache/tool-protection-cache.test.ts (49 tests) 157ms
|
|
1662
|
-
✓ src/services/__tests__/access-control.integration.test.ts (9 tests) 125ms
|
|
1663
|
-
stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > New endpoint format (toolProtections object) > should parse oauthProvider from camelCase field
|
|
1664
|
-
[ToolProtectionService] Config loaded from API {
|
|
1665
|
-
source: 'api',
|
|
1666
|
-
toolCount: 2,
|
|
1667
|
-
protectedTools: [ 'read_repos', 'send_email' ],
|
|
1668
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
1669
|
-
projectId: 'test-project-123',
|
|
1670
|
-
cacheTtlMs: 300000,
|
|
1671
|
-
cacheExpiresAt: '2025-11-25T17:44:45.849Z'
|
|
1005
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2maudit logging[2m > [22m[2mshould log tool protection check when audit enabled
|
|
1006
|
+
consentUrl: [32m'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_jgyje1_mi69eio0'[39m
|
|
1007
|
+
[22m[39m[MCP-I] Checking tool protection: {
|
|
1008
|
+
tool: [32m'testTool'[39m,
|
|
1672
1009
|
}
|
|
1673
1010
|
|
|
1674
|
-
|
|
1675
|
-
[
|
|
1676
|
-
|
|
1677
|
-
toolCount: 1,
|
|
1678
|
-
protectedTools: [ 'read_repos' ],
|
|
1679
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
1680
|
-
projectId: 'test-project-123',
|
|
1681
|
-
cacheTtlMs: 300000,
|
|
1682
|
-
cacheExpiresAt: '2025-11-25T17:44:45.852Z'
|
|
1011
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
1012
|
+
[90mstderr[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mDelegationRequiredError details[2m > [22m[2mshould include intercepted call context in error
|
|
1013
|
+
hasDelegation: [33mfalse[39m
|
|
1683
1014
|
}
|
|
1684
1015
|
|
|
1685
|
-
|
|
1686
|
-
[
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
agentDid: 'did:key:
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
cacheExpiresAt: '2025-11-25T17:44:45.852Z'
|
|
1016
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2maudit logging[2m > [22m[2mshould log tool protection check when audit enabled
|
|
1017
|
+
[22m[39m[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
1018
|
+
tool: [32m'protectedTool'[39m,
|
|
1019
|
+
[22m[39m[MCP-I] Tool protection check passed (no delegation required) {
|
|
1020
|
+
tool: [32m'testTool'[39m,
|
|
1021
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
1022
|
+
reason: [32m'Tool not configured to require delegation'[39m
|
|
1023
|
+
requiredScopes: [ [32m'files:write'[39m ],
|
|
1694
1024
|
}
|
|
1025
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
1695
1026
|
|
|
1696
|
-
|
|
1697
|
-
[
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
cacheTtlMs: 300000,
|
|
1704
|
-
cacheExpiresAt: '2025-11-25T17:44:45.853Z'
|
|
1027
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2maudit logging[2m > [22m[2mshould log blocked tool call when audit enabled
|
|
1028
|
+
[22m[39m[MCP-I] Checking tool protection: {
|
|
1029
|
+
tool: [32m'protectedTool'[39m,
|
|
1030
|
+
resumeToken: [32m'resume_zdfbcs_mi69eio0'[39m,
|
|
1031
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
1032
|
+
consentUrl: [32m'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_zdfbcs_mi69eio0'[39m
|
|
1033
|
+
hasDelegation: [33mfalse[39m
|
|
1705
1034
|
}
|
|
1706
1035
|
|
|
1707
|
-
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
|
|
1708
|
-
[ToolProtectionService] Config loaded from API {
|
|
1709
|
-
source: 'api',
|
|
1710
|
-
toolCount: 2,
|
|
1711
|
-
protectedTools: [ 'read_repos', 'send_email' ],
|
|
1712
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
1713
|
-
projectId: 'none',
|
|
1714
|
-
cacheTtlMs: 300000,
|
|
1715
|
-
cacheExpiresAt: '2025-11-25T17:44:45.853Z'
|
|
1716
1036
|
}
|
|
1037
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mtool protection service integration[2m > [22m[2mshould use agent DID from identity for protection check
|
|
1038
|
+
[22m[39m[MCP-I] Checking tool protection: {
|
|
1039
|
+
tool: [32m'testTool'[39m,
|
|
1717
1040
|
|
|
1718
|
-
|
|
1719
|
-
[
|
|
1720
|
-
source: 'api',
|
|
1721
|
-
toolCount: 1,
|
|
1722
|
-
protectedTools: [ 'read_repos' ],
|
|
1723
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
1724
|
-
projectId: 'none',
|
|
1725
|
-
cacheTtlMs: 300000,
|
|
1726
|
-
cacheExpiresAt: '2025-11-25T17:44:45.854Z'
|
|
1041
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
1042
|
+
hasDelegation: [33mfalse[39m
|
|
1727
1043
|
}
|
|
1728
1044
|
|
|
1729
|
-
|
|
1730
|
-
[
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
1735
|
-
projectId: 'none',
|
|
1736
|
-
cacheTtlMs: 300000,
|
|
1737
|
-
cacheExpiresAt: '2025-11-25T17:44:45.854Z'
|
|
1045
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mtool protection service integration[2m > [22m[2mshould use agent DID from identity for protection check
|
|
1046
|
+
[22m[39m[MCP-I] Tool protection check passed (no delegation required) {
|
|
1047
|
+
tool: [32m'testTool'[39m,
|
|
1048
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
1049
|
+
reason: [32m'Tool not configured to require delegation'[39m
|
|
1738
1050
|
}
|
|
1739
1051
|
|
|
1740
|
-
|
|
1741
|
-
[
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
1746
|
-
projectId: 'none',
|
|
1747
|
-
cacheTtlMs: 300000,
|
|
1748
|
-
cacheExpiresAt: '2025-11-25T17:44:45.854Z'
|
|
1052
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2mtool protection service integration[2m > [22m[2mshould handle tool protection service errors gracefully
|
|
1053
|
+
[22m[39m[MCP-I] Checking tool protection: {
|
|
1054
|
+
tool: [32m'testTool'[39m,
|
|
1055
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
1056
|
+
hasDelegation: [33mfalse[39m
|
|
1749
1057
|
}
|
|
1750
1058
|
|
|
1751
|
-
|
|
1752
|
-
[
|
|
1753
|
-
source: 'api',
|
|
1754
|
-
toolCount: 1,
|
|
1755
|
-
protectedTools: [ 'read_repos' ],
|
|
1756
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
1757
|
-
projectId: 'none',
|
|
1758
|
-
cacheTtlMs: 300000,
|
|
1759
|
-
cacheExpiresAt: '2025-11-25T17:44:45.854Z'
|
|
1760
|
-
}
|
|
1059
|
+
[90mstderr[2m | src/services/__tests__/storage.service.test.ts[2m > [22m[2mStorageService[2m > [22m[2mcreateStorageProviders[2m > [22m[2mshould prefer Redis over KV when both are configured
|
|
1060
|
+
[22m[39m[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/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/src/services/storage.service.ts'
|
|
1761
1061
|
|
|
1762
|
-
|
|
1763
|
-
[
|
|
1764
|
-
source: 'api',
|
|
1765
|
-
toolCount: 1,
|
|
1766
|
-
protectedTools: [ 'read_repos' ],
|
|
1767
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
1768
|
-
projectId: 'none',
|
|
1769
|
-
cacheTtlMs: 300000,
|
|
1770
|
-
cacheExpiresAt: '2025-11-25T17:44:45.855Z'
|
|
1771
|
-
}
|
|
1062
|
+
[90mstderr[2m | src/services/__tests__/storage.service.test.ts[2m > [22m[2mStorageService[2m > [22m[2mcreateStorageProviders[2m > [22m[2mshould fall back to memory when Redis connection fails
|
|
1063
|
+
[22m[39m[StorageService] Failed to connect to Redis, falling back to memory: Redis package not available
|
|
1772
1064
|
|
|
1773
|
-
|
|
1774
|
-
[
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
agentDid: 'did:key:
|
|
1779
|
-
|
|
1780
|
-
cacheTtlMs: 300000,
|
|
1781
|
-
cacheExpiresAt: '2025-11-25T17:44:45.855Z'
|
|
1065
|
+
[32m✓[39m src/__tests__/runtime/base.test.ts [2m([22m[2m55 tests[22m[2m)[22m[32m 13[2mms[22m[39m
|
|
1066
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2medge cases[2m > [22m[2mshould handle empty required scopes array
|
|
1067
|
+
[90mstderr[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2medge cases[2m > [22m[2mshould handle empty required scopes array
|
|
1068
|
+
[22m[39m[MCP-I] Checking tool protection: {
|
|
1069
|
+
tool: [32m'protectedTool'[39m,
|
|
1070
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
1071
|
+
hasDelegation: [33mfalse[39m
|
|
1782
1072
|
}
|
|
1783
1073
|
|
|
1784
|
-
|
|
1785
|
-
[
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
agentDid: 'did:key:
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1074
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2medge cases[2m > [22m[2mshould handle multiple required scopes
|
|
1075
|
+
[22m[39m[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
1076
|
+
[22m[39m[MCP-I] Checking tool protection: {
|
|
1077
|
+
tool: [32m'protectedTool'[39m,
|
|
1078
|
+
tool: [32m'protectedTool'[39m,
|
|
1079
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
1080
|
+
requiredScopes: [],
|
|
1081
|
+
hasDelegation: [33mfalse[39m
|
|
1082
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
1793
1083
|
}
|
|
1794
1084
|
|
|
1795
|
-
|
|
1796
|
-
[
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
cacheTtlMs: 300000,
|
|
1803
|
-
cacheExpiresAt: '2025-11-25T17:44:45.856Z'
|
|
1804
|
-
}
|
|
1805
|
-
|
|
1806
|
-
stderr | src/__tests__/identity/user-did-manager.test.ts > UserDidManager > error handling > should handle storage.get errors gracefully
|
|
1807
|
-
[UserDidManager] Storage.get failed, generating new DID: Error: Storage error
|
|
1808
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/__tests__/identity/user-did-manager.test.ts:187:67
|
|
1809
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
|
|
1810
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
|
|
1811
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
|
|
1812
|
-
at new Promise (<anonymous>)
|
|
1813
|
-
at runWithTimeout (file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
|
|
1814
|
-
at runTest (file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
|
|
1815
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
1816
|
-
at runSuite (file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
|
|
1817
|
-
at runSuite (file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
|
|
1818
|
-
|
|
1819
|
-
stderr | src/__tests__/identity/user-did-manager.test.ts > UserDidManager > error handling > should handle storage.set errors gracefully
|
|
1820
|
-
[UserDidManager] Storage.set failed, continuing with cached DID: Error: Storage error
|
|
1821
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/__tests__/identity/user-did-manager.test.ts:196:67
|
|
1822
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
|
|
1823
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
|
|
1824
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
|
|
1825
|
-
at new Promise (<anonymous>)
|
|
1826
|
-
at runWithTimeout (file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
|
|
1827
|
-
at runTest (file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
|
|
1828
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
1829
|
-
at runSuite (file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
|
|
1830
|
-
at runSuite (file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
|
|
1831
|
-
|
|
1832
|
-
stderr | src/__tests__/identity/user-did-manager.test.ts > UserDidManager > error handling > should handle storage.delete errors gracefully
|
|
1833
|
-
[UserDidManager] Storage.delete failed, continuing: Error: Storage error
|
|
1834
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/__tests__/identity/user-did-manager.test.ts:206:70
|
|
1835
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
1836
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:20
|
|
1837
|
-
|
|
1838
|
-
✓ src/__tests__/identity/user-did-manager.test.ts (17 tests) 9ms
|
|
1839
|
-
✓ src/__tests__/services/tool-protection-oauth-provider.test.ts (14 tests) 8ms
|
|
1840
|
-
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
|
|
1841
|
-
[ToolProtectionService] Config loaded from API {
|
|
1842
|
-
source: 'api',
|
|
1843
|
-
toolCount: 1,
|
|
1844
|
-
protectedTools: [ 'phase1_tool' ],
|
|
1845
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
1846
|
-
projectId: 'none',
|
|
1847
|
-
cacheTtlMs: 300000,
|
|
1848
|
-
cacheExpiresAt: '2025-11-25T17:44:45.862Z'
|
|
1085
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2medge cases[2m > [22m[2mshould handle session without id
|
|
1086
|
+
[22m[39m[MCP-I] Checking tool protection: {
|
|
1087
|
+
tool: [32m'protectedTool'[39m,
|
|
1088
|
+
resumeToken: [32m'resume_jgyjfr_mi69eio2'[39m,
|
|
1089
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
1090
|
+
consentUrl: [32m'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=&session_id=session123&agent_did=&resume_token=resume_jgyjfr_mi69eio2'[39m
|
|
1091
|
+
hasDelegation: [33mfalse[39m
|
|
1849
1092
|
}
|
|
1850
|
-
|
|
1851
|
-
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)
|
|
1852
|
-
[ToolProtectionService] Config loaded from API {
|
|
1853
|
-
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)
|
|
1854
|
-
source: 'api',
|
|
1855
|
-
toolCount: 1,
|
|
1856
|
-
protectedTools: [ 'old_tool' ],
|
|
1857
|
-
[ProviderResolver] Tool does not specify oauthProvider. Using first configured provider "github" as fallback. This is deprecated - configure oauthProvider in AgentShield dashboard for Phase 2+.
|
|
1858
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
1859
|
-
|
|
1860
|
-
projectId: 'none',
|
|
1861
|
-
cacheTtlMs: 300000,
|
|
1862
|
-
cacheExpiresAt: '2025-11-25T17:44:45.867Z'
|
|
1863
1093
|
}
|
|
1864
1094
|
|
|
1865
|
-
|
|
1866
|
-
[ToolProtectionService] Config loaded from API {
|
|
1867
|
-
source: 'api',
|
|
1868
|
-
toolCount: 1,
|
|
1869
|
-
protectedTools: [ 'old_tool' ],
|
|
1870
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
1871
|
-
projectId: 'none',
|
|
1872
|
-
cacheTtlMs: 300000,
|
|
1873
|
-
cacheExpiresAt: '2025-11-25T17:44:45.867Z'
|
|
1874
|
-
}
|
|
1095
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2medge cases[2m > [22m[2mshould handle handler errors independently of protection
|
|
1875
1096
|
|
|
1876
|
-
|
|
1877
|
-
[
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
cacheExpiresAt: '2025-11-25T17:44:45.867Z'
|
|
1885
|
-
}
|
|
1886
|
-
|
|
1887
|
-
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
|
|
1888
|
-
[ToolProtectionService] Config loaded from API {
|
|
1889
|
-
source: 'api',
|
|
1890
|
-
toolCount: 2,
|
|
1891
|
-
protectedTools: [ 'phase1_tool', 'phase2_tool' ],
|
|
1892
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
1893
|
-
projectId: 'test-project-123',
|
|
1894
|
-
cacheTtlMs: 300000,
|
|
1895
|
-
cacheExpiresAt: '2025-11-25T17:44:45.869Z'
|
|
1097
|
+
[22m[39m[MCP-I] Checking tool protection: {
|
|
1098
|
+
[90mstderr[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2medge cases[2m > [22m[2mshould handle multiple required scopes
|
|
1099
|
+
[22m[39m[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
1100
|
+
tool: [32m'errorTool'[39m,
|
|
1101
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
1102
|
+
tool: [32m'protectedTool'[39m,
|
|
1103
|
+
requiredScopes: [ [32m'scope1'[39m, [32m'scope2'[39m, [32m'scope3'[39m ],
|
|
1104
|
+
hasDelegation: [33mfalse[39m
|
|
1896
1105
|
}
|
|
1106
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
1897
1107
|
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
[ToolProtectionService] Config loaded from API {
|
|
1901
|
-
source: 'api',
|
|
1902
|
-
toolCount: 1,
|
|
1903
|
-
protectedTools: [],
|
|
1904
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
1905
|
-
projectId: 'test-project',
|
|
1906
|
-
cacheTtlMs: 300000,
|
|
1907
|
-
cacheExpiresAt: '2025-11-25T17:44:45.884Z'
|
|
1108
|
+
resumeToken: [32m'resume_jgyjfr_mi69eio2'[39m,
|
|
1109
|
+
consentUrl: [32m'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=scope1%2Cscope2%2Cscope3&session_id=session123&agent_did=&resume_token=resume_jgyjfr_mi69eio2'[39m
|
|
1908
1110
|
}
|
|
1111
|
+
[90mstdout[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2medge cases[2m > [22m[2mshould handle handler errors independently of protection
|
|
1112
|
+
[22m[39m[MCP-I] Tool protection check passed (no delegation required) {
|
|
1909
1113
|
|
|
1910
|
-
|
|
1911
|
-
[
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
protectedTools: [ 'checkout' ],
|
|
1915
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
1916
|
-
projectId: 'test-project',
|
|
1917
|
-
cacheTtlMs: 300000,
|
|
1918
|
-
cacheExpiresAt: '2025-11-25T17:44:45.884Z'
|
|
1114
|
+
tool: [32m'errorTool'[39m,
|
|
1115
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
1116
|
+
[90mstderr[2m | src/__tests__/runtime/tool-protection-enforcement.test.ts[2m > [22m[2mMCPIRuntimeBase - Tool Protection Enforcement[2m > [22m[2medge cases[2m > [22m[2mshould handle session without id
|
|
1117
|
+
reason: [32m'Tool not configured to require delegation'[39m
|
|
1919
1118
|
}
|
|
1920
1119
|
|
|
1921
|
-
|
|
1922
|
-
[
|
|
1923
|
-
|
|
1924
|
-
agentDid: 'did:key:
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
requiresDelegation: true,
|
|
1928
|
-
availableTools: [ 'checkout' ]
|
|
1120
|
+
[22m[39m[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
1121
|
+
tool: [32m'protectedTool'[39m,
|
|
1122
|
+
requiredScopes: [ [32m'files:write'[39m ],
|
|
1123
|
+
agentDid: [32m'did:key:zmock123...'[39m,
|
|
1124
|
+
resumeToken: [32m'resume_wj0juh_mi69eio2'[39m,
|
|
1125
|
+
consentUrl: [32m'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=&agent_did=&resume_token=resume_wj0juh_mi69eio2'[39m
|
|
1929
1126
|
}
|
|
1930
1127
|
|
|
1931
|
-
|
|
1932
|
-
[
|
|
1933
|
-
|
|
1934
|
-
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)
|
|
1935
|
-
[ProviderResolver] Tool does not specify oauthProvider. Using first configured provider "github" as fallback. This is deprecated - configure oauthProvider in AgentShield dashboard for Phase 2+.
|
|
1128
|
+
[90mstderr[2m | src/services/__tests__/access-control.integration.test.ts[2m > [22m[2mAccessControlApiService Integration[2m > [22m[2mProof Verification Flow[2m > [22m[2mshould verify proof using ProofVerifier
|
|
1129
|
+
[22m[39m[CryptoService] Key ID mismatch
|
|
1936
1130
|
|
|
1937
|
-
|
|
1938
|
-
[
|
|
1131
|
+
[90mstderr[2m | src/services/__tests__/storage.service.test.ts[2m > [22m[2mStorageService[2m > [22m[2mcreateStorageProviders[2m > [22m[2mshould use KV namespace when provided
|
|
1132
|
+
[22m[39m[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/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/src/services/storage.service.ts'
|
|
1939
1133
|
|
|
1940
|
-
|
|
1941
|
-
[
|
|
1134
|
+
[32m✓[39m src/__tests__/runtime/tool-protection-enforcement.test.ts [2m([22m[2m21 tests[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
1135
|
+
[90mstderr[2m | src/services/__tests__/proof-verifier.integration.test.ts[2m > [22m[2mProofVerifier Integration - Real DID Resolution[2m > [22m[2mdid:web Resolution (HTTP)[2m > [22m[2mshould handle HTTP errors gracefully
|
|
1136
|
+
[22m[39m[ProofVerifier] Failed to fetch public key from DID: Error: Failed to resolve did:web:nonexistent-domain-that-does-not-exist-12345.com: fetch failed
|
|
1137
|
+
at Object.resolveDID [90m(/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/__tests__/proof-verifier.integration.test.ts:143:19[90m)[39m
|
|
1138
|
+
[90m at processTicksAndRejections (node:internal/process/task_queues:105:5)[39m
|
|
1139
|
+
at ProofVerifier.fetchPublicKeyFromDID [90m(/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/proof-verifier.ts:348:22[90m)[39m
|
|
1140
|
+
at [90m/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/__tests__/proof-verifier.integration.test.ts:252:7
|
|
1141
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:753:20
|
|
1942
1142
|
|
|
1943
|
-
|
|
1944
|
-
[
|
|
1143
|
+
[90mstderr[2m | src/services/__tests__/proof-verifier.integration.test.ts[2m > [22m[2mProofVerifier Integration - Real DID Resolution[2m > [22m[2mdid:web Resolution (HTTP)[2m > [22m[2mshould handle HTTP errors gracefully
|
|
1144
|
+
[22m[39m[ProofVerifier] Failed to fetch public key from DID: Error: Failed to resolve did:web:nonexistent-domain-that-does-not-exist-12345.com: fetch failed
|
|
1145
|
+
at Object.resolveDID [90m(/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/__tests__/proof-verifier.integration.test.ts:143:19[90m)[39m
|
|
1146
|
+
[90m at processTicksAndRejections (node:internal/process/task_queues:105:5)[39m
|
|
1147
|
+
at ProofVerifier.fetchPublicKeyFromDID [90m(/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/proof-verifier.ts:348:22[90m)[39m
|
|
1148
|
+
at [90m/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/services/__tests__/proof-verifier.integration.test.ts:257:9
|
|
1149
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:753:20
|
|
1945
1150
|
|
|
1946
|
-
|
|
1947
|
-
[
|
|
1151
|
+
[32m✓[39m src/services/__tests__/storage.service.test.ts [2m([22m[2m17 tests[22m[2m)[22m[32m 18[2mms[22m[39m
|
|
1152
|
+
[32m✓[39m src/__tests__/runtime/route-interception.test.ts [2m([22m[2m21 tests[22m[2m)[22m[32m 22[2mms[22m[39m
|
|
1153
|
+
[32m✓[39m src/services/__tests__/proof-verifier.integration.test.ts [2m([22m[2m13 tests[22m[2m | [22m[33m1 skipped[39m[2m)[22m[32m 145[2mms[22m[39m
|
|
1154
|
+
[32m✓[39m src/delegation/__tests__/vc-verifier.test.ts [2m([22m[2m35 tests[22m[2m)[22m[32m 180[2mms[22m[39m
|
|
1155
|
+
[32m✓[39m src/services/__tests__/access-control.integration.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 142[2mms[22m[39m
|
|
1156
|
+
[32m✓[39m src/delegation/__tests__/vc-issuer.test.ts [2m([22m[2m21 tests[22m[2m)[22m[32m 296[2mms[22m[39m
|
|
1157
|
+
[32m✓[39m src/__tests__/providers/memory.test.ts [2m([22m[2m34 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
1158
|
+
[32m✓[39m src/__tests__/runtime/base-extensions.test.ts [2m([22m[2m38 tests[22m[2m)[22m[32m 9[2mms[22m[39m
|
|
1159
|
+
[90mstdout[2m | src/__tests__/integration.test.ts[2m > [22m[2mIntegration Tests[2m > [22m[2mFull handshake and tool execution flow[2m > [22m[2mshould complete full authentication and tool execution cycle
|
|
1160
|
+
[22m[39m[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zcnGw6TLFONgbgbrbpxmf0NTFArO0Y96o","environment":"development","userDidGeneration":"disabled"},"timestamp":1763572283427,"timestampFormatted":"2025-11-19T17:11:23.427Z"}
|
|
1948
1161
|
|
|
1949
|
-
|
|
1950
|
-
[
|
|
1162
|
+
[90mstdout[2m | src/__tests__/integration.test.ts[2m > [22m[2mIntegration Tests[2m > [22m[2mFull handshake and tool execution flow[2m > [22m[2mshould complete full authentication and tool execution cycle
|
|
1163
|
+
[22m[39m[AUDIT] {"event":"tool_executed","data":{"tool":"greetingTool","sessionId":"20eb74b9b435b9566405e1aa260019d3","timestamp":1763572283427},"timestamp":1763572283427,"timestampFormatted":"2025-11-19T17:11:23.427Z"}
|
|
1951
1164
|
|
|
1952
|
-
|
|
1953
|
-
[
|
|
1165
|
+
[90mstdout[2m | src/__tests__/integration.test.ts[2m > [22m[2mIntegration Tests[2m > [22m[2mSession expiry handling[2m > [22m[2mshould handle expired sessions correctly
|
|
1166
|
+
[22m[39m[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zHuS_IGA11RjX_pNbcoG6QmSb521ndt_v","environment":"development","userDidGeneration":"disabled"},"timestamp":1763572283430,"timestampFormatted":"2025-11-19T17:11:23.430Z"}
|
|
1954
1167
|
|
|
1955
|
-
|
|
1956
|
-
[
|
|
1957
|
-
source: 'api',
|
|
1958
|
-
toolCount: 1,
|
|
1959
|
-
protectedTools: [ 'protected_tool' ],
|
|
1960
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
1961
|
-
projectId: 'test-project',
|
|
1962
|
-
cacheTtlMs: 300000,
|
|
1963
|
-
cacheExpiresAt: '2025-11-25T17:44:45.885Z'
|
|
1964
|
-
}
|
|
1168
|
+
[90mstdout[2m | src/__tests__/integration.test.ts[2m > [22m[2mIntegration Tests[2m > [22m[2mKey rotation flow[2m > [22m[2mshould handle key rotation and maintain functionality
|
|
1169
|
+
[22m[39m[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zhHBJMsUTALzevEw4UuGSJtCuTBeJExdF","environment":"development","userDidGeneration":"disabled"},"timestamp":1763572283431,"timestampFormatted":"2025-11-19T17:11:23.431Z"}
|
|
1965
1170
|
|
|
1966
|
-
|
|
1967
|
-
[
|
|
1171
|
+
[90mstdout[2m | src/__tests__/integration.test.ts[2m > [22m[2mIntegration Tests[2m > [22m[2mKey rotation flow[2m > [22m[2mshould handle key rotation and maintain functionality
|
|
1172
|
+
[22m[39m[AUDIT] {"event":"keys_rotated","data":{"oldDid":"did:key:zhHBJMsUTALzevEw4UuGSJtCuTBeJExdF","newDid":"did:key:zV_xSuhZNDjrvR5jR4OHfAH45igrZUZp9","timestamp":1763572283431},"timestamp":1763572283431,"timestampFormatted":"2025-11-19T17:11:23.431Z"}
|
|
1968
1173
|
|
|
1969
|
-
|
|
1970
|
-
[
|
|
1174
|
+
[90mstdout[2m | src/__tests__/integration.test.ts[2m > [22m[2mIntegration Tests[2m > [22m[2mWell-known endpoints[2m > [22m[2mshould provide identity discovery endpoints
|
|
1175
|
+
[22m[39m[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zNC7rpQ0kCwtEomLKUiFX-MpICSLHe6Sc","environment":"development","userDidGeneration":"disabled"},"timestamp":1763572283432,"timestampFormatted":"2025-11-19T17:11:23.432Z"}
|
|
1971
1176
|
|
|
1972
|
-
|
|
1973
|
-
[
|
|
1177
|
+
[90mstdout[2m | src/__tests__/integration.test.ts[2m > [22m[2mIntegration Tests[2m > [22m[2mNonce replay protection[2m > [22m[2mshould prevent nonce reuse
|
|
1178
|
+
[22m[39m[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zJjqeGkbFa5DibfxTELmaqvGRBuZ0mFbz","environment":"development","userDidGeneration":"disabled"},"timestamp":1763572283432,"timestampFormatted":"2025-11-19T17:11:23.432Z"}
|
|
1974
1179
|
|
|
1975
|
-
|
|
1976
|
-
[
|
|
1977
|
-
source: 'api',
|
|
1978
|
-
toolCount: 1,
|
|
1979
|
-
protectedTools: [ 'tool1' ],
|
|
1980
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
1981
|
-
projectId: 'test-project',
|
|
1982
|
-
cacheTtlMs: 300000,
|
|
1983
|
-
cacheExpiresAt: '2025-11-25T17:44:45.886Z'
|
|
1984
|
-
}
|
|
1180
|
+
[90mstdout[2m | src/__tests__/integration.test.ts[2m > [22m[2mIntegration Tests[2m > [22m[2mError handling[2m > [22m[2mshould handle network errors gracefully
|
|
1181
|
+
[22m[39m[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zDOapt8sFZXum0kIyDgBTCb1Kd1lcR29u","environment":"development","userDidGeneration":"disabled"},"timestamp":1763572283432,"timestampFormatted":"2025-11-19T17:11:23.432Z"}
|
|
1985
1182
|
|
|
1986
|
-
|
|
1987
|
-
[
|
|
1183
|
+
[90mstdout[2m | src/__tests__/integration.test.ts[2m > [22m[2mIntegration Tests[2m > [22m[2mError handling[2m > [22m[2mshould handle malformed DID documents
|
|
1184
|
+
[22m[39m[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zDppAJU6h9EECbROVetPVmOGiLAHhC9hi","environment":"development","userDidGeneration":"disabled"},"timestamp":1763572283433,"timestampFormatted":"2025-11-19T17:11:23.433Z"}
|
|
1185
|
+
|
|
1186
|
+
[90mstdout[2m | src/__tests__/integration.test.ts[2m > [22m[2mIntegration Tests[2m > [22m[2mDebug endpoint[2m > [22m[2mshould provide debug information in development
|
|
1187
|
+
[22m[39m[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zLoPmXDVljUdQIGYmd5dlEI7PnZ3O-d9k","environment":"development","userDidGeneration":"disabled"},"timestamp":1763572283433,"timestampFormatted":"2025-11-19T17:11:23.433Z"}
|
|
1188
|
+
|
|
1189
|
+
[90mstdout[2m | src/__tests__/integration.test.ts[2m > [22m[2mIntegration Tests[2m > [22m[2mDebug endpoint[2m > [22m[2mshould be disabled in production
|
|
1190
|
+
[22m[39m[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zkS-JF2_r9t6GDkMgtFi7QgZBUS_7SmcK","environment":"development","userDidGeneration":"disabled"},"timestamp":1763572283433,"timestampFormatted":"2025-11-19T17:11:23.433Z"}
|
|
1988
1191
|
|
|
1989
|
-
|
|
1990
|
-
[
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
[ToolProtectionService] API fetch failed, using fallback config { agentDid: 'did:key:z6MkhaXgBZDv...', error: 'Network timeout' }
|
|
1998
|
-
|
|
1999
|
-
stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Cache integration in full flow > should share cache across multiple service instances
|
|
2000
|
-
[ToolProtectionService] Config loaded from API {
|
|
2001
|
-
source: 'api',
|
|
2002
|
-
toolCount: 1,
|
|
2003
|
-
protectedTools: [ 'tool1' ],
|
|
2004
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2005
|
-
projectId: 'test-project',
|
|
2006
|
-
cacheTtlMs: 300000,
|
|
2007
|
-
cacheExpiresAt: '2025-11-25T17:44:45.888Z'
|
|
2008
|
-
}
|
|
2009
|
-
|
|
2010
|
-
stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Cache integration in full flow > should clear cache when needed
|
|
2011
|
-
[ToolProtectionService] Config loaded from API {
|
|
2012
|
-
source: 'api',
|
|
2013
|
-
toolCount: 1,
|
|
2014
|
-
protectedTools: [ 'tool1' ],
|
|
2015
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2016
|
-
projectId: 'test-project',
|
|
2017
|
-
cacheTtlMs: 300000,
|
|
2018
|
-
cacheExpiresAt: '2025-11-25T17:44:45.889Z'
|
|
2019
|
-
}
|
|
2020
|
-
|
|
2021
|
-
stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Cache integration in full flow > should clear cache when needed
|
|
2022
|
-
[ToolProtectionService] Config loaded from API {
|
|
2023
|
-
source: 'api',
|
|
2024
|
-
toolCount: 1,
|
|
2025
|
-
protectedTools: [ 'tool1' ],
|
|
2026
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2027
|
-
projectId: 'test-project',
|
|
2028
|
-
cacheTtlMs: 300000,
|
|
2029
|
-
cacheExpiresAt: '2025-11-25T17:44:45.889Z'
|
|
2030
|
-
}
|
|
2031
|
-
|
|
2032
|
-
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
|
|
2033
|
-
[ToolProtectionService] Config loaded from API {
|
|
2034
|
-
source: 'api',
|
|
2035
|
-
toolCount: 3,
|
|
2036
|
-
protectedTools: [ 'add_to_cart', 'checkout' ],
|
|
2037
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2038
|
-
projectId: 'test-project',
|
|
2039
|
-
cacheTtlMs: 300000,
|
|
2040
|
-
cacheExpiresAt: '2025-11-25T17:44:45.889Z'
|
|
2041
|
-
}
|
|
2042
|
-
|
|
2043
|
-
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
|
|
2044
|
-
[ToolProtectionService] Protection check {
|
|
2045
|
-
tool: 'add_to_cart',
|
|
2046
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2047
|
-
found: true,
|
|
2048
|
-
isWildcard: false,
|
|
2049
|
-
requiresDelegation: true,
|
|
2050
|
-
availableTools: [ 'search_products', 'add_to_cart', 'checkout' ]
|
|
2051
|
-
}
|
|
2052
|
-
|
|
2053
|
-
stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Concurrent operations > should handle concurrent cache operations
|
|
2054
|
-
[ToolProtectionService] Config loaded from API {
|
|
2055
|
-
source: 'api',
|
|
2056
|
-
toolCount: 1,
|
|
2057
|
-
protectedTools: [ 'tool1' ],
|
|
2058
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2059
|
-
projectId: 'test-project',
|
|
2060
|
-
cacheTtlMs: 300000,
|
|
2061
|
-
cacheExpiresAt: '2025-11-25T17:44:45.890Z'
|
|
2062
|
-
}
|
|
2063
|
-
[ToolProtectionService] Config loaded from API {
|
|
2064
|
-
source: 'api',
|
|
2065
|
-
toolCount: 1,
|
|
2066
|
-
protectedTools: [ 'tool1' ],
|
|
2067
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2068
|
-
projectId: 'test-project',
|
|
2069
|
-
cacheTtlMs: 300000,
|
|
2070
|
-
cacheExpiresAt: '2025-11-25T17:44:45.890Z'
|
|
2071
|
-
}
|
|
2072
|
-
[ToolProtectionService] Config loaded from API {
|
|
2073
|
-
source: 'api',
|
|
2074
|
-
toolCount: 1,
|
|
2075
|
-
protectedTools: [ 'tool1' ],
|
|
2076
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2077
|
-
projectId: 'test-project',
|
|
2078
|
-
cacheTtlMs: 300000,
|
|
2079
|
-
cacheExpiresAt: '2025-11-25T17:44:45.890Z'
|
|
2080
|
-
}
|
|
2081
|
-
|
|
2082
|
-
✓ src/__tests__/services/provider-resolver-edge-cases.test.ts (19 tests | 1 skipped) 7ms
|
|
2083
|
-
✓ src/__tests__/integration/full-flow.test.ts (21 tests) 11ms
|
|
2084
|
-
✓ src/delegation/__tests__/bitstring.test.ts (30 tests) 4ms
|
|
2085
|
-
✓ src/services/__tests__/batch-delegation.service.test.ts (11 tests) 7ms
|
|
2086
|
-
✓ src/__tests__/providers/memory.test.ts (34 tests) 12ms
|
|
2087
|
-
✓ src/delegation/__tests__/cascading-revocation.test.ts (23 tests) 10ms
|
|
2088
|
-
✓ src/delegation/__tests__/delegation-graph.test.ts (28 tests) 8ms
|
|
2089
|
-
stdout | src/__tests__/integration.test.ts > Integration Tests > Full handshake and tool execution flow > should complete full authentication and tool execution cycle
|
|
2090
|
-
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zWBPHuUmENfsOTpU4_th94X32do-iRToC","environment":"development","userDidGeneration":"disabled"},"timestamp":1764092385955,"timestampFormatted":"2025-11-25T17:39:45.955Z"}
|
|
2091
|
-
|
|
2092
|
-
stdout | src/__tests__/integration.test.ts > Integration Tests > Full handshake and tool execution flow > should complete full authentication and tool execution cycle
|
|
2093
|
-
[AUDIT] {"event":"tool_executed","data":{"tool":"greetingTool","sessionId":"2a4e71b15dbcf9a5306effd2f6a4e298","timestamp":1764092385955},"timestamp":1764092385955,"timestampFormatted":"2025-11-25T17:39:45.955Z"}
|
|
2094
|
-
|
|
2095
|
-
stdout | src/__tests__/integration.test.ts > Integration Tests > Session expiry handling > should handle expired sessions correctly
|
|
2096
|
-
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zz_XlklyRJjXBI98DrFR13m2w4Qcat8w5","environment":"development","userDidGeneration":"disabled"},"timestamp":1764092385967,"timestampFormatted":"2025-11-25T17:39:45.967Z"}
|
|
2097
|
-
|
|
2098
|
-
stdout | src/__tests__/integration.test.ts > Integration Tests > Key rotation flow > should handle key rotation and maintain functionality
|
|
2099
|
-
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zJyPqsQPpGspJUIbe4G3AAerCRLvX0Ie-","environment":"development","userDidGeneration":"disabled"},"timestamp":1764092385967,"timestampFormatted":"2025-11-25T17:39:45.967Z"}
|
|
2100
|
-
|
|
2101
|
-
stdout | src/__tests__/integration.test.ts > Integration Tests > Key rotation flow > should handle key rotation and maintain functionality
|
|
2102
|
-
[AUDIT] {"event":"keys_rotated","data":{"oldDid":"did:key:zJyPqsQPpGspJUIbe4G3AAerCRLvX0Ie-","newDid":"did:key:zEbZh2-g0Lt8omynTZBTjMlq6I9FBqQkp","timestamp":1764092385967},"timestamp":1764092385967,"timestampFormatted":"2025-11-25T17:39:45.967Z"}
|
|
2103
|
-
|
|
2104
|
-
stdout | src/__tests__/integration.test.ts > Integration Tests > Well-known endpoints > should provide identity discovery endpoints
|
|
2105
|
-
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zAdMHvCNSpoCB2IB6etOHot8WdGxWo1J-","environment":"development","userDidGeneration":"disabled"},"timestamp":1764092385967,"timestampFormatted":"2025-11-25T17:39:45.967Z"}
|
|
2106
|
-
|
|
2107
|
-
stdout | src/__tests__/integration.test.ts > Integration Tests > Nonce replay protection > should prevent nonce reuse
|
|
2108
|
-
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zUtdiJWFv9uMJexUunPfayFyzWIJsLAGo","environment":"development","userDidGeneration":"disabled"},"timestamp":1764092385968,"timestampFormatted":"2025-11-25T17:39:45.968Z"}
|
|
2109
|
-
|
|
2110
|
-
stdout | src/__tests__/integration.test.ts > Integration Tests > Error handling > should handle network errors gracefully
|
|
2111
|
-
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:z9F9CmF04tN0yLKatkFCAZt_r5C28k6Gn","environment":"development","userDidGeneration":"disabled"},"timestamp":1764092385968,"timestampFormatted":"2025-11-25T17:39:45.968Z"}
|
|
2112
|
-
|
|
2113
|
-
stdout | src/__tests__/integration.test.ts > Integration Tests > Error handling > should handle malformed DID documents
|
|
2114
|
-
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zPqVpSAG3MR3USTe8fNGux1DeJWTTlIBc","environment":"development","userDidGeneration":"disabled"},"timestamp":1764092385968,"timestampFormatted":"2025-11-25T17:39:45.968Z"}
|
|
2115
|
-
|
|
2116
|
-
stdout | src/__tests__/integration.test.ts > Integration Tests > Debug endpoint > should provide debug information in development
|
|
2117
|
-
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zEeLbWdl34pLDU32yi74n7iDcqhy_o_ES","environment":"development","userDidGeneration":"disabled"},"timestamp":1764092385969,"timestampFormatted":"2025-11-25T17:39:45.969Z"}
|
|
2118
|
-
|
|
2119
|
-
stdout | src/__tests__/integration.test.ts > Integration Tests > Debug endpoint > should be disabled in production
|
|
2120
|
-
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:z6d9sazxXZN6KFvekxSb2_0MjhlgEXQ0Y","environment":"development","userDidGeneration":"disabled"},"timestamp":1764092385969,"timestampFormatted":"2025-11-25T17:39:45.969Z"}
|
|
2121
|
-
|
|
2122
|
-
✓ src/__tests__/runtime/proof-client-did.test.ts (17 tests) 23ms
|
|
2123
|
-
✓ src/__tests__/integration.test.ts (9 tests) 15ms
|
|
2124
|
-
stderr | src/config/__tests__/remote-config.spec.ts > fetchRemoteConfig > Error handling > should return null if API request fails
|
|
2125
|
-
[RemoteConfig] API returned 404: Not Found
|
|
2126
|
-
|
|
2127
|
-
stderr | src/config/__tests__/remote-config.spec.ts > fetchRemoteConfig > Error handling > should return null if API throws error
|
|
2128
|
-
[RemoteConfig] Failed to fetch config: Error: Network error
|
|
2129
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/config/__tests__/remote-config.spec.ts:170:35
|
|
2130
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
|
|
2131
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
|
|
2132
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
|
|
1192
|
+
[32m✓[39m src/__tests__/integration.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
1193
|
+
[32m✓[39m src/delegation/__tests__/bitstring.test.ts [2m([22m[2m30 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
1194
|
+
[90mstderr[2m | src/__tests__/identity/user-did-manager.test.ts[2m > [22m[2mUserDidManager[2m > [22m[2merror handling[2m > [22m[2mshould handle storage.get errors gracefully
|
|
1195
|
+
[22m[39m[UserDidManager] Storage.get failed, generating new DID: Error: Storage error
|
|
1196
|
+
at [90m/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/__tests__/identity/user-did-manager.test.ts:187:67
|
|
1197
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:157:11
|
|
1198
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:753:26
|
|
1199
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1636:20
|
|
2133
1200
|
at new Promise (<anonymous>)
|
|
2134
|
-
at runWithTimeout (file:///Users/brian/Documents
|
|
2135
|
-
at runTest (file:///Users/brian/Documents
|
|
2136
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
2137
|
-
at runSuite (file:///Users/brian/Documents
|
|
2138
|
-
at runSuite (file:///Users/brian/Documents
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
[
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
[
|
|
2145
|
-
at
|
|
2146
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
|
|
2147
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
|
|
2148
|
-
at file:///Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
|
|
1201
|
+
at runWithTimeout (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1602:10)
|
|
1202
|
+
at runTest (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1309:12)
|
|
1203
|
+
[90m at processTicksAndRejections (node:internal/process/task_queues:105:5)[39m
|
|
1204
|
+
at runSuite (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1468:8)
|
|
1205
|
+
at runSuite (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1468:8)
|
|
1206
|
+
|
|
1207
|
+
[90mstderr[2m | src/__tests__/identity/user-did-manager.test.ts[2m > [22m[2mUserDidManager[2m > [22m[2merror handling[2m > [22m[2mshould handle storage.set errors gracefully
|
|
1208
|
+
[22m[39m[UserDidManager] Storage.set failed, continuing with cached DID: Error: Storage error
|
|
1209
|
+
at [90m/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/__tests__/identity/user-did-manager.test.ts:196:67
|
|
1210
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:157:11
|
|
1211
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:753:26
|
|
1212
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1636:20
|
|
2149
1213
|
at new Promise (<anonymous>)
|
|
2150
|
-
at runWithTimeout (file:///Users/brian/Documents
|
|
2151
|
-
at runTest (file:///Users/brian/Documents
|
|
2152
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
2153
|
-
at runSuite (file:///Users/brian/Documents
|
|
2154
|
-
at runSuite (file:///Users/brian/Documents
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
[
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
[
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
[
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
[
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
[
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
}
|
|
2218
|
-
[AccessControl] 🔍 DATA OBJECT STRUCTURE (after deep clone): {
|
|
2219
|
-
correlationId: '0babed74-6504-4941-9a9e-249e91ac221b',
|
|
2220
|
-
dataKeys: [ 'accepted', 'rejected', 'outcomes' ],
|
|
2221
|
-
hasAccepted: true,
|
|
2222
|
-
hasRejected: true,
|
|
2223
|
-
hasOutcomes: true,
|
|
2224
|
-
hasErrors: false,
|
|
2225
|
-
acceptedType: 'number',
|
|
2226
|
-
acceptedValue: 1,
|
|
2227
|
-
rejectedType: 'number',
|
|
2228
|
-
rejectedValue: 0,
|
|
2229
|
-
outcomesType: 'object',
|
|
2230
|
-
outcomesValue: { success: 1, failed: 0, blocked: 0, error: 0 },
|
|
2231
|
-
errorsType: 'undefined',
|
|
2232
|
-
errorsIsArray: false,
|
|
2233
|
-
fullData: '{\n' +
|
|
2234
|
-
' "accepted": 1,\n' +
|
|
2235
|
-
' "rejected": 0,\n' +
|
|
2236
|
-
' "outcomes": {\n' +
|
|
2237
|
-
' "success": 1,\n' +
|
|
2238
|
-
' "failed": 0,\n' +
|
|
2239
|
-
' "blocked": 0,\n' +
|
|
2240
|
-
' "error": 0\n' +
|
|
2241
|
-
' }\n' +
|
|
2242
|
-
'}'
|
|
2243
|
-
}
|
|
2244
|
-
[AccessControl] 🔍 VALIDATING DATA WITH SUCCESS: {
|
|
2245
|
-
correlationId: '0babed74-6504-4941-9a9e-249e91ac221b',
|
|
2246
|
-
dataWithSuccessKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
|
|
2247
|
-
hasSuccess: true,
|
|
2248
|
-
successValue: true,
|
|
2249
|
-
hasAccepted: true,
|
|
2250
|
-
acceptedValue: 1,
|
|
2251
|
-
hasRejected: true,
|
|
2252
|
-
rejectedValue: 0,
|
|
2253
|
-
hasOutcomes: true,
|
|
2254
|
-
outcomesValue: { success: 1, failed: 0, blocked: 0, error: 0 },
|
|
2255
|
-
fullDataWithSuccess: '{\n' +
|
|
2256
|
-
' "success": true,\n' +
|
|
2257
|
-
' "accepted": 1,\n' +
|
|
2258
|
-
' "rejected": 0,\n' +
|
|
2259
|
-
' "outcomes": {\n' +
|
|
2260
|
-
' "success": 1,\n' +
|
|
2261
|
-
' "failed": 0,\n' +
|
|
2262
|
-
' "blocked": 0,\n' +
|
|
2263
|
-
' "error": 0\n' +
|
|
2264
|
-
' }\n' +
|
|
2265
|
-
'}'
|
|
2266
|
-
}
|
|
2267
|
-
|
|
2268
|
-
stderr | src/services/__tests__/access-control.proof-response-validation.test.ts > Proof Submission Response Validation > Wrapped Response Format (AgentShield API) > should validate wrapped response with errors array
|
|
2269
|
-
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
2270
|
-
correlationId: '628eaa42-5a92-426f-b451-b543bcd6738d',
|
|
2271
|
-
status: 200,
|
|
2272
|
-
statusText: undefined,
|
|
2273
|
-
headers: {},
|
|
2274
|
-
responseTextLength: 333,
|
|
2275
|
-
responseTextPreview: '{"success":true,"data":{"accepted":0,"rejected":1,"outcomes":{"success":0,"failed":1,"blocked":0,"error":0},"errors":[{"proof_index":0,"error":{"code":"validation_error","message":"Proof validation failed","details":{"reason":"invalid_signature"}}}]},"metadata":{"requestId":"test-request-id","timestamp":"2025-11-25T17:39:46.042Z"}}',
|
|
2276
|
-
fullResponseText: '{"success":true,"data":{"accepted":0,"rejected":1,"outcomes":{"success":0,"failed":1,"blocked":0,"error":0},"errors":[{"proof_index":0,"error":{"code":"validation_error","message":"Proof validation failed","details":{"reason":"invalid_signature"}}}]},"metadata":{"requestId":"test-request-id","timestamp":"2025-11-25T17:39:46.042Z"}}'
|
|
2277
|
-
}
|
|
2278
|
-
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
2279
|
-
correlationId: '628eaa42-5a92-426f-b451-b543bcd6738d',
|
|
2280
|
-
status: 200,
|
|
2281
|
-
responseDataType: 'object',
|
|
2282
|
-
responseDataKeys: [ 'success', 'data', 'metadata' ],
|
|
2283
|
-
responseData: '{\n' +
|
|
2284
|
-
' "success": true,\n' +
|
|
2285
|
-
' "data": {\n' +
|
|
2286
|
-
' "accepted": 0,\n' +
|
|
2287
|
-
' "rejected": 1,\n' +
|
|
2288
|
-
' "outcomes": {\n' +
|
|
2289
|
-
' "success": 0,\n' +
|
|
2290
|
-
' "failed": 1,\n' +
|
|
2291
|
-
' "blocked": 0,\n' +
|
|
2292
|
-
' "error": 0\n' +
|
|
2293
|
-
' },\n' +
|
|
2294
|
-
' "errors": [\n' +
|
|
2295
|
-
' {\n' +
|
|
2296
|
-
' "proof_index": 0,\n' +
|
|
2297
|
-
' "error": {\n' +
|
|
2298
|
-
' "code": "validation_error",\n' +
|
|
2299
|
-
' "message": "Proof validation failed",\n' +
|
|
2300
|
-
' "details": {\n' +
|
|
2301
|
-
' "reason": "invalid_signature"\n' +
|
|
2302
|
-
' }\n' +
|
|
2303
|
-
' }\n' +
|
|
2304
|
-
' }\n' +
|
|
2305
|
-
' ]\n' +
|
|
2306
|
-
' },\n' +
|
|
2307
|
-
' "metadata": {\n' +
|
|
2308
|
-
' "requestId": "test-request-id",\n' +
|
|
2309
|
-
' "timestamp": "2025-11-25T17:39:46.042Z"\n' +
|
|
2310
|
-
' }\n' +
|
|
2311
|
-
'}'
|
|
2312
|
-
}
|
|
2313
|
-
[AccessControl] Raw response received: {
|
|
2314
|
-
"success": true,
|
|
2315
|
-
"data": {
|
|
2316
|
-
"accepted": 0,
|
|
2317
|
-
"rejected": 1,
|
|
2318
|
-
"outcomes": {
|
|
2319
|
-
"success": 0,
|
|
2320
|
-
"failed": 1,
|
|
2321
|
-
"blocked": 0,
|
|
2322
|
-
"error": 0
|
|
2323
|
-
},
|
|
2324
|
-
"errors": [
|
|
2325
|
-
{
|
|
2326
|
-
"proof_index": 0,
|
|
2327
|
-
"error": {
|
|
2328
|
-
"code": "validation_error",
|
|
2329
|
-
"message": "Proof validation failed",
|
|
2330
|
-
"details": {
|
|
2331
|
-
"reason": "invalid_signature"
|
|
2332
|
-
}
|
|
2333
|
-
}
|
|
2334
|
-
}
|
|
2335
|
-
]
|
|
2336
|
-
},
|
|
2337
|
-
"metadata": {
|
|
2338
|
-
"requestId": "test-request-id",
|
|
2339
|
-
"timestamp": "2025-11-25T17:39:46.042Z"
|
|
2340
|
-
}
|
|
2341
|
-
}
|
|
2342
|
-
[AccessControl] 🔍 DATA OBJECT STRUCTURE (after deep clone): {
|
|
2343
|
-
correlationId: '628eaa42-5a92-426f-b451-b543bcd6738d',
|
|
2344
|
-
dataKeys: [ 'accepted', 'rejected', 'outcomes', 'errors' ],
|
|
2345
|
-
hasAccepted: true,
|
|
2346
|
-
hasRejected: true,
|
|
2347
|
-
hasOutcomes: true,
|
|
2348
|
-
hasErrors: true,
|
|
2349
|
-
acceptedType: 'number',
|
|
2350
|
-
acceptedValue: 0,
|
|
2351
|
-
rejectedType: 'number',
|
|
2352
|
-
rejectedValue: 1,
|
|
2353
|
-
outcomesType: 'object',
|
|
2354
|
-
outcomesValue: { success: 0, failed: 1, blocked: 0, error: 0 },
|
|
2355
|
-
errorsType: 'object',
|
|
2356
|
-
errorsIsArray: true,
|
|
2357
|
-
fullData: '{\n' +
|
|
2358
|
-
' "accepted": 0,\n' +
|
|
2359
|
-
' "rejected": 1,\n' +
|
|
2360
|
-
' "outcomes": {\n' +
|
|
2361
|
-
' "success": 0,\n' +
|
|
2362
|
-
' "failed": 1,\n' +
|
|
2363
|
-
' "blocked": 0,\n' +
|
|
2364
|
-
' "error": 0\n' +
|
|
2365
|
-
' },\n' +
|
|
2366
|
-
' "errors": [\n' +
|
|
2367
|
-
' {\n' +
|
|
2368
|
-
' "proof_index": 0,\n' +
|
|
2369
|
-
' "error": {\n' +
|
|
2370
|
-
' "code": "validation_error",\n' +
|
|
2371
|
-
' "message": "Proof validation failed",\n' +
|
|
2372
|
-
' "details": {\n' +
|
|
2373
|
-
' "reason": "invalid_signature"\n' +
|
|
2374
|
-
' }\n' +
|
|
2375
|
-
' }\n' +
|
|
2376
|
-
' }\n' +
|
|
2377
|
-
' ]\n' +
|
|
2378
|
-
'}'
|
|
2379
|
-
}
|
|
2380
|
-
[AccessControl] 🔍 VALIDATING DATA WITH SUCCESS: {
|
|
2381
|
-
correlationId: '628eaa42-5a92-426f-b451-b543bcd6738d',
|
|
2382
|
-
dataWithSuccessKeys: [ 'success', 'accepted', 'rejected', 'outcomes', 'errors' ],
|
|
2383
|
-
hasSuccess: true,
|
|
2384
|
-
successValue: true,
|
|
2385
|
-
hasAccepted: true,
|
|
2386
|
-
acceptedValue: 0,
|
|
2387
|
-
hasRejected: true,
|
|
2388
|
-
rejectedValue: 1,
|
|
2389
|
-
hasOutcomes: true,
|
|
2390
|
-
outcomesValue: { success: 0, failed: 1, blocked: 0, error: 0 },
|
|
2391
|
-
fullDataWithSuccess: '{\n' +
|
|
2392
|
-
' "success": true,\n' +
|
|
2393
|
-
' "accepted": 0,\n' +
|
|
2394
|
-
' "rejected": 1,\n' +
|
|
2395
|
-
' "outcomes": {\n' +
|
|
2396
|
-
' "success": 0,\n' +
|
|
2397
|
-
' "failed": 1,\n' +
|
|
2398
|
-
' "blocked": 0,\n' +
|
|
2399
|
-
' "error": 0\n' +
|
|
2400
|
-
' },\n' +
|
|
2401
|
-
' "errors": [\n' +
|
|
2402
|
-
' {\n' +
|
|
2403
|
-
' "proof_index": 0,\n' +
|
|
2404
|
-
' "error": {\n' +
|
|
2405
|
-
' "code": "validation_error",\n' +
|
|
2406
|
-
' "message": "Proof validation failed",\n' +
|
|
2407
|
-
' "details": {\n' +
|
|
2408
|
-
' "reason": "invalid_signature"\n' +
|
|
2409
|
-
' }\n' +
|
|
2410
|
-
' }\n' +
|
|
2411
|
-
' }\n' +
|
|
2412
|
-
' ]\n' +
|
|
2413
|
-
'}'
|
|
2414
|
-
}
|
|
2415
|
-
|
|
2416
|
-
stderr | src/services/__tests__/access-control.proof-response-validation.test.ts > Proof Submission Response Validation > Wrapped Response Format (AgentShield API) > should validate wrapped response without outcomes (optional field)
|
|
2417
|
-
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
2418
|
-
correlationId: 'e3cd82c2-c1fa-4b94-bbfe-a3d09082e94b',
|
|
2419
|
-
status: 200,
|
|
2420
|
-
statusText: undefined,
|
|
2421
|
-
headers: {},
|
|
2422
|
-
responseTextLength: 133,
|
|
2423
|
-
responseTextPreview: '{"success":true,"data":{"accepted":1,"rejected":0},"metadata":{"requestId":"test-request-id","timestamp":"2025-11-25T17:39:46.043Z"}}',
|
|
2424
|
-
fullResponseText: '{"success":true,"data":{"accepted":1,"rejected":0},"metadata":{"requestId":"test-request-id","timestamp":"2025-11-25T17:39:46.043Z"}}'
|
|
2425
|
-
}
|
|
2426
|
-
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
2427
|
-
correlationId: 'e3cd82c2-c1fa-4b94-bbfe-a3d09082e94b',
|
|
2428
|
-
status: 200,
|
|
2429
|
-
responseDataType: 'object',
|
|
2430
|
-
responseDataKeys: [ 'success', 'data', 'metadata' ],
|
|
2431
|
-
responseData: '{\n' +
|
|
2432
|
-
' "success": true,\n' +
|
|
2433
|
-
' "data": {\n' +
|
|
2434
|
-
' "accepted": 1,\n' +
|
|
2435
|
-
' "rejected": 0\n' +
|
|
2436
|
-
' },\n' +
|
|
2437
|
-
' "metadata": {\n' +
|
|
2438
|
-
' "requestId": "test-request-id",\n' +
|
|
2439
|
-
' "timestamp": "2025-11-25T17:39:46.043Z"\n' +
|
|
2440
|
-
' }\n' +
|
|
2441
|
-
'}'
|
|
2442
|
-
}
|
|
2443
|
-
[AccessControl] Raw response received: {
|
|
2444
|
-
"success": true,
|
|
2445
|
-
"data": {
|
|
2446
|
-
"accepted": 1,
|
|
2447
|
-
"rejected": 0
|
|
2448
|
-
},
|
|
2449
|
-
"metadata": {
|
|
2450
|
-
"requestId": "test-request-id",
|
|
2451
|
-
"timestamp": "2025-11-25T17:39:46.043Z"
|
|
2452
|
-
}
|
|
2453
|
-
}
|
|
2454
|
-
[AccessControl] 🔍 DATA OBJECT STRUCTURE (after deep clone): {
|
|
2455
|
-
correlationId: 'e3cd82c2-c1fa-4b94-bbfe-a3d09082e94b',
|
|
2456
|
-
dataKeys: [ 'accepted', 'rejected' ],
|
|
2457
|
-
hasAccepted: true,
|
|
2458
|
-
hasRejected: true,
|
|
2459
|
-
hasOutcomes: false,
|
|
2460
|
-
hasErrors: false,
|
|
2461
|
-
acceptedType: 'number',
|
|
2462
|
-
acceptedValue: 1,
|
|
2463
|
-
rejectedType: 'number',
|
|
2464
|
-
rejectedValue: 0,
|
|
2465
|
-
outcomesType: 'undefined',
|
|
2466
|
-
outcomesValue: undefined,
|
|
2467
|
-
errorsType: 'undefined',
|
|
2468
|
-
errorsIsArray: false,
|
|
2469
|
-
fullData: '{\n "accepted": 1,\n "rejected": 0\n}'
|
|
2470
|
-
}
|
|
2471
|
-
[AccessControl] 🔍 VALIDATING DATA WITH SUCCESS: {
|
|
2472
|
-
correlationId: 'e3cd82c2-c1fa-4b94-bbfe-a3d09082e94b',
|
|
2473
|
-
dataWithSuccessKeys: [ 'success', 'accepted', 'rejected' ],
|
|
2474
|
-
hasSuccess: true,
|
|
2475
|
-
successValue: true,
|
|
2476
|
-
hasAccepted: true,
|
|
2477
|
-
acceptedValue: 1,
|
|
2478
|
-
hasRejected: true,
|
|
2479
|
-
rejectedValue: 0,
|
|
2480
|
-
hasOutcomes: false,
|
|
2481
|
-
outcomesValue: undefined,
|
|
2482
|
-
fullDataWithSuccess: '{\n "success": true,\n "accepted": 1,\n "rejected": 0\n}'
|
|
2483
|
-
}
|
|
2484
|
-
|
|
2485
|
-
stderr | src/services/__tests__/access-control.proof-response-validation.test.ts > Proof Submission Response Validation > Wrapped Response Format (AgentShield API) > should throw validation error if data object missing success field
|
|
2486
|
-
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
2487
|
-
correlationId: 'f0fbd4cd-9696-489a-864e-ff4c96cf7483',
|
|
2488
|
-
status: 200,
|
|
2489
|
-
statusText: undefined,
|
|
2490
|
-
headers: {},
|
|
2491
|
-
responseTextLength: 191,
|
|
2492
|
-
responseTextPreview: '{"success":true,"data":{"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}},"metadata":{"requestId":"test-request-id","timestamp":"2025-11-25T17:39:46.043Z"}}',
|
|
2493
|
-
fullResponseText: '{"success":true,"data":{"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}},"metadata":{"requestId":"test-request-id","timestamp":"2025-11-25T17:39:46.043Z"}}'
|
|
2494
|
-
}
|
|
2495
|
-
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
2496
|
-
correlationId: 'f0fbd4cd-9696-489a-864e-ff4c96cf7483',
|
|
2497
|
-
status: 200,
|
|
2498
|
-
responseDataType: 'object',
|
|
2499
|
-
responseDataKeys: [ 'success', 'data', 'metadata' ],
|
|
2500
|
-
responseData: '{\n' +
|
|
2501
|
-
' "success": true,\n' +
|
|
2502
|
-
' "data": {\n' +
|
|
2503
|
-
' "accepted": 1,\n' +
|
|
2504
|
-
' "rejected": 0,\n' +
|
|
2505
|
-
' "outcomes": {\n' +
|
|
2506
|
-
' "success": 1,\n' +
|
|
2507
|
-
' "failed": 0,\n' +
|
|
2508
|
-
' "blocked": 0,\n' +
|
|
2509
|
-
' "error": 0\n' +
|
|
2510
|
-
' }\n' +
|
|
2511
|
-
' },\n' +
|
|
2512
|
-
' "metadata": {\n' +
|
|
2513
|
-
' "requestId": "test-request-id",\n' +
|
|
2514
|
-
' "timestamp": "2025-11-25T17:39:46.043Z"\n' +
|
|
2515
|
-
' }\n' +
|
|
2516
|
-
'}'
|
|
2517
|
-
}
|
|
2518
|
-
[AccessControl] Raw response received: {
|
|
2519
|
-
"success": true,
|
|
2520
|
-
"data": {
|
|
2521
|
-
"accepted": 1,
|
|
2522
|
-
"rejected": 0,
|
|
2523
|
-
"outcomes": {
|
|
2524
|
-
"success": 1,
|
|
2525
|
-
"failed": 0,
|
|
2526
|
-
"blocked": 0,
|
|
2527
|
-
"error": 0
|
|
2528
|
-
}
|
|
2529
|
-
},
|
|
2530
|
-
"metadata": {
|
|
2531
|
-
"requestId": "test-request-id",
|
|
2532
|
-
"timestamp": "2025-11-25T17:39:46.043Z"
|
|
2533
|
-
}
|
|
2534
|
-
}
|
|
2535
|
-
[AccessControl] 🔍 DATA OBJECT STRUCTURE (after deep clone): {
|
|
2536
|
-
correlationId: 'f0fbd4cd-9696-489a-864e-ff4c96cf7483',
|
|
2537
|
-
dataKeys: [ 'accepted', 'rejected', 'outcomes' ],
|
|
2538
|
-
hasAccepted: true,
|
|
2539
|
-
hasRejected: true,
|
|
2540
|
-
hasOutcomes: true,
|
|
2541
|
-
hasErrors: false,
|
|
2542
|
-
acceptedType: 'number',
|
|
2543
|
-
acceptedValue: 1,
|
|
2544
|
-
rejectedType: 'number',
|
|
2545
|
-
rejectedValue: 0,
|
|
2546
|
-
outcomesType: 'object',
|
|
2547
|
-
outcomesValue: { success: 1, failed: 0, blocked: 0, error: 0 },
|
|
2548
|
-
errorsType: 'undefined',
|
|
2549
|
-
errorsIsArray: false,
|
|
2550
|
-
fullData: '{\n' +
|
|
2551
|
-
' "accepted": 1,\n' +
|
|
2552
|
-
' "rejected": 0,\n' +
|
|
2553
|
-
' "outcomes": {\n' +
|
|
2554
|
-
' "success": 1,\n' +
|
|
2555
|
-
' "failed": 0,\n' +
|
|
2556
|
-
' "blocked": 0,\n' +
|
|
2557
|
-
' "error": 0\n' +
|
|
2558
|
-
' }\n' +
|
|
2559
|
-
'}'
|
|
2560
|
-
}
|
|
2561
|
-
[AccessControl] 🔍 VALIDATING DATA WITH SUCCESS: {
|
|
2562
|
-
correlationId: 'f0fbd4cd-9696-489a-864e-ff4c96cf7483',
|
|
2563
|
-
dataWithSuccessKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
|
|
2564
|
-
hasSuccess: true,
|
|
2565
|
-
successValue: true,
|
|
2566
|
-
hasAccepted: true,
|
|
2567
|
-
acceptedValue: 1,
|
|
2568
|
-
hasRejected: true,
|
|
2569
|
-
rejectedValue: 0,
|
|
2570
|
-
hasOutcomes: true,
|
|
2571
|
-
outcomesValue: { success: 1, failed: 0, blocked: 0, error: 0 },
|
|
2572
|
-
fullDataWithSuccess: '{\n' +
|
|
2573
|
-
' "success": true,\n' +
|
|
2574
|
-
' "accepted": 1,\n' +
|
|
2575
|
-
' "rejected": 0,\n' +
|
|
2576
|
-
' "outcomes": {\n' +
|
|
2577
|
-
' "success": 1,\n' +
|
|
2578
|
-
' "failed": 0,\n' +
|
|
2579
|
-
' "blocked": 0,\n' +
|
|
2580
|
-
' "error": 0\n' +
|
|
2581
|
-
' }\n' +
|
|
2582
|
-
'}'
|
|
2583
|
-
}
|
|
2584
|
-
|
|
2585
|
-
stderr | src/services/__tests__/access-control.proof-response-validation.test.ts > Proof Submission Response Validation > JSON Deep Clone Fix (Cloudflare Workers Edge Case) > should correctly extract data from wrapped response after JSON deep clone
|
|
2586
|
-
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
2587
|
-
correlationId: 'b6273eca-5c1a-4b87-9aee-e26973fe4d84',
|
|
2588
|
-
status: 200,
|
|
2589
|
-
statusText: undefined,
|
|
2590
|
-
headers: {},
|
|
2591
|
-
responseTextLength: 191,
|
|
2592
|
-
responseTextPreview: '{"success":true,"data":{"accepted":1,"rejected":0,"outcomes":{"success":1},"errors":[]},"metadata":{"requestId":"fc1fa88f-9b22-4161-b4fd-17d8215098ee","timestamp":"2025-11-24T21:36:33.029Z"}}',
|
|
2593
|
-
fullResponseText: '{"success":true,"data":{"accepted":1,"rejected":0,"outcomes":{"success":1},"errors":[]},"metadata":{"requestId":"fc1fa88f-9b22-4161-b4fd-17d8215098ee","timestamp":"2025-11-24T21:36:33.029Z"}}'
|
|
2594
|
-
}
|
|
2595
|
-
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
2596
|
-
correlationId: 'b6273eca-5c1a-4b87-9aee-e26973fe4d84',
|
|
2597
|
-
status: 200,
|
|
2598
|
-
responseDataType: 'object',
|
|
2599
|
-
responseDataKeys: [ 'success', 'data', 'metadata' ],
|
|
2600
|
-
responseData: '{\n' +
|
|
2601
|
-
' "success": true,\n' +
|
|
2602
|
-
' "data": {\n' +
|
|
2603
|
-
' "accepted": 1,\n' +
|
|
2604
|
-
' "rejected": 0,\n' +
|
|
2605
|
-
' "outcomes": {\n' +
|
|
2606
|
-
' "success": 1\n' +
|
|
2607
|
-
' },\n' +
|
|
2608
|
-
' "errors": []\n' +
|
|
2609
|
-
' },\n' +
|
|
2610
|
-
' "metadata": {\n' +
|
|
2611
|
-
' "requestId": "fc1fa88f-9b22-4161-b4fd-17d8215098ee",\n' +
|
|
2612
|
-
' "timestamp": "2025-11-24T21:36:33.029Z"\n' +
|
|
2613
|
-
' }\n' +
|
|
2614
|
-
'}'
|
|
2615
|
-
}
|
|
2616
|
-
[AccessControl] Raw response received: {
|
|
2617
|
-
"success": true,
|
|
2618
|
-
"data": {
|
|
2619
|
-
"accepted": 1,
|
|
2620
|
-
"rejected": 0,
|
|
2621
|
-
"outcomes": {
|
|
2622
|
-
"success": 1
|
|
2623
|
-
},
|
|
2624
|
-
"errors": []
|
|
2625
|
-
},
|
|
2626
|
-
"metadata": {
|
|
2627
|
-
"requestId": "fc1fa88f-9b22-4161-b4fd-17d8215098ee",
|
|
2628
|
-
"timestamp": "2025-11-24T21:36:33.029Z"
|
|
2629
|
-
}
|
|
2630
|
-
}
|
|
2631
|
-
[AccessControl] 🔍 DATA OBJECT STRUCTURE (after deep clone): {
|
|
2632
|
-
correlationId: 'b6273eca-5c1a-4b87-9aee-e26973fe4d84',
|
|
2633
|
-
dataKeys: [ 'accepted', 'rejected', 'outcomes', 'errors' ],
|
|
2634
|
-
hasAccepted: true,
|
|
2635
|
-
hasRejected: true,
|
|
2636
|
-
hasOutcomes: true,
|
|
2637
|
-
hasErrors: true,
|
|
2638
|
-
acceptedType: 'number',
|
|
2639
|
-
acceptedValue: 1,
|
|
2640
|
-
rejectedType: 'number',
|
|
2641
|
-
rejectedValue: 0,
|
|
2642
|
-
outcomesType: 'object',
|
|
2643
|
-
outcomesValue: { success: 1 },
|
|
2644
|
-
errorsType: 'object',
|
|
2645
|
-
errorsIsArray: true,
|
|
2646
|
-
fullData: '{\n' +
|
|
2647
|
-
' "accepted": 1,\n' +
|
|
2648
|
-
' "rejected": 0,\n' +
|
|
2649
|
-
' "outcomes": {\n' +
|
|
2650
|
-
' "success": 1\n' +
|
|
2651
|
-
' },\n' +
|
|
2652
|
-
' "errors": []\n' +
|
|
2653
|
-
'}'
|
|
2654
|
-
}
|
|
2655
|
-
[AccessControl] 🔍 VALIDATING DATA WITH SUCCESS: {
|
|
2656
|
-
correlationId: 'b6273eca-5c1a-4b87-9aee-e26973fe4d84',
|
|
2657
|
-
dataWithSuccessKeys: [ 'success', 'accepted', 'rejected', 'outcomes', 'errors' ],
|
|
2658
|
-
hasSuccess: true,
|
|
2659
|
-
successValue: true,
|
|
2660
|
-
hasAccepted: true,
|
|
2661
|
-
acceptedValue: 1,
|
|
2662
|
-
hasRejected: true,
|
|
2663
|
-
rejectedValue: 0,
|
|
2664
|
-
hasOutcomes: true,
|
|
2665
|
-
outcomesValue: { success: 1 },
|
|
2666
|
-
fullDataWithSuccess: '{\n' +
|
|
2667
|
-
' "success": true,\n' +
|
|
2668
|
-
' "accepted": 1,\n' +
|
|
2669
|
-
' "rejected": 0,\n' +
|
|
2670
|
-
' "outcomes": {\n' +
|
|
2671
|
-
' "success": 1\n' +
|
|
2672
|
-
' },\n' +
|
|
2673
|
-
' "errors": []\n' +
|
|
2674
|
-
'}'
|
|
2675
|
-
}
|
|
2676
|
-
|
|
2677
|
-
stderr | src/services/__tests__/access-control.proof-response-validation.test.ts > Proof Submission Response Validation > JSON Deep Clone Fix (Cloudflare Workers Edge Case) > should handle response where data fields are numeric values (not undefined)
|
|
2678
|
-
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
2679
|
-
correlationId: '0c3f59bb-3f55-4148-9595-9da9e3662015',
|
|
2680
|
-
status: 200,
|
|
2681
|
-
statusText: undefined,
|
|
2682
|
-
headers: {},
|
|
2683
|
-
responseTextLength: 151,
|
|
2684
|
-
responseTextPreview: '{"success":true,"data":{"accepted":0,"rejected":0,"outcomes":{},"errors":[]},"metadata":{"requestId":"test-id","timestamp":"2025-11-25T17:39:46.046Z"}}',
|
|
2685
|
-
fullResponseText: '{"success":true,"data":{"accepted":0,"rejected":0,"outcomes":{},"errors":[]},"metadata":{"requestId":"test-id","timestamp":"2025-11-25T17:39:46.046Z"}}'
|
|
2686
|
-
}
|
|
2687
|
-
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
2688
|
-
correlationId: '0c3f59bb-3f55-4148-9595-9da9e3662015',
|
|
2689
|
-
status: 200,
|
|
2690
|
-
responseDataType: 'object',
|
|
2691
|
-
responseDataKeys: [ 'success', 'data', 'metadata' ],
|
|
2692
|
-
responseData: '{\n' +
|
|
2693
|
-
' "success": true,\n' +
|
|
2694
|
-
' "data": {\n' +
|
|
2695
|
-
' "accepted": 0,\n' +
|
|
2696
|
-
' "rejected": 0,\n' +
|
|
2697
|
-
' "outcomes": {},\n' +
|
|
2698
|
-
' "errors": []\n' +
|
|
2699
|
-
' },\n' +
|
|
2700
|
-
' "metadata": {\n' +
|
|
2701
|
-
' "requestId": "test-id",\n' +
|
|
2702
|
-
' "timestamp": "2025-11-25T17:39:46.046Z"\n' +
|
|
2703
|
-
' }\n' +
|
|
2704
|
-
'}'
|
|
2705
|
-
}
|
|
2706
|
-
[AccessControl] Raw response received: {
|
|
2707
|
-
"success": true,
|
|
2708
|
-
"data": {
|
|
2709
|
-
"accepted": 0,
|
|
2710
|
-
"rejected": 0,
|
|
2711
|
-
"outcomes": {},
|
|
2712
|
-
"errors": []
|
|
2713
|
-
},
|
|
2714
|
-
"metadata": {
|
|
2715
|
-
"requestId": "test-id",
|
|
2716
|
-
"timestamp": "2025-11-25T17:39:46.046Z"
|
|
2717
|
-
}
|
|
2718
|
-
}
|
|
2719
|
-
[AccessControl] 🔍 DATA OBJECT STRUCTURE (after deep clone): {
|
|
2720
|
-
correlationId: '0c3f59bb-3f55-4148-9595-9da9e3662015',
|
|
2721
|
-
dataKeys: [ 'accepted', 'rejected', 'outcomes', 'errors' ],
|
|
2722
|
-
hasAccepted: true,
|
|
2723
|
-
hasRejected: true,
|
|
2724
|
-
hasOutcomes: true,
|
|
2725
|
-
hasErrors: true,
|
|
2726
|
-
acceptedType: 'number',
|
|
2727
|
-
acceptedValue: 0,
|
|
2728
|
-
rejectedType: 'number',
|
|
2729
|
-
rejectedValue: 0,
|
|
2730
|
-
outcomesType: 'object',
|
|
2731
|
-
outcomesValue: {},
|
|
2732
|
-
errorsType: 'object',
|
|
2733
|
-
errorsIsArray: true,
|
|
2734
|
-
fullData: '{\n "accepted": 0,\n "rejected": 0,\n "outcomes": {},\n "errors": []\n}'
|
|
2735
|
-
}
|
|
2736
|
-
[AccessControl] 🔍 VALIDATING DATA WITH SUCCESS: {
|
|
2737
|
-
correlationId: '0c3f59bb-3f55-4148-9595-9da9e3662015',
|
|
2738
|
-
dataWithSuccessKeys: [ 'success', 'accepted', 'rejected', 'outcomes', 'errors' ],
|
|
2739
|
-
hasSuccess: true,
|
|
2740
|
-
successValue: true,
|
|
2741
|
-
hasAccepted: true,
|
|
2742
|
-
acceptedValue: 0,
|
|
2743
|
-
hasRejected: true,
|
|
2744
|
-
rejectedValue: 0,
|
|
2745
|
-
hasOutcomes: true,
|
|
2746
|
-
outcomesValue: {},
|
|
2747
|
-
fullDataWithSuccess: '{\n' +
|
|
2748
|
-
' "success": true,\n' +
|
|
2749
|
-
' "accepted": 0,\n' +
|
|
2750
|
-
' "rejected": 0,\n' +
|
|
2751
|
-
' "outcomes": {},\n' +
|
|
2752
|
-
' "errors": []\n' +
|
|
2753
|
-
'}'
|
|
2754
|
-
}
|
|
2755
|
-
|
|
2756
|
-
stderr | src/services/__tests__/access-control.proof-response-validation.test.ts > Proof Submission Response Validation > JSON Deep Clone Fix (Cloudflare Workers Edge Case) > should handle response with nested outcomes object
|
|
2757
|
-
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
2758
|
-
correlationId: 'e62eaa44-bfba-42af-8ce8-4937624a7ae8',
|
|
2759
|
-
status: 200,
|
|
2760
|
-
statusText: undefined,
|
|
2761
|
-
headers: {},
|
|
2762
|
-
responseTextLength: 278,
|
|
2763
|
-
responseTextPreview: '{"success":true,"data":{"accepted":3,"rejected":2,"outcomes":{"success":1,"failed":1,"blocked":1,"error":2},"errors":[{"proof_index":0,"error":{"code":"validation_error","message":"Invalid signature"}}]},"metadata":{"requestId":"test-id","timestamp":"2025-11-25T17:39:46.046Z"}}',
|
|
2764
|
-
fullResponseText: '{"success":true,"data":{"accepted":3,"rejected":2,"outcomes":{"success":1,"failed":1,"blocked":1,"error":2},"errors":[{"proof_index":0,"error":{"code":"validation_error","message":"Invalid signature"}}]},"metadata":{"requestId":"test-id","timestamp":"2025-11-25T17:39:46.046Z"}}'
|
|
2765
|
-
}
|
|
2766
|
-
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
2767
|
-
correlationId: 'e62eaa44-bfba-42af-8ce8-4937624a7ae8',
|
|
2768
|
-
status: 200,
|
|
2769
|
-
responseDataType: 'object',
|
|
2770
|
-
responseDataKeys: [ 'success', 'data', 'metadata' ],
|
|
2771
|
-
responseData: '{\n' +
|
|
2772
|
-
' "success": true,\n' +
|
|
2773
|
-
' "data": {\n' +
|
|
2774
|
-
' "accepted": 3,\n' +
|
|
2775
|
-
' "rejected": 2,\n' +
|
|
2776
|
-
' "outcomes": {\n' +
|
|
2777
|
-
' "success": 1,\n' +
|
|
2778
|
-
' "failed": 1,\n' +
|
|
2779
|
-
' "blocked": 1,\n' +
|
|
2780
|
-
' "error": 2\n' +
|
|
2781
|
-
' },\n' +
|
|
2782
|
-
' "errors": [\n' +
|
|
2783
|
-
' {\n' +
|
|
2784
|
-
' "proof_index": 0,\n' +
|
|
2785
|
-
' "error": {\n' +
|
|
2786
|
-
' "code": "validation_error",\n' +
|
|
2787
|
-
' "message": "Invalid signature"\n' +
|
|
2788
|
-
' }\n' +
|
|
2789
|
-
' }\n' +
|
|
2790
|
-
' ]\n' +
|
|
2791
|
-
' },\n' +
|
|
2792
|
-
' "metadata": {\n' +
|
|
2793
|
-
' "requestId": "test-id",\n' +
|
|
2794
|
-
' "timestamp": "2025-11-25T17:39:46.046Z"\n' +
|
|
2795
|
-
' }\n' +
|
|
2796
|
-
'}'
|
|
2797
|
-
}
|
|
2798
|
-
[AccessControl] Raw response received: {
|
|
2799
|
-
"success": true,
|
|
2800
|
-
"data": {
|
|
2801
|
-
"accepted": 3,
|
|
2802
|
-
"rejected": 2,
|
|
2803
|
-
"outcomes": {
|
|
2804
|
-
"success": 1,
|
|
2805
|
-
"failed": 1,
|
|
2806
|
-
"blocked": 1,
|
|
2807
|
-
"error": 2
|
|
2808
|
-
},
|
|
2809
|
-
"errors": [
|
|
2810
|
-
{
|
|
2811
|
-
"proof_index": 0,
|
|
2812
|
-
"error": {
|
|
2813
|
-
"code": "validation_error",
|
|
2814
|
-
"message": "Invalid signature"
|
|
2815
|
-
}
|
|
2816
|
-
}
|
|
2817
|
-
]
|
|
2818
|
-
},
|
|
2819
|
-
"metadata": {
|
|
2820
|
-
"requestId": "test-id",
|
|
2821
|
-
"timestamp": "2025-11-25T17:39:46.046Z"
|
|
2822
|
-
}
|
|
2823
|
-
}
|
|
2824
|
-
[AccessControl] 🔍 DATA OBJECT STRUCTURE (after deep clone): {
|
|
2825
|
-
correlationId: 'e62eaa44-bfba-42af-8ce8-4937624a7ae8',
|
|
2826
|
-
dataKeys: [ 'accepted', 'rejected', 'outcomes', 'errors' ],
|
|
2827
|
-
hasAccepted: true,
|
|
2828
|
-
hasRejected: true,
|
|
2829
|
-
hasOutcomes: true,
|
|
2830
|
-
hasErrors: true,
|
|
2831
|
-
acceptedType: 'number',
|
|
2832
|
-
acceptedValue: 3,
|
|
2833
|
-
rejectedType: 'number',
|
|
2834
|
-
rejectedValue: 2,
|
|
2835
|
-
outcomesType: 'object',
|
|
2836
|
-
outcomesValue: { success: 1, failed: 1, blocked: 1, error: 2 },
|
|
2837
|
-
errorsType: 'object',
|
|
2838
|
-
errorsIsArray: true,
|
|
2839
|
-
fullData: '{\n' +
|
|
2840
|
-
' "accepted": 3,\n' +
|
|
2841
|
-
' "rejected": 2,\n' +
|
|
2842
|
-
' "outcomes": {\n' +
|
|
2843
|
-
' "success": 1,\n' +
|
|
2844
|
-
' "failed": 1,\n' +
|
|
2845
|
-
' "blocked": 1,\n' +
|
|
2846
|
-
' "error": 2\n' +
|
|
2847
|
-
' },\n' +
|
|
2848
|
-
' "errors": [\n' +
|
|
2849
|
-
' {\n' +
|
|
2850
|
-
' "proof_index": 0,\n' +
|
|
2851
|
-
' "error": {\n' +
|
|
2852
|
-
' "code": "validation_error",\n' +
|
|
2853
|
-
' "message": "Invalid signature"\n' +
|
|
2854
|
-
' }\n' +
|
|
2855
|
-
' }\n' +
|
|
2856
|
-
' ]\n' +
|
|
2857
|
-
'}'
|
|
2858
|
-
}
|
|
2859
|
-
[AccessControl] 🔍 VALIDATING DATA WITH SUCCESS: {
|
|
2860
|
-
correlationId: 'e62eaa44-bfba-42af-8ce8-4937624a7ae8',
|
|
2861
|
-
dataWithSuccessKeys: [ 'success', 'accepted', 'rejected', 'outcomes', 'errors' ],
|
|
2862
|
-
hasSuccess: true,
|
|
2863
|
-
successValue: true,
|
|
2864
|
-
hasAccepted: true,
|
|
2865
|
-
acceptedValue: 3,
|
|
2866
|
-
hasRejected: true,
|
|
2867
|
-
rejectedValue: 2,
|
|
2868
|
-
hasOutcomes: true,
|
|
2869
|
-
outcomesValue: { success: 1, failed: 1, blocked: 1, error: 2 },
|
|
2870
|
-
fullDataWithSuccess: '{\n' +
|
|
2871
|
-
' "success": true,\n' +
|
|
2872
|
-
' "accepted": 3,\n' +
|
|
2873
|
-
' "rejected": 2,\n' +
|
|
2874
|
-
' "outcomes": {\n' +
|
|
2875
|
-
' "success": 1,\n' +
|
|
2876
|
-
' "failed": 1,\n' +
|
|
2877
|
-
' "blocked": 1,\n' +
|
|
2878
|
-
' "error": 2\n' +
|
|
2879
|
-
' },\n' +
|
|
2880
|
-
' "errors": [\n' +
|
|
2881
|
-
' {\n' +
|
|
2882
|
-
' "proof_index": 0,\n' +
|
|
2883
|
-
' "error": {\n' +
|
|
2884
|
-
' "code": "validation_error",\n' +
|
|
2885
|
-
' "message": "Invalid signature"\n' +
|
|
2886
|
-
' }\n' +
|
|
2887
|
-
' }\n' +
|
|
2888
|
-
' ]\n' +
|
|
2889
|
-
'}'
|
|
2890
|
-
}
|
|
2891
|
-
|
|
2892
|
-
✓ src/services/__tests__/access-control.proof-response-validation.test.ts (12 tests) 18ms
|
|
2893
|
-
✓ src/delegation/storage/__tests__/memory-graph-storage.test.ts (27 tests) 4ms
|
|
2894
|
-
✓ src/delegation/__tests__/utils.test.ts (28 tests) 3ms
|
|
2895
|
-
✓ src/__tests__/providers/base.test.ts (14 tests) 4ms
|
|
2896
|
-
stderr | src/services/__tests__/provider-resolution.integration.test.ts > Provider Resolution Integration > Backward compatibility > should work with Phase 1 tools (no oauthProvider field)
|
|
2897
|
-
[ProviderResolver] Tool does not specify oauthProvider. Using first configured provider "github" as fallback. This is deprecated - configure oauthProvider in AgentShield dashboard for Phase 2+.
|
|
2898
|
-
|
|
2899
|
-
✓ src/services/__tests__/provider-resolution.integration.test.ts (6 tests) 4ms
|
|
2900
|
-
✓ src/__tests__/runtime/audit-logger.test.ts (9 tests) 3ms
|
|
2901
|
-
✓ src/services/__tests__/oauth-provider-registry.test.ts (9 tests) 4ms
|
|
2902
|
-
✓ src/utils/__tests__/did-helpers.test.ts (11 tests) 3ms
|
|
2903
|
-
✓ src/__tests__/config/provider-runtime-config.test.ts (9 tests) 3ms
|
|
2904
|
-
✓ src/delegation/storage/__tests__/memory-statuslist-storage.test.ts (14 tests) 16ms
|
|
2905
|
-
✓ src/__tests__/runtime/delegation-flow.test.ts (4 tests) 9ms
|
|
2906
|
-
✓ src/delegation/__tests__/audience-validator.test.ts (5 tests) 2ms
|
|
2907
|
-
↓ src/__tests__/delegation-e2e.test.ts (14 tests | 14 skipped)
|
|
2908
|
-
✓ src/__tests__/index.test.ts (4 tests) 2ms
|
|
2909
|
-
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Caching Integration > should respect cache TTL
|
|
2910
|
-
[ToolProtectionService] Config loaded from API {
|
|
2911
|
-
source: 'api',
|
|
2912
|
-
toolCount: 0,
|
|
1214
|
+
at runWithTimeout (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1602:10)
|
|
1215
|
+
at runTest (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1309:12)
|
|
1216
|
+
[90m at processTicksAndRejections (node:internal/process/task_queues:105:5)[39m
|
|
1217
|
+
at runSuite (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1468:8)
|
|
1218
|
+
at runSuite (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1468:8)
|
|
1219
|
+
|
|
1220
|
+
[90mstderr[2m | src/__tests__/identity/user-did-manager.test.ts[2m > [22m[2mUserDidManager[2m > [22m[2merror handling[2m > [22m[2mshould handle storage.delete errors gracefully
|
|
1221
|
+
[22m[39m[UserDidManager] Storage.delete failed, continuing: Error: Storage error
|
|
1222
|
+
at [90m/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/__tests__/identity/user-did-manager.test.ts:206:70
|
|
1223
|
+
[90m at processTicksAndRejections (node:internal/process/task_queues:105:5)[39m
|
|
1224
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:753:20
|
|
1225
|
+
|
|
1226
|
+
[32m✓[39m src/__tests__/identity/user-did-manager.test.ts [2m([22m[2m17 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
1227
|
+
[32m✓[39m src/delegation/__tests__/cascading-revocation.test.ts [2m([22m[2m23 tests[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
1228
|
+
[90mstderr[2m | src/config/__tests__/remote-config.spec.ts[2m > [22m[2mfetchRemoteConfig[2m > [22m[2mError handling[2m > [22m[2mshould return null if API request fails
|
|
1229
|
+
[22m[39m[RemoteConfig] API returned 404: Not Found
|
|
1230
|
+
|
|
1231
|
+
[90mstderr[2m | src/config/__tests__/remote-config.spec.ts[2m > [22m[2mfetchRemoteConfig[2m > [22m[2mError handling[2m > [22m[2mshould return null if API throws error
|
|
1232
|
+
[22m[39m[RemoteConfig] Failed to fetch config: Error: Network error
|
|
1233
|
+
at [90m/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/config/__tests__/remote-config.spec.ts:170:35
|
|
1234
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:157:11
|
|
1235
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:753:26
|
|
1236
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1636:20
|
|
1237
|
+
at new Promise (<anonymous>)
|
|
1238
|
+
at runWithTimeout (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1602:10)
|
|
1239
|
+
at runTest (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1309:12)
|
|
1240
|
+
[90m at processTicksAndRejections (node:internal/process/task_queues:105:5)[39m
|
|
1241
|
+
at runSuite (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1468:8)
|
|
1242
|
+
at runSuite (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1468:8)
|
|
1243
|
+
|
|
1244
|
+
[90mstderr[2m | src/config/__tests__/remote-config.spec.ts[2m > [22m[2mfetchRemoteConfig[2m > [22m[2mError handling[2m > [22m[2mshould return null if neither projectId nor agentDid provided
|
|
1245
|
+
[22m[39m[RemoteConfig] Neither projectId nor agentDid provided
|
|
1246
|
+
|
|
1247
|
+
[90mstderr[2m | src/config/__tests__/remote-config.spec.ts[2m > [22m[2mfetchRemoteConfig[2m > [22m[2mError handling[2m > [22m[2mshould handle cache read errors gracefully
|
|
1248
|
+
[22m[39m[RemoteConfig] Cache read failed: Error: Cache error
|
|
1249
|
+
at [90m/Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/packages/mcp-i-core/[39msrc/config/__tests__/remote-config.spec.ts:198:50
|
|
1250
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:157:11
|
|
1251
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:753:26
|
|
1252
|
+
at file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1636:20
|
|
1253
|
+
at new Promise (<anonymous>)
|
|
1254
|
+
at runWithTimeout (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1602:10)
|
|
1255
|
+
at runTest (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1309:12)
|
|
1256
|
+
[90m at processTicksAndRejections (node:internal/process/task_queues:105:5)[39m
|
|
1257
|
+
at runSuite (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1468:8)
|
|
1258
|
+
at runSuite (file:///Users/brian/Documents/@kya-os/modelcontextprotocol-identity/xmcp-i/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.5/node_modules/[4m@vitest[24m/runner/dist/index.js:1468:8)
|
|
1259
|
+
|
|
1260
|
+
[32m✓[39m src/delegation/storage/__tests__/memory-graph-storage.test.ts [2m([22m[2m27 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
1261
|
+
[32m✓[39m src/__tests__/providers/base.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
1262
|
+
[32m✓[39m src/config/__tests__/remote-config.spec.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
1263
|
+
[32m✓[39m src/__tests__/config/provider-runtime-config.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
1264
|
+
[32m✓[39m src/delegation/__tests__/delegation-graph.test.ts [2m([22m[2m28 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
1265
|
+
[32m✓[39m src/__tests__/runtime/proof-client-did.test.ts [2m([22m[2m17 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
1266
|
+
[32m✓[39m src/compliance/__tests__/schema-verifier.test.ts [2m([22m[2m30 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
1267
|
+
[32m✓[39m src/__tests__/runtime/delegation-flow.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
1268
|
+
[32m✓[39m src/delegation/storage/__tests__/memory-statuslist-storage.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
1269
|
+
[32m✓[39m src/delegation/__tests__/audience-validator.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 2[2mms[22m[39m
|
|
1270
|
+
[32m✓[39m src/delegation/__tests__/utils.test.ts [2m([22m[2m28 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
1271
|
+
[32m✓[39m src/utils/__tests__/did-helpers.test.ts [2m([22m[2m11 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
1272
|
+
[32m✓[39m src/__tests__/index.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 2[2mms[22m[39m
|
|
1273
|
+
[2m[90m↓[39m[22m src/__tests__/delegation-e2e.test.ts [2m([22m[2m14 tests[22m[2m | [22m[33m14 skipped[39m[2m)[22m
|
|
1274
|
+
[90mstderr[2m | src/__tests__/services/agentshield-integration.test.ts[2m > [22m[2mAgentShield Integration[2m > [22m[2mReal-world Scenarios[2m > [22m[2mshould handle API rate limiting gracefully
|
|
1275
|
+
[22m[39m[ToolProtectionService] API fetch failed, using fallback config {
|
|
1276
|
+
[90mstdout[2m | src/__tests__/services/agentshield-integration.test.ts[2m > [22m[2mAgentShield Integration[2m > [22m[2mCaching Integration[2m > [22m[2mshould respect cache TTL
|
|
1277
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
1278
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
1279
|
+
source: [32m'api'[39m,
|
|
1280
|
+
toolCount: [33m0[39m,
|
|
2913
1281
|
protectedTools: [],
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
}
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
[
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
[
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
[
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
Tests 876 passed | 16 skipped (892)
|
|
2971
|
-
Start at 12:39:45
|
|
2972
|
-
Duration 1.52s (transform 2.23s, setup 0ms, collect 3.81s, tests 1.98s, environment 4ms, prepare 715ms)
|
|
1282
|
+
error: [32m'Failed to fetch bouncer config: 429 Too Many Requests - Rate limit exceeded'[39m
|
|
1283
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
1284
|
+
projectId: [32m'test-project-123'[39m,
|
|
1285
|
+
cacheTtlMs: [33m1000[39m,
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
cacheExpiresAt: [32m'2025-11-19T17:11:25.057Z'[39m
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
[90mstdout[2m | src/__tests__/services/agentshield-integration.test.ts[2m > [22m[2mAgentShield Integration[2m > [22m[2mReal-world Scenarios[2m > [22m[2mshould handle typical e-commerce tool protection config
|
|
1292
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
1293
|
+
source: [32m'api'[39m,
|
|
1294
|
+
toolCount: [33m4[39m,
|
|
1295
|
+
protectedTools: [ [32m'add_to_cart'[39m, [32m'checkout'[39m ],
|
|
1296
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
1297
|
+
projectId: [32m'test-project-123'[39m,
|
|
1298
|
+
cacheTtlMs: [33m300000[39m,
|
|
1299
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:24.057Z'[39m
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
[90mstdout[2m | src/__tests__/services/agentshield-integration.test.ts[2m > [22m[2mAgentShield Integration[2m > [22m[2mReal-world Scenarios[2m > [22m[2mshould handle concurrent requests
|
|
1303
|
+
[22m[39m[ToolProtectionService] Config loaded from API {
|
|
1304
|
+
source: [32m'api'[39m,
|
|
1305
|
+
toolCount: [33m1[39m,
|
|
1306
|
+
protectedTools: [ [32m'tool1'[39m ],
|
|
1307
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
1308
|
+
projectId: [32m'test-project-123'[39m,
|
|
1309
|
+
cacheTtlMs: [33m300000[39m,
|
|
1310
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:24.058Z'[39m
|
|
1311
|
+
}
|
|
1312
|
+
[ToolProtectionService] Config loaded from API {
|
|
1313
|
+
source: [32m'api'[39m,
|
|
1314
|
+
toolCount: [33m1[39m,
|
|
1315
|
+
protectedTools: [ [32m'tool1'[39m ],
|
|
1316
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
1317
|
+
projectId: [32m'test-project-123'[39m,
|
|
1318
|
+
cacheTtlMs: [33m300000[39m,
|
|
1319
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:24.058Z'[39m
|
|
1320
|
+
}
|
|
1321
|
+
[ToolProtectionService] Config loaded from API {
|
|
1322
|
+
source: [32m'api'[39m,
|
|
1323
|
+
toolCount: [33m1[39m,
|
|
1324
|
+
protectedTools: [ [32m'tool1'[39m ],
|
|
1325
|
+
agentDid: [32m'did:key:z6MkhaXgBZDv...'[39m,
|
|
1326
|
+
projectId: [32m'test-project-123'[39m,
|
|
1327
|
+
cacheTtlMs: [33m300000[39m,
|
|
1328
|
+
cacheExpiresAt: [32m'2025-11-19T17:16:24.058Z'[39m
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
[32m✓[39m src/__tests__/services/agentshield-integration.test.ts [2m([22m[2m30 tests[22m[2m)[22m[33m 1116[2mms[22m[39m
|
|
1332
|
+
[33m[2m✓[22m[39m should respect cache TTL [33m 1101[2mms[22m[39m
|
|
1333
|
+
|
|
1334
|
+
[2m Test Files [22m [1m[32m34 passed[39m[22m[2m | [22m[33m1 skipped[39m[90m (35)[39m
|
|
1335
|
+
[2m Tests [22m [1m[32m762 passed[39m[22m[2m | [22m[33m15 skipped[39m[90m (777)[39m
|
|
1336
|
+
[2m Start at [22m 12:11:21
|
|
1337
|
+
[2m Duration [22m 2.88s[2m (transform 6.99s, setup 0ms, collect 12.59s, tests 2.29s, environment 3ms, prepare 2.06s)[22m
|
|
2973
1338
|
|