@casys/mcp-server 0.26.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/CHANGELOG.md +1779 -0
  2. package/LICENSE +21 -0
  3. package/README.md +19 -5
  4. package/esm/_dnt.polyfills.d.ts +12 -0
  5. package/esm/_dnt.polyfills.d.ts.map +1 -0
  6. package/esm/_dnt.polyfills.js +15 -0
  7. package/esm/_dnt.shims.d.ts +2 -0
  8. package/esm/_dnt.shims.d.ts.map +1 -0
  9. package/esm/_dnt.shims.js +57 -0
  10. package/esm/deps/jsr.io/@std/yaml/1.2.0/_chars.d.ts +33 -0
  11. package/esm/deps/jsr.io/@std/yaml/1.2.0/_chars.d.ts.map +1 -0
  12. package/esm/deps/jsr.io/@std/yaml/1.2.0/_chars.js +48 -0
  13. package/esm/deps/jsr.io/@std/yaml/1.2.0/_dumper_state.d.ts +106 -0
  14. package/esm/deps/jsr.io/@std/yaml/1.2.0/_dumper_state.d.ts.map +1 -0
  15. package/esm/deps/jsr.io/@std/yaml/1.2.0/_dumper_state.js +636 -0
  16. package/esm/deps/jsr.io/@std/yaml/1.2.0/_loader_state.d.ts +67 -0
  17. package/esm/deps/jsr.io/@std/yaml/1.2.0/_loader_state.d.ts.map +1 -0
  18. package/esm/deps/jsr.io/@std/yaml/1.2.0/_loader_state.js +1393 -0
  19. package/esm/deps/jsr.io/@std/yaml/1.2.0/_schema.d.ts +44 -0
  20. package/esm/deps/jsr.io/@std/yaml/1.2.0/_schema.d.ts.map +1 -0
  21. package/esm/deps/jsr.io/@std/yaml/1.2.0/_schema.js +117 -0
  22. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/binary.d.ts +3 -0
  23. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/binary.d.ts.map +1 -0
  24. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/binary.js +103 -0
  25. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/bool.d.ts +3 -0
  26. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/bool.d.ts.map +1 -0
  27. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/bool.js +32 -0
  28. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/float.d.ts +3 -0
  29. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/float.d.ts.map +1 -0
  30. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/float.js +96 -0
  31. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/int.d.ts +3 -0
  32. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/int.d.ts.map +1 -0
  33. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/int.js +159 -0
  34. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/map.d.ts +3 -0
  35. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/map.d.ts.map +1 -0
  36. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/map.js +14 -0
  37. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/merge.d.ts +3 -0
  38. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/merge.d.ts.map +1 -0
  39. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/merge.js +10 -0
  40. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/nil.d.ts +3 -0
  41. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/nil.d.ts.map +1 -0
  42. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/nil.js +22 -0
  43. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/omap.d.ts +3 -0
  44. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/omap.d.ts.map +1 -0
  45. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/omap.js +29 -0
  46. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/pairs.d.ts +3 -0
  47. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/pairs.d.ts.map +1 -0
  48. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/pairs.js +19 -0
  49. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/regexp.d.ts +3 -0
  50. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/regexp.d.ts.map +1 -0
  51. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/regexp.js +30 -0
  52. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/seq.d.ts +3 -0
  53. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/seq.d.ts.map +1 -0
  54. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/seq.js +10 -0
  55. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/set.d.ts +3 -0
  56. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/set.d.ts.map +1 -0
  57. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/set.js +14 -0
  58. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/str.d.ts +3 -0
  59. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/str.d.ts.map +1 -0
  60. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/str.js +9 -0
  61. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/timestamp.d.ts +3 -0
  62. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/timestamp.d.ts.map +1 -0
  63. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/timestamp.js +81 -0
  64. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/undefined.d.ts +3 -0
  65. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/undefined.d.ts.map +1 -0
  66. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type/undefined.js +20 -0
  67. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type.d.ts +32 -0
  68. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type.d.ts.map +1 -0
  69. package/esm/deps/jsr.io/@std/yaml/1.2.0/_type.js +6 -0
  70. package/esm/deps/jsr.io/@std/yaml/1.2.0/_utils.d.ts +4 -0
  71. package/esm/deps/jsr.io/@std/yaml/1.2.0/_utils.d.ts.map +1 -0
  72. package/esm/deps/jsr.io/@std/yaml/1.2.0/_utils.js +13 -0
  73. package/esm/deps/jsr.io/@std/yaml/1.2.0/mod.d.ts +51 -0
  74. package/esm/deps/jsr.io/@std/yaml/1.2.0/mod.d.ts.map +1 -0
  75. package/esm/deps/jsr.io/@std/yaml/1.2.0/mod.js +53 -0
  76. package/esm/deps/jsr.io/@std/yaml/1.2.0/parse.d.ts +79 -0
  77. package/esm/deps/jsr.io/@std/yaml/1.2.0/parse.d.ts.map +1 -0
  78. package/esm/deps/jsr.io/@std/yaml/1.2.0/parse.js +91 -0
  79. package/esm/deps/jsr.io/@std/yaml/1.2.0/stringify.d.ts +100 -0
  80. package/esm/deps/jsr.io/@std/yaml/1.2.0/stringify.d.ts.map +1 -0
  81. package/esm/deps/jsr.io/@std/yaml/1.2.0/stringify.js +33 -0
  82. package/esm/deps/jsr.io/@std/yaml/1.2.0/types.d.ts +111 -0
  83. package/esm/deps/jsr.io/@std/yaml/1.2.0/types.d.ts.map +1 -0
  84. package/esm/deps/jsr.io/@std/yaml/1.2.0/types.js +104 -0
  85. package/esm/mod.d.ts +102 -0
  86. package/esm/mod.d.ts.map +1 -0
  87. package/esm/mod.js +103 -0
  88. package/esm/package.json +3 -0
  89. package/esm/src/auth/as-metadata-proxy.d.ts +112 -0
  90. package/esm/src/auth/as-metadata-proxy.d.ts.map +1 -0
  91. package/esm/src/auth/as-metadata-proxy.js +171 -0
  92. package/esm/src/auth/config.d.ts +117 -0
  93. package/esm/src/auth/config.d.ts.map +1 -0
  94. package/esm/src/auth/config.js +219 -0
  95. package/esm/src/auth/jwt-provider.d.ts +157 -0
  96. package/esm/src/auth/jwt-provider.d.ts.map +1 -0
  97. package/esm/src/auth/jwt-provider.js +187 -0
  98. package/esm/src/auth/middleware.d.ts +61 -0
  99. package/esm/src/auth/middleware.d.ts.map +1 -0
  100. package/esm/src/auth/middleware.js +209 -0
  101. package/esm/src/auth/mod.d.ts +23 -0
  102. package/esm/src/auth/mod.d.ts.map +1 -0
  103. package/esm/src/auth/mod.js +27 -0
  104. package/esm/src/auth/multi-tenant-middleware.d.ts +131 -0
  105. package/esm/src/auth/multi-tenant-middleware.d.ts.map +1 -0
  106. package/esm/src/auth/multi-tenant-middleware.js +128 -0
  107. package/esm/src/auth/presets.d.ts +231 -0
  108. package/esm/src/auth/presets.d.ts.map +1 -0
  109. package/esm/src/auth/presets.js +223 -0
  110. package/{src/auth/provider.ts → esm/src/auth/provider.d.ts} +13 -15
  111. package/esm/src/auth/provider.d.ts.map +1 -0
  112. package/esm/src/auth/provider.js +34 -0
  113. package/esm/src/auth/scope-middleware.d.ts +30 -0
  114. package/esm/src/auth/scope-middleware.d.ts.map +1 -0
  115. package/esm/src/auth/scope-middleware.js +48 -0
  116. package/esm/src/auth/static-token-provider.d.ts +155 -0
  117. package/esm/src/auth/static-token-provider.d.ts.map +1 -0
  118. package/esm/src/auth/static-token-provider.js +256 -0
  119. package/esm/src/auth/types.d.ts +151 -0
  120. package/esm/src/auth/types.d.ts.map +1 -0
  121. package/esm/src/auth/types.js +64 -0
  122. package/esm/src/client-auth/callback-server.d.ts +34 -0
  123. package/esm/src/client-auth/callback-server.d.ts.map +1 -0
  124. package/esm/src/client-auth/callback-server.js +141 -0
  125. package/esm/src/client-auth/client-id-metadata.d.ts +29 -0
  126. package/esm/src/client-auth/client-id-metadata.d.ts.map +1 -0
  127. package/esm/src/client-auth/client-id-metadata.js +149 -0
  128. package/esm/src/client-auth/connect.d.ts +32 -0
  129. package/esm/src/client-auth/connect.d.ts.map +1 -0
  130. package/esm/src/client-auth/connect.js +47 -0
  131. package/esm/src/client-auth/mod.d.ts +19 -0
  132. package/esm/src/client-auth/mod.d.ts.map +1 -0
  133. package/{src/client-auth/mod.ts → esm/src/client-auth/mod.js} +1 -26
  134. package/esm/src/client-auth/provider.d.ts +78 -0
  135. package/esm/src/client-auth/provider.d.ts.map +1 -0
  136. package/esm/src/client-auth/provider.js +246 -0
  137. package/esm/src/client-auth/token-store/file-store.d.ts +20 -0
  138. package/esm/src/client-auth/token-store/file-store.d.ts.map +1 -0
  139. package/esm/src/client-auth/token-store/file-store.js +62 -0
  140. package/esm/src/client-auth/token-store/memory-store.d.ts +14 -0
  141. package/esm/src/client-auth/token-store/memory-store.d.ts.map +1 -0
  142. package/esm/src/client-auth/token-store/memory-store.js +25 -0
  143. package/esm/src/client-auth/types.d.ts +89 -0
  144. package/esm/src/client-auth/types.d.ts.map +1 -0
  145. package/esm/src/client-auth/types.js +10 -0
  146. package/esm/src/concurrency/rate-limiter.d.ts +87 -0
  147. package/esm/src/concurrency/rate-limiter.d.ts.map +1 -0
  148. package/esm/src/concurrency/rate-limiter.js +165 -0
  149. package/esm/src/concurrency/request-queue.d.ts +71 -0
  150. package/esm/src/concurrency/request-queue.d.ts.map +1 -0
  151. package/esm/src/concurrency/request-queue.js +128 -0
  152. package/esm/src/http/body.d.ts +20 -0
  153. package/esm/src/http/body.d.ts.map +1 -0
  154. package/esm/src/http/body.js +63 -0
  155. package/esm/src/http/request-guards.d.ts +54 -0
  156. package/esm/src/http/request-guards.d.ts.map +1 -0
  157. package/esm/src/http/request-guards.js +114 -0
  158. package/esm/src/http/wire.d.ts +26 -0
  159. package/esm/src/http/wire.d.ts.map +1 -0
  160. package/{src/http/wire.ts → esm/src/http/wire.js} +13 -19
  161. package/esm/src/inspector/launcher.d.ts +48 -0
  162. package/esm/src/inspector/launcher.d.ts.map +1 -0
  163. package/esm/src/inspector/launcher.js +100 -0
  164. package/esm/src/mcp-app.d.ts +728 -0
  165. package/esm/src/mcp-app.d.ts.map +1 -0
  166. package/esm/src/mcp-app.js +3530 -0
  167. package/{src/middleware/backpressure.ts → esm/src/middleware/backpressure.d.ts} +2 -14
  168. package/esm/src/middleware/backpressure.d.ts.map +1 -0
  169. package/esm/src/middleware/backpressure.js +31 -0
  170. package/esm/src/middleware/mod.d.ts +11 -0
  171. package/esm/src/middleware/mod.d.ts.map +1 -0
  172. package/{src/middleware/mod.ts → esm/src/middleware/mod.js} +0 -10
  173. package/{src/middleware/rate-limit.ts → esm/src/middleware/rate-limit.d.ts} +2 -25
  174. package/esm/src/middleware/rate-limit.d.ts.map +1 -0
  175. package/esm/src/middleware/rate-limit.js +33 -0
  176. package/esm/src/middleware/runner.d.ts +32 -0
  177. package/esm/src/middleware/runner.d.ts.map +1 -0
  178. package/esm/src/middleware/runner.js +49 -0
  179. package/esm/src/middleware/types.d.ts +76 -0
  180. package/esm/src/middleware/types.d.ts.map +1 -0
  181. package/esm/src/middleware/types.js +9 -0
  182. package/esm/src/middleware/validation.d.ts +24 -0
  183. package/esm/src/middleware/validation.d.ts.map +1 -0
  184. package/esm/src/middleware/validation.js +30 -0
  185. package/esm/src/mrtr/capability-check.d.ts +75 -0
  186. package/esm/src/mrtr/capability-check.d.ts.map +1 -0
  187. package/esm/src/mrtr/capability-check.js +233 -0
  188. package/esm/src/mrtr/mod.d.ts +18 -0
  189. package/esm/src/mrtr/mod.d.ts.map +1 -0
  190. package/esm/src/mrtr/mod.js +12 -0
  191. package/esm/src/mrtr/replay-store.d.ts +50 -0
  192. package/esm/src/mrtr/replay-store.d.ts.map +1 -0
  193. package/esm/src/mrtr/replay-store.js +61 -0
  194. package/esm/src/mrtr/request-state.d.ts +181 -0
  195. package/esm/src/mrtr/request-state.d.ts.map +1 -0
  196. package/esm/src/mrtr/request-state.js +313 -0
  197. package/esm/src/mrtr/retry-guard.d.ts +61 -0
  198. package/esm/src/mrtr/retry-guard.d.ts.map +1 -0
  199. package/esm/src/mrtr/retry-guard.js +53 -0
  200. package/esm/src/mrtr/types.d.ts +99 -0
  201. package/esm/src/mrtr/types.d.ts.map +1 -0
  202. package/esm/src/mrtr/types.js +14 -0
  203. package/esm/src/observability/metrics.d.ts +104 -0
  204. package/esm/src/observability/metrics.d.ts.map +1 -0
  205. package/esm/src/observability/metrics.js +207 -0
  206. package/{src/observability/mod.ts → esm/src/observability/mod.d.ts} +2 -11
  207. package/esm/src/observability/mod.d.ts.map +1 -0
  208. package/esm/src/observability/mod.js +11 -0
  209. package/esm/src/observability/otel.d.ts +73 -0
  210. package/esm/src/observability/otel.d.ts.map +1 -0
  211. package/esm/src/observability/otel.js +260 -0
  212. package/esm/src/runtime/runtime.d.ts +10 -0
  213. package/esm/src/runtime/runtime.d.ts.map +1 -0
  214. package/esm/src/runtime/runtime.deno.d.ts +50 -0
  215. package/esm/src/runtime/runtime.deno.d.ts.map +1 -0
  216. package/esm/src/runtime/runtime.deno.js +120 -0
  217. package/{src/runtime/runtime.ts → esm/src/runtime/runtime.js} +5 -14
  218. package/esm/src/runtime/runtime.node.d.ts +51 -0
  219. package/esm/src/runtime/runtime.node.d.ts.map +1 -0
  220. package/esm/src/runtime/runtime.node.js +268 -0
  221. package/{src/runtime/types.ts → esm/src/runtime/types.d.ts} +28 -51
  222. package/esm/src/runtime/types.d.ts.map +1 -0
  223. package/esm/src/runtime/types.js +12 -0
  224. package/esm/src/security/channel-hmac.d.ts +43 -0
  225. package/esm/src/security/channel-hmac.d.ts.map +1 -0
  226. package/{src/security/channel-hmac.ts → esm/src/security/channel-hmac.js} +12 -17
  227. package/esm/src/security/csp.d.ts +50 -0
  228. package/esm/src/security/csp.d.ts.map +1 -0
  229. package/esm/src/security/csp.js +63 -0
  230. package/esm/src/security/message-signer.d.ts +88 -0
  231. package/esm/src/security/message-signer.d.ts.map +1 -0
  232. package/esm/src/security/message-signer.js +166 -0
  233. package/esm/src/subscriptions/subscription-registry.d.ts +256 -0
  234. package/esm/src/subscriptions/subscription-registry.d.ts.map +1 -0
  235. package/esm/src/subscriptions/subscription-registry.js +406 -0
  236. package/{src/tasks/mod.ts → esm/src/tasks/mod.d.ts} +3 -23
  237. package/esm/src/tasks/mod.d.ts.map +1 -0
  238. package/esm/src/tasks/mod.js +11 -0
  239. package/esm/src/tasks/task-store.d.ts +342 -0
  240. package/esm/src/tasks/task-store.d.ts.map +1 -0
  241. package/esm/src/tasks/task-store.js +649 -0
  242. package/esm/src/transport/request-headers.d.ts +145 -0
  243. package/esm/src/transport/request-headers.d.ts.map +1 -0
  244. package/esm/src/transport/request-headers.js +525 -0
  245. package/esm/src/types.d.ts +776 -0
  246. package/esm/src/types.d.ts.map +1 -0
  247. package/esm/src/types.js +92 -0
  248. package/esm/src/ui/viewer-utils.d.ts +45 -0
  249. package/esm/src/ui/viewer-utils.d.ts.map +1 -0
  250. package/esm/src/ui/viewer-utils.js +97 -0
  251. package/esm/src/validation/schema-validator.d.ts +115 -0
  252. package/esm/src/validation/schema-validator.d.ts.map +1 -0
  253. package/esm/src/validation/schema-validator.js +249 -0
  254. package/package.json +35 -23
  255. package/mod.ts +0 -302
  256. package/src/auth/as-metadata-proxy.ts +0 -288
  257. package/src/auth/config.ts +0 -368
  258. package/src/auth/jwt-provider.ts +0 -327
  259. package/src/auth/middleware.ts +0 -257
  260. package/src/auth/mod.ts +0 -89
  261. package/src/auth/multi-tenant-middleware.ts +0 -236
  262. package/src/auth/presets.ts +0 -351
  263. package/src/auth/scope-middleware.ts +0 -59
  264. package/src/auth/static-token-provider.ts +0 -197
  265. package/src/auth/types.ts +0 -207
  266. package/src/client-auth/callback-server.ts +0 -166
  267. package/src/client-auth/client-id-metadata.ts +0 -260
  268. package/src/client-auth/connect.ts +0 -72
  269. package/src/client-auth/provider.ts +0 -300
  270. package/src/client-auth/token-store/file-store.ts +0 -73
  271. package/src/client-auth/token-store/memory-store.ts +0 -32
  272. package/src/client-auth/types.ts +0 -95
  273. package/src/concurrency/rate-limiter.ts +0 -190
  274. package/src/concurrency/request-queue.ts +0 -140
  275. package/src/http/body.ts +0 -72
  276. package/src/http/request-guards.ts +0 -137
  277. package/src/inspector/launcher.ts +0 -131
  278. package/src/mcp-app.ts +0 -4426
  279. package/src/middleware/runner.ts +0 -63
  280. package/src/middleware/types.ts +0 -104
  281. package/src/middleware/validation.ts +0 -28
  282. package/src/mrtr/capability-check.ts +0 -303
  283. package/src/mrtr/mod.ts +0 -46
  284. package/src/mrtr/replay-store.ts +0 -103
  285. package/src/mrtr/request-state.ts +0 -435
  286. package/src/mrtr/types.ts +0 -107
  287. package/src/observability/metrics.ts +0 -336
  288. package/src/observability/otel.ts +0 -330
  289. package/src/runtime/runtime.deno.ts +0 -149
  290. package/src/runtime/runtime.node.ts +0 -324
  291. package/src/security/csp.ts +0 -89
  292. package/src/security/message-signer.ts +0 -223
  293. package/src/subscriptions/subscription-registry.ts +0 -558
  294. package/src/tasks/task-store.ts +0 -1014
  295. package/src/testdata/stdio-e2e-server.ts +0 -110
  296. package/src/transport/request-headers.ts +0 -661
  297. package/src/types.ts +0 -907
  298. package/src/ui/viewer-utils.ts +0 -117
  299. package/src/validation/schema-validator.ts +0 -307
