ostacky 0.5.4 → 0.5.6

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 (835) hide show
  1. package/README.md +34 -9
  2. package/assets/agents/ostacky.md +109 -29
  3. package/assets/commands/install-stack.md +222 -88
  4. package/assets/mcp/ostacky-controller/index.js +639 -999
  5. package/assets/mcp/ostacky-controller/node_modules/.package-lock.json +42 -0
  6. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/LICENSE +216 -0
  7. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/README.md +40 -0
  8. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-BUWfrB3C.d.cts +8198 -0
  9. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-BUWfrB3C.d.cts.map +1 -0
  10. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-CEFpHq32.cjs +2862 -0
  11. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-CEFpHq32.cjs.map +1 -0
  12. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-CNbu4K4a.d.mts +8198 -0
  13. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-CNbu4K4a.d.mts.map +1 -0
  14. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-DFgbUATV.mjs +1653 -0
  15. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/auth-DFgbUATV.mjs.map +1 -0
  16. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/index.cjs +174 -0
  17. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/index.d.cts +2 -0
  18. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/index.d.mts +2 -0
  19. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/index.mjs +3 -0
  20. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/internal.cjs +199 -0
  21. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/internal.d.cts +87 -0
  22. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/internal.d.cts.map +1 -0
  23. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/internal.d.mts +87 -0
  24. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/internal.d.mts.map +1 -0
  25. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/dist/internal.mjs +3 -0
  26. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/core/package.json +85 -0
  27. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/LICENSE +216 -0
  28. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/README.md +30 -0
  29. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/ajvProvider-B_4czhCS.d.cts +1054 -0
  30. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/ajvProvider-B_4czhCS.d.cts.map +1 -0
  31. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/ajvProvider-BdSo9BII.d.mts +1054 -0
  32. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/ajvProvider-BdSo9BII.d.mts.map +1 -0
  33. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/ajvProvider-Brn-Q2J_.cjs +7086 -0
  34. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/ajvProvider-Brn-Q2J_.cjs.map +1 -0
  35. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CplOkyLC.mjs +7069 -0
  36. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CplOkyLC.mjs.map +1 -0
  37. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-BYRW5af5.d.mts +59 -0
  38. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-BYRW5af5.d.mts.map +1 -0
  39. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-Bd-iTHAF.mjs +970 -0
  40. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-Bd-iTHAF.mjs.map +1 -0
  41. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-D9GAttn8.d.cts +59 -0
  42. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-D9GAttn8.d.cts.map +1 -0
  43. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-ojcZaap3.cjs +976 -0
  44. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-ojcZaap3.cjs.map +1 -0
  45. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/chunk-Bnu9O96Y.cjs +60 -0
  46. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/chunk-Br0eD_fh.mjs +42 -0
  47. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-BRM5MGf9.d.cts +4015 -0
  48. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-BRM5MGf9.d.cts.map +1 -0
  49. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-D93NefGZ.d.mts +4013 -0
  50. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-D93NefGZ.d.mts.map +1 -0
  51. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/index.cjs +1990 -0
  52. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/index.cjs.map +1 -0
  53. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/index.d.cts +732 -0
  54. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/index.d.cts.map +1 -0
  55. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/index.d.mts +732 -0
  56. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/index.d.mts.map +1 -0
  57. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/index.mjs +1813 -0
  58. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/index.mjs.map +1 -0
  59. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/mcp-Ctiu4nBa.mjs +1884 -0
  60. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/mcp-Ctiu4nBa.mjs.map +1 -0
  61. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/mcp-CzU40gwu.cjs +1963 -0
  62. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/mcp-CzU40gwu.cjs.map +1 -0
  63. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.cjs +23 -0
  64. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.cjs.map +1 -0
  65. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.cts +11 -0
  66. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.cts.map +1 -0
  67. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.mts +11 -0
  68. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.mts.map +1 -0
  69. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.mjs +22 -0
  70. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.mjs.map +1 -0
  71. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsNode.cjs +12 -0
  72. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsNode.d.cts +3 -0
  73. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsNode.d.mts +3 -0
  74. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsNode.mjs +4 -0
  75. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs +30 -0
  76. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs.map +1 -0
  77. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.cts +10 -0
  78. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.cts.map +1 -0
  79. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.mts +10 -0
  80. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.mts.map +1 -0
  81. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs +29 -0
  82. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs.map +1 -0
  83. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/src-D5Nfqtoz.mjs +7502 -0
  84. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/src-D5Nfqtoz.mjs.map +1 -0
  85. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/src-D9A7ArDn.cjs +8000 -0
  86. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/src-D9A7ArDn.cjs.map +1 -0
  87. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/stdio.cjs +564 -0
  88. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/stdio.cjs.map +1 -0
  89. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts +107 -0
  90. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts.map +1 -0
  91. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts +107 -0
  92. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts.map +1 -0
  93. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/stdio.mjs +562 -0
  94. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/stdio.mjs.map +1 -0
  95. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/types-DsbMXNFL.d.cts +1099 -0
  96. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/types-DsbMXNFL.d.cts.map +1 -0
  97. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/types-mS0yxCL0.d.mts +1099 -0
  98. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/types-mS0yxCL0.d.mts.map +1 -0
  99. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/validators/ajv.cjs +5 -0
  100. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/validators/ajv.d.cts +2 -0
  101. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/validators/ajv.d.mts +2 -0
  102. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/validators/ajv.mjs +3 -0
  103. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.cjs +3 -0
  104. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.d.cts +2 -0
  105. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.d.mts +2 -0
  106. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.mjs +3 -0
  107. package/assets/mcp/ostacky-controller/node_modules/@modelcontextprotocol/server/package.json +160 -0
  108. package/assets/mcp/ostacky-controller/node_modules/zod/LICENSE +21 -0
  109. package/assets/mcp/ostacky-controller/node_modules/zod/README.md +191 -0
  110. package/assets/mcp/ostacky-controller/node_modules/zod/index.cjs +33 -0
  111. package/assets/mcp/ostacky-controller/node_modules/zod/index.d.cts +4 -0
  112. package/assets/mcp/ostacky-controller/node_modules/zod/index.d.ts +4 -0
  113. package/assets/mcp/ostacky-controller/node_modules/zod/index.js +4 -0
  114. package/assets/mcp/ostacky-controller/node_modules/zod/locales/index.cjs +17 -0
  115. package/assets/mcp/ostacky-controller/node_modules/zod/locales/index.d.cts +1 -0
  116. package/assets/mcp/ostacky-controller/node_modules/zod/locales/index.d.ts +1 -0
  117. package/assets/mcp/ostacky-controller/node_modules/zod/locales/index.js +1 -0
  118. package/assets/mcp/ostacky-controller/node_modules/zod/locales/package.json +7 -0
  119. package/assets/mcp/ostacky-controller/node_modules/zod/mini/index.cjs +32 -0
  120. package/assets/mcp/ostacky-controller/node_modules/zod/mini/index.d.cts +3 -0
  121. package/assets/mcp/ostacky-controller/node_modules/zod/mini/index.d.ts +3 -0
  122. package/assets/mcp/ostacky-controller/node_modules/zod/mini/index.js +3 -0
  123. package/assets/mcp/ostacky-controller/node_modules/zod/mini/package.json +7 -0
  124. package/assets/mcp/ostacky-controller/node_modules/zod/package.json +135 -0
  125. package/assets/mcp/ostacky-controller/node_modules/zod/src/index.ts +4 -0
  126. package/assets/mcp/ostacky-controller/node_modules/zod/src/locales/index.ts +1 -0
  127. package/assets/mcp/ostacky-controller/node_modules/zod/src/mini/index.ts +3 -0
  128. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/ZodError.ts +330 -0
  129. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  130. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  131. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
  132. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  133. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
  134. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  135. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  136. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
  137. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
  138. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/errors.ts +13 -0
  139. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/external.ts +6 -0
  140. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  141. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  142. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  143. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  144. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  145. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/helpers/util.ts +224 -0
  146. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/index.ts +4 -0
  147. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/locales/en.ts +124 -0
  148. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/standard-schema.ts +113 -0
  149. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
  150. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  151. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  152. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/array.test.ts +71 -0
  153. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  154. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  155. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/base.test.ts +29 -0
  156. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  157. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
  158. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
  159. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  160. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
  161. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
  162. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/date.test.ts +32 -0
  163. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  164. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/default.test.ts +112 -0
  165. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/description.test.ts +33 -0
  166. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  167. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
  168. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/error.test.ts +551 -0
  169. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  170. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  171. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/function.test.ts +261 -0
  172. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
  173. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  174. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  175. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  176. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  177. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
  178. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/map.test.ts +110 -0
  179. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
  180. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  181. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
  182. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  183. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  184. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/number.test.ts +176 -0
  185. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  186. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  187. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/object.test.ts +434 -0
  188. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
  189. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  190. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
  191. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
  192. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  193. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  194. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  195. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  196. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
  197. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  198. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/record.test.ts +171 -0
  199. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  200. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
  201. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  202. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/set.test.ts +142 -0
  203. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  204. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/string.test.ts +916 -0
  205. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  206. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  207. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
  208. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
  209. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/tests/void.test.ts +15 -0
  210. package/assets/mcp/ostacky-controller/node_modules/zod/src/v3/types.ts +5138 -0
  211. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/checks.ts +32 -0
  212. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/coerce.ts +27 -0
  213. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/compat.ts +70 -0
  214. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/errors.ts +82 -0
  215. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/external.ts +52 -0
  216. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/from-json-schema.ts +659 -0
  217. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/index.ts +5 -0
  218. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/iso.ts +90 -0
  219. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/parse.ts +82 -0
  220. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/schemas.ts +2672 -0
  221. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  222. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
  223. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  224. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/assignability.test.ts +216 -0
  225. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  226. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  227. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  228. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  229. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
  230. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/catch.test.ts +326 -0
  231. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  232. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
  233. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/codec.test.ts +703 -0
  234. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  235. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
  236. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  237. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
  238. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
  239. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/default.test.ts +409 -0
  240. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
  241. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  242. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +197 -0
  243. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +694 -0
  244. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  245. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +807 -0
  246. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  247. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
  248. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
  249. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
  250. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +895 -0
  251. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
  252. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  253. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/global-config.test.ts +39 -0
  254. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
  255. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
  256. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
  257. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
  258. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +46 -0
  259. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
  260. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  261. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
  262. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
  263. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
  264. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
  265. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  266. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  267. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
  268. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  269. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/number.test.ts +325 -0
  270. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/object.test.ts +717 -0
  271. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/optional.test.ts +333 -0
  272. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/partial.test.ts +450 -0
  273. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
  274. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
  275. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
  276. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +26 -0
  277. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +351 -0
  278. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  279. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  280. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  281. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  282. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/record.test.ts +717 -0
  283. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +631 -0
  284. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/refine.test.ts +633 -0
  285. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
  286. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
  287. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
  288. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
  289. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/string.test.ts +1224 -0
  290. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
  291. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
  292. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
  293. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +3125 -0
  294. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/transform.test.ts +378 -0
  295. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/tuple.test.ts +496 -0
  296. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/union.test.ts +273 -0
  297. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
  298. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  299. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  300. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/api.ts +1823 -0
  301. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/checks.ts +1293 -0
  302. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/config.ts +15 -0
  303. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/core.ts +153 -0
  304. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/doc.ts +44 -0
  305. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/errors.ts +455 -0
  306. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/index.ts +16 -0
  307. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
  308. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/json-schema-processors.ts +666 -0
  309. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/json-schema.ts +147 -0
  310. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/parse.ts +195 -0
  311. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/regexes.ts +190 -0
  312. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/registries.ts +105 -0
  313. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/schemas.ts +4730 -0
  314. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
  315. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
  316. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  317. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  318. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/tests/locales/el.test.ts +215 -0
  319. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  320. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
  321. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
  322. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
  323. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
  324. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
  325. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  326. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  327. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
  328. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
  329. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
  330. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/to-json-schema.ts +622 -0
  331. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/util.ts +983 -0
  332. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/versions.ts +5 -0
  333. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/core/zsf.ts +323 -0
  334. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/index.ts +4 -0
  335. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/ar.ts +115 -0
  336. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/az.ts +111 -0
  337. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/be.ts +176 -0
  338. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/bg.ts +128 -0
  339. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/ca.ts +116 -0
  340. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/cs.ts +118 -0
  341. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/da.ts +123 -0
  342. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/de.ts +116 -0
  343. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/el.ts +121 -0
  344. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/en.ts +123 -0
  345. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/eo.ts +118 -0
  346. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/es.ts +141 -0
  347. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/fa.ts +126 -0
  348. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/fi.ts +121 -0
  349. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
  350. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/fr.ts +132 -0
  351. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/he.ts +246 -0
  352. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/hr.ts +131 -0
  353. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/hu.ts +117 -0
  354. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/hy.ts +164 -0
  355. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/id.ts +115 -0
  356. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/index.ts +52 -0
  357. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/is.ts +119 -0
  358. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/it.ts +116 -0
  359. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/ja.ts +114 -0
  360. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/ka.ts +123 -0
  361. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/kh.ts +7 -0
  362. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/km.ts +119 -0
  363. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/ko.ts +121 -0
  364. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/lt.ts +239 -0
  365. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/mk.ts +118 -0
  366. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/ms.ts +115 -0
  367. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/nl.ts +121 -0
  368. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/no.ts +116 -0
  369. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/ota.ts +117 -0
  370. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/pl.ts +118 -0
  371. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/ps.ts +126 -0
  372. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/pt.ts +116 -0
  373. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/ro.ts +129 -0
  374. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/ru.ts +176 -0
  375. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/sl.ts +118 -0
  376. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/sv.ts +119 -0
  377. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/ta.ts +118 -0
  378. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/th.ts +119 -0
  379. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/tr.ts +111 -0
  380. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/ua.ts +7 -0
  381. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/uk.ts +117 -0
  382. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/ur.ts +119 -0
  383. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/uz.ts +117 -0
  384. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/vi.ts +117 -0
  385. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/yo.ts +124 -0
  386. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
  387. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
  388. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/mini/checks.ts +32 -0
  389. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/mini/coerce.ts +27 -0
  390. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/mini/external.ts +41 -0
  391. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/mini/index.ts +3 -0
  392. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/mini/iso.ts +66 -0
  393. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/mini/parse.ts +14 -0
  394. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/mini/schemas.ts +1947 -0
  395. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
  396. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  397. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
  398. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  399. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/mini/tests/codec.test.ts +548 -0
  400. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  401. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  402. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
  403. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/mini/tests/index.test.ts +993 -0
  404. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  405. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
  406. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  407. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +325 -0
  408. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
  409. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4/mini/tests/string.test.ts +352 -0
  410. package/assets/mcp/ostacky-controller/node_modules/zod/src/v4-mini/index.ts +3 -0
  411. package/assets/mcp/ostacky-controller/node_modules/zod/v3/ZodError.cjs +138 -0
  412. package/assets/mcp/ostacky-controller/node_modules/zod/v3/ZodError.d.cts +164 -0
  413. package/assets/mcp/ostacky-controller/node_modules/zod/v3/ZodError.d.ts +164 -0
  414. package/assets/mcp/ostacky-controller/node_modules/zod/v3/ZodError.js +133 -0
  415. package/assets/mcp/ostacky-controller/node_modules/zod/v3/errors.cjs +17 -0
  416. package/assets/mcp/ostacky-controller/node_modules/zod/v3/errors.d.cts +5 -0
  417. package/assets/mcp/ostacky-controller/node_modules/zod/v3/errors.d.ts +5 -0
  418. package/assets/mcp/ostacky-controller/node_modules/zod/v3/errors.js +9 -0
  419. package/assets/mcp/ostacky-controller/node_modules/zod/v3/external.cjs +22 -0
  420. package/assets/mcp/ostacky-controller/node_modules/zod/v3/external.d.cts +6 -0
  421. package/assets/mcp/ostacky-controller/node_modules/zod/v3/external.d.ts +6 -0
  422. package/assets/mcp/ostacky-controller/node_modules/zod/v3/external.js +6 -0
  423. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
  424. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  425. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  426. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  427. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
  428. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  429. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  430. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  431. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
  432. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  433. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  434. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  435. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
  436. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  437. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  438. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  439. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
  440. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  441. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  442. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  443. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/util.cjs +137 -0
  444. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/util.d.cts +85 -0
  445. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/util.d.ts +85 -0
  446. package/assets/mcp/ostacky-controller/node_modules/zod/v3/helpers/util.js +133 -0
  447. package/assets/mcp/ostacky-controller/node_modules/zod/v3/index.cjs +33 -0
  448. package/assets/mcp/ostacky-controller/node_modules/zod/v3/index.d.cts +4 -0
  449. package/assets/mcp/ostacky-controller/node_modules/zod/v3/index.d.ts +4 -0
  450. package/assets/mcp/ostacky-controller/node_modules/zod/v3/index.js +4 -0
  451. package/assets/mcp/ostacky-controller/node_modules/zod/v3/locales/en.cjs +112 -0
  452. package/assets/mcp/ostacky-controller/node_modules/zod/v3/locales/en.d.cts +3 -0
  453. package/assets/mcp/ostacky-controller/node_modules/zod/v3/locales/en.d.ts +3 -0
  454. package/assets/mcp/ostacky-controller/node_modules/zod/v3/locales/en.js +109 -0
  455. package/assets/mcp/ostacky-controller/node_modules/zod/v3/package.json +7 -0
  456. package/assets/mcp/ostacky-controller/node_modules/zod/v3/standard-schema.cjs +2 -0
  457. package/assets/mcp/ostacky-controller/node_modules/zod/v3/standard-schema.d.cts +102 -0
  458. package/assets/mcp/ostacky-controller/node_modules/zod/v3/standard-schema.d.ts +102 -0
  459. package/assets/mcp/ostacky-controller/node_modules/zod/v3/standard-schema.js +1 -0
  460. package/assets/mcp/ostacky-controller/node_modules/zod/v3/types.cjs +3777 -0
  461. package/assets/mcp/ostacky-controller/node_modules/zod/v3/types.d.cts +1034 -0
  462. package/assets/mcp/ostacky-controller/node_modules/zod/v3/types.d.ts +1034 -0
  463. package/assets/mcp/ostacky-controller/node_modules/zod/v3/types.js +3695 -0
  464. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/checks.cjs +33 -0
  465. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/checks.d.cts +1 -0
  466. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/checks.d.ts +1 -0
  467. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/checks.js +1 -0
  468. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/coerce.cjs +47 -0
  469. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/coerce.d.cts +17 -0
  470. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/coerce.d.ts +17 -0
  471. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/coerce.js +17 -0
  472. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/compat.cjs +61 -0
  473. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/compat.d.cts +50 -0
  474. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/compat.d.ts +50 -0
  475. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/compat.js +31 -0
  476. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/errors.cjs +74 -0
  477. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/errors.d.cts +30 -0
  478. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/errors.d.ts +30 -0
  479. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/errors.js +48 -0
  480. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/external.cjs +73 -0
  481. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/external.d.cts +16 -0
  482. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/external.d.ts +16 -0
  483. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/external.js +20 -0
  484. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/from-json-schema.cjs +625 -0
  485. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
  486. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
  487. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/from-json-schema.js +599 -0
  488. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/index.cjs +33 -0
  489. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/index.d.cts +4 -0
  490. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/index.d.ts +4 -0
  491. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/index.js +4 -0
  492. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/iso.cjs +60 -0
  493. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/iso.d.cts +22 -0
  494. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/iso.d.ts +22 -0
  495. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/iso.js +30 -0
  496. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/package.json +7 -0
  497. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/parse.cjs +41 -0
  498. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/parse.d.cts +31 -0
  499. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/parse.d.ts +31 -0
  500. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/parse.js +15 -0
  501. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/schemas.cjs +1511 -0
  502. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/schemas.d.cts +767 -0
  503. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/schemas.d.ts +767 -0
  504. package/assets/mcp/ostacky-controller/node_modules/zod/v4/classic/schemas.js +1395 -0
  505. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/api.cjs +1227 -0
  506. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/api.d.cts +325 -0
  507. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/api.d.ts +325 -0
  508. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/api.js +1087 -0
  509. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/checks.cjs +601 -0
  510. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/checks.d.cts +278 -0
  511. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/checks.d.ts +278 -0
  512. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/checks.js +575 -0
  513. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/core.cjs +85 -0
  514. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/core.d.cts +70 -0
  515. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/core.d.ts +70 -0
  516. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/core.js +78 -0
  517. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/doc.cjs +39 -0
  518. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/doc.d.cts +14 -0
  519. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/doc.d.ts +14 -0
  520. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/doc.js +35 -0
  521. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/errors.cjs +216 -0
  522. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/errors.d.cts +221 -0
  523. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/errors.d.ts +221 -0
  524. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/errors.js +185 -0
  525. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/index.cjs +47 -0
  526. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/index.d.cts +16 -0
  527. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/index.d.ts +16 -0
  528. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/index.js +16 -0
  529. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
  530. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
  531. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
  532. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/json-schema-generator.js +95 -0
  533. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/json-schema-processors.cjs +644 -0
  534. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
  535. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
  536. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/json-schema-processors.js +601 -0
  537. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/json-schema.cjs +2 -0
  538. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/json-schema.d.cts +88 -0
  539. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/json-schema.d.ts +88 -0
  540. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/json-schema.js +1 -0
  541. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/package.json +7 -0
  542. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/parse.cjs +131 -0
  543. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/parse.d.cts +49 -0
  544. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/parse.d.ts +49 -0
  545. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/parse.js +93 -0
  546. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/regexes.cjs +172 -0
  547. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/regexes.d.cts +85 -0
  548. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/regexes.d.ts +85 -0
  549. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/regexes.js +139 -0
  550. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/registries.cjs +56 -0
  551. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/registries.d.cts +35 -0
  552. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/registries.d.ts +35 -0
  553. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/registries.js +51 -0
  554. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/schemas.cjs +2270 -0
  555. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/schemas.d.cts +1184 -0
  556. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/schemas.d.ts +1184 -0
  557. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/schemas.js +2239 -0
  558. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/standard-schema.cjs +2 -0
  559. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
  560. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
  561. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/standard-schema.js +1 -0
  562. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/to-json-schema.cjs +457 -0
  563. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
  564. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
  565. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/to-json-schema.js +448 -0
  566. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/util.cjs +734 -0
  567. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/util.d.cts +200 -0
  568. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/util.d.ts +200 -0
  569. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/util.js +674 -0
  570. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/versions.cjs +8 -0
  571. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/versions.d.cts +5 -0
  572. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/versions.d.ts +5 -0
  573. package/assets/mcp/ostacky-controller/node_modules/zod/v4/core/versions.js +5 -0
  574. package/assets/mcp/ostacky-controller/node_modules/zod/v4/index.cjs +22 -0
  575. package/assets/mcp/ostacky-controller/node_modules/zod/v4/index.d.cts +3 -0
  576. package/assets/mcp/ostacky-controller/node_modules/zod/v4/index.d.ts +3 -0
  577. package/assets/mcp/ostacky-controller/node_modules/zod/v4/index.js +3 -0
  578. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ar.cjs +133 -0
  579. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ar.d.cts +5 -0
  580. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ar.d.ts +4 -0
  581. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ar.js +106 -0
  582. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/az.cjs +132 -0
  583. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/az.d.cts +5 -0
  584. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/az.d.ts +4 -0
  585. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/az.js +105 -0
  586. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/be.cjs +183 -0
  587. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/be.d.cts +5 -0
  588. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/be.d.ts +4 -0
  589. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/be.js +156 -0
  590. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/bg.cjs +147 -0
  591. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/bg.d.cts +5 -0
  592. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/bg.d.ts +4 -0
  593. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/bg.js +120 -0
  594. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ca.cjs +134 -0
  595. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ca.d.cts +5 -0
  596. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ca.d.ts +4 -0
  597. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ca.js +107 -0
  598. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/cs.cjs +138 -0
  599. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/cs.d.cts +5 -0
  600. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/cs.d.ts +4 -0
  601. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/cs.js +111 -0
  602. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/da.cjs +142 -0
  603. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/da.d.cts +5 -0
  604. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/da.d.ts +4 -0
  605. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/da.js +115 -0
  606. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/de.cjs +135 -0
  607. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/de.d.cts +5 -0
  608. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/de.d.ts +4 -0
  609. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/de.js +108 -0
  610. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/el.cjs +136 -0
  611. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/el.d.cts +5 -0
  612. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/el.d.ts +4 -0
  613. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/el.js +109 -0
  614. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/en.cjs +140 -0
  615. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/en.d.cts +5 -0
  616. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/en.d.ts +4 -0
  617. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/en.js +113 -0
  618. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/eo.cjs +136 -0
  619. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/eo.d.cts +5 -0
  620. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/eo.d.ts +4 -0
  621. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/eo.js +109 -0
  622. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/es.cjs +159 -0
  623. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/es.d.cts +5 -0
  624. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/es.d.ts +4 -0
  625. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/es.js +132 -0
  626. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/fa.cjs +141 -0
  627. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/fa.d.cts +5 -0
  628. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/fa.d.ts +4 -0
  629. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/fa.js +114 -0
  630. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/fi.cjs +139 -0
  631. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/fi.d.cts +5 -0
  632. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/fi.d.ts +4 -0
  633. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/fi.js +112 -0
  634. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
  635. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
  636. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  637. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/fr-CA.js +107 -0
  638. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/fr.cjs +152 -0
  639. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/fr.d.cts +5 -0
  640. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/fr.d.ts +4 -0
  641. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/fr.js +125 -0
  642. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/he.cjs +241 -0
  643. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/he.d.cts +5 -0
  644. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/he.d.ts +4 -0
  645. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/he.js +214 -0
  646. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/hr.cjs +149 -0
  647. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/hr.d.cts +5 -0
  648. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/hr.d.ts +4 -0
  649. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/hr.js +122 -0
  650. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/hu.cjs +135 -0
  651. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/hu.d.cts +5 -0
  652. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/hu.d.ts +4 -0
  653. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/hu.js +108 -0
  654. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/hy.cjs +174 -0
  655. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/hy.d.cts +5 -0
  656. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/hy.d.ts +4 -0
  657. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/hy.js +147 -0
  658. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/id.cjs +133 -0
  659. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/id.d.cts +5 -0
  660. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/id.d.ts +4 -0
  661. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/id.js +106 -0
  662. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/index.cjs +111 -0
  663. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/index.d.cts +52 -0
  664. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/index.d.ts +52 -0
  665. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/index.js +52 -0
  666. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/is.cjs +136 -0
  667. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/is.d.cts +5 -0
  668. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/is.d.ts +4 -0
  669. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/is.js +109 -0
  670. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/it.cjs +135 -0
  671. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/it.d.cts +5 -0
  672. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/it.d.ts +4 -0
  673. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/it.js +108 -0
  674. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ja.cjs +134 -0
  675. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ja.d.cts +5 -0
  676. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ja.d.ts +4 -0
  677. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ja.js +107 -0
  678. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ka.cjs +139 -0
  679. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ka.d.cts +5 -0
  680. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ka.d.ts +4 -0
  681. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ka.js +112 -0
  682. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/kh.cjs +12 -0
  683. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/kh.d.cts +5 -0
  684. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/kh.d.ts +5 -0
  685. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/kh.js +5 -0
  686. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/km.cjs +137 -0
  687. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/km.d.cts +5 -0
  688. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/km.d.ts +4 -0
  689. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/km.js +110 -0
  690. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ko.cjs +138 -0
  691. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ko.d.cts +5 -0
  692. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ko.d.ts +4 -0
  693. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ko.js +111 -0
  694. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/lt.cjs +230 -0
  695. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/lt.d.cts +5 -0
  696. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/lt.d.ts +4 -0
  697. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/lt.js +203 -0
  698. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/mk.cjs +136 -0
  699. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/mk.d.cts +5 -0
  700. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/mk.d.ts +4 -0
  701. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/mk.js +109 -0
  702. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ms.cjs +134 -0
  703. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ms.d.cts +5 -0
  704. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ms.d.ts +4 -0
  705. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ms.js +107 -0
  706. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/nl.cjs +137 -0
  707. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/nl.d.cts +5 -0
  708. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/nl.d.ts +4 -0
  709. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/nl.js +110 -0
  710. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/no.cjs +135 -0
  711. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/no.d.cts +5 -0
  712. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/no.d.ts +4 -0
  713. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/no.js +108 -0
  714. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ota.cjs +136 -0
  715. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ota.d.cts +5 -0
  716. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ota.d.ts +4 -0
  717. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ota.js +109 -0
  718. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/package.json +7 -0
  719. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/pl.cjs +136 -0
  720. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/pl.d.cts +5 -0
  721. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/pl.d.ts +4 -0
  722. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/pl.js +109 -0
  723. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ps.cjs +141 -0
  724. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ps.d.cts +5 -0
  725. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ps.d.ts +4 -0
  726. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ps.js +114 -0
  727. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/pt.cjs +135 -0
  728. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/pt.d.cts +5 -0
  729. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/pt.d.ts +4 -0
  730. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/pt.js +108 -0
  731. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ro.cjs +146 -0
  732. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ro.d.cts +5 -0
  733. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ro.d.ts +4 -0
  734. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ro.js +119 -0
  735. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ru.cjs +183 -0
  736. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ru.d.cts +5 -0
  737. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ru.d.ts +4 -0
  738. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ru.js +156 -0
  739. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/sl.cjs +136 -0
  740. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/sl.d.cts +5 -0
  741. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/sl.d.ts +4 -0
  742. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/sl.js +109 -0
  743. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/sv.cjs +137 -0
  744. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/sv.d.cts +5 -0
  745. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/sv.d.ts +4 -0
  746. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/sv.js +110 -0
  747. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ta.cjs +137 -0
  748. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ta.d.cts +5 -0
  749. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ta.d.ts +4 -0
  750. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ta.js +110 -0
  751. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/th.cjs +137 -0
  752. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/th.d.cts +5 -0
  753. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/th.d.ts +4 -0
  754. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/th.js +110 -0
  755. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/tr.cjs +132 -0
  756. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/tr.d.cts +5 -0
  757. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/tr.d.ts +4 -0
  758. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/tr.js +105 -0
  759. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ua.cjs +12 -0
  760. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ua.d.cts +5 -0
  761. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ua.d.ts +5 -0
  762. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ua.js +5 -0
  763. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/uk.cjs +135 -0
  764. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/uk.d.cts +5 -0
  765. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/uk.d.ts +4 -0
  766. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/uk.js +108 -0
  767. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ur.cjs +137 -0
  768. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ur.d.cts +5 -0
  769. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ur.d.ts +4 -0
  770. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/ur.js +110 -0
  771. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/uz.cjs +137 -0
  772. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/uz.d.cts +5 -0
  773. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/uz.d.ts +4 -0
  774. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/uz.js +110 -0
  775. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/vi.cjs +135 -0
  776. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/vi.d.cts +5 -0
  777. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/vi.d.ts +4 -0
  778. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/vi.js +108 -0
  779. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/yo.cjs +134 -0
  780. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/yo.d.cts +5 -0
  781. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/yo.d.ts +4 -0
  782. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/yo.js +107 -0
  783. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
  784. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
  785. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  786. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/zh-CN.js +109 -0
  787. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
  788. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
  789. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  790. package/assets/mcp/ostacky-controller/node_modules/zod/v4/locales/zh-TW.js +107 -0
  791. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/checks.cjs +34 -0
  792. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/checks.d.cts +1 -0
  793. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/checks.d.ts +1 -0
  794. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/checks.js +1 -0
  795. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/coerce.cjs +52 -0
  796. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/coerce.d.cts +7 -0
  797. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/coerce.d.ts +7 -0
  798. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/coerce.js +22 -0
  799. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/external.cjs +63 -0
  800. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/external.d.cts +13 -0
  801. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/external.d.ts +13 -0
  802. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/external.js +14 -0
  803. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/index.cjs +32 -0
  804. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/index.d.cts +3 -0
  805. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/index.d.ts +3 -0
  806. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/index.js +3 -0
  807. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/iso.cjs +64 -0
  808. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/iso.d.cts +22 -0
  809. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/iso.d.ts +22 -0
  810. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/iso.js +34 -0
  811. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/package.json +7 -0
  812. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/parse.cjs +16 -0
  813. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/parse.d.cts +1 -0
  814. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/parse.d.ts +1 -0
  815. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/parse.js +1 -0
  816. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/schemas.cjs +1083 -0
  817. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/schemas.d.cts +445 -0
  818. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/schemas.d.ts +445 -0
  819. package/assets/mcp/ostacky-controller/node_modules/zod/v4/mini/schemas.js +961 -0
  820. package/assets/mcp/ostacky-controller/node_modules/zod/v4/package.json +7 -0
  821. package/assets/mcp/ostacky-controller/node_modules/zod/v4-mini/index.cjs +32 -0
  822. package/assets/mcp/ostacky-controller/node_modules/zod/v4-mini/index.d.cts +3 -0
  823. package/assets/mcp/ostacky-controller/node_modules/zod/v4-mini/index.d.ts +3 -0
  824. package/assets/mcp/ostacky-controller/node_modules/zod/v4-mini/index.js +3 -0
  825. package/assets/mcp/ostacky-controller/node_modules/zod/v4-mini/package.json +7 -0
  826. package/assets/mcp/ostacky-controller/package-lock.json +50 -0
  827. package/assets/mcp/ostacky-controller/package.json +6 -2
  828. package/assets/skills/question-validation/SKILL.md +77 -0
  829. package/dist/cli.js +760 -191
  830. package/dist/mcp/ask-user-server/index.js +19657 -0
  831. package/dist/mcp/ostacky-controller/index.js +20045 -0
  832. package/manifest.json +28 -28
  833. package/package.json +4 -2
  834. package/assets/mcp/ask-user-server/index.js +0 -382
  835. package/assets/mcp/ask-user-server/package.json +0 -6
