@casys/mcp-server 0.27.0 → 0.27.1

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 (253) hide show
  1. package/CHANGELOG.md +6 -1770
  2. package/README.md +10 -638
  3. package/esm/mod.d.ts +1 -102
  4. package/esm/mod.js +1 -103
  5. package/package.json +17 -25
  6. package/esm/_dnt.polyfills.d.ts +0 -12
  7. package/esm/_dnt.polyfills.d.ts.map +0 -1
  8. package/esm/_dnt.polyfills.js +0 -15
  9. package/esm/_dnt.shims.d.ts +0 -2
  10. package/esm/_dnt.shims.d.ts.map +0 -1
  11. package/esm/_dnt.shims.js +0 -57
  12. package/esm/deps/jsr.io/@std/yaml/1.2.0/_chars.d.ts +0 -33
  13. package/esm/deps/jsr.io/@std/yaml/1.2.0/_chars.d.ts.map +0 -1
  14. package/esm/deps/jsr.io/@std/yaml/1.2.0/_chars.js +0 -48
  15. package/esm/deps/jsr.io/@std/yaml/1.2.0/_dumper_state.d.ts +0 -106
  16. package/esm/deps/jsr.io/@std/yaml/1.2.0/_dumper_state.d.ts.map +0 -1
  17. package/esm/deps/jsr.io/@std/yaml/1.2.0/_dumper_state.js +0 -636
  18. package/esm/deps/jsr.io/@std/yaml/1.2.0/_loader_state.d.ts +0 -67
  19. package/esm/deps/jsr.io/@std/yaml/1.2.0/_loader_state.d.ts.map +0 -1
  20. package/esm/deps/jsr.io/@std/yaml/1.2.0/_loader_state.js +0 -1393
  21. package/esm/deps/jsr.io/@std/yaml/1.2.0/_schema.d.ts +0 -44
  22. package/esm/deps/jsr.io/@std/yaml/1.2.0/_schema.d.ts.map +0 -1
  23. package/esm/deps/jsr.io/@std/yaml/1.2.0/_schema.js +0 -117
  24. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/binary.d.ts +0 -3
  25. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/binary.d.ts.map +0 -1
  26. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/binary.js +0 -103
  27. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/bool.d.ts +0 -3
  28. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/bool.d.ts.map +0 -1
  29. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/bool.js +0 -32
  30. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/float.d.ts +0 -3
  31. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/float.d.ts.map +0 -1
  32. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/float.js +0 -96
  33. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/int.d.ts +0 -3
  34. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/int.d.ts.map +0 -1
  35. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/int.js +0 -159
  36. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/map.d.ts +0 -3
  37. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/map.d.ts.map +0 -1
  38. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/map.js +0 -14
  39. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/merge.d.ts +0 -3
  40. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/merge.d.ts.map +0 -1
  41. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/merge.js +0 -10
  42. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/nil.d.ts +0 -3
  43. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/nil.d.ts.map +0 -1
  44. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/nil.js +0 -22
  45. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/omap.d.ts +0 -3
  46. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/omap.d.ts.map +0 -1
  47. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/omap.js +0 -29
  48. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/pairs.d.ts +0 -3
  49. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/pairs.d.ts.map +0 -1
  50. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/pairs.js +0 -19
  51. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/regexp.d.ts +0 -3
  52. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/regexp.d.ts.map +0 -1
  53. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/regexp.js +0 -30
  54. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/seq.d.ts +0 -3
  55. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/seq.d.ts.map +0 -1
  56. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/seq.js +0 -10
  57. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/set.d.ts +0 -3
  58. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/set.d.ts.map +0 -1
  59. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/set.js +0 -14
  60. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/str.d.ts +0 -3
  61. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/str.d.ts.map +0 -1
  62. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/str.js +0 -9
  63. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/timestamp.d.ts +0 -3
  64. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/timestamp.d.ts.map +0 -1
  65. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/timestamp.js +0 -81
  66. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/undefined.d.ts +0 -3
  67. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/undefined.d.ts.map +0 -1
  68. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/undefined.js +0 -20
  69. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type.d.ts +0 -32
  70. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type.d.ts.map +0 -1
  71. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type.js +0 -6
  72. package/esm/deps/jsr.io/@std/yaml/1.2.0/_utils.d.ts +0 -4
  73. package/esm/deps/jsr.io/@std/yaml/1.2.0/_utils.d.ts.map +0 -1
  74. package/esm/deps/jsr.io/@std/yaml/1.2.0/_utils.js +0 -13
  75. package/esm/deps/jsr.io/@std/yaml/1.2.0/mod.d.ts +0 -51
  76. package/esm/deps/jsr.io/@std/yaml/1.2.0/mod.d.ts.map +0 -1
  77. package/esm/deps/jsr.io/@std/yaml/1.2.0/mod.js +0 -53
  78. package/esm/deps/jsr.io/@std/yaml/1.2.0/parse.d.ts +0 -79
  79. package/esm/deps/jsr.io/@std/yaml/1.2.0/parse.d.ts.map +0 -1
  80. package/esm/deps/jsr.io/@std/yaml/1.2.0/parse.js +0 -91
  81. package/esm/deps/jsr.io/@std/yaml/1.2.0/stringify.d.ts +0 -100
  82. package/esm/deps/jsr.io/@std/yaml/1.2.0/stringify.d.ts.map +0 -1
  83. package/esm/deps/jsr.io/@std/yaml/1.2.0/stringify.js +0 -33
  84. package/esm/deps/jsr.io/@std/yaml/1.2.0/types.d.ts +0 -111
  85. package/esm/deps/jsr.io/@std/yaml/1.2.0/types.d.ts.map +0 -1
  86. package/esm/deps/jsr.io/@std/yaml/1.2.0/types.js +0 -104
  87. package/esm/mod.d.ts.map +0 -1
  88. package/esm/package.json +0 -3
  89. package/esm/src/auth/as-metadata-proxy.d.ts +0 -112
  90. package/esm/src/auth/as-metadata-proxy.d.ts.map +0 -1
  91. package/esm/src/auth/as-metadata-proxy.js +0 -171
  92. package/esm/src/auth/config.d.ts +0 -117
  93. package/esm/src/auth/config.d.ts.map +0 -1
  94. package/esm/src/auth/config.js +0 -219
  95. package/esm/src/auth/jwt-provider.d.ts +0 -157
  96. package/esm/src/auth/jwt-provider.d.ts.map +0 -1
  97. package/esm/src/auth/jwt-provider.js +0 -187
  98. package/esm/src/auth/middleware.d.ts +0 -61
  99. package/esm/src/auth/middleware.d.ts.map +0 -1
  100. package/esm/src/auth/middleware.js +0 -209
  101. package/esm/src/auth/mod.d.ts +0 -23
  102. package/esm/src/auth/mod.d.ts.map +0 -1
  103. package/esm/src/auth/mod.js +0 -27
  104. package/esm/src/auth/multi-tenant-middleware.d.ts +0 -131
  105. package/esm/src/auth/multi-tenant-middleware.d.ts.map +0 -1
  106. package/esm/src/auth/multi-tenant-middleware.js +0 -128
  107. package/esm/src/auth/presets.d.ts +0 -231
  108. package/esm/src/auth/presets.d.ts.map +0 -1
  109. package/esm/src/auth/presets.js +0 -223
  110. package/esm/src/auth/provider.d.ts +0 -47
  111. package/esm/src/auth/provider.d.ts.map +0 -1
  112. package/esm/src/auth/provider.js +0 -34
  113. package/esm/src/auth/scope-middleware.d.ts +0 -30
  114. package/esm/src/auth/scope-middleware.d.ts.map +0 -1
  115. package/esm/src/auth/scope-middleware.js +0 -48
  116. package/esm/src/auth/static-token-provider.d.ts +0 -155
  117. package/esm/src/auth/static-token-provider.d.ts.map +0 -1
  118. package/esm/src/auth/static-token-provider.js +0 -256
  119. package/esm/src/auth/types.d.ts +0 -151
  120. package/esm/src/auth/types.d.ts.map +0 -1
  121. package/esm/src/auth/types.js +0 -64
  122. package/esm/src/client-auth/callback-server.d.ts +0 -34
  123. package/esm/src/client-auth/callback-server.d.ts.map +0 -1
  124. package/esm/src/client-auth/callback-server.js +0 -141
  125. package/esm/src/client-auth/client-id-metadata.d.ts +0 -29
  126. package/esm/src/client-auth/client-id-metadata.d.ts.map +0 -1
  127. package/esm/src/client-auth/client-id-metadata.js +0 -149
  128. package/esm/src/client-auth/connect.d.ts +0 -32
  129. package/esm/src/client-auth/connect.d.ts.map +0 -1
  130. package/esm/src/client-auth/connect.js +0 -47
  131. package/esm/src/client-auth/mod.d.ts +0 -19
  132. package/esm/src/client-auth/mod.d.ts.map +0 -1
  133. package/esm/src/client-auth/mod.js +0 -19
  134. package/esm/src/client-auth/provider.d.ts +0 -78
  135. package/esm/src/client-auth/provider.d.ts.map +0 -1
  136. package/esm/src/client-auth/provider.js +0 -246
  137. package/esm/src/client-auth/token-store/file-store.d.ts +0 -20
  138. package/esm/src/client-auth/token-store/file-store.d.ts.map +0 -1
  139. package/esm/src/client-auth/token-store/file-store.js +0 -62
  140. package/esm/src/client-auth/token-store/memory-store.d.ts +0 -14
  141. package/esm/src/client-auth/token-store/memory-store.d.ts.map +0 -1
  142. package/esm/src/client-auth/token-store/memory-store.js +0 -25
  143. package/esm/src/client-auth/types.d.ts +0 -89
  144. package/esm/src/client-auth/types.d.ts.map +0 -1
  145. package/esm/src/client-auth/types.js +0 -10
  146. package/esm/src/concurrency/rate-limiter.d.ts +0 -87
  147. package/esm/src/concurrency/rate-limiter.d.ts.map +0 -1
  148. package/esm/src/concurrency/rate-limiter.js +0 -165
  149. package/esm/src/concurrency/request-queue.d.ts +0 -71
  150. package/esm/src/concurrency/request-queue.d.ts.map +0 -1
  151. package/esm/src/concurrency/request-queue.js +0 -128
  152. package/esm/src/http/body.d.ts +0 -20
  153. package/esm/src/http/body.d.ts.map +0 -1
  154. package/esm/src/http/body.js +0 -63
  155. package/esm/src/http/request-guards.d.ts +0 -54
  156. package/esm/src/http/request-guards.d.ts.map +0 -1
  157. package/esm/src/http/request-guards.js +0 -114
  158. package/esm/src/http/wire.d.ts +0 -26
  159. package/esm/src/http/wire.d.ts.map +0 -1
  160. package/esm/src/http/wire.js +0 -35
  161. package/esm/src/inspector/launcher.d.ts +0 -48
  162. package/esm/src/inspector/launcher.d.ts.map +0 -1
  163. package/esm/src/inspector/launcher.js +0 -100
  164. package/esm/src/mcp-app.d.ts +0 -728
  165. package/esm/src/mcp-app.d.ts.map +0 -1
  166. package/esm/src/mcp-app.js +0 -3530
  167. package/esm/src/middleware/backpressure.d.ts +0 -24
  168. package/esm/src/middleware/backpressure.d.ts.map +0 -1
  169. package/esm/src/middleware/backpressure.js +0 -31
  170. package/esm/src/middleware/mod.d.ts +0 -11
  171. package/esm/src/middleware/mod.d.ts.map +0 -1
  172. package/esm/src/middleware/mod.js +0 -11
  173. package/esm/src/middleware/rate-limit.d.ts +0 -22
  174. package/esm/src/middleware/rate-limit.d.ts.map +0 -1
  175. package/esm/src/middleware/rate-limit.js +0 -33
  176. package/esm/src/middleware/runner.d.ts +0 -32
  177. package/esm/src/middleware/runner.d.ts.map +0 -1
  178. package/esm/src/middleware/runner.js +0 -49
  179. package/esm/src/middleware/types.d.ts +0 -76
  180. package/esm/src/middleware/types.d.ts.map +0 -1
  181. package/esm/src/middleware/types.js +0 -9
  182. package/esm/src/middleware/validation.d.ts +0 -24
  183. package/esm/src/middleware/validation.d.ts.map +0 -1
  184. package/esm/src/middleware/validation.js +0 -30
  185. package/esm/src/mrtr/capability-check.d.ts +0 -75
  186. package/esm/src/mrtr/capability-check.d.ts.map +0 -1
  187. package/esm/src/mrtr/capability-check.js +0 -233
  188. package/esm/src/mrtr/mod.d.ts +0 -18
  189. package/esm/src/mrtr/mod.d.ts.map +0 -1
  190. package/esm/src/mrtr/mod.js +0 -12
  191. package/esm/src/mrtr/replay-store.d.ts +0 -50
  192. package/esm/src/mrtr/replay-store.d.ts.map +0 -1
  193. package/esm/src/mrtr/replay-store.js +0 -61
  194. package/esm/src/mrtr/request-state.d.ts +0 -181
  195. package/esm/src/mrtr/request-state.d.ts.map +0 -1
  196. package/esm/src/mrtr/request-state.js +0 -313
  197. package/esm/src/mrtr/retry-guard.d.ts +0 -61
  198. package/esm/src/mrtr/retry-guard.d.ts.map +0 -1
  199. package/esm/src/mrtr/retry-guard.js +0 -53
  200. package/esm/src/mrtr/types.d.ts +0 -99
  201. package/esm/src/mrtr/types.d.ts.map +0 -1
  202. package/esm/src/mrtr/types.js +0 -14
  203. package/esm/src/observability/metrics.d.ts +0 -104
  204. package/esm/src/observability/metrics.d.ts.map +0 -1
  205. package/esm/src/observability/metrics.js +0 -207
  206. package/esm/src/observability/mod.d.ts +0 -12
  207. package/esm/src/observability/mod.d.ts.map +0 -1
  208. package/esm/src/observability/mod.js +0 -11
  209. package/esm/src/observability/otel.d.ts +0 -73
  210. package/esm/src/observability/otel.d.ts.map +0 -1
  211. package/esm/src/observability/otel.js +0 -260
  212. package/esm/src/runtime/runtime.d.ts +0 -10
  213. package/esm/src/runtime/runtime.d.ts.map +0 -1
  214. package/esm/src/runtime/runtime.deno.d.ts +0 -50
  215. package/esm/src/runtime/runtime.deno.d.ts.map +0 -1
  216. package/esm/src/runtime/runtime.deno.js +0 -120
  217. package/esm/src/runtime/runtime.js +0 -41
  218. package/esm/src/runtime/runtime.node.d.ts +0 -51
  219. package/esm/src/runtime/runtime.node.d.ts.map +0 -1
  220. package/esm/src/runtime/runtime.node.js +0 -268
  221. package/esm/src/runtime/types.d.ts +0 -107
  222. package/esm/src/runtime/types.d.ts.map +0 -1
  223. package/esm/src/runtime/types.js +0 -12
  224. package/esm/src/security/channel-hmac.d.ts +0 -43
  225. package/esm/src/security/channel-hmac.d.ts.map +0 -1
  226. package/esm/src/security/channel-hmac.js +0 -135
  227. package/esm/src/security/csp.d.ts +0 -50
  228. package/esm/src/security/csp.d.ts.map +0 -1
  229. package/esm/src/security/csp.js +0 -63
  230. package/esm/src/security/message-signer.d.ts +0 -88
  231. package/esm/src/security/message-signer.d.ts.map +0 -1
  232. package/esm/src/security/message-signer.js +0 -166
  233. package/esm/src/subscriptions/subscription-registry.d.ts +0 -256
  234. package/esm/src/subscriptions/subscription-registry.d.ts.map +0 -1
  235. package/esm/src/subscriptions/subscription-registry.js +0 -406
  236. package/esm/src/tasks/mod.d.ts +0 -13
  237. package/esm/src/tasks/mod.d.ts.map +0 -1
  238. package/esm/src/tasks/mod.js +0 -11
  239. package/esm/src/tasks/task-store.d.ts +0 -342
  240. package/esm/src/tasks/task-store.d.ts.map +0 -1
  241. package/esm/src/tasks/task-store.js +0 -649
  242. package/esm/src/transport/request-headers.d.ts +0 -145
  243. package/esm/src/transport/request-headers.d.ts.map +0 -1
  244. package/esm/src/transport/request-headers.js +0 -525
  245. package/esm/src/types.d.ts +0 -776
  246. package/esm/src/types.d.ts.map +0 -1
  247. package/esm/src/types.js +0 -92
  248. package/esm/src/ui/viewer-utils.d.ts +0 -45
  249. package/esm/src/ui/viewer-utils.d.ts.map +0 -1
  250. package/esm/src/ui/viewer-utils.js +0 -97
  251. package/esm/src/validation/schema-validator.d.ts +0 -115
  252. package/esm/src/validation/schema-validator.d.ts.map +0 -1
  253. package/esm/src/validation/schema-validator.js +0 -249