@@ -0,0 +1,223 @@
1
+ /**
2
+ * OIDC auth provider presets.
3
+ *
4
+ * Factory functions for common OIDC providers. Each preset pre-configures
5
+ * the issuer, JWKS URI, and authorization server for the provider.
6
+ *
7
+ * Bridge layer (0.16.0): presets accept raw `string` fields for `resource`,
8
+ * `resourceMetadataUrl`, and `authorizationServers`, then wrap them through
9
+ * {@link httpsUrl} before passing to the branded {@link JwtAuthProviderOptions}
10
+ * constructor. This keeps the YAML/env config pipeline (`createAuthProviderFromConfig`)
11
+ * working with raw strings while the core `JwtAuthProvider` API enforces the
12
+ * `HttpsUrl` brand at the type level.
13
+ *
14
+ * @module lib/server/auth/presets
15
+ */
16
+ import { JwtAuthProvider } from "./jwt-provider.js";
17
+ import { httpsUrl, tryHttpsUrl } from "./types.js";
18
+ /**
19
+ * GitHub Actions OIDC provider.
20
+ *
21
+ * Validates tokens issued by GitHub Actions workflows.
22
+ * Issuer: https://token.actions.githubusercontent.com
23
+ *
24
+ * @example
25
+ * ```typescript
26
+ * const provider = createGitHubAuthProvider({
27
+ * audience: "https://my-mcp.example.com",
28
+ * resource: "https://my-mcp.example.com",
29
+ * });
30
+ * ```
31
+ */
32
+ export function createGitHubAuthProvider(options) {
33
+ return buildJwtAuthProvider({
34
+ issuer: "https://token.actions.githubusercontent.com",
35
+ audience: options.audience,
36
+ authorizationServers: ["https://token.actions.githubusercontent.com"],
37
+ scopesSupported: options.scopesSupported,
38
+ resource: options.resource,
39
+ resourceMetadataUrl: options.resourceMetadataUrl,
40
+ }, "createGitHubAuthProvider");
41
+ }
42
+ /**
43
+ * Google OIDC provider.
44
+ *
45
+ * Validates tokens issued by Google accounts.
46
+ * Issuer: https://accounts.google.com
47
+ *
48
+ * @example
49
+ * ```typescript
50
+ * const provider = createGoogleAuthProvider({
51
+ * audience: "https://my-mcp.example.com",
52
+ * resource: "https://my-mcp.example.com",
53
+ * });
54
+ * ```
55
+ */
56
+ export function createGoogleAuthProvider(options) {
57
+ return buildJwtAuthProvider({
58
+ issuer: "https://accounts.google.com",
59
+ audience: options.audience,
60
+ authorizationServers: ["https://accounts.google.com"],
61
+ jwksUri: "https://www.googleapis.com/oauth2/v3/certs",
62
+ scopesSupported: options.scopesSupported,
63
+ resource: options.resource,
64
+ resourceMetadataUrl: options.resourceMetadataUrl,
65
+ }, "createGoogleAuthProvider");
66
+ }
67
+ /**
68
+ * Auth0 OIDC provider.
69
+ *
70
+ * Validates tokens issued by an Auth0 tenant.
71
+ * Issuer: https://{domain}/
72
+ *
73
+ * @example
74
+ * ```typescript
75
+ * const provider = createAuth0AuthProvider({
76
+ * domain: "my-tenant.auth0.com",
77
+ * audience: "https://my-mcp.example.com",
78
+ * resource: "https://my-mcp.example.com",
79
+ * });
80
+ * ```
81
+ */
82
+ export function createAuth0AuthProvider(options) {
83
+ const issuer = `https://${options.domain}/`;
84
+ return buildJwtAuthProvider({
85
+ issuer,
86
+ audience: options.audience,
87
+ authorizationServers: [issuer],
88
+ jwksUri: `${issuer}.well-known/jwks.json`,
89
+ scopesSupported: options.scopesSupported,
90
+ resource: options.resource,
91
+ resourceMetadataUrl: options.resourceMetadataUrl,
92
+ }, "createAuth0AuthProvider");
93
+ }
94
+ /**
95
+ * Generic OIDC provider.
96
+ *
97
+ * For any OIDC-compliant provider not covered by presets.
98
+ *
99
+ * @example
100
+ * ```typescript
101
+ * const provider = createOIDCAuthProvider({
102
+ * issuer: "https://my-idp.example.com",
103
+ * audience: "https://my-mcp.example.com",
104
+ * resource: "https://my-mcp.example.com",
105
+ * authorizationServers: ["https://my-idp.example.com"],
106
+ * });
107
+ * ```
108
+ */
109
+ export function createOIDCAuthProvider(options) {
110
+ return buildJwtAuthProvider({
111
+ issuer: options.issuer,
112
+ audience: options.audience,
113
+ jwksUri: options.jwksUri,
114
+ authorizationServers: options.authorizationServers ?? [options.issuer],
115
+ scopesSupported: options.scopesSupported,
116
+ resource: options.resource,
117
+ resourceMetadataUrl: options.resourceMetadataUrl,
118
+ }, "createOIDCAuthProvider");
119
+ }
120
+ /**
121
+ * Bridge raw-string options to a fully-constructed `JwtAuthProvider`.
122
+ *
123
+ * This is the shared validation + DU-branch-selection pathway used by all
124
+ * four built-in preset factories (`createGitHubAuthProvider` et al). 0.17.0
125
+ * exports it as public API so 3rd-party OIDC provider implementations
126
+ * (Keycloak, Zitadel custom, Okta, ...) can reuse the same pathway instead
127
+ * of reimplementing URL-vs-opaque detection, `HttpsUrl` wrapping, and
128
+ * empty-metadata fall-through.
129
+ *
130
+ * Rules:
131
+ * - `authorizationServers[]`: every entry must be a valid absolute HTTP(S)
132
+ * URL. Invalid entries throw with a `[${label}] authorizationServers[i]`
133
+ * prefix for pinpointing.
134
+ * - `resource`: if parseable as HTTP(S) URL → `UrlResource` branch (metadata
135
+ * URL derivable per RFC 9728 § 3.1). Otherwise → `OpaqueResource` branch
136
+ * requiring explicit `resourceMetadataUrl`.
137
+ * - `resourceMetadataUrl`: empty or whitespace-only strings are treated as
138
+ * absent (matches YAML-key-with-no-value semantics from 0.15.1).
139
+ *
140
+ * @param opts Raw-string options, as from YAML/env config.
141
+ * @param label Identifier used in error messages — REQUIRED. Pass your
142
+ * factory name so error prefixes point at the actual caller rather than
143
+ * the anonymous bridge layer. E.g., `"createKeycloakAuthProvider"`.
144
+ * (0.17.0: required, was optional with a misleading default in the
145
+ * draft — type-design review recommendation Q4.)
146
+ *
147
+ * @example Custom OIDC provider factory
148
+ * ```typescript
149
+ * import { buildJwtAuthProvider, type JwtAuthProvider } from "@casys/mcp-server";
150
+ *
151
+ * export interface KeycloakPresetOptions {
152
+ * keycloakHost: string;
153
+ * realm: string;
154
+ * audience: string;
155
+ * resource: string;
156
+ * resourceMetadataUrl?: string;
157
+ * }
158
+ *
159
+ * export function createKeycloakAuthProvider(
160
+ * options: KeycloakPresetOptions,
161
+ * ): JwtAuthProvider {
162
+ * const issuer = `https://${options.keycloakHost}/realms/${options.realm}`;
163
+ * return buildJwtAuthProvider({
164
+ * issuer,
165
+ * audience: options.audience,
166
+ * authorizationServers: [issuer],
167
+ * jwksUri: `${issuer}/protocol/openid-connect/certs`,
168
+ * resource: options.resource,
169
+ * resourceMetadataUrl: options.resourceMetadataUrl,
170
+ * }, "createKeycloakAuthProvider");
171
+ * }
172
+ * ```
173
+ */
174
+ export function buildJwtAuthProvider(opts, label) {
175
+ const wrappedAuthServers = opts.authorizationServers.map((raw, i) => {
176
+ try {
177
+ return httpsUrl(raw);
178
+ }
179
+ catch (err) {
180
+ throw new Error(`[${label}] authorizationServers[${i}] is not a valid ` +
181
+ `HTTP(S) URL: ${err.message}`);
182
+ }
183
+ });
184
+ const explicitMetadata = opts.resourceMetadataUrl &&
185
+ opts.resourceMetadataUrl.trim().length > 0
186
+ ? httpsUrl(opts.resourceMetadataUrl)
187
+ : undefined;
188
+ const base = {
189
+ issuer: opts.issuer,
190
+ audience: opts.audience,
191
+ jwksUri: opts.jwksUri,
192
+ authorizationServers: wrappedAuthServers,
193
+ scopesSupported: opts.scopesSupported,
194
+ };
195
+ const resourceUrl = tryHttpsUrl(opts.resource);
196
+ if (resourceUrl !== null) {
197
+ // URL resource branch — metadata URL optional (derivable). 0.17.0 sets
198
+ // the explicit `kind: "url"` tag so the DU narrowing in the constructor
199
+ // body is structurally sound.
200
+ return new JwtAuthProvider({
201
+ ...base,
202
+ kind: "url",
203
+ resource: resourceUrl,
204
+ resourceMetadataUrl: explicitMetadata,
205
+ });
206
+ }
207
+ // Opaque resource branch — metadata URL required
208
+ if (!explicitMetadata) {
209
+ throw new Error(`[${label}] resourceMetadataUrl is required when 'resource' is ` +
210
+ `not an HTTP(S) URL (got resource=${JSON.stringify(opts.resource)}). ` +
211
+ `Per RFC 9728 § 2, 'resource' can be an opaque URI (e.g., an OIDC ` +
212
+ `project ID used as JWT audience); in that case the metadata ` +
213
+ `document URL is a separate concept and must be provided explicitly. ` +
214
+ `Set 'resourceMetadataUrl' to the HTTPS URL where your ` +
215
+ `/.well-known/oauth-protected-resource endpoint is served publicly.`);
216
+ }
217
+ return new JwtAuthProvider({
218
+ ...base,
219
+ kind: "opaque",
220
+ resource: opts.resource,
221
+ resourceMetadataUrl: explicitMetadata,
222
+ });
223
+ }
@@ -6,9 +6,7 @@
6
6
  *
