@kya-os/mcp-i-core 1.2.2-canary.3 → 1.2.2-canary.31

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.
Files changed (230) hide show
  1. package/.claude/settings.local.json +9 -0
  2. package/.turbo/turbo-build.log +5 -0
  3. package/.turbo/turbo-test$colon$coverage.log +3787 -0
  4. package/.turbo/turbo-test.log +2380 -0
  5. package/COMPLIANCE_IMPROVEMENT_REPORT.md +483 -0
  6. package/Composer 3.md +615 -0
  7. package/GPT-5.md +1169 -0
  8. package/OPUS-plan.md +352 -0
  9. package/PHASE_3_AND_4.1_SUMMARY.md +585 -0
  10. package/PHASE_3_SUMMARY.md +317 -0
  11. package/PHASE_4.1.3_SUMMARY.md +428 -0
  12. package/PHASE_4.1_COMPLETE.md +525 -0
  13. package/PHASE_4_USER_DID_IDENTITY_LINKING_PLAN.md +1240 -0
  14. package/SCHEMA_COMPLIANCE_REPORT.md +275 -0
  15. package/TEST_PLAN.md +571 -0
  16. package/coverage/coverage-final.json +57 -0
  17. package/dist/__tests__/utils/mock-providers.d.ts +1 -2
  18. package/dist/__tests__/utils/mock-providers.d.ts.map +1 -1
  19. package/dist/__tests__/utils/mock-providers.js.map +1 -1
  20. package/dist/cache/oauth-config-cache.d.ts +69 -0
  21. package/dist/cache/oauth-config-cache.d.ts.map +1 -0
  22. package/dist/cache/oauth-config-cache.js +76 -0
  23. package/dist/cache/oauth-config-cache.js.map +1 -0
  24. package/dist/identity/idp-token-resolver.d.ts +53 -0
  25. package/dist/identity/idp-token-resolver.d.ts.map +1 -0
  26. package/dist/identity/idp-token-resolver.js +108 -0
  27. package/dist/identity/idp-token-resolver.js.map +1 -0
  28. package/dist/identity/idp-token-storage.interface.d.ts +42 -0
  29. package/dist/identity/idp-token-storage.interface.d.ts.map +1 -0
  30. package/dist/identity/idp-token-storage.interface.js +12 -0
  31. package/dist/identity/idp-token-storage.interface.js.map +1 -0
  32. package/dist/identity/user-did-manager.d.ts +39 -1
  33. package/dist/identity/user-did-manager.d.ts.map +1 -1
  34. package/dist/identity/user-did-manager.js +69 -3
  35. package/dist/identity/user-did-manager.js.map +1 -1
  36. package/dist/index.d.ts +22 -0
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +39 -1
  39. package/dist/index.js.map +1 -1
  40. package/dist/runtime/audit-logger.d.ts +37 -0
  41. package/dist/runtime/audit-logger.d.ts.map +1 -0
  42. package/dist/runtime/audit-logger.js +9 -0
  43. package/dist/runtime/audit-logger.js.map +1 -0
  44. package/dist/runtime/base.d.ts +58 -2
  45. package/dist/runtime/base.d.ts.map +1 -1
  46. package/dist/runtime/base.js +266 -11
  47. package/dist/runtime/base.js.map +1 -1
  48. package/dist/services/access-control.service.d.ts.map +1 -1
  49. package/dist/services/access-control.service.js +137 -7
  50. package/dist/services/access-control.service.js.map +1 -1
  51. package/dist/services/authorization/authorization-registry.d.ts +29 -0
  52. package/dist/services/authorization/authorization-registry.d.ts.map +1 -0
  53. package/dist/services/authorization/authorization-registry.js +57 -0
  54. package/dist/services/authorization/authorization-registry.js.map +1 -0
  55. package/dist/services/authorization/types.d.ts +53 -0
  56. package/dist/services/authorization/types.d.ts.map +1 -0
  57. package/dist/services/authorization/types.js +10 -0
  58. package/dist/services/authorization/types.js.map +1 -0
  59. package/dist/services/batch-delegation.service.d.ts +53 -0
  60. package/dist/services/batch-delegation.service.d.ts.map +1 -0
  61. package/dist/services/batch-delegation.service.js +95 -0
  62. package/dist/services/batch-delegation.service.js.map +1 -0
  63. package/dist/services/oauth-config.service.d.ts +53 -0
  64. package/dist/services/oauth-config.service.d.ts.map +1 -0
  65. package/dist/services/oauth-config.service.js +117 -0
  66. package/dist/services/oauth-config.service.js.map +1 -0
  67. package/dist/services/oauth-provider-registry.d.ts +77 -0
  68. package/dist/services/oauth-provider-registry.d.ts.map +1 -0
  69. package/dist/services/oauth-provider-registry.js +112 -0
  70. package/dist/services/oauth-provider-registry.js.map +1 -0
  71. package/dist/services/oauth-service.d.ts +77 -0
  72. package/dist/services/oauth-service.d.ts.map +1 -0
  73. package/dist/services/oauth-service.js +348 -0
  74. package/dist/services/oauth-service.js.map +1 -0
  75. package/dist/services/oauth-token-retrieval.service.d.ts +49 -0
  76. package/dist/services/oauth-token-retrieval.service.d.ts.map +1 -0
  77. package/dist/services/oauth-token-retrieval.service.js +150 -0
  78. package/dist/services/oauth-token-retrieval.service.js.map +1 -0
  79. package/dist/services/provider-resolver.d.ts +48 -0
  80. package/dist/services/provider-resolver.d.ts.map +1 -0
  81. package/dist/services/provider-resolver.js +120 -0
  82. package/dist/services/provider-resolver.js.map +1 -0
  83. package/dist/services/provider-validator.d.ts +55 -0
  84. package/dist/services/provider-validator.d.ts.map +1 -0
  85. package/dist/services/provider-validator.js +135 -0
  86. package/dist/services/provider-validator.js.map +1 -0
  87. package/dist/services/tool-context-builder.d.ts +57 -0
  88. package/dist/services/tool-context-builder.d.ts.map +1 -0
  89. package/dist/services/tool-context-builder.js +125 -0
  90. package/dist/services/tool-context-builder.js.map +1 -0
  91. package/dist/services/tool-protection.service.d.ts +73 -5
  92. package/dist/services/tool-protection.service.d.ts.map +1 -1
  93. package/dist/services/tool-protection.service.js +247 -69
  94. package/dist/services/tool-protection.service.js.map +1 -1
  95. package/dist/types/oauth-required-error.d.ts +40 -0
  96. package/dist/types/oauth-required-error.d.ts.map +1 -0
  97. package/dist/types/oauth-required-error.js +40 -0
  98. package/dist/types/oauth-required-error.js.map +1 -0
  99. package/dist/utils/did-helpers.d.ts +33 -0
  100. package/dist/utils/did-helpers.d.ts.map +1 -1
  101. package/dist/utils/did-helpers.js +40 -0
  102. package/dist/utils/did-helpers.js.map +1 -1
  103. package/dist/utils/index.d.ts +1 -0
  104. package/dist/utils/index.d.ts.map +1 -1
  105. package/dist/utils/index.js +1 -0
  106. package/dist/utils/index.js.map +1 -1
  107. package/docs/API_REFERENCE.md +1362 -0
  108. package/docs/COMPLIANCE_MATRIX.md +691 -0
  109. package/docs/STATUSLIST2021_GUIDE.md +696 -0
  110. package/docs/W3C_VC_DELEGATION_GUIDE.md +710 -0
  111. package/package.json +23 -50
  112. package/scripts/audit-compliance.ts +724 -0
  113. package/src/__tests__/cache/tool-protection-cache.test.ts +640 -0
  114. package/src/__tests__/config/provider-runtime-config.test.ts +309 -0
  115. package/src/__tests__/delegation-e2e.test.ts +690 -0
  116. package/src/__tests__/identity/user-did-manager.test.ts +213 -0
  117. package/src/__tests__/index.test.ts +56 -0
  118. package/src/__tests__/integration/full-flow.test.ts +776 -0
  119. package/src/__tests__/integration.test.ts +281 -0
  120. package/src/__tests__/providers/base.test.ts +173 -0
  121. package/src/__tests__/providers/memory.test.ts +319 -0
  122. package/src/__tests__/regression/phase2-regression.test.ts +427 -0
  123. package/src/__tests__/runtime/audit-logger.test.ts +154 -0
  124. package/src/__tests__/runtime/base-extensions.test.ts +593 -0
  125. package/src/__tests__/runtime/base.test.ts +869 -0
  126. package/src/__tests__/runtime/delegation-flow.test.ts +164 -0
  127. package/src/__tests__/runtime/proof-client-did.test.ts +375 -0
  128. package/src/__tests__/runtime/route-interception.test.ts +686 -0
  129. package/src/__tests__/runtime/tool-protection-enforcement.test.ts +908 -0
  130. package/src/__tests__/services/agentshield-integration.test.ts +784 -0
  131. package/src/__tests__/services/provider-resolver-edge-cases.test.ts +487 -0
  132. package/src/__tests__/services/tool-protection-oauth-provider.test.ts +480 -0
  133. package/src/__tests__/services/tool-protection.service.test.ts +1366 -0
  134. package/src/__tests__/utils/mock-providers.ts +340 -0
  135. package/src/cache/oauth-config-cache.d.ts +69 -0
  136. package/src/cache/oauth-config-cache.d.ts.map +1 -0
  137. package/src/cache/oauth-config-cache.js +71 -0
  138. package/src/cache/oauth-config-cache.js.map +1 -0
  139. package/src/cache/oauth-config-cache.ts +123 -0
  140. package/src/cache/tool-protection-cache.ts +171 -0
  141. package/src/compliance/EXAMPLE.md +412 -0
  142. package/src/compliance/__tests__/schema-verifier.test.ts +797 -0
  143. package/src/compliance/index.ts +8 -0
  144. package/src/compliance/schema-registry.ts +460 -0
  145. package/src/compliance/schema-verifier.ts +708 -0
  146. package/src/config/__tests__/remote-config.spec.ts +268 -0
  147. package/src/config/remote-config.ts +174 -0
  148. package/src/config.ts +309 -0
  149. package/src/delegation/__tests__/audience-validator.test.ts +112 -0
  150. package/src/delegation/__tests__/bitstring.test.ts +346 -0
  151. package/src/delegation/__tests__/cascading-revocation.test.ts +628 -0
  152. package/src/delegation/__tests__/delegation-graph.test.ts +584 -0
  153. package/src/delegation/__tests__/utils.test.ts +152 -0
  154. package/src/delegation/__tests__/vc-issuer.test.ts +442 -0
  155. package/src/delegation/__tests__/vc-verifier.test.ts +922 -0
  156. package/src/delegation/audience-validator.ts +52 -0
  157. package/src/delegation/bitstring.ts +278 -0
  158. package/src/delegation/cascading-revocation.ts +370 -0
  159. package/src/delegation/delegation-graph.ts +299 -0
  160. package/src/delegation/index.ts +14 -0
  161. package/src/delegation/statuslist-manager.ts +353 -0
  162. package/src/delegation/storage/__tests__/memory-graph-storage.test.ts +366 -0
  163. package/src/delegation/storage/__tests__/memory-statuslist-storage.test.ts +228 -0
  164. package/src/delegation/storage/index.ts +9 -0
  165. package/src/delegation/storage/memory-graph-storage.ts +178 -0
  166. package/src/delegation/storage/memory-statuslist-storage.ts +77 -0
  167. package/src/delegation/utils.ts +42 -0
  168. package/src/delegation/vc-issuer.ts +232 -0
  169. package/src/delegation/vc-verifier.ts +568 -0
  170. package/src/identity/idp-token-resolver.ts +147 -0
  171. package/src/identity/idp-token-storage.interface.ts +59 -0
  172. package/src/identity/user-did-manager.ts +370 -0
  173. package/src/index.ts +260 -0
  174. package/src/providers/base.d.ts +91 -0
  175. package/src/providers/base.d.ts.map +1 -0
  176. package/src/providers/base.js +38 -0
  177. package/src/providers/base.js.map +1 -0
  178. package/src/providers/base.ts +96 -0
  179. package/src/providers/memory.ts +142 -0
  180. package/src/runtime/audit-logger.ts +39 -0
  181. package/src/runtime/base.ts +1329 -0
  182. package/src/services/__tests__/access-control.integration.test.ts +443 -0
  183. package/src/services/__tests__/access-control.service.test.ts +970 -0
  184. package/src/services/__tests__/batch-delegation.service.test.ts +351 -0
  185. package/src/services/__tests__/crypto.service.test.ts +531 -0
  186. package/src/services/__tests__/oauth-provider-registry.test.ts +142 -0
  187. package/src/services/__tests__/proof-verifier.integration.test.ts +485 -0
  188. package/src/services/__tests__/proof-verifier.test.ts +489 -0
  189. package/src/services/__tests__/provider-resolution.integration.test.ts +198 -0
  190. package/src/services/__tests__/provider-resolver.test.ts +217 -0
  191. package/src/services/__tests__/storage.service.test.ts +358 -0
  192. package/src/services/access-control.service.ts +877 -0
  193. package/src/services/authorization/authorization-registry.ts +66 -0
  194. package/src/services/authorization/types.ts +71 -0
  195. package/src/services/batch-delegation.service.ts +137 -0
  196. package/src/services/crypto.service.ts +302 -0
  197. package/src/services/errors.ts +76 -0
  198. package/src/services/index.ts +9 -0
  199. package/src/services/oauth-config.service.d.ts +53 -0
  200. package/src/services/oauth-config.service.d.ts.map +1 -0
  201. package/src/services/oauth-config.service.js +113 -0
  202. package/src/services/oauth-config.service.js.map +1 -0
  203. package/src/services/oauth-config.service.ts +166 -0
  204. package/src/services/oauth-provider-registry.d.ts +57 -0
  205. package/src/services/oauth-provider-registry.d.ts.map +1 -0
  206. package/src/services/oauth-provider-registry.js +73 -0
  207. package/src/services/oauth-provider-registry.js.map +1 -0
  208. package/src/services/oauth-provider-registry.ts +123 -0
  209. package/src/services/oauth-service.ts +510 -0
  210. package/src/services/oauth-token-retrieval.service.ts +245 -0
  211. package/src/services/proof-verifier.ts +478 -0
  212. package/src/services/provider-resolver.d.ts +48 -0
  213. package/src/services/provider-resolver.d.ts.map +1 -0
  214. package/src/services/provider-resolver.js +106 -0
  215. package/src/services/provider-resolver.js.map +1 -0
  216. package/src/services/provider-resolver.ts +144 -0
  217. package/src/services/provider-validator.ts +170 -0
  218. package/src/services/storage.service.ts +566 -0
  219. package/src/services/tool-context-builder.ts +172 -0
  220. package/src/services/tool-protection.service.ts +798 -0
  221. package/src/types/oauth-required-error.ts +63 -0
  222. package/src/types/tool-protection.ts +155 -0
  223. package/src/utils/__tests__/did-helpers.test.ts +101 -0
  224. package/src/utils/base64.ts +148 -0
  225. package/src/utils/cors.ts +83 -0
  226. package/src/utils/did-helpers.ts +150 -0
  227. package/src/utils/index.ts +8 -0
  228. package/src/utils/storage-keys.ts +278 -0
  229. package/tsconfig.json +21 -0
  230. package/vitest.config.ts +56 -0
