@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
@@ -6,10 +6,8 @@
6
6
  *
7
7
  * @module lib/server/middleware/backpressure
8
8
  */
9
-
10
9
  import type { RequestQueue } from "../concurrency/request-queue.js";
11
10
  import type { Middleware } from "./types.js";
12
-
13
11
  /**
14
12
  * Create a backpressure middleware.
15
13
  *
@@ -22,15 +20,5 @@ import type { Middleware } from "./types.js";
22
20
  *
23
21
  * @param queue - RequestQueue instance with configured concurrency limits
24
22
  */
25
- export function createBackpressureMiddleware(
26
- queue: RequestQueue,
27
- ): Middleware {
28
- return async (_ctx, next) => {
29
- await queue.acquire();
30
- try {
31
- return await next();
32
- } finally {
33
- queue.release();
34
- }
35
- };
36
- }
23
+ export declare function createBackpressureMiddleware(queue: RequestQueue): Middleware;
24
+ //# sourceMappingURL=backpressure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backpressure.d.ts","sourceRoot":"","sources":["../../../src/src/middleware/backpressure.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,YAAY,GAClB,UAAU,CASZ"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Backpressure middleware.
3
+ *
4
+ * Controls concurrent execution using RequestQueue.
5
+ * Acquires a slot before calling next(), releases after.
6
+ *
7
+ * @module lib/server/middleware/backpressure
8
+ */
9
+ /**
10
+ * Create a backpressure middleware.
11
+ *
12
+ * Wraps the downstream pipeline in acquire/release:
13
+ * ```
14
+ * acquire() → next() → release()
15
+ * ```
16
+ *
17
+ * The slot is always released, even if an error occurs.
18
+ *
19
+ * @param queue - RequestQueue instance with configured concurrency limits
20
+ */
21
+ export function createBackpressureMiddleware(queue) {
22
+ return async (_ctx, next) => {
23
+ await queue.acquire();
24
+ try {
25
+ return await next();
26
+ }
27
+ finally {
28
+ queue.release();
29
+ }
30
+ };
31
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Middleware module for McpApp.
3
+ *
4
+ * @module lib/server/middleware
5
+ */
6
+ export type { Middleware, MiddlewareContext, MiddlewareResult, NextFunction, } from "./types.js";
7
+ export { createMiddlewareRunner } from "./runner.js";
8
+ export { createRateLimitMiddleware } from "./rate-limit.js";
9
+ export { createValidationMiddleware } from "./validation.js";
10
+ export { createBackpressureMiddleware } from "./backpressure.js";
11
+ //# sourceMappingURL=mod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/src/middleware/mod.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,GACb,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAGrD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC"}
@@ -3,18 +3,8 @@
3
3
  *
4
4
  * @module lib/server/middleware
5
5
  */
6
-
7
- // Types
8
- export type {
9
- Middleware,
10
- MiddlewareContext,
11
- MiddlewareResult,
12
- NextFunction,
13
- } from "./types.js";
14
-
15
6
  // Runner
16
7
  export { createMiddlewareRunner } from "./runner.js";
17
-
18
8
  // Built-in middlewares
19
9
  export { createRateLimitMiddleware } from "./rate-limit.js";
20
10
  export { createValidationMiddleware } from "./validation.js";
@@ -5,11 +5,9 @@
5
5
  *
6
6
  * @module lib/server/middleware/rate-limit
7
7
  */
8
-
9
8
  import type { RateLimiter } from "../concurrency/rate-limiter.js";
10
9
  import type { RateLimitOptions } from "../types.js";
11
10
  import type { Middleware } from "./types.js";
12
-
13
11
  /**
14
12
  * Create a rate limiting middleware.
15
13
  *
@@ -20,26 +18,5 @@ import type { Middleware } from "./types.js";
20
18
  * @param limiter - RateLimiter instance
21
19
  * @param options - Rate limit configuration
22
20
  */
23
- export function createRateLimitMiddleware(
24
- limiter: RateLimiter,
25
- options: RateLimitOptions,
26
- ): Middleware {
27
- return async (ctx, next) => {
28
- const key =
29
- options.keyExtractor?.({ toolName: ctx.toolName, args: ctx.args }) ??
30
- "default";
31
-
32
- if (options.onLimitExceeded === "reject") {
33
- if (!limiter.checkLimit(key)) {
34
- const waitTime = limiter.getTimeUntilSlot(key);
35
- throw new Error(
36
- `Rate limit exceeded. Retry after ${Math.ceil(waitTime / 1000)}s`,
37
- );
38
- }
39
- } else {
40
- await limiter.waitForSlot(key);
41
- }
42
-
43
- return next();
44
- };
45
- }
21
+ export declare function createRateLimitMiddleware(limiter: RateLimiter, options: RateLimitOptions): Middleware;
22
+ //# sourceMappingURL=rate-limit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rate-limit.d.ts","sourceRoot":"","sources":["../../../src/src/middleware/rate-limit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,gBAAgB,GACxB,UAAU,CAmBZ"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Rate limiting middleware.
3
+ *
4
+ * Extracted from McpApp's inline rate limit logic.
5
+ *
6
+ * @module lib/server/middleware/rate-limit
7
+ */
8
+ /**
9
+ * Create a rate limiting middleware.
10
+ *
11
+ * Behavior depends on `options.onLimitExceeded`:
12
+ * - `'reject'`: throws immediately when limit is exceeded
13
+ * - `'wait'` (default): waits with backoff until a slot is available
14
+ *
15
+ * @param limiter - RateLimiter instance
16
+ * @param options - Rate limit configuration
17
+ */
18
+ export function createRateLimitMiddleware(limiter, options) {
19
+ return async (ctx, next) => {
20
+ const key = options.keyExtractor?.({ toolName: ctx.toolName, args: ctx.args }) ??
21
+ "default";
22
+ if (options.onLimitExceeded === "reject") {
23
+ if (!limiter.checkLimit(key)) {
24
+ const waitTime = limiter.getTimeUntilSlot(key);
25
+ throw new Error(`Rate limit exceeded. Retry after ${Math.ceil(waitTime / 1000)}s`);
26
+ }
27
+ }
28
+ else {
29
+ await limiter.waitForSlot(key);
30
+ }
31
+ return next();
32
+ };
33
+ }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Middleware pipeline runner.
3
+ *
4
+ * Composes an array of middlewares into a single callable function
5
+ * using the onion model: each middleware wraps the next.
6
+ *
7
+ * @module lib/server/middleware/runner
8
+ */
9
+ import type { Middleware, MiddlewareContext, MiddlewareResult } from "./types.js";
10
+ /**
11
+ * Create a middleware runner that composes middlewares + a final handler.
12
+ *
13
+ * Execution order (onion model):
14
+ * ```
15
+ * m1-before → m2-before → handler → m2-after → m1-after
16
+ * ```
17
+ *
18
+ * @param middlewares - Array of middleware functions to execute in order
19
+ * @param handler - Final handler (the tool execution)
20
+ * @returns A function that runs the full pipeline for a given context
21
+ *
22
+ * @example
23
+ * ```typescript
24
+ * const run = createMiddlewareRunner(
25
+ * [rateLimitMiddleware, validationMiddleware],
26
+ * async (ctx) => toolHandler(ctx.args),
27
+ * );
28
+ * const result = await run({ toolName: "my_tool", args: { x: 1 } });
29
+ * ```
30
+ */
31
+ export declare function createMiddlewareRunner(middlewares: Middleware[], handler: (ctx: MiddlewareContext) => Promise<MiddlewareResult>): (ctx: MiddlewareContext) => Promise<MiddlewareResult>;
32
+ //# sourceMappingURL=runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../../src/src/middleware/runner.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,UAAU,EAAE,EACzB,OAAO,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,OAAO,CAAC,gBAAgB,CAAC,GAC7D,CAAC,GAAG,EAAE,iBAAiB,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAuBvD"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Middleware pipeline runner.
3
+ *
4
+ * Composes an array of middlewares into a single callable function
5
+ * using the onion model: each middleware wraps the next.
6
+ *
7
+ * @module lib/server/middleware/runner
8
+ */
9
+ /**
10
+ * Create a middleware runner that composes middlewares + a final handler.
11
+ *
12
+ * Execution order (onion model):
13
+ * ```
14
+ * m1-before → m2-before → handler → m2-after → m1-after
15
+ * ```
16
+ *
17
+ * @param middlewares - Array of middleware functions to execute in order
18
+ * @param handler - Final handler (the tool execution)
19
+ * @returns A function that runs the full pipeline for a given context
20
+ *
21
+ * @example
22
+ * ```typescript
23
+ * const run = createMiddlewareRunner(
24
+ * [rateLimitMiddleware, validationMiddleware],
25
+ * async (ctx) => toolHandler(ctx.args),
26
+ * );
27
+ * const result = await run({ toolName: "my_tool", args: { x: 1 } });
28
+ * ```
29
+ */
30
+ export function createMiddlewareRunner(middlewares, handler) {
31
+ return (ctx) => {
32
+ let index = 0;
33
+ let handlerCalled = false;
34
+ // deno-lint-ignore require-await
35
+ const next = async () => {
36
+ if (index < middlewares.length) {
37
+ const middleware = middlewares[index++];
38
+ return middleware(ctx, next);
39
+ }
40
+ if (handlerCalled) {
41
+ throw new Error("[MiddlewareRunner] next() called after pipeline already completed. " +
42
+ "A middleware may be calling next() multiple times.");
43
+ }
44
+ handlerCalled = true;
45
+ return handler(ctx);
46
+ };
47
+ return next();
48
+ };
49
+ }
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Middleware pipeline types for McpApp.
3
+ *
4
+ * Provides an onion-model middleware system (similar to Koa/Hono)
5
+ * where each middleware wraps the next, enabling before/after logic.
6
+ *
7
+ * @module lib/server/middleware/types
8
+ */
9
+ import type { ClientCapabilities, Implementation } from "@modelcontextprotocol/sdk/types.js";
10
+ /**
11
+ * MCP logging severities (RFC 5424 syslog levels), ordered least to most severe.
12
+ *
13
+ * Declared locally rather than imported: the SDK's `LoggingLevel` is tied to the
14
+ * `logging/setLevel` RPC that spec 2026-07-28 removed, and this type now serves a
15
+ * per-request field instead.
16
+ */
17
+ export type McpLogLevel = "debug" | "info" | "notice" | "warning" | "error" | "critical" | "alert" | "emergency";
18
+ /**
19
+ * Context passed through the middleware pipeline.
20
+ * Each middleware can read and enrich the context.
21
+ */
22
+ export interface MiddlewareContext {
23
+ /** Name of the tool being called */
24
+ toolName: string;
25
+ /** Tool arguments */
26
+ args: Record<string, unknown>;
27
+ /** HTTP request (only present for HTTP transport, undefined for STDIO) */
28
+ request?: Request;
29
+ /** Session ID (only present for HTTP transport) */
30
+ sessionId?: string;
31
+ /** Client implementation metadata (stateless HTTP transport, when provided) */
32
+ clientInfo?: Implementation;
33
+ /** Client capabilities metadata (stateless HTTP transport, when provided) */
34
+ clientCapabilities?: ClientCapabilities;
35
+ /** MRTR: answers the client echoed back on a retry (spec 2026-07-28). */
36
+ inputResponses?: Record<string, unknown>;
37
+ /** MRTR: whether the echoed `requestState` passed integrity verification. */
38
+ retryVerified?: boolean;
39
+ /**
40
+ * Log level the client requested **for this request** (spec 2026-07-28).
41
+ *
42
+ * Replaces the removed `logging/setLevel` RPC: there is no server-wide level
43
+ * to mutate any more, so the level travels with the call that wants it. Absent
44
+ * means the client asked for no logging — and the spec is explicit that a
45
+ * server **MUST NOT** emit `notifications/message` in that case.
46
+ */
47
+ logLevel?: McpLogLevel;
48
+ /** Extensible by middlewares (e.g., authInfo added by auth middleware) */
49
+ [key: string]: unknown;
50
+ }
51
+ /**
52
+ * Result returned by a middleware or the final handler.
53
+ */
54
+ export type MiddlewareResult = unknown;
55
+ /**
56
+ * Function to invoke the next middleware in the chain.
57
+ */
58
+ export type NextFunction = () => Promise<MiddlewareResult>;
59
+ /**
60
+ * A middleware function.
61
+ *
62
+ * Receives the context and a `next()` function to call the next middleware.
63
+ * Can short-circuit the pipeline by not calling `next()`.
64
+ *
65
+ * @example
66
+ * ```typescript
67
+ * const loggingMiddleware: Middleware = async (ctx, next) => {
68
+ * console.log(`Before: ${ctx.toolName}`);
69
+ * const result = await next();
70
+ * console.log(`After: ${ctx.toolName}`);
71
+ * return result;
72
+ * };
73
+ * ```
74
+ */
75
+ export type Middleware = (ctx: MiddlewareContext, next: NextFunction) => Promise<MiddlewareResult>;
76
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/src/middleware/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EACf,MAAM,oCAAoC,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,MAAM,GACN,QAAQ,GACR,SAAS,GACT,OAAO,GACP,UAAU,GACV,OAAO,GACP,WAAW,CAAC;AAEhB;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAC;IAEjB,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE9B,0EAA0E;IAC1E,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,+EAA+E;IAC/E,UAAU,CAAC,EAAE,cAAc,CAAC;IAE5B,6EAA6E;IAC7E,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IAExC,yEAAyE;IACzE,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEzC,6EAA6E;IAC7E,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC;IAEvB,0EAA0E;IAC1E,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAE3D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,UAAU,GAAG,CACvB,GAAG,EAAE,iBAAiB,EACtB,IAAI,EAAE,YAAY,KACf,OAAO,CAAC,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Middleware pipeline types for McpApp.
3
+ *
4
+ * Provides an onion-model middleware system (similar to Koa/Hono)
5
+ * where each middleware wraps the next, enabling before/after logic.
6
+ *
7
+ * @module lib/server/middleware/types
8
+ */
9
+ export {};
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Schema validation middleware.
3
+ *
4
+ * Validates tool arguments against JSON Schema before execution.
5
+ *
6
+ * @module lib/server/middleware/validation
7
+ */
8
+ import type { CompiledSchemaValidator, SchemaValidator } from "../validation/schema-validator.js";
9
+ import type { Middleware, MiddlewareContext } from "./types.js";
10
+ type CompiledSchemaResolver = (ctx: MiddlewareContext) => CompiledSchemaValidator | undefined;
11
+ /**
12
+ * Create a schema validation middleware.
13
+ *
14
+ * Validates `ctx.args` against the registered schema for `ctx.toolName`.
15
+ * Throws with a descriptive error if validation fails.
16
+ *
17
+ * @param validator - SchemaValidator instance with pre-registered schemas
18
+ * @param resolveCompiled - Optional replacement for name-based lookup. Return
19
+ * undefined when the current call has no schema and validation should be
20
+ * skipped.
21
+ */
22
+ export declare function createValidationMiddleware(validator: SchemaValidator, resolveCompiled?: CompiledSchemaResolver): Middleware;
23
+ export {};
24
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/src/middleware/validation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,uBAAuB,EACvB,eAAe,EAChB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEhE,KAAK,sBAAsB,GAAG,CAC5B,GAAG,EAAE,iBAAiB,KACnB,uBAAuB,GAAG,SAAS,CAAC;AAEzC;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,eAAe,EAC1B,eAAe,CAAC,EAAE,sBAAsB,GACvC,UAAU,CAUZ"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Schema validation middleware.
3
+ *
4
+ * Validates tool arguments against JSON Schema before execution.
5
+ *
6
+ * @module lib/server/middleware/validation
7
+ */
8
+ /**
9
+ * Create a schema validation middleware.
10
+ *
11
+ * Validates `ctx.args` against the registered schema for `ctx.toolName`.
12
+ * Throws with a descriptive error if validation fails.
13
+ *
14
+ * @param validator - SchemaValidator instance with pre-registered schemas
15
+ * @param resolveCompiled - Optional replacement for name-based lookup. Return
16
+ * undefined when the current call has no schema and validation should be
17
+ * skipped.
18
+ */
19
+ export function createValidationMiddleware(validator, resolveCompiled) {
20
+ // deno-lint-ignore require-await
21
+ return async (ctx, next) => {
22
+ if (resolveCompiled) {
23
+ resolveCompiled(ctx)?.validateOrThrow(ctx.toolName, ctx.args);
24
+ }
25
+ else {
26
+ validator.validateOrThrow(ctx.toolName, ctx.args);
27
+ }
28
+ return next();
29
+ };
30
+ }
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Capability check for MRTR inputRequests (spec 2026-07-28, SEP-2322).
3
+ *
4
+ * Rule 7 (MUST NOT): "Servers MUST NOT emit an inputRequest for a capability
5
+ * the client has not declared in io.modelcontextprotocol/clientCapabilities."
6
+ *
7
+ * In the stateless transport model, `clientCapabilities` is per-request: it
8
+ * arrives in `params._meta["io.modelcontextprotocol/clientCapabilities"]` and
9
+ * is therefore already parsed by the time this check runs. There is no session
10
+ * to cache it from — each call carries its own capability declaration.
11
+ *
12
+ * The function is pure: it takes the data it needs and returns a typed result.
13
+ * No network, no server state, no side effects.
14
+ *
15
+ * @module lib/server/mrtr/capability-check
16
+ */
17
+ import type { InputRequestEntry } from "./types.js";
18
+ /** Successful capability check — all methods map to declared capabilities. */
19
+ export interface CapabilityCheckOk {
20
+ /**
21
+ * The canonical form of `inputRequests` — the value the caller MUST emit.
22
+ *
23
+ * Checking a JSON clone and then serialising the original is two serialisations,
24
+ * and a stateful `toJSON()` can return different values for each. That is not a
25
+ * theoretical gap: it reopens exactly the bypass canonicalisation was added to
26
+ * close. Emit this, not the input.
27
+ */
28
+ readonly canonicalRequests?: Record<string, unknown>;
29
+ readonly ok: true;
30
+ }
31
+ /** Failed capability check — one or more capabilities are missing. */
32
+ export interface CapabilityCheckFail {
33
+ /**
34
+ * Which fault this is.
35
+ *
36
+ * `missing_capability` — the client did not declare something the request needs.
37
+ * That is the client's to fix, and `-32021` says exactly that.
38
+ *
39
+ * `malformed` — the SERVER produced an input request that is structurally
40
+ * invalid: an unknown method, a missing or non-object `params`, a map that will
41
+ * not serialise. Reporting those as a missing capability tells the client to
42
+ * declare something it already has, and hides a server bug behind a client-facing
43
+ * error.
44
+ */
45
+ readonly kind: "missing_capability" | "malformed";
46
+ /**
47
+ * `ClientCapabilities`-shaped payload for the error's `data`, when the missing
48
+ * capability is nested. Absent for top-level ones, where the caller derives it
49
+ * from `missingCapabilities`.
50
+ */
51
+ readonly requiredCapabilities?: Record<string, unknown>;
52
+ readonly ok: false;
53
+ /**
54
+ * Top-level `ClientCapabilities` keys the client did not declare but the
55
+ * `inputRequests` map requires.
56
+ *
57
+ * Forward these directly into `-32021 MissingRequiredClientCapabilityError`
58
+ * as `data.requiredCapabilities` (spec 2026-07-28 §per-request protocol fields).
59
+ *
60
+ * Example: `["sampling", "elicitation"]` if both are absent.
61
+ */
62
+ readonly missingCapabilities: string[];
63
+ }
64
+ export type CapabilityCheckResult = CapabilityCheckOk | CapabilityCheckFail;
65
+ /**
66
+ * The only methods an input request may carry, mapped to the capability each needs.
67
+ *
68
+ * Exported so the Tasks boundary enforces the same grammar. A task that requests
69
+ * input uses MRTR request shapes, and a second, looser list there is how a task
70
+ * ends up asking for a method no client implements — which strands it rather than
71
+ * failing it.
72
+ */
73
+ export declare const METHOD_TO_CAPABILITY: Readonly<Record<string, string>>;
74
+ export declare function checkInputRequestCapabilities(inputRequests: Record<string, InputRequestEntry>, clientCapabilities: Record<string, unknown> | undefined): CapabilityCheckResult;
75
+ //# sourceMappingURL=capability-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capability-check.d.ts","sourceRoot":"","sources":["../../../src/src/mrtr/capability-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAIpD,8EAA8E;AAC9E,MAAM,WAAW,iBAAiB;IAChC;;;;;;;OAOG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrD,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;CACnB;AAED,sEAAsE;AACtE,MAAM,WAAW,mBAAmB;IAClC;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,IAAI,EAAE,oBAAoB,GAAG,WAAW,CAAC;IAClD;;;;OAIG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxD,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB;;;;;;;;OAQG;IACH,QAAQ,CAAC,mBAAmB,EAAE,MAAM,EAAE,CAAC;CACxC;AAED,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,GAAG,mBAAmB,CAAC;AAS5E;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAIjE,CAAC;AA+CF,wBAAgB,6BAA6B,CAC3C,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,EAChD,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACtD,qBAAqB,CAkKvB"}