7
7
  * @module lib/server/auth/provider
8
8
  */
9
-
10
9
  import type { AuthInfo, ProtectedResourceMetadata } from "./types.js";
11
-
12
10
  /**
13
11
  * Base class for authentication providers.
14
12
  *
@@ -33,17 +31,17 @@ import type { AuthInfo, ProtectedResourceMetadata } from "./types.js";
33
31
  * }
34
32
  * ```
35
33
  */
36
- export abstract class AuthProvider {
37
- /**
38
- * Validate a token and extract auth information.
39
- *
40
- * @param token - The raw Bearer token string
41
- * @returns AuthInfo if valid, null if invalid/expired
42
- */
43
- abstract verifyToken(token: string): Promise<AuthInfo | null>;
44
-
45
- /**
46
- * Return RFC 9728 Protected Resource Metadata for this provider.
47
- */
48
- abstract getResourceMetadata(): ProtectedResourceMetadata;
34
+ export declare abstract class AuthProvider {
35
+ /**
36
+ * Validate a token and extract auth information.
37
+ *
38
+ * @param token - The raw Bearer token string
39
+ * @returns AuthInfo if valid, null if invalid/expired
40
+ */
41
+ abstract verifyToken(token: string): Promise<AuthInfo | null>;
42
+ /**
43
+ * Return RFC 9728 Protected Resource Metadata for this provider.
44
+ */
45
+ abstract getResourceMetadata(): ProtectedResourceMetadata;
49
46
  }
47
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../src/src/auth/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,8BAAsB,YAAY;IAChC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAE7D;;OAEG;IACH,QAAQ,CAAC,mBAAmB,IAAI,yBAAyB;CAC1D"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * AuthProvider abstract class.
3
+ *
4
+ * Abstract class (not interface) for DI compatibility with diod tokens.
5
+ * Implement this to provide custom token validation (API keys, opaque tokens, etc.)
6
+ *
7
+ * @module lib/server/auth/provider
8
+ */
9
+ /**
10
+ * Base class for authentication providers.
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * class ApiKeyProvider extends AuthProvider {
15
+ * async verifyToken(token: string): Promise<AuthInfo | null> {
16
+ * const user = await db.findByApiKey(token);
17
+ * if (!user) return null;
18
+ * return { subject: user.id, scopes: user.scopes };
19
+ * }
20
+ *
21
+ * getResourceMetadata(): ProtectedResourceMetadata {
22
+ * return {
23
+ * resource: "https://my-mcp.example.com",
24
+ * resource_metadata_url:
25
+ * "https://my-mcp.example.com/.well-known/oauth-protected-resource",
26
+ * authorization_servers: ["https://auth.example.com"],
27
+ * bearer_methods_supported: ["header"],
28
+ * };
29
+ * }
30
+ * }
31
+ * ```
32
+ */
33
+ export class AuthProvider {
34
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Scope enforcement middleware.
3
+ *
4
+ * Verifies that the authenticated user has the required scopes
5
+ * for the tool being called. Placed after the auth middleware.
6
+ *
7
+ * @module lib/server/auth/scope-middleware
8
+ */
9
+ import type { Middleware, MiddlewareContext } from "../middleware/types.js";
10
+ /**
11
+ * Source of the scopes required for one tool call.
12
+ *
13
+ * A map preserves the original public helper API. A resolver lets McpApp bind
14
+ * authorization to the exact tool definition captured for an in-flight call,
15
+ * including tools registered or replaced after startup.
16
+ */
17
+ type ToolScopesSource = ReadonlyMap<string, readonly string[]> | ((ctx: MiddlewareContext) => readonly string[] | undefined);
18
+ /**
19
+ * Create a scope enforcement middleware.
20
+ *
21
+ * Checks `requiredScopes` for the called tool against `ctx.authInfo.scopes`.
22
+ * STDIO calls (no HTTP request) pass through without auth. An HTTP call for a
23
+ * scoped tool fails closed when no authInfo is available.
24
+ * If the tool has no requiredScopes, the middleware passes through.
25
+ *
26
+ * @param toolScopes - Map of tool name to required scopes, or a per-call resolver
27
+ */
28
+ export declare function createScopeMiddleware(toolScopes: ToolScopesSource): Middleware;
29
+ export {};
30
+ //# sourceMappingURL=scope-middleware.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scope-middleware.d.ts","sourceRoot":"","sources":["../../../src/src/auth/scope-middleware.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE5E;;;;;;GAMG;AACH,KAAK,gBAAgB,GACjB,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,GACtC,CAAC,CAAC,GAAG,EAAE,iBAAiB,KAAK,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;AAEhE;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,gBAAgB,GAC3B,UAAU,CAoCZ"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Scope enforcement middleware.
3
+ *
4
+ * Verifies that the authenticated user has the required scopes
5
+ * for the tool being called. Placed after the auth middleware.
6
+ *
7
+ * @module lib/server/auth/scope-middleware
8
+ */
9
+ import { AuthError } from "./middleware.js";
10
+ /**
11
+ * Create a scope enforcement middleware.
12
+ *
13
+ * Checks `requiredScopes` for the called tool against `ctx.authInfo.scopes`.
14
+ * STDIO calls (no HTTP request) pass through without auth. An HTTP call for a
15
+ * scoped tool fails closed when no authInfo is available.
16
+ * If the tool has no requiredScopes, the middleware passes through.
17
+ *
18
+ * @param toolScopes - Map of tool name to required scopes, or a per-call resolver
19
+ */
20
+ export function createScopeMiddleware(toolScopes) {
21
+ // deno-lint-ignore require-await
22
+ return async (ctx, next) => {
23
+ const requiredScopes = typeof toolScopes === "function"
24
+ ? toolScopes(ctx)
25
+ : toolScopes.get(ctx.toolName);
26
+ // No scopes required for this tool
27
+ if (!requiredScopes?.length)
28
+ return next();
29
+ // No auth configured: STDIO (no request) is fine, HTTP without authInfo is a misconfiguration
30
+ const authInfo = ctx.authInfo;
31
+ if (!authInfo) {
32
+ if (!ctx.request)
33
+ return next(); // STDIO: local transport, no auth needed
34
+ // HTTP request with required scopes but no authInfo = auth middleware is missing
35
+ throw new Error(`[ScopeMiddleware] Tool "${ctx.toolName}" requires scopes [${requiredScopes.join(", ")}] ` +
36
+ "but no authInfo found on HTTP request. Ensure auth middleware is configured in the pipeline.");
37
+ }
38
+ const hasAll = requiredScopes.every((s) => authInfo.scopes.includes(s));
39
+ if (!hasAll) {
40
+ const missingScopes = requiredScopes.filter((s) => !authInfo.scopes.includes(s));
41
+ // Used by 403 responses to advertise protected resource metadata in
42
+ // WWW-Authenticate; auth middleware populates it for HTTP requests.
43
+ const metadataUrl = ctx.resourceMetadataUrl ?? "";
44
+ throw new AuthError("insufficient_scope", metadataUrl, missingScopes);
45
+ }
46
+ return next();
47
+ };
48
+ }
@@ -0,0 +1,155 @@
1
+ /**
2
+ * Static (opaque) bearer-token auth provider.
3
+ *
4
+ * Validates a fixed set of pre-shared bearer tokens with no OIDC/JWT
5
+ * infrastructure — no issuer, no JWKS endpoint, no key management. Suited to
6
+ * same-network deployments (Docker, VPN, LAN), server-to-server integrations,
7
+ * and CI pipelines where a full OAuth flow is disproportionate.
8
+ *
9
+ * The original string-list form maps every valid token to one shared
10
+ * {@link AuthInfo}. An identity-aware credential form can instead assign a
11
+ * distinct subject and scopes to each token. For externally issued identity,
12
+ * expiry, rotation policy, or SSO, use {@link JwtAuthProvider} / the OIDC
13
+ * presets instead.
14
+ *
15
+ * Per RFC 9728 the emitted {@link ProtectedResourceMetadata} carries an empty
16
+ * `authorization_servers` array: there is no authorization server in a static
17
+ * token scheme — tokens are provisioned out of band — which is the correct
18
+ * signal for clients not to attempt AS discovery.
19
+ *
20
+ * @module lib/server/auth/static-token-provider
21
+ */
22
+ import { AuthProvider } from "./provider.js";
23
+ import { type AuthInfo, type ProtectedResourceMetadata } from "./types.js";
24
+ /**
25
+ * One opaque bearer token with caller identity owned by the resource server.
26
+ *
27
+ * Use this form only when the server provisions its own long-lived credentials.
28
+ * The token is used exclusively as a lookup key; it is never copied into the
29
+ * resulting {@link AuthInfo}, metadata, logs, or validation errors.
30
+ */
31
+ export interface StaticTokenCredential {
32
+ /** Opaque bearer token, normally loaded from env or a secrets manager. */
33
+ readonly token: string;
34
+ /** Stable non-empty caller identity. Reserved/control values are invalid. */
35
+ readonly subject: string;
36
+ /** Scopes granted to this credential. Default `[]`. */
37
+ readonly scopes?: readonly string[];
38
+ }
39
+ /**
40
+ * Options for {@link createStaticTokenAuthProvider} /
41
+ * {@link StaticTokenAuthProvider}.
42
+ */
43
+ export interface StaticTokenAuthProviderOptions {
44
+ /**
45
+ * RFC 9728 § 2 resource identifier — an absolute HTTP(S) URL identifying
46
+ * this server, validated via {@link httpsUrl} at construction. Required: the
47
+ * {@link AuthProvider} contract must emit Protected Resource Metadata, which
48
+ * needs a resource URL.
49
+ */
50
+ resource: string;
51
+ /**
52
+ * `subject` reported in {@link AuthInfo} for every valid token in the shared
53
+ * string-list form. Rejected when identity-aware credentials are used.
54
+ * Default `"static-token-user"`.
55
+ */
56
+ subject?: string;
57
+ /**
58
+ * `scopes` granted to every valid token in the shared string-list form.
59
+ * Default `[]` — a pure gate with no scopes, which is the common same-network
60
+ * case. Rejected when identity-aware credentials are used.
61
+ */
62
+ scopes?: readonly string[];
63
+ /**
64
+ * `scopes_supported` advertised in the metadata document (what the resource
65
+ * accepts). Defaults to shared `scopes` for the string-list form and to the
66
+ * union of credential scopes for the identity-aware form.
67
+ */
68
+ scopesSupported?: readonly string[];
69
+ /**
70
+ * Explicit Protected Resource Metadata URL. When omitted it is auto-derived
71
+ * from `resource` per RFC 9728 § 3.1, identically to {@link JwtAuthProvider}.
72
+ * Empty / whitespace-only values are treated as absent.
73
+ */
74
+ resourceMetadataUrl?: string;
75
+ }
76
+ /**
77
+ * {@link AuthProvider} that accepts a fixed set of opaque bearer tokens.
78
+ *
79
+ * Token lookup is O(1) via a pre-built `Map`. The string-list form stores the
80
+ * same frozen {@link AuthInfo} for every token; the credential form stores one
81
+ * distinct frozen value per token. Tokens are trimmed to match the bearer value
82
+ * the HTTP middleware extracts. Note that `Map.get()` is not constant-time —
83
+ * prefer long, high-entropy tokens (>= 32 random bytes) and rotate them
84
+ * regularly.
85
+ *
86
+ * @example
87
+ * ```typescript
88
+ * const provider = new StaticTokenAuthProvider(
89
+ * [Deno.env.get("MCP_AUTH_TOKEN")!],
90
+ * { resource: "https://my-mcp.example.com", scopes: ["tools:invoke"] },
91
+ * );
92
+ * ```
93
+ *
94
+ * @example Identity-aware credentials
95
+ * ```typescript
96
+ * const provider = new StaticTokenAuthProvider(
97
+ * [
98
+ * { token: aliceToken, subject: "alice", scopes: ["erp:read"] },
99
+ * {
100
+ * token: automationToken,
101
+ * subject: "automation",
102
+ * scopes: ["erp:read", "erp:write"],
103
+ * },
104
+ * ],
105
+ * { resource: "https://my-mcp.example.com" },
106
+ * );
107
+ * ```
108
+ */
109
+ export declare class StaticTokenAuthProvider extends AuthProvider {
110
+ private readonly authByToken;
111
+ private readonly resource;
112
+ private readonly resourceMetadataUrl;
113
+ private readonly scopesSupported;
114
+ constructor(entries: readonly string[] | readonly StaticTokenCredential[], options: StaticTokenAuthProviderOptions);
115
+ verifyToken(token: string): Promise<AuthInfo | null>;
116
+ getResourceMetadata(): ProtectedResourceMetadata;
117
+ }
118
+ /**
119
+ * Create a static (opaque) bearer-token {@link AuthProvider}.
120
+ *
121
+ * @param entries Either a non-empty shared-authority list of bearer tokens, or
122
+ * a non-empty list of identity-aware credentials. Load tokens from env / a
123
+ * secrets manager — never hard-code them in source.
124
+ * @param options Provider configuration; `options.resource` is required.
125
+ *
126
+ * @example
127
+ * ```typescript
128
+ * import { createStaticTokenAuthProvider, McpApp } from "@casys/mcp-server";
129
+ *
130
+ * const app = new McpApp({
131
+ * name: "my-server",
132
+ * version: "1.0.0",
133
+ * auth: {
134
+ * provider: createStaticTokenAuthProvider(
135
+ * (Deno.env.get("MCP_AUTH_TOKENS") ?? "").split(",").filter(Boolean),
136
+ * { resource: "https://my-mcp.example.com" },
137
+ * ),
138
+ * },
139
+ * });
140
+ * await app.startHttp({ port: 7654, requireAuth: true });
141
+ * ```
142
+ *
143
+ * @example Identity and scopes per credential
144
+ * ```typescript
145
+ * const provider = createStaticTokenAuthProvider(
146
+ * [
147
+ * { token: aliceToken, subject: "alice", scopes: ["read"] },
148
+ * { token: ciToken, subject: "ci", scopes: ["read", "write"] },
149
+ * ],
150
+ * { resource: "https://my-mcp.example.com" },
151
+ * );
152
+ * ```
153
+ */
154
+ export declare function createStaticTokenAuthProvider(entries: readonly string[] | readonly StaticTokenCredential[], options: StaticTokenAuthProviderOptions): StaticTokenAuthProvider;
155
+ //# sourceMappingURL=static-token-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"static-token-provider.d.ts","sourceRoot":"","sources":["../../../src/src/auth/static-token-provider.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EACL,KAAK,QAAQ,EAGb,KAAK,yBAAyB,EAC/B,MAAM,YAAY,CAAC;AAEpB;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,6EAA6E;IAC7E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,uDAAuD;IACvD,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B;;;;OAIG;IACH,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAqDD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,qBAAa,uBAAwB,SAAQ,YAAY;IACvD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAwB;IACpD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAW;IAC/C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAuB;gBAGrD,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,qBAAqB,EAAE,EAC7D,OAAO,EAAE,8BAA8B;IA2InC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAM1D,mBAAmB,IAAI,yBAAyB;CAYjD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,qBAAqB,EAAE,EAC7D,OAAO,EAAE,8BAA8B,GACtC,uBAAuB,CAEzB"}