@@ -1,246 +0,0 @@
1
- /**
2
- * OAuth client provider implementation.
3
- *
4
- * Implements OAuthClientProvider from the MCP SDK for authenticating
5
- * against OAuth-protected MCP servers. Handles token storage,
6
- * PKCE flow, and browser-based authorization.
7
- *
8
- * @module lib/server/client-auth/provider
9
- */
10
- import { CimdConfigError, isCimdConfig, resolveClientMode, validateCimdClientConfig, } from "./client-id-metadata.js";
11
- /**
12
- * Normalise an authorization server identifier before comparing it.
13
- *
14
- * `https://as.example.com` and `https://as.example.com/` name the same server,
15
- * and so do `HTTPS://AS.Example.com` and an explicit `:443`. Comparing raw
16
- * strings would read those as a server change and wipe valid credentials on
17
- * every call — a self-inflicted login loop. Falls back to the raw string if it
18
- * does not parse, which then simply never matches.
19
- */
20
- function canonicalIssuer(value) {
21
- try {
22
- return new URL(value).href;
23
- }
24
- catch {
25
- return value;
26
- }
27
- }
28
- /**
29
- * An authorization server URL, safe to put in a log line.
30
- *
31
- * A URL may carry `userinfo` credentials, and a query string may carry a token
32
- * or an internal identifier. Origin and path are enough to tell an operator
33
- * which server is involved; the rest is only a way for secrets to reach a log
34
- * aggregator.
35
- */
36
- function redactUrl(value) {
37
- try {
38
- const url = new URL(value);
39
- return `${url.origin}${url.pathname}`;
40
- }
41
- catch {
42
- return "<unparseable url>";
43
- }
44
- }
45
- export class OAuthClientProviderImpl {
46
- serverUrl;
47
- config;
48
- _codeVerifier = "";
49
- _clientInfo;
50
- _redirectUrl;
51
- /**
52
- * Issuer the SDK resolved for the request currently being authorized
53
- * (SEP-2352). Set by {@link saveDiscoveryState}, which `auth()` calls after
54
- * discovery and before it asks for tokens.
55
- */
56
- _currentIssuer;
57
- constructor(serverUrl, config) {
58
- const mode = resolveClientMode(config);
59
- if (mode === "client_id_metadata") {
60
- validateCimdClientConfig(config);
61
- }
62
- this.serverUrl = serverUrl;
63
- this.config = config;
64
- }
65
- get redirectUrl() {
66
- if (isCimdConfig(this.config)) {
67
- return this.config.clientRegistration.redirectUri;
68
- }
69
- return this._redirectUrl ?? "http://localhost:0/callback";
70
- }
71
- /** Set the redirect URL (called after CallbackServer binds to a port). */
72
- setRedirectUrl(url) {
73
- if (isCimdConfig(this.config)) {
74
- if (url !== this.config.clientRegistration.redirectUri) {
75
- throw new CimdConfigError("cimd_redirect_mismatch", "CIMD redirectUrl cannot differ from configured redirectUri", {
76
- redirectUrl: url,
77
- configuredRedirectUri: this.config.clientRegistration.redirectUri,
78
- }, "Use clientRegistration.redirectUri as the runtime redirect URL.");
79
- }
80
- return;
81
- }
82
- this._redirectUrl = url;
83
- }
84
- get clientMetadata() {
85
- return {
86
- client_name: this.config.clientName ?? "PML Client",
87
- redirect_uris: [String(this.redirectUrl)],
88
- grant_types: ["authorization_code", "refresh_token"],
89
- response_types: ["code"],
90
- token_endpoint_auth_method: "none", // public client, PKCE only
91
- application_type: "native", // loopback CLI/desktop — prevents AS rejection of http://127.0.0.1 redirects
92
- };
93
- }
94
- clientInformation() {
95
- if (isCimdConfig(this.config)) {
96
- return Promise.resolve({
97
- client_id: this.config.clientRegistration.clientIdMetadataUrl,
98
- });
99
- }
100
- return Promise.resolve(this._clientInfo ?? {
101
- client_id: this.config.clientId,
102
- });
103
- }
104
- saveClientInformation(info) {
105
- this._clientInfo = info;
106
- return Promise.resolve();
107
- }
108
- /**
109
- * Record the authorization server the SDK just resolved (SEP-2352).
110
- *
111
- * `auth()` calls this after RFC 9728 discovery and before {@link tokens},
112
- * which is what makes the check there possible.
113
- *
114
- * The binding is the **discovered URL**, not `metadata.issuer`. That
115
- * distinction is the whole protection: `issuer` is a field the authorization
116
- * server publishes about itself, so an attacker's server reached at
117
- * `https://attacker.example.com` can claim
118
- * `issuer: "https://as-one.example.com"` and, since SDK 1.29 validates the
119
- * metadata's shape without checking it against the URL it was fetched from,
120
- * would be handed the credentials minted by the real AS-one. The URL the
121
- * client actually resolved is the one thing in this exchange the server
122
- * cannot forge.
123
- *
124
- * RFC 8414 does require `issuer` to match the discovery URL. A mismatch is
125
- * therefore a broken or hostile authorization server, and it is logged —
126
- * but nothing here depends on the claim being honest.
127
- */
128
- saveDiscoveryState(state) {
129
- const resolved = canonicalIssuer(state.authorizationServerUrl);
130
- const claimed = state.authorizationServerMetadata?.issuer;
131
- if (claimed !== undefined && canonicalIssuer(claimed) !== resolved) {
132
- this.log(`authorization server at ${redactUrl(state.authorizationServerUrl)} ` +
133
- `claims issuer "${redactUrl(claimed)}" ` +
134
- "(RFC 8414 requires them to match); " +
135
- "binding credentials to the discovered URL");
136
- }
137
- this._currentIssuer = resolved;
138
- return Promise.resolve();
139
- }
140
- /**
141
- * Stored tokens, unless they were issued by a different authorization server.
142
- *
143
- * SEP-2352 makes this a MUST, and the reason is concrete rather than
144
- * bureaucratic. `auth()` hands whatever this returns to
145
- * `refreshAuthorization(authorizationServerUrl, …)`, where the URL comes from
146
- * the MCP server's own protected-resource metadata. A server that changes —
147
- * or is made to advertise — a different authorization server would therefore
148
- * receive a refresh token minted by the previous one. The client must not let
149
- * the resource server pick who sees its credentials.
150
- *
151
- * The check only runs once an issuer is known, which is the case inside
152
- * `auth()`. A transport asking for the bearer to attach to an ordinary
153
- * request has no issuer in hand, and that path is not the exposure: those
154
- * tokens go to the MCP server they were minted for, not to an authorization
155
- * server.
156
- */
157
- async tokens() {
158
- const stored = await this.config.tokenStore.get(this.serverUrl);
159
- if (!stored)
160
- return undefined;
161
- if (this._currentIssuer === undefined)
162
- return stored.tokens;
163
- if (stored.authServerUrl === undefined) {
164
- // Written before this binding existed: nothing proves which authorization
165
- // server minted them. Treated as unusable rather than trusted once —
166
- // the whole point is to stop handing credentials to an unverified party,
167
- // and "probably fine" is the assumption this check exists to remove. The
168
- // cost is one re-authorization per stored credential, at upgrade time.
169
- await this.config.tokenStore.delete(this.serverUrl);
170
- this.log("discarding stored credentials with no recorded issuer (SEP-2352); re-authorization required");
171
- return undefined;
172
- }
173
- if (canonicalIssuer(stored.authServerUrl) !== this._currentIssuer) {
174
- // A legitimate migration lands here too, and is handled the same way:
175
- // drop the old credentials and let the flow re-authorize against the new
176
- // server. What must not happen is the old refresh token travelling there.
177
- await this.config.tokenStore.delete(this.serverUrl);
178
- this.log(`authorization server changed for ${redactUrl(this.serverUrl)} ` +
179
- `(${redactUrl(stored.authServerUrl)} → ` +
180
- `${redactUrl(this._currentIssuer)}); ` +
181
- "stored credentials discarded, re-authorization required");
182
- return undefined;
183
- }
184
- return stored.tokens;
185
- }
186
- async saveTokens(tokens) {
187
- // Sequential guard only: keep an existing refresh_token when a later save omits it.
188
- // This get/set is not atomic; concurrent saves for one serverUrl are unsupported
189
- // because refresh is serialized by the caller.
190
- const stored = await this.config.tokenStore.get(this.serverUrl);
191
- // …but only from the same authorization server. `auth({ authorizationCode })`
192
- // reaches here without going through `tokens()`, so this is the one path
193
- // where a credential from a previous issuer can survive: if the code
194
- // exchange returns no refresh token, carrying the old one over would
195
- // re-label another server's secret with the new issuer and hand it over on
196
- // the next refresh. A legacy record has no recorded issuer, so it cannot
197
- // clear this bar either.
198
- const inheritable = stored?.authServerUrl !== undefined &&
199
- this._currentIssuer !== undefined &&
200
- canonicalIssuer(stored.authServerUrl) === this._currentIssuer;
201
- const tokensToStore = tokens.refresh_token === undefined &&
202
- inheritable && stored?.tokens.refresh_token !== undefined
203
- ? { ...tokens, refresh_token: stored.tokens.refresh_token }
204
- : tokens;
205
- await this.config.tokenStore.set(this.serverUrl, {
206
- serverUrl: this.serverUrl,
207
- tokens: tokensToStore,
208
- obtainedAt: Date.now(),
209
- // Binds the credentials to their minter. Without it every save produces
210
- // exactly the legacy record `tokens()` has to throw away.
211
- ...(this._currentIssuer !== undefined
212
- ? { authServerUrl: this._currentIssuer }
213
- : {}),
214
- });
215
- }
216
- log(message) {
217
- this.config.logger?.(`[client-auth] ${message}`);
218
- }
219
- async redirectToAuthorization(authorizationUrl) {
220
- await this.config.openBrowser(authorizationUrl.toString());
221
- }
222
- saveCodeVerifier(codeVerifier) {
223
- this._codeVerifier = codeVerifier;
224
- return Promise.resolve();
225
- }
226
- codeVerifier() {
227
- return Promise.resolve(this._codeVerifier);
228
- }
229
- async invalidateCredentials(scope) {
230
- if (scope === "all" || scope === "tokens") {
231
- await this.config.tokenStore.delete(this.serverUrl);
232
- }
233
- if (scope === "all" || scope === "verifier") {
234
- this._codeVerifier = "";
235
- }
236
- if (scope === "all" || scope === "client") {
237
- this._clientInfo = undefined;
238
- }
239
- if (scope === "all" || scope === "discovery") {
240
- // Keeping a stale issuer would make the next `tokens()` compare against
241
- // an authorization server the SDK has already given up on, and discard
242
- // credentials that are in fact still valid.
243
- this._currentIssuer = undefined;
244
- }
245
- }
246
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * File-based token store.
3
- *
4
- * Stores OAuth credentials as JSON files with restrictive permissions (0o600).
5
- * One file per MCP server, keyed by SHA-256 hash of the server URL.
6
- *
7
- * @module lib/server/client-auth/token-store/file-store
8
- */
9
- import type { StoredCredentials, TokenStore } from "../types.js";
10
- export declare class FileTokenStore implements TokenStore {
11
- private baseDir;
12
- constructor(baseDir: string);
13
- private filePath;
14
- private ensureDir;
15
- get(serverUrl: string): Promise<StoredCredentials | null>;
16
- set(serverUrl: string, credentials: StoredCredentials): Promise<void>;
17
- delete(serverUrl: string): Promise<void>;
18
- list(): Promise<string[]>;
19
- }
20
- //# sourceMappingURL=file-store.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file-store.d.ts","sourceRoot":"","sources":["../../../../src/src/client-auth/token-store/file-store.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAiBjE,qBAAa,cAAe,YAAW,UAAU;IACnC,OAAO,CAAC,OAAO;gBAAP,OAAO,EAAE,MAAM;YAErB,QAAQ;YAKR,SAAS;IAIjB,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAMzD,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAOrE,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxC,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAgBhC"}
@@ -1,62 +0,0 @@
1
- /**
2
- * File-based token store.
3
- *
4
- * Stores OAuth credentials as JSON files with restrictive permissions (0o600).
5
- * One file per MCP server, keyed by SHA-256 hash of the server URL.
6
- *
7
- * @module lib/server/client-auth/token-store/file-store
8
- */
9
- import { mkdir, readDir, readTextFile, remove, writeTextFile, } from "../../runtime/runtime.js";
10
- async function sha256hex(input) {
11
- const data = new TextEncoder().encode(input);
12
- const hash = await crypto.subtle.digest("SHA-256", data);
13
- return Array.from(new Uint8Array(hash))
14
- .map((b) => b.toString(16).padStart(2, "0"))
15
- .join("");
16
- }
17
- export class FileTokenStore {
18
- baseDir;
19
- constructor(baseDir) {
20
- this.baseDir = baseDir;
21
- }
22
- async filePath(serverUrl) {
23
- const hash = await sha256hex(serverUrl);
24
- return `${this.baseDir}/${hash}.json`;
25
- }
26
- async ensureDir() {
27
- await mkdir(this.baseDir, { recursive: true, mode: 0o700 });
28
- }
29
- async get(serverUrl) {
30
- const path = await this.filePath(serverUrl);
31
- const content = await readTextFile(path);
32
- return content === null ? null : JSON.parse(content);
33
- }
34
- async set(serverUrl, credentials) {
35
- await this.ensureDir();
36
- const path = await this.filePath(serverUrl);
37
- const content = JSON.stringify(credentials, null, 2);
38
- await writeTextFile(path, content, { mode: 0o600 });
39
- }
40
- async delete(serverUrl) {
41
- const path = await this.filePath(serverUrl);
42
- await remove(path);
43
- }
44
- async list() {
45
- const urls = [];
46
- for (const name of await readDir(this.baseDir)) {
47
- if (name.endsWith(".json")) {
48
- try {
49
- const content = await readTextFile(`${this.baseDir}/${name}`);
50
- if (content === null)
51
- continue;
52
- const creds = JSON.parse(content);
53
- urls.push(creds.serverUrl);
54
- }
55
- catch {
56
- // Corrupted file, skip
57
- }
58
- }
59
- }
60
- return urls;
61
- }
62
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * In-memory token store for testing and ephemeral use.
3
- *
4
- * @module lib/server/client-auth/token-store/memory-store
5
- */
6
- import type { StoredCredentials, TokenStore } from "../types.js";
7
- export declare class MemoryTokenStore implements TokenStore {
8
- private store;
9
- get(serverUrl: string): Promise<StoredCredentials | null>;
10
- set(serverUrl: string, credentials: StoredCredentials): Promise<void>;
11
- delete(serverUrl: string): Promise<void>;
12
- list(): Promise<string[]>;
13
- }
14
- //# sourceMappingURL=memory-store.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"memory-store.d.ts","sourceRoot":"","sources":["../../../../src/src/client-auth/token-store/memory-store.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEjE,qBAAa,gBAAiB,YAAW,UAAU;IACjD,OAAO,CAAC,KAAK,CAAwC;IAKrD,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAIzD,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAKrE,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxC,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAG1B"}
@@ -1,25 +0,0 @@
1
- /**
2
- * In-memory token store for testing and ephemeral use.
3
- *
4
- * @module lib/server/client-auth/token-store/memory-store
5
- */
6
- export class MemoryTokenStore {
7
- store = new Map();
8
- // Not `async`: the Map operations are synchronous. The interface returns
9
- // Promises so a real store can be I/O-backed; `Promise.resolve` satisfies it
10
- // without claiming an await point that does not exist.
11
- get(serverUrl) {
12
- return Promise.resolve(this.store.get(serverUrl) ?? null);
13
- }
14
- set(serverUrl, credentials) {
15
- this.store.set(serverUrl, credentials);
16
- return Promise.resolve();
17
- }
18
- delete(serverUrl) {
19
- this.store.delete(serverUrl);
20
- return Promise.resolve();
21
- }
22
- list() {
23
- return Promise.resolve([...this.store.keys()]);
24
- }
25
- }
@@ -1,89 +0,0 @@
1
- /**
2
- * OAuth client auth types.
3
- *
4
- * Interfaces for token storage and OAuth client configuration.
5
- * Used by OAuthClientProviderImpl to authenticate against
6
- * OAuth-protected MCP servers.
7
- *
8
- * @module lib/server/client-auth/types
9
- */
10
- import type { OAuthTokens } from "@modelcontextprotocol/sdk/shared/auth.js";
11
- /** Stored OAuth credentials for one MCP server */
12
- export interface StoredCredentials {
13
- /** The MCP server URL these credentials are for */
14
- serverUrl: string;
15
- /** OAuth tokens (access_token, refresh_token, etc.) */
16
- tokens: OAuthTokens;
17
- /** When the tokens were obtained (Unix epoch ms) */
18
- obtainedAt: number;
19
- /**
20
- * Issuer that minted these credentials (SEP-2352).
21
- *
22
- * Absent on records written before the binding existed; `tokens()` treats
23
- * that as unusable, since nothing proves who minted them.
24
- */
25
- authServerUrl?: string;
26
- }
27
- /** Abstract token storage — consumers provide the implementation */
28
- export interface TokenStore {
29
- /** Retrieve stored credentials for a server, or null if none */
30
- get(serverUrl: string): Promise<StoredCredentials | null>;
31
- /** Store credentials for a server */
32
- set(serverUrl: string, credentials: StoredCredentials): Promise<void>;
33
- /** Delete credentials for a server */
34
- delete(serverUrl: string): Promise<void>;
35
- /** List all server URLs with stored credentials */
36
- list(): Promise<string[]>;
37
- }
38
- /** Fields shared by all OAuth client registration modes. */
39
- export interface OAuthClientConfigBase {
40
- /** Client name shown in consent screen */
41
- clientName?: string;
42
- /** Scopes to request (space-separated in OAuth, array here) */
43
- scopes?: string[];
44
- /** Token storage backend */
45
- tokenStore: TokenStore;
46
- /** Callback to open browser — injected by consumer (platform-specific) */
47
- openBrowser: (url: string) => Promise<void>;
48
- /** Callback server port (0 = OS auto-assign, default: 0) */
49
- callbackPort?: number;
50
- /** Timeout for user to complete OAuth flow (ms, default: 120_000) */
51
- authTimeout?: number;
52
- /**
53
- * Optional sink for credential-lifecycle events.
54
- *
55
- * Notably an authorization-server change (SEP-2352): the client silently
56
- * drops its stored credentials and re-authorizes, and an operator debugging
57
- * an unexpected login prompt has no other way to see why.
58
- */
59
- logger?: (message: string) => void;
60
- }
61
- /** Static OAuth client registration (default, backwards-compatible mode). */
62
- export interface StaticClientConfig extends OAuthClientConfigBase {
63
- /** OAuth Client ID (public — embedded in consumer binary) */
64
- clientId: string;
65
- /** Absence of clientRegistration selects static client-id behavior. */
66
- clientRegistration?: undefined;
67
- }
68
- /** CIMD client registration (explicit opt-in). */
69
- export interface CimdClientConfig extends OAuthClientConfigBase {
70
- /** In CIMD mode, client_id is derived from clientIdMetadataUrl. */
71
- clientId?: never;
72
- clientRegistration: {
73
- method: "client_id_metadata";
74
- /** HTTPS URL of the hosted Client ID Metadata Document; also the client_id. */
75
- clientIdMetadataUrl: string;
76
- /** Runtime redirect URI published in the metadata document. */
77
- redirectUri: string;
78
- /** Optional display and extension metadata for the hosted document. */
79
- metadata?: {
80
- client_uri?: string;
81
- logo_uri?: string;
82
- contacts?: string[];
83
- extra?: Record<string, unknown>;
84
- };
85
- };
86
- }
87
- /** Configuration for creating an OAuthClientProvider */
88
- export type OAuthClientConfig = StaticClientConfig | CimdClientConfig;
89
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/src/client-auth/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAE5E,kDAAkD;AAClD,MAAM,WAAW,iBAAiB;IAChC,mDAAmD;IACnD,SAAS,EAAE,MAAM,CAAC;IAClB,uDAAuD;IACvD,MAAM,EAAE,WAAW,CAAC;IACpB,oDAAoD;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,oEAAoE;AACpE,MAAM,WAAW,UAAU;IACzB,gEAAgE;IAChE,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IAC1D,qCAAqC;IACrC,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtE,sCAAsC;IACtC,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,mDAAmD;IACnD,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CAC3B;AAED,4DAA4D;AAC5D,MAAM,WAAW,qBAAqB;IACpC,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,4BAA4B;IAC5B,UAAU,EAAE,UAAU,CAAC;IACvB,0EAA0E;IAC1E,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,4DAA4D;IAC5D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qEAAqE;IACrE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,6EAA6E;AAC7E,MAAM,WAAW,kBAAmB,SAAQ,qBAAqB;IAC/D,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,kBAAkB,CAAC,EAAE,SAAS,CAAC;CAChC;AAED,kDAAkD;AAClD,MAAM,WAAW,gBAAiB,SAAQ,qBAAqB;IAC7D,mEAAmE;IACnE,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,kBAAkB,EAAE;QAClB,MAAM,EAAE,oBAAoB,CAAC;QAC7B,+EAA+E;QAC/E,mBAAmB,EAAE,MAAM,CAAC;QAC5B,+DAA+D;QAC/D,WAAW,EAAE,MAAM,CAAC;QACpB,uEAAuE;QACvE,QAAQ,CAAC,EAAE;YACT,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;YACpB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;SACjC,CAAC;KACH,CAAC;CACH;AAED,wDAAwD;AACxD,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,GAAG,gBAAgB,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * OAuth client auth types.
3
- *
4
- * Interfaces for token storage and OAuth client configuration.
5
- * Used by OAuthClientProviderImpl to authenticate against
6
- * OAuth-protected MCP servers.
7
- *
8
- * @module lib/server/client-auth/types
9
- */
10
- export {};
@@ -1,87 +0,0 @@
1
- /**
2
- * Rate Limiter
3
- *
4
- * Sliding window rate limiter for per-client request throttling.
5
- * Prevents server overload by limiting requests per time window.
6
- *
7
- * @module lib/server/rate-limiter
8
- */
9
- /**
10
- * Sliding window rate limiter
11
- *
12
- * Features:
13
- * - Per-key rate limiting (client ID, IP, etc.)
14
- * - Sliding window for smooth rate enforcement
15
- * - Automatic cleanup of old timestamps
16
- * - Backoff waiting when limit exceeded
17
- *
18
- * @example
19
- * ```typescript
20
- * const limiter = new RateLimiter({ maxRequests: 100, windowMs: 60000 });
21
- *
22
- * if (await limiter.checkLimit("client-123")) {
23
- * // Execute request
24
- * } else {
25
- * // Rate limited
26
- * }
27
- * ```
28
- */
29
- export declare class RateLimiter {
30
- private requestCounts;
31
- private readonly windowMs;
32
- private readonly maxRequests;
33
- private operationsSinceLastPurge;
34
- private static readonly PURGE_EVERY_N_OPS;
35
- constructor(options: {
36
- maxRequests: number;
37
- windowMs: number;
38
- });
39
- /**
40
- * Check if request is allowed for the given key
41
- *
42
- * @param key - Identifier (client ID, IP, etc.)
43
- * @returns true if allowed, false if rate limited
44
- */
45
- checkLimit(key: string): boolean;
46
- /**
47
- * Remove all keys with no active requests in the current window.
48
- * Called automatically every PURGE_EVERY_N_OPS operations.
49
- */
50
- purgeExpiredKeys(): number;
51
- /**
52
- * Wait until request slot is available (with exponential backoff)
53
- *
54
- * @param key - Identifier (client ID, IP, etc.)
55
- * @throws Error if max wait time exceeded (defaults to windowMs)
56
- */
57
- waitForSlot(key: string): Promise<void>;
58
- /**
59
- * Get current request count for a key
60
- */
61
- getCurrentCount(key: string): number;
62
- /**
63
- * Get remaining requests for a key
64
- */
65
- getRemainingRequests(key: string): number;
66
- /**
67
- * Get time until next slot is available (in ms)
68
- * Returns 0 if a slot is available now
69
- */
70
- getTimeUntilSlot(key: string): number;
71
- /**
72
- * Clear rate limit history for a key
73
- */
74
- clear(key: string): void;
75
- /**
76
- * Clear all rate limit history
77
- */
78
- clearAll(): void;
79
- /**
80
- * Get metrics for monitoring
81
- */
82
- getMetrics(): {
83
- keys: number;
84
- totalRequests: number;
85
- };
86
- }
87
- //# sourceMappingURL=rate-limiter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rate-limiter.d.ts","sourceRoot":"","sources":["../../../src/src/concurrency/rate-limiter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,aAAa,CAA+B;IACpD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,wBAAwB,CAAK;IACrC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAQ;gBAErC,OAAO,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE;IAK9D;;;;;OAKG;IACH,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IA+BhC;;;OAGG;IACH,gBAAgB,IAAI,MAAM;IAgB1B;;;;;OAKG;IACG,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAmB7C;;OAEG;IACH,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAMpC;;OAEG;IACH,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAIzC;;;OAGG;IACH,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAcrC;;OAEG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIxB;;OAEG;IACH,QAAQ,IAAI,IAAI;IAIhB;;OAEG;IACH,UAAU,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE;CAetD"}