@@ -0,0 +1,1990 @@
1
+ const require_chunk = require('./chunk-Bnu9O96Y.cjs');
2
+ const require_mcp = require('./mcp-CzU40gwu.cjs');
3
+ const require_src = require('./src-D9A7ArDn.cjs');
4
+ let _modelcontextprotocol_server__shims = require("@modelcontextprotocol/server/_shims");
5
+ let _modelcontextprotocol_core_internal = require("@modelcontextprotocol/core/internal");
6
+
7
+ //#region src/server/perRequestTransport.ts
8
+ /**
9
+ * The per-request micro-transport: a real, connected `Transport` whose whole
10
+ * lifetime is one HTTP exchange. See the module documentation for the
11
+ * response shapes it produces.
12
+ */
13
+ var PerRequestHTTPServerTransport = class {
14
+ onclose;
15
+ onerror;
16
+ onmessage;
17
+ _classification;
18
+ _responseMode;
19
+ _started = false;
20
+ _used = false;
21
+ _closed = false;
22
+ _terminalDelivered = false;
23
+ /**
24
+ * `true` only while the inbound message is being delivered synchronously
25
+ * to the connected protocol layer. The pre-handler gates (the era
26
+ * registry gate, the edge→instance handoff check, the missing-handler
27
+ * rejection) answer inside this window; request handlers always run
28
+ * after it (the protocol layer defers them to a microtask). An error
29
+ * sent inside the window is therefore ladder-originated, and an error
30
+ * sent after it is handler-produced.
31
+ */
32
+ _dispatchWindowOpen = false;
33
+ _requestId;
34
+ _deferredResponse;
35
+ _sse;
36
+ _abortCleanup;
37
+ constructor(options) {
38
+ this._classification = options.classification;
39
+ this._responseMode = options.responseMode ?? "auto";
40
+ }
41
+ async start() {
42
+ if (this._started) throw new Error("PerRequestHTTPServerTransport is already started");
43
+ this._started = true;
44
+ }
45
+ /**
46
+ * Serves the single exchange: delivers the classified message to the
47
+ * connected server instance and resolves with the HTTP response.
48
+ *
49
+ * Throws when called a second time (the transport is strictly
50
+ * single-use), or before a server has been connected to the transport.
51
+ * The returned promise rejects with a connection-closed error when the
52
+ * transport is closed before a response was produced (for example because
53
+ * the client disconnected).
54
+ */
55
+ async handleMessage(message, extra) {
56
+ if (this._used) throw new Error("PerRequestHTTPServerTransport serves exactly one exchange; construct a new transport per request");
57
+ if (!this._started || this.onmessage === void 0) throw new Error("PerRequestHTTPServerTransport is not connected: connect a server to this transport before handling a message");
58
+ if (this._closed) throw new Error("PerRequestHTTPServerTransport is closed");
59
+ this._used = true;
60
+ const signal = extra?.request?.signal;
61
+ if (signal?.aborted) {
62
+ await this.close();
63
+ throw new require_src.SdkError(require_src.SdkErrorCode.ConnectionClosed, "The request was aborted before it could be handled");
64
+ }
65
+ const messageExtra = {
66
+ classification: this._classification,
67
+ ...extra?.request !== void 0 && { request: extra.request },
68
+ ...extra?.authInfo !== void 0 && { authInfo: extra.authInfo }
69
+ };
70
+ if (require_src.isJSONRPCRequest(message)) {
71
+ this._requestId = message.id;
72
+ let resolve;
73
+ let reject;
74
+ const promise = new Promise((promiseResolve, promiseReject) => {
75
+ resolve = promiseResolve;
76
+ reject = promiseReject;
77
+ });
78
+ this._deferredResponse = {
79
+ promise,
80
+ resolve,
81
+ reject,
82
+ settled: false
83
+ };
84
+ if (signal !== void 0) {
85
+ const onAbort = () => void this.close();
86
+ signal.addEventListener("abort", onAbort, { once: true });
87
+ this._abortCleanup = () => signal.removeEventListener("abort", onAbort);
88
+ }
89
+ this._dispatchWindowOpen = true;
90
+ try {
91
+ this.onmessage(message, messageExtra);
92
+ } finally {
93
+ this._dispatchWindowOpen = false;
94
+ }
95
+ if (this._responseMode === "sse" && !this._closed && !this._deferredResponse.settled) this.upgradeToSse();
96
+ return promise;
97
+ }
98
+ this.onmessage(message, messageExtra);
99
+ return new Response(null, { status: 202 });
100
+ }
101
+ async send(message, options) {
102
+ if (this._closed) return;
103
+ const isResponse = require_src.isJSONRPCResultResponse(message) || require_src.isJSONRPCErrorResponse(message);
104
+ const relatedId = isResponse ? message.id : options?.relatedRequestId;
105
+ if (this._requestId === void 0 || relatedId === void 0 || relatedId !== this._requestId) {
106
+ if (isResponse) this.onerror?.(/* @__PURE__ */ new Error(`Received a response for an unknown request id: ${String(message.id)}`));
107
+ return;
108
+ }
109
+ if (isResponse) {
110
+ if (this._terminalDelivered) return;
111
+ this._terminalDelivered = true;
112
+ const errorCode = require_src.isJSONRPCErrorResponse(message) ? message.error.code : void 0;
113
+ const ladderStatus = errorCode !== void 0 && (this._dispatchWindowOpen || errorCode === require_src.ProtocolErrorCode.MissingRequiredClientCapability) ? require_src.LADDER_ERROR_HTTP_STATUS[errorCode] : void 0;
114
+ if (ladderStatus !== void 0 && this._sse === void 0) {
115
+ this.settleResponse(Response.json(message, {
116
+ status: ladderStatus,
117
+ headers: { "Content-Type": "application/json" }
118
+ }));
119
+ queueMicrotask(() => void this.close());
120
+ return;
121
+ }
122
+ if (this._sse !== void 0 || this._responseMode === "sse") {
123
+ if (this._sse === void 0) this.upgradeToSse();
124
+ this.writeMessageFrame(message);
125
+ this.finalizeStream();
126
+ return;
127
+ }
128
+ this.settleResponse(Response.json(message, {
129
+ status: 200,
130
+ headers: { "Content-Type": "application/json" }
131
+ }));
132
+ queueMicrotask(() => void this.close());
133
+ return;
134
+ }
135
+ if (this._responseMode === "json") return;
136
+ if (this._sse === void 0) this.upgradeToSse();
137
+ this.writeMessageFrame(message);
138
+ }
139
+ /**
140
+ * Writes an SSE comment frame (a keep-alive heartbeat). Dropped when the
141
+ * exchange is not currently streaming.
142
+ */
143
+ writeCommentFrame(comment) {
144
+ if (this._closed || this._sse === void 0 || this._sse.closed) return;
145
+ const frame = comment.split("\n").map((line) => `: ${line}`).join("\n");
146
+ this.writeFrame(`${frame}\n\n`);
147
+ }
148
+ async close() {
149
+ if (this._closed) return;
150
+ this._closed = true;
151
+ this._abortCleanup?.();
152
+ this._abortCleanup = void 0;
153
+ if (this._sse !== void 0 && !this._sse.closed) {
154
+ this._sse.closed = true;
155
+ try {
156
+ this._sse.controller.close();
157
+ } catch {}
158
+ }
159
+ if (this._deferredResponse !== void 0 && !this._deferredResponse.settled) {
160
+ this._deferredResponse.settled = true;
161
+ this._deferredResponse.reject(new require_src.SdkError(require_src.SdkErrorCode.ConnectionClosed, "Connection closed before a response was produced"));
162
+ }
163
+ this.onclose?.();
164
+ }
165
+ settleResponse(response) {
166
+ if (this._deferredResponse === void 0 || this._deferredResponse.settled) return;
167
+ this._deferredResponse.settled = true;
168
+ this._deferredResponse.resolve(response);
169
+ }
170
+ upgradeToSse() {
171
+ let controller;
172
+ const readable = new ReadableStream({
173
+ start: (streamController) => {
174
+ controller = streamController;
175
+ },
176
+ cancel: () => {
177
+ this.close();
178
+ }
179
+ });
180
+ this._sse = {
181
+ controller,
182
+ encoder: new TextEncoder(),
183
+ closed: false
184
+ };
185
+ this.settleResponse(new Response(readable, {
186
+ status: 200,
187
+ headers: {
188
+ "Content-Type": "text/event-stream",
189
+ "Cache-Control": "no-cache",
190
+ Connection: "keep-alive",
191
+ "X-Accel-Buffering": "no"
192
+ }
193
+ }));
194
+ }
195
+ finalizeStream() {
196
+ if (this._sse !== void 0 && !this._sse.closed) {
197
+ this._sse.closed = true;
198
+ try {
199
+ this._sse.controller.close();
200
+ } catch {}
201
+ }
202
+ queueMicrotask(() => void this.close());
203
+ }
204
+ writeMessageFrame(message) {
205
+ this.writeFrame(`event: message\ndata: ${JSON.stringify(message)}\n\n`);
206
+ }
207
+ writeFrame(frame) {
208
+ if (this._sse === void 0 || this._sse.closed) return;
209
+ try {
210
+ this._sse.controller.enqueue(this._sse.encoder.encode(frame));
211
+ } catch (error) {
212
+ this.onerror?.(/* @__PURE__ */ new Error(`Failed to write to the response stream: ${error}`));
213
+ }
214
+ }
215
+ };
216
+
217
+ //#endregion
218
+ //#region src/server/invoke.ts
219
+ /**
220
+ * Serves one classified inbound message on the given server instance and
221
+ * returns the HTTP response for the exchange.
222
+ *
223
+ * The instance is connected to a fresh single-exchange transport, the message
224
+ * is injected through the normal transport message path, and whatever the
225
+ * dispatch layer produces (the handler result, a protocol-level rejection, or
226
+ * streamed related messages followed by the result) is captured as the
227
+ * returned `Response`. For request exchanges, teardown rides the transport's
228
+ * close chain once the terminal response has been delivered; notification
229
+ * exchanges resolve with the 202 response immediately and do NOT run the
230
+ * close chain — the transport stays connected until the caller closes it or
231
+ * drops the per-request instance, which is the caller's choice either way.
232
+ */
233
+ async function invoke(server, message, ctx) {
234
+ const transport = new PerRequestHTTPServerTransport({
235
+ classification: ctx.classification,
236
+ ...ctx.responseMode !== void 0 && { responseMode: ctx.responseMode }
237
+ });
238
+ await server.connect(transport);
239
+ return transport.handleMessage(message, {
240
+ ...ctx.request !== void 0 && { request: ctx.request },
241
+ ...ctx.authInfo !== void 0 && { authInfo: ctx.authInfo }
242
+ });
243
+ }
244
+
245
+ //#endregion
246
+ //#region src/server/streamableHttp.ts
247
+ /**
248
+ * Server transport for Web Standards Streamable HTTP: this implements the MCP Streamable HTTP transport specification
249
+ * using Web Standard APIs (`Request`, `Response`, `ReadableStream`).
250
+ *
251
+ * This transport works on any runtime that supports Web Standards: Node.js 18+, Cloudflare Workers, Deno, Bun, etc.
252
+ *
253
+ * In stateful mode:
254
+ * - Session ID is generated and included in response headers
255
+ * - Session ID is always included in initialization responses
256
+ * - Requests with invalid session IDs are rejected with `404 Not Found`
257
+ * - Non-initialization requests without a session ID are rejected with `400 Bad Request`
258
+ * - State is maintained in-memory (connections, message history)
259
+ *
260
+ * In stateless mode:
261
+ * - No Session ID is included in any responses
262
+ * - No session validation is performed
263
+ *
264
+ * @example Stateful setup
265
+ * ```ts source="./streamableHttp.examples.ts#WebStandardStreamableHTTPServerTransport_stateful"
266
+ * const server = new McpServer({ name: 'my-server', version: '1.0.0' });
267
+ *
268
+ * const transport = new WebStandardStreamableHTTPServerTransport({
269
+ * sessionIdGenerator: () => crypto.randomUUID()
270
+ * });
271
+ *
272
+ * await server.connect(transport);
273
+ * ```
274
+ *
275
+ * @example Stateless setup
276
+ * ```ts source="./streamableHttp.examples.ts#WebStandardStreamableHTTPServerTransport_stateless"
277
+ * const transport = new WebStandardStreamableHTTPServerTransport({
278
+ * sessionIdGenerator: undefined
279
+ * });
280
+ * ```
281
+ *
282
+ * @example Hono.js
283
+ * ```ts source="./streamableHttp.examples.ts#WebStandardStreamableHTTPServerTransport_hono"
284
+ * app.all('/mcp', async c => {
285
+ * return transport.handleRequest(c.req.raw);
286
+ * });
287
+ * ```
288
+ *
289
+ * @example Cloudflare Workers
290
+ * ```ts source="./streamableHttp.examples.ts#WebStandardStreamableHTTPServerTransport_workers"
291
+ * const worker = {
292
+ * async fetch(request: Request): Promise<Response> {
293
+ * return transport.handleRequest(request);
294
+ * }
295
+ * };
296
+ * ```
297
+ */
298
+ var WebStandardStreamableHTTPServerTransport = class {
299
+ sessionIdGenerator;
300
+ _started = false;
301
+ _closed = false;
302
+ _streamMapping = /* @__PURE__ */ new Map();
303
+ _requestToStreamMapping = /* @__PURE__ */ new Map();
304
+ _requestResponseMap = /* @__PURE__ */ new Map();
305
+ _initialized = false;
306
+ _enableJsonResponse = false;
307
+ _standaloneSseStreamId = "_GET_stream";
308
+ _eventStore;
309
+ _onsessioninitialized;
310
+ _onsessionclosed;
311
+ _allowedHosts;
312
+ _allowedOrigins;
313
+ _enableDnsRebindingProtection;
314
+ _retryInterval;
315
+ _supportedProtocolVersions;
316
+ sessionId;
317
+ onclose;
318
+ onerror;
319
+ onmessage;
320
+ constructor(options = {}) {
321
+ this.sessionIdGenerator = options.sessionIdGenerator;
322
+ this._enableJsonResponse = options.enableJsonResponse ?? false;
323
+ this._eventStore = options.eventStore;
324
+ this._onsessioninitialized = options.onsessioninitialized;
325
+ this._onsessionclosed = options.onsessionclosed;
326
+ this._allowedHosts = options.allowedHosts;
327
+ this._allowedOrigins = options.allowedOrigins;
328
+ this._enableDnsRebindingProtection = options.enableDnsRebindingProtection ?? false;
329
+ this._retryInterval = options.retryInterval;
330
+ this._supportedProtocolVersions = options.supportedProtocolVersions ?? _modelcontextprotocol_core_internal.SUPPORTED_PROTOCOL_VERSIONS;
331
+ }
332
+ /**
333
+ * Starts the transport. This is required by the {@linkcode Transport} interface but is a no-op
334
+ * for the Streamable HTTP transport as connections are managed per-request.
335
+ */
336
+ async start() {
337
+ if (this._started) throw new Error("Transport already started");
338
+ this._started = true;
339
+ }
340
+ /**
341
+ * Sets the supported protocol versions for header validation.
342
+ * Called by the server during {@linkcode server/server.Server.connect | connect()} to pass its supported versions.
343
+ */
344
+ setSupportedProtocolVersions(versions) {
345
+ this._supportedProtocolVersions = versions;
346
+ }
347
+ /**
348
+ * Helper to create a JSON error response
349
+ */
350
+ createJsonErrorResponse(status, code, message, options) {
351
+ const error = {
352
+ code,
353
+ message
354
+ };
355
+ if (options?.data !== void 0) error.data = options.data;
356
+ return Response.json({
357
+ jsonrpc: "2.0",
358
+ error,
359
+ id: null
360
+ }, {
361
+ status,
362
+ headers: {
363
+ "Content-Type": "application/json",
364
+ ...options?.headers
365
+ }
366
+ });
367
+ }
368
+ /**
369
+ * Validates request headers for DNS rebinding protection.
370
+ * @returns Error response if validation fails, `undefined` if validation passes.
371
+ */
372
+ validateRequestHeaders(req) {
373
+ if (!this._enableDnsRebindingProtection) return;
374
+ if (this._allowedHosts && this._allowedHosts.length > 0) {
375
+ const hostHeader = req.headers.get("host");
376
+ if (!hostHeader || !this._allowedHosts.includes(hostHeader)) {
377
+ const error = `Invalid Host header: ${hostHeader}`;
378
+ this.onerror?.(new Error(error));
379
+ return this.createJsonErrorResponse(403, -32e3, error);
380
+ }
381
+ }
382
+ if (this._allowedOrigins && this._allowedOrigins.length > 0) {
383
+ const originHeader = req.headers.get("origin");
384
+ if (originHeader && !this._allowedOrigins.includes(originHeader)) {
385
+ const error = `Invalid Origin header: ${originHeader}`;
386
+ this.onerror?.(new Error(error));
387
+ return this.createJsonErrorResponse(403, -32e3, error);
388
+ }
389
+ }
390
+ }
391
+ /**
392
+ * Handles an incoming HTTP request, whether `GET`, `POST`, or `DELETE`
393
+ * Returns a `Response` object (Web Standard)
394
+ */
395
+ async handleRequest(req, options) {
396
+ const validationError = this.validateRequestHeaders(req);
397
+ if (validationError) return validationError;
398
+ switch (req.method) {
399
+ case "POST": return this.handlePostRequest(req, options);
400
+ case "GET": return this.handleGetRequest(req);
401
+ case "DELETE": return this.handleDeleteRequest(req);
402
+ default: return this.handleUnsupportedRequest();
403
+ }
404
+ }
405
+ /**
406
+ * Returns true if the client's protocol version supports empty SSE data in
407
+ * priming events (the fix shipped with protocol version `2025-11-25`).
408
+ *
409
+ * The version is checked for membership in this transport instance's
410
+ * supported protocol versions rather than with an open-ended
411
+ * `>= '2025-11-25'` comparison: the value may come from an `initialize`
412
+ * request body, which (unlike the `MCP-Protocol-Version` header) is not
413
+ * validated against `supportedProtocolVersions` before reaching this
414
+ * check. An unknown future version string must not silently enable
415
+ * behavior reserved for versions this transport actually supports.
416
+ */
417
+ supportsEmptySSEData(protocolVersion) {
418
+ return this._supportedProtocolVersions.includes(protocolVersion) && protocolVersion >= "2025-11-25";
419
+ }
420
+ /**
421
+ * Writes a priming event to establish resumption capability.
422
+ * Only sends if `eventStore` is configured (opt-in for resumability) and
423
+ * the client's protocol version supports empty SSE data (a supported
424
+ * version that is >= `2025-11-25`).
425
+ */
426
+ async writePrimingEvent(controller, encoder, streamId, protocolVersion) {
427
+ if (!this._eventStore) return;
428
+ if (!this.supportsEmptySSEData(protocolVersion)) return;
429
+ const primingEventId = await this._eventStore.storeEvent(streamId, {});
430
+ let primingEvent = `id: ${primingEventId}\ndata: \n\n`;
431
+ if (this._retryInterval !== void 0) primingEvent = `id: ${primingEventId}\nretry: ${this._retryInterval}\ndata: \n\n`;
432
+ controller.enqueue(encoder.encode(primingEvent));
433
+ }
434
+ /**
435
+ * Handles `GET` requests for SSE stream
436
+ */
437
+ async handleGetRequest(req) {
438
+ if (!req.headers.get("accept")?.includes("text/event-stream")) {
439
+ this.onerror?.(/* @__PURE__ */ new Error("Not Acceptable: Client must accept text/event-stream"));
440
+ return this.createJsonErrorResponse(406, -32e3, "Not Acceptable: Client must accept text/event-stream");
441
+ }
442
+ const sessionError = this.validateSession(req);
443
+ if (sessionError) return sessionError;
444
+ const protocolError = this.validateProtocolVersion(req);
445
+ if (protocolError) return protocolError;
446
+ if (this._eventStore) {
447
+ const lastEventId = req.headers.get("last-event-id");
448
+ if (lastEventId) return this.replayEvents(lastEventId);
449
+ }
450
+ if (this._streamMapping.get(this._standaloneSseStreamId) !== void 0) {
451
+ this.onerror?.(/* @__PURE__ */ new Error("Conflict: Only one SSE stream is allowed per session"));
452
+ return this.createJsonErrorResponse(409, -32e3, "Conflict: Only one SSE stream is allowed per session");
453
+ }
454
+ const encoder = new TextEncoder();
455
+ let streamController;
456
+ const readable = new ReadableStream({
457
+ start: (controller) => {
458
+ streamController = controller;
459
+ },
460
+ cancel: () => {
461
+ if (this._streamMapping.get(this._standaloneSseStreamId)?.controller === streamController) this._streamMapping.delete(this._standaloneSseStreamId);
462
+ }
463
+ });
464
+ const headers = {
465
+ "Content-Type": "text/event-stream",
466
+ "Cache-Control": "no-cache, no-transform",
467
+ Connection: "keep-alive"
468
+ };
469
+ if (this.sessionId !== void 0) headers["mcp-session-id"] = this.sessionId;
470
+ this._streamMapping.set(this._standaloneSseStreamId, {
471
+ controller: streamController,
472
+ encoder,
473
+ cleanup: () => {
474
+ this._streamMapping.delete(this._standaloneSseStreamId);
475
+ try {
476
+ streamController.close();
477
+ } catch {}
478
+ }
479
+ });
480
+ return new Response(readable, { headers });
481
+ }
482
+ /**
483
+ * Replays events that would have been sent after the specified event ID
484
+ * Only used when resumability is enabled
485
+ */
486
+ async replayEvents(lastEventId) {
487
+ if (!this._eventStore) {
488
+ this.onerror?.(/* @__PURE__ */ new Error("Event store not configured"));
489
+ return this.createJsonErrorResponse(400, -32e3, "Event store not configured");
490
+ }
491
+ try {
492
+ let streamId;
493
+ if (this._eventStore.getStreamIdForEventId) {
494
+ streamId = await this._eventStore.getStreamIdForEventId(lastEventId);
495
+ if (!streamId) {
496
+ this.onerror?.(/* @__PURE__ */ new Error("Invalid event ID format"));
497
+ return this.createJsonErrorResponse(400, -32e3, "Invalid event ID format");
498
+ }
499
+ if (this._streamMapping.get(streamId) !== void 0) {
500
+ this.onerror?.(/* @__PURE__ */ new Error("Conflict: Stream already has an active connection"));
501
+ return this.createJsonErrorResponse(409, -32e3, "Conflict: Stream already has an active connection");
502
+ }
503
+ }
504
+ const headers = {
505
+ "Content-Type": "text/event-stream",
506
+ "Cache-Control": "no-cache, no-transform",
507
+ Connection: "keep-alive"
508
+ };
509
+ if (this.sessionId !== void 0) headers["mcp-session-id"] = this.sessionId;
510
+ const encoder = new TextEncoder();
511
+ let streamController;
512
+ let replayedStreamId;
513
+ const readable = new ReadableStream({
514
+ start: (controller) => {
515
+ streamController = controller;
516
+ },
517
+ cancel: () => {
518
+ if (replayedStreamId !== void 0 && this._streamMapping.get(replayedStreamId)?.controller === streamController) this._streamMapping.delete(replayedStreamId);
519
+ }
520
+ });
521
+ const replayedEventIds = /* @__PURE__ */ new Set();
522
+ replayedStreamId = await this._eventStore.replayEventsAfter(lastEventId, { send: async (eventId, message) => {
523
+ replayedEventIds.add(eventId);
524
+ if (!this.writeSSEEvent(streamController, encoder, message, eventId)) try {
525
+ streamController.close();
526
+ } catch {}
527
+ } });
528
+ this._streamMapping.set(replayedStreamId, {
529
+ controller: streamController,
530
+ encoder,
531
+ replayedEventIds,
532
+ cleanup: () => {
533
+ this._streamMapping.delete(replayedStreamId);
534
+ try {
535
+ streamController.close();
536
+ } catch {}
537
+ }
538
+ });
539
+ if (replayedStreamId !== this._standaloneSseStreamId) {
540
+ if (![...this._requestToStreamMapping.values()].includes(replayedStreamId)) {
541
+ this._streamMapping.delete(replayedStreamId);
542
+ try {
543
+ streamController.close();
544
+ } catch {}
545
+ }
546
+ }
547
+ return new Response(readable, { headers });
548
+ } catch (error) {
549
+ this.onerror?.(error);
550
+ return this.createJsonErrorResponse(500, -32e3, "Error replaying events");
551
+ }
552
+ }
553
+ /**
554
+ * Writes an event to an SSE stream via controller with proper formatting
555
+ */
556
+ writeSSEEvent(controller, encoder, message, eventId) {
557
+ try {
558
+ let eventData = `event: message\n`;
559
+ if (eventId) eventData += `id: ${eventId}\n`;
560
+ eventData += `data: ${JSON.stringify(message)}\n\n`;
561
+ controller.enqueue(encoder.encode(eventData));
562
+ return true;
563
+ } catch (error) {
564
+ this.onerror?.(error);
565
+ return false;
566
+ }
567
+ }
568
+ /**
569
+ * Handles unsupported requests (`PUT`, `PATCH`, etc.)
570
+ */
571
+ handleUnsupportedRequest() {
572
+ this.onerror?.(/* @__PURE__ */ new Error("Method not allowed."));
573
+ return Response.json({
574
+ jsonrpc: "2.0",
575
+ error: {
576
+ code: -32e3,
577
+ message: "Method not allowed."
578
+ },
579
+ id: null
580
+ }, {
581
+ status: 405,
582
+ headers: {
583
+ Allow: "GET, POST, DELETE",
584
+ "Content-Type": "application/json"
585
+ }
586
+ });
587
+ }
588
+ /**
589
+ * Handles `POST` requests containing JSON-RPC messages
590
+ */
591
+ async handlePostRequest(req, options) {
592
+ try {
593
+ const acceptHeader = req.headers.get("accept");
594
+ if (!acceptHeader?.includes("application/json") || !acceptHeader.includes("text/event-stream")) {
595
+ this.onerror?.(/* @__PURE__ */ new Error("Not Acceptable: Client must accept both application/json and text/event-stream"));
596
+ return this.createJsonErrorResponse(406, -32e3, "Not Acceptable: Client must accept both application/json and text/event-stream");
597
+ }
598
+ if (!require_src.isJsonContentType(req.headers.get("content-type"))) {
599
+ this.onerror?.(/* @__PURE__ */ new Error("Unsupported Media Type: Content-Type must be application/json"));
600
+ return this.createJsonErrorResponse(415, -32e3, "Unsupported Media Type: Content-Type must be application/json");
601
+ }
602
+ const request = req;
603
+ let rawMessage;
604
+ if (options?.parsedBody === void 0) try {
605
+ rawMessage = await req.json();
606
+ } catch (error) {
607
+ this.onerror?.(error);
608
+ return this.createJsonErrorResponse(400, -32700, "Parse error: Invalid JSON");
609
+ }
610
+ else rawMessage = options.parsedBody;
611
+ let messages;
612
+ try {
613
+ messages = Array.isArray(rawMessage) ? rawMessage.map((msg) => _modelcontextprotocol_core_internal.JSONRPCMessageSchema.parse(msg)) : [_modelcontextprotocol_core_internal.JSONRPCMessageSchema.parse(rawMessage)];
614
+ } catch (error) {
615
+ this.onerror?.(error);
616
+ return this.createJsonErrorResponse(400, -32700, "Parse error: Invalid JSON-RPC message");
617
+ }
618
+ const isInitializationRequest = messages.some((element) => require_src.isInitializeRequest(element));
619
+ if (isInitializationRequest) {
620
+ if (this._initialized && this.sessionId !== void 0) {
621
+ this.onerror?.(/* @__PURE__ */ new Error("Invalid Request: Server already initialized"));
622
+ return this.createJsonErrorResponse(400, -32600, "Invalid Request: Server already initialized");
623
+ }
624
+ if (messages.length > 1) {
625
+ this.onerror?.(/* @__PURE__ */ new Error("Invalid Request: Only one initialization request is allowed"));
626
+ return this.createJsonErrorResponse(400, -32600, "Invalid Request: Only one initialization request is allowed");
627
+ }
628
+ this.sessionId = this.sessionIdGenerator?.();
629
+ this._initialized = true;
630
+ if (this.sessionId && this._onsessioninitialized) await Promise.resolve(this._onsessioninitialized(this.sessionId));
631
+ }
632
+ if (!isInitializationRequest) {
633
+ const sessionError = this.validateSession(req);
634
+ if (sessionError) return sessionError;
635
+ const protocolError = this.validateProtocolVersion(req);
636
+ if (protocolError) return protocolError;
637
+ }
638
+ if (!messages.some((element) => require_src.isJSONRPCRequest(element))) {
639
+ for (const message of messages) this.onmessage?.(message, {
640
+ authInfo: options?.authInfo,
641
+ request
642
+ });
643
+ return new Response(null, { status: 202 });
644
+ }
645
+ const streamId = crypto.randomUUID();
646
+ const initRequest = messages.find((m) => require_src.isInitializeRequest(m));
647
+ const clientProtocolVersion = initRequest ? initRequest.params.protocolVersion : req.headers.get("mcp-protocol-version") ?? _modelcontextprotocol_core_internal.DEFAULT_NEGOTIATED_PROTOCOL_VERSION;
648
+ if (this._enableJsonResponse) return new Promise((resolve) => {
649
+ this._streamMapping.set(streamId, {
650
+ resolveJson: resolve,
651
+ cleanup: () => {
652
+ this._streamMapping.delete(streamId);
653
+ }
654
+ });
655
+ for (const message of messages) if (require_src.isJSONRPCRequest(message)) this._requestToStreamMapping.set(message.id, streamId);
656
+ for (const message of messages) this.onmessage?.(message, {
657
+ authInfo: options?.authInfo,
658
+ request
659
+ });
660
+ });
661
+ const encoder = new TextEncoder();
662
+ let streamController;
663
+ const readable = new ReadableStream({
664
+ start: (controller) => {
665
+ streamController = controller;
666
+ },
667
+ cancel: () => {
668
+ if (this._streamMapping.get(streamId)?.controller === streamController) this._streamMapping.delete(streamId);
669
+ }
670
+ });
671
+ const headers = {
672
+ "Content-Type": "text/event-stream",
673
+ "Cache-Control": "no-cache",
674
+ Connection: "keep-alive"
675
+ };
676
+ if (this.sessionId !== void 0) headers["mcp-session-id"] = this.sessionId;
677
+ for (const message of messages) if (require_src.isJSONRPCRequest(message)) {
678
+ this._streamMapping.set(streamId, {
679
+ controller: streamController,
680
+ encoder,
681
+ cleanup: () => {
682
+ this._streamMapping.delete(streamId);
683
+ try {
684
+ streamController.close();
685
+ } catch {}
686
+ }
687
+ });
688
+ this._requestToStreamMapping.set(message.id, streamId);
689
+ }
690
+ await this.writePrimingEvent(streamController, encoder, streamId, clientProtocolVersion);
691
+ for (const message of messages) {
692
+ let closeSSEStream;
693
+ let closeStandaloneSSEStream;
694
+ if (require_src.isJSONRPCRequest(message) && this._eventStore && this.supportsEmptySSEData(clientProtocolVersion)) {
695
+ closeSSEStream = () => {
696
+ this.closeSSEStream(message.id);
697
+ };
698
+ closeStandaloneSSEStream = () => {
699
+ this.closeStandaloneSSEStream();
700
+ };
701
+ }
702
+ this.onmessage?.(message, {
703
+ authInfo: options?.authInfo,
704
+ request,
705
+ closeSSEStream,
706
+ closeStandaloneSSEStream
707
+ });
708
+ }
709
+ return new Response(readable, {
710
+ status: 200,
711
+ headers
712
+ });
713
+ } catch (error) {
714
+ this.onerror?.(error);
715
+ return this.createJsonErrorResponse(400, -32700, "Parse error", { data: String(error) });
716
+ }
717
+ }
718
+ /**
719
+ * Handles `DELETE` requests to terminate sessions
720
+ */
721
+ async handleDeleteRequest(req) {
722
+ const sessionError = this.validateSession(req);
723
+ if (sessionError) return sessionError;
724
+ const protocolError = this.validateProtocolVersion(req);
725
+ if (protocolError) return protocolError;
726
+ await Promise.resolve(this._onsessionclosed?.(this.sessionId));
727
+ await this.close();
728
+ return new Response(null, { status: 200 });
729
+ }
730
+ /**
731
+ * Validates session ID for non-initialization requests.
732
+ * Returns `Response` error if invalid, `undefined` otherwise
733
+ */
734
+ validateSession(req) {
735
+ if (this.sessionIdGenerator === void 0) return;
736
+ if (!this._initialized) {
737
+ this.onerror?.(/* @__PURE__ */ new Error("Bad Request: Server not initialized"));
738
+ return this.createJsonErrorResponse(400, -32e3, "Bad Request: Server not initialized");
739
+ }
740
+ const sessionId = req.headers.get("mcp-session-id");
741
+ if (!sessionId) {
742
+ this.onerror?.(/* @__PURE__ */ new Error("Bad Request: Mcp-Session-Id header is required"));
743
+ return this.createJsonErrorResponse(400, -32e3, "Bad Request: Mcp-Session-Id header is required");
744
+ }
745
+ if (sessionId !== this.sessionId) {
746
+ this.onerror?.(/* @__PURE__ */ new Error("Session not found"));
747
+ return this.createJsonErrorResponse(404, -32001, "Session not found");
748
+ }
749
+ }
750
+ /**
751
+ * Validates the `MCP-Protocol-Version` header on incoming requests.
752
+ *
753
+ * For initialization: Version negotiation handles unknown versions gracefully
754
+ * (server responds with its supported version).
755
+ *
756
+ * For subsequent requests with `MCP-Protocol-Version` header:
757
+ * - Accept if in supported list
758
+ * - 400 if unsupported
759
+ *
760
+ * For HTTP requests without the `MCP-Protocol-Version` header:
761
+ * - Accept and default to the version negotiated at initialization
762
+ */
763
+ validateProtocolVersion(req) {
764
+ const protocolVersion = req.headers.get("mcp-protocol-version");
765
+ if (protocolVersion !== null && !this._supportedProtocolVersions.includes(protocolVersion)) {
766
+ const error = `Bad Request: Unsupported protocol version: ${protocolVersion} (supported versions: ${this._supportedProtocolVersions.join(", ")})`;
767
+ this.onerror?.(new Error(error));
768
+ return this.createJsonErrorResponse(400, -32e3, error);
769
+ }
770
+ }
771
+ async close() {
772
+ if (this._closed) return;
773
+ this._closed = true;
774
+ for (const { cleanup } of this._streamMapping.values()) cleanup();
775
+ this._streamMapping.clear();
776
+ this._requestResponseMap.clear();
777
+ this.onclose?.();
778
+ }
779
+ /**
780
+ * Close an SSE stream for a specific request, triggering client reconnection.
781
+ * Use this to implement polling behavior during long-running operations -
782
+ * client will reconnect after the retry interval specified in the priming event.
783
+ */
784
+ closeSSEStream(requestId) {
785
+ const streamId = this._requestToStreamMapping.get(requestId);
786
+ if (!streamId) return;
787
+ const stream = this._streamMapping.get(streamId);
788
+ if (stream) stream.cleanup();
789
+ }
790
+ /**
791
+ * Close the standalone `GET` SSE stream, triggering client reconnection.
792
+ * Use this to implement polling behavior for server-initiated notifications.
793
+ */
794
+ closeStandaloneSSEStream() {
795
+ const stream = this._streamMapping.get(this._standaloneSseStreamId);
796
+ if (stream) stream.cleanup();
797
+ }
798
+ async send(message, options) {
799
+ let requestId = options?.relatedRequestId;
800
+ if (require_src.isJSONRPCResultResponse(message) || require_src.isJSONRPCErrorResponse(message)) requestId = message.id;
801
+ if (requestId === void 0) {
802
+ if (require_src.isJSONRPCResultResponse(message) || require_src.isJSONRPCErrorResponse(message)) throw new Error("Cannot send a response on a standalone SSE stream unless resuming a previous client request");
803
+ let eventId;
804
+ if (this._eventStore) eventId = await this._eventStore.storeEvent(this._standaloneSseStreamId, message);
805
+ const standaloneSse = this._streamMapping.get(this._standaloneSseStreamId);
806
+ if (standaloneSse === void 0) return;
807
+ if (standaloneSse.controller && standaloneSse.encoder && (eventId === void 0 || !standaloneSse.replayedEventIds?.has(eventId))) this.writeSSEEvent(standaloneSse.controller, standaloneSse.encoder, message, eventId);
808
+ return;
809
+ }
810
+ const streamId = this._requestToStreamMapping.get(requestId);
811
+ if (!streamId) throw new Error(`No connection established for request ID: ${String(requestId)}`);
812
+ let stream = this._streamMapping.get(streamId);
813
+ if (!this._enableJsonResponse) {
814
+ let eventId;
815
+ if (this._eventStore) {
816
+ eventId = await this._eventStore.storeEvent(streamId, message);
817
+ stream = this._streamMapping.get(streamId);
818
+ }
819
+ if (stream?.controller && stream?.encoder && (eventId === void 0 || !stream.replayedEventIds?.has(eventId))) this.writeSSEEvent(stream.controller, stream.encoder, message, eventId);
820
+ }
821
+ if (require_src.isJSONRPCResultResponse(message) || require_src.isJSONRPCErrorResponse(message)) {
822
+ this._requestResponseMap.set(requestId, message);
823
+ const relatedIds = [...this._requestToStreamMapping.entries()].filter(([_, sid]) => sid === streamId).map(([id]) => id);
824
+ if (relatedIds.every((id) => this._requestResponseMap.has(id))) {
825
+ if (!stream) {
826
+ if (this._enableJsonResponse) throw new Error(`No connection established for request ID: ${String(requestId)}`);
827
+ if (!this._eventStore) {
828
+ this.onerror?.(/* @__PURE__ */ new Error(`Response for request ID ${String(requestId)} is undeliverable: per-request stream is disconnected and no eventStore is configured`));
829
+ for (const id of relatedIds) {
830
+ this._requestResponseMap.delete(id);
831
+ this._requestToStreamMapping.delete(id);
832
+ }
833
+ return;
834
+ }
835
+ for (const id of relatedIds) {
836
+ this._requestResponseMap.delete(id);
837
+ this._requestToStreamMapping.delete(id);
838
+ }
839
+ return;
840
+ }
841
+ if (this._enableJsonResponse && stream.resolveJson) {
842
+ const headers = { "Content-Type": "application/json" };
843
+ if (this.sessionId !== void 0) headers["mcp-session-id"] = this.sessionId;
844
+ const responses = relatedIds.map((id) => this._requestResponseMap.get(id));
845
+ if (responses.length === 1) stream.resolveJson(Response.json(responses[0], {
846
+ status: 200,
847
+ headers
848
+ }));
849
+ else stream.resolveJson(Response.json(responses, {
850
+ status: 200,
851
+ headers
852
+ }));
853
+ stream.cleanup();
854
+ } else stream.cleanup();
855
+ for (const id of relatedIds) {
856
+ this._requestResponseMap.delete(id);
857
+ this._requestToStreamMapping.delete(id);
858
+ }
859
+ }
860
+ }
861
+ }
862
+ };
863
+
864
+ //#endregion
865
+ //#region src/server/createMcpHandler.ts
866
+ /**
867
+ * The JSON-RPC id to echo on an entry-built error response: the body's `id`
868
+ * when the body is a single JSON-RPC request whose id is a string or number,
869
+ * `null` otherwise. Error responses must carry the id of the request they
870
+ * correspond to whenever it could be read; `null` is reserved for the cases
871
+ * where no single request id is determinable — unparseable bodies, body-less
872
+ * methods, notifications, posted responses and batch arrays.
873
+ */
874
+ function echoableRequestId(body) {
875
+ if (body === null || typeof body !== "object" || Array.isArray(body)) return null;
876
+ const { method, id } = body;
877
+ if (typeof method !== "string") return null;
878
+ return typeof id === "string" || typeof id === "number" ? id : null;
879
+ }
880
+ function jsonRpcErrorResponse(httpStatus, code, message, data, id = null) {
881
+ return Response.json({
882
+ jsonrpc: "2.0",
883
+ error: {
884
+ code,
885
+ message,
886
+ ...data !== void 0 && { data }
887
+ },
888
+ id
889
+ }, { status: httpStatus });
890
+ }
891
+ function rejectionResponse(rejection, id = null) {
892
+ return jsonRpcErrorResponse(rejection.httpStatus, rejection.code, rejection.message, rejection.data, id);
893
+ }
894
+ function toError(value) {
895
+ return value instanceof Error ? value : new Error(String(value));
896
+ }
897
+ function internalServerErrorResponse(id = null) {
898
+ return jsonRpcErrorResponse(500, -32603, "Internal server error", void 0, id);
899
+ }
900
+ /**
901
+ * The entry's default legacy serving (`legacy: 'stateless'`): per-request
902
+ * stateless serving of 2025-era traffic using the same factory as the modern
903
+ * path. Exported as a standalone building block for hand-wired compositions
904
+ * (for example mounting legacy stateless serving on its own route next to a
905
+ * strict modern endpoint).
906
+ *
907
+ * Each POST is served by a fresh instance from the factory connected to a
908
+ * fresh streamable HTTP transport constructed with only
909
+ * `sessionIdGenerator: undefined` — the established stateless idiom, unchanged.
910
+ * Because serving is per-request and stateless, GET and DELETE (2025 session
911
+ * operations) are answered with `405` / `Method not allowed.`, exactly like the
912
+ * canonical stateless example.
913
+ *
914
+ * The optional `onerror` callback receives factory and serving failures on
915
+ * this leg (reporting only — the response stays the 500 internal-error body).
916
+ * The entry passes its own `onerror` here when expanding the default, so
917
+ * legacy-leg failures are never silently swallowed.
918
+ */
919
+ function legacyStatelessFallback(factory, onerror) {
920
+ return async (request, options) => {
921
+ if (request.method.toUpperCase() !== "POST") return jsonRpcErrorResponse(405, -32e3, "Method not allowed.");
922
+ try {
923
+ const product = await factory({
924
+ era: "legacy",
925
+ ...options?.authInfo !== void 0 && { authInfo: options.authInfo },
926
+ requestInfo: request
927
+ });
928
+ const transport = new WebStandardStreamableHTTPServerTransport({ sessionIdGenerator: void 0 });
929
+ await product.connect(transport);
930
+ const teardown = () => {
931
+ transport.close().catch(() => {});
932
+ product.close().catch(() => {});
933
+ };
934
+ request.signal?.addEventListener("abort", teardown, { once: true });
935
+ const response = await transport.handleRequest(request, {
936
+ ...options?.authInfo !== void 0 && { authInfo: options.authInfo },
937
+ ...options?.parsedBody !== void 0 && { parsedBody: options.parsedBody }
938
+ });
939
+ if (response.body === null || require_src.mediaTypeEssence(response.headers.get("content-type")) !== "text/event-stream") {
940
+ teardown();
941
+ return response;
942
+ }
943
+ const reader = response.body.getReader();
944
+ let toreDown = false;
945
+ const completeExchange = () => {
946
+ if (!toreDown) {
947
+ toreDown = true;
948
+ teardown();
949
+ }
950
+ };
951
+ const monitoredBody = new ReadableStream({
952
+ pull: async (controller) => {
953
+ try {
954
+ const { done, value } = await reader.read();
955
+ if (done) {
956
+ completeExchange();
957
+ controller.close();
958
+ return;
959
+ }
960
+ if (value !== void 0) controller.enqueue(value);
961
+ } catch (error) {
962
+ completeExchange();
963
+ controller.error(error);
964
+ }
965
+ },
966
+ cancel: (reason) => {
967
+ completeExchange();
968
+ return reader.cancel(reason).catch(() => {});
969
+ }
970
+ });
971
+ return new Response(monitoredBody, {
972
+ status: response.status,
973
+ statusText: response.statusText,
974
+ headers: response.headers
975
+ });
976
+ } catch (error) {
977
+ try {
978
+ onerror?.(toError(error));
979
+ } catch {}
980
+ return internalServerErrorResponse(echoableRequestId(options?.parsedBody));
981
+ }
982
+ };
983
+ }
984
+ /**
985
+ * The entry's classification step: read the request body exactly once (unless
986
+ * a pre-parsed body is supplied) and classify the request with
987
+ * {@linkcode classifyInboundRequest}. This is the single code path behind both
988
+ * {@linkcode createMcpHandler}'s routing and the exported
989
+ * {@linkcode isLegacyRequest} predicate, so the two can never disagree.
990
+ *
991
+ * Pass `needsForward: false` when the caller never reads `forwardRequest` —
992
+ * the body-preserving clone is then skipped and `forwardRequest` is the
993
+ * (consumed) input request.
994
+ */
995
+ async function classifyEntryRequest(request, providedParsedBody, needsForward = true) {
996
+ const httpMethod = request.method.toUpperCase();
997
+ let body;
998
+ let parsedBody = providedParsedBody;
999
+ let forwardRequest = request;
1000
+ let unparseable = false;
1001
+ if (httpMethod === "POST") {
1002
+ if (parsedBody === void 0) {
1003
+ if (needsForward) forwardRequest = request.clone();
1004
+ let bodyText;
1005
+ try {
1006
+ bodyText = await request.text();
1007
+ } catch {
1008
+ return { step: "unreadable-body" };
1009
+ }
1010
+ try {
1011
+ body = bodyText.length === 0 ? void 0 : JSON.parse(bodyText);
1012
+ } catch {
1013
+ unparseable = true;
1014
+ }
1015
+ if (!unparseable && body !== void 0) parsedBody = body;
1016
+ } else body = parsedBody;
1017
+ if (unparseable || body === void 0) return {
1018
+ step: "no-json-body",
1019
+ forwardRequest
1020
+ };
1021
+ }
1022
+ return {
1023
+ step: "classified",
1024
+ outcome: require_src.classifyInboundRequest({
1025
+ httpMethod,
1026
+ protocolVersionHeader: request.headers.get("mcp-protocol-version") ?? void 0,
1027
+ mcpMethodHeader: request.headers.get("mcp-method") ?? void 0,
1028
+ mcpNameHeader: request.headers.get("mcp-name") ?? void 0,
1029
+ ...body !== void 0 && { body }
1030
+ }),
1031
+ body,
1032
+ parsedBody,
1033
+ forwardRequest
1034
+ };
1035
+ }
1036
+ /**
1037
+ * Whether {@linkcode createMcpHandler} would route this request to its legacy
1038
+ * (2025-era) serving rather than the modern (2026-07-28) path.
1039
+ *
1040
+ * Call it with just the request: `await isLegacyRequest(request)`. For a
1041
+ * `POST` the body is read from an internal clone, so the request you pass
1042
+ * stays fully readable for whichever handler you route it to — no second
1043
+ * argument is needed. (In a Node `(req, res)` handler, build that `Request`
1044
+ * with `toWebRequest(req)` from `@modelcontextprotocol/node`; behind a body
1045
+ * parser, which has already drained the Node stream, build it as
1046
+ * `toWebRequest(req, req.body)` so the bytes come from the parsed body —
1047
+ * either way the predicate still takes just the request.) The optional
1048
+ * `parsedBody` is a perf escape hatch for a body you already hold parsed:
1049
+ * pass it and the predicate classifies from the value directly, reading and
1050
+ * cloning nothing. It is needed, not just faster, when the request's own
1051
+ * body was already read — the internal clone is then impossible (cloning a
1052
+ * used body throws a `TypeError`), so such a single-argument call rejects
1053
+ * instead of guessing.
1054
+ *
1055
+ * This is the entry's own classification step exported as a predicate — it
1056
+ * runs exactly the code `createMcpHandler` runs to make the routing decision,
1057
+ * not a re-implementation — so a hand-wired composition that branches on it
1058
+ * can never disagree with the entry. It is classification only: hand-wired
1059
+ * compositions must validate Content-Type themselves (415 for POSTs whose
1060
+ * media type is not `application/json`, via {@linkcode isJsonContentType})
1061
+ * before dispatching either leg — routing the legacy leg into the SDK
1062
+ * transports gets their built-in check, but a custom modern leg has none. Use it to keep an existing legacy
1063
+ * deployment (for example a sessionful streamable HTTP wiring) serving 2025
1064
+ * traffic next to a strict modern endpoint, now that the entry has no
1065
+ * handler-valued `legacy` option:
1066
+ *
1067
+ * ```ts
1068
+ * import { createMcpHandler, isLegacyRequest } from '@modelcontextprotocol/server';
1069
+ *
1070
+ * const modern = createMcpHandler(factory, { legacy: 'reject' });
1071
+ *
1072
+ * export default {
1073
+ * async fetch(request: Request): Promise<Response> {
1074
+ * if (await isLegacyRequest(request)) {
1075
+ * // e.g. an existing sessionful WebStandardStreamableHTTPServerTransport wiring
1076
+ * return myExistingLegacyHandler(request);
1077
+ * }
1078
+ * return modern.fetch(request);
1079
+ * }
1080
+ * };
1081
+ * ```
1082
+ *
1083
+ * Semantics (identical to the entry's routing):
1084
+ *
1085
+ * - Returns `true` only for requests with no per-request `_meta` envelope
1086
+ * claim: claim-less POSTs (including the `initialize` handshake and 2025-era
1087
+ * notification POSTs without a modern protocol-version header), body-less
1088
+ * GET/DELETE session operations, all-legacy JSON-RPC batch arrays, posted
1089
+ * JSON-RPC responses, and POSTs whose body is empty or not valid JSON.
1090
+ * - Returns `false` for everything the modern path answers, including its
1091
+ * validation-ladder rejections: a request carrying the envelope claim (even
1092
+ * one naming a revision the endpoint does not serve — the modern path
1093
+ * answers it with the unsupported-protocol-version error), a malformed
1094
+ * envelope behind a present claim (answered `-32602`), a request whose
1095
+ * `MCP-Protocol-Version` header names a modern revision but that lacks the
1096
+ * envelope (`-32602`), and header/body mismatches (`-32020`). Consumers
1097
+ * routing on the predicate must send `false` traffic to the modern handler,
1098
+ * never to a legacy handler — the modern path owns those error answers.
1099
+ * - `server/discover` probes sent by negotiating clients always carry the
1100
+ * envelope claim, so they are never legacy; a hand-built claim-less POST to
1101
+ * a method named `server/discover` has no claim and classifies legacy,
1102
+ * exactly as the entry itself routes it.
1103
+ */
1104
+ async function isLegacyRequest(request, parsedBody) {
1105
+ const classified = await classifyEntryRequest(parsedBody === void 0 && request.method.toUpperCase() === "POST" ? request.clone() : request, parsedBody, false);
1106
+ return classified.step === "no-json-body" || classified.step === "classified" && classified.outcome.kind === "legacy";
1107
+ }
1108
+ /**
1109
+ * Creates an HTTP handler that serves the 2026-07-28 protocol revision from a
1110
+ * per-request server factory and, by default, falls back to old-school
1111
+ * stateless serving for 2025-era traffic. Pass `legacy: 'reject'` for a
1112
+ * modern-only strict endpoint.
1113
+ *
1114
+ * Mounting: `handler.fetch` is the web-standard face (Cloudflare Workers,
1115
+ * Deno, Bun, Hono's `c.req.raw`); for Express/Fastify/plain `node:http`, wrap
1116
+ * the handler once with `toNodeHandler(handler)` from
1117
+ * `@modelcontextprotocol/node`. When mounting bare on a fetch-native runtime,
1118
+ * put Origin/Host validation in front of the handler — the entry itself is
1119
+ * deliberately validation-free:
1120
+ *
1121
+ * ```ts
1122
+ * import { hostHeaderValidationResponse, originValidationResponse, localhostAllowedHostnames, localhostAllowedOrigins } from '@modelcontextprotocol/server';
1123
+ *
1124
+ * export default {
1125
+ * async fetch(request: Request): Promise<Response> {
1126
+ * const rejected =
1127
+ * hostHeaderValidationResponse(request, localhostAllowedHostnames()) ??
1128
+ * originValidationResponse(request, localhostAllowedOrigins());
1129
+ * return rejected ?? handler.fetch(request);
1130
+ * }
1131
+ * };
1132
+ * ```
1133
+ *
1134
+ * Use ONE factory for both legs: the same tools/resources/prompts definition
1135
+ * backs the modern path and the stateless legacy fallback, so the two eras can
1136
+ * never drift apart. To keep an existing legacy deployment (for example a
1137
+ * sessionful streamable HTTP wiring) serving 2025 traffic instead of the
1138
+ * stateless fallback, route in user land with {@linkcode isLegacyRequest} in
1139
+ * front of a strict handler — see that predicate's documentation for the
1140
+ * pattern. Power users composing transport-neutral routing can also use the
1141
+ * exported building blocks directly: {@linkcode classifyInboundRequest} for
1142
+ * the era decision and `PerRequestHTTPServerTransport` for single-exchange
1143
+ * serving — such compositions must reject POSTs whose Content-Type media type
1144
+ * is not `application/json` (415) before parsing the body, using
1145
+ * {@linkcode isJsonContentType}; neither building block performs this
1146
+ * validation itself.
1147
+ *
1148
+ * The entry performs no token verification: `authInfo` given to `fetch` is
1149
+ * passed through to handlers and the factory as-is and is never derived from
1150
+ * request headers.
1151
+ */
1152
+ function createMcpHandler(factory, options = {}) {
1153
+ const { legacy, onerror, responseMode } = options;
1154
+ if (typeof legacy === "function") throw new TypeError("The 'legacy' option only accepts 'stateless' or 'reject', not a handler function. To serve 2025-era traffic with your own handler, route in user land with the exported isLegacyRequest(request) predicate in front of a strict (legacy: 'reject') handler.");
1155
+ /** Modern per-request instances with an exchange still in flight (close() tears these down). */
1156
+ const inflight = /* @__PURE__ */ new Set();
1157
+ let closed = false;
1158
+ const reportError = (error) => {
1159
+ try {
1160
+ onerror?.(error);
1161
+ } catch {}
1162
+ };
1163
+ const bus = options.bus ?? new require_mcp.InMemoryServerEventBus(reportError);
1164
+ const notify = require_mcp.createServerNotifier(bus);
1165
+ const listenRouter = require_mcp.createListenRouter({
1166
+ bus,
1167
+ maxSubscriptions: options.maxSubscriptions ?? require_mcp.DEFAULT_MAX_SUBSCRIPTIONS,
1168
+ keepAliveMs: options.keepAliveMs ?? require_mcp.DEFAULT_LISTEN_KEEPALIVE_MS,
1169
+ onerror: reportError
1170
+ });
1171
+ if (responseMode === "json") console.warn("responseMode: 'json' drops mid-call notifications. subscriptions/listen streams are always served over SSE regardless; other notifications emitted before a result are dropped.");
1172
+ const legacyHandler = legacy === "reject" ? void 0 : legacyStatelessFallback(factory, reportError);
1173
+ async function serveModern(route, request, authInfo) {
1174
+ const claimedRevision = route.classification.revision;
1175
+ if (claimedRevision === void 0 || !require_src.SUPPORTED_MODERN_PROTOCOL_VERSIONS.includes(claimedRevision)) {
1176
+ const error = new require_src.UnsupportedProtocolVersionError({
1177
+ supported: [...require_src.SUPPORTED_MODERN_PROTOCOL_VERSIONS],
1178
+ requested: claimedRevision ?? "unknown"
1179
+ });
1180
+ reportError(error);
1181
+ return jsonRpcErrorResponse(400, error.code, error.message, error.data, echoableRequestId(route.message));
1182
+ }
1183
+ const stdHeaderRejection = require_src.validateStandardRequestHeaders({
1184
+ httpMethod: request.method,
1185
+ mcpMethodHeader: request.headers.get("mcp-method") ?? void 0,
1186
+ mcpNameHeader: request.headers.get("mcp-name") ?? void 0
1187
+ }, route);
1188
+ if (stdHeaderRejection !== void 0) {
1189
+ reportError(/* @__PURE__ */ new Error(`Rejected inbound request (${stdHeaderRejection.cell}): ${stdHeaderRejection.message}`));
1190
+ return rejectionResponse(stdHeaderRejection, echoableRequestId(route.message));
1191
+ }
1192
+ const meta = route.messageKind === "request" ? require_src.requestMetaOf(route.message.params) : void 0;
1193
+ const declaredClientCapabilities = meta?.[_modelcontextprotocol_core_internal.CLIENT_CAPABILITIES_META_KEY];
1194
+ if (route.messageKind === "request") {
1195
+ const required = require_src.requiredClientCapabilitiesForRequest(route.message.method);
1196
+ if (required !== void 0) {
1197
+ const missing = require_src.missingClientCapabilities(required, declaredClientCapabilities);
1198
+ if (missing !== void 0) {
1199
+ const error = new require_src.MissingRequiredClientCapabilityError({ requiredCapabilities: missing });
1200
+ reportError(error);
1201
+ return jsonRpcErrorResponse(require_src.httpStatusForErrorCode(error.code, "ladder"), error.code, error.message, error.data, route.message.id);
1202
+ }
1203
+ }
1204
+ }
1205
+ const product = await factory({
1206
+ era: "modern",
1207
+ ...authInfo !== void 0 && { authInfo },
1208
+ requestInfo: request
1209
+ });
1210
+ const server = product instanceof require_mcp.McpServer ? product.server : product;
1211
+ if (route.messageKind === "request" && route.message.method === "subscriptions/listen") {
1212
+ const capabilities = server.getCapabilities();
1213
+ product.close().catch(reportError);
1214
+ return listenRouter.serve(route.message, request.signal, capabilities);
1215
+ }
1216
+ if (route.messageKind === "request" && route.message.method === "tools/call" && product instanceof require_mcp.McpServer) {
1217
+ const callParams = route.message.params;
1218
+ const toolName = typeof callParams?.name === "string" ? callParams.name : void 0;
1219
+ const inputSchema = toolName === void 0 ? void 0 : product.toolInputSchemaJson(toolName);
1220
+ if (inputSchema !== void 0) {
1221
+ const scan = require_src.scanXMcpHeaderDeclarations(inputSchema);
1222
+ if (scan.valid && scan.declarations.length > 0) {
1223
+ const rejection = require_src.validateMcpParamHeaders(scan.declarations, callParams?.arguments, request.headers);
1224
+ if (rejection !== void 0) {
1225
+ product.close().catch(reportError);
1226
+ reportError(/* @__PURE__ */ new Error(`Rejected inbound request (${rejection.cell}): ${rejection.message}`));
1227
+ return rejectionResponse(rejection, route.message.id);
1228
+ }
1229
+ }
1230
+ }
1231
+ }
1232
+ require_src.setNegotiatedProtocolVersion(server, claimedRevision);
1233
+ require_mcp.installModernOnlyHandlers(server, require_src.SUPPORTED_MODERN_PROTOCOL_VERSIONS);
1234
+ if (meta !== void 0) require_mcp.seedClientIdentityFromEnvelope(server, {
1235
+ clientInfo: meta[_modelcontextprotocol_core_internal.CLIENT_INFO_META_KEY],
1236
+ clientCapabilities: declaredClientCapabilities
1237
+ });
1238
+ const previousOnClose = server.onclose;
1239
+ inflight.add(server);
1240
+ server.onclose = () => {
1241
+ inflight.delete(server);
1242
+ previousOnClose?.();
1243
+ };
1244
+ try {
1245
+ const response = await invoke(product, route.message, {
1246
+ classification: route.classification,
1247
+ request,
1248
+ ...authInfo !== void 0 && { authInfo },
1249
+ ...responseMode !== void 0 && { responseMode }
1250
+ });
1251
+ if (route.messageKind === "notification") queueMicrotask(() => void server.close().catch(() => {}));
1252
+ return response;
1253
+ } catch (error) {
1254
+ if (error instanceof require_src.SdkError && error.code === require_src.SdkErrorCode.ConnectionClosed) return new Response(null, { status: 499 });
1255
+ await server.close().catch(() => {});
1256
+ inflight.delete(server);
1257
+ reportError(toError(error));
1258
+ return internalServerErrorResponse(echoableRequestId(route.message));
1259
+ }
1260
+ }
1261
+ async function serveLegacyRoute(route, forwardRequest, authInfo, parsedBody) {
1262
+ if (legacyHandler !== void 0) return legacyHandler(forwardRequest, {
1263
+ ...authInfo !== void 0 && { authInfo },
1264
+ ...parsedBody !== void 0 && { parsedBody }
1265
+ });
1266
+ const strict = require_src.modernOnlyStrictRejection(route, require_src.SUPPORTED_MODERN_PROTOCOL_VERSIONS);
1267
+ if (strict === void 0) return new Response(null, { status: 202 });
1268
+ reportError(/* @__PURE__ */ new Error(`Rejected 2025-era request on a modern-only endpoint (${strict.cell}): ${strict.message}`));
1269
+ return rejectionResponse(strict, echoableRequestId(parsedBody));
1270
+ }
1271
+ async function handle(request, requestOptions) {
1272
+ const authInfo = requestOptions?.authInfo;
1273
+ if (request.method.toUpperCase() === "POST" && !require_src.isJsonContentType(request.headers.get("content-type"))) {
1274
+ reportError(/* @__PURE__ */ new Error("Unsupported Media Type: Content-Type must be application/json"));
1275
+ return jsonRpcErrorResponse(415, -32e3, "Unsupported Media Type: Content-Type must be application/json");
1276
+ }
1277
+ const classified = await classifyEntryRequest(request, requestOptions?.parsedBody);
1278
+ if (classified.step === "unreadable-body") return jsonRpcErrorResponse(400, -32700, "Parse error: the request body could not be read");
1279
+ if (classified.step === "no-json-body") {
1280
+ if (legacyHandler !== void 0) return legacyHandler(classified.forwardRequest, { ...authInfo !== void 0 && { authInfo } });
1281
+ return jsonRpcErrorResponse(400, -32700, "Parse error: the request body is not valid JSON");
1282
+ }
1283
+ const { outcome, body, parsedBody, forwardRequest } = classified;
1284
+ try {
1285
+ switch (outcome.kind) {
1286
+ case "reject":
1287
+ reportError(/* @__PURE__ */ new Error(`Rejected inbound request (${outcome.cell}): ${outcome.message}`));
1288
+ return rejectionResponse(outcome, echoableRequestId(body));
1289
+ case "modern": return await serveModern(outcome, request, authInfo);
1290
+ case "legacy": return await serveLegacyRoute(outcome, forwardRequest, authInfo, parsedBody);
1291
+ }
1292
+ } catch (error) {
1293
+ reportError(toError(error));
1294
+ return internalServerErrorResponse(echoableRequestId(body));
1295
+ }
1296
+ }
1297
+ const fetchFace = async (request, requestOptions) => {
1298
+ if (closed) throw new Error("This MCP handler has been closed");
1299
+ try {
1300
+ return await handle(request, requestOptions);
1301
+ } catch (error) {
1302
+ reportError(toError(error));
1303
+ return internalServerErrorResponse(echoableRequestId(requestOptions?.parsedBody));
1304
+ }
1305
+ };
1306
+ return {
1307
+ fetch: fetchFace,
1308
+ notify,
1309
+ bus,
1310
+ close: async () => {
1311
+ closed = true;
1312
+ listenRouter.closeAll();
1313
+ const closing = [...inflight].map((server) => server.close().catch(() => {}));
1314
+ inflight.clear();
1315
+ await Promise.all(closing);
1316
+ }
1317
+ };
1318
+ }
1319
+
1320
+ //#endregion
1321
+ //#region src/server/middleware/bearerAuth.ts
1322
+ function headerQuotedValue(value) {
1323
+ return value.replaceAll(/[\\"]/g, String.raw`\$&`).replaceAll(/[^\u0020-\u007E]/g, " ");
1324
+ }
1325
+ function buildWwwAuthenticateHeader(errorCode, description, requiredScopes, resourceMetadataUrl) {
1326
+ let header = `Bearer error="${headerQuotedValue(errorCode)}", error_description="${headerQuotedValue(description)}"`;
1327
+ if (requiredScopes.length > 0) header += `, scope="${requiredScopes.join(" ")}"`;
1328
+ if (resourceMetadataUrl) header += `, resource_metadata="${resourceMetadataUrl}"`;
1329
+ return header;
1330
+ }
1331
+ /**
1332
+ * Validate a raw `Authorization` header value as a Bearer token and return
1333
+ * the verified {@link AuthInfo}.
1334
+ *
1335
+ * The runtime-neutral core of Bearer authentication: it parses the header,
1336
+ * runs the verifier, enforces `requiredScopes`, and rejects tokens without an
1337
+ * expiration or past it. On any failure it throws an {@link OAuthError} —
1338
+ * pass that to {@link bearerAuthChallengeResponse} for the matching HTTP
1339
+ * answer, or use {@link requireBearerAuth} to get both steps as one call.
1340
+ *
1341
+ * Framework adapters build on this: `requireBearerAuth` from
1342
+ * `@modelcontextprotocol/express` feeds it `req.headers.authorization`.
1343
+ */
1344
+ async function verifyBearerToken(authorizationHeader, options) {
1345
+ const { verifier, requiredScopes = [] } = options;
1346
+ if (!authorizationHeader) throw new require_src.OAuthError(require_src.OAuthErrorCode.InvalidToken, "Missing Authorization header");
1347
+ const [type, token] = authorizationHeader.split(" ");
1348
+ if (type?.toLowerCase() !== "bearer" || !token) throw new require_src.OAuthError(require_src.OAuthErrorCode.InvalidToken, "Invalid Authorization header format, expected 'Bearer TOKEN'");
1349
+ const authInfo = await verifier.verifyAccessToken(token);
1350
+ if (requiredScopes.length > 0) {
1351
+ if (!requiredScopes.every((scope) => authInfo.scopes.includes(scope))) throw new require_src.OAuthError(require_src.OAuthErrorCode.InsufficientScope, "Insufficient scope");
1352
+ }
1353
+ if (typeof authInfo.expiresAt !== "number" || Number.isNaN(authInfo.expiresAt)) throw new require_src.OAuthError(require_src.OAuthErrorCode.InvalidToken, "Token has no expiration time");
1354
+ else if (authInfo.expiresAt < Date.now() / 1e3) throw new require_src.OAuthError(require_src.OAuthErrorCode.InvalidToken, "Token has expired");
1355
+ return authInfo;
1356
+ }
1357
+ /**
1358
+ * Build the HTTP answer for a Bearer authentication failure.
1359
+ *
1360
+ * Maps an {@link OAuthError} to its status — `401` for `invalid_token` and
1361
+ * `403` for `insufficient_scope` (both carrying the `WWW-Authenticate: Bearer …`
1362
+ * challenge, with `resource_metadata` when configured so clients can discover
1363
+ * the Authorization Server), `500` for `server_error`, `400` for anything
1364
+ * else. A non-`OAuthError` value answers `500 server_error`. The body is the
1365
+ * OAuth error JSON.
1366
+ */
1367
+ function bearerAuthChallengeResponse(error, options) {
1368
+ const { requiredScopes = [], resourceMetadataUrl } = options ?? {};
1369
+ if (!(error instanceof require_src.OAuthError)) {
1370
+ const serverError = new require_src.OAuthError(require_src.OAuthErrorCode.ServerError, "Internal Server Error");
1371
+ return Response.json(serverError.toResponseObject(), { status: 500 });
1372
+ }
1373
+ switch (error.code) {
1374
+ case require_src.OAuthErrorCode.InvalidToken: {
1375
+ const challenge = buildWwwAuthenticateHeader(error.code, error.message, requiredScopes, resourceMetadataUrl);
1376
+ return Response.json(error.toResponseObject(), {
1377
+ status: 401,
1378
+ headers: { "WWW-Authenticate": challenge }
1379
+ });
1380
+ }
1381
+ case require_src.OAuthErrorCode.InsufficientScope: {
1382
+ const challenge = buildWwwAuthenticateHeader(error.code, error.message, requiredScopes, resourceMetadataUrl);
1383
+ return Response.json(error.toResponseObject(), {
1384
+ status: 403,
1385
+ headers: { "WWW-Authenticate": challenge }
1386
+ });
1387
+ }
1388
+ case require_src.OAuthErrorCode.ServerError: return Response.json(error.toResponseObject(), { status: 500 });
1389
+ default: return Response.json(error.toResponseObject(), { status: 400 });
1390
+ }
1391
+ }
1392
+ /**
1393
+ * Require a valid Bearer token on web-standard requests.
1394
+ *
1395
+ * The framework-free counterpart of `requireBearerAuth` from
1396
+ * `@modelcontextprotocol/express`, for hosts whose HTTP surface is a
1397
+ * `fetch(request)` handler — Cloudflare Workers, Deno, Bun, Hono. The
1398
+ * returned gate resolves to the verified {@link AuthInfo}, or to the
1399
+ * ready-to-return challenge `Response` when the request must be refused.
1400
+ *
1401
+ * @example
1402
+ * ```ts source="./bearerAuth.examples.ts#requireBearerAuth_fetchGate"
1403
+ * const gate = requireBearerAuth({ verifier, requiredScopes: ['mcp'] });
1404
+ *
1405
+ * async function fetchHandler(request: Request): Promise<Response> {
1406
+ * const auth: AuthInfo | Response = await gate(request);
1407
+ * if (auth instanceof Response) return auth;
1408
+ * return handler.fetch(request, { authInfo: auth });
1409
+ * }
1410
+ * ```
1411
+ */
1412
+ function requireBearerAuth(options) {
1413
+ const { verifier, requiredScopes = [], resourceMetadataUrl } = options;
1414
+ const resolved = {
1415
+ verifier,
1416
+ requiredScopes,
1417
+ resourceMetadataUrl
1418
+ };
1419
+ return async (request) => {
1420
+ const [authorizationHeader] = (request.headers.get("authorization") ?? "").split(",");
1421
+ try {
1422
+ return await verifyBearerToken(authorizationHeader || void 0, resolved);
1423
+ } catch (error) {
1424
+ return bearerAuthChallengeResponse(error, resolved);
1425
+ }
1426
+ };
1427
+ }
1428
+
1429
+ //#endregion
1430
+ //#region src/server/middleware/hostHeaderValidation.ts
1431
+ /**
1432
+ * Parse and validate a `Host` header against an allowlist of hostnames (port-agnostic).
1433
+ *
1434
+ * - Input host header may include a port (e.g. `localhost:3000`) or IPv6 brackets (e.g. `[::1]:3000`).
1435
+ * - Allowlist items should be hostnames only (no ports). For IPv6, include brackets (e.g. `[::1]`).
1436
+ */
1437
+ function validateHostHeader(hostHeader, allowedHostnames) {
1438
+ if (!hostHeader) return {
1439
+ ok: false,
1440
+ errorCode: "missing_host",
1441
+ message: "Missing Host header"
1442
+ };
1443
+ let hostname;
1444
+ try {
1445
+ hostname = new URL(`http://${hostHeader}`).hostname;
1446
+ } catch {
1447
+ return {
1448
+ ok: false,
1449
+ errorCode: "invalid_host_header",
1450
+ message: `Invalid Host header: ${hostHeader}`,
1451
+ hostHeader
1452
+ };
1453
+ }
1454
+ if (!allowedHostnames.includes(hostname)) return {
1455
+ ok: false,
1456
+ errorCode: "invalid_host",
1457
+ message: `Invalid Host: ${hostname}`,
1458
+ hostHeader,
1459
+ hostname
1460
+ };
1461
+ return {
1462
+ ok: true,
1463
+ hostname
1464
+ };
1465
+ }
1466
+ /**
1467
+ * Convenience allowlist for `localhost` DNS rebinding protection.
1468
+ */
1469
+ function localhostAllowedHostnames() {
1470
+ return [
1471
+ "localhost",
1472
+ "127.0.0.1",
1473
+ "[::1]"
1474
+ ];
1475
+ }
1476
+ /**
1477
+ * Web-standard `Request` helper for DNS rebinding protection.
1478
+ * @example
1479
+ * ```ts source="./hostHeaderValidation.examples.ts#hostHeaderValidationResponse_basicUsage"
1480
+ * const result = validateHostHeader(req.headers.get('host'), ['localhost']);
1481
+ * ```
1482
+ */
1483
+ function hostHeaderValidationResponse(req, allowedHostnames) {
1484
+ const result = validateHostHeader(req.headers.get("host"), allowedHostnames);
1485
+ if (result.ok) return void 0;
1486
+ return Response.json({
1487
+ jsonrpc: "2.0",
1488
+ error: {
1489
+ code: -32e3,
1490
+ message: result.message
1491
+ },
1492
+ id: null
1493
+ }, {
1494
+ status: 403,
1495
+ headers: { "Content-Type": "application/json" }
1496
+ });
1497
+ }
1498
+
1499
+ //#endregion
1500
+ //#region src/server/middleware/oauthMetadata.ts
1501
+ function checkIssuerUrl(issuer, allowInsecure) {
1502
+ if (issuer.protocol !== "https:" && issuer.hostname !== "localhost" && issuer.hostname !== "127.0.0.1" && !allowInsecure) throw new Error("Issuer URL must be HTTPS");
1503
+ if (issuer.hash) throw new Error(`Issuer URL must not have a fragment: ${issuer}`);
1504
+ if (issuer.search) throw new Error(`Issuer URL must not have a query string: ${issuer}`);
1505
+ }
1506
+ /**
1507
+ * Derive the RFC 9728 Protected Resource Metadata document from
1508
+ * {@link AuthMetadataOptions}, validating the Authorization Server issuer URL
1509
+ * (HTTPS required outside localhost) in the process.
1510
+ *
1511
+ * `oauthMetadataResponse` and the Express `mcpAuthMetadataRouter` both build
1512
+ * on this; use it directly when serving the document through your own
1513
+ * routing — or call it once at startup to fail fast on a misconfigured
1514
+ * issuer before any request arrives.
1515
+ */
1516
+ function buildOAuthProtectedResourceMetadata(options) {
1517
+ checkIssuerUrl(new URL(options.oauthMetadata.issuer), options.dangerouslyAllowInsecureIssuerUrl);
1518
+ return {
1519
+ resource: options.resourceServerUrl.href,
1520
+ authorization_servers: [options.oauthMetadata.issuer],
1521
+ scopes_supported: options.scopesSupported,
1522
+ resource_name: options.resourceName,
1523
+ resource_documentation: options.serviceDocumentationUrl?.href
1524
+ };
1525
+ }
1526
+ /**
1527
+ * Builds the RFC 9728 Protected Resource Metadata URL for a given MCP server
1528
+ * URL by inserting `/.well-known/oauth-protected-resource` ahead of the path.
1529
+ *
1530
+ * @example
1531
+ * ```ts
1532
+ * getOAuthProtectedResourceMetadataUrl(new URL('https://api.example.com/mcp'))
1533
+ * // → 'https://api.example.com/.well-known/oauth-protected-resource/mcp'
1534
+ * ```
1535
+ */
1536
+ function getOAuthProtectedResourceMetadataUrl(serverUrl) {
1537
+ return new URL(protectedResourceMetadataPath(serverUrl), serverUrl).href;
1538
+ }
1539
+ /** The RFC 9728 path-aware well-known path for a resource URL. */
1540
+ function protectedResourceMetadataPath(resourceServerUrl) {
1541
+ const rsPath = stripTrailingSlash(resourceServerUrl.pathname);
1542
+ return `/.well-known/oauth-protected-resource${rsPath === "/" ? "" : rsPath}`;
1543
+ }
1544
+ function stripTrailingSlash(path) {
1545
+ return path.length > 1 && path.endsWith("/") ? path.slice(0, -1) : path;
1546
+ }
1547
+ const ALLOWED_METHODS = "GET, HEAD, OPTIONS";
1548
+ function metadataDocumentResponse(request, metadata) {
1549
+ if (request.method === "OPTIONS") {
1550
+ const requestedHeaders = request.headers.get("access-control-request-headers");
1551
+ return new Response(null, {
1552
+ status: 204,
1553
+ headers: {
1554
+ "Access-Control-Allow-Origin": "*",
1555
+ "Access-Control-Allow-Methods": ALLOWED_METHODS,
1556
+ ...requestedHeaders === null ? {} : {
1557
+ "Access-Control-Allow-Headers": requestedHeaders,
1558
+ Vary: "Access-Control-Request-Headers"
1559
+ }
1560
+ }
1561
+ });
1562
+ }
1563
+ if (request.method !== "GET" && request.method !== "HEAD") {
1564
+ const error = new require_src.OAuthError(require_src.OAuthErrorCode.MethodNotAllowed, `The method ${request.method} is not allowed for this endpoint`);
1565
+ return Response.json(error.toResponseObject(), {
1566
+ status: 405,
1567
+ headers: {
1568
+ Allow: ALLOWED_METHODS,
1569
+ "Access-Control-Allow-Origin": "*"
1570
+ }
1571
+ });
1572
+ }
1573
+ const response = Response.json(metadata, { headers: { "Access-Control-Allow-Origin": "*" } });
1574
+ return request.method === "HEAD" ? new Response(null, {
1575
+ status: response.status,
1576
+ headers: response.headers
1577
+ }) : response;
1578
+ }
1579
+ /**
1580
+ * Serve the two OAuth discovery documents an MCP server acting as a Resource
1581
+ * Server exposes, from a web-standard `fetch(request)` handler:
1582
+ *
1583
+ * - `/.well-known/oauth-protected-resource[/<path>]` — RFC 9728 Protected
1584
+ * Resource Metadata, derived from the supplied options (path-aware: the
1585
+ * resource URL's path is reflected in the route).
1586
+ * - `/.well-known/oauth-authorization-server` — RFC 8414 Authorization
1587
+ * Server Metadata, passed through verbatim.
1588
+ *
1589
+ * Returns the matched document `Response` (JSON with permissive CORS, `405`
1590
+ * with an `Allow` header for non-GET methods, `204` for CORS preflight), or
1591
+ * `undefined` when the request path is neither well-known route — fall
1592
+ * through to your own routing. The framework-free counterpart of
1593
+ * `mcpAuthMetadataRouter` from `@modelcontextprotocol/express`; pair it with
1594
+ * `requireBearerAuth` and `getOAuthProtectedResourceMetadataUrl` so
1595
+ * unauthenticated clients can discover the AS from the `401` challenge.
1596
+ *
1597
+ * @example
1598
+ * ```ts source="./oauthMetadata.examples.ts#oauthMetadataResponse_fetchHandler"
1599
+ * async function fetchHandler(request: Request): Promise<Response> {
1600
+ * return oauthMetadataResponse(request, options) ?? serveMcp(request);
1601
+ * }
1602
+ * ```
1603
+ */
1604
+ function oauthMetadataResponse(request, options) {
1605
+ const requestPath = stripTrailingSlash(new URL(request.url).pathname);
1606
+ if (requestPath === protectedResourceMetadataPath(options.resourceServerUrl)) return metadataDocumentResponse(request, buildOAuthProtectedResourceMetadata(options));
1607
+ if (requestPath === "/.well-known/oauth-authorization-server") {
1608
+ buildOAuthProtectedResourceMetadata(options);
1609
+ return metadataDocumentResponse(request, options.oauthMetadata);
1610
+ }
1611
+ }
1612
+
1613
+ //#endregion
1614
+ //#region src/server/middleware/originValidation.ts
1615
+ /**
1616
+ * Validate an `Origin` header against an allowlist of hostnames (port-agnostic).
1617
+ *
1618
+ * - A missing/empty `Origin` header passes: non-browser clients do not send one,
1619
+ * and only browser-originated requests carry the header this check defends against.
1620
+ * - Allowlist items are hostnames only (no scheme, no port), the same convention as
1621
+ * `validateHostHeader`. For IPv6, include brackets (e.g. `[::1]`).
1622
+ * - Any present value that cannot be parsed as an origin URL — including the literal
1623
+ * `null` origin browsers send for opaque contexts — is rejected (deny on failure).
1624
+ */
1625
+ function validateOriginHeader(originHeader, allowedOriginHostnames) {
1626
+ if (originHeader === null || originHeader === void 0 || originHeader === "") return { ok: true };
1627
+ let hostname;
1628
+ try {
1629
+ hostname = new URL(originHeader).hostname;
1630
+ } catch {
1631
+ return {
1632
+ ok: false,
1633
+ errorCode: "invalid_origin_header",
1634
+ message: `Invalid Origin header: ${originHeader}`,
1635
+ originHeader
1636
+ };
1637
+ }
1638
+ if (hostname === "") return {
1639
+ ok: false,
1640
+ errorCode: "invalid_origin_header",
1641
+ message: `Invalid Origin header: ${originHeader}`,
1642
+ originHeader
1643
+ };
1644
+ if (!allowedOriginHostnames.includes(hostname)) return {
1645
+ ok: false,
1646
+ errorCode: "invalid_origin",
1647
+ message: `Invalid Origin: ${hostname}`,
1648
+ originHeader,
1649
+ hostname
1650
+ };
1651
+ return {
1652
+ ok: true,
1653
+ origin: originHeader,
1654
+ hostname
1655
+ };
1656
+ }
1657
+ /**
1658
+ * Convenience allowlist of localhost-class origin hostnames, mirroring
1659
+ * `localhostAllowedHostnames`.
1660
+ */
1661
+ function localhostAllowedOrigins() {
1662
+ return [
1663
+ "localhost",
1664
+ "127.0.0.1",
1665
+ "[::1]"
1666
+ ];
1667
+ }
1668
+ /**
1669
+ * Web-standard `Request` helper for Origin validation: returns a `403` JSON-RPC
1670
+ * error response when the request's `Origin` header is not allowed, and
1671
+ * `undefined` when the request may proceed.
1672
+ *
1673
+ * ```ts
1674
+ * const rejected = originValidationResponse(request, localhostAllowedOrigins());
1675
+ * if (rejected) return rejected;
1676
+ * ```
1677
+ */
1678
+ function originValidationResponse(req, allowedOriginHostnames) {
1679
+ const result = validateOriginHeader(req.headers.get("origin"), allowedOriginHostnames);
1680
+ if (result.ok) return void 0;
1681
+ return Response.json({
1682
+ jsonrpc: "2.0",
1683
+ error: {
1684
+ code: -32e3,
1685
+ message: result.message
1686
+ },
1687
+ id: null
1688
+ }, {
1689
+ status: 403,
1690
+ headers: { "Content-Type": "application/json" }
1691
+ });
1692
+ }
1693
+
1694
+ //#endregion
1695
+ //#region src/server/requestStateCodec.ts
1696
+ const PREFIX = "v1.";
1697
+ function bytesToBase64Url(bytes) {
1698
+ let bin = "";
1699
+ for (const b of bytes) bin += String.fromCodePoint(b);
1700
+ return btoa(bin).replaceAll("+", "-").replaceAll("/", "_").replace(/=+$/, "");
1701
+ }
1702
+ function constantTimeTagEqual(a, b) {
1703
+ if (a.length !== b.length) return false;
1704
+ let r = 0;
1705
+ for (let i = 0; i < a.length; i++) r |= a.codePointAt(i) ^ b.codePointAt(i);
1706
+ return r === 0;
1707
+ }
1708
+ function base64UrlToBytes(s) {
1709
+ const b64 = s.replaceAll("-", "+").replaceAll("_", "/");
1710
+ const bin = atob(b64);
1711
+ const bytes = new Uint8Array(bin.length);
1712
+ for (let i = 0; i < bin.length; i++) bytes[i] = bin.codePointAt(i);
1713
+ return bytes;
1714
+ }
1715
+ /**
1716
+ * Create an opt-in HMAC-SHA256 codec for the multi-round-trip `requestState`
1717
+ * (protocol revision 2026-07-28).
1718
+ *
1719
+ * `requestState` round-trips through the client and is attacker-controlled
1720
+ * input on re-entry. The SDK applies no protection of its own; this helper is
1721
+ * the convenience implementation of the spec's integrity MUST so authors don't
1722
+ * hand-roll HMAC. Wire shape:
1723
+ *
1724
+ * "v1." b64url({"p":<payload>,"exp":<unixSeconds>,"b":<bindTag>?}) "." b64url(mac)
1725
+ *
1726
+ * where `bindTag` is `b64url(HMAC(key, "mcp.requestState.bind:" + bind(ctx))[:16])`
1727
+ * — the binding value is never embedded raw.
1728
+ *
1729
+ * The codec is **signed, not encrypted**: the body is integrity-protected but
1730
+ * the client can base64url-decode it and read the payload (`p`) in clear. Do
1731
+ * not put secrets in the payload; use an AEAD construction if confidentiality
1732
+ * is required. The handler reads its payload back via the typed
1733
+ * `ctx.mcpReq.requestState<T>()` accessor — the seam has already run `verify`
1734
+ * (integrity proven, payload decoded) by the time the handler is entered.
1735
+ *
1736
+ * Verification is fail-closed and constant-time (WebCrypto `subtle.verify` for
1737
+ * the body MAC; a fixed-length XOR-accumulator compare for the bind tag).
1738
+ * See `examples/mrtr/server.ts` for a worked end-to-end example.
1739
+ *
1740
+ * Design comparison (mcp.d `secureRequestState`, the peer SDK's reference
1741
+ * implementation): mcp.d additionally offers an AES-256-GCM encrypted mode and
1742
+ * derives independent cipher / bind-HMAC sub-keys from the operator secret via
1743
+ * HKDF-SHA256, with an auto-generated per-process ephemeral key when none is
1744
+ * supplied. This codec deliberately ships only the signed mode and a single
1745
+ * keyed HMAC (domain-separated by input prefix) — HKDF sub-key derivation and
1746
+ * an encrypted mode are intentionally out of scope for the initial release.
1747
+ */
1748
+ function createRequestStateCodec(options) {
1749
+ const subtle = globalThis.crypto?.subtle;
1750
+ if (subtle === void 0) throw new TypeError("createRequestStateCodec requires the Web Crypto API (globalThis.crypto.subtle); see https://ts.sdk.modelcontextprotocol.io/v2/troubleshooting for the Node.js polyfill instructions");
1751
+ const keyBytes = typeof options.key === "string" ? new TextEncoder().encode(options.key) : Uint8Array.from(options.key);
1752
+ if (keyBytes.byteLength < 32) throw new RangeError(`createRequestStateCodec: key must be at least 32 bytes (got ${keyBytes.byteLength})`);
1753
+ const ttlSeconds = options.ttlSeconds ?? 600;
1754
+ if (!Number.isFinite(ttlSeconds)) throw new RangeError("createRequestStateCodec: ttlSeconds must be a finite number");
1755
+ const bind = options.bind;
1756
+ let cryptoKey;
1757
+ const importedKey = () => cryptoKey ??= subtle.importKey("raw", keyBytes, {
1758
+ name: "HMAC",
1759
+ hash: "SHA-256"
1760
+ }, false, ["sign", "verify"]);
1761
+ const utf8 = new TextEncoder();
1762
+ const BIND_LABEL = "mcp.requestState.bind:";
1763
+ const bindTag = async (value) => {
1764
+ return bytesToBase64Url(new Uint8Array(await subtle.sign("HMAC", await importedKey(), utf8.encode(BIND_LABEL + value))).slice(0, 16));
1765
+ };
1766
+ return {
1767
+ async mint(payload, ctx) {
1768
+ const envelope = {
1769
+ p: payload,
1770
+ exp: Math.floor(Date.now() / 1e3) + ttlSeconds
1771
+ };
1772
+ if (bind !== void 0) {
1773
+ if (ctx === void 0) throw new TypeError("createRequestStateCodec: mint() requires ctx when a bind callback is configured");
1774
+ envelope.b = await bindTag(bind(ctx));
1775
+ }
1776
+ const body = bytesToBase64Url(utf8.encode(JSON.stringify(envelope)));
1777
+ return `${PREFIX}${body}.${bytesToBase64Url(new Uint8Array(await subtle.sign("HMAC", await importedKey(), utf8.encode(PREFIX + body))))}`;
1778
+ },
1779
+ async verify(state, ctx) {
1780
+ const dot = state.lastIndexOf(".");
1781
+ if (!state.startsWith(PREFIX) || dot <= 3) throw new Error("malformed");
1782
+ const body = state.slice(3, dot);
1783
+ let macBytes;
1784
+ try {
1785
+ macBytes = base64UrlToBytes(state.slice(dot + 1));
1786
+ } catch {
1787
+ throw new Error("malformed");
1788
+ }
1789
+ if (!await subtle.verify("HMAC", await importedKey(), macBytes, utf8.encode(PREFIX + body))) throw new Error("mac");
1790
+ let envelope;
1791
+ try {
1792
+ envelope = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(base64UrlToBytes(body)));
1793
+ } catch {
1794
+ throw new Error("malformed");
1795
+ }
1796
+ if (typeof envelope.exp !== "number" || envelope.exp < Math.floor(Date.now() / 1e3)) throw new Error("expired");
1797
+ if (bind !== void 0) {
1798
+ const expected = await bindTag(bind(ctx));
1799
+ if (envelope.b === void 0 || !constantTimeTagEqual(envelope.b, expected)) throw new Error("bind");
1800
+ } else if (envelope.b !== void 0) throw new Error("bind");
1801
+ return envelope.p;
1802
+ }
1803
+ };
1804
+ }
1805
+
1806
+ //#endregion
1807
+ //#region src/fromJsonSchema.ts
1808
+ let _defaultValidator;
1809
+ function fromJsonSchema(schema, validator) {
1810
+ return require_src.fromJsonSchema(schema, validator ?? (_defaultValidator ??= new _modelcontextprotocol_server__shims.DefaultJsonSchemaValidator()));
1811
+ }
1812
+
1813
+ //#endregion
1814
+ Object.defineProperty(exports, 'BAGGAGE_META_KEY', {
1815
+ enumerable: true,
1816
+ get: function () {
1817
+ return _modelcontextprotocol_core_internal.BAGGAGE_META_KEY;
1818
+ }
1819
+ });
1820
+ Object.defineProperty(exports, 'CLIENT_CAPABILITIES_META_KEY', {
1821
+ enumerable: true,
1822
+ get: function () {
1823
+ return _modelcontextprotocol_core_internal.CLIENT_CAPABILITIES_META_KEY;
1824
+ }
1825
+ });
1826
+ Object.defineProperty(exports, 'CLIENT_INFO_META_KEY', {
1827
+ enumerable: true,
1828
+ get: function () {
1829
+ return _modelcontextprotocol_core_internal.CLIENT_INFO_META_KEY;
1830
+ }
1831
+ });
1832
+ Object.defineProperty(exports, 'DEFAULT_NEGOTIATED_PROTOCOL_VERSION', {
1833
+ enumerable: true,
1834
+ get: function () {
1835
+ return _modelcontextprotocol_core_internal.DEFAULT_NEGOTIATED_PROTOCOL_VERSION;
1836
+ }
1837
+ });
1838
+ exports.DEFAULT_REQUEST_TIMEOUT_MSEC = require_src.DEFAULT_REQUEST_TIMEOUT_MSEC;
1839
+ Object.defineProperty(exports, 'INTERNAL_ERROR', {
1840
+ enumerable: true,
1841
+ get: function () {
1842
+ return _modelcontextprotocol_core_internal.INTERNAL_ERROR;
1843
+ }
1844
+ });
1845
+ Object.defineProperty(exports, 'INVALID_PARAMS', {
1846
+ enumerable: true,
1847
+ get: function () {
1848
+ return _modelcontextprotocol_core_internal.INVALID_PARAMS;
1849
+ }
1850
+ });
1851
+ Object.defineProperty(exports, 'INVALID_REQUEST', {
1852
+ enumerable: true,
1853
+ get: function () {
1854
+ return _modelcontextprotocol_core_internal.INVALID_REQUEST;
1855
+ }
1856
+ });
1857
+ exports.InMemoryServerEventBus = require_mcp.InMemoryServerEventBus;
1858
+ exports.InMemoryTransport = require_src.InMemoryTransport;
1859
+ Object.defineProperty(exports, 'JSONRPC_VERSION', {
1860
+ enumerable: true,
1861
+ get: function () {
1862
+ return _modelcontextprotocol_core_internal.JSONRPC_VERSION;
1863
+ }
1864
+ });
1865
+ Object.defineProperty(exports, 'LATEST_PROTOCOL_VERSION', {
1866
+ enumerable: true,
1867
+ get: function () {
1868
+ return _modelcontextprotocol_core_internal.LATEST_PROTOCOL_VERSION;
1869
+ }
1870
+ });
1871
+ Object.defineProperty(exports, 'LOG_LEVEL_META_KEY', {
1872
+ enumerable: true,
1873
+ get: function () {
1874
+ return _modelcontextprotocol_core_internal.LOG_LEVEL_META_KEY;
1875
+ }
1876
+ });
1877
+ Object.defineProperty(exports, 'METHOD_NOT_FOUND', {
1878
+ enumerable: true,
1879
+ get: function () {
1880
+ return _modelcontextprotocol_core_internal.METHOD_NOT_FOUND;
1881
+ }
1882
+ });
1883
+ exports.McpServer = require_mcp.McpServer;
1884
+ exports.MissingRequiredClientCapabilityError = require_src.MissingRequiredClientCapabilityError;
1885
+ exports.OAuthError = require_src.OAuthError;
1886
+ exports.OAuthErrorCode = require_src.OAuthErrorCode;
1887
+ Object.defineProperty(exports, 'PARSE_ERROR', {
1888
+ enumerable: true,
1889
+ get: function () {
1890
+ return _modelcontextprotocol_core_internal.PARSE_ERROR;
1891
+ }
1892
+ });
1893
+ Object.defineProperty(exports, 'PROTOCOL_VERSION_META_KEY', {
1894
+ enumerable: true,
1895
+ get: function () {
1896
+ return _modelcontextprotocol_core_internal.PROTOCOL_VERSION_META_KEY;
1897
+ }
1898
+ });
1899
+ exports.PerRequestHTTPServerTransport = PerRequestHTTPServerTransport;
1900
+ exports.ProtocolError = require_src.ProtocolError;
1901
+ exports.ProtocolErrorCode = require_src.ProtocolErrorCode;
1902
+ Object.defineProperty(exports, 'RELATED_TASK_META_KEY', {
1903
+ enumerable: true,
1904
+ get: function () {
1905
+ return _modelcontextprotocol_core_internal.RELATED_TASK_META_KEY;
1906
+ }
1907
+ });
1908
+ exports.ReadBuffer = require_src.ReadBuffer;
1909
+ exports.ResourceNotFoundError = require_src.ResourceNotFoundError;
1910
+ exports.ResourceTemplate = require_mcp.ResourceTemplate;
1911
+ exports.STDIO_DEFAULT_MAX_BUFFER_SIZE = require_src.STDIO_DEFAULT_MAX_BUFFER_SIZE;
1912
+ Object.defineProperty(exports, 'SUBSCRIPTION_ID_META_KEY', {
1913
+ enumerable: true,
1914
+ get: function () {
1915
+ return _modelcontextprotocol_core_internal.SUBSCRIPTION_ID_META_KEY;
1916
+ }
1917
+ });
1918
+ Object.defineProperty(exports, 'SUPPORTED_PROTOCOL_VERSIONS', {
1919
+ enumerable: true,
1920
+ get: function () {
1921
+ return _modelcontextprotocol_core_internal.SUPPORTED_PROTOCOL_VERSIONS;
1922
+ }
1923
+ });
1924
+ exports.SdkError = require_src.SdkError;
1925
+ exports.SdkErrorCode = require_src.SdkErrorCode;
1926
+ exports.SdkHttpError = require_src.SdkHttpError;
1927
+ exports.Server = require_mcp.Server;
1928
+ Object.defineProperty(exports, 'TRACEPARENT_META_KEY', {
1929
+ enumerable: true,
1930
+ get: function () {
1931
+ return _modelcontextprotocol_core_internal.TRACEPARENT_META_KEY;
1932
+ }
1933
+ });
1934
+ Object.defineProperty(exports, 'TRACESTATE_META_KEY', {
1935
+ enumerable: true,
1936
+ get: function () {
1937
+ return _modelcontextprotocol_core_internal.TRACESTATE_META_KEY;
1938
+ }
1939
+ });
1940
+ exports.UnsupportedProtocolVersionError = require_src.UnsupportedProtocolVersionError;
1941
+ exports.UriTemplate = require_src.UriTemplate;
1942
+ exports.UrlElicitationRequiredError = require_src.UrlElicitationRequiredError;
1943
+ exports.WebStandardStreamableHTTPServerTransport = WebStandardStreamableHTTPServerTransport;
1944
+ exports.acceptedContent = require_src.acceptedContent;
1945
+ exports.assertCompleteRequestPrompt = require_src.assertCompleteRequestPrompt;
1946
+ exports.assertCompleteRequestResourceTemplate = require_src.assertCompleteRequestResourceTemplate;
1947
+ exports.bearerAuthChallengeResponse = bearerAuthChallengeResponse;
1948
+ exports.buildOAuthProtectedResourceMetadata = buildOAuthProtectedResourceMetadata;
1949
+ exports.checkResourceAllowed = require_src.checkResourceAllowed;
1950
+ exports.classifyInboundRequest = require_src.classifyInboundRequest;
1951
+ exports.completable = require_mcp.completable;
1952
+ exports.createFetchWithInit = require_src.createFetchWithInit;
1953
+ exports.createMcpHandler = createMcpHandler;
1954
+ exports.createRequestStateCodec = createRequestStateCodec;
1955
+ exports.deserializeMessage = require_src.deserializeMessage;
1956
+ exports.fromJsonSchema = fromJsonSchema;
1957
+ exports.getDisplayName = require_src.getDisplayName;
1958
+ exports.getOAuthProtectedResourceMetadataUrl = getOAuthProtectedResourceMetadataUrl;
1959
+ exports.hostHeaderValidationResponse = hostHeaderValidationResponse;
1960
+ exports.inputRequired = require_src.inputRequired;
1961
+ exports.inputResponse = require_src.inputResponse;
1962
+ exports.isCallToolResult = require_src.isCallToolResult;
1963
+ exports.isCompletable = require_mcp.isCompletable;
1964
+ exports.isInitializeRequest = require_src.isInitializeRequest;
1965
+ exports.isInitializedNotification = require_src.isInitializedNotification;
1966
+ exports.isInputRequiredResult = require_src.isInputRequiredResult;
1967
+ exports.isJSONRPCErrorResponse = require_src.isJSONRPCErrorResponse;
1968
+ exports.isJSONRPCNotification = require_src.isJSONRPCNotification;
1969
+ exports.isJSONRPCRequest = require_src.isJSONRPCRequest;
1970
+ exports.isJSONRPCResponse = require_src.isJSONRPCResponse;
1971
+ exports.isJSONRPCResultResponse = require_src.isJSONRPCResultResponse;
1972
+ exports.isJsonContentType = require_src.isJsonContentType;
1973
+ exports.isLegacyRequest = isLegacyRequest;
1974
+ exports.isSpecType = require_src.isSpecType;
1975
+ exports.isTaskAugmentedRequestParams = require_src.isTaskAugmentedRequestParams;
1976
+ exports.legacyStatelessFallback = legacyStatelessFallback;
1977
+ exports.localhostAllowedHostnames = localhostAllowedHostnames;
1978
+ exports.localhostAllowedOrigins = localhostAllowedOrigins;
1979
+ exports.oauthMetadataResponse = oauthMetadataResponse;
1980
+ exports.originValidationResponse = originValidationResponse;
1981
+ exports.parseJSONRPCMessage = require_src.parseJSONRPCMessage;
1982
+ exports.preloadSchemas = require_src.preloadSchemas;
1983
+ exports.requireBearerAuth = requireBearerAuth;
1984
+ exports.resourceUrlFromServerUrl = require_src.resourceUrlFromServerUrl;
1985
+ exports.serializeMessage = require_src.serializeMessage;
1986
+ exports.specTypeSchemas = require_src.specTypeSchemas;
1987
+ exports.validateHostHeader = validateHostHeader;
1988
+ exports.validateOriginHeader = validateOriginHeader;
1989
+ exports.verifyBearerToken = verifyBearerToken;
1990
+ //# sourceMappingURL=index.cjs.map