@kya-os/mcp-i-core 1.3.10 → 1.3.12
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/.claude/settings.local.json +9 -0
- package/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-test$colon$coverage.log +3419 -3072
- package/.turbo/turbo-test.log +1664 -1539
- package/coverage/coverage-final.json +60 -0
- package/dist/identity/idp-token-resolver.d.ts +17 -1
- package/dist/identity/idp-token-resolver.d.ts.map +1 -1
- package/dist/identity/idp-token-resolver.js +34 -6
- package/dist/identity/idp-token-resolver.js.map +1 -1
- package/dist/identity/idp-token-storage.interface.d.ts +38 -7
- package/dist/identity/idp-token-storage.interface.d.ts.map +1 -1
- package/dist/identity/idp-token-storage.interface.js +2 -0
- package/dist/identity/idp-token-storage.interface.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/services/tool-context-builder.d.ts +18 -1
- package/dist/services/tool-context-builder.d.ts.map +1 -1
- package/dist/services/tool-context-builder.js +63 -10
- package/dist/services/tool-context-builder.js.map +1 -1
- package/dist/services/tool-protection.service.d.ts +1 -1
- package/dist/services/tool-protection.service.d.ts.map +1 -1
- package/dist/services/tool-protection.service.js +17 -10
- package/dist/services/tool-protection.service.js.map +1 -1
- package/dist/utils/did-helpers.d.ts +33 -0
- package/dist/utils/did-helpers.d.ts.map +1 -1
- package/dist/utils/did-helpers.js +53 -0
- package/dist/utils/did-helpers.js.map +1 -1
- package/package.json +2 -2
- package/src/delegation/__tests__/vc-issuer.test.ts +1 -1
- package/src/identity/idp-token-resolver.ts +41 -7
- package/src/identity/idp-token-storage.interface.ts +42 -7
- package/src/index.ts +6 -2
- package/src/services/tool-context-builder.ts +75 -10
- package/src/services/tool-protection.service.ts +51 -32
- package/src/utils/__tests__/did-helpers.test.ts +55 -0
- package/src/utils/did-helpers.ts +60 -0
- package/dist/__tests__/utils/mock-providers.d.ts +0 -104
- package/dist/__tests__/utils/mock-providers.d.ts.map +0 -1
- package/dist/__tests__/utils/mock-providers.js +0 -293
- package/dist/__tests__/utils/mock-providers.js.map +0 -1
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,168 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
> @kya-os/mcp-i-core@1.3.
|
|
2
|
+
> @kya-os/mcp-i-core@1.3.12 test /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core
|
|
3
3
|
> vitest run
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
RUN v4.0.
|
|
6
|
+
RUN v4.0.14 /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core
|
|
7
7
|
|
|
8
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyEd25519 > should return false on verification error
|
|
9
|
-
[CryptoService] Ed25519 verification error: Error: Verification failed
|
|
10
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:62:9
|
|
11
|
-
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
|
|
12
|
-
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
|
|
13
|
-
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
|
|
14
|
-
at new Promise (<anonymous>)
|
|
15
|
-
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)
|
|
16
|
-
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)
|
|
17
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
18
|
-
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)
|
|
19
|
-
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)
|
|
20
|
-
|
|
21
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject invalid JWK format
|
|
22
|
-
[CryptoService] Invalid Ed25519 JWK format
|
|
23
|
-
|
|
24
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject JWK with wrong kty
|
|
25
|
-
[CryptoService] Invalid Ed25519 JWK format
|
|
26
|
-
|
|
27
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject JWK with wrong crv
|
|
28
|
-
[CryptoService] Invalid Ed25519 JWK format
|
|
29
|
-
|
|
30
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject JWK with missing x field
|
|
31
|
-
[CryptoService] Invalid Ed25519 JWK format
|
|
32
|
-
|
|
33
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject JWK with empty x field
|
|
34
|
-
[CryptoService] Invalid Ed25519 JWK format
|
|
35
|
-
|
|
36
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject malformed JWS
|
|
37
|
-
[CryptoService] Invalid JWS format: Error: Invalid header base64: Unexpected token '', "" is not valid JSON
|
|
38
|
-
at CryptoService.parseJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:91:13)
|
|
39
|
-
at CryptoService.verifyJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
|
|
40
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:230:42
|
|
41
|
-
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
|
|
42
|
-
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
|
|
43
|
-
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
|
|
44
|
-
at new Promise (<anonymous>)
|
|
45
|
-
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)
|
|
46
|
-
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)
|
|
47
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
48
|
-
|
|
49
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject non-EdDSA algorithms
|
|
50
|
-
[CryptoService] Unsupported algorithm: RS256, expected EdDSA
|
|
51
|
-
|
|
52
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject HS256 algorithm
|
|
53
|
-
[CryptoService] Unsupported algorithm: HS256, expected EdDSA
|
|
54
|
-
|
|
55
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle empty JWS components
|
|
56
|
-
[CryptoService] Invalid JWS format: Error: Invalid header base64: Unexpected end of JSON input
|
|
57
|
-
at CryptoService.parseJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:91:13)
|
|
58
|
-
at CryptoService.verifyJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
|
|
59
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:271:42
|
|
60
|
-
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
|
|
61
|
-
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
|
|
62
|
-
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
|
|
63
|
-
at new Promise (<anonymous>)
|
|
64
|
-
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)
|
|
65
|
-
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)
|
|
66
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
67
|
-
|
|
68
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle malformed JWS - single part
|
|
69
|
-
[CryptoService] Invalid JWS format: Error: Invalid JWS format: expected header.payload.signature
|
|
70
|
-
at CryptoService.parseJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:78:13)
|
|
71
|
-
at CryptoService.verifyJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
|
|
72
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:279:42
|
|
73
|
-
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
|
|
74
|
-
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
|
|
75
|
-
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
|
|
76
|
-
at new Promise (<anonymous>)
|
|
77
|
-
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)
|
|
78
|
-
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)
|
|
79
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
80
|
-
|
|
81
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle malformed JWS - two parts
|
|
82
|
-
[CryptoService] Invalid JWS format: Error: Invalid JWS format: expected header.payload.signature
|
|
83
|
-
at CryptoService.parseJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:78:13)
|
|
84
|
-
at CryptoService.verifyJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
|
|
85
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:287:42
|
|
86
|
-
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
|
|
87
|
-
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
|
|
88
|
-
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
|
|
89
|
-
at new Promise (<anonymous>)
|
|
90
|
-
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)
|
|
91
|
-
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)
|
|
92
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
93
|
-
|
|
94
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle malformed JWS - four parts
|
|
95
|
-
[CryptoService] Invalid JWS format: Error: Invalid JWS format: expected header.payload.signature
|
|
96
|
-
at CryptoService.parseJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:78:13)
|
|
97
|
-
at CryptoService.verifyJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
|
|
98
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:302:42
|
|
99
|
-
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
|
|
100
|
-
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
|
|
101
|
-
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
|
|
102
|
-
at new Promise (<anonymous>)
|
|
103
|
-
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)
|
|
104
|
-
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)
|
|
105
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
106
|
-
|
|
107
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle malformed JWS - invalid JSON header
|
|
108
|
-
[CryptoService] Invalid JWS format: Error: Invalid header base64: Unexpected token 'o', "notjson" is not valid JSON
|
|
109
|
-
at CryptoService.parseJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:91:13)
|
|
110
|
-
at CryptoService.verifyJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
|
|
111
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:316:42
|
|
112
|
-
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
|
|
113
|
-
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
|
|
114
|
-
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
|
|
115
|
-
at new Promise (<anonymous>)
|
|
116
|
-
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)
|
|
117
|
-
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)
|
|
118
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
119
|
-
|
|
120
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle malformed JWS - invalid base64
|
|
121
|
-
[CryptoService] Invalid JWS format: Error: Invalid payload base64: Invalid base64url string: Invalid character
|
|
122
|
-
at CryptoService.parseJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:107:15)
|
|
123
|
-
at CryptoService.verifyJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
|
|
124
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:334:42
|
|
125
|
-
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
|
|
126
|
-
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
|
|
127
|
-
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
|
|
128
|
-
at new Promise (<anonymous>)
|
|
129
|
-
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)
|
|
130
|
-
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)
|
|
131
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
132
|
-
|
|
133
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should validate expectedKid option
|
|
134
|
-
[CryptoService] Key ID mismatch
|
|
135
|
-
|
|
136
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should validate alg option
|
|
137
|
-
[CryptoService] Unsupported algorithm: EdDSA, expected RS256
|
|
138
|
-
|
|
139
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should validate Ed25519 key length
|
|
140
|
-
[CryptoService] Failed to extract public key: Error: Invalid Ed25519 public key length: 5
|
|
141
|
-
at CryptoService.jwkToBase64PublicKey (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:295:13)
|
|
142
|
-
at CryptoService.verifyJWS (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/crypto.service.ts:249:32)
|
|
143
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:398:42
|
|
144
|
-
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
|
|
145
|
-
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
|
|
146
|
-
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
|
|
147
|
-
at new Promise (<anonymous>)
|
|
148
|
-
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)
|
|
149
|
-
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)
|
|
150
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
151
|
-
|
|
152
|
-
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle signature verification error
|
|
153
|
-
[CryptoService] Ed25519 verification error: Error: Crypto error
|
|
154
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:449:61
|
|
155
|
-
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
|
|
156
|
-
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
|
|
157
|
-
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
|
|
158
|
-
at new Promise (<anonymous>)
|
|
159
|
-
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)
|
|
160
|
-
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)
|
|
161
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
162
|
-
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)
|
|
163
|
-
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)
|
|
164
|
-
|
|
165
|
-
✓ src/services/__tests__/crypto.service.test.ts (34 tests) 19ms
|
|
166
8
|
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > API Authentication > should use X-API-Key header for new endpoint
|
|
167
9
|
[ToolProtectionService] Config loaded from API {
|
|
168
10
|
source: 'api',
|
|
@@ -171,7 +13,7 @@ stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield In
|
|
|
171
13
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
172
14
|
projectId: 'test-project-123',
|
|
173
15
|
cacheTtlMs: 300000,
|
|
174
|
-
cacheExpiresAt: '2025-
|
|
16
|
+
cacheExpiresAt: '2025-12-04T01:20:15.470Z'
|
|
175
17
|
}
|
|
176
18
|
|
|
177
19
|
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > API Authentication > should use Authorization Bearer header for old endpoint
|
|
@@ -182,95 +24,84 @@ stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield In
|
|
|
182
24
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
183
25
|
projectId: 'none',
|
|
184
26
|
cacheTtlMs: 300000,
|
|
185
|
-
cacheExpiresAt: '2025-
|
|
27
|
+
cacheExpiresAt: '2025-12-04T01:20:15.473Z'
|
|
186
28
|
}
|
|
187
29
|
|
|
188
|
-
stdout | src/__tests__/services/
|
|
30
|
+
stdout | src/__tests__/services/tool-protection-merged-config.test.ts > ToolProtectionService - Merged Config API > Fetching from /config endpoint with embedded tools > should fetch from /config endpoint and extract toolProtection.tools
|
|
189
31
|
[ToolProtectionService] Config loaded from API {
|
|
190
32
|
source: 'api',
|
|
191
|
-
toolCount:
|
|
192
|
-
protectedTools: [],
|
|
33
|
+
toolCount: 2,
|
|
34
|
+
protectedTools: [ 'checkout' ],
|
|
193
35
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
194
36
|
projectId: 'test-project-123',
|
|
195
37
|
cacheTtlMs: 300000,
|
|
196
|
-
cacheExpiresAt: '2025-
|
|
38
|
+
cacheExpiresAt: '2025-12-04T01:20:15.475Z'
|
|
197
39
|
}
|
|
198
40
|
|
|
199
|
-
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Endpoint Selection > should use
|
|
41
|
+
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Endpoint Selection > should use project-scoped /config endpoint when projectId is available
|
|
200
42
|
[ToolProtectionService] Config loaded from API {
|
|
201
43
|
source: 'api',
|
|
202
44
|
toolCount: 0,
|
|
203
45
|
protectedTools: [],
|
|
204
46
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
205
|
-
projectId: '
|
|
47
|
+
projectId: 'test-project-123',
|
|
206
48
|
cacheTtlMs: 300000,
|
|
207
|
-
cacheExpiresAt: '2025-
|
|
49
|
+
cacheExpiresAt: '2025-12-04T01:20:15.477Z'
|
|
208
50
|
}
|
|
209
51
|
|
|
210
|
-
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Endpoint Selection > should
|
|
52
|
+
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Endpoint Selection > should use agent-scoped endpoint when projectId is not available
|
|
211
53
|
[ToolProtectionService] Config loaded from API {
|
|
212
54
|
source: 'api',
|
|
213
55
|
toolCount: 0,
|
|
214
56
|
protectedTools: [],
|
|
215
57
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
216
|
-
projectId: '
|
|
58
|
+
projectId: 'none',
|
|
217
59
|
cacheTtlMs: 300000,
|
|
218
|
-
cacheExpiresAt: '2025-
|
|
60
|
+
cacheExpiresAt: '2025-12-04T01:20:15.478Z'
|
|
219
61
|
}
|
|
220
62
|
|
|
221
|
-
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Endpoint Selection > should encode
|
|
63
|
+
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Endpoint Selection > should encode projectId in URL
|
|
222
64
|
[ToolProtectionService] Config loaded from API {
|
|
223
65
|
source: 'api',
|
|
224
66
|
toolCount: 0,
|
|
225
67
|
protectedTools: [],
|
|
226
68
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
227
|
-
projectId: '
|
|
228
|
-
cacheTtlMs: 300000,
|
|
229
|
-
cacheExpiresAt: '2025-11-26T15:41:45.316Z'
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Response Format Compatibility > should handle new endpoint format (toolProtections object)
|
|
233
|
-
[ToolProtectionService] Config loaded from API {
|
|
234
|
-
source: 'api',
|
|
235
|
-
toolCount: 2,
|
|
236
|
-
protectedTools: [ 'checkout' ],
|
|
237
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
238
|
-
projectId: 'test-project-123',
|
|
69
|
+
projectId: 'project/with/special-chars',
|
|
239
70
|
cacheTtlMs: 300000,
|
|
240
|
-
cacheExpiresAt: '2025-
|
|
71
|
+
cacheExpiresAt: '2025-12-04T01:20:15.479Z'
|
|
241
72
|
}
|
|
242
73
|
|
|
243
|
-
stdout | src/__tests__/services/tool-protection.
|
|
74
|
+
stdout | src/__tests__/services/tool-protection-merged-config.test.ts > ToolProtectionService - Merged Config API > Fetching from /config endpoint with embedded tools > should use projectId-based /config endpoint when projectId is set
|
|
244
75
|
[ToolProtectionService] Config loaded from API {
|
|
245
76
|
source: 'api',
|
|
246
|
-
toolCount:
|
|
247
|
-
protectedTools: [ '
|
|
77
|
+
toolCount: 1,
|
|
78
|
+
protectedTools: [ 'greet' ],
|
|
248
79
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
249
|
-
projectId: '
|
|
80
|
+
projectId: 'my-project-id',
|
|
250
81
|
cacheTtlMs: 300000,
|
|
251
|
-
cacheExpiresAt: '2025-
|
|
82
|
+
cacheExpiresAt: '2025-12-04T01:20:15.479Z'
|
|
252
83
|
}
|
|
253
84
|
|
|
254
|
-
stdout | src/__tests__/services/
|
|
85
|
+
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Endpoint Selection > should encode agent DID in URL
|
|
255
86
|
[ToolProtectionService] Config loaded from API {
|
|
256
87
|
source: 'api',
|
|
257
|
-
toolCount:
|
|
258
|
-
protectedTools: [
|
|
88
|
+
toolCount: 0,
|
|
89
|
+
protectedTools: [],
|
|
259
90
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
260
|
-
projectId: '
|
|
91
|
+
projectId: 'none',
|
|
261
92
|
cacheTtlMs: 300000,
|
|
262
|
-
cacheExpiresAt: '2025-
|
|
93
|
+
cacheExpiresAt: '2025-12-04T01:20:15.480Z'
|
|
263
94
|
}
|
|
264
95
|
|
|
265
|
-
stdout | src/__tests__/services/
|
|
96
|
+
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Response Format Compatibility > should handle new endpoint format (toolProtections object)
|
|
266
97
|
[ToolProtectionService] Config loaded from API {
|
|
267
98
|
source: 'api',
|
|
268
99
|
toolCount: 2,
|
|
269
|
-
protectedTools: [ '
|
|
100
|
+
protectedTools: [ 'checkout' ],
|
|
270
101
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
271
102
|
projectId: 'test-project-123',
|
|
272
103
|
cacheTtlMs: 300000,
|
|
273
|
-
cacheExpiresAt: '2025-
|
|
104
|
+
cacheExpiresAt: '2025-12-04T01:20:15.480Z'
|
|
274
105
|
}
|
|
275
106
|
|
|
276
107
|
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Response Format Compatibility > should handle old endpoint format (tools array)
|
|
@@ -281,7 +112,7 @@ stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield In
|
|
|
281
112
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
282
113
|
projectId: 'none',
|
|
283
114
|
cacheTtlMs: 300000,
|
|
284
|
-
cacheExpiresAt: '2025-
|
|
115
|
+
cacheExpiresAt: '2025-12-04T01:20:15.481Z'
|
|
285
116
|
}
|
|
286
117
|
|
|
287
118
|
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Response Format Compatibility > should handle old endpoint format (tools object)
|
|
@@ -292,7 +123,7 @@ stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield In
|
|
|
292
123
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
293
124
|
projectId: 'none',
|
|
294
125
|
cacheTtlMs: 300000,
|
|
295
|
-
cacheExpiresAt: '2025-
|
|
126
|
+
cacheExpiresAt: '2025-12-04T01:20:15.481Z'
|
|
296
127
|
}
|
|
297
128
|
|
|
298
129
|
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Response Format Compatibility > should handle snake_case field names
|
|
@@ -303,10 +134,13 @@ stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield In
|
|
|
303
134
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
304
135
|
projectId: 'test-project-123',
|
|
305
136
|
cacheTtlMs: 300000,
|
|
306
|
-
cacheExpiresAt: '2025-
|
|
137
|
+
cacheExpiresAt: '2025-12-04T01:20:15.481Z'
|
|
307
138
|
}
|
|
308
139
|
|
|
140
|
+
stderr | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Error Handling > should handle network timeout
|
|
309
141
|
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Response Format Compatibility > should handle camelCase field names
|
|
142
|
+
[ToolProtectionService] API fetch failed, using fallback config { agentDid: 'did:key:z6MkhaXgBZDv...', error: 'Network timeout' }
|
|
143
|
+
|
|
310
144
|
[ToolProtectionService] Config loaded from API {
|
|
311
145
|
source: 'api',
|
|
312
146
|
toolCount: 1,
|
|
@@ -314,9 +148,12 @@ stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield In
|
|
|
314
148
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
315
149
|
projectId: 'test-project-123',
|
|
316
150
|
cacheTtlMs: 300000,
|
|
317
|
-
cacheExpiresAt: '2025-
|
|
151
|
+
cacheExpiresAt: '2025-12-04T01:20:15.482Z'
|
|
152
|
+
stderr | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Fallback Behavior > should cache fallback config
|
|
153
|
+
[ToolProtectionService] API fetch failed, using fallback config { agentDid: 'did:key:z6MkhaXgBZDv...', error: 'Network error' }
|
|
318
154
|
}
|
|
319
155
|
|
|
156
|
+
|
|
320
157
|
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Response Format Compatibility > should prefer camelCase over snake_case when both present
|
|
321
158
|
[ToolProtectionService] Config loaded from API {
|
|
322
159
|
source: 'api',
|
|
@@ -325,449 +162,176 @@ stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield In
|
|
|
325
162
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
326
163
|
projectId: 'test-project-123',
|
|
327
164
|
cacheTtlMs: 300000,
|
|
328
|
-
cacheExpiresAt: '2025-
|
|
165
|
+
cacheExpiresAt: '2025-12-04T01:20:15.482Z'
|
|
329
166
|
}
|
|
330
167
|
|
|
331
|
-
stdout | src/__tests__/services/
|
|
168
|
+
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Caching Integration > should cache successful API responses
|
|
332
169
|
[ToolProtectionService] Config loaded from API {
|
|
333
170
|
source: 'api',
|
|
334
171
|
toolCount: 1,
|
|
335
|
-
protectedTools: [ '
|
|
172
|
+
protectedTools: [ 'tool1' ],
|
|
336
173
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
337
174
|
projectId: 'test-project-123',
|
|
338
175
|
cacheTtlMs: 300000,
|
|
339
|
-
cacheExpiresAt: '2025-
|
|
176
|
+
cacheExpiresAt: '2025-12-04T01:20:15.485Z'
|
|
340
177
|
}
|
|
341
178
|
|
|
342
|
-
stdout | src/__tests__/services/
|
|
179
|
+
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Caching Integration > should respect cache TTL
|
|
343
180
|
[ToolProtectionService] Config loaded from API {
|
|
344
181
|
source: 'api',
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
protectedTools: [ 'checkout' ],
|
|
348
|
-
[ToolProtectionService] API fetch failed, using fallback config { agentDid: 'did:key:z6MkhaXgBZDv...', error: 'Network timeout' }
|
|
182
|
+
toolCount: 0,
|
|
183
|
+
protectedTools: [],
|
|
349
184
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
350
|
-
projectId: '
|
|
351
|
-
cacheTtlMs:
|
|
352
|
-
|
|
353
|
-
cacheExpiresAt: '2025-11-26T15:41:45.318Z'
|
|
354
|
-
stderr | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Fallback Behavior > should cache fallback config
|
|
355
|
-
[ToolProtectionService] API fetch failed, using fallback config { agentDid: 'did:key:z6MkhaXgBZDv...', error: 'Network error' }
|
|
356
|
-
|
|
185
|
+
projectId: 'test-project-123',
|
|
186
|
+
cacheTtlMs: 1000,
|
|
187
|
+
cacheExpiresAt: '2025-12-04T01:15:16.485Z'
|
|
357
188
|
}
|
|
358
189
|
|
|
359
|
-
stdout | src/__tests__/services/tool-protection.
|
|
190
|
+
stdout | src/__tests__/services/tool-protection-merged-config.test.ts > ToolProtectionService - Merged Config API > Fetching from /config endpoint with embedded tools > should handle empty tools object from merged config
|
|
360
191
|
[ToolProtectionService] Config loaded from API {
|
|
361
192
|
source: 'api',
|
|
362
|
-
toolCount:
|
|
363
|
-
protectedTools: [
|
|
193
|
+
toolCount: 0,
|
|
194
|
+
protectedTools: [],
|
|
364
195
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
365
|
-
projectId: '
|
|
196
|
+
projectId: 'test-project-123',
|
|
366
197
|
cacheTtlMs: 300000,
|
|
367
|
-
cacheExpiresAt: '2025-
|
|
198
|
+
cacheExpiresAt: '2025-12-04T01:20:15.480Z'
|
|
368
199
|
}
|
|
369
200
|
|
|
370
|
-
stdout | src/__tests__/services/tool-protection.
|
|
201
|
+
stdout | src/__tests__/services/tool-protection-merged-config.test.ts > ToolProtectionService - Merged Config API > checkToolProtection with merged config > should correctly identify protected tool from merged config
|
|
371
202
|
[ToolProtectionService] Config loaded from API {
|
|
372
203
|
source: 'api',
|
|
373
204
|
toolCount: 2,
|
|
374
|
-
protectedTools: [ '
|
|
205
|
+
protectedTools: [ 'checkout' ],
|
|
375
206
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
376
|
-
projectId: '
|
|
207
|
+
projectId: 'test-project-123',
|
|
377
208
|
cacheTtlMs: 300000,
|
|
378
|
-
cacheExpiresAt: '2025-
|
|
209
|
+
cacheExpiresAt: '2025-12-04T01:20:15.481Z'
|
|
379
210
|
}
|
|
380
211
|
|
|
381
|
-
stdout | src/__tests__/services/tool-protection.
|
|
382
|
-
[ToolProtectionService]
|
|
383
|
-
|
|
384
|
-
toolCount: 2,
|
|
385
|
-
protectedTools: [ 'tool1' ],
|
|
212
|
+
stdout | src/__tests__/services/tool-protection-merged-config.test.ts > ToolProtectionService - Merged Config API > checkToolProtection with merged config > should correctly identify protected tool from merged config
|
|
213
|
+
[ToolProtectionService] Protection check {
|
|
214
|
+
tool: 'checkout',
|
|
386
215
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
216
|
+
found: true,
|
|
217
|
+
isWildcard: false,
|
|
218
|
+
requiresDelegation: true,
|
|
219
|
+
availableTools: [ 'checkout', 'greet' ]
|
|
390
220
|
}
|
|
391
221
|
|
|
392
|
-
stdout | src/__tests__/services/tool-protection.
|
|
222
|
+
stdout | src/__tests__/services/tool-protection-merged-config.test.ts > ToolProtectionService - Merged Config API > checkToolProtection with merged config > should return null for unknown tool
|
|
393
223
|
[ToolProtectionService] Config loaded from API {
|
|
394
224
|
source: 'api',
|
|
395
|
-
toolCount:
|
|
396
|
-
protectedTools: [
|
|
225
|
+
toolCount: 1,
|
|
226
|
+
protectedTools: [],
|
|
397
227
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
398
|
-
projectId: '
|
|
228
|
+
projectId: 'test-project-123',
|
|
399
229
|
cacheTtlMs: 300000,
|
|
400
|
-
cacheExpiresAt: '2025-
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should skip tools without name in array format
|
|
404
|
-
[ToolProtectionService] Cache miss, fetching from API {
|
|
405
|
-
source: 'api-fetch-start',
|
|
406
|
-
cacheKey: 'agent:did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK',
|
|
407
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
408
|
-
projectId: 'none',
|
|
409
|
-
apiUrl: 'https://kya.vouched.id',
|
|
410
|
-
endpoint: '/api/v1/bouncer/config?agent_did=did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK'
|
|
411
|
-
}
|
|
412
|
-
[ToolProtectionService] Fetching from API: https://kya.vouched.id/api/v1/bouncer/config?agent_did=did%3Akey%3Az6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK {
|
|
413
|
-
method: 'config?agent_did (old)',
|
|
414
|
-
projectId: 'none',
|
|
415
|
-
apiKeyPresent: true,
|
|
416
|
-
apiKeyLength: 18,
|
|
417
|
-
apiKeyMasked: 'test-api...'
|
|
230
|
+
cacheExpiresAt: '2025-12-04T01:20:15.481Z'
|
|
418
231
|
}
|
|
419
232
|
|
|
420
|
-
stdout | src/__tests__/services/tool-protection.
|
|
421
|
-
[ToolProtectionService]
|
|
422
|
-
|
|
233
|
+
stdout | src/__tests__/services/tool-protection-merged-config.test.ts > ToolProtectionService - Merged Config API > checkToolProtection with merged config > should return null for unknown tool
|
|
234
|
+
[ToolProtectionService] Protection check {
|
|
235
|
+
tool: 'unknown-tool',
|
|
423
236
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
rawTools: [
|
|
429
|
-
{ name: 'valid_tool', requiresDelegation: true },
|
|
430
|
-
{ requiresDelegation: false }
|
|
431
|
-
],
|
|
432
|
-
responseMetadata: {}
|
|
237
|
+
found: false,
|
|
238
|
+
isWildcard: true,
|
|
239
|
+
requiresDelegation: false,
|
|
240
|
+
availableTools: [ 'greet' ]
|
|
433
241
|
}
|
|
434
242
|
|
|
435
|
-
stdout | src/__tests__/services/tool-protection.
|
|
243
|
+
stdout | src/__tests__/services/tool-protection-merged-config.test.ts > ToolProtectionService - Merged Config API > Fallback behavior with merged config > should handle API returning config without tools field
|
|
436
244
|
[ToolProtectionService] Config loaded from API {
|
|
437
245
|
source: 'api',
|
|
246
|
+
stderr | src/__tests__/services/tool-protection-merged-config.test.ts > ToolProtectionService - Merged Config API > Fallback behavior with merged config > should use fallback config when network error occurs
|
|
438
247
|
toolCount: 1,
|
|
439
|
-
protectedTools: [ '
|
|
248
|
+
protectedTools: [ 'greet' ],
|
|
249
|
+
[ToolProtectionService] API fetch failed, using fallback config { agentDid: 'did:key:z6MkhaXgBZDv...', error: 'Network error' }
|
|
440
250
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
441
|
-
projectId: '
|
|
251
|
+
projectId: 'test-project-123',
|
|
442
252
|
cacheTtlMs: 300000,
|
|
443
|
-
cacheExpiresAt: '2025-
|
|
444
|
-
|
|
445
|
-
[ToolProtectionService] API fetch successful, config cached {
|
|
446
|
-
source: 'cache-write',
|
|
447
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
448
|
-
cacheKey: 'agent:did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK',
|
|
449
|
-
toolCount: 1,
|
|
450
|
-
tools: [ { name: 'valid_tool', requiresDelegation: true, scopeCount: 0 } ],
|
|
451
|
-
ttlMs: 300000,
|
|
452
|
-
ttlMinutes: 5,
|
|
453
|
-
expiresAt: '2025-11-26T15:41:45.321Z',
|
|
454
|
-
expiresIn: '300s'
|
|
253
|
+
cacheExpiresAt: '2025-12-04T01:20:15.486Z'
|
|
254
|
+
|
|
455
255
|
}
|
|
456
256
|
|
|
457
|
-
stdout | src/__tests__/services/
|
|
257
|
+
stdout | src/__tests__/services/tool-protection-merged-config.test.ts > ToolProtectionService - Merged Config API > Caching with merged config > should cache tool protections extracted from merged config
|
|
458
258
|
[ToolProtectionService] Config loaded from API {
|
|
459
259
|
source: 'api',
|
|
460
260
|
toolCount: 1,
|
|
461
|
-
protectedTools: [ '
|
|
261
|
+
protectedTools: [ 'greet' ],
|
|
462
262
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
463
263
|
projectId: 'test-project-123',
|
|
464
264
|
cacheTtlMs: 300000,
|
|
465
|
-
cacheExpiresAt: '2025-
|
|
265
|
+
cacheExpiresAt: '2025-12-04T01:20:15.486Z'
|
|
466
266
|
}
|
|
467
267
|
|
|
468
|
-
stdout | src/__tests__/services/
|
|
268
|
+
stdout | src/__tests__/services/tool-protection-merged-config.test.ts > ToolProtectionService - Merged Config API > Caching with merged config > should respect cache TTL for merged config
|
|
469
269
|
[ToolProtectionService] Config loaded from API {
|
|
470
270
|
source: 'api',
|
|
471
|
-
toolCount:
|
|
472
|
-
protectedTools: [],
|
|
271
|
+
toolCount: 1,
|
|
272
|
+
protectedTools: [ 'greet' ],
|
|
473
273
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
474
274
|
projectId: 'test-project-123',
|
|
475
|
-
cacheTtlMs:
|
|
476
|
-
cacheExpiresAt: '2025-
|
|
275
|
+
cacheTtlMs: 100,
|
|
276
|
+
cacheExpiresAt: '2025-12-04T01:15:15.586Z'
|
|
477
277
|
}
|
|
478
278
|
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
279
|
+
✓ src/__tests__/providers/base.test.ts (14 tests) 42ms
|
|
280
|
+
stderr | src/services/__tests__/storage.service.test.ts > StorageService > createStorageProviders > should prefer Redis over KV when both are configured
|
|
281
|
+
[StorageService] Failed to connect to Redis, falling back to memory: Redis package not available
|
|
282
|
+
|
|
283
|
+
✓ src/__tests__/cache/tool-protection-cache.test.ts (49 tests) 159ms
|
|
284
|
+
stderr | src/services/__tests__/storage.service.test.ts > StorageService > createStorageProviders > should prefer Redis over KV when both are configured
|
|
285
|
+
[StorageService] Failed to initialize KV, falling back to memory: Failed to import Cloudflare storage providers: Cannot find package '@kya-os/mcp-i-cloudflare/providers/storage' imported from '/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/storage.service.ts'
|
|
286
|
+
|
|
287
|
+
stderr | src/services/__tests__/storage.service.test.ts > StorageService > createStorageProviders > should fall back to memory when Redis connection fails
|
|
288
|
+
[StorageService] Failed to connect to Redis, falling back to memory: Redis package not available
|
|
289
|
+
|
|
290
|
+
stderr | src/services/__tests__/storage.service.test.ts > StorageService > createStorageProviders > should use KV namespace when provided
|
|
291
|
+
[StorageService] Failed to initialize KV, falling back to memory: Failed to import Cloudflare storage providers: Cannot find package '@kya-os/mcp-i-cloudflare/providers/storage' imported from '/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/storage.service.ts'
|
|
292
|
+
|
|
293
|
+
stdout | src/__tests__/services/tool-protection-merged-config.test.ts > ToolProtectionService - Merged Config API > Caching with merged config > should respect cache TTL for merged config
|
|
482
294
|
[ToolProtectionService] Config loaded from API {
|
|
483
295
|
source: 'api',
|
|
484
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
485
|
-
error: 'ECONNREFUSED',
|
|
486
|
-
cacheKey: 'agent:did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK'
|
|
487
296
|
toolCount: 1,
|
|
488
|
-
protectedTools: [ '
|
|
297
|
+
protectedTools: [ 'greet' ],
|
|
489
298
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
490
|
-
projectId: '
|
|
491
|
-
cacheTtlMs:
|
|
492
|
-
|
|
493
|
-
cacheExpiresAt: '2025-11-26T15:41:45.324Z'
|
|
494
|
-
|
|
299
|
+
projectId: 'test-project-123',
|
|
300
|
+
cacheTtlMs: 100,
|
|
301
|
+
cacheExpiresAt: '2025-12-04T01:15:15.737Z'
|
|
495
302
|
}
|
|
496
|
-
stderr | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should use wildcard protection in fail-safe deny-all mode
|
|
497
303
|
|
|
498
|
-
|
|
499
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > caching behavior > should use default cache TTL when not specified
|
|
304
|
+
stdout | src/__tests__/services/tool-protection-merged-config.test.ts > ToolProtectionService - Merged Config API > Backward compatibility - /tool-protections response format > should still handle legacy /tool-protections response format if encountered
|
|
500
305
|
[ToolProtectionService] Config loaded from API {
|
|
501
306
|
source: 'api',
|
|
502
|
-
toolCount:
|
|
503
|
-
protectedTools: [],
|
|
307
|
+
toolCount: 1,
|
|
308
|
+
protectedTools: [ 'greet' ],
|
|
504
309
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
505
|
-
projectId: '
|
|
310
|
+
projectId: 'test-project-123',
|
|
506
311
|
cacheTtlMs: 300000,
|
|
507
|
-
cacheExpiresAt: '2025-
|
|
508
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
509
|
-
error: 'Network error',
|
|
510
|
-
cacheKey: 'agent:did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK'
|
|
312
|
+
cacheExpiresAt: '2025-12-04T01:20:15.637Z'
|
|
511
313
|
}
|
|
512
314
|
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
[ToolProtectionService] Config loaded from API {
|
|
517
|
-
source: 'api',
|
|
518
|
-
toolCount: 0,
|
|
519
|
-
protectedTools: [],
|
|
520
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
521
|
-
projectId: 'none',
|
|
522
|
-
cacheTtlMs: 600000,
|
|
523
|
-
cacheExpiresAt: '2025-11-26T15:46:45.324Z'
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > edge cases > should handle empty toolProtections object
|
|
527
|
-
[ToolProtectionService] Config loaded from API {
|
|
528
|
-
source: 'api',
|
|
529
|
-
toolCount: 0,
|
|
530
|
-
protectedTools: [],
|
|
531
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
532
|
-
projectId: 'none',
|
|
533
|
-
cacheTtlMs: 300000,
|
|
534
|
-
cacheExpiresAt: '2025-11-26T15:41:45.324Z'
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > edge cases > should handle null requiredScopes
|
|
538
|
-
[ToolProtectionService] Config loaded from API {
|
|
539
|
-
source: 'api',
|
|
540
|
-
toolCount: 1,
|
|
541
|
-
protectedTools: [ 'tool1' ],
|
|
542
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
543
|
-
projectId: 'none',
|
|
544
|
-
cacheTtlMs: 300000,
|
|
545
|
-
cacheExpiresAt: '2025-11-26T15:41:45.324Z'
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > edge cases > should handle mixed camelCase and snake_case in response
|
|
549
|
-
[ToolProtectionService] Config loaded from API {
|
|
550
|
-
source: 'api',
|
|
551
|
-
toolCount: 2,
|
|
552
|
-
protectedTools: [ 'tool1' ],
|
|
553
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
554
|
-
projectId: 'none',
|
|
555
|
-
cacheTtlMs: 300000,
|
|
556
|
-
cacheExpiresAt: '2025-11-26T15:41:45.324Z'
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return null when tool has no protection
|
|
560
|
-
[ToolProtectionService] Config loaded from API {
|
|
561
|
-
source: 'api',
|
|
562
|
-
toolCount: 1,
|
|
563
|
-
protectedTools: [],
|
|
564
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
565
|
-
projectId: 'none',
|
|
566
|
-
cacheTtlMs: 300000,
|
|
567
|
-
cacheExpiresAt: '2025-11-26T15:41:45.325Z'
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return null when tool is not in config
|
|
571
|
-
[ToolProtectionService] Config loaded from API {
|
|
572
|
-
source: 'api',
|
|
573
|
-
toolCount: 1,
|
|
574
|
-
protectedTools: [ 'other_tool' ],
|
|
575
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
576
|
-
projectId: 'none',
|
|
577
|
-
cacheTtlMs: 300000,
|
|
578
|
-
cacheExpiresAt: '2025-11-26T15:41:45.325Z'
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return null when tool is not in config
|
|
582
|
-
[ToolProtectionService] Protection check {
|
|
583
|
-
tool: 'unknown_tool',
|
|
584
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
585
|
-
found: false,
|
|
586
|
-
isWildcard: true,
|
|
587
|
-
requiresDelegation: false,
|
|
588
|
-
availableTools: [ 'other_tool' ]
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return wildcard protection when tool not found and wildcard exists
|
|
592
|
-
[ToolProtectionService] Config loaded from API {
|
|
593
|
-
source: 'api',
|
|
594
|
-
toolCount: 2,
|
|
595
|
-
protectedTools: [ '*' ],
|
|
596
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
597
|
-
projectId: 'none',
|
|
598
|
-
cacheTtlMs: 300000,
|
|
599
|
-
cacheExpiresAt: '2025-11-26T15:41:45.325Z'
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return wildcard protection when tool not found and wildcard exists
|
|
603
|
-
[ToolProtectionService] Protection check {
|
|
604
|
-
tool: 'unknown_tool',
|
|
605
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
606
|
-
found: true,
|
|
607
|
-
isWildcard: true,
|
|
608
|
-
requiresDelegation: true,
|
|
609
|
-
availableTools: [ '*', 'specific_tool' ]
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should prioritize specific tool protection over wildcard
|
|
613
|
-
[ToolProtectionService] Config loaded from API {
|
|
614
|
-
source: 'api',
|
|
615
|
-
toolCount: 2,
|
|
616
|
-
protectedTools: [ '*' ],
|
|
617
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
618
|
-
projectId: 'none',
|
|
619
|
-
cacheTtlMs: 300000,
|
|
620
|
-
cacheExpiresAt: '2025-11-26T15:41:45.325Z'
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should use wildcard protection in fail-safe deny-all mode
|
|
624
|
-
[ToolProtectionService] Protection check {
|
|
625
|
-
tool: 'any_tool',
|
|
626
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
627
|
-
found: true,
|
|
628
|
-
isWildcard: true,
|
|
629
|
-
requiresDelegation: true,
|
|
630
|
-
availableTools: [ '*' ]
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return protection config when tool requires delegation
|
|
634
|
-
[ToolProtectionService] Config loaded from API {
|
|
635
|
-
source: 'api',
|
|
636
|
-
toolCount: 1,
|
|
637
|
-
protectedTools: [ 'protected_tool' ],
|
|
638
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
639
|
-
projectId: 'none',
|
|
640
|
-
cacheTtlMs: 300000,
|
|
641
|
-
cacheExpiresAt: '2025-11-26T15:41:45.325Z'
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return protection config when tool requires delegation
|
|
645
|
-
[ToolProtectionService] Protection check {
|
|
646
|
-
tool: 'protected_tool',
|
|
647
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
648
|
-
found: true,
|
|
649
|
-
isWildcard: false,
|
|
650
|
-
requiresDelegation: true,
|
|
651
|
-
availableTools: [ 'protected_tool' ]
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > integration with NoOpToolProtectionCache > should work with NoOpToolProtectionCache
|
|
655
|
-
[ToolProtectionService] Config loaded from API {
|
|
656
|
-
source: 'api',
|
|
657
|
-
toolCount: 1,
|
|
658
|
-
protectedTools: [ 'tool1' ],
|
|
659
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
660
|
-
projectId: 'none',
|
|
661
|
-
cacheTtlMs: 300000,
|
|
662
|
-
cacheExpiresAt: '2025-11-26T15:41:45.326Z'
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > integration with NoOpToolProtectionCache > should work with NoOpToolProtectionCache
|
|
666
|
-
[ToolProtectionService] Config loaded from API {
|
|
667
|
-
source: 'api',
|
|
668
|
-
toolCount: 1,
|
|
669
|
-
protectedTools: [ 'tool1' ],
|
|
670
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
671
|
-
projectId: 'none',
|
|
672
|
-
cacheTtlMs: 300000,
|
|
673
|
-
cacheExpiresAt: '2025-11-26T15:41:45.326Z'
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
✓ src/__tests__/services/tool-protection.service.test.ts (49 tests) 22ms
|
|
677
|
-
stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should submit proofs successfully
|
|
678
|
-
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
679
|
-
correlationId: '2ade6797-2590-481e-aa6f-2215d75b3996',
|
|
680
|
-
status: 200,
|
|
681
|
-
statusText: '',
|
|
682
|
-
headers: { 'content-type': 'application/json' },
|
|
683
|
-
responseTextLength: 100,
|
|
684
|
-
responseTextPreview: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}',
|
|
685
|
-
fullResponseText: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}'
|
|
686
|
-
}
|
|
687
|
-
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
688
|
-
correlationId: '2ade6797-2590-481e-aa6f-2215d75b3996',
|
|
689
|
-
status: 200,
|
|
690
|
-
responseDataType: 'object',
|
|
691
|
-
responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
|
|
692
|
-
responseData: '{\n' +
|
|
693
|
-
' "success": true,\n' +
|
|
694
|
-
' "accepted": 1,\n' +
|
|
695
|
-
' "rejected": 0,\n' +
|
|
696
|
-
' "outcomes": {\n' +
|
|
697
|
-
' "success": 1,\n' +
|
|
698
|
-
' "failed": 0,\n' +
|
|
699
|
-
' "blocked": 0,\n' +
|
|
700
|
-
' "error": 0\n' +
|
|
701
|
-
' }\n' +
|
|
702
|
-
'}'
|
|
703
|
-
}
|
|
704
|
-
[AccessControl] Raw response received: {
|
|
705
|
-
"success": true,
|
|
706
|
-
"accepted": 1,
|
|
707
|
-
"rejected": 0,
|
|
708
|
-
"outcomes": {
|
|
709
|
-
"success": 1,
|
|
710
|
-
"failed": 0,
|
|
711
|
-
"blocked": 0,
|
|
712
|
-
"error": 0
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle all_proofs_rejected error gracefully
|
|
717
|
-
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
718
|
-
correlationId: '60a313a1-6692-43bd-aa37-29fa860cf510',
|
|
719
|
-
status: 400,
|
|
720
|
-
statusText: '',
|
|
721
|
-
headers: { 'content-type': 'application/json' },
|
|
722
|
-
responseTextLength: 209,
|
|
723
|
-
responseTextPreview: '{"success":false,"error":{"code":"all_proofs_rejected","message":"All proofs rejected","details":{"rejected":1,"errors":[{"proof_index":0,"error":{"code":"invalid_signature","message":"Invalid signature"}}]}}}',
|
|
724
|
-
fullResponseText: '{"success":false,"error":{"code":"all_proofs_rejected","message":"All proofs rejected","details":{"rejected":1,"errors":[{"proof_index":0,"error":{"code":"invalid_signature","message":"Invalid signature"}}]}}}'
|
|
725
|
-
}
|
|
726
|
-
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
727
|
-
correlationId: '60a313a1-6692-43bd-aa37-29fa860cf510',
|
|
728
|
-
status: 400,
|
|
729
|
-
responseDataType: 'object',
|
|
730
|
-
responseDataKeys: [ 'success', 'error' ],
|
|
731
|
-
responseData: '{\n' +
|
|
732
|
-
' "success": false,\n' +
|
|
733
|
-
' "error": {\n' +
|
|
734
|
-
' "code": "all_proofs_rejected",\n' +
|
|
735
|
-
' "message": "All proofs rejected",\n' +
|
|
736
|
-
' "details": {\n' +
|
|
737
|
-
' "rejected": 1,\n' +
|
|
738
|
-
' "errors": [\n' +
|
|
739
|
-
' {\n' +
|
|
740
|
-
' "proof_index": 0,\n' +
|
|
741
|
-
' "error": {\n' +
|
|
742
|
-
' "code": "invalid_signature",\n' +
|
|
743
|
-
' "message": "Invalid signature"\n' +
|
|
744
|
-
' }\n' +
|
|
745
|
-
' }\n' +
|
|
746
|
-
' ]\n' +
|
|
747
|
-
' }\n' +
|
|
748
|
-
' }\n' +
|
|
749
|
-
'}'
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle wrapped response format
|
|
315
|
+
✓ src/__tests__/services/tool-protection-merged-config.test.ts (11 tests) 166ms
|
|
316
|
+
✓ src/services/__tests__/storage.service.test.ts (17 tests) 21ms
|
|
317
|
+
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 success field in data
|
|
753
318
|
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
754
|
-
correlationId: '
|
|
319
|
+
correlationId: '44b856b6-1731-42fd-8975-6af554f5e6eb',
|
|
755
320
|
status: 200,
|
|
756
|
-
statusText:
|
|
757
|
-
headers: {
|
|
758
|
-
responseTextLength:
|
|
759
|
-
responseTextPreview: '{"success":true,"data":{"
|
|
760
|
-
fullResponseText: '{"success":true,"data":{"
|
|
321
|
+
statusText: undefined,
|
|
322
|
+
headers: {},
|
|
323
|
+
responseTextLength: 191,
|
|
324
|
+
responseTextPreview: '{"success":true,"data":{"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}},"metadata":{"requestId":"test-request-id","timestamp":"2025-12-04T01:15:15.628Z"}}',
|
|
325
|
+
fullResponseText: '{"success":true,"data":{"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}},"metadata":{"requestId":"test-request-id","timestamp":"2025-12-04T01:15:15.628Z"}}'
|
|
761
326
|
}
|
|
762
327
|
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
763
|
-
correlationId: '
|
|
328
|
+
correlationId: '44b856b6-1731-42fd-8975-6af554f5e6eb',
|
|
764
329
|
status: 200,
|
|
765
330
|
responseDataType: 'object',
|
|
766
331
|
responseDataKeys: [ 'success', 'data', 'metadata' ],
|
|
767
332
|
responseData: '{\n' +
|
|
768
333
|
' "success": true,\n' +
|
|
769
334
|
' "data": {\n' +
|
|
770
|
-
' "success": true,\n' +
|
|
771
335
|
' "accepted": 1,\n' +
|
|
772
336
|
' "rejected": 0,\n' +
|
|
773
337
|
' "outcomes": {\n' +
|
|
@@ -779,14 +343,13 @@ stderr | src/services/__tests__/access-control.service.test.ts > AccessControlAp
|
|
|
779
343
|
' },\n' +
|
|
780
344
|
' "metadata": {\n' +
|
|
781
345
|
' "requestId": "test-request-id",\n' +
|
|
782
|
-
' "timestamp": "2025-
|
|
346
|
+
' "timestamp": "2025-12-04T01:15:15.628Z"\n' +
|
|
783
347
|
' }\n' +
|
|
784
348
|
'}'
|
|
785
349
|
}
|
|
786
350
|
[AccessControl] Raw response received: {
|
|
787
351
|
"success": true,
|
|
788
352
|
"data": {
|
|
789
|
-
"success": true,
|
|
790
353
|
"accepted": 1,
|
|
791
354
|
"rejected": 0,
|
|
792
355
|
"outcomes": {
|
|
@@ -798,12 +361,12 @@ stderr | src/services/__tests__/access-control.service.test.ts > AccessControlAp
|
|
|
798
361
|
},
|
|
799
362
|
"metadata": {
|
|
800
363
|
"requestId": "test-request-id",
|
|
801
|
-
"timestamp": "2025-
|
|
364
|
+
"timestamp": "2025-12-04T01:15:15.628Z"
|
|
802
365
|
}
|
|
803
366
|
}
|
|
804
367
|
[AccessControl] 🔍 DATA OBJECT STRUCTURE (after deep clone): {
|
|
805
|
-
correlationId: '
|
|
806
|
-
dataKeys: [ '
|
|
368
|
+
correlationId: '44b856b6-1731-42fd-8975-6af554f5e6eb',
|
|
369
|
+
dataKeys: [ 'accepted', 'rejected', 'outcomes' ],
|
|
807
370
|
hasAccepted: true,
|
|
808
371
|
hasRejected: true,
|
|
809
372
|
hasOutcomes: true,
|
|
@@ -817,7 +380,6 @@ stderr | src/services/__tests__/access-control.service.test.ts > AccessControlAp
|
|
|
817
380
|
errorsType: 'undefined',
|
|
818
381
|
errorsIsArray: false,
|
|
819
382
|
fullData: '{\n' +
|
|
820
|
-
' "success": true,\n' +
|
|
821
383
|
' "accepted": 1,\n' +
|
|
822
384
|
' "rejected": 0,\n' +
|
|
823
385
|
' "outcomes": {\n' +
|
|
@@ -829,7 +391,7 @@ stderr | src/services/__tests__/access-control.service.test.ts > AccessControlAp
|
|
|
829
391
|
'}'
|
|
830
392
|
}
|
|
831
393
|
[AccessControl] 🔍 VALIDATING DATA WITH SUCCESS: {
|
|
832
|
-
correlationId: '
|
|
394
|
+
correlationId: '44b856b6-1731-42fd-8975-6af554f5e6eb',
|
|
833
395
|
dataWithSuccessKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
|
|
834
396
|
hasSuccess: true,
|
|
835
397
|
successValue: true,
|
|
@@ -852,275 +414,18 @@ stderr | src/services/__tests__/access-control.service.test.ts > AccessControlAp
|
|
|
852
414
|
'}'
|
|
853
415
|
}
|
|
854
416
|
|
|
855
|
-
stderr | src/services/__tests__/access-control.
|
|
417
|
+
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
|
|
856
418
|
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
857
|
-
correlationId: '
|
|
419
|
+
correlationId: '3378ac8e-ca4f-4498-9896-3d5ae565f647',
|
|
858
420
|
status: 200,
|
|
859
|
-
statusText:
|
|
860
|
-
headers: {
|
|
861
|
-
responseTextLength:
|
|
862
|
-
responseTextPreview: '{"success":true,"accepted":
|
|
863
|
-
fullResponseText: '{"success":true,"accepted":
|
|
421
|
+
statusText: undefined,
|
|
422
|
+
headers: {},
|
|
423
|
+
responseTextLength: 333,
|
|
424
|
+
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-12-04T01:15:15.675Z"}}',
|
|
425
|
+
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-12-04T01:15:15.675Z"}}'
|
|
864
426
|
}
|
|
865
427
|
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
866
|
-
correlationId: '
|
|
867
|
-
status: 200,
|
|
868
|
-
responseDataType: 'object',
|
|
869
|
-
responseDataKeys: [ 'success', 'accepted', 'rejected' ],
|
|
870
|
-
responseData: '{\n "success": true,\n "accepted": 1,\n "rejected": 0\n}'
|
|
871
|
-
}
|
|
872
|
-
[AccessControl] Raw response received: {
|
|
873
|
-
"success": true,
|
|
874
|
-
"accepted": 1,
|
|
875
|
-
"rejected": 0
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle response with missing outcomes field (outcomes is optional)
|
|
879
|
-
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
880
|
-
correlationId: 'b57c702a-173c-463c-8a0e-1edc3fc11cb6',
|
|
881
|
-
status: 200,
|
|
882
|
-
statusText: '',
|
|
883
|
-
headers: { 'content-type': 'application/json' },
|
|
884
|
-
responseTextLength: 100,
|
|
885
|
-
responseTextPreview: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}',
|
|
886
|
-
fullResponseText: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}'
|
|
887
|
-
}
|
|
888
|
-
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
889
|
-
correlationId: 'b57c702a-173c-463c-8a0e-1edc3fc11cb6',
|
|
890
|
-
status: 200,
|
|
891
|
-
responseDataType: 'object',
|
|
892
|
-
responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
|
|
893
|
-
responseData: '{\n' +
|
|
894
|
-
' "success": true,\n' +
|
|
895
|
-
' "accepted": 1,\n' +
|
|
896
|
-
' "rejected": 0,\n' +
|
|
897
|
-
' "outcomes": {\n' +
|
|
898
|
-
' "success": 1,\n' +
|
|
899
|
-
' "failed": 0,\n' +
|
|
900
|
-
' "blocked": 0,\n' +
|
|
901
|
-
' "error": 0\n' +
|
|
902
|
-
' }\n' +
|
|
903
|
-
'}'
|
|
904
|
-
}
|
|
905
|
-
[AccessControl] Raw response received: {
|
|
906
|
-
"success": true,
|
|
907
|
-
"accepted": 1,
|
|
908
|
-
"rejected": 0,
|
|
909
|
-
"outcomes": {
|
|
910
|
-
"success": 1,
|
|
911
|
-
"failed": 0,
|
|
912
|
-
"blocked": 0,
|
|
913
|
-
"error": 0
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle response with missing outcomes field (outcomes is optional)
|
|
918
|
-
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
919
|
-
correlationId: '9e9878e9-938f-4bd4-b940-aa4cd8626ac8',
|
|
920
|
-
status: 200,
|
|
921
|
-
statusText: '',
|
|
922
|
-
headers: { 'content-type': 'application/json' },
|
|
923
|
-
responseTextLength: 56,
|
|
924
|
-
responseTextPreview: '{"success":true,"accepted":1,"rejected":0,"outcomes":{}}',
|
|
925
|
-
fullResponseText: '{"success":true,"accepted":1,"rejected":0,"outcomes":{}}'
|
|
926
|
-
}
|
|
927
|
-
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
928
|
-
correlationId: '9e9878e9-938f-4bd4-b940-aa4cd8626ac8',
|
|
929
|
-
status: 200,
|
|
930
|
-
responseDataType: 'object',
|
|
931
|
-
responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
|
|
932
|
-
responseData: '{\n "success": true,\n "accepted": 1,\n "rejected": 0,\n "outcomes": {}\n}'
|
|
933
|
-
}
|
|
934
|
-
[AccessControl] Raw response received: {
|
|
935
|
-
"success": true,
|
|
936
|
-
"accepted": 1,
|
|
937
|
-
"rejected": 0,
|
|
938
|
-
"outcomes": {}
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle wrapped response with invalid data structure
|
|
942
|
-
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
943
|
-
correlationId: 'd9a82dd8-18d9-4721-b45f-ecb435661533',
|
|
944
|
-
status: 200,
|
|
945
|
-
statusText: '',
|
|
946
|
-
headers: { 'content-type': 'application/json' },
|
|
947
|
-
responseTextLength: 52,
|
|
948
|
-
responseTextPreview: '{"success":true,"data":{"message":"Invalid format"}}',
|
|
949
|
-
fullResponseText: '{"success":true,"data":{"message":"Invalid format"}}'
|
|
950
|
-
}
|
|
951
|
-
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
952
|
-
correlationId: 'd9a82dd8-18d9-4721-b45f-ecb435661533',
|
|
953
|
-
status: 200,
|
|
954
|
-
responseDataType: 'object',
|
|
955
|
-
responseDataKeys: [ 'success', 'data' ],
|
|
956
|
-
responseData: '{\n "success": true,\n "data": {\n "message": "Invalid format"\n }\n}'
|
|
957
|
-
}
|
|
958
|
-
[AccessControl] Raw response received: {
|
|
959
|
-
"success": true,
|
|
960
|
-
"data": {
|
|
961
|
-
"message": "Invalid format"
|
|
962
|
-
}
|
|
963
|
-
}
|
|
964
|
-
[AccessControl] 🔍 DATA OBJECT STRUCTURE (after deep clone): {
|
|
965
|
-
correlationId: 'd9a82dd8-18d9-4721-b45f-ecb435661533',
|
|
966
|
-
dataKeys: [ 'message' ],
|
|
967
|
-
hasAccepted: false,
|
|
968
|
-
hasRejected: false,
|
|
969
|
-
hasOutcomes: false,
|
|
970
|
-
hasErrors: false,
|
|
971
|
-
acceptedType: 'undefined',
|
|
972
|
-
acceptedValue: undefined,
|
|
973
|
-
rejectedType: 'undefined',
|
|
974
|
-
rejectedValue: undefined,
|
|
975
|
-
outcomesType: 'undefined',
|
|
976
|
-
outcomesValue: undefined,
|
|
977
|
-
errorsType: 'undefined',
|
|
978
|
-
errorsIsArray: false,
|
|
979
|
-
fullData: '{\n "message": "Invalid format"\n}'
|
|
980
|
-
}
|
|
981
|
-
[AccessControl] 🔍 VALIDATING DATA WITH SUCCESS: {
|
|
982
|
-
correlationId: 'd9a82dd8-18d9-4721-b45f-ecb435661533',
|
|
983
|
-
dataWithSuccessKeys: [ 'success', 'accepted', 'rejected' ],
|
|
984
|
-
hasSuccess: true,
|
|
985
|
-
successValue: true,
|
|
986
|
-
hasAccepted: true,
|
|
987
|
-
acceptedValue: undefined,
|
|
988
|
-
hasRejected: true,
|
|
989
|
-
rejectedValue: undefined,
|
|
990
|
-
hasOutcomes: false,
|
|
991
|
-
outcomesValue: undefined,
|
|
992
|
-
fullDataWithSuccess: '{\n "success": true\n}'
|
|
993
|
-
}
|
|
994
|
-
[AccessControl] ❌ MISSING REQUIRED FIELDS AFTER CONSTRUCTION: {
|
|
995
|
-
correlationId: 'd9a82dd8-18d9-4721-b45f-ecb435661533',
|
|
996
|
-
hasAccepted: true,
|
|
997
|
-
acceptedType: 'undefined',
|
|
998
|
-
acceptedValue: undefined,
|
|
999
|
-
hasRejected: true,
|
|
1000
|
-
rejectedType: 'undefined',
|
|
1001
|
-
rejectedValue: undefined,
|
|
1002
|
-
dataWithSuccessKeys: [ 'success', 'accepted', 'rejected' ],
|
|
1003
|
-
fullDataWithSuccess: '{\n "success": true\n}',
|
|
1004
|
-
dataToValidateKeys: [ 'message' ],
|
|
1005
|
-
fullDataToValidate: '{\n "message": "Invalid format"\n}',
|
|
1006
|
-
originalResponseData: '{\n "success": true,\n "data": {\n "message": "Invalid format"\n }\n}'
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
stderr | src/services/__tests__/storage.service.test.ts > StorageService > createStorageProviders > should prefer Redis over KV when both are configured
|
|
1010
|
-
[StorageService] Failed to connect to Redis, falling back to memory: Redis package not available
|
|
1011
|
-
|
|
1012
|
-
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 success field in data
|
|
1013
|
-
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
1014
|
-
correlationId: 'a191bb28-c82e-4b0a-b3b2-4b9afd44abf6',
|
|
1015
|
-
status: 200,
|
|
1016
|
-
statusText: undefined,
|
|
1017
|
-
headers: {},
|
|
1018
|
-
responseTextLength: 191,
|
|
1019
|
-
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-26T15:36:45.364Z"}}',
|
|
1020
|
-
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-26T15:36:45.364Z"}}'
|
|
1021
|
-
}
|
|
1022
|
-
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
1023
|
-
correlationId: 'a191bb28-c82e-4b0a-b3b2-4b9afd44abf6',
|
|
1024
|
-
status: 200,
|
|
1025
|
-
responseDataType: 'object',
|
|
1026
|
-
responseDataKeys: [ 'success', 'data', 'metadata' ],
|
|
1027
|
-
responseData: '{\n' +
|
|
1028
|
-
' "success": true,\n' +
|
|
1029
|
-
' "data": {\n' +
|
|
1030
|
-
' "accepted": 1,\n' +
|
|
1031
|
-
' "rejected": 0,\n' +
|
|
1032
|
-
' "outcomes": {\n' +
|
|
1033
|
-
' "success": 1,\n' +
|
|
1034
|
-
' "failed": 0,\n' +
|
|
1035
|
-
' "blocked": 0,\n' +
|
|
1036
|
-
' "error": 0\n' +
|
|
1037
|
-
' }\n' +
|
|
1038
|
-
' },\n' +
|
|
1039
|
-
' "metadata": {\n' +
|
|
1040
|
-
' "requestId": "test-request-id",\n' +
|
|
1041
|
-
' "timestamp": "2025-11-26T15:36:45.364Z"\n' +
|
|
1042
|
-
' }\n' +
|
|
1043
|
-
'}'
|
|
1044
|
-
}
|
|
1045
|
-
[AccessControl] Raw response received: {
|
|
1046
|
-
"success": true,
|
|
1047
|
-
"data": {
|
|
1048
|
-
"accepted": 1,
|
|
1049
|
-
"rejected": 0,
|
|
1050
|
-
"outcomes": {
|
|
1051
|
-
"success": 1,
|
|
1052
|
-
"failed": 0,
|
|
1053
|
-
"blocked": 0,
|
|
1054
|
-
"error": 0
|
|
1055
|
-
}
|
|
1056
|
-
},
|
|
1057
|
-
"metadata": {
|
|
1058
|
-
"requestId": "test-request-id",
|
|
1059
|
-
"timestamp": "2025-11-26T15:36:45.364Z"
|
|
1060
|
-
}
|
|
1061
|
-
}
|
|
1062
|
-
[AccessControl] 🔍 DATA OBJECT STRUCTURE (after deep clone): {
|
|
1063
|
-
correlationId: 'a191bb28-c82e-4b0a-b3b2-4b9afd44abf6',
|
|
1064
|
-
dataKeys: [ 'accepted', 'rejected', 'outcomes' ],
|
|
1065
|
-
hasAccepted: true,
|
|
1066
|
-
hasRejected: true,
|
|
1067
|
-
hasOutcomes: true,
|
|
1068
|
-
hasErrors: false,
|
|
1069
|
-
acceptedType: 'number',
|
|
1070
|
-
acceptedValue: 1,
|
|
1071
|
-
rejectedType: 'number',
|
|
1072
|
-
rejectedValue: 0,
|
|
1073
|
-
outcomesType: 'object',
|
|
1074
|
-
outcomesValue: { success: 1, failed: 0, blocked: 0, error: 0 },
|
|
1075
|
-
errorsType: 'undefined',
|
|
1076
|
-
errorsIsArray: false,
|
|
1077
|
-
fullData: '{\n' +
|
|
1078
|
-
' "accepted": 1,\n' +
|
|
1079
|
-
' "rejected": 0,\n' +
|
|
1080
|
-
' "outcomes": {\n' +
|
|
1081
|
-
' "success": 1,\n' +
|
|
1082
|
-
' "failed": 0,\n' +
|
|
1083
|
-
' "blocked": 0,\n' +
|
|
1084
|
-
' "error": 0\n' +
|
|
1085
|
-
' }\n' +
|
|
1086
|
-
'}'
|
|
1087
|
-
}
|
|
1088
|
-
[AccessControl] 🔍 VALIDATING DATA WITH SUCCESS: {
|
|
1089
|
-
correlationId: 'a191bb28-c82e-4b0a-b3b2-4b9afd44abf6',
|
|
1090
|
-
dataWithSuccessKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
|
|
1091
|
-
hasSuccess: true,
|
|
1092
|
-
successValue: true,
|
|
1093
|
-
hasAccepted: true,
|
|
1094
|
-
acceptedValue: 1,
|
|
1095
|
-
hasRejected: true,
|
|
1096
|
-
rejectedValue: 0,
|
|
1097
|
-
hasOutcomes: true,
|
|
1098
|
-
outcomesValue: { success: 1, failed: 0, blocked: 0, error: 0 },
|
|
1099
|
-
fullDataWithSuccess: '{\n' +
|
|
1100
|
-
' "success": true,\n' +
|
|
1101
|
-
' "accepted": 1,\n' +
|
|
1102
|
-
' "rejected": 0,\n' +
|
|
1103
|
-
' "outcomes": {\n' +
|
|
1104
|
-
' "success": 1,\n' +
|
|
1105
|
-
' "failed": 0,\n' +
|
|
1106
|
-
' "blocked": 0,\n' +
|
|
1107
|
-
' "error": 0\n' +
|
|
1108
|
-
' }\n' +
|
|
1109
|
-
'}'
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
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
|
|
1113
|
-
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
1114
|
-
correlationId: '379ba9c2-a249-4004-a797-b65af80d45d0',
|
|
1115
|
-
status: 200,
|
|
1116
|
-
statusText: undefined,
|
|
1117
|
-
headers: {},
|
|
1118
|
-
responseTextLength: 333,
|
|
1119
|
-
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-26T15:36:45.376Z"}}',
|
|
1120
|
-
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-26T15:36:45.376Z"}}'
|
|
1121
|
-
}
|
|
1122
|
-
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
1123
|
-
correlationId: '379ba9c2-a249-4004-a797-b65af80d45d0',
|
|
428
|
+
correlationId: '3378ac8e-ca4f-4498-9896-3d5ae565f647',
|
|
1124
429
|
status: 200,
|
|
1125
430
|
responseDataType: 'object',
|
|
1126
431
|
responseDataKeys: [ 'success', 'data', 'metadata' ],
|
|
@@ -1150,7 +455,7 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1150
455
|
' },\n' +
|
|
1151
456
|
' "metadata": {\n' +
|
|
1152
457
|
' "requestId": "test-request-id",\n' +
|
|
1153
|
-
' "timestamp": "2025-
|
|
458
|
+
' "timestamp": "2025-12-04T01:15:15.675Z"\n' +
|
|
1154
459
|
' }\n' +
|
|
1155
460
|
'}'
|
|
1156
461
|
}
|
|
@@ -1180,11 +485,11 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1180
485
|
},
|
|
1181
486
|
"metadata": {
|
|
1182
487
|
"requestId": "test-request-id",
|
|
1183
|
-
"timestamp": "2025-
|
|
488
|
+
"timestamp": "2025-12-04T01:15:15.675Z"
|
|
1184
489
|
}
|
|
1185
490
|
}
|
|
1186
491
|
[AccessControl] 🔍 DATA OBJECT STRUCTURE (after deep clone): {
|
|
1187
|
-
correlationId: '
|
|
492
|
+
correlationId: '3378ac8e-ca4f-4498-9896-3d5ae565f647',
|
|
1188
493
|
dataKeys: [ 'accepted', 'rejected', 'outcomes', 'errors' ],
|
|
1189
494
|
hasAccepted: true,
|
|
1190
495
|
hasRejected: true,
|
|
@@ -1222,7 +527,7 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1222
527
|
'}'
|
|
1223
528
|
}
|
|
1224
529
|
[AccessControl] 🔍 VALIDATING DATA WITH SUCCESS: {
|
|
1225
|
-
correlationId: '
|
|
530
|
+
correlationId: '3378ac8e-ca4f-4498-9896-3d5ae565f647',
|
|
1226
531
|
dataWithSuccessKeys: [ 'success', 'accepted', 'rejected', 'outcomes', 'errors' ],
|
|
1227
532
|
hasSuccess: true,
|
|
1228
533
|
successValue: true,
|
|
@@ -1259,16 +564,16 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1259
564
|
|
|
1260
565
|
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)
|
|
1261
566
|
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
1262
|
-
correlationId: '
|
|
567
|
+
correlationId: '64a8619d-c455-4f7b-a5d9-152e2ed596b0',
|
|
1263
568
|
status: 200,
|
|
1264
569
|
statusText: undefined,
|
|
1265
570
|
headers: {},
|
|
1266
571
|
responseTextLength: 133,
|
|
1267
|
-
responseTextPreview: '{"success":true,"data":{"accepted":1,"rejected":0},"metadata":{"requestId":"test-request-id","timestamp":"2025-
|
|
1268
|
-
fullResponseText: '{"success":true,"data":{"accepted":1,"rejected":0},"metadata":{"requestId":"test-request-id","timestamp":"2025-
|
|
572
|
+
responseTextPreview: '{"success":true,"data":{"accepted":1,"rejected":0},"metadata":{"requestId":"test-request-id","timestamp":"2025-12-04T01:15:15.676Z"}}',
|
|
573
|
+
fullResponseText: '{"success":true,"data":{"accepted":1,"rejected":0},"metadata":{"requestId":"test-request-id","timestamp":"2025-12-04T01:15:15.676Z"}}'
|
|
1269
574
|
}
|
|
1270
575
|
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
1271
|
-
correlationId: '
|
|
576
|
+
correlationId: '64a8619d-c455-4f7b-a5d9-152e2ed596b0',
|
|
1272
577
|
status: 200,
|
|
1273
578
|
responseDataType: 'object',
|
|
1274
579
|
responseDataKeys: [ 'success', 'data', 'metadata' ],
|
|
@@ -1280,7 +585,7 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1280
585
|
' },\n' +
|
|
1281
586
|
' "metadata": {\n' +
|
|
1282
587
|
' "requestId": "test-request-id",\n' +
|
|
1283
|
-
' "timestamp": "2025-
|
|
588
|
+
' "timestamp": "2025-12-04T01:15:15.676Z"\n' +
|
|
1284
589
|
' }\n' +
|
|
1285
590
|
'}'
|
|
1286
591
|
}
|
|
@@ -1292,11 +597,11 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1292
597
|
},
|
|
1293
598
|
"metadata": {
|
|
1294
599
|
"requestId": "test-request-id",
|
|
1295
|
-
"timestamp": "2025-
|
|
600
|
+
"timestamp": "2025-12-04T01:15:15.676Z"
|
|
1296
601
|
}
|
|
1297
602
|
}
|
|
1298
603
|
[AccessControl] 🔍 DATA OBJECT STRUCTURE (after deep clone): {
|
|
1299
|
-
correlationId: '
|
|
604
|
+
correlationId: '64a8619d-c455-4f7b-a5d9-152e2ed596b0',
|
|
1300
605
|
dataKeys: [ 'accepted', 'rejected' ],
|
|
1301
606
|
hasAccepted: true,
|
|
1302
607
|
hasRejected: true,
|
|
@@ -1313,7 +618,7 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1313
618
|
fullData: '{\n "accepted": 1,\n "rejected": 0\n}'
|
|
1314
619
|
}
|
|
1315
620
|
[AccessControl] 🔍 VALIDATING DATA WITH SUCCESS: {
|
|
1316
|
-
correlationId: '
|
|
621
|
+
correlationId: '64a8619d-c455-4f7b-a5d9-152e2ed596b0',
|
|
1317
622
|
dataWithSuccessKeys: [ 'success', 'accepted', 'rejected' ],
|
|
1318
623
|
hasSuccess: true,
|
|
1319
624
|
successValue: true,
|
|
@@ -1326,28 +631,18 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1326
631
|
fullDataWithSuccess: '{\n "success": true,\n "accepted": 1,\n "rejected": 0\n}'
|
|
1327
632
|
}
|
|
1328
633
|
|
|
1329
|
-
stderr | src/services/__tests__/storage.service.test.ts > StorageService > createStorageProviders > should prefer Redis over KV when both are configured
|
|
1330
|
-
[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/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/storage.service.ts'
|
|
1331
|
-
|
|
1332
|
-
stderr | src/services/__tests__/storage.service.test.ts > StorageService > createStorageProviders > should fall back to memory when Redis connection fails
|
|
1333
|
-
[StorageService] Failed to connect to Redis, falling back to memory: Redis package not available
|
|
1334
|
-
|
|
1335
|
-
stderr | src/services/__tests__/storage.service.test.ts > StorageService > createStorageProviders > should use KV namespace when provided
|
|
1336
|
-
[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/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/storage.service.ts'
|
|
1337
|
-
|
|
1338
|
-
✓ src/services/__tests__/access-control.service.test.ts (23 tests) 34ms
|
|
1339
634
|
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
|
|
1340
635
|
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
1341
|
-
correlationId: '
|
|
636
|
+
correlationId: 'b45811d4-482a-41c8-9a2f-e2d9dc92705e',
|
|
1342
637
|
status: 200,
|
|
1343
638
|
statusText: undefined,
|
|
1344
639
|
headers: {},
|
|
1345
640
|
responseTextLength: 191,
|
|
1346
|
-
responseTextPreview: '{"success":true,"data":{"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}},"metadata":{"requestId":"test-request-id","timestamp":"2025-
|
|
1347
|
-
fullResponseText: '{"success":true,"data":{"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}},"metadata":{"requestId":"test-request-id","timestamp":"2025-
|
|
641
|
+
responseTextPreview: '{"success":true,"data":{"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}},"metadata":{"requestId":"test-request-id","timestamp":"2025-12-04T01:15:15.676Z"}}',
|
|
642
|
+
fullResponseText: '{"success":true,"data":{"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}},"metadata":{"requestId":"test-request-id","timestamp":"2025-12-04T01:15:15.676Z"}}'
|
|
1348
643
|
}
|
|
1349
644
|
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
1350
|
-
correlationId: '
|
|
645
|
+
correlationId: 'b45811d4-482a-41c8-9a2f-e2d9dc92705e',
|
|
1351
646
|
status: 200,
|
|
1352
647
|
responseDataType: 'object',
|
|
1353
648
|
responseDataKeys: [ 'success', 'data', 'metadata' ],
|
|
@@ -1365,7 +660,7 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1365
660
|
' },\n' +
|
|
1366
661
|
' "metadata": {\n' +
|
|
1367
662
|
' "requestId": "test-request-id",\n' +
|
|
1368
|
-
' "timestamp": "2025-
|
|
663
|
+
' "timestamp": "2025-12-04T01:15:15.676Z"\n' +
|
|
1369
664
|
' }\n' +
|
|
1370
665
|
'}'
|
|
1371
666
|
}
|
|
@@ -1383,11 +678,11 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1383
678
|
},
|
|
1384
679
|
"metadata": {
|
|
1385
680
|
"requestId": "test-request-id",
|
|
1386
|
-
"timestamp": "2025-
|
|
681
|
+
"timestamp": "2025-12-04T01:15:15.676Z"
|
|
1387
682
|
}
|
|
1388
683
|
}
|
|
1389
684
|
[AccessControl] 🔍 DATA OBJECT STRUCTURE (after deep clone): {
|
|
1390
|
-
correlationId: '
|
|
685
|
+
correlationId: 'b45811d4-482a-41c8-9a2f-e2d9dc92705e',
|
|
1391
686
|
dataKeys: [ 'accepted', 'rejected', 'outcomes' ],
|
|
1392
687
|
hasAccepted: true,
|
|
1393
688
|
hasRejected: true,
|
|
@@ -1413,7 +708,7 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1413
708
|
'}'
|
|
1414
709
|
}
|
|
1415
710
|
[AccessControl] 🔍 VALIDATING DATA WITH SUCCESS: {
|
|
1416
|
-
correlationId: '
|
|
711
|
+
correlationId: 'b45811d4-482a-41c8-9a2f-e2d9dc92705e',
|
|
1417
712
|
dataWithSuccessKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
|
|
1418
713
|
hasSuccess: true,
|
|
1419
714
|
successValue: true,
|
|
@@ -1438,7 +733,7 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1438
733
|
|
|
1439
734
|
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
|
|
1440
735
|
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
1441
|
-
correlationId: '
|
|
736
|
+
correlationId: '4b706886-8d05-4976-953d-9fabf77135ff',
|
|
1442
737
|
status: 200,
|
|
1443
738
|
statusText: undefined,
|
|
1444
739
|
headers: {},
|
|
@@ -1447,7 +742,7 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1447
742
|
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"}}'
|
|
1448
743
|
}
|
|
1449
744
|
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
1450
|
-
correlationId: '
|
|
745
|
+
correlationId: '4b706886-8d05-4976-953d-9fabf77135ff',
|
|
1451
746
|
status: 200,
|
|
1452
747
|
responseDataType: 'object',
|
|
1453
748
|
responseDataKeys: [ 'success', 'data', 'metadata' ],
|
|
@@ -1483,7 +778,7 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1483
778
|
}
|
|
1484
779
|
}
|
|
1485
780
|
[AccessControl] 🔍 DATA OBJECT STRUCTURE (after deep clone): {
|
|
1486
|
-
correlationId: '
|
|
781
|
+
correlationId: '4b706886-8d05-4976-953d-9fabf77135ff',
|
|
1487
782
|
dataKeys: [ 'accepted', 'rejected', 'outcomes', 'errors' ],
|
|
1488
783
|
hasAccepted: true,
|
|
1489
784
|
hasRejected: true,
|
|
@@ -1507,7 +802,7 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1507
802
|
'}'
|
|
1508
803
|
}
|
|
1509
804
|
[AccessControl] 🔍 VALIDATING DATA WITH SUCCESS: {
|
|
1510
|
-
correlationId: '
|
|
805
|
+
correlationId: '4b706886-8d05-4976-953d-9fabf77135ff',
|
|
1511
806
|
dataWithSuccessKeys: [ 'success', 'accepted', 'rejected', 'outcomes', 'errors' ],
|
|
1512
807
|
hasSuccess: true,
|
|
1513
808
|
successValue: true,
|
|
@@ -1530,16 +825,16 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1530
825
|
|
|
1531
826
|
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)
|
|
1532
827
|
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
1533
|
-
correlationId: '
|
|
828
|
+
correlationId: '3f8f79eb-d89f-4249-ba4c-770a006bc1be',
|
|
1534
829
|
status: 200,
|
|
1535
830
|
statusText: undefined,
|
|
1536
831
|
headers: {},
|
|
1537
832
|
responseTextLength: 151,
|
|
1538
|
-
responseTextPreview: '{"success":true,"data":{"accepted":0,"rejected":0,"outcomes":{},"errors":[]},"metadata":{"requestId":"test-id","timestamp":"2025-
|
|
1539
|
-
fullResponseText: '{"success":true,"data":{"accepted":0,"rejected":0,"outcomes":{},"errors":[]},"metadata":{"requestId":"test-id","timestamp":"2025-
|
|
833
|
+
responseTextPreview: '{"success":true,"data":{"accepted":0,"rejected":0,"outcomes":{},"errors":[]},"metadata":{"requestId":"test-id","timestamp":"2025-12-04T01:15:15.678Z"}}',
|
|
834
|
+
fullResponseText: '{"success":true,"data":{"accepted":0,"rejected":0,"outcomes":{},"errors":[]},"metadata":{"requestId":"test-id","timestamp":"2025-12-04T01:15:15.678Z"}}'
|
|
1540
835
|
}
|
|
1541
836
|
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
1542
|
-
correlationId: '
|
|
837
|
+
correlationId: '3f8f79eb-d89f-4249-ba4c-770a006bc1be',
|
|
1543
838
|
status: 200,
|
|
1544
839
|
responseDataType: 'object',
|
|
1545
840
|
responseDataKeys: [ 'success', 'data', 'metadata' ],
|
|
@@ -1553,7 +848,7 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1553
848
|
' },\n' +
|
|
1554
849
|
' "metadata": {\n' +
|
|
1555
850
|
' "requestId": "test-id",\n' +
|
|
1556
|
-
' "timestamp": "2025-
|
|
851
|
+
' "timestamp": "2025-12-04T01:15:15.678Z"\n' +
|
|
1557
852
|
' }\n' +
|
|
1558
853
|
'}'
|
|
1559
854
|
}
|
|
@@ -1567,11 +862,11 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1567
862
|
},
|
|
1568
863
|
"metadata": {
|
|
1569
864
|
"requestId": "test-id",
|
|
1570
|
-
"timestamp": "2025-
|
|
865
|
+
"timestamp": "2025-12-04T01:15:15.678Z"
|
|
1571
866
|
}
|
|
1572
867
|
}
|
|
1573
868
|
[AccessControl] 🔍 DATA OBJECT STRUCTURE (after deep clone): {
|
|
1574
|
-
correlationId: '
|
|
869
|
+
correlationId: '3f8f79eb-d89f-4249-ba4c-770a006bc1be',
|
|
1575
870
|
dataKeys: [ 'accepted', 'rejected', 'outcomes', 'errors' ],
|
|
1576
871
|
hasAccepted: true,
|
|
1577
872
|
hasRejected: true,
|
|
@@ -1588,7 +883,7 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1588
883
|
fullData: '{\n "accepted": 0,\n "rejected": 0,\n "outcomes": {},\n "errors": []\n}'
|
|
1589
884
|
}
|
|
1590
885
|
[AccessControl] 🔍 VALIDATING DATA WITH SUCCESS: {
|
|
1591
|
-
correlationId: '
|
|
886
|
+
correlationId: '3f8f79eb-d89f-4249-ba4c-770a006bc1be',
|
|
1592
887
|
dataWithSuccessKeys: [ 'success', 'accepted', 'rejected', 'outcomes', 'errors' ],
|
|
1593
888
|
hasSuccess: true,
|
|
1594
889
|
successValue: true,
|
|
@@ -1609,16 +904,16 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1609
904
|
|
|
1610
905
|
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
|
|
1611
906
|
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
1612
|
-
correlationId: '
|
|
907
|
+
correlationId: '662ba42a-700b-4338-88bc-5f11d41d121e',
|
|
1613
908
|
status: 200,
|
|
1614
909
|
statusText: undefined,
|
|
1615
910
|
headers: {},
|
|
1616
911
|
responseTextLength: 278,
|
|
1617
|
-
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-
|
|
1618
|
-
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-
|
|
912
|
+
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-12-04T01:15:15.678Z"}}',
|
|
913
|
+
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-12-04T01:15:15.678Z"}}'
|
|
1619
914
|
}
|
|
1620
915
|
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
1621
|
-
correlationId: '
|
|
916
|
+
correlationId: '662ba42a-700b-4338-88bc-5f11d41d121e',
|
|
1622
917
|
status: 200,
|
|
1623
918
|
responseDataType: 'object',
|
|
1624
919
|
responseDataKeys: [ 'success', 'data', 'metadata' ],
|
|
@@ -1645,7 +940,7 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1645
940
|
' },\n' +
|
|
1646
941
|
' "metadata": {\n' +
|
|
1647
942
|
' "requestId": "test-id",\n' +
|
|
1648
|
-
' "timestamp": "2025-
|
|
943
|
+
' "timestamp": "2025-12-04T01:15:15.678Z"\n' +
|
|
1649
944
|
' }\n' +
|
|
1650
945
|
'}'
|
|
1651
946
|
}
|
|
@@ -1672,11 +967,11 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1672
967
|
},
|
|
1673
968
|
"metadata": {
|
|
1674
969
|
"requestId": "test-id",
|
|
1675
|
-
"timestamp": "2025-
|
|
970
|
+
"timestamp": "2025-12-04T01:15:15.678Z"
|
|
1676
971
|
}
|
|
1677
972
|
}
|
|
1678
973
|
[AccessControl] 🔍 DATA OBJECT STRUCTURE (after deep clone): {
|
|
1679
|
-
correlationId: '
|
|
974
|
+
correlationId: '662ba42a-700b-4338-88bc-5f11d41d121e',
|
|
1680
975
|
dataKeys: [ 'accepted', 'rejected', 'outcomes', 'errors' ],
|
|
1681
976
|
hasAccepted: true,
|
|
1682
977
|
hasRejected: true,
|
|
@@ -1711,7 +1006,7 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1711
1006
|
'}'
|
|
1712
1007
|
}
|
|
1713
1008
|
[AccessControl] 🔍 VALIDATING DATA WITH SUCCESS: {
|
|
1714
|
-
correlationId: '
|
|
1009
|
+
correlationId: '662ba42a-700b-4338-88bc-5f11d41d121e',
|
|
1715
1010
|
dataWithSuccessKeys: [ 'success', 'accepted', 'rejected', 'outcomes', 'errors' ],
|
|
1716
1011
|
hasSuccess: true,
|
|
1717
1012
|
successValue: true,
|
|
@@ -1743,206 +1038,97 @@ stderr | src/services/__tests__/access-control.proof-response-validation.test.ts
|
|
|
1743
1038
|
'}'
|
|
1744
1039
|
}
|
|
1745
1040
|
|
|
1746
|
-
✓ src/services/__tests__/access-control.proof-response-validation.test.ts (12 tests)
|
|
1747
|
-
✓ src/
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
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)
|
|
1759
|
-
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)
|
|
1760
|
-
|
|
1761
|
-
stderr | src/services/__tests__/access-control.integration.test.ts > AccessControlApiService Integration > Proof Submission Flow > should submit proof end-to-end
|
|
1762
|
-
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
1763
|
-
correlationId: '5be6f8ae-ee53-4b5f-a627-da78df1494fb',
|
|
1764
|
-
status: 200,
|
|
1765
|
-
statusText: '',
|
|
1766
|
-
headers: { 'content-type': 'application/json' },
|
|
1767
|
-
responseTextLength: 100,
|
|
1768
|
-
responseTextPreview: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}',
|
|
1769
|
-
fullResponseText: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}'
|
|
1041
|
+
✓ src/services/__tests__/access-control.proof-response-validation.test.ts (12 tests) 54ms
|
|
1042
|
+
✓ src/__tests__/runtime/proof-client-did.test.ts (17 tests) 9ms
|
|
1043
|
+
✓ src/__tests__/runtime/base-extensions.test.ts (38 tests) 11ms
|
|
1044
|
+
✓ src/__tests__/runtime/base.test.ts (55 tests) 15ms
|
|
1045
|
+
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should allow tool execution when no protection required
|
|
1046
|
+
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should block tool execution when protection required and no delegation
|
|
1047
|
+
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
1048
|
+
[MCP-I] Checking tool protection: {
|
|
1049
|
+
tool: 'unprotectedTool',
|
|
1050
|
+
agentDid: 'did:key:zmock123...',
|
|
1051
|
+
tool: 'protectedTool',
|
|
1052
|
+
hasDelegation: false
|
|
1770
1053
|
}
|
|
1771
|
-
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
1772
|
-
correlationId: '5be6f8ae-ee53-4b5f-a627-da78df1494fb',
|
|
1773
|
-
status: 200,
|
|
1774
|
-
responseDataType: 'object',
|
|
1775
|
-
responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
|
|
1776
|
-
responseData: '{\n' +
|
|
1777
|
-
' "success": true,\n' +
|
|
1778
|
-
' "accepted": 1,\n' +
|
|
1779
|
-
' "rejected": 0,\n' +
|
|
1780
|
-
' "outcomes": {\n' +
|
|
1781
|
-
' "success": 1,\n' +
|
|
1782
|
-
' "failed": 0,\n' +
|
|
1783
|
-
' "blocked": 0,\n' +
|
|
1784
|
-
' "error": 0\n' +
|
|
1785
|
-
' }\n' +
|
|
1786
|
-
'}'
|
|
1787
|
-
}
|
|
1788
|
-
[AccessControl] Raw response received: {
|
|
1789
|
-
"success": true,
|
|
1790
|
-
"accepted": 1,
|
|
1791
|
-
"rejected": 0,
|
|
1792
|
-
"outcomes": {
|
|
1793
|
-
"success": 1,
|
|
1794
|
-
"failed": 0,
|
|
1795
|
-
"blocked": 0,
|
|
1796
|
-
"error": 0
|
|
1797
|
-
}
|
|
1798
|
-
}
|
|
1799
|
-
|
|
1800
|
-
stderr | src/services/__tests__/access-control.integration.test.ts > AccessControlApiService Integration > Proof Submission Flow > should handle proof submission with errors
|
|
1801
|
-
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
1802
|
-
correlationId: '1ceb40b1-e915-4474-97ee-d103432d8f85',
|
|
1803
|
-
status: 200,
|
|
1804
|
-
statusText: '',
|
|
1805
|
-
headers: { 'content-type': 'application/json' },
|
|
1806
|
-
responseTextLength: 200,
|
|
1807
|
-
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"}}]}',
|
|
1808
|
-
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"}}]}'
|
|
1809
|
-
}
|
|
1810
|
-
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
1811
|
-
correlationId: '1ceb40b1-e915-4474-97ee-d103432d8f85',
|
|
1812
|
-
status: 200,
|
|
1813
|
-
responseDataType: 'object',
|
|
1814
|
-
responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes', 'errors' ],
|
|
1815
|
-
responseData: '{\n' +
|
|
1816
|
-
' "success": true,\n' +
|
|
1817
|
-
' "accepted": 0,\n' +
|
|
1818
|
-
' "rejected": 1,\n' +
|
|
1819
|
-
' "outcomes": {\n' +
|
|
1820
|
-
' "success": 0,\n' +
|
|
1821
|
-
' "failed": 1,\n' +
|
|
1822
|
-
' "blocked": 0,\n' +
|
|
1823
|
-
' "error": 0\n' +
|
|
1824
|
-
' },\n' +
|
|
1825
|
-
' "errors": [\n' +
|
|
1826
|
-
' {\n' +
|
|
1827
|
-
' "proof_index": 0,\n' +
|
|
1828
|
-
' "error": {\n' +
|
|
1829
|
-
' "code": "invalid_signature",\n' +
|
|
1830
|
-
' "message": "Invalid JWS signature"\n' +
|
|
1831
|
-
' }\n' +
|
|
1832
|
-
' }\n' +
|
|
1833
|
-
' ]\n' +
|
|
1834
|
-
'}'
|
|
1835
|
-
}
|
|
1836
|
-
[AccessControl] Raw response received: {
|
|
1837
|
-
"success": true,
|
|
1838
|
-
"accepted": 0,
|
|
1839
|
-
"rejected": 1,
|
|
1840
|
-
"outcomes": {
|
|
1841
|
-
"success": 0,
|
|
1842
|
-
"failed": 1,
|
|
1843
|
-
"blocked": 0,
|
|
1844
|
-
"error": 0
|
|
1845
|
-
},
|
|
1846
|
-
"errors": [
|
|
1847
|
-
{
|
|
1848
|
-
"proof_index": 0,
|
|
1849
|
-
"error": {
|
|
1850
|
-
"code": "invalid_signature",
|
|
1851
|
-
"message": "Invalid JWS signature"
|
|
1852
|
-
}
|
|
1853
|
-
}
|
|
1854
|
-
]
|
|
1855
|
-
}
|
|
1856
|
-
|
|
1857
|
-
stderr | src/services/__tests__/access-control.integration.test.ts > AccessControlApiService Integration > Proof Verification Flow > should verify proof using ProofVerifier
|
|
1858
|
-
[CryptoService] Key ID mismatch
|
|
1859
1054
|
|
|
1860
|
-
✓ src/__tests__/cache/tool-protection-cache.test.ts (49 tests) 210ms
|
|
1861
|
-
✓ src/__tests__/runtime/base.test.ts (55 tests) 35ms
|
|
1862
1055
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should allow tool execution when no protection required
|
|
1863
|
-
|
|
1864
|
-
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
1865
|
-
tool: 'protectedTool',
|
|
1056
|
+
[MCP-I] Tool protection check passed (no delegation required) {
|
|
1866
1057
|
requiredScopes: [ 'files:write' ],
|
|
1867
|
-
[MCP-I] Checking tool protection: {
|
|
1868
1058
|
tool: 'unprotectedTool',
|
|
1869
1059
|
agentDid: 'did:key:zmock123...',
|
|
1870
|
-
|
|
1060
|
+
reason: 'Tool not configured to require delegation'
|
|
1061
|
+
}
|
|
1871
1062
|
agentDid: 'did:key:zmock123...',
|
|
1872
|
-
|
|
1063
|
+
resumeToken: 'resume_bx55kc_miqquppj',
|
|
1064
|
+
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_bx55kc_miqquppj'
|
|
1873
1065
|
}
|
|
1874
1066
|
|
|
1875
|
-
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should allow tool execution when no protection required
|
|
1876
|
-
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_gxa3v_mig63sgc'
|
|
1877
|
-
}
|
|
1878
1067
|
|
|
1879
1068
|
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should block tool execution when delegation verification fails
|
|
1880
|
-
[MCP-I] Tool protection check passed (no delegation required) {
|
|
1881
|
-
tool: 'unprotectedTool',
|
|
1882
|
-
[MCP-I] ❌ Delegation verification FAILED {
|
|
1883
|
-
agentDid: 'did:key:zmock123...',
|
|
1884
|
-
reason: 'Tool not configured to require delegation'
|
|
1885
|
-
}
|
|
1886
|
-
|
|
1887
|
-
tool: 'protectedTool',
|
|
1888
1069
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should block tool execution when protection required and no delegation
|
|
1889
1070
|
[MCP-I] Checking tool protection: {
|
|
1890
|
-
|
|
1071
|
+
[MCP-I] ❌ Delegation verification FAILED {
|
|
1072
|
+
tool: 'protectedTool',
|
|
1891
1073
|
tool: 'protectedTool',
|
|
1892
1074
|
agentDid: 'did:key:zmock123...',
|
|
1893
1075
|
hasDelegation: false
|
|
1894
|
-
reason: 'Delegation token expired',
|
|
1895
1076
|
}
|
|
1077
|
+
agentDid: 'did:key:zmock123...',
|
|
1896
1078
|
|
|
1897
|
-
errorCode: undefined,
|
|
1898
1079
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should allow tool execution when protection required and delegation provided
|
|
1899
|
-
errorMessage: undefined,
|
|
1900
1080
|
[MCP-I] Checking tool protection: {
|
|
1081
|
+
reason: 'Delegation token expired',
|
|
1901
1082
|
tool: 'protectedTool',
|
|
1902
1083
|
agentDid: 'did:key:zmock123...',
|
|
1903
|
-
|
|
1084
|
+
errorCode: undefined,
|
|
1085
|
+
errorMessage: undefined,
|
|
1904
1086
|
requiredScopes: [ 'files:write' ]
|
|
1087
|
+
hasDelegation: true
|
|
1905
1088
|
}
|
|
1089
|
+
|
|
1906
1090
|
}
|
|
1907
1091
|
|
|
1908
1092
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should allow tool execution when protection required and delegation provided
|
|
1909
1093
|
[MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
|
|
1910
1094
|
tool: 'protectedTool',
|
|
1095
|
+
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
|
|
1911
1096
|
agentDid: 'did:key:zmock123...',
|
|
1912
1097
|
hasDelegationToken: true,
|
|
1913
|
-
|
|
1914
|
-
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
|
|
1915
|
-
hasConsentProof: false,
|
|
1916
1098
|
[MCP-I] ❌ Delegation verification FAILED {
|
|
1099
|
+
hasConsentProof: false,
|
|
1917
1100
|
requiredScopes: [ 'files:write' ]
|
|
1918
1101
|
}
|
|
1919
1102
|
|
|
1920
1103
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should allow tool execution when protection required and delegation provided
|
|
1921
|
-
[MCP-I] ✅ Delegation verification SUCCEEDED {
|
|
1922
1104
|
tool: 'protectedTool',
|
|
1105
|
+
[MCP-I] ✅ Delegation verification SUCCEEDED {
|
|
1923
1106
|
tool: 'protectedTool',
|
|
1924
1107
|
agentDid: 'did:key:zmock123...',
|
|
1108
|
+
delegationId: 'test-delegation-id',
|
|
1925
1109
|
agentDid: 'did:key:zmock123...',
|
|
1926
1110
|
reason: 'Insufficient scopes',
|
|
1927
|
-
delegationId: 'test-delegation-id',
|
|
1928
1111
|
credentialScopes: [ 'files:write' ],
|
|
1929
|
-
errorCode: undefined,
|
|
1930
1112
|
requiredScopes: [ 'files:write' ]
|
|
1931
1113
|
}
|
|
1932
|
-
errorMessage: undefined,
|
|
1933
|
-
requiredScopes: [ 'files:write' ]
|
|
1934
1114
|
|
|
1115
|
+
errorCode: undefined,
|
|
1935
1116
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should allow tool execution when protection required and consentProof provided
|
|
1117
|
+
errorMessage: undefined,
|
|
1118
|
+
requiredScopes: [ 'files:write' ]
|
|
1936
1119
|
[MCP-I] Checking tool protection: {
|
|
1937
1120
|
tool: 'protectedTool',
|
|
1938
|
-
agentDid: 'did:key:zmock123...',
|
|
1939
1121
|
}
|
|
1940
1122
|
|
|
1123
|
+
agentDid: 'did:key:zmock123...',
|
|
1941
1124
|
hasDelegation: true
|
|
1942
1125
|
}
|
|
1126
|
+
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should handle API errors during verification gracefully
|
|
1943
1127
|
|
|
1128
|
+
[MCP-I] ❌ Delegation verification error (API failure) {
|
|
1944
1129
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should allow tool execution when protection required and consentProof provided
|
|
1945
1130
|
[MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
|
|
1131
|
+
tool: 'protectedTool',
|
|
1946
1132
|
tool: 'protectedTool',
|
|
1947
1133
|
agentDid: 'did:key:zmock123...',
|
|
1948
1134
|
hasDelegationToken: false,
|
|
@@ -1950,6 +1136,7 @@ stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntime
|
|
|
1950
1136
|
requiredScopes: [ 'files:write' ]
|
|
1951
1137
|
}
|
|
1952
1138
|
|
|
1139
|
+
agentDid: 'did:key:zmock123...',
|
|
1953
1140
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should allow tool execution when protection required and consentProof provided
|
|
1954
1141
|
[MCP-I] ✅ Delegation verification SUCCEEDED {
|
|
1955
1142
|
tool: 'protectedTool',
|
|
@@ -1957,6 +1144,7 @@ stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntime
|
|
|
1957
1144
|
delegationId: 'test-delegation-id',
|
|
1958
1145
|
credentialScopes: [ 'files:write' ],
|
|
1959
1146
|
requiredScopes: [ 'files:write' ]
|
|
1147
|
+
errorCode: 'network_error',
|
|
1960
1148
|
}
|
|
1961
1149
|
|
|
1962
1150
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should block tool execution when delegation verification fails
|
|
@@ -1967,7 +1155,9 @@ stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntime
|
|
|
1967
1155
|
}
|
|
1968
1156
|
|
|
1969
1157
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should block tool execution when delegation verification fails
|
|
1158
|
+
errorMessage: 'API unavailable',
|
|
1970
1159
|
[MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
|
|
1160
|
+
errorDetails: {}
|
|
1971
1161
|
tool: 'protectedTool',
|
|
1972
1162
|
agentDid: 'did:key:zmock123...',
|
|
1973
1163
|
hasDelegationToken: true,
|
|
@@ -1975,240 +1165,271 @@ stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntime
|
|
|
1975
1165
|
requiredScopes: [ 'files:write' ]
|
|
1976
1166
|
}
|
|
1977
1167
|
|
|
1168
|
+
}
|
|
1169
|
+
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)
|
|
1170
|
+
|
|
1171
|
+
[MCP-I] ⚠️ Delegation token provided but AccessControlApiService not configured - skipping verification {
|
|
1172
|
+
tool: 'protectedTool',
|
|
1978
1173
|
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
|
|
1174
|
+
agentDid: 'did:key:zmock123...',
|
|
1979
1175
|
[MCP-I] Checking tool protection: {
|
|
1980
1176
|
tool: 'protectedTool',
|
|
1177
|
+
hasDelegationToken: true,
|
|
1981
1178
|
agentDid: 'did:key:zmock123...',
|
|
1982
1179
|
hasDelegation: true
|
|
1983
1180
|
}
|
|
1181
|
+
hasConsentProof: false
|
|
1984
1182
|
|
|
1985
1183
|
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
|
|
1986
1184
|
[MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
|
|
1185
|
+
}
|
|
1987
1186
|
tool: 'protectedTool',
|
|
1988
1187
|
agentDid: 'did:key:zmock123...',
|
|
1989
1188
|
hasDelegationToken: true,
|
|
1189
|
+
|
|
1190
|
+
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
|
|
1990
1191
|
hasConsentProof: false,
|
|
1991
1192
|
requiredScopes: [ 'files:write' ]
|
|
1193
|
+
[MCP-I] 🔒 SECURITY: User identifier validation FAILED {
|
|
1992
1194
|
}
|
|
1195
|
+
tool: 'protectedTool',
|
|
1196
|
+
agentDid: 'did:key:zmock123...',
|
|
1993
1197
|
|
|
1994
|
-
✓ src/services/__tests__/proof-verifier.test.ts (21 tests) 31ms
|
|
1995
1198
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should handle API errors during verification gracefully
|
|
1199
|
+
delegationUserIdentifier: 'did:key:zUserB987654...',
|
|
1996
1200
|
[MCP-I] Checking tool protection: {
|
|
1997
1201
|
tool: 'protectedTool',
|
|
1998
1202
|
agentDid: 'did:key:zmock123...',
|
|
1999
|
-
|
|
1203
|
+
sessionUserDid: 'did:key:zUserA123456...',
|
|
2000
1204
|
hasDelegation: true
|
|
2001
1205
|
}
|
|
1206
|
+
sessionId: 'session123...',
|
|
2002
1207
|
|
|
2003
1208
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should handle API errors during verification gracefully
|
|
2004
|
-
|
|
1209
|
+
reason: 'user_identifier_mismatch',
|
|
1210
|
+
severity: 'high'
|
|
1211
|
+
}
|
|
2005
1212
|
[MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
|
|
2006
|
-
tool: 'protectedTool',
|
|
2007
1213
|
tool: 'protectedTool',
|
|
2008
1214
|
agentDid: 'did:key:zmock123...',
|
|
2009
|
-
|
|
1215
|
+
|
|
2010
1216
|
hasDelegationToken: true,
|
|
1217
|
+
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
|
|
2011
1218
|
hasConsentProof: false,
|
|
2012
|
-
errorCode: 'network_error',
|
|
2013
1219
|
requiredScopes: [ 'files:write' ]
|
|
2014
1220
|
}
|
|
2015
|
-
errorMessage: 'API unavailable',
|
|
2016
1221
|
|
|
2017
|
-
|
|
1222
|
+
[MCP-I] ⚠️ Delegation has user_identifier but session missing userDid {
|
|
2018
1223
|
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)
|
|
2019
1224
|
[MCP-I] Checking tool protection: {
|
|
2020
1225
|
tool: 'protectedTool',
|
|
2021
1226
|
agentDid: 'did:key:zmock123...',
|
|
1227
|
+
tool: 'protectedTool',
|
|
2022
1228
|
hasDelegation: true
|
|
2023
1229
|
}
|
|
2024
|
-
|
|
2025
|
-
}
|
|
2026
|
-
|
|
2027
|
-
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)
|
|
2028
|
-
[MCP-I] ⚠️ Delegation token provided but AccessControlApiService not configured - skipping verification {
|
|
2029
|
-
tool: 'protectedTool',
|
|
2030
1230
|
agentDid: 'did:key:zmock123...',
|
|
2031
|
-
|
|
2032
|
-
hasConsentProof: false
|
|
2033
|
-
}
|
|
1231
|
+
delegationUserIdentifier: 'did:key:zUserA123456...',
|
|
2034
1232
|
|
|
2035
1233
|
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
|
|
1234
|
+
sessionId: 'session123...'
|
|
2036
1235
|
[MCP-I] Checking tool protection: {
|
|
2037
|
-
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
|
|
2038
1236
|
tool: 'protectedTool',
|
|
2039
1237
|
agentDid: 'did:key:zmock123...',
|
|
2040
|
-
|
|
1238
|
+
}
|
|
1239
|
+
|
|
2041
1240
|
hasDelegation: true
|
|
2042
1241
|
}
|
|
2043
|
-
tool: 'protectedTool',
|
|
2044
1242
|
|
|
2045
|
-
|
|
2046
|
-
delegationUserIdentifier: 'did:key:zUserB987654...',
|
|
1243
|
+
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
|
|
2047
1244
|
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
|
|
2048
1245
|
[MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
|
|
1246
|
+
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
2049
1247
|
tool: 'protectedTool',
|
|
2050
|
-
sessionUserDid: 'did:key:zUserA123456...',
|
|
2051
|
-
sessionId: 'session123...',
|
|
2052
|
-
reason: 'user_identifier_mismatch',
|
|
2053
|
-
severity: 'high'
|
|
2054
1248
|
agentDid: 'did:key:zmock123...',
|
|
2055
|
-
}
|
|
2056
1249
|
hasDelegationToken: true,
|
|
2057
|
-
|
|
2058
1250
|
hasConsentProof: false,
|
|
2059
1251
|
requiredScopes: [ 'files:write' ]
|
|
1252
|
+
tool: 'protectedTool',
|
|
1253
|
+
requiredScopes: [ 'files:write' ],
|
|
1254
|
+
agentDid: 'did:key:zmock123...',
|
|
2060
1255
|
}
|
|
2061
1256
|
|
|
1257
|
+
resumeToken: 'resume_bx55g1_miqquppo',
|
|
2062
1258
|
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
|
|
2063
1259
|
[MCP-I] Checking tool protection: {
|
|
2064
1260
|
tool: 'protectedTool',
|
|
2065
1261
|
agentDid: 'did:key:zmock123...',
|
|
1262
|
+
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_bx55g1_miqquppo'
|
|
2066
1263
|
hasDelegation: true
|
|
2067
1264
|
}
|
|
2068
1265
|
|
|
1266
|
+
}
|
|
2069
1267
|
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
|
|
2070
1268
|
[MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
|
|
2071
1269
|
tool: 'protectedTool',
|
|
2072
1270
|
agentDid: 'did:key:zmock123...',
|
|
1271
|
+
|
|
2073
1272
|
hasDelegationToken: true,
|
|
2074
1273
|
hasConsentProof: false,
|
|
2075
1274
|
requiredScopes: [ 'files:write' ]
|
|
2076
1275
|
}
|
|
2077
1276
|
|
|
2078
1277
|
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
|
|
1278
|
+
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include tool name in error
|
|
1279
|
+
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
1280
|
+
tool: 'protectedTool',
|
|
2079
1281
|
[MCP-I] ✅ User identifier validation PASSED {
|
|
2080
1282
|
tool: 'protectedTool',
|
|
2081
1283
|
agentDid: 'did:key:zmock123...',
|
|
1284
|
+
requiredScopes: [ 'files:write' ],
|
|
1285
|
+
agentDid: 'did:key:zmock123...',
|
|
2082
1286
|
userDid: 'did:key:zUserA123456...',
|
|
2083
1287
|
sessionId: 'session123...'
|
|
2084
1288
|
}
|
|
2085
1289
|
[MCP-I] ✅ Delegation verification SUCCEEDED {
|
|
2086
1290
|
tool: 'protectedTool',
|
|
1291
|
+
resumeToken: 'resume_bx55g1_miqquppo',
|
|
1292
|
+
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_bx55g1_miqquppo'
|
|
1293
|
+
}
|
|
1294
|
+
|
|
2087
1295
|
agentDid: 'did:key:zmock123...',
|
|
2088
1296
|
delegationId: 'test-delegation-id',
|
|
1297
|
+
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include required scopes in error
|
|
1298
|
+
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
2089
1299
|
credentialScopes: [ 'files:write' ],
|
|
2090
1300
|
requiredScopes: [ 'files:write' ]
|
|
1301
|
+
tool: 'protectedTool',
|
|
2091
1302
|
}
|
|
1303
|
+
requiredScopes: [ 'files:write', 'files:read' ],
|
|
1304
|
+
agentDid: 'did:key:zmock123...',
|
|
1305
|
+
resumeToken: 'resume_bx55g1_miqquppo',
|
|
1306
|
+
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite%2Cfiles%3Aread&session_id=session123&agent_did=&resume_token=resume_bx55g1_miqquppo'
|
|
2092
1307
|
|
|
2093
1308
|
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)
|
|
2094
1309
|
[MCP-I] Checking tool protection: {
|
|
1310
|
+
}
|
|
2095
1311
|
tool: 'protectedTool',
|
|
2096
1312
|
agentDid: 'did:key:zmock123...',
|
|
1313
|
+
|
|
1314
|
+
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include consent URL in error
|
|
2097
1315
|
hasDelegation: true
|
|
1316
|
+
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
1317
|
+
tool: 'protectedTool',
|
|
2098
1318
|
}
|
|
2099
1319
|
|
|
2100
1320
|
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)
|
|
1321
|
+
requiredScopes: [ 'files:write' ],
|
|
2101
1322
|
[MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
|
|
2102
1323
|
tool: 'protectedTool',
|
|
2103
1324
|
agentDid: 'did:key:zmock123...',
|
|
1325
|
+
agentDid: 'did:key:zmock123...',
|
|
2104
1326
|
hasDelegationToken: true,
|
|
2105
1327
|
hasConsentProof: false,
|
|
2106
1328
|
requiredScopes: [ 'files:write' ]
|
|
1329
|
+
resumeToken: 'resume_bx55g1_miqquppo',
|
|
2107
1330
|
}
|
|
1331
|
+
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_bx55g1_miqquppo'
|
|
1332
|
+
}
|
|
1333
|
+
|
|
2108
1334
|
|
|
1335
|
+
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include resume token in error
|
|
2109
1336
|
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)
|
|
2110
1337
|
[MCP-I] ✅ Delegation verification SUCCEEDED {
|
|
1338
|
+
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
1339
|
+
tool: 'protectedTool',
|
|
2111
1340
|
tool: 'protectedTool',
|
|
2112
1341
|
agentDid: 'did:key:zmock123...',
|
|
1342
|
+
requiredScopes: [ 'files:write' ],
|
|
2113
1343
|
delegationId: 'test-delegation-id',
|
|
2114
1344
|
credentialScopes: [ 'files:write' ],
|
|
1345
|
+
agentDid: 'did:key:zmock123...',
|
|
1346
|
+
resumeToken: 'resume_bx55g1_miqquppp',
|
|
1347
|
+
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_bx55g1_miqquppp'
|
|
1348
|
+
}
|
|
2115
1349
|
requiredScopes: [ 'files:write' ]
|
|
2116
1350
|
}
|
|
2117
1351
|
|
|
1352
|
+
|
|
1353
|
+
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include intercepted call context in error
|
|
2118
1354
|
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
|
|
1355
|
+
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
2119
1356
|
[MCP-I] Checking tool protection: {
|
|
2120
1357
|
tool: 'protectedTool',
|
|
2121
1358
|
agentDid: 'did:key:zmock123...',
|
|
2122
1359
|
hasDelegation: true
|
|
2123
1360
|
}
|
|
1361
|
+
tool: 'protectedTool',
|
|
2124
1362
|
|
|
2125
1363
|
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
|
|
1364
|
+
requiredScopes: [ 'files:write' ],
|
|
2126
1365
|
[MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
|
|
1366
|
+
agentDid: 'did:key:zmock123...',
|
|
2127
1367
|
tool: 'protectedTool',
|
|
2128
1368
|
agentDid: 'did:key:zmock123...',
|
|
2129
1369
|
hasDelegationToken: true,
|
|
2130
|
-
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
|
|
2131
1370
|
hasConsentProof: false,
|
|
2132
1371
|
requiredScopes: [ 'files:write' ]
|
|
2133
1372
|
}
|
|
2134
|
-
[MCP-I] ⚠️ Delegation has user_identifier but session missing userDid {
|
|
2135
1373
|
|
|
2136
1374
|
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
|
|
2137
|
-
tool: 'protectedTool',
|
|
2138
|
-
agentDid: 'did:key:zmock123...',
|
|
2139
|
-
delegationUserIdentifier: 'did:key:zUserA123456...',
|
|
2140
1375
|
[MCP-I] ✅ Delegation verification SUCCEEDED {
|
|
2141
1376
|
tool: 'protectedTool',
|
|
2142
1377
|
agentDid: 'did:key:zmock123...',
|
|
2143
1378
|
delegationId: 'test-delegation-id',
|
|
2144
1379
|
credentialScopes: [ 'files:write' ],
|
|
2145
|
-
sessionId: 'session123...'
|
|
2146
1380
|
requiredScopes: [ 'files:write' ]
|
|
1381
|
+
resumeToken: 'resume_49l1t5_miqquppp',
|
|
2147
1382
|
}
|
|
2148
1383
|
|
|
2149
1384
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should create proof after successful tool execution
|
|
2150
1385
|
[MCP-I] Checking tool protection: {
|
|
2151
|
-
}
|
|
2152
|
-
|
|
2153
1386
|
tool: 'unprotectedTool',
|
|
1387
|
+
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_49l1t5_miqquppp'
|
|
2154
1388
|
agentDid: 'did:key:zmock123...',
|
|
2155
1389
|
hasDelegation: false
|
|
2156
1390
|
}
|
|
2157
1391
|
|
|
2158
1392
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should create proof after successful tool execution
|
|
1393
|
+
}
|
|
2159
1394
|
[MCP-I] Tool protection check passed (no delegation required) {
|
|
2160
1395
|
tool: 'unprotectedTool',
|
|
2161
1396
|
agentDid: 'did:key:zmock123...',
|
|
2162
1397
|
reason: 'Tool not configured to require delegation'
|
|
2163
1398
|
}
|
|
2164
1399
|
|
|
1400
|
+
|
|
1401
|
+
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle empty required scopes array
|
|
2165
1402
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should not create proof when tool execution is blocked
|
|
2166
1403
|
[MCP-I] Checking tool protection: {
|
|
2167
1404
|
tool: 'protectedTool',
|
|
1405
|
+
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
2168
1406
|
agentDid: 'did:key:zmock123...',
|
|
2169
1407
|
hasDelegation: false
|
|
1408
|
+
tool: 'protectedTool',
|
|
2170
1409
|
}
|
|
1410
|
+
requiredScopes: [],
|
|
1411
|
+
agentDid: 'did:key:zmock123...',
|
|
2171
1412
|
|
|
2172
|
-
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
|
|
2173
1413
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include tool name in error
|
|
1414
|
+
resumeToken: 'resume_bx55eb_miqquppq',
|
|
2174
1415
|
[MCP-I] Checking tool protection: {
|
|
2175
1416
|
tool: 'protectedTool',
|
|
2176
1417
|
agentDid: 'did:key:zmock123...',
|
|
1418
|
+
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=&session_id=session123&agent_did=&resume_token=resume_bx55eb_miqquppq'
|
|
1419
|
+
}
|
|
2177
1420
|
hasDelegation: false
|
|
1421
|
+
|
|
2178
1422
|
}
|
|
2179
1423
|
|
|
2180
|
-
|
|
1424
|
+
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle multiple required scopes
|
|
1425
|
+
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include required scopes in error
|
|
1426
|
+
[MCP-I] Checking tool protection: {
|
|
2181
1427
|
tool: 'protectedTool',
|
|
2182
|
-
requiredScopes: [ 'files:write' ],
|
|
2183
1428
|
agentDid: 'did:key:zmock123...',
|
|
2184
|
-
|
|
2185
|
-
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_gx8nc_mig63sgv'
|
|
1429
|
+
hasDelegation: false
|
|
2186
1430
|
}
|
|
2187
|
-
|
|
2188
|
-
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include tool name in error
|
|
2189
|
-
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
2190
|
-
tool: 'protectedTool',
|
|
2191
|
-
requiredScopes: [ 'files:write' ],
|
|
2192
|
-
agentDid: 'did:key:zmock123...',
|
|
2193
|
-
resumeToken: 'resume_gx8nc_mig63sgv',
|
|
2194
|
-
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_gx8nc_mig63sgv'
|
|
2195
|
-
}
|
|
2196
|
-
|
|
2197
|
-
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include required scopes in error
|
|
2198
|
-
[MCP-I] Checking tool protection: {
|
|
2199
|
-
tool: 'protectedTool',
|
|
2200
|
-
agentDid: 'did:key:zmock123...',
|
|
2201
|
-
hasDelegation: false
|
|
2202
|
-
}
|
|
2203
|
-
|
|
2204
|
-
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include required scopes in error
|
|
2205
1431
|
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
2206
1432
|
tool: 'protectedTool',
|
|
2207
|
-
requiredScopes: [ 'files:write', 'files:read' ],
|
|
2208
|
-
agentDid: 'did:key:zmock123...',
|
|
2209
|
-
resumeToken: 'resume_gx8nc_mig63sgw',
|
|
2210
|
-
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite%2Cfiles%3Aread&session_id=session123&agent_did=&resume_token=resume_gx8nc_mig63sgw'
|
|
2211
|
-
}
|
|
2212
1433
|
|
|
2213
1434
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include consent URL in error
|
|
2214
1435
|
[MCP-I] Checking tool protection: {
|
|
@@ -2217,52 +1438,39 @@ stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntime
|
|
|
2217
1438
|
hasDelegation: false
|
|
2218
1439
|
}
|
|
2219
1440
|
|
|
2220
|
-
|
|
2221
|
-
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
2222
|
-
tool: 'protectedTool',
|
|
2223
|
-
requiredScopes: [ 'files:write' ],
|
|
2224
|
-
agentDid: 'did:key:zmock123...',
|
|
2225
|
-
resumeToken: 'resume_gx8mh_mig63sgw',
|
|
2226
|
-
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_gx8mh_mig63sgw'
|
|
2227
|
-
}
|
|
2228
|
-
|
|
1441
|
+
requiredScopes: [ 'scope1', 'scope2', 'scope3' ],
|
|
2229
1442
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include resume token in error
|
|
2230
1443
|
[MCP-I] Checking tool protection: {
|
|
2231
1444
|
tool: 'protectedTool',
|
|
2232
1445
|
agentDid: 'did:key:zmock123...',
|
|
1446
|
+
resumeToken: 'resume_bx55eb_miqquppq',
|
|
1447
|
+
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=scope1%2Cscope2%2Cscope3&session_id=session123&agent_did=&resume_token=resume_bx55eb_miqquppq'
|
|
1448
|
+
agentDid: 'did:key:zmock123...',
|
|
2233
1449
|
hasDelegation: false
|
|
2234
1450
|
}
|
|
2235
|
-
|
|
2236
|
-
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include resume token in error
|
|
2237
|
-
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
2238
|
-
tool: 'protectedTool',
|
|
2239
|
-
requiredScopes: [ 'files:write' ],
|
|
2240
|
-
agentDid: 'did:key:zmock123...',
|
|
2241
|
-
resumeToken: 'resume_gx8mh_mig63sgw',
|
|
2242
|
-
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_gx8mh_mig63sgw'
|
|
2243
1451
|
}
|
|
2244
1452
|
|
|
1453
|
+
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle session without id
|
|
1454
|
+
|
|
2245
1455
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include intercepted call context in error
|
|
2246
1456
|
[MCP-I] Checking tool protection: {
|
|
2247
1457
|
tool: 'protectedTool',
|
|
1458
|
+
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
2248
1459
|
agentDid: 'did:key:zmock123...',
|
|
2249
1460
|
hasDelegation: false
|
|
2250
1461
|
}
|
|
2251
1462
|
|
|
2252
|
-
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include intercepted call context in error
|
|
2253
|
-
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
2254
1463
|
tool: 'protectedTool',
|
|
2255
|
-
requiredScopes: [ 'files:write' ],
|
|
2256
|
-
agentDid: 'did:key:zmock123...',
|
|
2257
|
-
resumeToken: 'resume_fpsylu_mig63sgw',
|
|
2258
|
-
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_fpsylu_mig63sgw'
|
|
2259
|
-
}
|
|
2260
|
-
|
|
2261
1464
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > audit logging > should log tool protection check when audit enabled
|
|
1465
|
+
requiredScopes: [ 'files:write' ],
|
|
2262
1466
|
[MCP-I] Checking tool protection: {
|
|
1467
|
+
agentDid: 'did:key:zmock123...',
|
|
2263
1468
|
tool: 'testTool',
|
|
2264
1469
|
agentDid: 'did:key:zmock123...',
|
|
1470
|
+
resumeToken: 'resume_14wv0f_miqquppq',
|
|
2265
1471
|
hasDelegation: false
|
|
1472
|
+
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=&agent_did=&resume_token=resume_14wv0f_miqquppq'
|
|
1473
|
+
}
|
|
2266
1474
|
}
|
|
2267
1475
|
|
|
2268
1476
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > audit logging > should log tool protection check when audit enabled
|
|
@@ -2270,21 +1478,30 @@ stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntime
|
|
|
2270
1478
|
tool: 'testTool',
|
|
2271
1479
|
agentDid: 'did:key:zmock123...',
|
|
2272
1480
|
reason: 'Tool not configured to require delegation'
|
|
1481
|
+
|
|
2273
1482
|
}
|
|
1483
|
+
stderr | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > AgentShield integration flow > should use fallback config when API fails
|
|
1484
|
+
[ToolProtectionService] API fetch failed, using fallback config { agentDid: 'did:key:z6MkhaXgBZDv...', error: 'Network error' }
|
|
2274
1485
|
|
|
2275
1486
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > audit logging > should log blocked tool call when audit enabled
|
|
2276
1487
|
[MCP-I] Checking tool protection: {
|
|
2277
1488
|
tool: 'protectedTool',
|
|
1489
|
+
|
|
2278
1490
|
agentDid: 'did:key:zmock123...',
|
|
2279
1491
|
hasDelegation: false
|
|
2280
1492
|
}
|
|
2281
1493
|
|
|
1494
|
+
stderr | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Error handling in full flow > should handle tool protection service errors gracefully
|
|
2282
1495
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > tool protection service integration > should use agent DID from identity for protection check
|
|
2283
1496
|
[MCP-I] Checking tool protection: {
|
|
2284
1497
|
tool: 'testTool',
|
|
2285
1498
|
agentDid: 'did:key:zmock123...',
|
|
1499
|
+
[ToolProtectionService] API fetch failed, no fallback, failing closed (deny-all) {
|
|
2286
1500
|
hasDelegation: false
|
|
1501
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2287
1502
|
}
|
|
1503
|
+
error: 'Network error',
|
|
1504
|
+
cacheKey: 'config:tool-protections:test-project'
|
|
2288
1505
|
|
|
2289
1506
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > tool protection service integration > should use agent DID from identity for protection check
|
|
2290
1507
|
[MCP-I] Tool protection check passed (no delegation required) {
|
|
@@ -2296,278 +1513,1441 @@ stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntime
|
|
|
2296
1513
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > tool protection service integration > should handle tool protection service errors gracefully
|
|
2297
1514
|
[MCP-I] Checking tool protection: {
|
|
2298
1515
|
tool: 'testTool',
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
stderr | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Error handling in full flow > should handle network timeouts
|
|
1519
|
+
[ToolProtectionService] API fetch failed, using fallback config { agentDid: 'did:key:z6MkhaXgBZDv...', error: 'Network timeout' }
|
|
1520
|
+
|
|
2299
1521
|
agentDid: 'did:key:zmock123...',
|
|
2300
1522
|
hasDelegation: false
|
|
1523
|
+
stderr | src/services/__tests__/access-control.integration.test.ts > AccessControlApiService Integration > Proof Submission Flow > should submit proof end-to-end
|
|
2301
1524
|
}
|
|
2302
1525
|
|
|
2303
1526
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle empty required scopes array
|
|
2304
1527
|
[MCP-I] Checking tool protection: {
|
|
2305
1528
|
tool: 'protectedTool',
|
|
1529
|
+
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
1530
|
+
correlationId: '00db17b8-fc23-47b8-9e6c-109b226b7a8e',
|
|
2306
1531
|
agentDid: 'did:key:zmock123...',
|
|
2307
1532
|
hasDelegation: false
|
|
2308
1533
|
}
|
|
2309
1534
|
|
|
2310
|
-
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle empty required scopes array
|
|
2311
|
-
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
2312
|
-
tool: 'protectedTool',
|
|
2313
|
-
requiredScopes: [],
|
|
2314
|
-
agentDid: 'did:key:zmock123...',
|
|
2315
|
-
resumeToken: 'resume_gx7z8_mig63sh2',
|
|
2316
|
-
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=&session_id=session123&agent_did=&resume_token=resume_gx7z8_mig63sh2'
|
|
2317
|
-
}
|
|
2318
|
-
|
|
2319
1535
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle multiple required scopes
|
|
2320
1536
|
[MCP-I] Checking tool protection: {
|
|
2321
1537
|
tool: 'protectedTool',
|
|
1538
|
+
status: 200,
|
|
1539
|
+
statusText: '',
|
|
2322
1540
|
agentDid: 'did:key:zmock123...',
|
|
2323
1541
|
hasDelegation: false
|
|
2324
1542
|
}
|
|
2325
1543
|
|
|
2326
|
-
|
|
2327
|
-
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
2328
|
-
tool: 'protectedTool',
|
|
2329
|
-
requiredScopes: [ 'scope1', 'scope2', 'scope3' ],
|
|
2330
|
-
agentDid: 'did:key:zmock123...',
|
|
2331
|
-
resumeToken: 'resume_gx7yd_mig63sh3',
|
|
2332
|
-
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=scope1%2Cscope2%2Cscope3&session_id=session123&agent_did=&resume_token=resume_gx7yd_mig63sh3'
|
|
2333
|
-
}
|
|
2334
|
-
|
|
1544
|
+
headers: { 'content-type': 'application/json' },
|
|
2335
1545
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle session without id
|
|
2336
1546
|
[MCP-I] Checking tool protection: {
|
|
2337
1547
|
tool: 'protectedTool',
|
|
1548
|
+
responseTextLength: 100,
|
|
1549
|
+
responseTextPreview: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}',
|
|
1550
|
+
fullResponseText: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}'
|
|
2338
1551
|
agentDid: 'did:key:zmock123...',
|
|
2339
1552
|
hasDelegation: false
|
|
2340
1553
|
}
|
|
2341
|
-
|
|
2342
|
-
stderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle session without id
|
|
2343
|
-
[MCP-I] BLOCKED: Tool requires delegation but none provided {
|
|
2344
|
-
tool: 'protectedTool',
|
|
2345
|
-
requiredScopes: [ 'files:write' ],
|
|
2346
|
-
agentDid: 'did:key:zmock123...',
|
|
2347
|
-
resumeToken: 'resume_cl4sgd_mig63sh3',
|
|
2348
|
-
consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=&agent_did=&resume_token=resume_cl4sgd_mig63sh3'
|
|
2349
1554
|
}
|
|
2350
1555
|
|
|
1556
|
+
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
1557
|
+
correlationId: '00db17b8-fc23-47b8-9e6c-109b226b7a8e',
|
|
2351
1558
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle handler errors independently of protection
|
|
2352
1559
|
[MCP-I] Checking tool protection: {
|
|
2353
1560
|
tool: 'errorTool',
|
|
2354
1561
|
agentDid: 'did:key:zmock123...',
|
|
2355
1562
|
hasDelegation: false
|
|
1563
|
+
status: 200,
|
|
2356
1564
|
}
|
|
1565
|
+
responseDataType: 'object',
|
|
2357
1566
|
|
|
2358
1567
|
stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle handler errors independently of protection
|
|
2359
1568
|
[MCP-I] Tool protection check passed (no delegation required) {
|
|
2360
1569
|
tool: 'errorTool',
|
|
1570
|
+
responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
|
|
2361
1571
|
agentDid: 'did:key:zmock123...',
|
|
2362
1572
|
reason: 'Tool not configured to require delegation'
|
|
1573
|
+
responseData: '{\n' +
|
|
2363
1574
|
}
|
|
2364
1575
|
|
|
2365
|
-
|
|
2366
|
-
stderr | src/services/__tests__/proof-verifier.integration.test.ts > ProofVerifier Integration - Real DID Resolution > did:web Resolution (HTTP) > should handle HTTP errors gracefully
|
|
2367
|
-
[ProofVerifier] Failed to fetch public key from DID: Error: Failed to resolve did:web:nonexistent-domain-that-does-not-exist-12345.com: fetch failed
|
|
2368
|
-
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)
|
|
2369
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
2370
|
-
at ProofVerifier.fetchPublicKeyFromDID (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/proof-verifier.ts:348:22)
|
|
2371
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/proof-verifier.integration.test.ts:252:7
|
|
2372
|
-
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
|
|
2373
|
-
|
|
2374
|
-
stderr | src/services/__tests__/proof-verifier.integration.test.ts > ProofVerifier Integration - Real DID Resolution > did:web Resolution (HTTP) > should handle HTTP errors gracefully
|
|
2375
|
-
[ProofVerifier] Failed to fetch public key from DID: Error: Failed to resolve did:web:nonexistent-domain-that-does-not-exist-12345.com: fetch failed
|
|
2376
|
-
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)
|
|
2377
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
2378
|
-
at ProofVerifier.fetchPublicKeyFromDID (/Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/proof-verifier.ts:348:22)
|
|
2379
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/services/__tests__/proof-verifier.integration.test.ts:257:9
|
|
2380
|
-
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
|
|
2381
|
-
|
|
2382
|
-
✓ src/__tests__/runtime/route-interception.test.ts (21 tests) 46ms
|
|
2383
|
-
✓ src/services/__tests__/proof-verifier.integration.test.ts (13 tests | 1 skipped) 154ms
|
|
2384
|
-
✓ src/services/__tests__/access-control.integration.test.ts (9 tests) 134ms
|
|
2385
|
-
✓ src/delegation/__tests__/vc-verifier.test.ts (35 tests) 317ms
|
|
2386
|
-
✓ src/delegation/__tests__/vc-issuer.test.ts (21 tests) 324ms
|
|
1576
|
+
' "success": true,\n' +
|
|
2387
1577
|
stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Tool protection enforcement flow > should allow unprotected tool calls
|
|
2388
1578
|
[ToolProtectionService] Config loaded from API {
|
|
2389
1579
|
source: 'api',
|
|
1580
|
+
' "accepted": 1,\n' +
|
|
1581
|
+
' "rejected": 0,\n' +
|
|
2390
1582
|
toolCount: 1,
|
|
2391
1583
|
protectedTools: [],
|
|
2392
1584
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2393
|
-
stderr | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > AgentShield integration flow > should use fallback config when API fails
|
|
2394
1585
|
projectId: 'test-project',
|
|
2395
1586
|
cacheTtlMs: 300000,
|
|
2396
|
-
cacheExpiresAt: '2025-
|
|
2397
|
-
[ToolProtectionService] API fetch failed, using fallback config { agentDid: 'did:key:z6MkhaXgBZDv...', error: 'Network error' }
|
|
1587
|
+
cacheExpiresAt: '2025-12-04T01:20:15.764Z'
|
|
2398
1588
|
}
|
|
1589
|
+
' "outcomes": {\n' +
|
|
1590
|
+
' "success": 1,\n' +
|
|
2399
1591
|
|
|
1592
|
+
' "failed": 0,\n' +
|
|
2400
1593
|
stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Tool protection enforcement flow > should intercept protected tool calls without delegation
|
|
2401
1594
|
[ToolProtectionService] Config loaded from API {
|
|
1595
|
+
' "blocked": 0,\n' +
|
|
2402
1596
|
source: 'api',
|
|
2403
1597
|
toolCount: 1,
|
|
2404
1598
|
protectedTools: [ 'checkout' ],
|
|
2405
|
-
|
|
1599
|
+
' "error": 0\n' +
|
|
2406
1600
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2407
|
-
|
|
1601
|
+
' }\n' +
|
|
2408
1602
|
projectId: 'test-project',
|
|
1603
|
+
'}'
|
|
2409
1604
|
cacheTtlMs: 300000,
|
|
2410
|
-
cacheExpiresAt: '2025-
|
|
1605
|
+
cacheExpiresAt: '2025-12-04T01:20:15.764Z'
|
|
2411
1606
|
}
|
|
2412
|
-
[ToolProtectionService] API fetch failed, no fallback, failing closed (deny-all) {
|
|
2413
1607
|
|
|
2414
1608
|
stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Tool protection enforcement flow > should intercept protected tool calls without delegation
|
|
2415
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2416
|
-
error: 'Network error',
|
|
2417
1609
|
[ToolProtectionService] Protection check {
|
|
2418
1610
|
tool: 'checkout',
|
|
2419
|
-
cacheKey: 'config:tool-protections:test-project'
|
|
2420
1611
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
1612
|
+
}
|
|
2421
1613
|
found: true,
|
|
2422
1614
|
isWildcard: false,
|
|
1615
|
+
[AccessControl] Raw response received: {
|
|
2423
1616
|
requiresDelegation: true,
|
|
1617
|
+
"success": true,
|
|
2424
1618
|
availableTools: [ 'checkout' ]
|
|
1619
|
+
"accepted": 1,
|
|
1620
|
+
"rejected": 0,
|
|
1621
|
+
"outcomes": {
|
|
1622
|
+
"success": 1,
|
|
1623
|
+
"failed": 0,
|
|
2425
1624
|
}
|
|
2426
1625
|
|
|
2427
|
-
stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > AgentShield integration flow > should fetch tool protection config from AgentShield
|
|
2428
|
-
}
|
|
1626
|
+
stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > AgentShield integration flow > should fetch tool protection config from AgentShield merged config
|
|
2429
1627
|
[ToolProtectionService] Config loaded from API {
|
|
2430
1628
|
source: 'api',
|
|
2431
|
-
|
|
2432
|
-
stderr | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Error handling in full flow > should handle network timeouts
|
|
2433
|
-
[ToolProtectionService] API fetch failed, using fallback config { agentDid: 'did:key:z6MkhaXgBZDv...', error: 'Network timeout' }
|
|
2434
1629
|
toolCount: 1,
|
|
2435
1630
|
protectedTools: [ 'protected_tool' ],
|
|
2436
1631
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2437
1632
|
projectId: 'test-project',
|
|
2438
1633
|
cacheTtlMs: 300000,
|
|
2439
|
-
|
|
2440
|
-
cacheExpiresAt: '2025-11-26T15:41:45.686Z'
|
|
1634
|
+
cacheExpiresAt: '2025-12-04T01:20:15.765Z'
|
|
2441
1635
|
}
|
|
2442
1636
|
|
|
2443
1637
|
stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > AgentShield integration flow > should cache tool protection config
|
|
2444
1638
|
[ToolProtectionService] Config loaded from API {
|
|
2445
1639
|
source: 'api',
|
|
1640
|
+
"blocked": 0,
|
|
1641
|
+
"error": 0
|
|
1642
|
+
}
|
|
2446
1643
|
toolCount: 1,
|
|
1644
|
+
}
|
|
2447
1645
|
protectedTools: [ 'tool1' ],
|
|
2448
1646
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2449
1647
|
projectId: 'test-project',
|
|
1648
|
+
|
|
2450
1649
|
cacheTtlMs: 300000,
|
|
2451
|
-
cacheExpiresAt: '2025-
|
|
1650
|
+
cacheExpiresAt: '2025-12-04T01:20:15.766Z'
|
|
2452
1651
|
}
|
|
2453
1652
|
|
|
2454
1653
|
stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Cache integration in full flow > should share cache across multiple service instances
|
|
1654
|
+
stderr | src/services/__tests__/access-control.integration.test.ts > AccessControlApiService Integration > Proof Submission Flow > should handle proof submission with errors
|
|
2455
1655
|
[ToolProtectionService] Config loaded from API {
|
|
1656
|
+
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
2456
1657
|
source: 'api',
|
|
1658
|
+
correlationId: '7d4ba585-b06f-4d8e-ab41-6a4bd33bc598',
|
|
2457
1659
|
toolCount: 1,
|
|
2458
1660
|
protectedTools: [ 'tool1' ],
|
|
1661
|
+
status: 200,
|
|
2459
1662
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2460
1663
|
projectId: 'test-project',
|
|
2461
1664
|
cacheTtlMs: 300000,
|
|
2462
|
-
cacheExpiresAt: '2025-
|
|
1665
|
+
cacheExpiresAt: '2025-12-04T01:20:15.768Z'
|
|
2463
1666
|
}
|
|
1667
|
+
statusText: '',
|
|
1668
|
+
headers: { 'content-type': 'application/json' },
|
|
1669
|
+
responseTextLength: 200,
|
|
2464
1670
|
|
|
1671
|
+
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"}}]}',
|
|
2465
1672
|
stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Cache integration in full flow > should clear cache when needed
|
|
2466
1673
|
[ToolProtectionService] Config loaded from API {
|
|
1674
|
+
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"}}]}'
|
|
2467
1675
|
source: 'api',
|
|
2468
1676
|
toolCount: 1,
|
|
2469
1677
|
protectedTools: [ 'tool1' ],
|
|
2470
1678
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2471
1679
|
projectId: 'test-project',
|
|
1680
|
+
}
|
|
2472
1681
|
cacheTtlMs: 300000,
|
|
2473
|
-
cacheExpiresAt: '2025-
|
|
1682
|
+
cacheExpiresAt: '2025-12-04T01:20:15.768Z'
|
|
2474
1683
|
}
|
|
1684
|
+
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
2475
1685
|
|
|
2476
1686
|
stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Cache integration in full flow > should clear cache when needed
|
|
2477
1687
|
[ToolProtectionService] Config loaded from API {
|
|
2478
1688
|
source: 'api',
|
|
1689
|
+
correlationId: '7d4ba585-b06f-4d8e-ab41-6a4bd33bc598',
|
|
2479
1690
|
toolCount: 1,
|
|
2480
1691
|
protectedTools: [ 'tool1' ],
|
|
2481
1692
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2482
1693
|
projectId: 'test-project',
|
|
2483
1694
|
cacheTtlMs: 300000,
|
|
2484
|
-
cacheExpiresAt: '2025-
|
|
1695
|
+
cacheExpiresAt: '2025-12-04T01:20:15.768Z'
|
|
1696
|
+
status: 200,
|
|
1697
|
+
responseDataType: 'object',
|
|
2485
1698
|
}
|
|
2486
1699
|
|
|
2487
1700
|
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
|
|
1701
|
+
responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes', 'errors' ],
|
|
2488
1702
|
[ToolProtectionService] Config loaded from API {
|
|
1703
|
+
responseData: '{\n' +
|
|
1704
|
+
' "success": true,\n' +
|
|
2489
1705
|
source: 'api',
|
|
2490
1706
|
toolCount: 3,
|
|
1707
|
+
' "accepted": 0,\n' +
|
|
2491
1708
|
protectedTools: [ 'add_to_cart', 'checkout' ],
|
|
1709
|
+
' "rejected": 1,\n' +
|
|
2492
1710
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
1711
|
+
' "outcomes": {\n' +
|
|
1712
|
+
' "success": 0,\n' +
|
|
1713
|
+
' "failed": 1,\n' +
|
|
2493
1714
|
projectId: 'test-project',
|
|
2494
1715
|
cacheTtlMs: 300000,
|
|
2495
|
-
cacheExpiresAt: '2025-
|
|
1716
|
+
cacheExpiresAt: '2025-12-04T01:20:15.769Z'
|
|
1717
|
+
' "blocked": 0,\n' +
|
|
2496
1718
|
}
|
|
2497
1719
|
|
|
2498
1720
|
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
|
|
2499
1721
|
[ToolProtectionService] Protection check {
|
|
1722
|
+
' "error": 0\n' +
|
|
2500
1723
|
tool: 'add_to_cart',
|
|
1724
|
+
' },\n' +
|
|
2501
1725
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2502
1726
|
found: true,
|
|
1727
|
+
' "errors": [\n' +
|
|
1728
|
+
' {\n' +
|
|
2503
1729
|
isWildcard: false,
|
|
2504
1730
|
requiresDelegation: true,
|
|
2505
1731
|
availableTools: [ 'search_products', 'add_to_cart', 'checkout' ]
|
|
1732
|
+
' "proof_index": 0,\n' +
|
|
1733
|
+
' "error": {\n' +
|
|
2506
1734
|
}
|
|
1735
|
+
' "code": "invalid_signature",\n' +
|
|
2507
1736
|
|
|
2508
1737
|
stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Concurrent operations > should handle concurrent cache operations
|
|
2509
1738
|
[ToolProtectionService] Config loaded from API {
|
|
1739
|
+
' "message": "Invalid JWS signature"\n' +
|
|
1740
|
+
' }\n' +
|
|
1741
|
+
' }\n' +
|
|
1742
|
+
source: 'api',
|
|
1743
|
+
' ]\n' +
|
|
1744
|
+
toolCount: 1,
|
|
1745
|
+
protectedTools: [ 'tool1' ],
|
|
1746
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
1747
|
+
projectId: 'test-project',
|
|
1748
|
+
'}'
|
|
1749
|
+
}
|
|
1750
|
+
cacheTtlMs: 300000,
|
|
1751
|
+
cacheExpiresAt: '2025-12-04T01:20:15.769Z'
|
|
1752
|
+
}
|
|
1753
|
+
[ToolProtectionService] Config loaded from API {
|
|
1754
|
+
[AccessControl] Raw response received: {
|
|
2510
1755
|
source: 'api',
|
|
2511
1756
|
toolCount: 1,
|
|
2512
1757
|
protectedTools: [ 'tool1' ],
|
|
2513
1758
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2514
1759
|
projectId: 'test-project',
|
|
1760
|
+
"success": true,
|
|
2515
1761
|
cacheTtlMs: 300000,
|
|
2516
|
-
|
|
1762
|
+
"accepted": 0,
|
|
1763
|
+
cacheExpiresAt: '2025-12-04T01:20:15.769Z'
|
|
2517
1764
|
}
|
|
2518
1765
|
[ToolProtectionService] Config loaded from API {
|
|
2519
1766
|
source: 'api',
|
|
2520
1767
|
toolCount: 1,
|
|
1768
|
+
"rejected": 1,
|
|
2521
1769
|
protectedTools: [ 'tool1' ],
|
|
2522
1770
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2523
|
-
|
|
1771
|
+
"outcomes": {
|
|
1772
|
+
projectId: 'test-project',
|
|
1773
|
+
"success": 0,
|
|
1774
|
+
cacheTtlMs: 300000,
|
|
1775
|
+
cacheExpiresAt: '2025-12-04T01:20:15.769Z'
|
|
1776
|
+
}
|
|
1777
|
+
"failed": 1,
|
|
1778
|
+
"blocked": 0,
|
|
1779
|
+
"error": 0
|
|
1780
|
+
},
|
|
1781
|
+
"errors": [
|
|
1782
|
+
|
|
1783
|
+
{
|
|
1784
|
+
"proof_index": 0,
|
|
1785
|
+
"error": {
|
|
1786
|
+
"code": "invalid_signature",
|
|
1787
|
+
"message": "Invalid JWS signature"
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
]
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
stderr | src/services/__tests__/access-control.integration.test.ts > AccessControlApiService Integration > Proof Verification Flow > should verify proof using ProofVerifier
|
|
1794
|
+
[CryptoService] Key ID mismatch
|
|
1795
|
+
|
|
1796
|
+
✓ src/__tests__/integration/full-flow.test.ts (21 tests) 23ms
|
|
1797
|
+
✓ src/__tests__/runtime/tool-protection-enforcement.test.ts (29 tests) 13ms
|
|
1798
|
+
stderr | src/services/__tests__/proof-verifier.integration.test.ts > ProofVerifier Integration - Real DID Resolution > did:web Resolution (HTTP) > should handle HTTP errors gracefully
|
|
1799
|
+
[ProofVerifier] Failed to fetch public key from DID: Error: Failed to resolve did:web:nonexistent-domain-that-does-not-exist-12345.com: fetch failed
|
|
1800
|
+
at Object.resolveDID (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/proof-verifier.integration.test.ts:143:19)
|
|
1801
|
+
at processTicksAndRejections (node:internal/process/task_queues:103:5)
|
|
1802
|
+
at ProofVerifier.fetchPublicKeyFromDID (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/proof-verifier.ts:348:22)
|
|
1803
|
+
at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/proof-verifier.integration.test.ts:252:7
|
|
1804
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:919:20
|
|
1805
|
+
|
|
1806
|
+
stderr | src/services/__tests__/proof-verifier.integration.test.ts > ProofVerifier Integration - Real DID Resolution > did:web Resolution (HTTP) > should handle HTTP errors gracefully
|
|
1807
|
+
[ProofVerifier] Failed to fetch public key from DID: Error: Failed to resolve did:web:nonexistent-domain-that-does-not-exist-12345.com: fetch failed
|
|
1808
|
+
at Object.resolveDID (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/proof-verifier.integration.test.ts:143:19)
|
|
1809
|
+
at processTicksAndRejections (node:internal/process/task_queues:103:5)
|
|
1810
|
+
at ProofVerifier.fetchPublicKeyFromDID (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/proof-verifier.ts:348:22)
|
|
1811
|
+
at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/proof-verifier.integration.test.ts:257:9
|
|
1812
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:919:20
|
|
1813
|
+
|
|
1814
|
+
✓ src/services/__tests__/proof-verifier.integration.test.ts (13 tests | 1 skipped) 147ms
|
|
1815
|
+
✓ src/services/__tests__/access-control.integration.test.ts (9 tests) 160ms
|
|
1816
|
+
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyEd25519 > should return false on verification error
|
|
1817
|
+
[CryptoService] Ed25519 verification error: Error: Verification failed
|
|
1818
|
+
at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:62:9
|
|
1819
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:145:11
|
|
1820
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:919:26
|
|
1821
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1244:20
|
|
1822
|
+
at new Promise (<anonymous>)
|
|
1823
|
+
at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1210:10)
|
|
1824
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1654:37
|
|
1825
|
+
at Traces.$ (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/vitest@4.0.14_@opentelemetry+api@1.9.0_@types+node@20.19.25_jiti@2.6.1_lightningcss@1.3_3f67c307998c5928f2f2aae3bf45ed95/node_modules/vitest/dist/chunks/traces.U4xDYhzZ.js:115:27)
|
|
1826
|
+
at trace (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/vitest@4.0.14_@opentelemetry+api@1.9.0_@types+node@20.19.25_jiti@2.6.1_lightningcss@1.3_3f67c307998c5928f2f2aae3bf45ed95/node_modules/vitest/dist/chunks/test.DqQZzsWf.js:234:21)
|
|
1827
|
+
at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1654:12)
|
|
1828
|
+
|
|
1829
|
+
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject invalid JWK format
|
|
1830
|
+
[CryptoService] Invalid Ed25519 JWK format
|
|
1831
|
+
|
|
1832
|
+
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject JWK with wrong kty
|
|
1833
|
+
[CryptoService] Invalid Ed25519 JWK format
|
|
1834
|
+
|
|
1835
|
+
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject JWK with wrong crv
|
|
1836
|
+
[CryptoService] Invalid Ed25519 JWK format
|
|
1837
|
+
|
|
1838
|
+
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject JWK with missing x field
|
|
1839
|
+
[CryptoService] Invalid Ed25519 JWK format
|
|
1840
|
+
|
|
1841
|
+
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject JWK with empty x field
|
|
1842
|
+
[CryptoService] Invalid Ed25519 JWK format
|
|
1843
|
+
|
|
1844
|
+
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject malformed JWS
|
|
1845
|
+
[CryptoService] Invalid JWS format: Error: Invalid header base64: Unexpected token '', "" is not valid JSON
|
|
1846
|
+
at CryptoService.parseJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:91:13)
|
|
1847
|
+
at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
|
|
1848
|
+
at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:230:42
|
|
1849
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:145:11
|
|
1850
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:919:26
|
|
1851
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1244:20
|
|
1852
|
+
at new Promise (<anonymous>)
|
|
1853
|
+
at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1210:10)
|
|
1854
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1654:37
|
|
1855
|
+
at Traces.$ (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/vitest@4.0.14_@opentelemetry+api@1.9.0_@types+node@20.19.25_jiti@2.6.1_lightningcss@1.3_3f67c307998c5928f2f2aae3bf45ed95/node_modules/vitest/dist/chunks/traces.U4xDYhzZ.js:115:27)
|
|
1856
|
+
|
|
1857
|
+
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject non-EdDSA algorithms
|
|
1858
|
+
[CryptoService] Unsupported algorithm: RS256, expected EdDSA
|
|
1859
|
+
|
|
1860
|
+
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject HS256 algorithm
|
|
1861
|
+
[CryptoService] Unsupported algorithm: HS256, expected EdDSA
|
|
1862
|
+
|
|
1863
|
+
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle empty JWS components
|
|
1864
|
+
[CryptoService] Invalid JWS format: Error: Invalid header base64: Unexpected end of JSON input
|
|
1865
|
+
at CryptoService.parseJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:91:13)
|
|
1866
|
+
at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
|
|
1867
|
+
at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:271:42
|
|
1868
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:145:11
|
|
1869
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:919:26
|
|
1870
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1244:20
|
|
1871
|
+
at new Promise (<anonymous>)
|
|
1872
|
+
at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1210:10)
|
|
1873
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1654:37
|
|
1874
|
+
at Traces.$ (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/vitest@4.0.14_@opentelemetry+api@1.9.0_@types+node@20.19.25_jiti@2.6.1_lightningcss@1.3_3f67c307998c5928f2f2aae3bf45ed95/node_modules/vitest/dist/chunks/traces.U4xDYhzZ.js:115:27)
|
|
1875
|
+
|
|
1876
|
+
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle malformed JWS - single part
|
|
1877
|
+
[CryptoService] Invalid JWS format: Error: Invalid JWS format: expected header.payload.signature
|
|
1878
|
+
at CryptoService.parseJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:78:13)
|
|
1879
|
+
at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
|
|
1880
|
+
at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:279:42
|
|
1881
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:145:11
|
|
1882
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:919:26
|
|
1883
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1244:20
|
|
1884
|
+
at new Promise (<anonymous>)
|
|
1885
|
+
at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1210:10)
|
|
1886
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1654:37
|
|
1887
|
+
at Traces.$ (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/vitest@4.0.14_@opentelemetry+api@1.9.0_@types+node@20.19.25_jiti@2.6.1_lightningcss@1.3_3f67c307998c5928f2f2aae3bf45ed95/node_modules/vitest/dist/chunks/traces.U4xDYhzZ.js:115:27)
|
|
1888
|
+
|
|
1889
|
+
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle malformed JWS - two parts
|
|
1890
|
+
[CryptoService] Invalid JWS format: Error: Invalid JWS format: expected header.payload.signature
|
|
1891
|
+
at CryptoService.parseJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:78:13)
|
|
1892
|
+
at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
|
|
1893
|
+
at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:287:42
|
|
1894
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:145:11
|
|
1895
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:919:26
|
|
1896
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1244:20
|
|
1897
|
+
at new Promise (<anonymous>)
|
|
1898
|
+
at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1210:10)
|
|
1899
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1654:37
|
|
1900
|
+
at Traces.$ (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/vitest@4.0.14_@opentelemetry+api@1.9.0_@types+node@20.19.25_jiti@2.6.1_lightningcss@1.3_3f67c307998c5928f2f2aae3bf45ed95/node_modules/vitest/dist/chunks/traces.U4xDYhzZ.js:115:27)
|
|
1901
|
+
|
|
1902
|
+
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle malformed JWS - four parts
|
|
1903
|
+
[CryptoService] Invalid JWS format: Error: Invalid JWS format: expected header.payload.signature
|
|
1904
|
+
at CryptoService.parseJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:78:13)
|
|
1905
|
+
at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
|
|
1906
|
+
at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:302:42
|
|
1907
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:145:11
|
|
1908
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:919:26
|
|
1909
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1244:20
|
|
1910
|
+
at new Promise (<anonymous>)
|
|
1911
|
+
at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1210:10)
|
|
1912
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1654:37
|
|
1913
|
+
at Traces.$ (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/vitest@4.0.14_@opentelemetry+api@1.9.0_@types+node@20.19.25_jiti@2.6.1_lightningcss@1.3_3f67c307998c5928f2f2aae3bf45ed95/node_modules/vitest/dist/chunks/traces.U4xDYhzZ.js:115:27)
|
|
1914
|
+
|
|
1915
|
+
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle malformed JWS - invalid JSON header
|
|
1916
|
+
[CryptoService] Invalid JWS format: Error: Invalid header base64: Unexpected token 'o', "notjson" is not valid JSON
|
|
1917
|
+
at CryptoService.parseJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:91:13)
|
|
1918
|
+
at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
|
|
1919
|
+
at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:316:42
|
|
1920
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:145:11
|
|
1921
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:919:26
|
|
1922
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1244:20
|
|
1923
|
+
at new Promise (<anonymous>)
|
|
1924
|
+
at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1210:10)
|
|
1925
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1654:37
|
|
1926
|
+
at Traces.$ (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/vitest@4.0.14_@opentelemetry+api@1.9.0_@types+node@20.19.25_jiti@2.6.1_lightningcss@1.3_3f67c307998c5928f2f2aae3bf45ed95/node_modules/vitest/dist/chunks/traces.U4xDYhzZ.js:115:27)
|
|
1927
|
+
|
|
1928
|
+
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle malformed JWS - invalid base64
|
|
1929
|
+
[CryptoService] Invalid JWS format: Error: Invalid payload base64: Invalid base64url string: Invalid character
|
|
1930
|
+
at CryptoService.parseJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:107:15)
|
|
1931
|
+
at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
|
|
1932
|
+
at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:334:42
|
|
1933
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:145:11
|
|
1934
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:919:26
|
|
1935
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1244:20
|
|
1936
|
+
at new Promise (<anonymous>)
|
|
1937
|
+
at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1210:10)
|
|
1938
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1654:37
|
|
1939
|
+
at Traces.$ (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/vitest@4.0.14_@opentelemetry+api@1.9.0_@types+node@20.19.25_jiti@2.6.1_lightningcss@1.3_3f67c307998c5928f2f2aae3bf45ed95/node_modules/vitest/dist/chunks/traces.U4xDYhzZ.js:115:27)
|
|
1940
|
+
|
|
1941
|
+
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should validate expectedKid option
|
|
1942
|
+
[CryptoService] Key ID mismatch
|
|
1943
|
+
|
|
1944
|
+
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should validate alg option
|
|
1945
|
+
[CryptoService] Unsupported algorithm: EdDSA, expected RS256
|
|
1946
|
+
|
|
1947
|
+
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should validate Ed25519 key length
|
|
1948
|
+
[CryptoService] Failed to extract public key: Error: Invalid Ed25519 public key length: 5
|
|
1949
|
+
at CryptoService.jwkToBase64PublicKey (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:295:13)
|
|
1950
|
+
at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:249:32)
|
|
1951
|
+
at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:398:42
|
|
1952
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:145:11
|
|
1953
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:919:26
|
|
1954
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1244:20
|
|
1955
|
+
at new Promise (<anonymous>)
|
|
1956
|
+
at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1210:10)
|
|
1957
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1654:37
|
|
1958
|
+
at Traces.$ (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/vitest@4.0.14_@opentelemetry+api@1.9.0_@types+node@20.19.25_jiti@2.6.1_lightningcss@1.3_3f67c307998c5928f2f2aae3bf45ed95/node_modules/vitest/dist/chunks/traces.U4xDYhzZ.js:115:27)
|
|
1959
|
+
|
|
1960
|
+
stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle signature verification error
|
|
1961
|
+
[CryptoService] Ed25519 verification error: Error: Crypto error
|
|
1962
|
+
at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:449:61
|
|
1963
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:145:11
|
|
1964
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:919:26
|
|
1965
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1244:20
|
|
1966
|
+
at new Promise (<anonymous>)
|
|
1967
|
+
at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1210:10)
|
|
1968
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1654:37
|
|
1969
|
+
at Traces.$ (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/vitest@4.0.14_@opentelemetry+api@1.9.0_@types+node@20.19.25_jiti@2.6.1_lightningcss@1.3_3f67c307998c5928f2f2aae3bf45ed95/node_modules/vitest/dist/chunks/traces.U4xDYhzZ.js:115:27)
|
|
1970
|
+
at trace (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/vitest@4.0.14_@opentelemetry+api@1.9.0_@types+node@20.19.25_jiti@2.6.1_lightningcss@1.3_3f67c307998c5928f2f2aae3bf45ed95/node_modules/vitest/dist/chunks/test.DqQZzsWf.js:234:21)
|
|
1971
|
+
at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1654:12)
|
|
1972
|
+
|
|
1973
|
+
✓ src/services/__tests__/crypto.service.test.ts (34 tests) 14ms
|
|
1974
|
+
stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should submit proofs successfully
|
|
1975
|
+
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
1976
|
+
correlationId: '3e2a5e0f-9dc2-4f4b-87c9-04bff331d934',
|
|
1977
|
+
status: 200,
|
|
1978
|
+
statusText: '',
|
|
1979
|
+
headers: { 'content-type': 'application/json' },
|
|
1980
|
+
responseTextLength: 100,
|
|
1981
|
+
responseTextPreview: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}',
|
|
1982
|
+
fullResponseText: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}'
|
|
1983
|
+
}
|
|
1984
|
+
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
1985
|
+
correlationId: '3e2a5e0f-9dc2-4f4b-87c9-04bff331d934',
|
|
1986
|
+
status: 200,
|
|
1987
|
+
responseDataType: 'object',
|
|
1988
|
+
responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
|
|
1989
|
+
responseData: '{\n' +
|
|
1990
|
+
' "success": true,\n' +
|
|
1991
|
+
' "accepted": 1,\n' +
|
|
1992
|
+
' "rejected": 0,\n' +
|
|
1993
|
+
' "outcomes": {\n' +
|
|
1994
|
+
' "success": 1,\n' +
|
|
1995
|
+
' "failed": 0,\n' +
|
|
1996
|
+
' "blocked": 0,\n' +
|
|
1997
|
+
' "error": 0\n' +
|
|
1998
|
+
' }\n' +
|
|
1999
|
+
'}'
|
|
2000
|
+
}
|
|
2001
|
+
[AccessControl] Raw response received: {
|
|
2002
|
+
"success": true,
|
|
2003
|
+
"accepted": 1,
|
|
2004
|
+
"rejected": 0,
|
|
2005
|
+
"outcomes": {
|
|
2006
|
+
"success": 1,
|
|
2007
|
+
"failed": 0,
|
|
2008
|
+
"blocked": 0,
|
|
2009
|
+
"error": 0
|
|
2010
|
+
}
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle all_proofs_rejected error gracefully
|
|
2014
|
+
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
2015
|
+
correlationId: '9fb2e02d-cf02-43ab-a38d-9332bf1fce27',
|
|
2016
|
+
status: 400,
|
|
2017
|
+
statusText: '',
|
|
2018
|
+
headers: { 'content-type': 'application/json' },
|
|
2019
|
+
responseTextLength: 209,
|
|
2020
|
+
responseTextPreview: '{"success":false,"error":{"code":"all_proofs_rejected","message":"All proofs rejected","details":{"rejected":1,"errors":[{"proof_index":0,"error":{"code":"invalid_signature","message":"Invalid signature"}}]}}}',
|
|
2021
|
+
fullResponseText: '{"success":false,"error":{"code":"all_proofs_rejected","message":"All proofs rejected","details":{"rejected":1,"errors":[{"proof_index":0,"error":{"code":"invalid_signature","message":"Invalid signature"}}]}}}'
|
|
2022
|
+
}
|
|
2023
|
+
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
2024
|
+
correlationId: '9fb2e02d-cf02-43ab-a38d-9332bf1fce27',
|
|
2025
|
+
status: 400,
|
|
2026
|
+
responseDataType: 'object',
|
|
2027
|
+
responseDataKeys: [ 'success', 'error' ],
|
|
2028
|
+
responseData: '{\n' +
|
|
2029
|
+
' "success": false,\n' +
|
|
2030
|
+
' "error": {\n' +
|
|
2031
|
+
' "code": "all_proofs_rejected",\n' +
|
|
2032
|
+
' "message": "All proofs rejected",\n' +
|
|
2033
|
+
' "details": {\n' +
|
|
2034
|
+
' "rejected": 1,\n' +
|
|
2035
|
+
' "errors": [\n' +
|
|
2036
|
+
' {\n' +
|
|
2037
|
+
' "proof_index": 0,\n' +
|
|
2038
|
+
' "error": {\n' +
|
|
2039
|
+
' "code": "invalid_signature",\n' +
|
|
2040
|
+
' "message": "Invalid signature"\n' +
|
|
2041
|
+
' }\n' +
|
|
2042
|
+
' }\n' +
|
|
2043
|
+
' ]\n' +
|
|
2044
|
+
' }\n' +
|
|
2045
|
+
' }\n' +
|
|
2046
|
+
'}'
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle wrapped response format
|
|
2050
|
+
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
2051
|
+
correlationId: '0da4cd48-1bda-409d-8c94-07c72bfd9e7d',
|
|
2052
|
+
status: 200,
|
|
2053
|
+
statusText: '',
|
|
2054
|
+
headers: { 'content-type': 'application/json' },
|
|
2055
|
+
responseTextLength: 206,
|
|
2056
|
+
responseTextPreview: '{"success":true,"data":{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}},"metadata":{"requestId":"test-request-id","timestamp":"2025-12-04T01:15:16.588Z"}}',
|
|
2057
|
+
fullResponseText: '{"success":true,"data":{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}},"metadata":{"requestId":"test-request-id","timestamp":"2025-12-04T01:15:16.588Z"}}'
|
|
2058
|
+
}
|
|
2059
|
+
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
2060
|
+
correlationId: '0da4cd48-1bda-409d-8c94-07c72bfd9e7d',
|
|
2061
|
+
status: 200,
|
|
2062
|
+
responseDataType: 'object',
|
|
2063
|
+
responseDataKeys: [ 'success', 'data', 'metadata' ],
|
|
2064
|
+
responseData: '{\n' +
|
|
2065
|
+
' "success": true,\n' +
|
|
2066
|
+
' "data": {\n' +
|
|
2067
|
+
' "success": true,\n' +
|
|
2068
|
+
' "accepted": 1,\n' +
|
|
2069
|
+
' "rejected": 0,\n' +
|
|
2070
|
+
' "outcomes": {\n' +
|
|
2071
|
+
' "success": 1,\n' +
|
|
2072
|
+
' "failed": 0,\n' +
|
|
2073
|
+
' "blocked": 0,\n' +
|
|
2074
|
+
' "error": 0\n' +
|
|
2075
|
+
' }\n' +
|
|
2076
|
+
' },\n' +
|
|
2077
|
+
' "metadata": {\n' +
|
|
2078
|
+
' "requestId": "test-request-id",\n' +
|
|
2079
|
+
' "timestamp": "2025-12-04T01:15:16.588Z"\n' +
|
|
2080
|
+
' }\n' +
|
|
2081
|
+
'}'
|
|
2082
|
+
}
|
|
2083
|
+
[AccessControl] Raw response received: {
|
|
2084
|
+
"success": true,
|
|
2085
|
+
"data": {
|
|
2086
|
+
"success": true,
|
|
2087
|
+
"accepted": 1,
|
|
2088
|
+
"rejected": 0,
|
|
2089
|
+
"outcomes": {
|
|
2090
|
+
"success": 1,
|
|
2091
|
+
"failed": 0,
|
|
2092
|
+
"blocked": 0,
|
|
2093
|
+
"error": 0
|
|
2094
|
+
}
|
|
2095
|
+
},
|
|
2096
|
+
"metadata": {
|
|
2097
|
+
"requestId": "test-request-id",
|
|
2098
|
+
"timestamp": "2025-12-04T01:15:16.588Z"
|
|
2099
|
+
}
|
|
2100
|
+
}
|
|
2101
|
+
[AccessControl] 🔍 DATA OBJECT STRUCTURE (after deep clone): {
|
|
2102
|
+
correlationId: '0da4cd48-1bda-409d-8c94-07c72bfd9e7d',
|
|
2103
|
+
dataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
|
|
2104
|
+
hasAccepted: true,
|
|
2105
|
+
hasRejected: true,
|
|
2106
|
+
hasOutcomes: true,
|
|
2107
|
+
hasErrors: false,
|
|
2108
|
+
acceptedType: 'number',
|
|
2109
|
+
acceptedValue: 1,
|
|
2110
|
+
rejectedType: 'number',
|
|
2111
|
+
rejectedValue: 0,
|
|
2112
|
+
outcomesType: 'object',
|
|
2113
|
+
outcomesValue: { success: 1, failed: 0, blocked: 0, error: 0 },
|
|
2114
|
+
errorsType: 'undefined',
|
|
2115
|
+
errorsIsArray: false,
|
|
2116
|
+
fullData: '{\n' +
|
|
2117
|
+
' "success": true,\n' +
|
|
2118
|
+
' "accepted": 1,\n' +
|
|
2119
|
+
' "rejected": 0,\n' +
|
|
2120
|
+
' "outcomes": {\n' +
|
|
2121
|
+
' "success": 1,\n' +
|
|
2122
|
+
' "failed": 0,\n' +
|
|
2123
|
+
' "blocked": 0,\n' +
|
|
2124
|
+
' "error": 0\n' +
|
|
2125
|
+
' }\n' +
|
|
2126
|
+
'}'
|
|
2127
|
+
}
|
|
2128
|
+
[AccessControl] 🔍 VALIDATING DATA WITH SUCCESS: {
|
|
2129
|
+
correlationId: '0da4cd48-1bda-409d-8c94-07c72bfd9e7d',
|
|
2130
|
+
dataWithSuccessKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
|
|
2131
|
+
hasSuccess: true,
|
|
2132
|
+
successValue: true,
|
|
2133
|
+
hasAccepted: true,
|
|
2134
|
+
acceptedValue: 1,
|
|
2135
|
+
hasRejected: true,
|
|
2136
|
+
rejectedValue: 0,
|
|
2137
|
+
hasOutcomes: true,
|
|
2138
|
+
outcomesValue: { success: 1, failed: 0, blocked: 0, error: 0 },
|
|
2139
|
+
fullDataWithSuccess: '{\n' +
|
|
2140
|
+
' "success": true,\n' +
|
|
2141
|
+
' "accepted": 1,\n' +
|
|
2142
|
+
' "rejected": 0,\n' +
|
|
2143
|
+
' "outcomes": {\n' +
|
|
2144
|
+
' "success": 1,\n' +
|
|
2145
|
+
' "failed": 0,\n' +
|
|
2146
|
+
' "blocked": 0,\n' +
|
|
2147
|
+
' "error": 0\n' +
|
|
2148
|
+
' }\n' +
|
|
2149
|
+
'}'
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle response with missing outcomes field (outcomes is optional)
|
|
2153
|
+
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
2154
|
+
correlationId: 'd107eb6d-cd2e-40d1-a87a-77bbb9a2c248',
|
|
2155
|
+
status: 200,
|
|
2156
|
+
statusText: '',
|
|
2157
|
+
headers: { 'content-type': 'application/json' },
|
|
2158
|
+
responseTextLength: 42,
|
|
2159
|
+
responseTextPreview: '{"success":true,"accepted":1,"rejected":0}',
|
|
2160
|
+
fullResponseText: '{"success":true,"accepted":1,"rejected":0}'
|
|
2161
|
+
}
|
|
2162
|
+
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
2163
|
+
correlationId: 'd107eb6d-cd2e-40d1-a87a-77bbb9a2c248',
|
|
2164
|
+
status: 200,
|
|
2165
|
+
responseDataType: 'object',
|
|
2166
|
+
responseDataKeys: [ 'success', 'accepted', 'rejected' ],
|
|
2167
|
+
responseData: '{\n "success": true,\n "accepted": 1,\n "rejected": 0\n}'
|
|
2168
|
+
}
|
|
2169
|
+
[AccessControl] Raw response received: {
|
|
2170
|
+
"success": true,
|
|
2171
|
+
"accepted": 1,
|
|
2172
|
+
"rejected": 0
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle response with missing outcomes field (outcomes is optional)
|
|
2176
|
+
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
2177
|
+
correlationId: 'c8298b4e-ee49-4f03-9078-03e559397d8d',
|
|
2178
|
+
status: 200,
|
|
2179
|
+
statusText: '',
|
|
2180
|
+
headers: { 'content-type': 'application/json' },
|
|
2181
|
+
responseTextLength: 100,
|
|
2182
|
+
responseTextPreview: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}',
|
|
2183
|
+
fullResponseText: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}'
|
|
2184
|
+
}
|
|
2185
|
+
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
2186
|
+
correlationId: 'c8298b4e-ee49-4f03-9078-03e559397d8d',
|
|
2187
|
+
status: 200,
|
|
2188
|
+
responseDataType: 'object',
|
|
2189
|
+
responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
|
|
2190
|
+
responseData: '{\n' +
|
|
2191
|
+
' "success": true,\n' +
|
|
2192
|
+
' "accepted": 1,\n' +
|
|
2193
|
+
' "rejected": 0,\n' +
|
|
2194
|
+
' "outcomes": {\n' +
|
|
2195
|
+
' "success": 1,\n' +
|
|
2196
|
+
' "failed": 0,\n' +
|
|
2197
|
+
' "blocked": 0,\n' +
|
|
2198
|
+
' "error": 0\n' +
|
|
2199
|
+
' }\n' +
|
|
2200
|
+
'}'
|
|
2201
|
+
}
|
|
2202
|
+
[AccessControl] Raw response received: {
|
|
2203
|
+
"success": true,
|
|
2204
|
+
"accepted": 1,
|
|
2205
|
+
"rejected": 0,
|
|
2206
|
+
"outcomes": {
|
|
2207
|
+
"success": 1,
|
|
2208
|
+
"failed": 0,
|
|
2209
|
+
"blocked": 0,
|
|
2210
|
+
"error": 0
|
|
2211
|
+
}
|
|
2212
|
+
}
|
|
2213
|
+
|
|
2214
|
+
stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle response with missing outcomes field (outcomes is optional)
|
|
2215
|
+
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
2216
|
+
correlationId: '5924cc97-b045-4a96-a234-31252848bc09',
|
|
2217
|
+
status: 200,
|
|
2218
|
+
statusText: '',
|
|
2219
|
+
headers: { 'content-type': 'application/json' },
|
|
2220
|
+
responseTextLength: 56,
|
|
2221
|
+
responseTextPreview: '{"success":true,"accepted":1,"rejected":0,"outcomes":{}}',
|
|
2222
|
+
fullResponseText: '{"success":true,"accepted":1,"rejected":0,"outcomes":{}}'
|
|
2223
|
+
}
|
|
2224
|
+
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
2225
|
+
correlationId: '5924cc97-b045-4a96-a234-31252848bc09',
|
|
2226
|
+
status: 200,
|
|
2227
|
+
responseDataType: 'object',
|
|
2228
|
+
responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
|
|
2229
|
+
responseData: '{\n "success": true,\n "accepted": 1,\n "rejected": 0,\n "outcomes": {}\n}'
|
|
2230
|
+
}
|
|
2231
|
+
[AccessControl] Raw response received: {
|
|
2232
|
+
"success": true,
|
|
2233
|
+
"accepted": 1,
|
|
2234
|
+
"rejected": 0,
|
|
2235
|
+
"outcomes": {}
|
|
2236
|
+
}
|
|
2237
|
+
|
|
2238
|
+
stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle wrapped response with invalid data structure
|
|
2239
|
+
[AccessControl] 🔍 RAW API RESPONSE (before parsing): {
|
|
2240
|
+
correlationId: '2ecd5f26-1003-4bb2-9949-15d7a0e9ddc7',
|
|
2241
|
+
status: 200,
|
|
2242
|
+
statusText: '',
|
|
2243
|
+
headers: { 'content-type': 'application/json' },
|
|
2244
|
+
responseTextLength: 52,
|
|
2245
|
+
responseTextPreview: '{"success":true,"data":{"message":"Invalid format"}}',
|
|
2246
|
+
fullResponseText: '{"success":true,"data":{"message":"Invalid format"}}'
|
|
2247
|
+
}
|
|
2248
|
+
[AccessControl] 🔍 PARSED RESPONSE DATA: {
|
|
2249
|
+
correlationId: '2ecd5f26-1003-4bb2-9949-15d7a0e9ddc7',
|
|
2250
|
+
status: 200,
|
|
2251
|
+
responseDataType: 'object',
|
|
2252
|
+
responseDataKeys: [ 'success', 'data' ],
|
|
2253
|
+
responseData: '{\n "success": true,\n "data": {\n "message": "Invalid format"\n }\n}'
|
|
2254
|
+
}
|
|
2255
|
+
[AccessControl] Raw response received: {
|
|
2256
|
+
"success": true,
|
|
2257
|
+
"data": {
|
|
2258
|
+
"message": "Invalid format"
|
|
2259
|
+
}
|
|
2260
|
+
}
|
|
2261
|
+
[AccessControl] 🔍 DATA OBJECT STRUCTURE (after deep clone): {
|
|
2262
|
+
correlationId: '2ecd5f26-1003-4bb2-9949-15d7a0e9ddc7',
|
|
2263
|
+
dataKeys: [ 'message' ],
|
|
2264
|
+
hasAccepted: false,
|
|
2265
|
+
hasRejected: false,
|
|
2266
|
+
hasOutcomes: false,
|
|
2267
|
+
hasErrors: false,
|
|
2268
|
+
acceptedType: 'undefined',
|
|
2269
|
+
acceptedValue: undefined,
|
|
2270
|
+
rejectedType: 'undefined',
|
|
2271
|
+
rejectedValue: undefined,
|
|
2272
|
+
outcomesType: 'undefined',
|
|
2273
|
+
outcomesValue: undefined,
|
|
2274
|
+
errorsType: 'undefined',
|
|
2275
|
+
errorsIsArray: false,
|
|
2276
|
+
fullData: '{\n "message": "Invalid format"\n}'
|
|
2277
|
+
}
|
|
2278
|
+
[AccessControl] 🔍 VALIDATING DATA WITH SUCCESS: {
|
|
2279
|
+
correlationId: '2ecd5f26-1003-4bb2-9949-15d7a0e9ddc7',
|
|
2280
|
+
dataWithSuccessKeys: [ 'success', 'accepted', 'rejected' ],
|
|
2281
|
+
hasSuccess: true,
|
|
2282
|
+
successValue: true,
|
|
2283
|
+
hasAccepted: true,
|
|
2284
|
+
acceptedValue: undefined,
|
|
2285
|
+
hasRejected: true,
|
|
2286
|
+
rejectedValue: undefined,
|
|
2287
|
+
hasOutcomes: false,
|
|
2288
|
+
outcomesValue: undefined,
|
|
2289
|
+
fullDataWithSuccess: '{\n "success": true\n}'
|
|
2290
|
+
}
|
|
2291
|
+
[AccessControl] ❌ MISSING REQUIRED FIELDS AFTER CONSTRUCTION: {
|
|
2292
|
+
correlationId: '2ecd5f26-1003-4bb2-9949-15d7a0e9ddc7',
|
|
2293
|
+
hasAccepted: true,
|
|
2294
|
+
acceptedType: 'undefined',
|
|
2295
|
+
acceptedValue: undefined,
|
|
2296
|
+
hasRejected: true,
|
|
2297
|
+
rejectedType: 'undefined',
|
|
2298
|
+
rejectedValue: undefined,
|
|
2299
|
+
dataWithSuccessKeys: [ 'success', 'accepted', 'rejected' ],
|
|
2300
|
+
fullDataWithSuccess: '{\n "success": true\n}',
|
|
2301
|
+
dataToValidateKeys: [ 'message' ],
|
|
2302
|
+
fullDataToValidate: '{\n "message": "Invalid format"\n}',
|
|
2303
|
+
originalResponseData: '{\n "success": true,\n "data": {\n "message": "Invalid format"\n }\n}'
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2306
|
+
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Caching Integration > should respect cache TTL
|
|
2307
|
+
stderr | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Real-world Scenarios > should handle API rate limiting gracefully
|
|
2308
|
+
[ToolProtectionService] Config loaded from API {
|
|
2309
|
+
source: 'api',
|
|
2310
|
+
toolCount: 0,
|
|
2311
|
+
[ToolProtectionService] API fetch failed, using fallback config {
|
|
2312
|
+
protectedTools: [],
|
|
2313
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2314
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2315
|
+
projectId: 'test-project-123',
|
|
2316
|
+
cacheTtlMs: 1000,
|
|
2317
|
+
cacheExpiresAt: '2025-12-04T01:15:17.587Z'
|
|
2318
|
+
}
|
|
2319
|
+
|
|
2320
|
+
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Real-world Scenarios > should handle typical e-commerce tool protection config
|
|
2321
|
+
[ToolProtectionService] Config loaded from API {
|
|
2322
|
+
error: 'Failed to fetch bouncer config: 429 Too Many Requests - Rate limit exceeded'
|
|
2323
|
+
source: 'api',
|
|
2324
|
+
toolCount: 4,
|
|
2325
|
+
protectedTools: [ 'add_to_cart', 'checkout' ],
|
|
2326
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2327
|
+
}
|
|
2328
|
+
|
|
2329
|
+
projectId: 'test-project-123',
|
|
2330
|
+
cacheTtlMs: 300000,
|
|
2331
|
+
cacheExpiresAt: '2025-12-04T01:20:16.588Z'
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2334
|
+
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Real-world Scenarios > should handle concurrent requests
|
|
2335
|
+
[ToolProtectionService] Config loaded from API {
|
|
2336
|
+
source: 'api',
|
|
2337
|
+
toolCount: 1,
|
|
2338
|
+
protectedTools: [ 'tool1' ],
|
|
2339
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2340
|
+
projectId: 'test-project-123',
|
|
2341
|
+
cacheTtlMs: 300000,
|
|
2342
|
+
cacheExpiresAt: '2025-12-04T01:20:16.589Z'
|
|
2343
|
+
}
|
|
2344
|
+
[ToolProtectionService] Config loaded from API {
|
|
2345
|
+
source: 'api',
|
|
2346
|
+
toolCount: 1,
|
|
2347
|
+
protectedTools: [ 'tool1' ],
|
|
2348
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2349
|
+
projectId: 'test-project-123',
|
|
2350
|
+
cacheTtlMs: 300000,
|
|
2351
|
+
cacheExpiresAt: '2025-12-04T01:20:16.589Z'
|
|
2352
|
+
}
|
|
2353
|
+
[ToolProtectionService] Config loaded from API {
|
|
2354
|
+
source: 'api',
|
|
2355
|
+
toolCount: 1,
|
|
2356
|
+
protectedTools: [ 'tool1' ],
|
|
2357
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2358
|
+
projectId: 'test-project-123',
|
|
2359
|
+
cacheTtlMs: 300000,
|
|
2360
|
+
cacheExpiresAt: '2025-12-04T01:20:16.589Z'
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2363
|
+
✓ src/__tests__/services/agentshield-integration.test.ts (30 tests) 1121ms
|
|
2364
|
+
✓ should respect cache TTL 1102ms
|
|
2365
|
+
✓ src/delegation/storage/__tests__/memory-graph-storage.test.ts (27 tests) 4ms
|
|
2366
|
+
✓ src/services/__tests__/access-control.service.test.ts (23 tests) 93ms
|
|
2367
|
+
✓ src/__tests__/services/oauth-service-pkce.test.ts (18 tests) 53ms
|
|
2368
|
+
✓ src/__tests__/providers/memory.test.ts (34 tests) 11ms
|
|
2369
|
+
stderr | src/services/__tests__/proof-verifier.test.ts > ProofVerifier Security > Signature Verification > should handle signature verification errors gracefully
|
|
2370
|
+
[CryptoService] Ed25519 verification error: Error: Crypto error
|
|
2371
|
+
at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/proof-verifier.test.ts:328:9
|
|
2372
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:145:11
|
|
2373
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:919:26
|
|
2374
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1244:20
|
|
2375
|
+
at new Promise (<anonymous>)
|
|
2376
|
+
at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1210:10)
|
|
2377
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1654:37
|
|
2378
|
+
at Traces.$ (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/vitest@4.0.14_@opentelemetry+api@1.9.0_@types+node@20.19.25_jiti@2.6.1_lightningcss@1.3_3f67c307998c5928f2f2aae3bf45ed95/node_modules/vitest/dist/chunks/traces.U4xDYhzZ.js:115:27)
|
|
2379
|
+
at trace (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/vitest@4.0.14_@opentelemetry+api@1.9.0_@types+node@20.19.25_jiti@2.6.1_lightningcss@1.3_3f67c307998c5928f2f2aae3bf45ed95/node_modules/vitest/dist/chunks/test.DqQZzsWf.js:234:21)
|
|
2380
|
+
at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1654:12)
|
|
2381
|
+
|
|
2382
|
+
stdout | src/__tests__/integration.test.ts > Integration Tests > Full handshake and tool execution flow > should complete full authentication and tool execution cycle
|
|
2383
|
+
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zq5-ev5Y5xitwortZn_hNu31JcIkMy6WR","environment":"development","userDidGeneration":"disabled"},"timestamp":1764810916633,"timestampFormatted":"2025-12-04T01:15:16.633Z"}
|
|
2384
|
+
|
|
2385
|
+
stdout | src/__tests__/integration.test.ts > Integration Tests > Full handshake and tool execution flow > should complete full authentication and tool execution cycle
|
|
2386
|
+
[AUDIT] {"event":"tool_executed","data":{"tool":"greetingTool","sessionId":"6a8538c35483912e6fa59b9d80a234a6","timestamp":1764810916633},"timestamp":1764810916633,"timestampFormatted":"2025-12-04T01:15:16.633Z"}
|
|
2387
|
+
|
|
2388
|
+
stdout | src/__tests__/integration.test.ts > Integration Tests > Session expiry handling > should handle expired sessions correctly
|
|
2389
|
+
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zrZDbmNhqf3BMOEmdMS43AbAXoxxOZOpR","environment":"development","userDidGeneration":"disabled"},"timestamp":1764810916653,"timestampFormatted":"2025-12-04T01:15:16.653Z"}
|
|
2390
|
+
|
|
2391
|
+
stdout | src/__tests__/integration.test.ts > Integration Tests > Key rotation flow > should handle key rotation and maintain functionality
|
|
2392
|
+
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zgy6dSCtf7RFVDeck5OhoQdmlj_ikCGVy","environment":"development","userDidGeneration":"disabled"},"timestamp":1764810916653,"timestampFormatted":"2025-12-04T01:15:16.653Z"}
|
|
2393
|
+
|
|
2394
|
+
stdout | src/__tests__/integration.test.ts > Integration Tests > Key rotation flow > should handle key rotation and maintain functionality
|
|
2395
|
+
[AUDIT] {"event":"keys_rotated","data":{"oldDid":"did:key:zgy6dSCtf7RFVDeck5OhoQdmlj_ikCGVy","newDid":"did:key:zX01Vl7wEhhblqby8hUZw7ym8HPzGkCYk","timestamp":1764810916653},"timestamp":1764810916653,"timestampFormatted":"2025-12-04T01:15:16.653Z"}
|
|
2396
|
+
|
|
2397
|
+
stdout | src/__tests__/integration.test.ts > Integration Tests > Well-known endpoints > should provide identity discovery endpoints
|
|
2398
|
+
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zrh6BVDG-vvjr3kRBldFSu7ZjJU0CI6_8","environment":"development","userDidGeneration":"disabled"},"timestamp":1764810916654,"timestampFormatted":"2025-12-04T01:15:16.654Z"}
|
|
2399
|
+
|
|
2400
|
+
stdout | src/__tests__/integration.test.ts > Integration Tests > Nonce replay protection > should prevent nonce reuse
|
|
2401
|
+
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:z-bMdycC8zJjTaoBLp9NJvCZNWmY7RoHU","environment":"development","userDidGeneration":"disabled"},"timestamp":1764810916654,"timestampFormatted":"2025-12-04T01:15:16.654Z"}
|
|
2402
|
+
|
|
2403
|
+
stdout | src/__tests__/integration.test.ts > Integration Tests > Error handling > should handle network errors gracefully
|
|
2404
|
+
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zvjDTDtmeSU_LyKrdgPpebIMABTtLusYo","environment":"development","userDidGeneration":"disabled"},"timestamp":1764810916655,"timestampFormatted":"2025-12-04T01:15:16.655Z"}
|
|
2405
|
+
|
|
2406
|
+
stdout | src/__tests__/integration.test.ts > Integration Tests > Error handling > should handle malformed DID documents
|
|
2407
|
+
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zM1uMfox_m4C1uLwchCsq_5RlBIwedwHi","environment":"development","userDidGeneration":"disabled"},"timestamp":1764810916655,"timestampFormatted":"2025-12-04T01:15:16.655Z"}
|
|
2408
|
+
|
|
2409
|
+
stdout | src/__tests__/integration.test.ts > Integration Tests > Debug endpoint > should provide debug information in development
|
|
2410
|
+
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zuUj7R0sDPxGWTIxawj6KwOPRikFwJzeW","environment":"development","userDidGeneration":"disabled"},"timestamp":1764810916655,"timestampFormatted":"2025-12-04T01:15:16.655Z"}
|
|
2411
|
+
|
|
2412
|
+
stdout | src/__tests__/integration.test.ts > Integration Tests > Debug endpoint > should be disabled in production
|
|
2413
|
+
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:z4w9GuVqb6B_X5NrINMq5kdtplydG9yFa","environment":"development","userDidGeneration":"disabled"},"timestamp":1764810916656,"timestampFormatted":"2025-12-04T01:15:16.656Z"}
|
|
2414
|
+
|
|
2415
|
+
✓ src/services/__tests__/proof-verifier.test.ts (21 tests) 14ms
|
|
2416
|
+
✓ src/__tests__/integration.test.ts (9 tests) 24ms
|
|
2417
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - merged config format > should fetch from project-scoped /config endpoint when projectId is available
|
|
2418
|
+
[ToolProtectionService] Config loaded from API {
|
|
2419
|
+
source: 'api',
|
|
2420
|
+
toolCount: 2,
|
|
2421
|
+
protectedTools: [ 'checkout' ],
|
|
2422
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2423
|
+
projectId: 'test-project-123',
|
|
2424
|
+
cacheTtlMs: 300000,
|
|
2425
|
+
cacheExpiresAt: '2025-12-04T01:20:16.668Z'
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2428
|
+
✓ src/__tests__/runtime/delegation-flow.test.ts (4 tests) 6ms
|
|
2429
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - merged config format > should handle new endpoint format with toolProtections object
|
|
2430
|
+
[ToolProtectionService] Config loaded from API {
|
|
2431
|
+
source: 'api',
|
|
2432
|
+
toolCount: 2,
|
|
2433
|
+
protectedTools: [ 'protected_tool' ],
|
|
2434
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2435
|
+
projectId: 'test-project-123',
|
|
2436
|
+
cacheTtlMs: 300000,
|
|
2437
|
+
cacheExpiresAt: '2025-12-04T01:20:16.732Z'
|
|
2438
|
+
}
|
|
2439
|
+
|
|
2440
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - merged config format > should parse oauthProvider from new endpoint format (Phase 2)
|
|
2441
|
+
[ToolProtectionService] Config loaded from API {
|
|
2442
|
+
source: 'api',
|
|
2443
|
+
toolCount: 2,
|
|
2444
|
+
protectedTools: [ 'read_repos', 'send_email' ],
|
|
2445
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2446
|
+
projectId: 'test-project-123',
|
|
2447
|
+
cacheTtlMs: 300000,
|
|
2448
|
+
cacheExpiresAt: '2025-12-04T01:20:16.732Z'
|
|
2449
|
+
}
|
|
2450
|
+
|
|
2451
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - merged config format > should preserve oauthProvider through cache operations
|
|
2452
|
+
[ToolProtectionService] Config loaded from API {
|
|
2453
|
+
source: 'api',
|
|
2454
|
+
toolCount: 1,
|
|
2455
|
+
protectedTools: [ 'read_repos' ],
|
|
2456
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2457
|
+
projectId: 'test-project-123',
|
|
2458
|
+
cacheTtlMs: 300000,
|
|
2459
|
+
cacheExpiresAt: '2025-12-04T01:20:16.861Z'
|
|
2460
|
+
}
|
|
2461
|
+
|
|
2462
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should fetch from agent-scoped endpoint when projectId is not available
|
|
2463
|
+
[ToolProtectionService] Config loaded from API {
|
|
2464
|
+
source: 'api',
|
|
2465
|
+
toolCount: 2,
|
|
2466
|
+
protectedTools: [ 'checkout' ],
|
|
2467
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2468
|
+
projectId: 'none',
|
|
2469
|
+
cacheTtlMs: 300000,
|
|
2470
|
+
cacheExpiresAt: '2025-12-04T01:20:16.869Z'
|
|
2471
|
+
}
|
|
2472
|
+
|
|
2473
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should handle old endpoint format with tools array
|
|
2474
|
+
[ToolProtectionService] Config loaded from API {
|
|
2475
|
+
source: 'api',
|
|
2476
|
+
toolCount: 2,
|
|
2477
|
+
protectedTools: [ 'tool1' ],
|
|
2478
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2479
|
+
projectId: 'none',
|
|
2480
|
+
cacheTtlMs: 300000,
|
|
2481
|
+
cacheExpiresAt: '2025-12-04T01:20:16.870Z'
|
|
2482
|
+
}
|
|
2483
|
+
|
|
2484
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should parse oauthProvider from old endpoint format (tools array)
|
|
2485
|
+
[ToolProtectionService] Config loaded from API {
|
|
2486
|
+
source: 'api',
|
|
2487
|
+
toolCount: 2,
|
|
2488
|
+
protectedTools: [ 'read_repos', 'send_email' ],
|
|
2489
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2490
|
+
projectId: 'none',
|
|
2491
|
+
cacheTtlMs: 300000,
|
|
2492
|
+
cacheExpiresAt: '2025-12-04T01:20:16.870Z'
|
|
2493
|
+
}
|
|
2494
|
+
|
|
2495
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should handle old endpoint format with tools object
|
|
2496
|
+
[ToolProtectionService] Config loaded from API {
|
|
2497
|
+
source: 'api',
|
|
2498
|
+
toolCount: 2,
|
|
2499
|
+
protectedTools: [ 'tool1' ],
|
|
2500
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2501
|
+
projectId: 'none',
|
|
2502
|
+
cacheTtlMs: 300000,
|
|
2503
|
+
cacheExpiresAt: '2025-12-04T01:20:16.870Z'
|
|
2504
|
+
}
|
|
2505
|
+
|
|
2506
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should parse oauthProvider from old endpoint format (tools object)
|
|
2507
|
+
[ToolProtectionService] Config loaded from API {
|
|
2508
|
+
source: 'api',
|
|
2509
|
+
toolCount: 2,
|
|
2510
|
+
protectedTools: [ 'read_repos', 'send_email' ],
|
|
2511
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2512
|
+
projectId: 'none',
|
|
2513
|
+
cacheTtlMs: 300000,
|
|
2514
|
+
cacheExpiresAt: '2025-12-04T01:20:16.870Z'
|
|
2515
|
+
}
|
|
2516
|
+
|
|
2517
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should skip tools without name in array format
|
|
2518
|
+
[ToolProtectionService] Cache miss, fetching from API {
|
|
2519
|
+
source: 'api-fetch-start',
|
|
2520
|
+
cacheKey: 'agent:did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK',
|
|
2521
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2522
|
+
projectId: 'none',
|
|
2523
|
+
apiUrl: 'https://kya.vouched.id',
|
|
2524
|
+
endpoint: '/api/v1/bouncer/config?agent_did=did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK'
|
|
2525
|
+
}
|
|
2526
|
+
[ToolProtectionService] Fetching from API: https://kya.vouched.id/api/v1/bouncer/config?agent_did=did%3Akey%3Az6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK {
|
|
2527
|
+
method: 'config?agent_did (legacy)',
|
|
2528
|
+
projectId: 'none',
|
|
2529
|
+
apiKeyPresent: true,
|
|
2530
|
+
apiKeyLength: 18,
|
|
2531
|
+
apiKeyMasked: 'test-api...'
|
|
2532
|
+
}
|
|
2533
|
+
|
|
2534
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should skip tools without name in array format
|
|
2535
|
+
[ToolProtectionService] API response received {
|
|
2536
|
+
source: 'api-fetch-complete',
|
|
2537
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2538
|
+
projectId: 'none',
|
|
2539
|
+
responseKeys: [ 'success', 'data', 'metadata' ],
|
|
2540
|
+
dataKeys: [ 'tools' ],
|
|
2541
|
+
rawConfig: null,
|
|
2542
|
+
rawConfigToolProtection: null,
|
|
2543
|
+
rawToolProtections: null,
|
|
2544
|
+
rawTools: [
|
|
2545
|
+
{ name: 'valid_tool', requiresDelegation: true },
|
|
2546
|
+
{ requiresDelegation: false }
|
|
2547
|
+
],
|
|
2548
|
+
responseMetadata: {}
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should skip tools without name in array format
|
|
2552
|
+
[ToolProtectionService] Config loaded from API {
|
|
2553
|
+
source: 'api',
|
|
2554
|
+
toolCount: 1,
|
|
2555
|
+
protectedTools: [ 'valid_tool' ],
|
|
2556
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2557
|
+
projectId: 'none',
|
|
2558
|
+
cacheTtlMs: 300000,
|
|
2559
|
+
cacheExpiresAt: '2025-12-04T01:20:16.873Z'
|
|
2560
|
+
}
|
|
2561
|
+
[ToolProtectionService] API fetch successful, config cached {
|
|
2562
|
+
source: 'cache-write',
|
|
2563
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2564
|
+
cacheKey: 'agent:did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK',
|
|
2565
|
+
toolCount: 1,
|
|
2566
|
+
tools: [ { name: 'valid_tool', requiresDelegation: true, scopeCount: 0 } ],
|
|
2567
|
+
ttlMs: 300000,
|
|
2568
|
+
ttlMinutes: 5,
|
|
2569
|
+
expiresAt: '2025-12-04T01:20:16.873Z',
|
|
2570
|
+
expiresIn: '300s'
|
|
2571
|
+
}
|
|
2572
|
+
|
|
2573
|
+
stderr | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch error handling > should handle network errors gracefully
|
|
2574
|
+
[ToolProtectionService] API fetch failed, no fallback, failing closed (deny-all) {
|
|
2575
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2576
|
+
error: 'ECONNREFUSED',
|
|
2577
|
+
cacheKey: 'agent:did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK'
|
|
2578
|
+
}
|
|
2579
|
+
|
|
2580
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > caching behavior > should cache successful API responses
|
|
2581
|
+
[ToolProtectionService] Config loaded from API {
|
|
2582
|
+
source: 'api',
|
|
2583
|
+
toolCount: 1,
|
|
2584
|
+
protectedTools: [ 'tool1' ],
|
|
2585
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2586
|
+
projectId: 'none',
|
|
2587
|
+
cacheTtlMs: 300000,
|
|
2588
|
+
cacheExpiresAt: '2025-12-04T01:20:16.929Z'
|
|
2589
|
+
}
|
|
2590
|
+
|
|
2591
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > caching behavior > should use default cache TTL when not specified
|
|
2592
|
+
[ToolProtectionService] Config loaded from API {
|
|
2593
|
+
source: 'api',
|
|
2594
|
+
toolCount: 0,
|
|
2595
|
+
protectedTools: [],
|
|
2596
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2597
|
+
projectId: 'none',
|
|
2598
|
+
cacheTtlMs: 300000,
|
|
2599
|
+
cacheExpiresAt: '2025-12-04T01:20:16.929Z'
|
|
2600
|
+
}
|
|
2601
|
+
|
|
2602
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > caching behavior > should use custom cache TTL when specified
|
|
2603
|
+
[ToolProtectionService] Config loaded from API {
|
|
2604
|
+
source: 'api',
|
|
2605
|
+
toolCount: 0,
|
|
2606
|
+
protectedTools: [],
|
|
2607
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2608
|
+
projectId: 'none',
|
|
2609
|
+
cacheTtlMs: 600000,
|
|
2610
|
+
cacheExpiresAt: '2025-12-04T01:25:16.930Z'
|
|
2611
|
+
}
|
|
2612
|
+
|
|
2613
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > edge cases > should handle empty toolProtections object
|
|
2614
|
+
[ToolProtectionService] Config loaded from API {
|
|
2615
|
+
source: 'api',
|
|
2616
|
+
toolCount: 0,
|
|
2617
|
+
protectedTools: [],
|
|
2618
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2619
|
+
projectId: 'none',
|
|
2620
|
+
cacheTtlMs: 300000,
|
|
2621
|
+
cacheExpiresAt: '2025-12-04T01:20:16.931Z'
|
|
2622
|
+
}
|
|
2623
|
+
|
|
2624
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > edge cases > should handle null requiredScopes
|
|
2625
|
+
[ToolProtectionService] Config loaded from API {
|
|
2626
|
+
source: 'api',
|
|
2627
|
+
toolCount: 1,
|
|
2628
|
+
protectedTools: [ 'tool1' ],
|
|
2629
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2630
|
+
projectId: 'none',
|
|
2631
|
+
cacheTtlMs: 300000,
|
|
2632
|
+
cacheExpiresAt: '2025-12-04T01:20:16.936Z'
|
|
2633
|
+
}
|
|
2634
|
+
|
|
2635
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > edge cases > should handle mixed camelCase and snake_case in response
|
|
2636
|
+
stderr | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should use wildcard protection in fail-safe deny-all mode
|
|
2637
|
+
[ToolProtectionService] Config loaded from API {
|
|
2638
|
+
source: 'api',
|
|
2639
|
+
[ToolProtectionService] API fetch failed, no fallback, failing closed (deny-all) {
|
|
2640
|
+
toolCount: 2,
|
|
2641
|
+
protectedTools: [ 'tool1' ],
|
|
2642
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2643
|
+
projectId: 'none',
|
|
2644
|
+
cacheTtlMs: 300000,
|
|
2645
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2646
|
+
cacheExpiresAt: '2025-12-04T01:20:16.936Z'
|
|
2647
|
+
error: 'Network error',
|
|
2648
|
+
}
|
|
2649
|
+
|
|
2650
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return null when tool has no protection
|
|
2651
|
+
[ToolProtectionService] Config loaded from API {
|
|
2652
|
+
cacheKey: 'agent:did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK'
|
|
2653
|
+
source: 'api',
|
|
2654
|
+
toolCount: 1,
|
|
2655
|
+
protectedTools: [],
|
|
2656
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2657
|
+
}
|
|
2658
|
+
projectId: 'none',
|
|
2659
|
+
|
|
2660
|
+
cacheTtlMs: 300000,
|
|
2661
|
+
cacheExpiresAt: '2025-12-04T01:20:16.937Z'
|
|
2662
|
+
}
|
|
2663
|
+
|
|
2664
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return null when tool is not in config
|
|
2665
|
+
[ToolProtectionService] Config loaded from API {
|
|
2666
|
+
source: 'api',
|
|
2667
|
+
toolCount: 1,
|
|
2668
|
+
protectedTools: [ 'other_tool' ],
|
|
2669
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2670
|
+
projectId: 'none',
|
|
2671
|
+
cacheTtlMs: 300000,
|
|
2672
|
+
cacheExpiresAt: '2025-12-04T01:20:16.937Z'
|
|
2673
|
+
}
|
|
2674
|
+
|
|
2675
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return null when tool is not in config
|
|
2676
|
+
[ToolProtectionService] Protection check {
|
|
2677
|
+
tool: 'unknown_tool',
|
|
2678
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2679
|
+
found: false,
|
|
2680
|
+
isWildcard: true,
|
|
2681
|
+
requiresDelegation: false,
|
|
2682
|
+
availableTools: [ 'other_tool' ]
|
|
2683
|
+
}
|
|
2684
|
+
|
|
2685
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return wildcard protection when tool not found and wildcard exists
|
|
2686
|
+
[ToolProtectionService] Config loaded from API {
|
|
2687
|
+
source: 'api',
|
|
2688
|
+
toolCount: 2,
|
|
2689
|
+
protectedTools: [ '*' ],
|
|
2690
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2691
|
+
projectId: 'none',
|
|
2692
|
+
cacheTtlMs: 300000,
|
|
2693
|
+
cacheExpiresAt: '2025-12-04T01:20:16.937Z'
|
|
2694
|
+
}
|
|
2695
|
+
|
|
2696
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return wildcard protection when tool not found and wildcard exists
|
|
2697
|
+
[ToolProtectionService] Protection check {
|
|
2698
|
+
tool: 'unknown_tool',
|
|
2699
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2700
|
+
found: true,
|
|
2701
|
+
isWildcard: true,
|
|
2702
|
+
requiresDelegation: true,
|
|
2703
|
+
availableTools: [ '*', 'specific_tool' ]
|
|
2704
|
+
}
|
|
2705
|
+
|
|
2706
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should prioritize specific tool protection over wildcard
|
|
2707
|
+
[ToolProtectionService] Config loaded from API {
|
|
2708
|
+
source: 'api',
|
|
2709
|
+
toolCount: 2,
|
|
2710
|
+
protectedTools: [ '*' ],
|
|
2711
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2712
|
+
projectId: 'none',
|
|
2713
|
+
cacheTtlMs: 300000,
|
|
2714
|
+
cacheExpiresAt: '2025-12-04T01:20:16.937Z'
|
|
2715
|
+
}
|
|
2716
|
+
|
|
2717
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should use wildcard protection in fail-safe deny-all mode
|
|
2718
|
+
[ToolProtectionService] Protection check {
|
|
2719
|
+
tool: 'any_tool',
|
|
2720
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2721
|
+
found: true,
|
|
2722
|
+
isWildcard: true,
|
|
2723
|
+
requiresDelegation: true,
|
|
2724
|
+
availableTools: [ '*' ]
|
|
2725
|
+
}
|
|
2726
|
+
|
|
2727
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return protection config when tool requires delegation
|
|
2728
|
+
[ToolProtectionService] Config loaded from API {
|
|
2729
|
+
source: 'api',
|
|
2730
|
+
toolCount: 1,
|
|
2731
|
+
protectedTools: [ 'protected_tool' ],
|
|
2732
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2733
|
+
projectId: 'none',
|
|
2734
|
+
cacheTtlMs: 300000,
|
|
2735
|
+
cacheExpiresAt: '2025-12-04T01:20:16.937Z'
|
|
2736
|
+
}
|
|
2737
|
+
|
|
2738
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return protection config when tool requires delegation
|
|
2739
|
+
[ToolProtectionService] Protection check {
|
|
2740
|
+
tool: 'protected_tool',
|
|
2741
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2742
|
+
found: true,
|
|
2743
|
+
isWildcard: false,
|
|
2744
|
+
requiresDelegation: true,
|
|
2745
|
+
availableTools: [ 'protected_tool' ]
|
|
2746
|
+
}
|
|
2747
|
+
|
|
2748
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > integration with NoOpToolProtectionCache > should work with NoOpToolProtectionCache
|
|
2749
|
+
[ToolProtectionService] Config loaded from API {
|
|
2750
|
+
source: 'api',
|
|
2751
|
+
toolCount: 1,
|
|
2752
|
+
protectedTools: [ 'tool1' ],
|
|
2753
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2754
|
+
projectId: 'none',
|
|
2755
|
+
cacheTtlMs: 300000,
|
|
2756
|
+
cacheExpiresAt: '2025-12-04T01:20:16.938Z'
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > integration with NoOpToolProtectionCache > should work with NoOpToolProtectionCache
|
|
2760
|
+
[ToolProtectionService] Config loaded from API {
|
|
2761
|
+
source: 'api',
|
|
2762
|
+
toolCount: 1,
|
|
2763
|
+
protectedTools: [ 'tool1' ],
|
|
2764
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2765
|
+
projectId: 'none',
|
|
2766
|
+
cacheTtlMs: 300000,
|
|
2767
|
+
cacheExpiresAt: '2025-12-04T01:20:16.938Z'
|
|
2768
|
+
}
|
|
2769
|
+
|
|
2770
|
+
✓ src/__tests__/runtime/route-interception.test.ts (21 tests) 274ms
|
|
2771
|
+
✓ src/__tests__/services/tool-protection.service.test.ts (49 tests) 307ms
|
|
2772
|
+
✓ src/services/__tests__/oauth-provider-registry.test.ts (9 tests) 19ms
|
|
2773
|
+
stderr | src/config/__tests__/remote-config.spec.ts > fetchRemoteConfig > Error handling > should return null if API request fails
|
|
2774
|
+
[RemoteConfig] API returned 404: Not Found
|
|
2775
|
+
|
|
2776
|
+
stderr | src/config/__tests__/remote-config.spec.ts > fetchRemoteConfig > Error handling > should return null if API throws error
|
|
2777
|
+
[RemoteConfig] Failed to fetch config: Error: Network error
|
|
2778
|
+
at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/config/__tests__/remote-config.spec.ts:170:35
|
|
2779
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:145:11
|
|
2780
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:919:26
|
|
2781
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1244:20
|
|
2782
|
+
at new Promise (<anonymous>)
|
|
2783
|
+
at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1210:10)
|
|
2784
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1654:37
|
|
2785
|
+
at Traces.$ (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/vitest@4.0.14_@opentelemetry+api@1.9.0_@types+node@20.19.25_jiti@2.6.1_lightningcss@1.3_3f67c307998c5928f2f2aae3bf45ed95/node_modules/vitest/dist/chunks/traces.U4xDYhzZ.js:115:27)
|
|
2786
|
+
at trace (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/vitest@4.0.14_@opentelemetry+api@1.9.0_@types+node@20.19.25_jiti@2.6.1_lightningcss@1.3_3f67c307998c5928f2f2aae3bf45ed95/node_modules/vitest/dist/chunks/test.DqQZzsWf.js:234:21)
|
|
2787
|
+
at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1654:12)
|
|
2788
|
+
|
|
2789
|
+
stderr | src/config/__tests__/remote-config.spec.ts > fetchRemoteConfig > Error handling > should return null if neither projectId nor agentDid provided
|
|
2790
|
+
[RemoteConfig] Neither projectId nor agentDid provided
|
|
2791
|
+
|
|
2792
|
+
stderr | src/config/__tests__/remote-config.spec.ts > fetchRemoteConfig > Error handling > should handle cache read errors gracefully
|
|
2793
|
+
[RemoteConfig] Cache read failed: Error: Cache error
|
|
2794
|
+
at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/config/__tests__/remote-config.spec.ts:198:50
|
|
2795
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:145:11
|
|
2796
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:919:26
|
|
2797
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1244:20
|
|
2798
|
+
at new Promise (<anonymous>)
|
|
2799
|
+
at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1210:10)
|
|
2800
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1654:37
|
|
2801
|
+
at Traces.$ (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/vitest@4.0.14_@opentelemetry+api@1.9.0_@types+node@20.19.25_jiti@2.6.1_lightningcss@1.3_3f67c307998c5928f2f2aae3bf45ed95/node_modules/vitest/dist/chunks/traces.U4xDYhzZ.js:115:27)
|
|
2802
|
+
at trace (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/vitest@4.0.14_@opentelemetry+api@1.9.0_@types+node@20.19.25_jiti@2.6.1_lightningcss@1.3_3f67c307998c5928f2f2aae3bf45ed95/node_modules/vitest/dist/chunks/test.DqQZzsWf.js:234:21)
|
|
2803
|
+
at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1654:12)
|
|
2804
|
+
|
|
2805
|
+
✓ src/config/__tests__/remote-config.spec.ts (9 tests) 5ms
|
|
2806
|
+
✓ src/delegation/__tests__/cascading-revocation.test.ts (23 tests) 10ms
|
|
2807
|
+
✓ src/delegation/__tests__/vc-verifier.test.ts (35 tests) 12ms
|
|
2808
|
+
stdout | src/__tests__/services/cache-busting.test.ts > Cache Busting in clearAndRefresh > clearAndRefresh should call fetchFromApi with bypassCDNCache: true
|
|
2809
|
+
[ToolProtectionService] clearAndRefresh starting {
|
|
2810
|
+
cacheKey: 'config:tool-protections:test-project-123',
|
|
2811
|
+
projectId: 'test-project-123',
|
|
2812
|
+
agentDid: 'did:key:test-agent...'
|
|
2813
|
+
}
|
|
2814
|
+
|
|
2815
|
+
stdout | src/__tests__/services/cache-busting.test.ts > Cache Busting in clearAndRefresh > clearAndRefresh should call fetchFromApi with bypassCDNCache: true
|
|
2816
|
+
[ToolProtectionService] Cache entry deleted { cacheKey: 'config:tool-protections:test-project-123' }
|
|
2817
|
+
|
|
2818
|
+
stdout | src/__tests__/services/cache-busting.test.ts > Cache Busting in clearAndRefresh > clearAndRefresh should call fetchFromApi with bypassCDNCache: true
|
|
2819
|
+
[ToolProtectionService] Fresh config fetched and cached {
|
|
2820
|
+
cacheKey: 'config:tool-protections:test-project-123',
|
|
2821
|
+
toolCount: 1,
|
|
2822
|
+
protectedTools: [ 'greet' ],
|
|
2823
|
+
source: 'api'
|
|
2824
|
+
}
|
|
2825
|
+
|
|
2826
|
+
stdout | src/__tests__/services/cache-busting.test.ts > Cache Busting in clearAndRefresh > fetchFromApi should add cache-busting query param when bypassCDNCache is true
|
|
2827
|
+
[ToolProtectionService] Fetching from API: https://test.agentshield.com/api/v1/bouncer/projects/test-project-123/config?_t=1764810917475 {
|
|
2828
|
+
method: 'projects/{projectId}/config (merged)',
|
|
2829
|
+
projectId: 'test-project-123',
|
|
2830
|
+
apiKeyPresent: true,
|
|
2831
|
+
apiKeyLength: 12,
|
|
2832
|
+
apiKeyMasked: 'test-api...'
|
|
2833
|
+
}
|
|
2834
|
+
|
|
2835
|
+
stdout | src/__tests__/services/cache-busting.test.ts > Cache Busting in clearAndRefresh > fetchFromApi should add Cache-Control headers when bypassCDNCache is true
|
|
2836
|
+
[ToolProtectionService] Fetching from API: https://test.agentshield.com/api/v1/bouncer/projects/test-project-123/config?_t=1764810917475 {
|
|
2837
|
+
method: 'projects/{projectId}/config (merged)',
|
|
2838
|
+
projectId: 'test-project-123',
|
|
2839
|
+
apiKeyPresent: true,
|
|
2840
|
+
apiKeyLength: 12,
|
|
2841
|
+
apiKeyMasked: 'test-api...'
|
|
2842
|
+
}
|
|
2843
|
+
|
|
2844
|
+
stdout | src/__tests__/services/cache-busting.test.ts > Cache Busting in clearAndRefresh > fetchFromApi should NOT add cache-busting when bypassCDNCache is false/undefined
|
|
2845
|
+
[ToolProtectionService] Fetching from API: https://test.agentshield.com/api/v1/bouncer/projects/test-project-123/config {
|
|
2846
|
+
method: 'projects/{projectId}/config (merged)',
|
|
2847
|
+
projectId: 'test-project-123',
|
|
2848
|
+
apiKeyPresent: true,
|
|
2849
|
+
apiKeyLength: 12,
|
|
2850
|
+
apiKeyMasked: 'test-api...'
|
|
2851
|
+
}
|
|
2852
|
+
|
|
2853
|
+
stdout | src/__tests__/services/cache-busting.test.ts > Cache Busting in clearAndRefresh > cache should be empty after clearAndRefresh deletes it
|
|
2854
|
+
[ToolProtectionService] clearAndRefresh starting {
|
|
2855
|
+
cacheKey: 'config:tool-protections:test-project-123',
|
|
2856
|
+
projectId: 'test-project-123',
|
|
2857
|
+
agentDid: 'did:key:test-agent...'
|
|
2858
|
+
}
|
|
2859
|
+
|
|
2860
|
+
stdout | src/__tests__/services/cache-busting.test.ts > Cache Busting in clearAndRefresh > cache should be empty after clearAndRefresh deletes it
|
|
2861
|
+
[ToolProtectionService] Cache entry deleted { cacheKey: 'config:tool-protections:test-project-123' }
|
|
2862
|
+
|
|
2863
|
+
stdout | src/__tests__/services/cache-busting.test.ts > Cache Busting in clearAndRefresh > cache should be empty after clearAndRefresh deletes it
|
|
2864
|
+
[ToolProtectionService] Fresh config fetched and cached {
|
|
2865
|
+
cacheKey: 'config:tool-protections:test-project-123',
|
|
2866
|
+
toolCount: 0,
|
|
2867
|
+
protectedTools: [],
|
|
2868
|
+
source: 'api'
|
|
2869
|
+
}
|
|
2870
|
+
|
|
2871
|
+
✓ src/__tests__/services/cache-busting.test.ts (5 tests) 4ms
|
|
2872
|
+
stderr | src/__tests__/identity/user-did-manager.test.ts > UserDidManager > error handling > should handle storage.get errors gracefully (Phase 5)
|
|
2873
|
+
[UserDidManager] Storage.get failed: Error: Storage error
|
|
2874
|
+
at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/__tests__/identity/user-did-manager.test.ts:206:67
|
|
2875
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:145:11
|
|
2876
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:919:26
|
|
2877
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1244:20
|
|
2878
|
+
at new Promise (<anonymous>)
|
|
2879
|
+
at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1210:10)
|
|
2880
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1654:37
|
|
2881
|
+
at Traces.$ (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/vitest@4.0.14_@opentelemetry+api@1.9.0_@types+node@20.19.25_jiti@2.6.1_lightningcss@1.3_3f67c307998c5928f2f2aae3bf45ed95/node_modules/vitest/dist/chunks/traces.U4xDYhzZ.js:115:27)
|
|
2882
|
+
at trace (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/vitest@4.0.14_@opentelemetry+api@1.9.0_@types+node@20.19.25_jiti@2.6.1_lightningcss@1.3_3f67c307998c5928f2f2aae3bf45ed95/node_modules/vitest/dist/chunks/test.DqQZzsWf.js:234:21)
|
|
2883
|
+
at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:1654:12)
|
|
2884
|
+
|
|
2885
|
+
stderr | src/__tests__/identity/user-did-manager.test.ts > UserDidManager > error handling > should handle storage.delete errors gracefully
|
|
2886
|
+
[UserDidManager] Storage.delete failed, continuing: Error: Storage error
|
|
2887
|
+
at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/__tests__/identity/user-did-manager.test.ts:225:70
|
|
2888
|
+
at processTicksAndRejections (node:internal/process/task_queues:103:5)
|
|
2889
|
+
at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.14/node_modules/@vitest/runner/dist/index.js:919:20
|
|
2890
|
+
|
|
2891
|
+
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
|
|
2892
|
+
[ToolProtectionService] Config loaded from API {
|
|
2893
|
+
source: 'api',
|
|
2894
|
+
toolCount: 1,
|
|
2895
|
+
protectedTools: [ 'phase1_tool' ],
|
|
2896
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2897
|
+
projectId: 'none',
|
|
2898
|
+
cacheTtlMs: 300000,
|
|
2899
|
+
cacheExpiresAt: '2025-12-04T01:20:17.480Z'
|
|
2900
|
+
}
|
|
2901
|
+
|
|
2902
|
+
✓ src/delegation/__tests__/delegation-graph.test.ts (28 tests) 11ms
|
|
2903
|
+
✓ src/__tests__/identity/user-did-manager.test.ts (17 tests) 7ms
|
|
2904
|
+
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)
|
|
2905
|
+
[ToolProtectionService] Config loaded from API {
|
|
2906
|
+
source: 'api',
|
|
2907
|
+
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)
|
|
2908
|
+
toolCount: 1,
|
|
2909
|
+
protectedTools: [ 'old_tool' ],
|
|
2910
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2911
|
+
projectId: 'none',
|
|
2912
|
+
[ProviderResolver] Tool does not specify oauthProvider. Using project-configured provider "github" as fallback. Consider explicitly setting oauthProvider in tool protection config.
|
|
2913
|
+
cacheTtlMs: 300000,
|
|
2914
|
+
cacheExpiresAt: '2025-12-04T01:20:17.484Z'
|
|
2915
|
+
}
|
|
2916
|
+
|
|
2917
|
+
|
|
2918
|
+
stdout | src/__tests__/regression/phase2-regression.test.ts > Phase 2 Regression Tests > Backward Compatibility > Old API endpoint format > should still support old endpoint format (tools object)
|
|
2919
|
+
[ToolProtectionService] Config loaded from API {
|
|
2920
|
+
source: 'api',
|
|
2921
|
+
toolCount: 1,
|
|
2922
|
+
protectedTools: [ 'old_tool' ],
|
|
2923
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2924
|
+
projectId: 'none',
|
|
2925
|
+
cacheTtlMs: 300000,
|
|
2926
|
+
cacheExpiresAt: '2025-12-04T01:20:17.484Z'
|
|
2927
|
+
}
|
|
2928
|
+
|
|
2929
|
+
stdout | src/__tests__/regression/phase2-regression.test.ts > Phase 2 Regression Tests > Backward Compatibility > snake_case field names > should still support snake_case field names
|
|
2930
|
+
[ToolProtectionService] Config loaded from API {
|
|
2931
|
+
source: 'api',
|
|
2932
|
+
toolCount: 1,
|
|
2933
|
+
protectedTools: [ 'tool_with_snake_case' ],
|
|
2934
|
+
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2935
|
+
projectId: 'test-project-123',
|
|
2524
2936
|
cacheTtlMs: 300000,
|
|
2525
|
-
cacheExpiresAt: '2025-
|
|
2937
|
+
cacheExpiresAt: '2025-12-04T01:20:17.485Z'
|
|
2526
2938
|
}
|
|
2939
|
+
|
|
2940
|
+
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
|
|
2527
2941
|
[ToolProtectionService] Config loaded from API {
|
|
2528
2942
|
source: 'api',
|
|
2529
|
-
toolCount:
|
|
2530
|
-
protectedTools: [ '
|
|
2943
|
+
toolCount: 2,
|
|
2944
|
+
protectedTools: [ 'phase1_tool', 'phase2_tool' ],
|
|
2531
2945
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2532
|
-
projectId: 'test-project',
|
|
2946
|
+
projectId: 'test-project-123',
|
|
2533
2947
|
cacheTtlMs: 300000,
|
|
2534
|
-
cacheExpiresAt: '2025-
|
|
2948
|
+
cacheExpiresAt: '2025-12-04T01:20:17.486Z'
|
|
2535
2949
|
}
|
|
2536
2950
|
|
|
2537
|
-
✓ src/__tests__/integration/full-flow.test.ts (21 tests) 20ms
|
|
2538
|
-
stderr | src/__tests__/identity/user-did-manager.test.ts > UserDidManager > error handling > should handle storage.get errors gracefully
|
|
2539
|
-
[UserDidManager] Storage.get failed, generating new DID: Error: Storage error
|
|
2540
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/__tests__/identity/user-did-manager.test.ts:187:67
|
|
2541
|
-
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
|
|
2542
|
-
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
|
|
2543
|
-
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
|
|
2544
|
-
at new Promise (<anonymous>)
|
|
2545
|
-
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)
|
|
2546
|
-
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)
|
|
2547
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
2548
|
-
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)
|
|
2549
|
-
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)
|
|
2550
|
-
|
|
2551
|
-
stderr | src/__tests__/identity/user-did-manager.test.ts > UserDidManager > error handling > should handle storage.set errors gracefully
|
|
2552
|
-
[UserDidManager] Storage.set failed, continuing with cached DID: Error: Storage error
|
|
2553
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/__tests__/identity/user-did-manager.test.ts:196:67
|
|
2554
|
-
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
|
|
2555
|
-
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
|
|
2556
|
-
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
|
|
2557
|
-
at new Promise (<anonymous>)
|
|
2558
|
-
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)
|
|
2559
|
-
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)
|
|
2560
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
2561
|
-
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)
|
|
2562
|
-
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)
|
|
2563
|
-
|
|
2564
|
-
stderr | src/__tests__/identity/user-did-manager.test.ts > UserDidManager > error handling > should handle storage.delete errors gracefully
|
|
2565
|
-
[UserDidManager] Storage.delete failed, continuing: Error: Storage error
|
|
2566
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/__tests__/identity/user-did-manager.test.ts:206:70
|
|
2567
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
2568
|
-
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
|
|
2569
|
-
|
|
2570
|
-
✓ src/__tests__/identity/user-did-manager.test.ts (17 tests) 8ms
|
|
2571
2951
|
stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > New endpoint format (toolProtections object) > should parse oauthProvider from camelCase field
|
|
2572
2952
|
[ToolProtectionService] Config loaded from API {
|
|
2573
2953
|
source: 'api',
|
|
@@ -2576,7 +2956,7 @@ stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolPro
|
|
|
2576
2956
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2577
2957
|
projectId: 'test-project-123',
|
|
2578
2958
|
cacheTtlMs: 300000,
|
|
2579
|
-
cacheExpiresAt: '2025-
|
|
2959
|
+
cacheExpiresAt: '2025-12-04T01:20:17.483Z'
|
|
2580
2960
|
}
|
|
2581
2961
|
|
|
2582
2962
|
stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > New endpoint format (toolProtections object) > should parse oauthProvider from snake_case field
|
|
@@ -2587,7 +2967,7 @@ stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolPro
|
|
|
2587
2967
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2588
2968
|
projectId: 'test-project-123',
|
|
2589
2969
|
cacheTtlMs: 300000,
|
|
2590
|
-
cacheExpiresAt: '2025-
|
|
2970
|
+
cacheExpiresAt: '2025-12-04T01:20:17.485Z'
|
|
2591
2971
|
}
|
|
2592
2972
|
|
|
2593
2973
|
stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > New endpoint format (toolProtections object) > should prefer camelCase over snake_case when both present
|
|
@@ -2598,7 +2978,7 @@ stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolPro
|
|
|
2598
2978
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2599
2979
|
projectId: 'test-project-123',
|
|
2600
2980
|
cacheTtlMs: 300000,
|
|
2601
|
-
cacheExpiresAt: '2025-
|
|
2981
|
+
cacheExpiresAt: '2025-12-04T01:20:17.485Z'
|
|
2602
2982
|
}
|
|
2603
2983
|
|
|
2604
2984
|
stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > New endpoint format (toolProtections object) > should handle missing oauthProvider field (backward compatible)
|
|
@@ -2609,7 +2989,7 @@ stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolPro
|
|
|
2609
2989
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2610
2990
|
projectId: 'test-project-123',
|
|
2611
2991
|
cacheTtlMs: 300000,
|
|
2612
|
-
cacheExpiresAt: '2025-
|
|
2992
|
+
cacheExpiresAt: '2025-12-04T01:20:17.486Z'
|
|
2613
2993
|
}
|
|
2614
2994
|
|
|
2615
2995
|
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
|
|
@@ -2620,7 +3000,7 @@ stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolPro
|
|
|
2620
3000
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2621
3001
|
projectId: 'none',
|
|
2622
3002
|
cacheTtlMs: 300000,
|
|
2623
|
-
cacheExpiresAt: '2025-
|
|
3003
|
+
cacheExpiresAt: '2025-12-04T01:20:17.486Z'
|
|
2624
3004
|
}
|
|
2625
3005
|
|
|
2626
3006
|
stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > Old endpoint format (tools array) > should parse oauthProvider from array format with snake_case
|
|
@@ -2631,7 +3011,7 @@ stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolPro
|
|
|
2631
3011
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2632
3012
|
projectId: 'none',
|
|
2633
3013
|
cacheTtlMs: 300000,
|
|
2634
|
-
cacheExpiresAt: '2025-
|
|
3014
|
+
cacheExpiresAt: '2025-12-04T01:20:17.487Z'
|
|
2635
3015
|
}
|
|
2636
3016
|
|
|
2637
3017
|
stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > Old endpoint format (tools array) > should prefer camelCase over snake_case in array format
|
|
@@ -2642,9 +3022,10 @@ stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolPro
|
|
|
2642
3022
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2643
3023
|
projectId: 'none',
|
|
2644
3024
|
cacheTtlMs: 300000,
|
|
2645
|
-
cacheExpiresAt: '2025-
|
|
3025
|
+
cacheExpiresAt: '2025-12-04T01:20:17.487Z'
|
|
2646
3026
|
}
|
|
2647
3027
|
|
|
3028
|
+
✓ src/__tests__/regression/phase2-regression.test.ts (12 tests) 7ms
|
|
2648
3029
|
stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > Old endpoint format (tools object) > should parse oauthProvider from object format with camelCase
|
|
2649
3030
|
[ToolProtectionService] Config loaded from API {
|
|
2650
3031
|
source: 'api',
|
|
@@ -2653,7 +3034,7 @@ stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolPro
|
|
|
2653
3034
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2654
3035
|
projectId: 'none',
|
|
2655
3036
|
cacheTtlMs: 300000,
|
|
2656
|
-
cacheExpiresAt: '2025-
|
|
3037
|
+
cacheExpiresAt: '2025-12-04T01:20:17.487Z'
|
|
2657
3038
|
}
|
|
2658
3039
|
|
|
2659
3040
|
stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > Old endpoint format (tools object) > should parse oauthProvider from object format with snake_case
|
|
@@ -2664,7 +3045,7 @@ stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolPro
|
|
|
2664
3045
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2665
3046
|
projectId: 'none',
|
|
2666
3047
|
cacheTtlMs: 300000,
|
|
2667
|
-
cacheExpiresAt: '2025-
|
|
3048
|
+
cacheExpiresAt: '2025-12-04T01:20:17.487Z'
|
|
2668
3049
|
}
|
|
2669
3050
|
|
|
2670
3051
|
stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > Old endpoint format (tools object) > should prefer camelCase over snake_case in object format
|
|
@@ -2675,7 +3056,7 @@ stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolPro
|
|
|
2675
3056
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2676
3057
|
projectId: 'none',
|
|
2677
3058
|
cacheTtlMs: 300000,
|
|
2678
|
-
cacheExpiresAt: '2025-
|
|
3059
|
+
cacheExpiresAt: '2025-12-04T01:20:17.487Z'
|
|
2679
3060
|
}
|
|
2680
3061
|
|
|
2681
3062
|
stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > Caching > should cache oauthProvider field correctly
|
|
@@ -2686,7 +3067,7 @@ stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolPro
|
|
|
2686
3067
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2687
3068
|
projectId: 'test-project-123',
|
|
2688
3069
|
cacheTtlMs: 300000,
|
|
2689
|
-
cacheExpiresAt: '2025-
|
|
3070
|
+
cacheExpiresAt: '2025-12-04T01:20:17.487Z'
|
|
2690
3071
|
}
|
|
2691
3072
|
|
|
2692
3073
|
stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > oauthProvider field inclusion > should include oauthProvider in returned ToolProtection objects when present
|
|
@@ -2697,7 +3078,7 @@ stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolPro
|
|
|
2697
3078
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2698
3079
|
projectId: 'test-project-123',
|
|
2699
3080
|
cacheTtlMs: 300000,
|
|
2700
|
-
cacheExpiresAt: '2025-
|
|
3081
|
+
cacheExpiresAt: '2025-12-04T01:20:17.488Z'
|
|
2701
3082
|
}
|
|
2702
3083
|
|
|
2703
3084
|
stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > oauthProvider field inclusion > should handle empty string oauthProvider gracefully
|
|
@@ -2708,337 +3089,81 @@ stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolPro
|
|
|
2708
3089
|
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2709
3090
|
projectId: 'test-project-123',
|
|
2710
3091
|
cacheTtlMs: 300000,
|
|
2711
|
-
cacheExpiresAt: '2025-
|
|
3092
|
+
cacheExpiresAt: '2025-12-04T01:20:17.488Z'
|
|
2712
3093
|
}
|
|
2713
3094
|
|
|
2714
|
-
✓ src/__tests__/services/tool-protection-oauth-provider.test.ts (14 tests)
|
|
2715
|
-
✓ src/__tests__/services/oauth-service-pkce.test.ts (18 tests) 9ms
|
|
2716
|
-
✓ src/__tests__/providers/memory.test.ts (34 tests) 13ms
|
|
2717
|
-
✓ src/compliance/__tests__/schema-verifier.test.ts (30 tests) 25ms
|
|
2718
|
-
stderr | src/services/__tests__/provider-resolver.test.ts > ProviderResolver > resolveProvider - Priority 2: Scope inference > should fall back to configuredProvider for ambiguous scopes
|
|
2719
|
-
[ProviderResolver] Tool does not specify oauthProvider. Using project-configured provider "github" as fallback. Consider explicitly setting oauthProvider in tool protection config.
|
|
2720
|
-
✓ src/delegation/__tests__/cascading-revocation.test.ts (23 tests) 9ms
|
|
2721
|
-
stdout | src/services/__tests__/provider-resolver.test.ts > ProviderResolver > resolveProvider - Priority 2: Scope inference > should infer provider from github scope prefix
|
|
2722
|
-
[ProviderResolver] Inferred provider "github" from scopes
|
|
2723
|
-
|
|
2724
|
-
stdout | src/services/__tests__/provider-resolver.test.ts > ProviderResolver > resolveProvider - Priority 2: Scope inference > should infer provider from gmail scope prefix (maps to google)
|
|
2725
|
-
[ProviderResolver] Inferred provider "google" from scopes
|
|
2726
|
-
|
|
2727
|
-
|
|
3095
|
+
✓ src/__tests__/services/tool-protection-oauth-provider.test.ts (14 tests) 6ms
|
|
2728
3096
|
stderr | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Scope inference edge cases (Priority 2) > should handle empty scopes array
|
|
2729
|
-
[ProviderResolver] Tool does not specify oauthProvider. Using project-configured provider "github" as fallback. Consider explicitly setting oauthProvider in tool protection config.
|
|
2730
|
-
|
|
2731
|
-
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)
|
|
2732
|
-
[ProviderResolver] Tool does not specify oauthProvider. Using project-configured provider "github" as fallback. Consider explicitly setting oauthProvider in tool protection config.
|
|
2733
|
-
|
|
2734
|
-
stderr | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Scope inference edge cases (Priority 2) > should handle unknown scope prefixes
|
|
2735
|
-
[ProviderResolver] Tool does not specify oauthProvider. Using project-configured provider "github" as fallback. Consider explicitly setting oauthProvider in tool protection config.
|
|
2736
|
-
|
|
2737
3097
|
stdout | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Scope inference edge cases (Priority 2) > should verify gmail → google mapping works
|
|
2738
3098
|
[ProviderResolver] Inferred provider "google" from scopes
|
|
2739
3099
|
|
|
2740
3100
|
stdout | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Scope inference edge cases (Priority 2) > should verify calendar → google mapping works
|
|
2741
3101
|
[ProviderResolver] Inferred provider "google" from scopes
|
|
3102
|
+
[ProviderResolver] Tool does not specify oauthProvider. Using project-configured provider "github" as fallback. Consider explicitly setting oauthProvider in tool protection config.
|
|
2742
3103
|
|
|
2743
3104
|
stdout | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Scope inference edge cases (Priority 2) > should verify outlook → microsoft mapping works
|
|
2744
3105
|
[ProviderResolver] Inferred provider "microsoft" from scopes
|
|
2745
3106
|
|
|
2746
|
-
stderr | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Scope inference edge cases (Priority 2) > should handle scopes
|
|
2747
|
-
[ProviderResolver] Tool does not specify oauthProvider. Using project-configured provider "github" as fallback. Consider explicitly setting oauthProvider in tool protection config.
|
|
2748
|
-
|
|
2749
|
-
stderr | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Scope inference edge cases (Priority 2) > should handle inferred provider not in registry
|
|
2750
|
-
[ProviderResolver] Tool does not specify oauthProvider. Using project-configured provider "google" as fallback. Consider explicitly setting oauthProvider in tool protection config.
|
|
2751
|
-
|
|
2752
|
-
stderr | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Fallback behavior (Priority 3 - configuredProvider) > should use configuredProvider when oauthProvider not specified
|
|
2753
|
-
[ProviderResolver] Tool does not specify oauthProvider. Using project-configured provider "google" as fallback. Consider explicitly setting oauthProvider in tool protection config.
|
|
3107
|
+
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)
|
|
2754
3108
|
|
|
2755
3109
|
stdout | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Provider name case sensitivity > should handle provider names case-insensitively in inference
|
|
3110
|
+
[ProviderResolver] Tool does not specify oauthProvider. Using project-configured provider "github" as fallback. Consider explicitly setting oauthProvider in tool protection config.
|
|
2756
3111
|
[ProviderResolver] Inferred provider "github" from scopes
|
|
2757
3112
|
|
|
2758
|
-
|
|
3113
|
+
|
|
2759
3114
|
stdout | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Multiple scopes with same provider > should handle multiple scopes from same provider
|
|
2760
|
-
[ProviderResolver] Tool does not specify oauthProvider. Using project-configured provider "github" as fallback. Consider explicitly setting oauthProvider in tool protection config.
|
|
2761
3115
|
[ProviderResolver] Inferred provider "github" from scopes
|
|
2762
3116
|
|
|
2763
|
-
|
|
3117
|
+
stderr | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Scope inference edge cases (Priority 2) > should handle unknown scope prefixes
|
|
2764
3118
|
stdout | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > configuredProvider behavior (Priority 3) > should prefer scope-inferred provider over configuredProvider
|
|
2765
3119
|
[ProviderResolver] Inferred provider "google" from scopes
|
|
2766
3120
|
|
|
2767
|
-
stdout | src/__tests__/
|
|
2768
|
-
[
|
|
2769
|
-
source: 'api',
|
|
2770
|
-
toolCount: 1,
|
|
2771
|
-
protectedTools: [ 'phase1_tool' ],
|
|
2772
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2773
|
-
projectId: 'none',
|
|
2774
|
-
cacheTtlMs: 300000,
|
|
2775
|
-
cacheExpiresAt: '2025-11-26T15:41:45.870Z'
|
|
2776
|
-
}
|
|
2777
|
-
|
|
2778
|
-
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)
|
|
2779
|
-
[ToolProtectionService] Config loaded from API {
|
|
2780
|
-
source: 'api',
|
|
2781
|
-
toolCount: 1,
|
|
2782
|
-
protectedTools: [ 'old_tool' ],
|
|
2783
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2784
|
-
projectId: 'none',
|
|
2785
|
-
cacheTtlMs: 300000,
|
|
2786
|
-
cacheExpiresAt: '2025-11-26T15:41:45.881Z'
|
|
2787
|
-
}
|
|
2788
|
-
|
|
2789
|
-
stdout | src/__tests__/regression/phase2-regression.test.ts > Phase 2 Regression Tests > Backward Compatibility > Old API endpoint format > should still support old endpoint format (tools object)
|
|
2790
|
-
[ToolProtectionService] Config loaded from API {
|
|
2791
|
-
source: 'api',
|
|
2792
|
-
toolCount: 1,
|
|
2793
|
-
protectedTools: [ 'old_tool' ],
|
|
2794
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2795
|
-
projectId: 'none',
|
|
2796
|
-
cacheTtlMs: 300000,
|
|
2797
|
-
cacheExpiresAt: '2025-11-26T15:41:45.882Z'
|
|
2798
|
-
}
|
|
2799
|
-
|
|
2800
|
-
stdout | src/__tests__/regression/phase2-regression.test.ts > Phase 2 Regression Tests > Backward Compatibility > snake_case field names > should still support snake_case field names
|
|
2801
|
-
[ToolProtectionService] Config loaded from API {
|
|
2802
|
-
source: 'api',
|
|
2803
|
-
toolCount: 1,
|
|
2804
|
-
protectedTools: [ 'tool_with_snake_case' ],
|
|
2805
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2806
|
-
projectId: 'test-project-123',
|
|
2807
|
-
cacheTtlMs: 300000,
|
|
2808
|
-
cacheExpiresAt: '2025-11-26T15:41:45.882Z'
|
|
2809
|
-
}
|
|
2810
|
-
|
|
2811
|
-
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
|
|
2812
|
-
[ToolProtectionService] Config loaded from API {
|
|
2813
|
-
source: 'api',
|
|
2814
|
-
toolCount: 2,
|
|
2815
|
-
protectedTools: [ 'phase1_tool', 'phase2_tool' ],
|
|
2816
|
-
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)
|
|
2817
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2818
|
-
projectId: 'test-project-123',
|
|
2819
|
-
cacheTtlMs: 300000,
|
|
2820
|
-
cacheExpiresAt: '2025-11-26T15:41:45.885Z'
|
|
2821
|
-
}
|
|
2822
|
-
|
|
3121
|
+
stdout | src/services/__tests__/provider-resolver.test.ts > ProviderResolver > resolveProvider - Priority 2: Scope inference > should infer provider from github scope prefix
|
|
3122
|
+
[ProviderResolver] Inferred provider "github" from scopes
|
|
2823
3123
|
[ProviderResolver] Tool does not specify oauthProvider. Using project-configured provider "github" as fallback. Consider explicitly setting oauthProvider in tool protection config.
|
|
2824
3124
|
|
|
2825
|
-
stdout | src/__tests__/integration.test.ts > Integration Tests > Full handshake and tool execution flow > should complete full authentication and tool execution cycle
|
|
2826
|
-
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:z-fcn5k3v2ZvYK9dlIxU8n4lMqIWAYMTh","environment":"development","userDidGeneration":"disabled"},"timestamp":1764171405871,"timestampFormatted":"2025-11-26T15:36:45.871Z"}
|
|
2827
|
-
|
|
2828
|
-
stdout | src/__tests__/integration.test.ts > Integration Tests > Full handshake and tool execution flow > should complete full authentication and tool execution cycle
|
|
2829
|
-
[AUDIT] {"event":"tool_executed","data":{"tool":"greetingTool","sessionId":"70fae80e7f85d8d7c07f785a68990d26","timestamp":1764171405871},"timestamp":1764171405871,"timestampFormatted":"2025-11-26T15:36:45.871Z"}
|
|
2830
|
-
|
|
2831
|
-
stdout | src/__tests__/integration.test.ts > Integration Tests > Session expiry handling > should handle expired sessions correctly
|
|
2832
|
-
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zT_7RaA0bLnzRdBKcRy8wSQhZQWOqdu6M","environment":"development","userDidGeneration":"disabled"},"timestamp":1764171405883,"timestampFormatted":"2025-11-26T15:36:45.883Z"}
|
|
2833
|
-
|
|
2834
|
-
stdout | src/__tests__/integration.test.ts > Integration Tests > Key rotation flow > should handle key rotation and maintain functionality
|
|
2835
|
-
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zTh6D4u2wJj_Y3a4AyHIqU89X7UCKWfoF","environment":"development","userDidGeneration":"disabled"},"timestamp":1764171405883,"timestampFormatted":"2025-11-26T15:36:45.883Z"}
|
|
2836
|
-
|
|
2837
|
-
stdout | src/__tests__/integration.test.ts > Integration Tests > Key rotation flow > should handle key rotation and maintain functionality
|
|
2838
|
-
[AUDIT] {"event":"keys_rotated","data":{"oldDid":"did:key:zTh6D4u2wJj_Y3a4AyHIqU89X7UCKWfoF","newDid":"did:key:zmjuGQxXVJTkNFmfA7biSllCtFAK3U22B","timestamp":1764171405883},"timestamp":1764171405883,"timestampFormatted":"2025-11-26T15:36:45.883Z"}
|
|
2839
|
-
|
|
2840
|
-
stdout | src/__tests__/integration.test.ts > Integration Tests > Well-known endpoints > should provide identity discovery endpoints
|
|
2841
|
-
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zt1EwInIPdYDy3nYd-H-vnDVXRVC8Ngnz","environment":"development","userDidGeneration":"disabled"},"timestamp":1764171405887,"timestampFormatted":"2025-11-26T15:36:45.887Z"}
|
|
2842
|
-
|
|
2843
|
-
stdout | src/__tests__/integration.test.ts > Integration Tests > Nonce replay protection > should prevent nonce reuse
|
|
2844
|
-
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zd-MgrCaVXirdlYFY4OUm5ClzQZAdOchd","environment":"development","userDidGeneration":"disabled"},"timestamp":1764171405888,"timestampFormatted":"2025-11-26T15:36:45.888Z"}
|
|
2845
|
-
|
|
2846
|
-
stdout | src/__tests__/integration.test.ts > Integration Tests > Error handling > should handle network errors gracefully
|
|
2847
|
-
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zmtiafOUYJHiKNWjqtCy4IRCk3iieeEpb","environment":"development","userDidGeneration":"disabled"},"timestamp":1764171405888,"timestampFormatted":"2025-11-26T15:36:45.888Z"}
|
|
2848
|
-
|
|
2849
|
-
stdout | src/__tests__/integration.test.ts > Integration Tests > Error handling > should handle malformed DID documents
|
|
2850
|
-
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zmglnfmMGPMSRQ2b7Vr0t-PoMXPG0Ltbg","environment":"development","userDidGeneration":"disabled"},"timestamp":1764171405888,"timestampFormatted":"2025-11-26T15:36:45.888Z"}
|
|
2851
|
-
|
|
2852
|
-
stdout | src/__tests__/integration.test.ts > Integration Tests > Debug endpoint > should provide debug information in development
|
|
2853
|
-
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zs1TeqYecLeqs89TtiOTV2kVTDeu1wdzZ","environment":"development","userDidGeneration":"disabled"},"timestamp":1764171405889,"timestampFormatted":"2025-11-26T15:36:45.889Z"}
|
|
2854
|
-
|
|
2855
|
-
✓ src/__tests__/services/provider-resolver-edge-cases.test.ts (25 tests | 1 skipped) 12ms
|
|
2856
|
-
✓ src/delegation/__tests__/delegation-graph.test.ts (28 tests) 6ms
|
|
2857
|
-
✓ src/__tests__/runtime/base-extensions.test.ts (38 tests) 14ms
|
|
2858
|
-
stdout | src/__tests__/integration.test.ts > Integration Tests > Debug endpoint > should be disabled in production
|
|
2859
|
-
[AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:z-4za6CQd91VdYGlXbvvTWpL8r9av_GhE","environment":"development","userDidGeneration":"disabled"},"timestamp":1764171405889,"timestampFormatted":"2025-11-26T15:36:45.889Z"}
|
|
2860
|
-
|
|
2861
|
-
✓ src/__tests__/regression/phase2-regression.test.ts (12 tests) 17ms
|
|
2862
|
-
✓ src/services/__tests__/provider-resolver.test.ts (8 tests) 6ms
|
|
2863
|
-
✓ src/__tests__/integration.test.ts (9 tests) 19ms
|
|
2864
|
-
✓ src/__tests__/providers/base.test.ts (14 tests) 6ms
|
|
2865
|
-
✓ src/__tests__/runtime/proof-client-did.test.ts (17 tests) 7ms
|
|
2866
|
-
stderr | src/config/__tests__/remote-config.spec.ts > fetchRemoteConfig > Error handling > should return null if API request fails
|
|
2867
|
-
[RemoteConfig] API returned 404: Not Found
|
|
2868
|
-
|
|
2869
|
-
stderr | src/config/__tests__/remote-config.spec.ts > fetchRemoteConfig > Error handling > should return null if API throws error
|
|
2870
|
-
[RemoteConfig] Failed to fetch config: Error: Network error
|
|
2871
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/config/__tests__/remote-config.spec.ts:170:35
|
|
2872
|
-
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
|
|
2873
|
-
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
|
|
2874
|
-
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
|
|
2875
|
-
at new Promise (<anonymous>)
|
|
2876
|
-
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)
|
|
2877
|
-
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)
|
|
2878
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
2879
|
-
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)
|
|
2880
|
-
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)
|
|
2881
|
-
|
|
2882
|
-
stderr | src/config/__tests__/remote-config.spec.ts > fetchRemoteConfig > Error handling > should return null if neither projectId nor agentDid provided
|
|
2883
|
-
[RemoteConfig] Neither projectId nor agentDid provided
|
|
2884
|
-
|
|
2885
|
-
stderr | src/config/__tests__/remote-config.spec.ts > fetchRemoteConfig > Error handling > should handle cache read errors gracefully
|
|
2886
|
-
[RemoteConfig] Cache read failed: Error: Cache error
|
|
2887
|
-
at /Users/brian/Documents/Vouched/@sandbox/xmcp-i-S/packages/mcp-i-core/src/config/__tests__/remote-config.spec.ts:198:50
|
|
2888
|
-
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
|
|
2889
|
-
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
|
|
2890
|
-
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
|
|
2891
|
-
at new Promise (<anonymous>)
|
|
2892
|
-
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)
|
|
2893
|
-
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)
|
|
2894
|
-
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
2895
|
-
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)
|
|
2896
|
-
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)
|
|
2897
|
-
|
|
2898
|
-
✓ src/config/__tests__/remote-config.spec.ts (9 tests) 7ms
|
|
2899
|
-
✓ src/delegation/storage/__tests__/memory-graph-storage.test.ts (27 tests) 4ms
|
|
2900
|
-
✓ src/__tests__/runtime/delegation-flow.test.ts (4 tests) 11ms
|
|
2901
|
-
✓ src/delegation/__tests__/bitstring.test.ts (30 tests) 5ms
|
|
2902
|
-
✓ src/delegation/__tests__/utils.test.ts (28 tests) 7ms
|
|
2903
|
-
✓ src/services/__tests__/oauth-provider-registry.test.ts (9 tests) 3ms
|
|
2904
|
-
✓ src/delegation/storage/__tests__/memory-statuslist-storage.test.ts (14 tests) 3ms
|
|
2905
|
-
✓ src/__tests__/config/provider-runtime-config.test.ts (9 tests) 4ms
|
|
2906
|
-
✓ src/__tests__/runtime/audit-logger.test.ts (9 tests) 4ms
|
|
2907
|
-
stdout | src/__tests__/services/cache-busting.test.ts > Cache Busting in clearAndRefresh > clearAndRefresh should call fetchFromApi with bypassCDNCache: true
|
|
2908
|
-
[ToolProtectionService] clearAndRefresh starting {
|
|
2909
|
-
cacheKey: 'config:tool-protections:test-project-123',
|
|
2910
|
-
projectId: 'test-project-123',
|
|
2911
|
-
agentDid: 'did:key:test-agent...'
|
|
2912
|
-
}
|
|
2913
|
-
|
|
2914
|
-
stdout | src/__tests__/services/cache-busting.test.ts > Cache Busting in clearAndRefresh > clearAndRefresh should call fetchFromApi with bypassCDNCache: true
|
|
2915
|
-
[ToolProtectionService] Cache entry deleted { cacheKey: 'config:tool-protections:test-project-123' }
|
|
2916
|
-
|
|
2917
|
-
stdout | src/__tests__/services/cache-busting.test.ts > Cache Busting in clearAndRefresh > clearAndRefresh should call fetchFromApi with bypassCDNCache: true
|
|
2918
|
-
[ToolProtectionService] Fresh config fetched and cached {
|
|
2919
|
-
cacheKey: 'config:tool-protections:test-project-123',
|
|
2920
|
-
toolCount: 1,
|
|
2921
|
-
protectedTools: [ 'greet' ],
|
|
2922
|
-
source: 'api'
|
|
2923
|
-
}
|
|
2924
3125
|
|
|
2925
|
-
|
|
2926
|
-
[
|
|
2927
|
-
method: 'projects/{projectId}/tool-protections (new)',
|
|
2928
|
-
projectId: 'test-project-123',
|
|
2929
|
-
apiKeyPresent: true,
|
|
2930
|
-
apiKeyLength: 12,
|
|
2931
|
-
apiKeyMasked: 'test-api...'
|
|
2932
|
-
}
|
|
3126
|
+
stderr | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Scope inference edge cases (Priority 2) > should handle scopes without colons
|
|
3127
|
+
[ProviderResolver] Tool does not specify oauthProvider. Using project-configured provider "github" as fallback. Consider explicitly setting oauthProvider in tool protection config.
|
|
2933
3128
|
|
|
2934
|
-
|
|
2935
|
-
[
|
|
2936
|
-
method: 'projects/{projectId}/tool-protections (new)',
|
|
2937
|
-
projectId: 'test-project-123',
|
|
2938
|
-
apiKeyPresent: true,
|
|
2939
|
-
apiKeyLength: 12,
|
|
2940
|
-
apiKeyMasked: 'test-api...'
|
|
2941
|
-
}
|
|
3129
|
+
stderr | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Scope inference edge cases (Priority 2) > should handle inferred provider not in registry
|
|
3130
|
+
[ProviderResolver] Tool does not specify oauthProvider. Using project-configured provider "google" as fallback. Consider explicitly setting oauthProvider in tool protection config.
|
|
2942
3131
|
|
|
2943
|
-
|
|
2944
|
-
[
|
|
2945
|
-
method: 'projects/{projectId}/tool-protections (new)',
|
|
2946
|
-
projectId: 'test-project-123',
|
|
2947
|
-
apiKeyPresent: true,
|
|
2948
|
-
apiKeyLength: 12,
|
|
2949
|
-
apiKeyMasked: 'test-api...'
|
|
2950
|
-
}
|
|
3132
|
+
stderr | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Fallback behavior (Priority 3 - configuredProvider) > should use configuredProvider when oauthProvider not specified
|
|
3133
|
+
[ProviderResolver] Tool does not specify oauthProvider. Using project-configured provider "google" as fallback. Consider explicitly setting oauthProvider in tool protection config.
|
|
2951
3134
|
|
|
2952
|
-
|
|
2953
|
-
[
|
|
2954
|
-
cacheKey: 'config:tool-protections:test-project-123',
|
|
2955
|
-
projectId: 'test-project-123',
|
|
2956
|
-
agentDid: 'did:key:test-agent...'
|
|
2957
|
-
}
|
|
3135
|
+
stderr | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > configuredProvider behavior (Priority 3) > should use configuredProvider when tool has no oauthProvider
|
|
3136
|
+
[ProviderResolver] Tool does not specify oauthProvider. Using project-configured provider "github" as fallback. Consider explicitly setting oauthProvider in tool protection config.
|
|
2958
3137
|
|
|
2959
|
-
stdout | src/__tests__/
|
|
2960
|
-
[
|
|
3138
|
+
stdout | src/services/__tests__/provider-resolver.test.ts > ProviderResolver > resolveProvider - Priority 2: Scope inference > should infer provider from gmail scope prefix (maps to google)
|
|
3139
|
+
[ProviderResolver] Inferred provider "google" from scopes
|
|
2961
3140
|
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
toolCount: 0,
|
|
2966
|
-
protectedTools: [],
|
|
2967
|
-
source: 'api'
|
|
2968
|
-
}
|
|
3141
|
+
✓ src/__tests__/services/provider-resolver-edge-cases.test.ts (25 tests | 1 skipped) 29ms
|
|
3142
|
+
stderr | src/services/__tests__/provider-resolver.test.ts > ProviderResolver > resolveProvider - Priority 2: Scope inference > should fall back to configuredProvider for ambiguous scopes
|
|
3143
|
+
[ProviderResolver] Tool does not specify oauthProvider. Using project-configured provider "github" as fallback. Consider explicitly setting oauthProvider in tool protection config.
|
|
2969
3144
|
|
|
3145
|
+
✓ src/services/__tests__/provider-resolver.test.ts (8 tests) 48ms
|
|
2970
3146
|
stderr | src/services/__tests__/provider-resolution.integration.test.ts > Provider Resolution Integration > Backward compatibility > should work with Phase 1 tools (no oauthProvider field)
|
|
2971
3147
|
[ProviderResolver] Tool does not specify oauthProvider. Using project-configured provider "github" as fallback. Consider explicitly setting oauthProvider in tool protection config.
|
|
2972
3148
|
|
|
2973
|
-
✓ src/__tests__/
|
|
2974
|
-
✓ src/
|
|
2975
|
-
✓ src/
|
|
2976
|
-
✓ src/
|
|
2977
|
-
✓ src/
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
cacheExpiresAt: '2025-11-26T15:36:47.421Z'
|
|
2987
|
-
}
|
|
2988
|
-
|
|
2989
|
-
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Real-world Scenarios > should handle typical e-commerce tool protection config
|
|
2990
|
-
[ToolProtectionService] Config loaded from API {
|
|
2991
|
-
source: 'api',
|
|
2992
|
-
toolCount: 4,
|
|
2993
|
-
protectedTools: [ 'add_to_cart', 'checkout' ],
|
|
2994
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
2995
|
-
projectId: 'test-project-123',
|
|
2996
|
-
cacheTtlMs: 300000,
|
|
2997
|
-
cacheExpiresAt: '2025-11-26T15:41:46.421Z'
|
|
2998
|
-
}
|
|
2999
|
-
|
|
3000
|
-
stderr | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Real-world Scenarios > should handle API rate limiting gracefully
|
|
3001
|
-
[ToolProtectionService] API fetch failed, using fallback config {
|
|
3002
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
3003
|
-
error: 'Failed to fetch bouncer config: 429 Too Many Requests - Rate limit exceeded'
|
|
3004
|
-
}
|
|
3005
|
-
|
|
3006
|
-
stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Real-world Scenarios > should handle concurrent requests
|
|
3007
|
-
[ToolProtectionService] Config loaded from API {
|
|
3008
|
-
source: 'api',
|
|
3009
|
-
toolCount: 1,
|
|
3010
|
-
protectedTools: [ 'tool1' ],
|
|
3011
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
3012
|
-
projectId: 'test-project-123',
|
|
3013
|
-
cacheTtlMs: 300000,
|
|
3014
|
-
cacheExpiresAt: '2025-11-26T15:41:46.422Z'
|
|
3015
|
-
}
|
|
3016
|
-
[ToolProtectionService] Config loaded from API {
|
|
3017
|
-
source: 'api',
|
|
3018
|
-
toolCount: 1,
|
|
3019
|
-
protectedTools: [ 'tool1' ],
|
|
3020
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
3021
|
-
projectId: 'test-project-123',
|
|
3022
|
-
cacheTtlMs: 300000,
|
|
3023
|
-
cacheExpiresAt: '2025-11-26T15:41:46.422Z'
|
|
3024
|
-
}
|
|
3025
|
-
[ToolProtectionService] Config loaded from API {
|
|
3026
|
-
source: 'api',
|
|
3027
|
-
toolCount: 1,
|
|
3028
|
-
protectedTools: [ 'tool1' ],
|
|
3029
|
-
agentDid: 'did:key:z6MkhaXgBZDv...',
|
|
3030
|
-
projectId: 'test-project-123',
|
|
3031
|
-
cacheTtlMs: 300000,
|
|
3032
|
-
cacheExpiresAt: '2025-11-26T15:41:46.422Z'
|
|
3033
|
-
}
|
|
3034
|
-
|
|
3035
|
-
✓ src/__tests__/services/agentshield-integration.test.ts (30 tests) 1113ms
|
|
3036
|
-
✓ should respect cache TTL 1102ms
|
|
3149
|
+
✓ src/services/__tests__/provider-resolution.integration.test.ts (6 tests) 3ms
|
|
3150
|
+
✓ src/delegation/__tests__/did-key-resolver.test.ts (28 tests) 8ms
|
|
3151
|
+
✓ src/delegation/__tests__/vc-issuer.test.ts (21 tests) 8ms
|
|
3152
|
+
✓ src/compliance/__tests__/schema-verifier.test.ts (30 tests) 8ms
|
|
3153
|
+
✓ src/config/__tests__/merged-config.spec.ts (6 tests) 44ms
|
|
3154
|
+
✓ src/services/__tests__/batch-delegation.service.test.ts (11 tests) 80ms
|
|
3155
|
+
✓ src/delegation/__tests__/audience-validator.test.ts (5 tests) 2ms
|
|
3156
|
+
✓ src/delegation/storage/__tests__/memory-statuslist-storage.test.ts (14 tests) 3ms
|
|
3157
|
+
✓ src/delegation/__tests__/utils.test.ts (28 tests) 6ms
|
|
3158
|
+
✓ src/__tests__/runtime/audit-logger.test.ts (9 tests) 3ms
|
|
3159
|
+
✓ src/utils/__tests__/did-helpers.test.ts (16 tests) 7ms
|
|
3160
|
+
✓ src/delegation/__tests__/bitstring.test.ts (30 tests) 6ms
|
|
3161
|
+
✓ src/__tests__/config/provider-runtime-config.test.ts (9 tests) 2ms
|
|
3037
3162
|
↓ src/__tests__/delegation-e2e.test.ts (14 tests | 14 skipped)
|
|
3038
|
-
✓ src/__tests__/index.test.ts (4 tests)
|
|
3163
|
+
✓ src/__tests__/index.test.ts (4 tests) 3ms
|
|
3039
3164
|
|
|
3040
|
-
Test Files
|
|
3041
|
-
Tests
|
|
3042
|
-
Start at
|
|
3043
|
-
Duration
|
|
3165
|
+
Test Files 48 passed | 1 skipped (49)
|
|
3166
|
+
Tests 955 passed | 16 skipped (971)
|
|
3167
|
+
Start at 19:15:13
|
|
3168
|
+
Duration 5.16s (transform 8.92s, setup 0ms, import 17.14s, tests 3.08s, environment 3ms)
|
|
3044
3169
|
|