@@ -0,0 +1,3787 @@
1
+
2
+ 
3
+ > @kya-os/mcp-i-core@1.2.2-canary.30 test:coverage /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core
4
+ > vitest run --coverage
5
+
6
+ [?25l
7
+  RUN  v4.0.5 /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core
8
+ Coverage enabled with v8
9
+
10
+ [?2026h
11
+  ❯ src/__tests__/runtime/route-interception.test.ts [queued]
12
+
13
+  Test Files 0 passed (43)
14
+  Tests 0 passed (0)
15
+  Start at 22:51:29
16
+  Duration 102ms
17
+ [?2026l[?2026h
18
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 0/49
19
+  ❯ src/__tests__/runtime/base-extensions.test.ts [queued]
20
+  ❯ src/__tests__/runtime/base.test.ts [queued]
21
+  ❯ src/__tests__/runtime/route-interception.test.ts [queued]
22
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts [queued]
23
+  ❯ src/__tests__/services/agentshield-integration.test.ts [queued]
24
+  ❯ src/__tests__/services/tool-protection.service.test.ts [queued]
25
+  ❯ src/delegation/__tests__/cascading-revocation.test.ts [queued]
26
+  ❯ src/delegation/__tests__/vc-issuer.test.ts [queued]
27
+  ❯ src/delegation/__tests__/vc-verifier.test.ts [queued]
28
+  ❯ src/services/__tests__/access-control.integration.test.ts [queued]
29
+  ❯ src/services/__tests__/access-control.service.test.ts [queued]
30
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts [queued]
31
+
32
+  Test Files 0 passed (43)
33
+  Tests 0 passed (49)
34
+  Start at 22:51:29
35
+  Duration 302ms
36
+ [?2026l[?2026hstdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - new endpoint format > should fetch from project-scoped endpoint when projectId is available
37
+ [ToolProtectionService] Config loaded from API {
38
+ source: 'api',
39
+ toolCount: 2,
40
+ protectedTools: [ 'checkout' ],
41
+ agentDid: 'did:key:z6MkhaXgBZDv...',
42
+ projectId: 'test-project-123',
43
+ cacheTtlMs: 300000,
44
+ cacheExpiresAt: '2025-11-24T04:56:29.749Z'
45
+ }
46
+
47
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - new endpoint format > should handle new endpoint format with toolProtections object
48
+ [ToolProtectionService] Config loaded from API {
49
+ source: 'api',
50
+ toolCount: 2,
51
+ protectedTools: [ 'protected_tool' ],
52
+ agentDid: 'did:key:z6MkhaXgBZDv...',
53
+ projectId: 'test-project-123',
54
+ cacheTtlMs: 300000,
55
+ cacheExpiresAt: '2025-11-24T04:56:29.751Z'
56
+ }
57
+
58
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - new endpoint format > should parse oauthProvider from new endpoint format (Phase 2)
59
+ [ToolProtectionService] Config loaded from API {
60
+ source: 'api',
61
+ toolCount: 2,
62
+ protectedTools: [ 'read_repos', 'send_email' ],
63
+ agentDid: 'did:key:z6MkhaXgBZDv...',
64
+ projectId: 'test-project-123',
65
+ cacheTtlMs: 300000,
66
+ cacheExpiresAt: '2025-11-24T04:56:29.751Z'
67
+ }
68
+
69
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - new endpoint format > should preserve oauthProvider through cache operations
70
+ [ToolProtectionService] Config loaded from API {
71
+ source: 'api',
72
+ toolCount: 1,
73
+ protectedTools: [ 'read_repos' ],
74
+ agentDid: 'did:key:z6MkhaXgBZDv...',
75
+ projectId: 'test-project-123',
76
+ cacheTtlMs: 300000,
77
+ cacheExpiresAt: '2025-11-24T04:56:29.751Z'
78
+ }
79
+
80
+ 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
81
+ [ToolProtectionService] Config loaded from API {
82
+ source: 'api',
83
+ toolCount: 2,
84
+ protectedTools: [ 'checkout' ],
85
+ agentDid: 'did:key:z6MkhaXgBZDv...',
86
+ projectId: 'none',
87
+ cacheTtlMs: 300000,
88
+ cacheExpiresAt: '2025-11-24T04:56:29.751Z'
89
+ }
90
+
91
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should handle old endpoint format with tools array
92
+ [ToolProtectionService] Config loaded from API {
93
+ source: 'api',
94
+ toolCount: 2,
95
+ protectedTools: [ 'tool1' ],
96
+ agentDid: 'did:key:z6MkhaXgBZDv...',
97
+ projectId: 'none',
98
+ cacheTtlMs: 300000,
99
+ cacheExpiresAt: '2025-11-24T04:56:29.751Z'
100
+ }
101
+
102
+ 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)
103
+ [ToolProtectionService] Config loaded from API {
104
+ source: 'api',
105
+ toolCount: 2,
106
+ protectedTools: [ 'read_repos', 'send_email' ],
107
+ agentDid: 'did:key:z6MkhaXgBZDv...',
108
+ projectId: 'none',
109
+ cacheTtlMs: 300000,
110
+ cacheExpiresAt: '2025-11-24T04:56:29.752Z'
111
+ }
112
+
113
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should handle old endpoint format with tools object
114
+ [ToolProtectionService] Config loaded from API {
115
+ source: 'api',
116
+ toolCount: 2,
117
+ protectedTools: [ 'tool1' ],
118
+ agentDid: 'did:key:z6MkhaXgBZDv...',
119
+ projectId: 'none',
120
+ cacheTtlMs: 300000,
121
+ cacheExpiresAt: '2025-11-24T04:56:29.752Z'
122
+ }
123
+
124
+ 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)
125
+ [ToolProtectionService] Config loaded from API {
126
+ source: 'api',
127
+ toolCount: 2,
128
+ protectedTools: [ 'read_repos', 'send_email' ],
129
+ agentDid: 'did:key:z6MkhaXgBZDv...',
130
+ projectId: 'none',
131
+ cacheTtlMs: 300000,
132
+ cacheExpiresAt: '2025-11-24T04:56:29.752Z'
133
+ }
134
+
135
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should skip tools without name in array format
136
+ [ToolProtectionService] Cache miss, fetching from API {
137
+ source: 'api-fetch-start',
138
+ cacheKey: 'agent:did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK',
139
+ agentDid: 'did:key:z6MkhaXgBZDv...',
140
+ projectId: 'none',
141
+ apiUrl: 'https://kya.vouched.id',
142
+ endpoint: '/api/v1/bouncer/config?agent_did=did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK'
143
+ }
144
+ [ToolProtectionService] Fetching from API: https://kya.vouched.id/api/v1/bouncer/config?agent_did=did%3Akey%3Az6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK {
145
+ method: 'config?agent_did (old)',
146
+ projectId: 'none',
147
+ apiKeyPresent: true,
148
+ apiKeyLength: 18,
149
+ apiKeyMasked: 'test-api...'
150
+ }
151
+
152
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should skip tools without name in array format
153
+ [ToolProtectionService] API response received {
154
+ source: 'api-fetch-complete',
155
+ agentDid: 'did:key:z6MkhaXgBZDv...',
156
+ projectId: 'none',
157
+ responseKeys: [ 'success', 'data', 'metadata' ],
158
+ dataKeys: [ 'tools' ],
159
+ rawToolProtections: null,
160
+ rawTools: [
161
+ { name: 'valid_tool', requiresDelegation: true },
162
+ { requiresDelegation: false }
163
+ ],
164
+ responseMetadata: {}
165
+ }
166
+
167
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch - old endpoint format > should skip tools without name in array format
168
+ [ToolProtectionService] Config loaded from API {
169
+ source: 'api',
170
+ toolCount: 1,
171
+ protectedTools: [ 'valid_tool' ],
172
+ agentDid: 'did:key:z6MkhaXgBZDv...',
173
+ projectId: 'none',
174
+ cacheTtlMs: 300000,
175
+ cacheExpiresAt: '2025-11-24T04:56:29.752Z'
176
+ }
177
+ [ToolProtectionService] API fetch successful, config cached {
178
+ source: 'cache-write',
179
+ agentDid: 'did:key:z6MkhaXgBZDv...',
180
+ cacheKey: 'agent:did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK',
181
+ toolCount: 1,
182
+ tools: [ { name: 'valid_tool', requiresDelegation: true, scopeCount: 0 } ],
183
+ ttlMs: 300000,
184
+ ttlMinutes: 5,
185
+ expiresAt: '2025-11-24T04:56:29.752Z',
186
+ expiresIn: '300s'
187
+ }
188
+
189
+
190
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 1/49
191
+  ❯ src/__tests__/runtime/base-extensions.test.ts [queued]
192
+  ❯ src/__tests__/runtime/base.test.ts [queued]
193
+  ❯ src/__tests__/runtime/route-interception.test.ts 0/21
194
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts [queued]
195
+  ❯ src/__tests__/services/agentshield-integration.test.ts 0/30
196
+  ❯ src/__tests__/services/tool-protection.service.test.ts 49/49
197
+  ❯ src/delegation/__tests__/cascading-revocation.test.ts 23/23
198
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 0/21
199
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 0/35
200
+  ❯ src/services/__tests__/access-control.integration.test.ts [queued]
201
+  ❯ src/services/__tests__/access-control.service.test.ts 23/23
202
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 0/13
203
+
204
+  Test Files 3 passed (43)
205
+  Tests 96 passed (264)
206
+  Start at 22:51:29
207
+  Duration 404ms
208
+ [?2026l[?2026hstderr | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > API fetch error handling > should handle network errors gracefully
209
+ [ToolProtectionService] API fetch failed, no fallback, failing closed (deny-all) {
210
+ agentDid: 'did:key:z6MkhaXgBZDv...',
211
+ error: 'ECONNREFUSED',
212
+ cacheKey: 'agent:did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK'
213
+ }
214
+
215
+
216
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 1/49
217
+  ❯ src/__tests__/runtime/base-extensions.test.ts [queued]
218
+  ❯ src/__tests__/runtime/base.test.ts [queued]
219
+  ❯ src/__tests__/runtime/route-interception.test.ts 0/21
220
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts [queued]
221
+  ❯ src/__tests__/services/agentshield-integration.test.ts 0/30
222
+  ❯ src/__tests__/services/tool-protection.service.test.ts 49/49
223
+  ❯ src/delegation/__tests__/cascading-revocation.test.ts 23/23
224
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 0/21
225
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 0/35
226
+  ❯ src/services/__tests__/access-control.integration.test.ts [queued]
227
+  ❯ src/services/__tests__/access-control.service.test.ts 23/23
228
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 0/13
229
+
230
+  Test Files 3 passed (43)
231
+  Tests 96 passed (264)
232
+  Start at 22:51:29
233
+  Duration 404ms
234
+ [?2026l[?2026hstdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > caching behavior > should cache successful API responses
235
+ [ToolProtectionService] Config loaded from API {
236
+ source: 'api',
237
+ toolCount: 1,
238
+ protectedTools: [ 'tool1' ],
239
+ agentDid: 'did:key:z6MkhaXgBZDv...',
240
+ projectId: 'none',
241
+ cacheTtlMs: 300000,
242
+ cacheExpiresAt: '2025-11-24T04:56:29.755Z'
243
+ }
244
+
245
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > caching behavior > should use default cache TTL when not specified
246
+ [ToolProtectionService] Config loaded from API {
247
+ source: 'api',
248
+ toolCount: 0,
249
+ protectedTools: [],
250
+ agentDid: 'did:key:z6MkhaXgBZDv...',
251
+ projectId: 'none',
252
+ cacheTtlMs: 300000,
253
+ cacheExpiresAt: '2025-11-24T04:56:29.755Z'
254
+ }
255
+
256
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > caching behavior > should use custom cache TTL when specified
257
+ [ToolProtectionService] Config loaded from API {
258
+ source: 'api',
259
+ toolCount: 0,
260
+ protectedTools: [],
261
+ agentDid: 'did:key:z6MkhaXgBZDv...',
262
+ projectId: 'none',
263
+ cacheTtlMs: 600000,
264
+ cacheExpiresAt: '2025-11-24T05:01:29.756Z'
265
+ }
266
+
267
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > edge cases > should handle empty toolProtections object
268
+ [ToolProtectionService] Config loaded from API {
269
+ source: 'api',
270
+ toolCount: 0,
271
+ protectedTools: [],
272
+ agentDid: 'did:key:z6MkhaXgBZDv...',
273
+ projectId: 'none',
274
+ cacheTtlMs: 300000,
275
+ cacheExpiresAt: '2025-11-24T04:56:29.756Z'
276
+ }
277
+
278
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > edge cases > should handle null requiredScopes
279
+ [ToolProtectionService] Config loaded from API {
280
+ source: 'api',
281
+ toolCount: 1,
282
+ protectedTools: [ 'tool1' ],
283
+ agentDid: 'did:key:z6MkhaXgBZDv...',
284
+ projectId: 'none',
285
+ cacheTtlMs: 300000,
286
+ cacheExpiresAt: '2025-11-24T04:56:29.756Z'
287
+ }
288
+
289
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > getToolProtectionConfig > edge cases > should handle mixed camelCase and snake_case in response
290
+ [ToolProtectionService] Config loaded from API {
291
+ source: 'api',
292
+ toolCount: 2,
293
+ protectedTools: [ 'tool1' ],
294
+ agentDid: 'did:key:z6MkhaXgBZDv...',
295
+ projectId: 'none',
296
+ cacheTtlMs: 300000,
297
+ cacheExpiresAt: '2025-11-24T04:56:29.756Z'
298
+ }
299
+
300
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return null when tool has no protection
301
+ [ToolProtectionService] Config loaded from API {
302
+ source: 'api',
303
+ toolCount: 1,
304
+ protectedTools: [],
305
+ agentDid: 'did:key:z6MkhaXgBZDv...',
306
+ projectId: 'none',
307
+ cacheTtlMs: 300000,
308
+ cacheExpiresAt: '2025-11-24T04:56:29.758Z'
309
+ }
310
+
311
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return null when tool is not in config
312
+ [ToolProtectionService] Config loaded from API {
313
+ source: 'api',
314
+ toolCount: 1,
315
+ protectedTools: [ 'other_tool' ],
316
+ agentDid: 'did:key:z6MkhaXgBZDv...',
317
+ projectId: 'none',
318
+ cacheTtlMs: 300000,
319
+ cacheExpiresAt: '2025-11-24T04:56:29.759Z'
320
+ }
321
+
322
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return null when tool is not in config
323
+ [ToolProtectionService] Protection check {
324
+ tool: 'unknown_tool',
325
+ agentDid: 'did:key:z6MkhaXgBZDv...',
326
+ found: false,
327
+ isWildcard: true,
328
+ requiresDelegation: false,
329
+ availableTools: [ 'other_tool' ]
330
+ }
331
+
332
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return wildcard protection when tool not found and wildcard exists
333
+ [ToolProtectionService] Config loaded from API {
334
+ source: 'api',
335
+ toolCount: 2,
336
+ protectedTools: [ '*' ],
337
+ agentDid: 'did:key:z6MkhaXgBZDv...',
338
+ projectId: 'none',
339
+ cacheTtlMs: 300000,
340
+ cacheExpiresAt: '2025-11-24T04:56:29.759Z'
341
+ }
342
+
343
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return wildcard protection when tool not found and wildcard exists
344
+ [ToolProtectionService] Protection check {
345
+ tool: 'unknown_tool',
346
+ agentDid: 'did:key:z6MkhaXgBZDv...',
347
+ found: true,
348
+ isWildcard: true,
349
+ requiresDelegation: true,
350
+ availableTools: [ '*', 'specific_tool' ]
351
+ }
352
+
353
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should prioritize specific tool protection over wildcard
354
+ [ToolProtectionService] Config loaded from API {
355
+ source: 'api',
356
+ toolCount: 2,
357
+ protectedTools: [ '*' ],
358
+ agentDid: 'did:key:z6MkhaXgBZDv...',
359
+ projectId: 'none',
360
+ cacheTtlMs: 300000,
361
+ cacheExpiresAt: '2025-11-24T04:56:29.759Z'
362
+ }
363
+
364
+
365
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 1/49
366
+  ❯ src/__tests__/runtime/base-extensions.test.ts [queued]
367
+  ❯ src/__tests__/runtime/base.test.ts [queued]
368
+  ❯ src/__tests__/runtime/route-interception.test.ts 0/21
369
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts [queued]
370
+  ❯ src/__tests__/services/agentshield-integration.test.ts 0/30
371
+  ❯ src/__tests__/services/tool-protection.service.test.ts 49/49
372
+  ❯ src/delegation/__tests__/cascading-revocation.test.ts 23/23
373
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 0/21
374
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 0/35
375
+  ❯ src/services/__tests__/access-control.integration.test.ts [queued]
376
+  ❯ src/services/__tests__/access-control.service.test.ts 23/23
377
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 0/13
378
+
379
+  Test Files 3 passed (43)
380
+  Tests 96 passed (264)
381
+  Start at 22:51:29
382
+  Duration 404ms
383
+ [?2026l[?2026hstderr | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should use wildcard protection in fail-safe deny-all mode
384
+ [ToolProtectionService] API fetch failed, no fallback, failing closed (deny-all) {
385
+ agentDid: 'did:key:z6MkhaXgBZDv...',
386
+ error: 'Network error',
387
+ cacheKey: 'agent:did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK'
388
+ }
389
+
390
+
391
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 1/49
392
+  ❯ src/__tests__/runtime/base-extensions.test.ts [queued]
393
+  ❯ src/__tests__/runtime/base.test.ts [queued]
394
+  ❯ src/__tests__/runtime/route-interception.test.ts 0/21
395
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts [queued]
396
+  ❯ src/__tests__/services/agentshield-integration.test.ts 0/30
397
+  ❯ src/__tests__/services/tool-protection.service.test.ts 49/49
398
+  ❯ src/delegation/__tests__/cascading-revocation.test.ts 23/23
399
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 0/21
400
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 0/35
401
+  ❯ src/services/__tests__/access-control.integration.test.ts [queued]
402
+  ❯ src/services/__tests__/access-control.service.test.ts 23/23
403
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 0/13
404
+
405
+  Test Files 3 passed (43)
406
+  Tests 96 passed (264)
407
+  Start at 22:51:29
408
+  Duration 404ms
409
+ [?2026l[?2026hstdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should use wildcard protection in fail-safe deny-all mode
410
+ [ToolProtectionService] Protection check {
411
+ tool: 'any_tool',
412
+ agentDid: 'did:key:z6MkhaXgBZDv...',
413
+ found: true,
414
+ isWildcard: true,
415
+ requiresDelegation: true,
416
+ availableTools: [ '*' ]
417
+ }
418
+
419
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return protection config when tool requires delegation
420
+ [ToolProtectionService] Config loaded from API {
421
+ source: 'api',
422
+ toolCount: 1,
423
+ protectedTools: [ 'protected_tool' ],
424
+ agentDid: 'did:key:z6MkhaXgBZDv...',
425
+ projectId: 'none',
426
+ cacheTtlMs: 300000,
427
+ cacheExpiresAt: '2025-11-24T04:56:29.760Z'
428
+ }
429
+
430
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > checkToolProtection > should return protection config when tool requires delegation
431
+ [ToolProtectionService] Protection check {
432
+ tool: 'protected_tool',
433
+ agentDid: 'did:key:z6MkhaXgBZDv...',
434
+ found: true,
435
+ isWildcard: false,
436
+ requiresDelegation: true,
437
+ availableTools: [ 'protected_tool' ]
438
+ }
439
+
440
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > integration with NoOpToolProtectionCache > should work with NoOpToolProtectionCache
441
+ [ToolProtectionService] Config loaded from API {
442
+ source: 'api',
443
+ toolCount: 1,
444
+ protectedTools: [ 'tool1' ],
445
+ agentDid: 'did:key:z6MkhaXgBZDv...',
446
+ projectId: 'none',
447
+ cacheTtlMs: 300000,
448
+ cacheExpiresAt: '2025-11-24T04:56:29.760Z'
449
+ }
450
+
451
+ stdout | src/__tests__/services/tool-protection.service.test.ts > ToolProtectionService > integration with NoOpToolProtectionCache > should work with NoOpToolProtectionCache
452
+ [ToolProtectionService] Config loaded from API {
453
+ source: 'api',
454
+ toolCount: 1,
455
+ protectedTools: [ 'tool1' ],
456
+ agentDid: 'did:key:z6MkhaXgBZDv...',
457
+ projectId: 'none',
458
+ cacheTtlMs: 300000,
459
+ cacheExpiresAt: '2025-11-24T04:56:29.760Z'
460
+ }
461
+
462
+ stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > API Authentication > should use X-API-Key header for new endpoint
463
+ [ToolProtectionService] Config loaded from API {
464
+ source: 'api',
465
+ toolCount: 0,
466
+ protectedTools: [],
467
+ agentDid: 'did:key:z6MkhaXgBZDv...',
468
+ projectId: 'test-project-123',
469
+ cacheTtlMs: 300000,
470
+ cacheExpiresAt: '2025-11-24T04:56:29.770Z'
471
+ }
472
+
473
+ ✓ src/delegation/__tests__/cascading-revocation.test.ts (23 tests) 12ms
474
+ stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > API Authentication > should use Authorization Bearer header for old endpoint
475
+ [ToolProtectionService] Config loaded from API {
476
+ source: 'api',
477
+ toolCount: 0,
478
+ protectedTools: [],
479
+ agentDid: 'did:key:z6MkhaXgBZDv...',
480
+ projectId: 'none',
481
+ cacheTtlMs: 300000,
482
+ cacheExpiresAt: '2025-11-24T04:56:29.776Z'
483
+ }
484
+
485
+ ✓ src/__tests__/services/tool-protection.service.test.ts (49 tests) 17ms
486
+ stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Endpoint Selection > should use project-scoped endpoint when projectId is available
487
+ [ToolProtectionService] Config loaded from API {
488
+ source: 'api',
489
+ toolCount: 0,
490
+ protectedTools: [],
491
+ agentDid: 'did:key:z6MkhaXgBZDv...',
492
+ projectId: 'test-project-123',
493
+ cacheTtlMs: 300000,
494
+ cacheExpiresAt: '2025-11-24T04:56:29.777Z'
495
+ }
496
+
497
+ stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Endpoint Selection > should use agent-scoped endpoint when projectId is not available
498
+ [ToolProtectionService] Config loaded from API {
499
+ source: 'api',
500
+ toolCount: 0,
501
+ protectedTools: [],
502
+ agentDid: 'did:key:z6MkhaXgBZDv...',
503
+ projectId: 'none',
504
+ cacheTtlMs: 300000,
505
+ cacheExpiresAt: '2025-11-24T04:56:29.778Z'
506
+ }
507
+
508
+ stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Endpoint Selection > should encode projectId in URL
509
+ [ToolProtectionService] Config loaded from API {
510
+ source: 'api',
511
+ toolCount: 0,
512
+ protectedTools: [],
513
+ agentDid: 'did:key:z6MkhaXgBZDv...',
514
+ projectId: 'project/with/special-chars',
515
+ cacheTtlMs: 300000,
516
+ cacheExpiresAt: '2025-11-24T04:56:29.778Z'
517
+ }
518
+
519
+ stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Endpoint Selection > should encode agent DID in URL
520
+ [ToolProtectionService] Config loaded from API {
521
+ source: 'api',
522
+ toolCount: 0,
523
+ protectedTools: [],
524
+ agentDid: 'did:key:z6MkhaXgBZDv...',
525
+ projectId: 'none',
526
+ cacheTtlMs: 300000,
527
+ cacheExpiresAt: '2025-11-24T04:56:29.778Z'
528
+ }
529
+
530
+ stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Response Format Compatibility > should handle new endpoint format (toolProtections object)
531
+ [ToolProtectionService] Config loaded from API {
532
+ source: 'api',
533
+ toolCount: 2,
534
+ protectedTools: [ 'checkout' ],
535
+ agentDid: 'did:key:z6MkhaXgBZDv...',
536
+ projectId: 'test-project-123',
537
+ cacheTtlMs: 300000,
538
+ cacheExpiresAt: '2025-11-24T04:56:29.778Z'
539
+ }
540
+
541
+ stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Response Format Compatibility > should handle old endpoint format (tools array)
542
+ [ToolProtectionService] Config loaded from API {
543
+ source: 'api',
544
+ toolCount: 2,
545
+ protectedTools: [ 'checkout' ],
546
+ agentDid: 'did:key:z6MkhaXgBZDv...',
547
+ projectId: 'none',
548
+ cacheTtlMs: 300000,
549
+ cacheExpiresAt: '2025-11-24T04:56:29.778Z'
550
+ }
551
+
552
+ stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Response Format Compatibility > should handle old endpoint format (tools object)
553
+ [ToolProtectionService] Config loaded from API {
554
+ source: 'api',
555
+ toolCount: 2,
556
+ protectedTools: [ 'checkout' ],
557
+ agentDid: 'did:key:z6MkhaXgBZDv...',
558
+ projectId: 'none',
559
+ cacheTtlMs: 300000,
560
+ cacheExpiresAt: '2025-11-24T04:56:29.779Z'
561
+ }
562
+
563
+ stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Response Format Compatibility > should handle snake_case field names
564
+ [ToolProtectionService] Config loaded from API {
565
+ source: 'api',
566
+ toolCount: 1,
567
+ protectedTools: [ 'tool1' ],
568
+ agentDid: 'did:key:z6MkhaXgBZDv...',
569
+ projectId: 'test-project-123',
570
+ cacheTtlMs: 300000,
571
+ cacheExpiresAt: '2025-11-24T04:56:29.779Z'
572
+ }
573
+
574
+ stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Response Format Compatibility > should handle camelCase field names
575
+ [ToolProtectionService] Config loaded from API {
576
+ source: 'api',
577
+ toolCount: 1,
578
+ protectedTools: [ 'tool1' ],
579
+ agentDid: 'did:key:z6MkhaXgBZDv...',
580
+ projectId: 'test-project-123',
581
+ cacheTtlMs: 300000,
582
+ cacheExpiresAt: '2025-11-24T04:56:29.779Z'
583
+ }
584
+
585
+ stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Response Format Compatibility > should prefer camelCase over snake_case when both present
586
+ [ToolProtectionService] Config loaded from API {
587
+ source: 'api',
588
+ toolCount: 1,
589
+ protectedTools: [ 'tool1' ],
590
+ agentDid: 'did:key:z6MkhaXgBZDv...',
591
+ projectId: 'test-project-123',
592
+ cacheTtlMs: 300000,
593
+ cacheExpiresAt: '2025-11-24T04:56:29.779Z'
594
+ }
595
+
596
+
597
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 1/49
598
+  ❯ src/__tests__/runtime/base-extensions.test.ts [queued]
599
+  ❯ src/__tests__/runtime/base.test.ts [queued]
600
+  ❯ src/__tests__/runtime/route-interception.test.ts 0/21
601
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts [queued]
602
+  ❯ src/__tests__/services/agentshield-integration.test.ts 0/30
603
+  ❯ src/__tests__/services/tool-protection.service.test.ts 49/49
604
+  ❯ src/delegation/__tests__/cascading-revocation.test.ts 23/23
605
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 0/21
606
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 0/35
607
+  ❯ src/services/__tests__/access-control.integration.test.ts [queued]
608
+  ❯ src/services/__tests__/access-control.service.test.ts 23/23
609
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 0/13
610
+
611
+  Test Files 3 passed (43)
612
+  Tests 96 passed (264)
613
+  Start at 22:51:29
614
+  Duration 404ms
615
+ [?2026l[?2026hstderr | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Error Handling > should handle network timeout
616
+ [ToolProtectionService] API fetch failed, using fallback config { agentDid: 'did:key:z6MkhaXgBZDv...', error: 'Network timeout' }
617
+
618
+ stderr | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Fallback Behavior > should cache fallback config
619
+ [ToolProtectionService] API fetch failed, using fallback config { agentDid: 'did:key:z6MkhaXgBZDv...', error: 'Network error' }
620
+
621
+
622
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 1/49
623
+  ❯ src/__tests__/runtime/base-extensions.test.ts [queued]
624
+  ❯ src/__tests__/runtime/base.test.ts [queued]
625
+  ❯ src/__tests__/runtime/route-interception.test.ts 0/21
626
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts [queued]
627
+  ❯ src/__tests__/services/agentshield-integration.test.ts 0/30
628
+  ❯ src/__tests__/services/tool-protection.service.test.ts 49/49
629
+  ❯ src/delegation/__tests__/cascading-revocation.test.ts 23/23
630
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 0/21
631
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 0/35
632
+  ❯ src/services/__tests__/access-control.integration.test.ts [queued]
633
+  ❯ src/services/__tests__/access-control.service.test.ts 23/23
634
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 0/13
635
+
636
+  Test Files 3 passed (43)
637
+  Tests 96 passed (264)
638
+  Start at 22:51:29
639
+  Duration 404ms
640
+ [?2026l[?2026hstdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Caching Integration > should cache successful API responses
641
+ [ToolProtectionService] Config loaded from API {
642
+ source: 'api',
643
+ toolCount: 1,
644
+ protectedTools: [ 'tool1' ],
645
+ agentDid: 'did:key:z6MkhaXgBZDv...',
646
+ projectId: 'test-project-123',
647
+ cacheTtlMs: 300000,
648
+ cacheExpiresAt: '2025-11-24T04:56:29.781Z'
649
+ }
650
+
651
+ stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Caching Integration > should respect cache TTL
652
+ [ToolProtectionService] Config loaded from API {
653
+ source: 'api',
654
+ toolCount: 0,
655
+ protectedTools: [],
656
+ agentDid: 'did:key:z6MkhaXgBZDv...',
657
+ projectId: 'test-project-123',
658
+ cacheTtlMs: 1000,
659
+ cacheExpiresAt: '2025-11-24T04:51:30.781Z'
660
+ }
661
+
662
+
663
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 1/49
664
+  ❯ src/__tests__/runtime/base-extensions.test.ts [queued]
665
+  ❯ src/__tests__/runtime/base.test.ts [queued]
666
+  ❯ src/__tests__/runtime/route-interception.test.ts 0/21
667
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts [queued]
668
+  ❯ src/__tests__/services/agentshield-integration.test.ts 0/30
669
+  ❯ src/__tests__/services/tool-protection.service.test.ts 49/49
670
+  ❯ src/delegation/__tests__/cascading-revocation.test.ts 23/23
671
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 0/21
672
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 0/35
673
+  ❯ src/services/__tests__/access-control.integration.test.ts [queued]
674
+  ❯ src/services/__tests__/access-control.service.test.ts 23/23
675
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 0/13
676
+
677
+  Test Files 3 passed (43)
678
+  Tests 96 passed (264)
679
+  Start at 22:51:29
680
+  Duration 404ms
681
+ [?2026l[?2026hstderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should submit proofs successfully
682
+ [AccessControl] 🔍 RAW API RESPONSE (before parsing): {
683
+ correlationId: 'ee19985d-fd4a-40a1-af34-8fa56f0949ff',
684
+ status: 200,
685
+ statusText: '',
686
+ headers: { 'content-type': 'application/json' },
687
+ responseTextLength: 100,
688
+ responseTextPreview: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}',
689
+ fullResponseText: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}'
690
+ }
691
+ [AccessControl] 🔍 PARSED RESPONSE DATA: {
692
+ correlationId: 'ee19985d-fd4a-40a1-af34-8fa56f0949ff',
693
+ status: 200,
694
+ responseDataType: 'object',
695
+ responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
696
+ responseData: '{\n' +
697
+ ' "success": true,\n' +
698
+ ' "accepted": 1,\n' +
699
+ ' "rejected": 0,\n' +
700
+ ' "outcomes": {\n' +
701
+ ' "success": 1,\n' +
702
+ ' "failed": 0,\n' +
703
+ ' "blocked": 0,\n' +
704
+ ' "error": 0\n' +
705
+ ' }\n' +
706
+ '}'
707
+ }
708
+ [AccessControl] Raw response received: {
709
+ "success": true,
710
+ "accepted": 1,
711
+ "rejected": 0,
712
+ "outcomes": {
713
+ "success": 1,
714
+ "failed": 0,
715
+ "blocked": 0,
716
+ "error": 0
717
+ }
718
+ }
719
+
720
+ stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle all_proofs_rejected error gracefully
721
+ [AccessControl] 🔍 RAW API RESPONSE (before parsing): {
722
+ correlationId: '12b89550-0aa2-4456-b08a-3c651c8d6f68',
723
+ status: 400,
724
+ statusText: '',
725
+ headers: { 'content-type': 'application/json' },
726
+ responseTextLength: 209,
727
+ 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"}}]}}}',
728
+ 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"}}]}}}'
729
+ }
730
+ [AccessControl] 🔍 PARSED RESPONSE DATA: {
731
+ correlationId: '12b89550-0aa2-4456-b08a-3c651c8d6f68',
732
+ status: 400,
733
+ responseDataType: 'object',
734
+ responseDataKeys: [ 'success', 'error' ],
735
+ responseData: '{\n' +
736
+ ' "success": false,\n' +
737
+ ' "error": {\n' +
738
+ ' "code": "all_proofs_rejected",\n' +
739
+ ' "message": "All proofs rejected",\n' +
740
+ ' "details": {\n' +
741
+ ' "rejected": 1,\n' +
742
+ ' "errors": [\n' +
743
+ ' {\n' +
744
+ ' "proof_index": 0,\n' +
745
+ ' "error": {\n' +
746
+ ' "code": "invalid_signature",\n' +
747
+ ' "message": "Invalid signature"\n' +
748
+ ' }\n' +
749
+ ' }\n' +
750
+ ' ]\n' +
751
+ ' }\n' +
752
+ ' }\n' +
753
+ '}'
754
+ }
755
+
756
+ stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle wrapped response format
757
+ [AccessControl] 🔍 RAW API RESPONSE (before parsing): {
758
+ correlationId: 'cb539c58-dadc-44b4-8c0e-1f1ed7a73fdd',
759
+ status: 200,
760
+ statusText: '',
761
+ headers: { 'content-type': 'application/json' },
762
+ responseTextLength: 206,
763
+ responseTextPreview: '{"success":true,"data":{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}},"metadata":{"requestId":"test-request-id","timestamp":"2025-11-24T04:51:29.782Z"}}',
764
+ fullResponseText: '{"success":true,"data":{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}},"metadata":{"requestId":"test-request-id","timestamp":"2025-11-24T04:51:29.782Z"}}'
765
+ }
766
+ [AccessControl] 🔍 PARSED RESPONSE DATA: {
767
+ correlationId: 'cb539c58-dadc-44b4-8c0e-1f1ed7a73fdd',
768
+ status: 200,
769
+ responseDataType: 'object',
770
+ responseDataKeys: [ 'success', 'data', 'metadata' ],
771
+ responseData: '{\n' +
772
+ ' "success": true,\n' +
773
+ ' "data": {\n' +
774
+ ' "success": true,\n' +
775
+ ' "accepted": 1,\n' +
776
+ ' "rejected": 0,\n' +
777
+ ' "outcomes": {\n' +
778
+ ' "success": 1,\n' +
779
+ ' "failed": 0,\n' +
780
+ ' "blocked": 0,\n' +
781
+ ' "error": 0\n' +
782
+ ' }\n' +
783
+ ' },\n' +
784
+ ' "metadata": {\n' +
785
+ ' "requestId": "test-request-id",\n' +
786
+ ' "timestamp": "2025-11-24T04:51:29.782Z"\n' +
787
+ ' }\n' +
788
+ '}'
789
+ }
790
+ [AccessControl] Raw response received: {
791
+ "success": true,
792
+ "data": {
793
+ "success": true,
794
+ "accepted": 1,
795
+ "rejected": 0,
796
+ "outcomes": {
797
+ "success": 1,
798
+ "failed": 0,
799
+ "blocked": 0,
800
+ "error": 0
801
+ }
802
+ },
803
+ "metadata": {
804
+ "requestId": "test-request-id",
805
+ "timestamp": "2025-11-24T04:51:29.782Z"
806
+ }
807
+ }
808
+ [AccessControl] 🔍 DATA OBJECT STRUCTURE: {
809
+ correlationId: 'cb539c58-dadc-44b4-8c0e-1f1ed7a73fdd',
810
+ dataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
811
+ hasAccepted: true,
812
+ hasRejected: true,
813
+ hasOutcomes: true,
814
+ hasErrors: false,
815
+ acceptedType: 'number',
816
+ rejectedType: 'number',
817
+ outcomesType: 'object',
818
+ errorsType: 'undefined',
819
+ errorsIsArray: false,
820
+ fullData: '{\n' +
821
+ ' "success": true,\n' +
822
+ ' "accepted": 1,\n' +
823
+ ' "rejected": 0,\n' +
824
+ ' "outcomes": {\n' +
825
+ ' "success": 1,\n' +
826
+ ' "failed": 0,\n' +
827
+ ' "blocked": 0,\n' +
828
+ ' "error": 0\n' +
829
+ ' }\n' +
830
+ '}'
831
+ }
832
+
833
+ stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle response with missing outcomes field (outcomes is optional)
834
+ [AccessControl] 🔍 RAW API RESPONSE (before parsing): {
835
+ correlationId: 'e5d958b0-cffa-43dd-85a9-a1ee514db731',
836
+ status: 200,
837
+ statusText: '',
838
+ headers: { 'content-type': 'application/json' },
839
+ responseTextLength: 42,
840
+ responseTextPreview: '{"success":true,"accepted":1,"rejected":0}',
841
+ fullResponseText: '{"success":true,"accepted":1,"rejected":0}'
842
+ }
843
+ [AccessControl] 🔍 PARSED RESPONSE DATA: {
844
+ correlationId: 'e5d958b0-cffa-43dd-85a9-a1ee514db731',
845
+ status: 200,
846
+ responseDataType: 'object',
847
+ responseDataKeys: [ 'success', 'accepted', 'rejected' ],
848
+ responseData: '{\n "success": true,\n "accepted": 1,\n "rejected": 0\n}'
849
+ }
850
+ [AccessControl] Raw response received: {
851
+ "success": true,
852
+ "accepted": 1,
853
+ "rejected": 0
854
+ }
855
+
856
+ stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle response with missing outcomes field (outcomes is optional)
857
+ [AccessControl] 🔍 RAW API RESPONSE (before parsing): {
858
+ correlationId: '6575c861-1522-405f-a5ff-8efc7d2626b1',
859
+ status: 200,
860
+ statusText: '',
861
+ headers: { 'content-type': 'application/json' },
862
+ responseTextLength: 100,
863
+ responseTextPreview: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}',
864
+ fullResponseText: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}'
865
+ }
866
+ [AccessControl] 🔍 PARSED RESPONSE DATA: {
867
+ correlationId: '6575c861-1522-405f-a5ff-8efc7d2626b1',
868
+ status: 200,
869
+ responseDataType: 'object',
870
+ responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
871
+ responseData: '{\n' +
872
+ ' "success": true,\n' +
873
+ ' "accepted": 1,\n' +
874
+ ' "rejected": 0,\n' +
875
+ ' "outcomes": {\n' +
876
+ ' "success": 1,\n' +
877
+ ' "failed": 0,\n' +
878
+ ' "blocked": 0,\n' +
879
+ ' "error": 0\n' +
880
+ ' }\n' +
881
+ '}'
882
+ }
883
+ [AccessControl] Raw response received: {
884
+ "success": true,
885
+ "accepted": 1,
886
+ "rejected": 0,
887
+ "outcomes": {
888
+ "success": 1,
889
+ "failed": 0,
890
+ "blocked": 0,
891
+ "error": 0
892
+ }
893
+ }
894
+
895
+ stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle response with missing outcomes field (outcomes is optional)
896
+ [AccessControl] 🔍 RAW API RESPONSE (before parsing): {
897
+ correlationId: '91c92c84-3579-4038-8694-595f08a40fc9',
898
+ status: 200,
899
+ statusText: '',
900
+ headers: { 'content-type': 'application/json' },
901
+ responseTextLength: 56,
902
+ responseTextPreview: '{"success":true,"accepted":1,"rejected":0,"outcomes":{}}',
903
+ fullResponseText: '{"success":true,"accepted":1,"rejected":0,"outcomes":{}}'
904
+ }
905
+ [AccessControl] 🔍 PARSED RESPONSE DATA: {
906
+ correlationId: '91c92c84-3579-4038-8694-595f08a40fc9',
907
+ status: 200,
908
+ responseDataType: 'object',
909
+ responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
910
+ responseData: '{\n "success": true,\n "accepted": 1,\n "rejected": 0,\n "outcomes": {}\n}'
911
+ }
912
+ [AccessControl] Raw response received: {
913
+ "success": true,
914
+ "accepted": 1,
915
+ "rejected": 0,
916
+ "outcomes": {}
917
+ }
918
+
919
+ stderr | src/services/__tests__/access-control.service.test.ts > AccessControlApiService > submitProofs > should handle wrapped response with invalid data structure
920
+ [AccessControl] 🔍 RAW API RESPONSE (before parsing): {
921
+ correlationId: 'f3f9b1f4-c562-4900-821c-bb6069d1d958',
922
+ status: 200,
923
+ statusText: '',
924
+ headers: { 'content-type': 'application/json' },
925
+ responseTextLength: 52,
926
+ responseTextPreview: '{"success":true,"data":{"message":"Invalid format"}}',
927
+ fullResponseText: '{"success":true,"data":{"message":"Invalid format"}}'
928
+ }
929
+ [AccessControl] 🔍 PARSED RESPONSE DATA: {
930
+ correlationId: 'f3f9b1f4-c562-4900-821c-bb6069d1d958',
931
+ status: 200,
932
+ responseDataType: 'object',
933
+ responseDataKeys: [ 'success', 'data' ],
934
+ responseData: '{\n "success": true,\n "data": {\n "message": "Invalid format"\n }\n}'
935
+ }
936
+ [AccessControl] Raw response received: {
937
+ "success": true,
938
+ "data": {
939
+ "message": "Invalid format"
940
+ }
941
+ }
942
+ [AccessControl] 🔍 DATA OBJECT STRUCTURE: {
943
+ correlationId: 'f3f9b1f4-c562-4900-821c-bb6069d1d958',
944
+ dataKeys: [ 'message' ],
945
+ hasAccepted: false,
946
+ hasRejected: false,
947
+ hasOutcomes: false,
948
+ hasErrors: false,
949
+ acceptedType: 'undefined',
950
+ rejectedType: 'undefined',
951
+ outcomesType: 'undefined',
952
+ errorsType: 'undefined',
953
+ errorsIsArray: false,
954
+ fullData: '{\n "message": "Invalid format"\n}'
955
+ }
956
+ [AccessControl] Wrapped response validation failed {
957
+ correlationId: 'f3f9b1f4-c562-4900-821c-bb6069d1d958',
958
+ zodErrors: [
959
+ {
960
+ code: 'invalid_type',
961
+ expected: 'number',
962
+ received: 'undefined',
963
+ path: [Array],
964
+ message: 'Required'
965
+ },
966
+ {
967
+ code: 'invalid_type',
968
+ expected: 'number',
969
+ received: 'undefined',
970
+ path: [Array],
971
+ message: 'Required'
972
+ }
973
+ ],
974
+ zodErrorDetails: '[\n' +
975
+ ' {\n' +
976
+ ' "code": "invalid_type",\n' +
977
+ ' "expected": "number",\n' +
978
+ ' "received": "undefined",\n' +
979
+ ' "path": [\n' +
980
+ ' "accepted"\n' +
981
+ ' ],\n' +
982
+ ' "message": "Required"\n' +
983
+ ' },\n' +
984
+ ' {\n' +
985
+ ' "code": "invalid_type",\n' +
986
+ ' "expected": "number",\n' +
987
+ ' "received": "undefined",\n' +
988
+ ' "path": [\n' +
989
+ ' "rejected"\n' +
990
+ ' ],\n' +
991
+ ' "message": "Required"\n' +
992
+ ' }\n' +
993
+ ']',
994
+ dataToValidate: '{\n "message": "Invalid format"\n}',
995
+ dataWithSuccess: '{\n "message": "Invalid format",\n "success": true\n}',
996
+ dataKeys: [ 'message' ],
997
+ originalResponse: '{\n "success": true,\n "data": {\n "message": "Invalid format"\n }\n}'
998
+ }
999
+ [AccessControl] Original wrapped response: {
1000
+ "success": true,
1001
+ "data": {
1002
+ "message": "Invalid format"
1003
+ }
1004
+ }
1005
+ [AccessControl] ❌ ZOD VALIDATION FAILED - 2 error(s):
1006
+ [AccessControl] Error 1: {
1007
+ path: 'accepted',
1008
+ message: 'Required',
1009
+ code: 'invalid_type',
1010
+ received: 'undefined',
1011
+ expected: 'number'
1012
+ }
1013
+ [AccessControl] Error 2: {
1014
+ path: 'rejected',
1015
+ message: 'Required',
1016
+ code: 'invalid_type',
1017
+ received: 'undefined',
1018
+ expected: 'number'
1019
+ }
1020
+ [AccessControl] ❌ Full ZOD errors JSON: [
1021
+ {
1022
+ "code": "invalid_type",
1023
+ "expected": "number",
1024
+ "received": "undefined",
1025
+ "path": [
1026
+ "accepted"
1027
+ ],
1028
+ "message": "Required"
1029
+ },
1030
+ {
1031
+ "code": "invalid_type",
1032
+ "expected": "number",
1033
+ "received": "undefined",
1034
+ "path": [
1035
+ "rejected"
1036
+ ],
1037
+ "message": "Required"
1038
+ }
1039
+ ]
1040
+ [AccessControl] Response validation failed {
1041
+ zodErrors: [
1042
+ {
1043
+ code: 'invalid_type',
1044
+ expected: 'number',
1045
+ received: 'undefined',
1046
+ path: [Array],
1047
+ message: 'Required'
1048
+ },
1049
+ {
1050
+ code: 'invalid_type',
1051
+ expected: 'number',
1052
+ received: 'undefined',
1053
+ path: [Array],
1054
+ message: 'Required'
1055
+ }
1056
+ ],
1057
+ responseData: { success: true, data: { message: 'Invalid format' } }
1058
+ }
1059
+ [AccessControl] Response validation failed {
1060
+ correlationId: 'f3f9b1f4-c562-4900-821c-bb6069d1d958',
1061
+ zodErrors: [
1062
+ {
1063
+ code: 'invalid_type',
1064
+ expected: 'number',
1065
+ received: 'undefined',
1066
+ path: [Array],
1067
+ message: 'Required'
1068
+ },
1069
+ {
1070
+ code: 'invalid_type',
1071
+ expected: 'number',
1072
+ received: 'undefined',
1073
+ path: [Array],
1074
+ message: 'Required'
1075
+ }
1076
+ ],
1077
+ zodErrorDetails: '[\n' +
1078
+ ' {\n' +
1079
+ ' "code": "invalid_type",\n' +
1080
+ ' "expected": "number",\n' +
1081
+ ' "received": "undefined",\n' +
1082
+ ' "path": [\n' +
1083
+ ' "accepted"\n' +
1084
+ ' ],\n' +
1085
+ ' "message": "Required"\n' +
1086
+ ' },\n' +
1087
+ ' {\n' +
1088
+ ' "code": "invalid_type",\n' +
1089
+ ' "expected": "number",\n' +
1090
+ ' "received": "undefined",\n' +
1091
+ ' "path": [\n' +
1092
+ ' "rejected"\n' +
1093
+ ' ],\n' +
1094
+ ' "message": "Required"\n' +
1095
+ ' }\n' +
1096
+ ']',
1097
+ responseData: '{\n "success": true,\n "data": {\n "message": "Invalid format"\n }\n}',
1098
+ responseDataType: 'object',
1099
+ responseKeys: [ 'success', 'data' ],
1100
+ httpStatus: 200,
1101
+ httpStatusText: ''
1102
+ }
1103
+ [AccessControl] ❌ ZOD VALIDATION FAILED (direct) - 2 error(s):
1104
+ [AccessControl] Error 1: {
1105
+ path: 'accepted',
1106
+ message: 'Required',
1107
+ code: 'invalid_type',
1108
+ received: 'undefined',
1109
+ expected: 'number'
1110
+ }
1111
+ [AccessControl] Error 2: {
1112
+ path: 'rejected',
1113
+ message: 'Required',
1114
+ code: 'invalid_type',
1115
+ received: 'undefined',
1116
+ expected: 'number'
1117
+ }
1118
+ [AccessControl] ❌ Full ZOD errors JSON: [
1119
+ {
1120
+ "code": "invalid_type",
1121
+ "expected": "number",
1122
+ "received": "undefined",
1123
+ "path": [
1124
+ "accepted"
1125
+ ],
1126
+ "message": "Required"
1127
+ },
1128
+ {
1129
+ "code": "invalid_type",
1130
+ "expected": "number",
1131
+ "received": "undefined",
1132
+ "path": [
1133
+ "rejected"
1134
+ ],
1135
+ "message": "Required"
1136
+ }
1137
+ ]
1138
+ [AccessControl] ❌ ACTUAL RESPONSE DATA: {
1139
+ "success": true,
1140
+ "data": {
1141
+ "message": "Invalid format"
1142
+ }
1143
+ }
1144
+
1145
+
1146
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 1/49
1147
+  ❯ src/__tests__/runtime/base-extensions.test.ts [queued]
1148
+  ❯ src/__tests__/runtime/base.test.ts [queued]
1149
+  ❯ src/__tests__/runtime/route-interception.test.ts 0/21
1150
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts [queued]
1151
+  ❯ src/__tests__/services/agentshield-integration.test.ts 0/30
1152
+  ❯ src/__tests__/services/tool-protection.service.test.ts 49/49
1153
+  ❯ src/delegation/__tests__/cascading-revocation.test.ts 23/23
1154
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 0/21
1155
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 0/35
1156
+  ❯ src/services/__tests__/access-control.integration.test.ts [queued]
1157
+  ❯ src/services/__tests__/access-control.service.test.ts 23/23
1158
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 0/13
1159
+
1160
+  Test Files 3 passed (43)
1161
+  Tests 96 passed (264)
1162
+  Start at 22:51:29
1163
+  Duration 404ms
1164
+ [?2026l[?2026h ✓ src/services/__tests__/access-control.service.test.ts (23 tests) 26ms
1165
+
1166
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 1/49
1167
+  ❯ src/__tests__/runtime/base-extensions.test.ts [queued]
1168
+  ❯ src/__tests__/runtime/base.test.ts [queued]
1169
+  ❯ src/__tests__/runtime/route-interception.test.ts 0/21
1170
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts [queued]
1171
+  ❯ src/__tests__/services/agentshield-integration.test.ts 0/30
1172
+  ❯ src/__tests__/services/tool-protection.service.test.ts 49/49
1173
+  ❯ src/delegation/__tests__/cascading-revocation.test.ts 23/23
1174
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 0/21
1175
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 0/35
1176
+  ❯ src/services/__tests__/access-control.integration.test.ts [queued]
1177
+  ❯ src/services/__tests__/access-control.service.test.ts 23/23
1178
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 0/13
1179
+
1180
+  Test Files 3 passed (43)
1181
+  Tests 96 passed (264)
1182
+  Start at 22:51:29
1183
+  Duration 404ms
1184
+ [?2026l[?2026hstdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should allow tool execution when no protection required
1185
+ [MCP-I] Checking tool protection: {
1186
+ tool: 'unprotectedTool',
1187
+ agentDid: 'did:key:zmock123...',
1188
+ hasDelegation: false
1189
+ }
1190
+
1191
+ 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
1192
+ [MCP-I] Tool protection check passed (no delegation required) {
1193
+ tool: 'unprotectedTool',
1194
+ agentDid: 'did:key:zmock123...',
1195
+ reason: 'Tool not configured to require delegation'
1196
+ }
1197
+
1198
+ 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
1199
+ [MCP-I] Checking tool protection: {
1200
+ tool: 'protectedTool',
1201
+ agentDid: 'did:key:zmock123...',
1202
+ hasDelegation: false
1203
+ }
1204
+
1205
+
1206
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1207
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1208
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1209
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1210
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1211
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1212
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1213
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1214
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1215
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1216
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1217
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1218
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1219
+
1220
+  Test Files 10 passed (43)
1221
+  Tests 370 passed (395)
1222
+  Start at 22:51:29
1223
+  Duration 504ms
1224
+ [?2026l[?2026hstderr | 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
1225
+ [MCP-I] BLOCKED: Tool requires delegation but none provided {
1226
+ tool: 'protectedTool',
1227
+ requiredScopes: [ 'files:write' ],
1228
+ agentDid: 'did:key:zmock123...',
1229
+ resumeToken: 'resume_10sqox_mico69xe',
1230
+ consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_10sqox_mico69xe'
1231
+ }
1232
+
1233
+
1234
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1235
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1236
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1237
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1238
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1239
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1240
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1241
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1242
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1243
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1244
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1245
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1246
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1247
+
1248
+  Test Files 10 passed (43)
1249
+  Tests 370 passed (395)
1250
+  Start at 22:51:29
1251
+  Duration 504ms
1252
+ [?2026l[?2026hstdout | 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
1253
+ [MCP-I] Checking tool protection: {
1254
+ tool: 'protectedTool',
1255
+ agentDid: 'did:key:zmock123...',
1256
+ hasDelegation: true
1257
+ }
1258
+
1259
+ 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
1260
+ [MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
1261
+ tool: 'protectedTool',
1262
+ agentDid: 'did:key:zmock123...',
1263
+ hasDelegationToken: true,
1264
+ hasConsentProof: false,
1265
+ requiredScopes: [ 'files:write' ]
1266
+ }
1267
+
1268
+ 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
1269
+ [MCP-I] ✅ Delegation verification SUCCEEDED {
1270
+ tool: 'protectedTool',
1271
+ agentDid: 'did:key:zmock123...',
1272
+ delegationId: 'test-delegation-id',
1273
+ credentialScopes: [ 'files:write' ],
1274
+ requiredScopes: [ 'files:write' ]
1275
+ }
1276
+
1277
+ 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
1278
+ [MCP-I] Checking tool protection: {
1279
+ tool: 'protectedTool',
1280
+ agentDid: 'did:key:zmock123...',
1281
+ hasDelegation: true
1282
+ }
1283
+
1284
+ 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
1285
+ [MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
1286
+ tool: 'protectedTool',
1287
+ agentDid: 'did:key:zmock123...',
1288
+ hasDelegationToken: false,
1289
+ hasConsentProof: true,
1290
+ requiredScopes: [ 'files:write' ]
1291
+ }
1292
+
1293
+ 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
1294
+ [MCP-I] ✅ Delegation verification SUCCEEDED {
1295
+ tool: 'protectedTool',
1296
+ agentDid: 'did:key:zmock123...',
1297
+ delegationId: 'test-delegation-id',
1298
+ credentialScopes: [ 'files:write' ],
1299
+ requiredScopes: [ 'files:write' ]
1300
+ }
1301
+
1302
+ 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
1303
+ [MCP-I] Checking tool protection: {
1304
+ tool: 'protectedTool',
1305
+ agentDid: 'did:key:zmock123...',
1306
+ hasDelegation: true
1307
+ }
1308
+
1309
+ 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
1310
+ [MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
1311
+ tool: 'protectedTool',
1312
+ agentDid: 'did:key:zmock123...',
1313
+ hasDelegationToken: true,
1314
+ hasConsentProof: false,
1315
+ requiredScopes: [ 'files:write' ]
1316
+ }
1317
+
1318
+
1319
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1320
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1321
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1322
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1323
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1324
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1325
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1326
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1327
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1328
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1329
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1330
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1331
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1332
+
1333
+  Test Files 10 passed (43)
1334
+  Tests 370 passed (395)
1335
+  Start at 22:51:29
1336
+  Duration 504ms
1337
+ [?2026l[?2026hstderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should block tool execution when delegation verification fails
1338
+ [MCP-I] ❌ Delegation verification FAILED {
1339
+ tool: 'protectedTool',
1340
+ agentDid: 'did:key:zmock123...',
1341
+ reason: 'Delegation token expired',
1342
+ errorCode: undefined,
1343
+ errorMessage: undefined,
1344
+ requiredScopes: [ 'files:write' ]
1345
+ }
1346
+
1347
+
1348
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1349
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1350
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1351
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1352
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1353
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1354
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1355
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1356
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1357
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1358
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1359
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1360
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1361
+
1362
+  Test Files 10 passed (43)
1363
+  Tests 370 passed (395)
1364
+  Start at 22:51:29
1365
+  Duration 504ms
1366
+ [?2026l[?2026hstdout | 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
1367
+ [MCP-I] Checking tool protection: {
1368
+ tool: 'protectedTool',
1369
+ agentDid: 'did:key:zmock123...',
1370
+ hasDelegation: true
1371
+ }
1372
+
1373
+ 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
1374
+ [MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
1375
+ tool: 'protectedTool',
1376
+ agentDid: 'did:key:zmock123...',
1377
+ hasDelegationToken: true,
1378
+ hasConsentProof: false,
1379
+ requiredScopes: [ 'files:write' ]
1380
+ }
1381
+
1382
+
1383
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1384
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1385
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1386
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1387
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1388
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1389
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1390
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1391
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1392
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1393
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1394
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1395
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1396
+
1397
+  Test Files 10 passed (43)
1398
+  Tests 370 passed (395)
1399
+  Start at 22:51:29
1400
+  Duration 504ms
1401
+ [?2026l[?2026hstderr | 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
1402
+ [MCP-I] ❌ Delegation verification FAILED {
1403
+ tool: 'protectedTool',
1404
+ agentDid: 'did:key:zmock123...',
1405
+ reason: 'Insufficient scopes',
1406
+ errorCode: undefined,
1407
+ errorMessage: undefined,
1408
+ requiredScopes: [ 'files:write' ]
1409
+ }
1410
+
1411
+
1412
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1413
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1414
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1415
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1416
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1417
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1418
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1419
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1420
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1421
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1422
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1423
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1424
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1425
+
1426
+  Test Files 10 passed (43)
1427
+  Tests 370 passed (395)
1428
+  Start at 22:51:29
1429
+  Duration 504ms
1430
+ [?2026l[?2026hstdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should handle API errors during verification gracefully
1431
+ [MCP-I] Checking tool protection: {
1432
+ tool: 'protectedTool',
1433
+ agentDid: 'did:key:zmock123...',
1434
+ hasDelegation: true
1435
+ }
1436
+
1437
+ stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should handle API errors during verification gracefully
1438
+ [MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
1439
+ tool: 'protectedTool',
1440
+ agentDid: 'did:key:zmock123...',
1441
+ hasDelegationToken: true,
1442
+ hasConsentProof: false,
1443
+ requiredScopes: [ 'files:write' ]
1444
+ }
1445
+
1446
+
1447
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1448
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1449
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1450
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1451
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1452
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1453
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1454
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1455
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1456
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1457
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1458
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1459
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1460
+
1461
+  Test Files 10 passed (43)
1462
+  Tests 370 passed (395)
1463
+  Start at 22:51:29
1464
+  Duration 504ms
1465
+ [?2026l[?2026hstderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should handle API errors during verification gracefully
1466
+ [MCP-I] ❌ Delegation verification error (API failure) {
1467
+ tool: 'protectedTool',
1468
+ agentDid: 'did:key:zmock123...',
1469
+ errorCode: 'network_error',
1470
+ errorMessage: 'API unavailable',
1471
+ errorDetails: {}
1472
+ }
1473
+
1474
+
1475
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1476
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1477
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1478
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1479
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1480
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1481
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1482
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1483
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1484
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1485
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1486
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1487
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1488
+
1489
+  Test Files 10 passed (43)
1490
+  Tests 370 passed (395)
1491
+  Start at 22:51:29
1492
+  Duration 504ms
1493
+ [?2026l[?2026hstdout | 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)
1494
+ [MCP-I] Checking tool protection: {
1495
+ tool: 'protectedTool',
1496
+ agentDid: 'did:key:zmock123...',
1497
+ hasDelegation: true
1498
+ }
1499
+
1500
+
1501
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1502
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1503
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1504
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1505
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1506
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1507
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1508
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1509
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1510
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1511
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1512
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1513
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1514
+
1515
+  Test Files 10 passed (43)
1516
+  Tests 370 passed (395)
1517
+  Start at 22:51:29
1518
+  Duration 504ms
1519
+ [?2026l[?2026hstderr | 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)
1520
+ [MCP-I] ⚠️ Delegation token provided but AccessControlApiService not configured - skipping verification {
1521
+ tool: 'protectedTool',
1522
+ agentDid: 'did:key:zmock123...',
1523
+ hasDelegationToken: true,
1524
+ hasConsentProof: false
1525
+ }
1526
+
1527
+
1528
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1529
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1530
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1531
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1532
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1533
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1534
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1535
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1536
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1537
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1538
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1539
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1540
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1541
+
1542
+  Test Files 10 passed (43)
1543
+  Tests 370 passed (395)
1544
+  Start at 22:51:29
1545
+  Duration 504ms
1546
+ [?2026l[?2026hstdout | 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
1547
+ [MCP-I] Checking tool protection: {
1548
+ tool: 'protectedTool',
1549
+ agentDid: 'did:key:zmock123...',
1550
+ hasDelegation: true
1551
+ }
1552
+
1553
+ 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
1554
+ [MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
1555
+ tool: 'protectedTool',
1556
+ agentDid: 'did:key:zmock123...',
1557
+ hasDelegationToken: true,
1558
+ hasConsentProof: false,
1559
+ requiredScopes: [ 'files:write' ]
1560
+ }
1561
+
1562
+
1563
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1564
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1565
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1566
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1567
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1568
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1569
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1570
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1571
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1572
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1573
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1574
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1575
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1576
+
1577
+  Test Files 10 passed (43)
1578
+  Tests 370 passed (395)
1579
+  Start at 22:51:29
1580
+  Duration 504ms
1581
+ [?2026l[?2026hstderr | 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
1582
+ [MCP-I] 🔒 SECURITY: User identifier validation FAILED {
1583
+ tool: 'protectedTool',
1584
+ agentDid: 'did:key:zmock123...',
1585
+ delegationUserIdentifier: 'did:key:zUserB987654...',
1586
+ sessionUserDid: 'did:key:zUserA123456...',
1587
+ sessionId: 'session123...',
1588
+ reason: 'user_identifier_mismatch',
1589
+ severity: 'high'
1590
+ }
1591
+
1592
+
1593
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1594
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1595
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1596
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1597
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1598
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1599
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1600
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1601
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1602
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1603
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1604
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1605
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1606
+
1607
+  Test Files 10 passed (43)
1608
+  Tests 370 passed (395)
1609
+  Start at 22:51:29
1610
+  Duration 504ms
1611
+ [?2026l[?2026hstdout | 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
1612
+ [MCP-I] Checking tool protection: {
1613
+ tool: 'protectedTool',
1614
+ agentDid: 'did:key:zmock123...',
1615
+ hasDelegation: true
1616
+ }
1617
+
1618
+ 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
1619
+ [MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
1620
+ tool: 'protectedTool',
1621
+ agentDid: 'did:key:zmock123...',
1622
+ hasDelegationToken: true,
1623
+ hasConsentProof: false,
1624
+ requiredScopes: [ 'files:write' ]
1625
+ }
1626
+
1627
+ 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
1628
+ [MCP-I] ✅ User identifier validation PASSED {
1629
+ tool: 'protectedTool',
1630
+ agentDid: 'did:key:zmock123...',
1631
+ userDid: 'did:key:zUserA123456...',
1632
+ sessionId: 'session123...'
1633
+ }
1634
+ [MCP-I] ✅ Delegation verification SUCCEEDED {
1635
+ tool: 'protectedTool',
1636
+ agentDid: 'did:key:zmock123...',
1637
+ delegationId: 'test-delegation-id',
1638
+ credentialScopes: [ 'files:write' ],
1639
+ requiredScopes: [ 'files:write' ]
1640
+ }
1641
+
1642
+ 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)
1643
+ [MCP-I] Checking tool protection: {
1644
+ tool: 'protectedTool',
1645
+ agentDid: 'did:key:zmock123...',
1646
+ hasDelegation: true
1647
+ }
1648
+
1649
+ 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)
1650
+ [MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
1651
+ tool: 'protectedTool',
1652
+ agentDid: 'did:key:zmock123...',
1653
+ hasDelegationToken: true,
1654
+ hasConsentProof: false,
1655
+ requiredScopes: [ 'files:write' ]
1656
+ }
1657
+
1658
+ 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)
1659
+ [MCP-I] ✅ Delegation verification SUCCEEDED {
1660
+ tool: 'protectedTool',
1661
+ agentDid: 'did:key:zmock123...',
1662
+ delegationId: 'test-delegation-id',
1663
+ credentialScopes: [ 'files:write' ],
1664
+ requiredScopes: [ 'files:write' ]
1665
+ }
1666
+
1667
+ 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
1668
+ [MCP-I] Checking tool protection: {
1669
+ tool: 'protectedTool',
1670
+ agentDid: 'did:key:zmock123...',
1671
+ hasDelegation: true
1672
+ }
1673
+
1674
+ 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
1675
+ [MCP-I] 🔐 Verifying delegation token with AccessControlApiService {
1676
+ tool: 'protectedTool',
1677
+ agentDid: 'did:key:zmock123...',
1678
+ hasDelegationToken: true,
1679
+ hasConsentProof: false,
1680
+ requiredScopes: [ 'files:write' ]
1681
+ }
1682
+
1683
+ 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
1684
+ [MCP-I] ✅ Delegation verification SUCCEEDED {
1685
+ tool: 'protectedTool',
1686
+ agentDid: 'did:key:zmock123...',
1687
+ delegationId: 'test-delegation-id',
1688
+ credentialScopes: [ 'files:write' ],
1689
+ requiredScopes: [ 'files:write' ]
1690
+ }
1691
+
1692
+
1693
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1694
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1695
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1696
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1697
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1698
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1699
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1700
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1701
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1702
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1703
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1704
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1705
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1706
+
1707
+  Test Files 10 passed (43)
1708
+  Tests 370 passed (395)
1709
+  Start at 22:51:29
1710
+  Duration 504ms
1711
+ [?2026l[?2026hstderr | 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
1712
+ [MCP-I] ⚠️ Delegation has user_identifier but session missing userDid {
1713
+ tool: 'protectedTool',
1714
+ agentDid: 'did:key:zmock123...',
1715
+ delegationUserIdentifier: 'did:key:zUserA123456...',
1716
+ sessionId: 'session123...'
1717
+ }
1718
+
1719
+
1720
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1721
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1722
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1723
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1724
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1725
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1726
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1727
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1728
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1729
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1730
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1731
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1732
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1733
+
1734
+  Test Files 10 passed (43)
1735
+  Tests 370 passed (395)
1736
+  Start at 22:51:29
1737
+  Duration 504ms
1738
+ [?2026l[?2026hstdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should create proof after successful tool execution
1739
+ [MCP-I] Checking tool protection: {
1740
+ tool: 'unprotectedTool',
1741
+ agentDid: 'did:key:zmock123...',
1742
+ hasDelegation: false
1743
+ }
1744
+
1745
+ stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > processToolCall with tool protection > should create proof after successful tool execution
1746
+ [MCP-I] Tool protection check passed (no delegation required) {
1747
+ tool: 'unprotectedTool',
1748
+ agentDid: 'did:key:zmock123...',
1749
+ reason: 'Tool not configured to require delegation'
1750
+ }
1751
+
1752
+ 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
1753
+ [MCP-I] Checking tool protection: {
1754
+ tool: 'protectedTool',
1755
+ agentDid: 'did:key:zmock123...',
1756
+ hasDelegation: false
1757
+ }
1758
+
1759
+
1760
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1761
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1762
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1763
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1764
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1765
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1766
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1767
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1768
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1769
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1770
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1771
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1772
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1773
+
1774
+  Test Files 10 passed (43)
1775
+  Tests 370 passed (395)
1776
+  Start at 22:51:29
1777
+  Duration 504ms
1778
+ [?2026l[?2026hstderr | 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
1779
+ [MCP-I] BLOCKED: Tool requires delegation but none provided {
1780
+ tool: 'protectedTool',
1781
+ requiredScopes: [ 'files:write' ],
1782
+ agentDid: 'did:key:zmock123...',
1783
+ resumeToken: 'resume_10srbb_mico69xj',
1784
+ consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_10srbb_mico69xj'
1785
+ }
1786
+
1787
+
1788
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1789
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1790
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1791
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1792
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1793
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1794
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1795
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1796
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1797
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1798
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1799
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1800
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1801
+
1802
+  Test Files 10 passed (43)
1803
+  Tests 370 passed (395)
1804
+  Start at 22:51:29
1805
+  Duration 504ms
1806
+ [?2026l[?2026hstdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include tool name in error
1807
+ [MCP-I] Checking tool protection: {
1808
+ tool: 'protectedTool',
1809
+ agentDid: 'did:key:zmock123...',
1810
+ hasDelegation: false
1811
+ }
1812
+
1813
+
1814
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1815
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1816
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1817
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1818
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1819
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1820
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1821
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1822
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1823
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1824
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1825
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1826
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1827
+
1828
+  Test Files 10 passed (43)
1829
+  Tests 370 passed (395)
1830
+  Start at 22:51:29
1831
+  Duration 504ms
1832
+ [?2026l[?2026hstderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include tool name in error
1833
+ [MCP-I] BLOCKED: Tool requires delegation but none provided {
1834
+ tool: 'protectedTool',
1835
+ requiredScopes: [ 'files:write' ],
1836
+ agentDid: 'did:key:zmock123...',
1837
+ resumeToken: 'resume_10srbb_mico69xj',
1838
+ consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_10srbb_mico69xj'
1839
+ }
1840
+
1841
+
1842
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1843
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1844
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1845
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1846
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1847
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1848
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1849
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1850
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1851
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1852
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1853
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1854
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1855
+
1856
+  Test Files 10 passed (43)
1857
+  Tests 370 passed (395)
1858
+  Start at 22:51:29
1859
+  Duration 504ms
1860
+ [?2026l[?2026hstdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include required scopes in error
1861
+ [MCP-I] Checking tool protection: {
1862
+ tool: 'protectedTool',
1863
+ agentDid: 'did:key:zmock123...',
1864
+ hasDelegation: false
1865
+ }
1866
+
1867
+
1868
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1869
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1870
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1871
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1872
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1873
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1874
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1875
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1876
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1877
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1878
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1879
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1880
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1881
+
1882
+  Test Files 10 passed (43)
1883
+  Tests 370 passed (395)
1884
+  Start at 22:51:29
1885
+  Duration 504ms
1886
+ [?2026l[?2026hstderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include required scopes in error
1887
+ [MCP-I] BLOCKED: Tool requires delegation but none provided {
1888
+ tool: 'protectedTool',
1889
+ requiredScopes: [ 'files:write', 'files:read' ],
1890
+ agentDid: 'did:key:zmock123...',
1891
+ resumeToken: 'resume_10srbb_mico69xj',
1892
+ consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite%2Cfiles%3Aread&session_id=session123&agent_did=&resume_token=resume_10srbb_mico69xj'
1893
+ }
1894
+
1895
+
1896
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1897
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1898
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1899
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1900
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1901
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1902
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1903
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1904
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1905
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1906
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1907
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1908
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1909
+
1910
+  Test Files 10 passed (43)
1911
+  Tests 370 passed (395)
1912
+  Start at 22:51:29
1913
+  Duration 504ms
1914
+ [?2026l[?2026hstdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include consent URL in error
1915
+ [MCP-I] Checking tool protection: {
1916
+ tool: 'protectedTool',
1917
+ agentDid: 'did:key:zmock123...',
1918
+ hasDelegation: false
1919
+ }
1920
+
1921
+
1922
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1923
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1924
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1925
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1926
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1927
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1928
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1929
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1930
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1931
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1932
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1933
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1934
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1935
+
1936
+  Test Files 10 passed (43)
1937
+  Tests 370 passed (395)
1938
+  Start at 22:51:29
1939
+  Duration 504ms
1940
+ [?2026l[?2026hstderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include consent URL in error
1941
+ [MCP-I] BLOCKED: Tool requires delegation but none provided {
1942
+ tool: 'protectedTool',
1943
+ requiredScopes: [ 'files:write' ],
1944
+ agentDid: 'did:key:zmock123...',
1945
+ resumeToken: 'resume_10srbb_mico69xj',
1946
+ consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_10srbb_mico69xj'
1947
+ }
1948
+
1949
+
1950
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1951
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1952
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1953
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1954
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1955
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1956
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1957
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1958
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1959
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1960
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1961
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1962
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1963
+
1964
+  Test Files 10 passed (43)
1965
+  Tests 370 passed (395)
1966
+  Start at 22:51:29
1967
+  Duration 504ms
1968
+ [?2026l[?2026h ✓ src/delegation/__tests__/vc-issuer.test.ts (21 tests) 80ms
1969
+ stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include resume token in error
1970
+ [MCP-I] Checking tool protection: {
1971
+ tool: 'protectedTool',
1972
+ agentDid: 'did:key:zmock123...',
1973
+ hasDelegation: false
1974
+ }
1975
+
1976
+
1977
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
1978
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
1979
+  ❯ src/__tests__/runtime/base.test.ts 55/55
1980
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
1981
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
1982
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
1983
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
1984
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
1985
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
1986
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
1987
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
1988
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
1989
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
1990
+
1991
+  Test Files 10 passed (43)
1992
+  Tests 370 passed (395)
1993
+  Start at 22:51:29
1994
+  Duration 504ms
1995
+ [?2026l[?2026hstderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include resume token in error
1996
+ [MCP-I] BLOCKED: Tool requires delegation but none provided {
1997
+ tool: 'protectedTool',
1998
+ requiredScopes: [ 'files:write' ],
1999
+ agentDid: 'did:key:zmock123...',
2000
+ resumeToken: 'resume_10src6_mico69xk',
2001
+ consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_10src6_mico69xk'
2002
+ }
2003
+
2004
+
2005
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
2006
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
2007
+  ❯ src/__tests__/runtime/base.test.ts 55/55
2008
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
2009
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
2010
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
2011
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
2012
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
2013
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
2014
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
2015
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
2016
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
2017
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
2018
+
2019
+  Test Files 10 passed (43)
2020
+  Tests 370 passed (395)
2021
+  Start at 22:51:29
2022
+  Duration 504ms
2023
+ [?2026l[?2026hstdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include intercepted call context in error
2024
+ [MCP-I] Checking tool protection: {
2025
+ tool: 'protectedTool',
2026
+ agentDid: 'did:key:zmock123...',
2027
+ hasDelegation: false
2028
+ }
2029
+
2030
+
2031
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
2032
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
2033
+  ❯ src/__tests__/runtime/base.test.ts 55/55
2034
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
2035
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
2036
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
2037
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
2038
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
2039
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
2040
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
2041
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
2042
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
2043
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
2044
+
2045
+  Test Files 10 passed (43)
2046
+  Tests 370 passed (395)
2047
+  Start at 22:51:29
2048
+  Duration 504ms
2049
+ [?2026l[?2026hstderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > DelegationRequiredError details > should include intercepted call context in error
2050
+ [MCP-I] BLOCKED: Tool requires delegation but none provided {
2051
+ tool: 'protectedTool',
2052
+ requiredScopes: [ 'files:write' ],
2053
+ agentDid: 'did:key:zmock123...',
2054
+ resumeToken: 'resume_h7iykh_mico69xk',
2055
+ consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=session123&agent_did=&resume_token=resume_h7iykh_mico69xk'
2056
+ }
2057
+
2058
+
2059
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
2060
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
2061
+  ❯ src/__tests__/runtime/base.test.ts 55/55
2062
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
2063
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
2064
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
2065
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
2066
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
2067
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
2068
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
2069
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
2070
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
2071
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
2072
+
2073
+  Test Files 10 passed (43)
2074
+  Tests 370 passed (395)
2075
+  Start at 22:51:29
2076
+  Duration 504ms
2077
+ [?2026l[?2026hstdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > audit logging > should log tool protection check when audit enabled
2078
+ [MCP-I] Checking tool protection: {
2079
+ tool: 'testTool',
2080
+ agentDid: 'did:key:zmock123...',
2081
+ hasDelegation: false
2082
+ }
2083
+
2084
+ stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > audit logging > should log tool protection check when audit enabled
2085
+ [MCP-I] Tool protection check passed (no delegation required) {
2086
+ tool: 'testTool',
2087
+ agentDid: 'did:key:zmock123...',
2088
+ reason: 'Tool not configured to require delegation'
2089
+ }
2090
+
2091
+ stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > audit logging > should log blocked tool call when audit enabled
2092
+ [MCP-I] Checking tool protection: {
2093
+ tool: 'protectedTool',
2094
+ agentDid: 'did:key:zmock123...',
2095
+ hasDelegation: false
2096
+ }
2097
+
2098
+ 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
2099
+ [MCP-I] Checking tool protection: {
2100
+ tool: 'testTool',
2101
+ agentDid: 'did:key:zmock123...',
2102
+ hasDelegation: false
2103
+ }
2104
+
2105
+ 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
2106
+ [MCP-I] Tool protection check passed (no delegation required) {
2107
+ tool: 'testTool',
2108
+ agentDid: 'did:key:zmock123...',
2109
+ reason: 'Tool not configured to require delegation'
2110
+ }
2111
+
2112
+ stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > tool protection service integration > should handle tool protection service errors gracefully
2113
+ [MCP-I] Checking tool protection: {
2114
+ tool: 'testTool',
2115
+ agentDid: 'did:key:zmock123...',
2116
+ hasDelegation: false
2117
+ }
2118
+
2119
+ ✓ src/delegation/__tests__/vc-verifier.test.ts (35 tests) 82ms
2120
+ stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle empty required scopes array
2121
+ [MCP-I] Checking tool protection: {
2122
+ tool: 'protectedTool',
2123
+ agentDid: 'did:key:zmock123...',
2124
+ hasDelegation: false
2125
+ }
2126
+
2127
+
2128
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
2129
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
2130
+  ❯ src/__tests__/runtime/base.test.ts 55/55
2131
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
2132
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
2133
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
2134
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
2135
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
2136
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
2137
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
2138
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
2139
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
2140
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
2141
+
2142
+  Test Files 10 passed (43)
2143
+  Tests 370 passed (395)
2144
+  Start at 22:51:29
2145
+  Duration 504ms
2146
+ [?2026l[?2026hstderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle empty required scopes array
2147
+ [MCP-I] BLOCKED: Tool requires delegation but none provided {
2148
+ tool: 'protectedTool',
2149
+ requiredScopes: [],
2150
+ agentDid: 'did:key:zmock123...',
2151
+ resumeToken: 'resume_10srer_mico69xn',
2152
+ consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=&session_id=session123&agent_did=&resume_token=resume_10srer_mico69xn'
2153
+ }
2154
+
2155
+
2156
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
2157
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
2158
+  ❯ src/__tests__/runtime/base.test.ts 55/55
2159
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
2160
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
2161
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
2162
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
2163
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
2164
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
2165
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
2166
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
2167
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
2168
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
2169
+
2170
+  Test Files 10 passed (43)
2171
+  Tests 370 passed (395)
2172
+  Start at 22:51:29
2173
+  Duration 504ms
2174
+ [?2026l[?2026hstdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle multiple required scopes
2175
+ [MCP-I] Checking tool protection: {
2176
+ tool: 'protectedTool',
2177
+ agentDid: 'did:key:zmock123...',
2178
+ hasDelegation: false
2179
+ }
2180
+
2181
+
2182
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
2183
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
2184
+  ❯ src/__tests__/runtime/base.test.ts 55/55
2185
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
2186
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
2187
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
2188
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
2189
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
2190
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
2191
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
2192
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
2193
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
2194
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
2195
+
2196
+  Test Files 10 passed (43)
2197
+  Tests 370 passed (395)
2198
+  Start at 22:51:29
2199
+  Duration 504ms
2200
+ [?2026l[?2026hstderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle multiple required scopes
2201
+ [MCP-I] BLOCKED: Tool requires delegation but none provided {
2202
+ tool: 'protectedTool',
2203
+ requiredScopes: [ 'scope1', 'scope2', 'scope3' ],
2204
+ agentDid: 'did:key:zmock123...',
2205
+ resumeToken: 'resume_10srer_mico69xn',
2206
+ consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=scope1%2Cscope2%2Cscope3&session_id=session123&agent_did=&resume_token=resume_10srer_mico69xn'
2207
+ }
2208
+
2209
+
2210
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
2211
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
2212
+  ❯ src/__tests__/runtime/base.test.ts 55/55
2213
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
2214
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
2215
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
2216
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
2217
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
2218
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
2219
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
2220
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
2221
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
2222
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
2223
+
2224
+  Test Files 10 passed (43)
2225
+  Tests 370 passed (395)
2226
+  Start at 22:51:29
2227
+  Duration 504ms
2228
+ [?2026l[?2026hstdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle session without id
2229
+ [MCP-I] Checking tool protection: {
2230
+ tool: 'protectedTool',
2231
+ agentDid: 'did:key:zmock123...',
2232
+ hasDelegation: false
2233
+ }
2234
+
2235
+
2236
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
2237
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
2238
+  ❯ src/__tests__/runtime/base.test.ts 55/55
2239
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
2240
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
2241
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
2242
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
2243
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
2244
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
2245
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
2246
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
2247
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
2248
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
2249
+
2250
+  Test Files 10 passed (43)
2251
+  Tests 370 passed (395)
2252
+  Start at 22:51:29
2253
+  Duration 504ms
2254
+ [?2026l[?2026hstderr | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle session without id
2255
+ [MCP-I] BLOCKED: Tool requires delegation but none provided {
2256
+ tool: 'protectedTool',
2257
+ requiredScopes: [ 'files:write' ],
2258
+ agentDid: 'did:key:zmock123...',
2259
+ resumeToken: 'resume_e2urth_mico69xn',
2260
+ consentUrl: 'https://kya.vouched.id/bouncer/consent?tool=protectedTool&scopes=files%3Awrite&session_id=&agent_did=&resume_token=resume_e2urth_mico69xn'
2261
+ }
2262
+
2263
+
2264
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
2265
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
2266
+  ❯ src/__tests__/runtime/base.test.ts 55/55
2267
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
2268
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
2269
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
2270
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
2271
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
2272
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
2273
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
2274
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
2275
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
2276
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
2277
+
2278
+  Test Files 10 passed (43)
2279
+  Tests 370 passed (395)
2280
+  Start at 22:51:29
2281
+  Duration 504ms
2282
+ [?2026l[?2026hstdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle handler errors independently of protection
2283
+ [MCP-I] Checking tool protection: {
2284
+ tool: 'errorTool',
2285
+ agentDid: 'did:key:zmock123...',
2286
+ hasDelegation: false
2287
+ }
2288
+
2289
+ stdout | src/__tests__/runtime/tool-protection-enforcement.test.ts > MCPIRuntimeBase - Tool Protection Enforcement > edge cases > should handle handler errors independently of protection
2290
+ [MCP-I] Tool protection check passed (no delegation required) {
2291
+ tool: 'errorTool',
2292
+ agentDid: 'did:key:zmock123...',
2293
+ reason: 'Tool not configured to require delegation'
2294
+ }
2295
+
2296
+ ✓ src/__tests__/runtime/base-extensions.test.ts (38 tests) 12ms
2297
+ ✓ src/__tests__/runtime/route-interception.test.ts (21 tests) 29ms
2298
+ ✓ src/__tests__/runtime/tool-protection-enforcement.test.ts (29 tests) 15ms
2299
+
2300
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
2301
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
2302
+  ❯ src/__tests__/runtime/base.test.ts 55/55
2303
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
2304
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
2305
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
2306
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
2307
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
2308
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
2309
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
2310
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
2311
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
2312
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
2313
+
2314
+  Test Files 10 passed (43)
2315
+  Tests 370 passed (395)
2316
+  Start at 22:51:29
2317
+  Duration 504ms
2318
+ [?2026l[?2026hstderr | src/services/__tests__/access-control.integration.test.ts > AccessControlApiService Integration > Proof Submission Flow > should submit proof end-to-end
2319
+ [AccessControl] 🔍 RAW API RESPONSE (before parsing): {
2320
+ correlationId: 'aea1781f-de24-49ba-8d61-a19e44f289ed',
2321
+ status: 200,
2322
+ statusText: '',
2323
+ headers: { 'content-type': 'application/json' },
2324
+ responseTextLength: 100,
2325
+ responseTextPreview: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}',
2326
+ fullResponseText: '{"success":true,"accepted":1,"rejected":0,"outcomes":{"success":1,"failed":0,"blocked":0,"error":0}}'
2327
+ }
2328
+ [AccessControl] 🔍 PARSED RESPONSE DATA: {
2329
+ correlationId: 'aea1781f-de24-49ba-8d61-a19e44f289ed',
2330
+ status: 200,
2331
+ responseDataType: 'object',
2332
+ responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes' ],
2333
+ responseData: '{\n' +
2334
+ ' "success": true,\n' +
2335
+ ' "accepted": 1,\n' +
2336
+ ' "rejected": 0,\n' +
2337
+ ' "outcomes": {\n' +
2338
+ ' "success": 1,\n' +
2339
+ ' "failed": 0,\n' +
2340
+ ' "blocked": 0,\n' +
2341
+ ' "error": 0\n' +
2342
+ ' }\n' +
2343
+ '}'
2344
+ }
2345
+ [AccessControl] Raw response received: {
2346
+ "success": true,
2347
+ "accepted": 1,
2348
+ "rejected": 0,
2349
+ "outcomes": {
2350
+ "success": 1,
2351
+ "failed": 0,
2352
+ "blocked": 0,
2353
+ "error": 0
2354
+ }
2355
+ }
2356
+
2357
+ stderr | src/services/__tests__/access-control.integration.test.ts > AccessControlApiService Integration > Proof Submission Flow > should handle proof submission with errors
2358
+ [AccessControl] 🔍 RAW API RESPONSE (before parsing): {
2359
+ correlationId: '2f743fd2-2974-4b20-a400-d46d4753695d',
2360
+ status: 200,
2361
+ statusText: '',
2362
+ headers: { 'content-type': 'application/json' },
2363
+ responseTextLength: 200,
2364
+ 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"}}]}',
2365
+ 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"}}]}'
2366
+ }
2367
+ [AccessControl] 🔍 PARSED RESPONSE DATA: {
2368
+ correlationId: '2f743fd2-2974-4b20-a400-d46d4753695d',
2369
+ status: 200,
2370
+ responseDataType: 'object',
2371
+ responseDataKeys: [ 'success', 'accepted', 'rejected', 'outcomes', 'errors' ],
2372
+ responseData: '{\n' +
2373
+ ' "success": true,\n' +
2374
+ ' "accepted": 0,\n' +
2375
+ ' "rejected": 1,\n' +
2376
+ ' "outcomes": {\n' +
2377
+ ' "success": 0,\n' +
2378
+ ' "failed": 1,\n' +
2379
+ ' "blocked": 0,\n' +
2380
+ ' "error": 0\n' +
2381
+ ' },\n' +
2382
+ ' "errors": [\n' +
2383
+ ' {\n' +
2384
+ ' "proof_index": 0,\n' +
2385
+ ' "error": {\n' +
2386
+ ' "code": "invalid_signature",\n' +
2387
+ ' "message": "Invalid JWS signature"\n' +
2388
+ ' }\n' +
2389
+ ' }\n' +
2390
+ ' ]\n' +
2391
+ '}'
2392
+ }
2393
+ [AccessControl] Raw response received: {
2394
+ "success": true,
2395
+ "accepted": 0,
2396
+ "rejected": 1,
2397
+ "outcomes": {
2398
+ "success": 0,
2399
+ "failed": 1,
2400
+ "blocked": 0,
2401
+ "error": 0
2402
+ },
2403
+ "errors": [
2404
+ {
2405
+ "proof_index": 0,
2406
+ "error": {
2407
+ "code": "invalid_signature",
2408
+ "message": "Invalid JWS signature"
2409
+ }
2410
+ }
2411
+ ]
2412
+ }
2413
+
2414
+ stderr | src/services/__tests__/access-control.integration.test.ts > AccessControlApiService Integration > Proof Verification Flow > should verify proof using ProofVerifier
2415
+ [CryptoService] Key ID mismatch
2416
+
2417
+
2418
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
2419
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
2420
+  ❯ src/__tests__/runtime/base.test.ts 55/55
2421
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
2422
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
2423
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
2424
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
2425
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
2426
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
2427
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
2428
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
2429
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
2430
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
2431
+
2432
+  Test Files 10 passed (43)
2433
+  Tests 370 passed (395)
2434
+  Start at 22:51:29
2435
+  Duration 504ms
2436
+ [?2026l[?2026h ✓ src/__tests__/runtime/base.test.ts (55 tests) 19ms
2437
+
2438
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
2439
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
2440
+  ❯ src/__tests__/runtime/base.test.ts 55/55
2441
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
2442
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
2443
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
2444
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
2445
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
2446
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
2447
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
2448
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
2449
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
2450
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
2451
+
2452
+  Test Files 10 passed (43)
2453
+  Tests 370 passed (395)
2454
+  Start at 22:51:29
2455
+  Duration 504ms
2456
+ [?2026l[?2026hstderr | src/services/__tests__/proof-verifier.integration.test.ts > ProofVerifier Integration - Real DID Resolution > did:web Resolution (HTTP) > should handle HTTP errors gracefully
2457
+ [ProofVerifier] Failed to fetch public key from DID: Error: Failed to resolve did:web:nonexistent-domain-that-does-not-exist-12345.com: fetch failed
2458
+ at Object.resolveDID (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/proof-verifier.integration.test.ts:143:19)
2459
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
2460
+ at ProofVerifier.fetchPublicKeyFromDID (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/proof-verifier.ts:348:22)
2461
+ at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/proof-verifier.integration.test.ts:252:7
2462
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:20
2463
+
2464
+ stderr | src/services/__tests__/proof-verifier.integration.test.ts > ProofVerifier Integration - Real DID Resolution > did:web Resolution (HTTP) > should handle HTTP errors gracefully
2465
+ [ProofVerifier] Failed to fetch public key from DID: Error: Failed to resolve did:web:nonexistent-domain-that-does-not-exist-12345.com: fetch failed
2466
+ at Object.resolveDID (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/proof-verifier.integration.test.ts:143:19)
2467
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
2468
+ at ProofVerifier.fetchPublicKeyFromDID (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/proof-verifier.ts:348:22)
2469
+ at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/proof-verifier.integration.test.ts:257:9
2470
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:20
2471
+
2472
+
2473
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
2474
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
2475
+  ❯ src/__tests__/runtime/base.test.ts 55/55
2476
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
2477
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
2478
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
2479
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
2480
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
2481
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
2482
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
2483
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
2484
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
2485
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
2486
+
2487
+  Test Files 10 passed (43)
2488
+  Tests 370 passed (395)
2489
+  Start at 22:51:29
2490
+  Duration 504ms
2491
+ [?2026l[?2026h ✓ src/__tests__/cache/tool-protection-cache.test.ts (49 tests) 160ms
2492
+
2493
+  ❯ src/__tests__/cache/tool-protection-cache.test.ts 49/49
2494
+  ❯ src/__tests__/runtime/base-extensions.test.ts 38/38
2495
+  ❯ src/__tests__/runtime/base.test.ts 55/55
2496
+  ❯ src/__tests__/runtime/proof-client-did.test.ts [queued]
2497
+  ❯ src/__tests__/runtime/route-interception.test.ts 21/21
2498
+  ❯ src/__tests__/runtime/tool-protection-enforcement.test.ts 29/29
2499
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
2500
+  ❯ src/delegation/__tests__/vc-issuer.test.ts 21/21
2501
+  ❯ src/delegation/__tests__/vc-verifier.test.ts 35/35
2502
+  ❯ src/services/__tests__/access-control.integration.test.ts 0/9
2503
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 1/13
2504
+  ❯ src/services/__tests__/proof-verifier.test.ts [queued]
2505
+  ❯ src/services/__tests__/storage.service.test.ts [queued]
2506
+
2507
+  Test Files 10 passed (43)
2508
+  Tests 370 passed (395)
2509
+  Start at 22:51:29
2510
+  Duration 504ms
2511
+ [?2026l[?2026h ✓ src/services/__tests__/proof-verifier.integration.test.ts (13 tests | 1 skipped) 79ms
2512
+ ✓ src/services/__tests__/access-control.integration.test.ts (9 tests) 129ms
2513
+ ✓ src/__tests__/runtime/proof-client-did.test.ts (17 tests) 6ms
2514
+
2515
+  ❯ src/__tests__/integration/full-flow.test.ts [queued]
2516
+  ❯ src/__tests__/providers/memory.test.ts [queued]
2517
+  ❯ src/__tests__/regression/phase2-regression.test.ts [queued]
2518
+  ❯ src/__tests__/runtime/proof-client-did.test.ts 17/17
2519
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
2520
+  ❯ src/compliance/__tests__/schema-verifier.test.ts [queued]
2521
+  ❯ src/delegation/__tests__/bitstring.test.ts [queued]
2522
+  ❯ src/services/__tests__/access-control.integration.test.ts 9/9
2523
+  ❯ src/services/__tests__/crypto.service.test.ts 0/34
2524
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 13/13
2525
+  ❯ src/services/__tests__/proof-verifier.test.ts 0/21
2526
+  ❯ src/services/__tests__/provider-resolution.integration.test.ts [queued]
2527
+  ❯ src/services/__tests__/storage.service.test.ts 0/17
2528
+
2529
+  Test Files 13 passed (43)
2530
+  Tests 407 passed | 1 skipped (484)
2531
+  Start at 22:51:29
2532
+  Duration 741ms
2533
+ [?2026l[?2026hstderr | src/services/__tests__/proof-verifier.test.ts > ProofVerifier Security > Signature Verification > should handle signature verification errors gracefully
2534
+ [CryptoService] Ed25519 verification error: Error: Crypto error
2535
+ at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/proof-verifier.test.ts:328:9
2536
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
2537
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
2538
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
2539
+ at new Promise (<anonymous>)
2540
+ at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
2541
+ at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
2542
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
2543
+ at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
2544
+ at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
2545
+
2546
+ stderr | src/services/__tests__/storage.service.test.ts > StorageService > createStorageProviders > should prefer Redis over KV when both are configured
2547
+ [StorageService] Failed to connect to Redis, falling back to memory: Redis package not available
2548
+
2549
+
2550
+  ❯ src/__tests__/integration/full-flow.test.ts [queued]
2551
+  ❯ src/__tests__/providers/memory.test.ts [queued]
2552
+  ❯ src/__tests__/regression/phase2-regression.test.ts [queued]
2553
+  ❯ src/__tests__/runtime/proof-client-did.test.ts 17/17
2554
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
2555
+  ❯ src/compliance/__tests__/schema-verifier.test.ts [queued]
2556
+  ❯ src/delegation/__tests__/bitstring.test.ts [queued]
2557
+  ❯ src/services/__tests__/access-control.integration.test.ts 9/9
2558
+  ❯ src/services/__tests__/crypto.service.test.ts 0/34
2559
+  ❯ src/services/__tests__/proof-verifier.integration.test.ts 13/13
2560
+  ❯ src/services/__tests__/proof-verifier.test.ts 0/21
2561
+  ❯ src/services/__tests__/provider-resolution.integration.test.ts [queued]
2562
+  ❯ src/services/__tests__/storage.service.test.ts 0/17
2563
+
2564
+  Test Files 13 passed (43)
2565
+  Tests 407 passed | 1 skipped (484)
2566
+  Start at 22:51:29
2567
+  Duration 741ms
2568
+ [?2026l[?2026hstderr | src/services/__tests__/storage.service.test.ts > StorageService > createStorageProviders > should prefer Redis over KV when both are configured
2569
+ [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'
2570
+
2571
+ stderr | src/services/__tests__/storage.service.test.ts > StorageService > createStorageProviders > should fall back to memory when Redis connection fails
2572
+ [StorageService] Failed to connect to Redis, falling back to memory: Redis package not available
2573
+
2574
+ stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyEd25519 > should return false on verification error
2575
+ [CryptoService] Ed25519 verification error: Error: Verification failed
2576
+ at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:62:9
2577
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
2578
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
2579
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
2580
+ at new Promise (<anonymous>)
2581
+ at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
2582
+ at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
2583
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
2584
+ at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
2585
+ at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
2586
+
2587
+
2588
+  ❯ src/__tests__/integration.test.ts [queued]
2589
+  ❯ src/__tests__/integration/full-flow.test.ts [queued]
2590
+  ❯ src/__tests__/providers/memory.test.ts 34/34
2591
+  ❯ src/__tests__/regression/phase2-regression.test.ts 12/12
2592
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
2593
+  ❯ src/__tests__/services/tool-protection-oauth-provider.test.ts 0/14
2594
+  ❯ src/compliance/__tests__/schema-verifier.test.ts 30/30
2595
+  ❯ src/config/__tests__/remote-config.spec.ts [queued]
2596
+  ❯ src/delegation/__tests__/bitstring.test.ts 30/30
2597
+  ❯ src/services/__tests__/crypto.service.test.ts 34/34
2598
+  ❯ src/services/__tests__/proof-verifier.test.ts 21/21
2599
+  ❯ src/services/__tests__/provider-resolution.integration.test.ts 6/6
2600
+  ❯ src/services/__tests__/storage.service.test.ts 17/17
2601
+
2602
+  Test Files 21 passed (43)
2603
+  Tests 591 passed | 1 skipped (610)
2604
+  Start at 22:51:29
2605
+  Duration 843ms
2606
+ [?2026l[?2026h ✓ src/services/__tests__/proof-verifier.test.ts (21 tests) 36ms
2607
+
2608
+  ❯ src/__tests__/integration.test.ts [queued]
2609
+  ❯ src/__tests__/integration/full-flow.test.ts [queued]
2610
+  ❯ src/__tests__/providers/memory.test.ts 34/34
2611
+  ❯ src/__tests__/regression/phase2-regression.test.ts 12/12
2612
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
2613
+  ❯ src/__tests__/services/tool-protection-oauth-provider.test.ts 0/14
2614
+  ❯ src/compliance/__tests__/schema-verifier.test.ts 30/30
2615
+  ❯ src/config/__tests__/remote-config.spec.ts [queued]
2616
+  ❯ src/delegation/__tests__/bitstring.test.ts 30/30
2617
+  ❯ src/services/__tests__/crypto.service.test.ts 34/34
2618
+  ❯ src/services/__tests__/proof-verifier.test.ts 21/21
2619
+  ❯ src/services/__tests__/provider-resolution.integration.test.ts 6/6
2620
+  ❯ src/services/__tests__/storage.service.test.ts 17/17
2621
+
2622
+  Test Files 21 passed (43)
2623
+  Tests 591 passed | 1 skipped (610)
2624
+  Start at 22:51:29
2625
+  Duration 843ms
2626
+ [?2026l[?2026hstderr | src/services/__tests__/storage.service.test.ts > StorageService > createStorageProviders > should use KV namespace when provided
2627
+ [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'
2628
+
2629
+ stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject invalid JWK format
2630
+ [CryptoService] Invalid Ed25519 JWK format
2631
+
2632
+ stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject JWK with wrong kty
2633
+ [CryptoService] Invalid Ed25519 JWK format
2634
+
2635
+ stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject JWK with wrong crv
2636
+ [CryptoService] Invalid Ed25519 JWK format
2637
+
2638
+ stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject JWK with missing x field
2639
+ [CryptoService] Invalid Ed25519 JWK format
2640
+
2641
+ stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject JWK with empty x field
2642
+ [CryptoService] Invalid Ed25519 JWK format
2643
+
2644
+ stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject malformed JWS
2645
+ [CryptoService] Invalid JWS format: Error: Invalid header base64: Unexpected token 'ž', "ž‹" is not valid JSON
2646
+ at CryptoService.parseJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:91:13)
2647
+ at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
2648
+ at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:230:42
2649
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
2650
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
2651
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
2652
+ at new Promise (<anonymous>)
2653
+ at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
2654
+ at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
2655
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
2656
+
2657
+ stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject non-EdDSA algorithms
2658
+ [CryptoService] Unsupported algorithm: RS256, expected EdDSA
2659
+
2660
+ stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should reject HS256 algorithm
2661
+ [CryptoService] Unsupported algorithm: HS256, expected EdDSA
2662
+
2663
+ stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle empty JWS components
2664
+ [CryptoService] Invalid JWS format: Error: Invalid header base64: Unexpected end of JSON input
2665
+ at CryptoService.parseJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:91:13)
2666
+ at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
2667
+ at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:271:42
2668
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
2669
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
2670
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
2671
+ at new Promise (<anonymous>)
2672
+ at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
2673
+ at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
2674
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
2675
+
2676
+ stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle malformed JWS - single part
2677
+ [CryptoService] Invalid JWS format: Error: Invalid JWS format: expected header.payload.signature
2678
+ at CryptoService.parseJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:78:13)
2679
+ at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
2680
+ at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:279:42
2681
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
2682
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
2683
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
2684
+ at new Promise (<anonymous>)
2685
+ at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
2686
+ at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
2687
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
2688
+
2689
+ stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle malformed JWS - two parts
2690
+ [CryptoService] Invalid JWS format: Error: Invalid JWS format: expected header.payload.signature
2691
+ at CryptoService.parseJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:78:13)
2692
+ at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
2693
+ at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:287:42
2694
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
2695
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
2696
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
2697
+ at new Promise (<anonymous>)
2698
+ at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
2699
+ at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
2700
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
2701
+
2702
+ stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle malformed JWS - four parts
2703
+ [CryptoService] Invalid JWS format: Error: Invalid JWS format: expected header.payload.signature
2704
+ at CryptoService.parseJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:78:13)
2705
+ at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
2706
+ at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:302:42
2707
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
2708
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
2709
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
2710
+ at new Promise (<anonymous>)
2711
+ at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
2712
+ at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
2713
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
2714
+
2715
+ stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle malformed JWS - invalid JSON header
2716
+ [CryptoService] Invalid JWS format: Error: Invalid header base64: Unexpected token 'o', "notjson" is not valid JSON
2717
+ at CryptoService.parseJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:91:13)
2718
+ at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
2719
+ at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:316:42
2720
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
2721
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
2722
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
2723
+ at new Promise (<anonymous>)
2724
+ at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
2725
+ at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
2726
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
2727
+
2728
+ stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle malformed JWS - invalid base64
2729
+ [CryptoService] Invalid JWS format: Error: Invalid payload base64: Invalid base64url string: Invalid character
2730
+ at CryptoService.parseJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:107:15)
2731
+ at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:169:23)
2732
+ at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:334:42
2733
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
2734
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
2735
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
2736
+ at new Promise (<anonymous>)
2737
+ at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
2738
+ at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
2739
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
2740
+
2741
+ stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should validate expectedKid option
2742
+ [CryptoService] Key ID mismatch
2743
+
2744
+ stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should validate alg option
2745
+ [CryptoService] Unsupported algorithm: EdDSA, expected RS256
2746
+
2747
+ stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should validate Ed25519 key length
2748
+ [CryptoService] Failed to extract public key: Error: Invalid Ed25519 public key length: 5
2749
+ at CryptoService.jwkToBase64PublicKey (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:295:13)
2750
+ at CryptoService.verifyJWS (/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/crypto.service.ts:249:32)
2751
+ at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:398:42
2752
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
2753
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
2754
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
2755
+ at new Promise (<anonymous>)
2756
+ at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
2757
+ at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
2758
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
2759
+
2760
+ stderr | src/services/__tests__/crypto.service.test.ts > CryptoService > verifyJWS > should handle signature verification error
2761
+ [CryptoService] Ed25519 verification error: Error: Crypto error
2762
+ at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/services/__tests__/crypto.service.test.ts:449:61
2763
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
2764
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
2765
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
2766
+ at new Promise (<anonymous>)
2767
+ at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
2768
+ at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
2769
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
2770
+ at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
2771
+ at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
2772
+
2773
+ stderr | src/services/__tests__/provider-resolution.integration.test.ts > Provider Resolution Integration > Backward compatibility > should work with Phase 1 tools (no oauthProvider field)
2774
+ [ProviderResolver] Tool does not specify oauthProvider. Using first configured provider "github" as fallback. This is deprecated - configure oauthProvider in AgentShield dashboard for Phase 2+.
2775
+
2776
+
2777
+  ❯ src/__tests__/integration.test.ts [queued]
2778
+  ❯ src/__tests__/integration/full-flow.test.ts [queued]
2779
+  ❯ src/__tests__/providers/memory.test.ts 34/34
2780
+  ❯ src/__tests__/regression/phase2-regression.test.ts 12/12
2781
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
2782
+  ❯ src/__tests__/services/tool-protection-oauth-provider.test.ts 0/14
2783
+  ❯ src/compliance/__tests__/schema-verifier.test.ts 30/30
2784
+  ❯ src/config/__tests__/remote-config.spec.ts [queued]
2785
+  ❯ src/delegation/__tests__/bitstring.test.ts 30/30
2786
+  ❯ src/services/__tests__/crypto.service.test.ts 34/34
2787
+  ❯ src/services/__tests__/proof-verifier.test.ts 21/21
2788
+  ❯ src/services/__tests__/provider-resolution.integration.test.ts 6/6
2789
+  ❯ src/services/__tests__/storage.service.test.ts 17/17
2790
+
2791
+  Test Files 21 passed (43)
2792
+  Tests 591 passed | 1 skipped (610)
2793
+  Start at 22:51:29
2794
+  Duration 843ms
2795
+ [?2026l[?2026hstdout | 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
2796
+ [ToolProtectionService] Config loaded from API {
2797
+ source: 'api',
2798
+ toolCount: 1,
2799
+ protectedTools: [ 'phase1_tool' ],
2800
+ agentDid: 'did:key:z6MkhaXgBZDv...',
2801
+ projectId: 'none',
2802
+ cacheTtlMs: 300000,
2803
+ cacheExpiresAt: '2025-11-24T04:56:30.139Z'
2804
+ }
2805
+
2806
+ ✓ src/services/__tests__/provider-resolution.integration.test.ts (6 tests) 7ms
2807
+ ✓ src/services/__tests__/storage.service.test.ts (17 tests) 48ms
2808
+ ✓ src/services/__tests__/crypto.service.test.ts (34 tests) 22ms
2809
+ 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)
2810
+ [ToolProtectionService] Config loaded from API {
2811
+ source: 'api',
2812
+ toolCount: 1,
2813
+ protectedTools: [ 'old_tool' ],
2814
+ agentDid: 'did:key:z6MkhaXgBZDv...',
2815
+ projectId: 'none',
2816
+ cacheTtlMs: 300000,
2817
+ cacheExpiresAt: '2025-11-24T04:56:30.144Z'
2818
+ }
2819
+
2820
+ 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)
2821
+ [ToolProtectionService] Config loaded from API {
2822
+ source: 'api',
2823
+ toolCount: 1,
2824
+ protectedTools: [ 'old_tool' ],
2825
+ agentDid: 'did:key:z6MkhaXgBZDv...',
2826
+ projectId: 'none',
2827
+ cacheTtlMs: 300000,
2828
+ cacheExpiresAt: '2025-11-24T04:56:30.145Z'
2829
+ }
2830
+
2831
+ 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
2832
+ [ToolProtectionService] Config loaded from API {
2833
+ source: 'api',
2834
+ toolCount: 1,
2835
+ protectedTools: [ 'tool_with_snake_case' ],
2836
+ agentDid: 'did:key:z6MkhaXgBZDv...',
2837
+ projectId: 'test-project-123',
2838
+ cacheTtlMs: 300000,
2839
+ cacheExpiresAt: '2025-11-24T04:56:30.145Z'
2840
+ }
2841
+
2842
+
2843
+  ❯ src/__tests__/integration.test.ts [queued]
2844
+  ❯ src/__tests__/integration/full-flow.test.ts [queued]
2845
+  ❯ src/__tests__/providers/memory.test.ts 34/34
2846
+  ❯ src/__tests__/regression/phase2-regression.test.ts 12/12
2847
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
2848
+  ❯ src/__tests__/services/tool-protection-oauth-provider.test.ts 0/14
2849
+  ❯ src/compliance/__tests__/schema-verifier.test.ts 30/30
2850
+  ❯ src/config/__tests__/remote-config.spec.ts [queued]
2851
+  ❯ src/delegation/__tests__/bitstring.test.ts 30/30
2852
+  ❯ src/services/__tests__/crypto.service.test.ts 34/34
2853
+  ❯ src/services/__tests__/proof-verifier.test.ts 21/21
2854
+  ❯ src/services/__tests__/provider-resolution.integration.test.ts 6/6
2855
+  ❯ src/services/__tests__/storage.service.test.ts 17/17
2856
+
2857
+  Test Files 21 passed (43)
2858
+  Tests 591 passed | 1 skipped (610)
2859
+  Start at 22:51:29
2860
+  Duration 843ms
2861
+ [?2026l[?2026hstderr | 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)
2862
+ [ProviderResolver] Tool does not specify oauthProvider. Using first configured provider "github" as fallback. This is deprecated - configure oauthProvider in AgentShield dashboard for Phase 2+.
2863
+
2864
+
2865
+  ❯ src/__tests__/integration.test.ts [queued]
2866
+  ❯ src/__tests__/integration/full-flow.test.ts [queued]
2867
+  ❯ src/__tests__/providers/memory.test.ts 34/34
2868
+  ❯ src/__tests__/regression/phase2-regression.test.ts 12/12
2869
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
2870
+  ❯ src/__tests__/services/tool-protection-oauth-provider.test.ts 0/14
2871
+  ❯ src/compliance/__tests__/schema-verifier.test.ts 30/30
2872
+  ❯ src/config/__tests__/remote-config.spec.ts [queued]
2873
+  ❯ src/delegation/__tests__/bitstring.test.ts 30/30
2874
+  ❯ src/services/__tests__/crypto.service.test.ts 34/34
2875
+  ❯ src/services/__tests__/proof-verifier.test.ts 21/21
2876
+  ❯ src/services/__tests__/provider-resolution.integration.test.ts 6/6
2877
+  ❯ src/services/__tests__/storage.service.test.ts 17/17
2878
+
2879
+  Test Files 21 passed (43)
2880
+  Tests 591 passed | 1 skipped (610)
2881
+  Start at 22:51:29
2882
+  Duration 843ms
2883
+ [?2026l[?2026hstdout | 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
2884
+ [ToolProtectionService] Config loaded from API {
2885
+ source: 'api',
2886
+ toolCount: 2,
2887
+ protectedTools: [ 'phase1_tool', 'phase2_tool' ],
2888
+ agentDid: 'did:key:z6MkhaXgBZDv...',
2889
+ projectId: 'test-project-123',
2890
+ cacheTtlMs: 300000,
2891
+ cacheExpiresAt: '2025-11-24T04:56:30.146Z'
2892
+ }
2893
+
2894
+ ✓ src/__tests__/providers/memory.test.ts (34 tests) 30ms
2895
+ ✓ src/__tests__/regression/phase2-regression.test.ts (12 tests) 12ms
2896
+ ✓ src/delegation/__tests__/bitstring.test.ts (30 tests) 5ms
2897
+ ✓ src/compliance/__tests__/schema-verifier.test.ts (30 tests) 12ms
2898
+
2899
+  ❯ src/__tests__/integration.test.ts [queued]
2900
+  ❯ src/__tests__/integration/full-flow.test.ts [queued]
2901
+  ❯ src/__tests__/providers/memory.test.ts 34/34
2902
+  ❯ src/__tests__/regression/phase2-regression.test.ts 12/12
2903
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
2904
+  ❯ src/__tests__/services/tool-protection-oauth-provider.test.ts 0/14
2905
+  ❯ src/compliance/__tests__/schema-verifier.test.ts 30/30
2906
+  ❯ src/config/__tests__/remote-config.spec.ts [queued]
2907
+  ❯ src/delegation/__tests__/bitstring.test.ts 30/30
2908
+  ❯ src/services/__tests__/crypto.service.test.ts 34/34
2909
+  ❯ src/services/__tests__/proof-verifier.test.ts 21/21
2910
+  ❯ src/services/__tests__/provider-resolution.integration.test.ts 6/6
2911
+  ❯ src/services/__tests__/storage.service.test.ts 17/17
2912
+
2913
+  Test Files 21 passed (43)
2914
+  Tests 591 passed | 1 skipped (610)
2915
+  Start at 22:51:29
2916
+  Duration 843ms
2917
+ [?2026l[?2026hstdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > New endpoint format (toolProtections object) > should parse oauthProvider from camelCase field
2918
+ [ToolProtectionService] Config loaded from API {
2919
+ source: 'api',
2920
+ toolCount: 2,
2921
+ protectedTools: [ 'read_repos', 'send_email' ],
2922
+ agentDid: 'did:key:z6MkhaXgBZDv...',
2923
+ projectId: 'test-project-123',
2924
+ cacheTtlMs: 300000,
2925
+ cacheExpiresAt: '2025-11-24T04:56:30.235Z'
2926
+ }
2927
+
2928
+ 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
2929
+ [ToolProtectionService] Config loaded from API {
2930
+ source: 'api',
2931
+ toolCount: 1,
2932
+ protectedTools: [ 'read_repos' ],
2933
+ agentDid: 'did:key:z6MkhaXgBZDv...',
2934
+ projectId: 'test-project-123',
2935
+ cacheTtlMs: 300000,
2936
+ cacheExpiresAt: '2025-11-24T04:56:30.239Z'
2937
+ }
2938
+
2939
+ 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
2940
+ [ToolProtectionService] Config loaded from API {
2941
+ source: 'api',
2942
+ toolCount: 1,
2943
+ protectedTools: [ 'read_repos' ],
2944
+ agentDid: 'did:key:z6MkhaXgBZDv...',
2945
+ projectId: 'test-project-123',
2946
+ cacheTtlMs: 300000,
2947
+ cacheExpiresAt: '2025-11-24T04:56:30.239Z'
2948
+ }
2949
+
2950
+ 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)
2951
+ [ToolProtectionService] Config loaded from API {
2952
+ source: 'api',
2953
+ toolCount: 1,
2954
+ protectedTools: [ 'read_repos' ],
2955
+ agentDid: 'did:key:z6MkhaXgBZDv...',
2956
+ projectId: 'test-project-123',
2957
+ cacheTtlMs: 300000,
2958
+ cacheExpiresAt: '2025-11-24T04:56:30.240Z'
2959
+ }
2960
+
2961
+ 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
2962
+ [ToolProtectionService] Config loaded from API {
2963
+ source: 'api',
2964
+ toolCount: 2,
2965
+ protectedTools: [ 'read_repos', 'send_email' ],
2966
+ agentDid: 'did:key:z6MkhaXgBZDv...',
2967
+ projectId: 'none',
2968
+ cacheTtlMs: 300000,
2969
+ cacheExpiresAt: '2025-11-24T04:56:30.240Z'
2970
+ }
2971
+
2972
+ 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
2973
+ [ToolProtectionService] Config loaded from API {
2974
+ source: 'api',
2975
+ toolCount: 1,
2976
+ protectedTools: [ 'read_repos' ],
2977
+ agentDid: 'did:key:z6MkhaXgBZDv...',
2978
+ projectId: 'none',
2979
+ cacheTtlMs: 300000,
2980
+ cacheExpiresAt: '2025-11-24T04:56:30.241Z'
2981
+ }
2982
+
2983
+ 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
2984
+ [ToolProtectionService] Config loaded from API {
2985
+ source: 'api',
2986
+ toolCount: 1,
2987
+ protectedTools: [ 'read_repos' ],
2988
+ agentDid: 'did:key:z6MkhaXgBZDv...',
2989
+ projectId: 'none',
2990
+ cacheTtlMs: 300000,
2991
+ cacheExpiresAt: '2025-11-24T04:56:30.251Z'
2992
+ }
2993
+
2994
+ 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
2995
+ [ToolProtectionService] Config loaded from API {
2996
+ source: 'api',
2997
+ toolCount: 2,
2998
+ protectedTools: [ 'read_repos', 'send_email' ],
2999
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3000
+ projectId: 'none',
3001
+ cacheTtlMs: 300000,
3002
+ cacheExpiresAt: '2025-11-24T04:56:30.253Z'
3003
+ }
3004
+
3005
+ 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
3006
+ [ToolProtectionService] Config loaded from API {
3007
+ source: 'api',
3008
+ toolCount: 1,
3009
+ protectedTools: [ 'read_repos' ],
3010
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3011
+ projectId: 'none',
3012
+ cacheTtlMs: 300000,
3013
+ cacheExpiresAt: '2025-11-24T04:56:30.253Z'
3014
+ }
3015
+
3016
+ 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
3017
+ [ToolProtectionService] Config loaded from API {
3018
+ source: 'api',
3019
+ toolCount: 1,
3020
+ protectedTools: [ 'read_repos' ],
3021
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3022
+ projectId: 'none',
3023
+ cacheTtlMs: 300000,
3024
+ cacheExpiresAt: '2025-11-24T04:56:30.255Z'
3025
+ }
3026
+
3027
+ stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > Caching > should cache oauthProvider field correctly
3028
+ [ToolProtectionService] Config loaded from API {
3029
+ source: 'api',
3030
+ toolCount: 1,
3031
+ protectedTools: [ 'read_repos' ],
3032
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3033
+ projectId: 'test-project-123',
3034
+ cacheTtlMs: 300000,
3035
+ cacheExpiresAt: '2025-11-24T04:56:30.255Z'
3036
+ }
3037
+
3038
+ 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
3039
+ [ToolProtectionService] Config loaded from API {
3040
+ source: 'api',
3041
+ toolCount: 2,
3042
+ protectedTools: [ 'tool_with_provider', 'tool_without_provider' ],
3043
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3044
+ projectId: 'test-project-123',
3045
+ cacheTtlMs: 300000,
3046
+ cacheExpiresAt: '2025-11-24T04:56:30.255Z'
3047
+ }
3048
+
3049
+ stdout | src/__tests__/services/tool-protection-oauth-provider.test.ts > ToolProtectionService - oauthProvider Parsing > oauthProvider field inclusion > should handle empty string oauthProvider gracefully
3050
+ [ToolProtectionService] Config loaded from API {
3051
+ source: 'api',
3052
+ toolCount: 1,
3053
+ protectedTools: [ 'tool_with_empty_provider' ],
3054
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3055
+ projectId: 'test-project-123',
3056
+ cacheTtlMs: 300000,
3057
+ cacheExpiresAt: '2025-11-24T04:56:30.255Z'
3058
+ }
3059
+
3060
+ ✓ src/__tests__/services/tool-protection-oauth-provider.test.ts (14 tests) 24ms
3061
+ stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Tool protection enforcement flow > should allow unprotected tool calls
3062
+ [ToolProtectionService] Config loaded from API {
3063
+ source: 'api',
3064
+ toolCount: 1,
3065
+ protectedTools: [],
3066
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3067
+ projectId: 'test-project',
3068
+ cacheTtlMs: 300000,
3069
+ cacheExpiresAt: '2025-11-24T04:56:30.275Z'
3070
+ }
3071
+
3072
+ stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Tool protection enforcement flow > should intercept protected tool calls without delegation
3073
+ [ToolProtectionService] Config loaded from API {
3074
+ source: 'api',
3075
+ toolCount: 1,
3076
+ protectedTools: [ 'checkout' ],
3077
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3078
+ projectId: 'test-project',
3079
+ cacheTtlMs: 300000,
3080
+ cacheExpiresAt: '2025-11-24T04:56:30.277Z'
3081
+ }
3082
+
3083
+ stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Tool protection enforcement flow > should intercept protected tool calls without delegation
3084
+ [ToolProtectionService] Protection check {
3085
+ tool: 'checkout',
3086
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3087
+ found: true,
3088
+ isWildcard: false,
3089
+ requiresDelegation: true,
3090
+ availableTools: [ 'checkout' ]
3091
+ }
3092
+
3093
+ stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > AgentShield integration flow > should fetch tool protection config from AgentShield
3094
+ [ToolProtectionService] Config loaded from API {
3095
+ source: 'api',
3096
+ toolCount: 1,
3097
+ protectedTools: [ 'protected_tool' ],
3098
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3099
+ projectId: 'test-project',
3100
+ cacheTtlMs: 300000,
3101
+ cacheExpiresAt: '2025-11-24T04:56:30.280Z'
3102
+ }
3103
+
3104
+ stdout | src/__tests__/integration.test.ts > Integration Tests > Full handshake and tool execution flow > should complete full authentication and tool execution cycle
3105
+ [AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zYH6UWFNio2eTkiWWlLjxFFiAe4wBJzq0","environment":"development","userDidGeneration":"disabled"},"timestamp":1763959890279,"timestampFormatted":"2025-11-24T04:51:30.279Z"}
3106
+
3107
+ stdout | src/__tests__/integration.test.ts > Integration Tests > Full handshake and tool execution flow > should complete full authentication and tool execution cycle
3108
+ [AUDIT] {"event":"tool_executed","data":{"tool":"greetingTool","sessionId":"3b0c29942bde51731768ebead1c4f585","timestamp":1763959890279},"timestamp":1763959890279,"timestampFormatted":"2025-11-24T04:51:30.279Z"}
3109
+
3110
+ stdout | src/__tests__/integration.test.ts > Integration Tests > Session expiry handling > should handle expired sessions correctly
3111
+ [AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zBMpGES-qfoNPndakBI7IAn3KYlwNF53c","environment":"development","userDidGeneration":"disabled"},"timestamp":1763959890285,"timestampFormatted":"2025-11-24T04:51:30.285Z"}
3112
+
3113
+ stdout | src/__tests__/integration.test.ts > Integration Tests > Key rotation flow > should handle key rotation and maintain functionality
3114
+ [AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zQ4nGRVgf_50b46O3GabqEHron2ohzR__","environment":"development","userDidGeneration":"disabled"},"timestamp":1763959890285,"timestampFormatted":"2025-11-24T04:51:30.285Z"}
3115
+
3116
+ stdout | src/__tests__/integration.test.ts > Integration Tests > Key rotation flow > should handle key rotation and maintain functionality
3117
+ [AUDIT] {"event":"keys_rotated","data":{"oldDid":"did:key:zQ4nGRVgf_50b46O3GabqEHron2ohzR__","newDid":"did:key:zh-Aw1K8W3ZhGMRG0pzv-ZzzJy5Yk12sW","timestamp":1763959890285},"timestamp":1763959890285,"timestampFormatted":"2025-11-24T04:51:30.285Z"}
3118
+
3119
+ stdout | src/__tests__/integration.test.ts > Integration Tests > Well-known endpoints > should provide identity discovery endpoints
3120
+ [AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zlEujMov0J9otxEourPZTqzTDonyBh22o","environment":"development","userDidGeneration":"disabled"},"timestamp":1763959890286,"timestampFormatted":"2025-11-24T04:51:30.286Z"}
3121
+
3122
+ stdout | src/__tests__/integration.test.ts > Integration Tests > Nonce replay protection > should prevent nonce reuse
3123
+ [AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zjAI2CF-W_vlrVK9KEnwf75N7e854plUJ","environment":"development","userDidGeneration":"disabled"},"timestamp":1763959890286,"timestampFormatted":"2025-11-24T04:51:30.286Z"}
3124
+
3125
+ stdout | src/__tests__/integration.test.ts > Integration Tests > Error handling > should handle network errors gracefully
3126
+ [AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zhjc8ssmEczqtogcTaVpFseFBWDLYSwJJ","environment":"development","userDidGeneration":"disabled"},"timestamp":1763959890287,"timestampFormatted":"2025-11-24T04:51:30.287Z"}
3127
+
3128
+ stdout | src/__tests__/integration.test.ts > Integration Tests > Error handling > should handle malformed DID documents
3129
+ [AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:z2t_ZlIqyY_VrDE9A_P1IeklLjTbBruyz","environment":"development","userDidGeneration":"disabled"},"timestamp":1763959890287,"timestampFormatted":"2025-11-24T04:51:30.287Z"}
3130
+
3131
+ stdout | src/__tests__/integration.test.ts > Integration Tests > Debug endpoint > should provide debug information in development
3132
+ [AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zwTtrx-UaUY2QH8fMMhnPZIuuMZnbp1iS","environment":"development","userDidGeneration":"disabled"},"timestamp":1763959890287,"timestampFormatted":"2025-11-24T04:51:30.287Z"}
3133
+
3134
+ stdout | src/__tests__/integration.test.ts > Integration Tests > Debug endpoint > should be disabled in production
3135
+ [AUDIT] {"event":"runtime_initialized","data":{"did":"did:key:zB-W_1T5Wsp7UY_k-Dgft8V1l69NrHLz4","environment":"development","userDidGeneration":"disabled"},"timestamp":1763959890287,"timestampFormatted":"2025-11-24T04:51:30.287Z"}
3136
+
3137
+
3138
+  ❯ src/__tests__/identity/user-did-manager.test.ts [queued]
3139
+  ❯ src/__tests__/integration.test.ts 9/9
3140
+  ❯ src/__tests__/integration/full-flow.test.ts 0/21
3141
+  ❯ src/__tests__/runtime/delegation-flow.test.ts [queued]
3142
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
3143
+  ❯ src/__tests__/services/provider-resolver-edge-cases.test.ts [queued]
3144
+  ❯ src/__tests__/services/tool-protection-oauth-provider.test.ts 14/14
3145
+  ❯ src/compliance/__tests__/schema-verifier.test.ts 30/30
3146
+  ❯ src/config/__tests__/remote-config.spec.ts 9/9
3147
+  ❯ src/delegation/__tests__/bitstring.test.ts 30/30
3148
+  ❯ src/delegation/__tests__/delegation-graph.test.ts 0/28
3149
+  ❯ src/services/__tests__/oauth-provider-registry.test.ts [queued]
3150
+  ❯ src/services/__tests__/provider-resolver.test.ts [queued]
3151
+
3152
+  Test Files 24 passed (43)
3153
+  Tests 623 passed | 1 skipped (677)
3154
+  Start at 22:51:29
3155
+  Duration 946ms
3156
+ [?2026l[?2026hstderr | src/config/__tests__/remote-config.spec.ts > fetchRemoteConfig > Error handling > should return null if API request fails
3157
+ [RemoteConfig] API returned 404: Not Found
3158
+
3159
+ stderr | src/config/__tests__/remote-config.spec.ts > fetchRemoteConfig > Error handling > should return null if API throws error
3160
+ [RemoteConfig] Failed to fetch config: Error: Network error
3161
+ at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/config/__tests__/remote-config.spec.ts:170:35
3162
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
3163
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
3164
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
3165
+ at new Promise (<anonymous>)
3166
+ at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
3167
+ at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
3168
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
3169
+ at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
3170
+ at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
3171
+
3172
+ stderr | src/config/__tests__/remote-config.spec.ts > fetchRemoteConfig > Error handling > should return null if neither projectId nor agentDid provided
3173
+ [RemoteConfig] Neither projectId nor agentDid provided
3174
+
3175
+ stderr | src/config/__tests__/remote-config.spec.ts > fetchRemoteConfig > Error handling > should handle cache read errors gracefully
3176
+ [RemoteConfig] Cache read failed: Error: Cache error
3177
+ at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/config/__tests__/remote-config.spec.ts:198:50
3178
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
3179
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
3180
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
3181
+ at new Promise (<anonymous>)
3182
+ at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
3183
+ at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
3184
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
3185
+ at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
3186
+ at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
3187
+
3188
+
3189
+  ❯ src/__tests__/identity/user-did-manager.test.ts [queued]
3190
+  ❯ src/__tests__/integration.test.ts 9/9
3191
+  ❯ src/__tests__/integration/full-flow.test.ts 0/21
3192
+  ❯ src/__tests__/runtime/delegation-flow.test.ts [queued]
3193
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
3194
+  ❯ src/__tests__/services/provider-resolver-edge-cases.test.ts [queued]
3195
+  ❯ src/__tests__/services/tool-protection-oauth-provider.test.ts 14/14
3196
+  ❯ src/compliance/__tests__/schema-verifier.test.ts 30/30
3197
+  ❯ src/config/__tests__/remote-config.spec.ts 9/9
3198
+  ❯ src/delegation/__tests__/bitstring.test.ts 30/30
3199
+  ❯ src/delegation/__tests__/delegation-graph.test.ts 0/28
3200
+  ❯ src/services/__tests__/oauth-provider-registry.test.ts [queued]
3201
+  ❯ src/services/__tests__/provider-resolver.test.ts [queued]
3202
+
3203
+  Test Files 24 passed (43)
3204
+  Tests 623 passed | 1 skipped (677)
3205
+  Start at 22:51:29
3206
+  Duration 946ms
3207
+ [?2026l[?2026hstdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > AgentShield integration flow > should cache tool protection config
3208
+ [ToolProtectionService] Config loaded from API {
3209
+ source: 'api',
3210
+ toolCount: 1,
3211
+ protectedTools: [ 'tool1' ],
3212
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3213
+ projectId: 'test-project',
3214
+ cacheTtlMs: 300000,
3215
+ cacheExpiresAt: '2025-11-24T04:56:30.296Z'
3216
+ }
3217
+
3218
+
3219
+  ❯ src/__tests__/identity/user-did-manager.test.ts [queued]
3220
+  ❯ src/__tests__/integration.test.ts 9/9
3221
+  ❯ src/__tests__/integration/full-flow.test.ts 0/21
3222
+  ❯ src/__tests__/runtime/delegation-flow.test.ts [queued]
3223
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
3224
+  ❯ src/__tests__/services/provider-resolver-edge-cases.test.ts [queued]
3225
+  ❯ src/__tests__/services/tool-protection-oauth-provider.test.ts 14/14
3226
+  ❯ src/compliance/__tests__/schema-verifier.test.ts 30/30
3227
+  ❯ src/config/__tests__/remote-config.spec.ts 9/9
3228
+  ❯ src/delegation/__tests__/bitstring.test.ts 30/30
3229
+  ❯ src/delegation/__tests__/delegation-graph.test.ts 0/28
3230
+  ❯ src/services/__tests__/oauth-provider-registry.test.ts [queued]
3231
+  ❯ src/services/__tests__/provider-resolver.test.ts [queued]
3232
+
3233
+  Test Files 24 passed (43)
3234
+  Tests 623 passed | 1 skipped (677)
3235
+  Start at 22:51:29
3236
+  Duration 946ms
3237
+ [?2026l[?2026hstderr | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > AgentShield integration flow > should use fallback config when API fails
3238
+ [ToolProtectionService] API fetch failed, using fallback config { agentDid: 'did:key:z6MkhaXgBZDv...', error: 'Network error' }
3239
+
3240
+ stderr | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Error handling in full flow > should handle tool protection service errors gracefully
3241
+ [ToolProtectionService] API fetch failed, no fallback, failing closed (deny-all) {
3242
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3243
+ error: 'Network error',
3244
+ cacheKey: 'config:tool-protections:test-project'
3245
+ }
3246
+
3247
+ stderr | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Error handling in full flow > should handle network timeouts
3248
+ [ToolProtectionService] API fetch failed, using fallback config { agentDid: 'did:key:z6MkhaXgBZDv...', error: 'Network timeout' }
3249
+
3250
+
3251
+  ❯ src/__tests__/identity/user-did-manager.test.ts [queued]
3252
+  ❯ src/__tests__/integration.test.ts 9/9
3253
+  ❯ src/__tests__/integration/full-flow.test.ts 0/21
3254
+  ❯ src/__tests__/runtime/delegation-flow.test.ts [queued]
3255
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
3256
+  ❯ src/__tests__/services/provider-resolver-edge-cases.test.ts [queued]
3257
+  ❯ src/__tests__/services/tool-protection-oauth-provider.test.ts 14/14
3258
+  ❯ src/compliance/__tests__/schema-verifier.test.ts 30/30
3259
+  ❯ src/config/__tests__/remote-config.spec.ts 9/9
3260
+  ❯ src/delegation/__tests__/bitstring.test.ts 30/30
3261
+  ❯ src/delegation/__tests__/delegation-graph.test.ts 0/28
3262
+  ❯ src/services/__tests__/oauth-provider-registry.test.ts [queued]
3263
+  ❯ src/services/__tests__/provider-resolver.test.ts [queued]
3264
+
3265
+  Test Files 24 passed (43)
3266
+  Tests 623 passed | 1 skipped (677)
3267
+  Start at 22:51:29
3268
+  Duration 946ms
3269
+ [?2026l[?2026hstdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Cache integration in full flow > should share cache across multiple service instances
3270
+ [ToolProtectionService] Config loaded from API {
3271
+ source: 'api',
3272
+ toolCount: 1,
3273
+ protectedTools: [ 'tool1' ],
3274
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3275
+ projectId: 'test-project',
3276
+ cacheTtlMs: 300000,
3277
+ cacheExpiresAt: '2025-11-24T04:56:30.298Z'
3278
+ }
3279
+
3280
+ stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Cache integration in full flow > should clear cache when needed
3281
+ [ToolProtectionService] Config loaded from API {
3282
+ source: 'api',
3283
+ toolCount: 1,
3284
+ protectedTools: [ 'tool1' ],
3285
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3286
+ projectId: 'test-project',
3287
+ cacheTtlMs: 300000,
3288
+ cacheExpiresAt: '2025-11-24T04:56:30.298Z'
3289
+ }
3290
+
3291
+ stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Cache integration in full flow > should clear cache when needed
3292
+ [ToolProtectionService] Config loaded from API {
3293
+ source: 'api',
3294
+ toolCount: 1,
3295
+ protectedTools: [ 'tool1' ],
3296
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3297
+ projectId: 'test-project',
3298
+ cacheTtlMs: 300000,
3299
+ cacheExpiresAt: '2025-11-24T04:56:30.298Z'
3300
+ }
3301
+
3302
+ 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
3303
+ [ToolProtectionService] Config loaded from API {
3304
+ source: 'api',
3305
+ toolCount: 3,
3306
+ protectedTools: [ 'add_to_cart', 'checkout' ],
3307
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3308
+ projectId: 'test-project',
3309
+ cacheTtlMs: 300000,
3310
+ cacheExpiresAt: '2025-11-24T04:56:30.299Z'
3311
+ }
3312
+
3313
+ 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
3314
+ [ToolProtectionService] Protection check {
3315
+ tool: 'add_to_cart',
3316
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3317
+ found: true,
3318
+ isWildcard: false,
3319
+ requiresDelegation: true,
3320
+ availableTools: [ 'search_products', 'add_to_cart', 'checkout' ]
3321
+ }
3322
+
3323
+ stdout | src/__tests__/integration/full-flow.test.ts > Full Flow Integration > Concurrent operations > should handle concurrent cache operations
3324
+ [ToolProtectionService] Config loaded from API {
3325
+ source: 'api',
3326
+ toolCount: 1,
3327
+ protectedTools: [ 'tool1' ],
3328
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3329
+ projectId: 'test-project',
3330
+ cacheTtlMs: 300000,
3331
+ cacheExpiresAt: '2025-11-24T04:56:30.299Z'
3332
+ }
3333
+ [ToolProtectionService] Config loaded from API {
3334
+ source: 'api',
3335
+ toolCount: 1,
3336
+ protectedTools: [ 'tool1' ],
3337
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3338
+ projectId: 'test-project',
3339
+ cacheTtlMs: 300000,
3340
+ cacheExpiresAt: '2025-11-24T04:56:30.299Z'
3341
+ }
3342
+ [ToolProtectionService] Config loaded from API {
3343
+ source: 'api',
3344
+ toolCount: 1,
3345
+ protectedTools: [ 'tool1' ],
3346
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3347
+ projectId: 'test-project',
3348
+ cacheTtlMs: 300000,
3349
+ cacheExpiresAt: '2025-11-24T04:56:30.299Z'
3350
+ }
3351
+
3352
+ ✓ src/__tests__/integration.test.ts (9 tests) 10ms
3353
+ ✓ src/config/__tests__/remote-config.spec.ts (9 tests) 9ms
3354
+
3355
+  ❯ src/__tests__/identity/user-did-manager.test.ts [queued]
3356
+  ❯ src/__tests__/integration.test.ts 9/9
3357
+  ❯ src/__tests__/integration/full-flow.test.ts 0/21
3358
+  ❯ src/__tests__/runtime/delegation-flow.test.ts [queued]
3359
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
3360
+  ❯ src/__tests__/services/provider-resolver-edge-cases.test.ts [queued]
3361
+  ❯ src/__tests__/services/tool-protection-oauth-provider.test.ts 14/14
3362
+  ❯ src/compliance/__tests__/schema-verifier.test.ts 30/30
3363
+  ❯ src/config/__tests__/remote-config.spec.ts 9/9
3364
+  ❯ src/delegation/__tests__/bitstring.test.ts 30/30
3365
+  ❯ src/delegation/__tests__/delegation-graph.test.ts 0/28
3366
+  ❯ src/services/__tests__/oauth-provider-registry.test.ts [queued]
3367
+  ❯ src/services/__tests__/provider-resolver.test.ts [queued]
3368
+
3369
+  Test Files 24 passed (43)
3370
+  Tests 623 passed | 1 skipped (677)
3371
+  Start at 22:51:29
3372
+  Duration 946ms
3373
+ [?2026l[?2026h ✓ src/__tests__/integration/full-flow.test.ts (21 tests) 36ms
3374
+
3375
+  ❯ src/__tests__/identity/user-did-manager.test.ts 17/17
3376
+  ❯ src/__tests__/integration/full-flow.test.ts 21/21
3377
+  ❯ src/__tests__/providers/base.test.ts 0/14
3378
+  ❯ src/__tests__/runtime/delegation-flow.test.ts 1/4
3379
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
3380
+  ❯ src/__tests__/services/provider-resolver-edge-cases.test.ts 19/19
3381
+  ❯ src/config/__tests__/remote-config.spec.ts 9/9
3382
+  ❯ src/delegation/__tests__/delegation-graph.test.ts 28/28
3383
+  ❯ src/delegation/storage/__tests__/memory-graph-storage.test.ts [queued]
3384
+  ❯ src/delegation/storage/__tests__/memory-statuslist-storage.test.ts [queued]
3385
+  ❯ src/services/__tests__/batch-delegation.service.test.ts [queued]
3386
+  ❯ src/services/__tests__/provider-resolver.test.ts 8/8
3387
+
3388
+  Test Files 30 passed (43)
3389
+  Tests 725 passed | 2 skipped (748)
3390
+  Start at 22:51:29
3391
+  Duration 1.05s
3392
+ [?2026l[?2026hstderr | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Scope inference edge cases (Priority 2) > should handle empty scopes array
3393
+ [ProviderResolver] Tool does not specify oauthProvider. Using first configured provider "github" as fallback. This is deprecated - configure oauthProvider in AgentShield dashboard for Phase 2+.
3394
+
3395
+ 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)
3396
+ [ProviderResolver] Tool does not specify oauthProvider. Using first configured provider "github" as fallback. This is deprecated - configure oauthProvider in AgentShield dashboard for Phase 2+.
3397
+
3398
+
3399
+  ❯ src/__tests__/identity/user-did-manager.test.ts 17/17
3400
+  ❯ src/__tests__/integration/full-flow.test.ts 21/21
3401
+  ❯ src/__tests__/providers/base.test.ts 0/14
3402
+  ❯ src/__tests__/runtime/delegation-flow.test.ts 1/4
3403
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
3404
+  ❯ src/__tests__/services/provider-resolver-edge-cases.test.ts 19/19
3405
+  ❯ src/config/__tests__/remote-config.spec.ts 9/9
3406
+  ❯ src/delegation/__tests__/delegation-graph.test.ts 28/28
3407
+  ❯ src/delegation/storage/__tests__/memory-graph-storage.test.ts [queued]
3408
+  ❯ src/delegation/storage/__tests__/memory-statuslist-storage.test.ts [queued]
3409
+  ❯ src/services/__tests__/batch-delegation.service.test.ts [queued]
3410
+  ❯ src/services/__tests__/provider-resolver.test.ts 8/8
3411
+
3412
+  Test Files 30 passed (43)
3413
+  Tests 725 passed | 2 skipped (748)
3414
+  Start at 22:51:29
3415
+  Duration 1.05s
3416
+ [?2026l[?2026h ✓ src/delegation/__tests__/delegation-graph.test.ts (28 tests) 10ms
3417
+
3418
+  ❯ src/__tests__/identity/user-did-manager.test.ts 17/17
3419
+  ❯ src/__tests__/integration/full-flow.test.ts 21/21
3420
+  ❯ src/__tests__/providers/base.test.ts 0/14
3421
+  ❯ src/__tests__/runtime/delegation-flow.test.ts 1/4
3422
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
3423
+  ❯ src/__tests__/services/provider-resolver-edge-cases.test.ts 19/19
3424
+  ❯ src/config/__tests__/remote-config.spec.ts 9/9
3425
+  ❯ src/delegation/__tests__/delegation-graph.test.ts 28/28
3426
+  ❯ src/delegation/storage/__tests__/memory-graph-storage.test.ts [queued]
3427
+  ❯ src/delegation/storage/__tests__/memory-statuslist-storage.test.ts [queued]
3428
+  ❯ src/services/__tests__/batch-delegation.service.test.ts [queued]
3429
+  ❯ src/services/__tests__/provider-resolver.test.ts 8/8
3430
+
3431
+  Test Files 30 passed (43)
3432
+  Tests 725 passed | 2 skipped (748)
3433
+  Start at 22:51:29
3434
+  Duration 1.05s
3435
+ [?2026l[?2026hstderr | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Scope inference edge cases (Priority 2) > should handle unknown scope prefixes
3436
+ [ProviderResolver] Tool does not specify oauthProvider. Using first configured provider "github" as fallback. This is deprecated - configure oauthProvider in AgentShield dashboard for Phase 2+.
3437
+
3438
+
3439
+  ❯ src/__tests__/identity/user-did-manager.test.ts 17/17
3440
+  ❯ src/__tests__/integration/full-flow.test.ts 21/21
3441
+  ❯ src/__tests__/providers/base.test.ts 0/14
3442
+  ❯ src/__tests__/runtime/delegation-flow.test.ts 1/4
3443
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
3444
+  ❯ src/__tests__/services/provider-resolver-edge-cases.test.ts 19/19
3445
+  ❯ src/config/__tests__/remote-config.spec.ts 9/9
3446
+  ❯ src/delegation/__tests__/delegation-graph.test.ts 28/28
3447
+  ❯ src/delegation/storage/__tests__/memory-graph-storage.test.ts [queued]
3448
+  ❯ src/delegation/storage/__tests__/memory-statuslist-storage.test.ts [queued]
3449
+  ❯ src/services/__tests__/batch-delegation.service.test.ts [queued]
3450
+  ❯ src/services/__tests__/provider-resolver.test.ts 8/8
3451
+
3452
+  Test Files 30 passed (43)
3453
+  Tests 725 passed | 2 skipped (748)
3454
+  Start at 22:51:29
3455
+  Duration 1.05s
3456
+ [?2026l[?2026hstdout | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Scope inference edge cases (Priority 2) > should verify gmail → google mapping works
3457
+ [ProviderResolver] Inferred provider "google" from scopes
3458
+
3459
+ 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
3460
+ [ProviderResolver] Inferred provider "google" from scopes
3461
+
3462
+ 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
3463
+ [ProviderResolver] Inferred provider "microsoft" from scopes
3464
+
3465
+
3466
+  ❯ src/__tests__/identity/user-did-manager.test.ts 17/17
3467
+  ❯ src/__tests__/integration/full-flow.test.ts 21/21
3468
+  ❯ src/__tests__/providers/base.test.ts 0/14
3469
+  ❯ src/__tests__/runtime/delegation-flow.test.ts 1/4
3470
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
3471
+  ❯ src/__tests__/services/provider-resolver-edge-cases.test.ts 19/19
3472
+  ❯ src/config/__tests__/remote-config.spec.ts 9/9
3473
+  ❯ src/delegation/__tests__/delegation-graph.test.ts 28/28
3474
+  ❯ src/delegation/storage/__tests__/memory-graph-storage.test.ts [queued]
3475
+  ❯ src/delegation/storage/__tests__/memory-statuslist-storage.test.ts [queued]
3476
+  ❯ src/services/__tests__/batch-delegation.service.test.ts [queued]
3477
+  ❯ src/services/__tests__/provider-resolver.test.ts 8/8
3478
+
3479
+  Test Files 30 passed (43)
3480
+  Tests 725 passed | 2 skipped (748)
3481
+  Start at 22:51:29
3482
+  Duration 1.05s
3483
+ [?2026l[?2026hstderr | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Scope inference edge cases (Priority 2) > should handle scopes without colons
3484
+ [ProviderResolver] Tool does not specify oauthProvider. Using first configured provider "github" as fallback. This is deprecated - configure oauthProvider in AgentShield dashboard for Phase 2+.
3485
+
3486
+ 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
3487
+ [ProviderResolver] Tool does not specify oauthProvider. Using first configured provider "google" as fallback. This is deprecated - configure oauthProvider in AgentShield dashboard for Phase 2+.
3488
+
3489
+ stderr | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Fallback behavior (Priority 3) > should use first configured provider when oauthProvider not specified
3490
+ [ProviderResolver] Tool does not specify oauthProvider. Using first configured provider "github" as fallback. This is deprecated - configure oauthProvider in AgentShield dashboard for Phase 2+.
3491
+
3492
+
3493
+  ❯ src/__tests__/identity/user-did-manager.test.ts 17/17
3494
+  ❯ src/__tests__/integration/full-flow.test.ts 21/21
3495
+  ❯ src/__tests__/providers/base.test.ts 0/14
3496
+  ❯ src/__tests__/runtime/delegation-flow.test.ts 1/4
3497
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
3498
+  ❯ src/__tests__/services/provider-resolver-edge-cases.test.ts 19/19
3499
+  ❯ src/config/__tests__/remote-config.spec.ts 9/9
3500
+  ❯ src/delegation/__tests__/delegation-graph.test.ts 28/28
3501
+  ❯ src/delegation/storage/__tests__/memory-graph-storage.test.ts [queued]
3502
+  ❯ src/delegation/storage/__tests__/memory-statuslist-storage.test.ts [queued]
3503
+  ❯ src/services/__tests__/batch-delegation.service.test.ts [queued]
3504
+  ❯ src/services/__tests__/provider-resolver.test.ts 8/8
3505
+
3506
+  Test Files 30 passed (43)
3507
+  Tests 725 passed | 2 skipped (748)
3508
+  Start at 22:51:29
3509
+  Duration 1.05s
3510
+ [?2026l[?2026hstdout | src/__tests__/services/provider-resolver-edge-cases.test.ts > ProviderResolver - Edge Cases > Provider name case sensitivity > should handle provider names case-insensitively in inference
3511
+ [ProviderResolver] Inferred provider "github" from scopes
3512
+
3513
+ 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
3514
+ [ProviderResolver] Inferred provider "github" from scopes
3515
+
3516
+
3517
+  ❯ src/__tests__/identity/user-did-manager.test.ts 17/17
3518
+  ❯ src/__tests__/integration/full-flow.test.ts 21/21
3519
+  ❯ src/__tests__/providers/base.test.ts 0/14
3520
+  ❯ src/__tests__/runtime/delegation-flow.test.ts 1/4
3521
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
3522
+  ❯ src/__tests__/services/provider-resolver-edge-cases.test.ts 19/19
3523
+  ❯ src/config/__tests__/remote-config.spec.ts 9/9
3524
+  ❯ src/delegation/__tests__/delegation-graph.test.ts 28/28
3525
+  ❯ src/delegation/storage/__tests__/memory-graph-storage.test.ts [queued]
3526
+  ❯ src/delegation/storage/__tests__/memory-statuslist-storage.test.ts [queued]
3527
+  ❯ src/services/__tests__/batch-delegation.service.test.ts [queued]
3528
+  ❯ src/services/__tests__/provider-resolver.test.ts 8/8
3529
+
3530
+  Test Files 30 passed (43)
3531
+  Tests 725 passed | 2 skipped (748)
3532
+  Start at 22:51:29
3533
+  Duration 1.05s
3534
+ [?2026l[?2026hstderr | src/__tests__/identity/user-did-manager.test.ts > UserDidManager > error handling > should handle storage.get errors gracefully
3535
+ [UserDidManager] Storage.get failed, generating new DID: Error: Storage error
3536
+ at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/__tests__/identity/user-did-manager.test.ts:187:67
3537
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
3538
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
3539
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
3540
+ at new Promise (<anonymous>)
3541
+ at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
3542
+ at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
3543
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
3544
+ at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
3545
+ at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
3546
+
3547
+ stderr | src/__tests__/identity/user-did-manager.test.ts > UserDidManager > error handling > should handle storage.set errors gracefully
3548
+ [UserDidManager] Storage.set failed, continuing with cached DID: Error: Storage error
3549
+ at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/__tests__/identity/user-did-manager.test.ts:196:67
3550
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
3551
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
3552
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
3553
+ at new Promise (<anonymous>)
3554
+ at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
3555
+ at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
3556
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
3557
+ at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
3558
+ at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
3559
+
3560
+ stderr | src/__tests__/identity/user-did-manager.test.ts > UserDidManager > error handling > should handle storage.delete errors gracefully
3561
+ [UserDidManager] Storage.delete failed, continuing: Error: Storage error
3562
+ at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/mcp-i-core/src/__tests__/identity/user-did-manager.test.ts:206:70
3563
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
3564
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:20
3565
+
3566
+
3567
+  ❯ src/__tests__/identity/user-did-manager.test.ts 17/17
3568
+  ❯ src/__tests__/integration/full-flow.test.ts 21/21
3569
+  ❯ src/__tests__/providers/base.test.ts 0/14
3570
+  ❯ src/__tests__/runtime/delegation-flow.test.ts 1/4
3571
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
3572
+  ❯ src/__tests__/services/provider-resolver-edge-cases.test.ts 19/19
3573
+  ❯ src/config/__tests__/remote-config.spec.ts 9/9
3574
+  ❯ src/delegation/__tests__/delegation-graph.test.ts 28/28
3575
+  ❯ src/delegation/storage/__tests__/memory-graph-storage.test.ts [queued]
3576
+  ❯ src/delegation/storage/__tests__/memory-statuslist-storage.test.ts [queued]
3577
+  ❯ src/services/__tests__/batch-delegation.service.test.ts [queued]
3578
+  ❯ src/services/__tests__/provider-resolver.test.ts 8/8
3579
+
3580
+  Test Files 30 passed (43)
3581
+  Tests 725 passed | 2 skipped (748)
3582
+  Start at 22:51:29
3583
+  Duration 1.05s
3584
+ [?2026l[?2026hstdout | src/services/__tests__/provider-resolver.test.ts > ProviderResolver > resolveProvider - Priority 2: Scope inference > should infer provider from github scope prefix
3585
+ [ProviderResolver] Inferred provider "github" from scopes
3586
+
3587
+ stdout | src/services/__tests__/provider-resolver.test.ts > ProviderResolver > resolveProvider - Priority 2: Scope inference > should infer provider from gmail scope prefix (maps to google)
3588
+ [ProviderResolver] Inferred provider "google" from scopes
3589
+
3590
+
3591
+  ❯ src/__tests__/identity/user-did-manager.test.ts 17/17
3592
+  ❯ src/__tests__/integration/full-flow.test.ts 21/21
3593
+  ❯ src/__tests__/providers/base.test.ts 0/14
3594
+  ❯ src/__tests__/runtime/delegation-flow.test.ts 1/4
3595
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
3596
+  ❯ src/__tests__/services/provider-resolver-edge-cases.test.ts 19/19
3597
+  ❯ src/config/__tests__/remote-config.spec.ts 9/9
3598
+  ❯ src/delegation/__tests__/delegation-graph.test.ts 28/28
3599
+  ❯ src/delegation/storage/__tests__/memory-graph-storage.test.ts [queued]
3600
+  ❯ src/delegation/storage/__tests__/memory-statuslist-storage.test.ts [queued]
3601
+  ❯ src/services/__tests__/batch-delegation.service.test.ts [queued]
3602
+  ❯ src/services/__tests__/provider-resolver.test.ts 8/8
3603
+
3604
+  Test Files 30 passed (43)
3605
+  Tests 725 passed | 2 skipped (748)
3606
+  Start at 22:51:29
3607
+  Duration 1.05s
3608
+ [?2026l[?2026hstderr | src/services/__tests__/provider-resolver.test.ts > ProviderResolver > resolveProvider - Priority 2: Scope inference > should return null for ambiguous scopes
3609
+ [ProviderResolver] Tool does not specify oauthProvider. Using first configured provider "github" as fallback. This is deprecated - configure oauthProvider in AgentShield dashboard for Phase 2+.
3610
+
3611
+
3612
+  ❯ src/__tests__/identity/user-did-manager.test.ts 17/17
3613
+  ❯ src/__tests__/integration/full-flow.test.ts 21/21
3614
+  ❯ src/__tests__/providers/base.test.ts 0/14
3615
+  ❯ src/__tests__/runtime/delegation-flow.test.ts 1/4
3616
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
3617
+  ❯ src/__tests__/services/provider-resolver-edge-cases.test.ts 19/19
3618
+  ❯ src/config/__tests__/remote-config.spec.ts 9/9
3619
+  ❯ src/delegation/__tests__/delegation-graph.test.ts 28/28
3620
+  ❯ src/delegation/storage/__tests__/memory-graph-storage.test.ts [queued]
3621
+  ❯ src/delegation/storage/__tests__/memory-statuslist-storage.test.ts [queued]
3622
+  ❯ src/services/__tests__/batch-delegation.service.test.ts [queued]
3623
+  ❯ src/services/__tests__/provider-resolver.test.ts 8/8
3624
+
3625
+  Test Files 30 passed (43)
3626
+  Tests 725 passed | 2 skipped (748)
3627
+  Start at 22:51:29
3628
+  Duration 1.05s
3629
+ [?2026l[?2026h ✓ src/__tests__/identity/user-did-manager.test.ts (17 tests) 14ms
3630
+ ✓ src/services/__tests__/provider-resolver.test.ts (8 tests) 8ms
3631
+ ✓ src/__tests__/services/provider-resolver-edge-cases.test.ts (19 tests | 1 skipped) 10ms
3632
+ ✓ src/services/__tests__/oauth-provider-registry.test.ts (9 tests) 4ms
3633
+
3634
+  ❯ src/__tests__/identity/user-did-manager.test.ts 17/17
3635
+  ❯ src/__tests__/integration/full-flow.test.ts 21/21
3636
+  ❯ src/__tests__/providers/base.test.ts 0/14
3637
+  ❯ src/__tests__/runtime/delegation-flow.test.ts 1/4
3638
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
3639
+  ❯ src/__tests__/services/provider-resolver-edge-cases.test.ts 19/19
3640
+  ❯ src/config/__tests__/remote-config.spec.ts 9/9
3641
+  ❯ src/delegation/__tests__/delegation-graph.test.ts 28/28
3642
+  ❯ src/delegation/storage/__tests__/memory-graph-storage.test.ts [queued]
3643
+  ❯ src/delegation/storage/__tests__/memory-statuslist-storage.test.ts [queued]
3644
+  ❯ src/services/__tests__/batch-delegation.service.test.ts [queued]
3645
+  ❯ src/services/__tests__/provider-resolver.test.ts 8/8
3646
+
3647
+  Test Files 30 passed (43)
3648
+  Tests 725 passed | 2 skipped (748)
3649
+  Start at 22:51:29
3650
+  Duration 1.05s
3651
+ [?2026l[?2026h ✓ src/__tests__/runtime/delegation-flow.test.ts (4 tests) 4ms
3652
+ ✓ src/__tests__/providers/base.test.ts (14 tests) 12ms
3653
+ ✓ src/delegation/storage/__tests__/memory-statuslist-storage.test.ts (14 tests) 10ms
3654
+ ✓ src/delegation/storage/__tests__/memory-graph-storage.test.ts (27 tests) 18ms
3655
+
3656
+
3657
+
3658
+  ❯ src/__tests__/config/provider-runtime-config.test.ts [queued]
3659
+  ❯ src/__tests__/runtime/audit-logger.test.ts [queued]
3660
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
3661
+  ❯ src/__tests__/services/provider-resolver-edge-cases.test.ts 19/19
3662
+  ❯ src/delegation/__tests__/utils.test.ts 0/28
3663
+  ❯ src/services/__tests__/batch-delegation.service.test.ts 0/11
3664
+  ❯ src/services/__tests__/provider-resolver.test.ts 8/8
3665
+  ❯ src/utils/__tests__/did-helpers.test.ts [queued]
3666
+
3667
+  Test Files 34 passed (43)
3668
+  Tests 783 passed | 2 skipped (828)
3669
+  Start at 22:51:29
3670
+  Duration 1.15s
3671
+ [?2026l[?2026h ✓ src/services/__tests__/batch-delegation.service.test.ts (11 tests) 4ms
3672
+ ✓ src/delegation/__tests__/utils.test.ts (28 tests) 3ms
3673
+ ✓ src/__tests__/config/provider-runtime-config.test.ts (9 tests) 4ms
3674
+ ✓ src/__tests__/runtime/audit-logger.test.ts (9 tests) 6ms
3675
+ ✓ src/utils/__tests__/did-helpers.test.ts (11 tests) 3ms
3676
+ ✓ src/delegation/__tests__/audience-validator.test.ts (5 tests) 1ms
3677
+
3678
+
3679
+
3680
+
3681
+
3682
+  ❯ src/__tests__/delegation-e2e.test.ts [queued]
3683
+  ❯ src/__tests__/index.test.ts 0/4
3684
+  ❯ src/__tests__/services/agentshield-integration.test.ts 26/30
3685
+
3686
+  Test Files 40 passed (43)
3687
+  Tests 856 passed | 2 skipped (866)
3688
+  Start at 22:51:29
3689
+  Duration 1.35s
3690
+ [?2026l[?2026h ↓ src/__tests__/delegation-e2e.test.ts (14 tests | 14 skipped)
3691
+ ✓ src/__tests__/index.test.ts (4 tests) 2ms
3692
+ stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Caching Integration > should respect cache TTL
3693
+ [ToolProtectionService] Config loaded from API {
3694
+ source: 'api',
3695
+ toolCount: 0,
3696
+ protectedTools: [],
3697
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3698
+ projectId: 'test-project-123',
3699
+ cacheTtlMs: 1000,
3700
+ cacheExpiresAt: '2025-11-24T04:51:31.881Z'
3701
+ }
3702
+
3703
+ stdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Real-world Scenarios > should handle typical e-commerce tool protection config
3704
+ [ToolProtectionService] Config loaded from API {
3705
+ source: 'api',
3706
+ toolCount: 4,
3707
+ protectedTools: [ 'add_to_cart', 'checkout' ],
3708
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3709
+ projectId: 'test-project-123',
3710
+ cacheTtlMs: 300000,
3711
+ cacheExpiresAt: '2025-11-24T04:56:30.882Z'
3712
+ }
3713
+
3714
+
3715
+
3716
+  ❯ src/__tests__/services/agentshield-integration.test.ts 27/30
3717
+
3718
+  Test Files 41 passed | 1 skipped (43)
3719
+  Tests 861 passed | 16 skipped (880)
3720
+  Start at 22:51:29
3721
+  Duration 1.45s
3722
+ [?2026l[?2026hstderr | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Real-world Scenarios > should handle API rate limiting gracefully
3723
+ [ToolProtectionService] API fetch failed, using fallback config {
3724
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3725
+ error: 'Failed to fetch bouncer config: 429 Too Many Requests - Rate limit exceeded'
3726
+ }
3727
+
3728
+
3729
+  ❯ src/__tests__/services/agentshield-integration.test.ts 27/30
3730
+
3731
+  Test Files 41 passed | 1 skipped (43)
3732
+  Tests 861 passed | 16 skipped (880)
3733
+  Start at 22:51:29
3734
+  Duration 1.45s
3735
+ [?2026l[?2026hstdout | src/__tests__/services/agentshield-integration.test.ts > AgentShield Integration > Real-world Scenarios > should handle concurrent requests
3736
+ [ToolProtectionService] Config loaded from API {
3737
+ source: 'api',
3738
+ toolCount: 1,
3739
+ protectedTools: [ 'tool1' ],
3740
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3741
+ projectId: 'test-project-123',
3742
+ cacheTtlMs: 300000,
3743
+ cacheExpiresAt: '2025-11-24T04:56:30.882Z'
3744
+ }
3745
+ [ToolProtectionService] Config loaded from API {
3746
+ source: 'api',
3747
+ toolCount: 1,
3748
+ protectedTools: [ 'tool1' ],
3749
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3750
+ projectId: 'test-project-123',
3751
+ cacheTtlMs: 300000,
3752
+ cacheExpiresAt: '2025-11-24T04:56:30.882Z'
3753
+ }
3754
+ [ToolProtectionService] Config loaded from API {
3755
+ source: 'api',
3756
+ toolCount: 1,
3757
+ protectedTools: [ 'tool1' ],
3758
+ agentDid: 'did:key:z6MkhaXgBZDv...',
3759
+ projectId: 'test-project-123',
3760
+ cacheTtlMs: 300000,
3761
+ cacheExpiresAt: '2025-11-24T04:56:30.882Z'
3762
+ }
3763
+
3764
+
3765
+  ❯ src/__tests__/services/agentshield-integration.test.ts 27/30
3766
+
3767
+  Test Files 41 passed | 1 skipped (43)
3768
+  Tests 861 passed | 16 skipped (880)
3769
+  Start at 22:51:29
3770
+  Duration 1.45s
3771
+ [?2026l ✓ src/__tests__/services/agentshield-integration.test.ts (30 tests) 1114ms
3772
+ ✓ should respect cache TTL  1101ms
3773
+
3774
+  Test Files  42 passed | 1 skipped (43)
3775
+  Tests  864 passed | 16 skipped (880)
3776
+  Start at  22:51:29
3777
+  Duration  1.65s (transform 3.49s, setup 0ms, collect 5.85s, tests 2.15s, environment 5ms, prepare 1.01s)
3778
+
3779
+  % Coverage report from v8
3780
+
3781
+ =============================== Coverage summary ===============================
3782
+ Statements : 65.44% ( 1553/2373 )
3783
+ Branches : 59.97% ( 959/1599 )
3784
+ Functions : 64.03% ( 251/392 )
3785
+ Lines : 65.35% ( 1513/2315 )
3786
+ ================================================================================
3787
+ [?25h