@chrona-city/ugc-kit 1.5.12 → 1.6.9

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 (1674) hide show
  1. package/.agents/skills/chrona-3d-assets/SKILL.md +15 -0
  2. package/.agents/skills/chrona-ecs-creator/SKILL.md +17 -0
  3. package/.agents/skills/chrona-gameplay-js/SKILL.md +19 -0
  4. package/.agents/skills/chrona-realtime/SKILL.md +23 -0
  5. package/.agents/skills/chrona-repair/SKILL.md +13 -0
  6. package/README.md +89 -8
  7. package/bin/chrona.mjs +6 -2
  8. package/chrona.contract.lock.json +74 -6
  9. package/chrona.controlled-presentation.lock.json +8 -8
  10. package/chrona.core.lock.json +16 -12
  11. package/chrona.document-presentation.lock.json +52 -0
  12. package/chrona.ecs.lock.json +3 -3
  13. package/chrona.gameplay-tests.lock.json +9 -9
  14. package/chrona.ground-endpoint.lock.json +28 -0
  15. package/chrona.ground-spaces.lock.json +40 -0
  16. package/chrona.personal-state.lock.json +28 -0
  17. package/chrona.pipeline.lock.json +10 -10
  18. package/chrona.private-state-view.lock.json +2 -2
  19. package/chrona.private-state.lock.json +2 -2
  20. package/chrona.registry.lock.json +2 -2
  21. package/chrona.sandbox.lock.json +11 -7
  22. package/chrona.scene-interaction-v2.lock.json +28 -0
  23. package/chrona.world-scene-runtime.lock.json +49 -9
  24. package/chrona.world-scene.lock.json +9 -5
  25. package/compiler/local-builder.lock.json +1 -1
  26. package/compiler/source/contracts/creator/rules/v1/rules.mjs +99 -0
  27. package/compiler/source/contracts/creator/rules/v1/ugc-rules.json +807 -0
  28. package/compiler/source/contracts/ugc/authored-motion/v1/declaration.mjs +124 -0
  29. package/compiler/source/contracts/ugc/core-ecs/v1/core-view.mjs +146 -0
  30. package/compiler/source/contracts/ugc/core-ecs/v1/limits.json +4 -0
  31. package/compiler/source/contracts/ugc/document-presentation/v1/document.mjs +148 -27
  32. package/compiler/source/contracts/ugc/document-presentation/v1/profile-1.1.0.json +25 -0
  33. package/compiler/source/contracts/ugc/document-presentation/v1/profile-1.2.0.json +25 -0
  34. package/compiler/source/contracts/ugc/document-presentation/v1/profile-1.3.0.json +26 -0
  35. package/compiler/source/contracts/ugc/document-presentation/v1/profile-1.5.0.json +25 -0
  36. package/compiler/source/contracts/ugc/document-presentation/v1/profile-1.6.0.json +26 -0
  37. package/compiler/source/contracts/ugc/ecs-runtime/v1/private-world.mjs +313 -0
  38. package/compiler/source/contracts/ugc/live-rule-slot/v1/slot.json +58 -0
  39. package/compiler/source/contracts/ugc/local-content/v1/document-snapshot.mjs +13 -29
  40. package/compiler/source/contracts/ugc/local-content/v1/ground-snapshot.mjs +89 -0
  41. package/compiler/source/contracts/ugc/local-content/v1/snapshot.mjs +49 -6
  42. package/compiler/source/contracts/ugc/open-creation/v1/custom-actions.mjs +92 -0
  43. package/compiler/source/contracts/ugc/open-creation/v1/data-authority.mjs +37 -0
  44. package/compiler/source/contracts/ugc/open-creation/v1/declaration.mjs +28 -0
  45. package/compiler/source/contracts/ugc/open-creation/v1/dynamic-entities.mjs +186 -0
  46. package/compiler/source/contracts/ugc/open-creation/v1/open-world.mjs +269 -0
  47. package/compiler/source/contracts/ugc/pipeline/v1/conformance/js/pipeline-validator.mjs +35 -7
  48. package/compiler/source/contracts/ugc/private-state/v1/projection.mjs +178 -0
  49. package/compiler/source/contracts/ugc/registry/v1/resolution-policy.json +3 -3
  50. package/compiler/source/contracts/ugc/runtime-content/v1/asset-budget.mjs +21 -0
  51. package/compiler/source/contracts/ugc/runtime-content/v1/limits.json +5 -0
  52. package/compiler/source/contracts/ugc/runtime-content/v1/validate.mjs +420 -0
  53. package/compiler/source/contracts/ugc/sandbox/v1/sha256.mjs +47 -0
  54. package/compiler/source/contracts/ugc/server-entities/v1/entities.mjs +221 -0
  55. package/compiler/source/contracts/ugc/server-entities/v1/events.mjs +336 -0
  56. package/compiler/source/contracts/ugc/server-entities/v1/limits.json +112 -0
  57. package/compiler/source/contracts/ugc/server-entities/v1/roads.mjs +164 -0
  58. package/compiler/source/contracts/ugc/v1/conformance/js/package-validator.mjs +51 -5
  59. package/compiler/source/contracts/ugc/v1/host-runnable.mjs +23 -0
  60. package/compiler/source/contracts/ugc/world-scene/v2/asset-graph.mjs +8 -12
  61. package/compiler/source/contracts/ugc/world-scene/v2/contract-set.json +1 -0
  62. package/compiler/source/contracts/ugc/world-scene-runtime/v1/runtime-plan.schema.json +41 -13
  63. package/compiler/source/contracts/ugc/world-scene-runtime/v1/runtime-policy.mjs +2 -2
  64. package/compiler/source/contracts/ugc/world-scene-runtime/v2/contract-set.json +10 -0
  65. package/compiler/source/contracts/ugc/world-scene-runtime/v2/report.mjs +21 -14
  66. package/compiler/source/contracts/ugc/world-scene-runtime/v2/runtime-policy.mjs +17 -3
  67. package/compiler/source/services/game-worker/src/runtime/content/flight-runtime.js +2 -1
  68. package/compiler/source/services/game-worker/src/runtime/rooms/flight-collision.js +55 -30
  69. package/compiler/source/services/game-worker/src/runtime/rooms/flight-motion.js +99 -0
  70. package/compiler/source/services/game-worker/src/runtime/rooms/flight-preparation.js +3 -2
  71. package/compiler/source/services/game-worker/src/runtime/rooms/flight-room-controller.js +130 -24
  72. package/compiler/source/services/ugc-pipeline/src/asset-inspection.mjs +78 -28
  73. package/compiler/source/services/ugc-pipeline/src/document-presentation-model.mjs +2 -2
  74. package/compiler/source/services/ugc-pipeline/src/ground-rules-model.mjs +4 -5
  75. package/compiler/source/services/ugc-pipeline/src/local-content.mjs +29 -16
  76. package/compiler/source/services/ugc-pipeline/src/registry-release.mjs +4 -1
  77. package/compiler/source/services/ugc-pipeline/src/resource-bindings-model.mjs +3 -3
  78. package/compiler/source/services/ugc-pipeline/src/rules-locks.mjs +18 -0
  79. package/compiler/source/services/ugc-pipeline/src/scene-interaction-model.mjs +4 -5
  80. package/compiler/source/services/ugc-pipeline/src/visual-closure-v2.mjs +2 -2
  81. package/compiler/source/services/ugc-pipeline/src/world-scene-model.mjs +3 -3
  82. package/compiler/source/services/ugc-pipeline/src/world-scene-policies.json +138 -0
  83. package/compiler/source/services/ugc-pipeline/src/world-scene-runtime.mjs +4 -3
  84. package/consistency-vectors.snapshot.lock.json +14 -0
  85. package/contracts/creator/check/v1/rule-table.json +433 -0
  86. package/contracts/creator/check/v1/rules/client.json +924 -0
  87. package/contracts/creator/check/v1/rules/kit.json +1702 -0
  88. package/contracts/creator/check/v1/rules/platform.json +608 -0
  89. package/contracts/creator/check/v1/rules/publish.json +2484 -0
  90. package/contracts/creator/check/v1/rules/room.json +279 -0
  91. package/contracts/creator/rules/v1/rules.mjs +69 -0
  92. package/contracts/creator/rules/v1/vectors.json +39 -0
  93. package/contracts/ecs/realtime/consistency/v1/vectors.json +2437 -0
  94. package/contracts/errors/registry/v1/codes.json +13255 -0
  95. package/contracts/gameplay/step-input/step-input.mjs +16 -0
  96. package/contracts/network/realtime/authored-entity.mjs +67 -0
  97. package/contracts/network/realtime/revision-selection.mjs +65 -0
  98. package/contracts/testdata/gameplay-consistency/vectors.json +149 -0
  99. package/contracts/ugc/authored-motion/v1/declaration.mjs +124 -0
  100. package/contracts/ugc/core-ecs/v1/core-view.mjs +13 -5
  101. package/contracts/ugc/core-ecs/v1/limits.json +4 -0
  102. package/contracts/ugc/creator-source/v1/SOURCE-PACKAGE.md +1 -1
  103. package/contracts/ugc/creator-source/v1/source-package.mjs +24 -7
  104. package/contracts/ugc/creator-source/v1/source-package.schema.json +3 -3
  105. package/contracts/ugc/creator-source/v1/source-package.test.mjs +20 -2
  106. package/contracts/ugc/document-presentation/v1/document.mjs +148 -27
  107. package/contracts/ugc/document-presentation/v1/profile-1.1.0.json +25 -0
  108. package/contracts/ugc/document-presentation/v1/profile-1.2.0.json +25 -0
  109. package/contracts/ugc/document-presentation/v1/profile-1.3.0.json +26 -0
  110. package/contracts/ugc/document-presentation/v1/profile-1.5.0.json +25 -0
  111. package/contracts/ugc/document-presentation/v1/profile-1.6.0.json +26 -0
  112. package/contracts/ugc/ecs-runtime/v1/private-world.mjs +21 -7
  113. package/contracts/ugc/live-rule-slot/v1/slot.json +58 -0
  114. package/contracts/ugc/live-rule-slot/v1/slot.mjs +80 -0
  115. package/contracts/ugc/local-content/v1/README.md +10 -0
  116. package/contracts/ugc/local-content/v1/document-snapshot.mjs +13 -29
  117. package/contracts/ugc/local-content/v1/ground-snapshot.mjs +89 -0
  118. package/contracts/ugc/local-content/v1/snapshot.mjs +49 -6
  119. package/contracts/ugc/local-content/v1/spatial-plan.mjs +24 -0
  120. package/contracts/ugc/open-creation/v1/custom-actions.mjs +92 -0
  121. package/contracts/ugc/open-creation/v1/data-authority.mjs +37 -0
  122. package/contracts/ugc/open-creation/v1/declaration.mjs +28 -0
  123. package/contracts/ugc/open-creation/v1/dynamic-entities.mjs +186 -0
  124. package/contracts/ugc/open-creation/v1/open-world.mjs +269 -0
  125. package/contracts/ugc/public-runtime/v1/README.md +13 -1
  126. package/contracts/ugc/public-runtime/v1/compatibility-rows.test.mjs +79 -0
  127. package/contracts/ugc/public-runtime/v1/document-runtime.test.mjs +20 -5
  128. package/contracts/ugc/public-runtime/v1/manifest.mjs +24 -12
  129. package/contracts/ugc/public-runtime/v1/revision-vectors.test.mjs +49 -0
  130. package/contracts/ugc/public-runtime/v1/runtime-manifest.schema.json +119 -6
  131. package/contracts/ugc/runtime-content/v1/asset-budget.mjs +21 -0
  132. package/contracts/ugc/runtime-content/v1/limits.json +5 -0
  133. package/contracts/ugc/runtime-content/v1/validate.mjs +420 -0
  134. package/contracts/ugc/sandbox/v1/conformance/js/sandbox-validator.mjs +85 -6
  135. package/contracts/ugc/server-entities/v1/entities.mjs +221 -0
  136. package/contracts/ugc/server-entities/v1/events.mjs +336 -0
  137. package/contracts/ugc/server-entities/v1/limits.json +112 -0
  138. package/contracts/ugc/server-entities/v1/roads.mjs +164 -0
  139. package/contracts/ugc/v1/conformance/js/package-validator.mjs +51 -5
  140. package/contracts/ugc/v1/host-runnable.mjs +23 -0
  141. package/contracts/ugc/world-scene-runtime/v1/runtime-policy.mjs +2 -2
  142. package/contracts/ugc/world-scene-runtime/v2/runtime-policy.mjs +17 -3
  143. package/creator-check.source-lock.json +40 -0
  144. package/creator-release.json +1 -1
  145. package/docs/ai-index.md +193 -0
  146. package/docs/assets-3d-spec.md +114 -3
  147. package/docs/audio.md +110 -0
  148. package/docs/authored-avatars.md +67 -0
  149. package/docs/authored-entities.md +165 -0
  150. package/docs/capability-map.json +57 -0
  151. package/docs/controlled-presentation.md +53 -0
  152. package/docs/core-ecs.md +46 -0
  153. package/docs/declaration-generator.md +292 -0
  154. package/docs/document-presentation.md +14 -0
  155. package/docs/gameplay-inputs.md +77 -0
  156. package/docs/gameplay-lifecycle-tests.md +89 -0
  157. package/docs/ground-rules.md +63 -0
  158. package/docs/harness-onboarding.md +83 -22
  159. package/docs/live-rule-slots.md +57 -0
  160. package/docs/mcp-tools.md +39 -0
  161. package/docs/meshy.md +17 -4
  162. package/docs/migrate-1.6.md +63 -0
  163. package/docs/npm-creator.md +419 -254
  164. package/docs/open-creation.md +259 -0
  165. package/docs/player-private-components.md +51 -0
  166. package/docs/player-saves.md +175 -0
  167. package/docs/player-visible-state.md +65 -0
  168. package/docs/playtest.md +223 -0
  169. package/docs/private-ecs.md +48 -0
  170. package/docs/private-events.md +82 -0
  171. package/docs/private-state.md +30 -0
  172. package/docs/realtime-patterns.md +624 -0
  173. package/docs/recipes.md +397 -0
  174. package/docs/reference.md +365 -0
  175. package/docs/runtime-download.md +22 -5
  176. package/docs/scene-import.md +132 -0
  177. package/docs/scene-interactions.md +28 -0
  178. package/docs/server-entities.md +83 -0
  179. package/docs/weather.md +77 -0
  180. package/docs/work-brief.md +71 -0
  181. package/document-action-result.source-lock.json +8 -4
  182. package/error-codes.snapshot.lock.json +14 -0
  183. package/gameplay-consistency.source-lock.json +20 -0
  184. package/lib/authority-notice.mjs +76 -0
  185. package/lib/behavior-radius-check.mjs +71 -0
  186. package/lib/builtin-write.mjs +70 -0
  187. package/lib/capability-harness.mjs +4 -3
  188. package/lib/compress-model.mjs +266 -0
  189. package/lib/creator-agent-live.mjs +3 -0
  190. package/lib/creator-api.mjs +367 -144
  191. package/lib/creator-assets-restore.mjs +102 -0
  192. package/lib/creator-capability-map.mjs +28 -0
  193. package/lib/creator-check.mjs +338 -0
  194. package/lib/creator-cli.mjs +940 -119
  195. package/lib/creator-contribution.mjs +46 -37
  196. package/lib/creator-docs.mjs +56 -0
  197. package/lib/creator-entry.mjs +134 -0
  198. package/lib/creator-fix.mjs +208 -0
  199. package/lib/creator-init-paths.mjs +22 -13
  200. package/lib/creator-init.mjs +22 -9
  201. package/lib/creator-install.mjs +379 -66
  202. package/lib/creator-installed-platform.mjs +13 -0
  203. package/lib/creator-intent-rules.mjs +15 -0
  204. package/lib/creator-intent.mjs +147 -0
  205. package/lib/creator-issue.mjs +241 -0
  206. package/lib/creator-mcp.mjs +337 -140
  207. package/lib/creator-migrate.mjs +194 -0
  208. package/lib/creator-onboarding.mjs +3 -1
  209. package/lib/creator-platform.mjs +223 -29
  210. package/lib/creator-playtest.mjs +398 -0
  211. package/lib/creator-preview.mjs +80 -0
  212. package/lib/creator-project-snapshot.mjs +182 -108
  213. package/lib/creator-project-update.mjs +132 -102
  214. package/lib/creator-project.mjs +213 -62
  215. package/lib/creator-provenance.mjs +12 -10
  216. package/lib/creator-rebundle.mjs +68 -0
  217. package/lib/creator-rules.mjs +76 -0
  218. package/lib/creator-session.mjs +128 -25
  219. package/lib/creator-source-package.mjs +2 -2
  220. package/lib/creator-submit.mjs +252 -101
  221. package/lib/creator-toolchain-compat.mjs +476 -3
  222. package/lib/creator-upgrade.mjs +58 -33
  223. package/lib/creator-upload-state.mjs +61 -6
  224. package/lib/creator-workspace-guide.mjs +79 -0
  225. package/lib/declaration-generator.mjs +609 -0
  226. package/lib/declaration-problems.mjs +108 -0
  227. package/lib/document-action-result.mjs +7 -4
  228. package/lib/document-prechecks.mjs +633 -0
  229. package/lib/document-presentation.mjs +47 -15
  230. package/lib/document-refresh.mjs +46 -0
  231. package/lib/ecs-access.mjs +179 -0
  232. package/lib/failure-messages.mjs +42 -0
  233. package/lib/gameplay-imports.mjs +34 -0
  234. package/lib/host-consistency.mjs +74 -0
  235. package/lib/host-ipc/distribution-static-room-semantic-contract/contracts/ugc/public-runtime/v1/manifest.mjs +24 -12
  236. package/lib/host-ipc/distribution-static-room-semantic-contract/contracts/ugc/public-runtime/v1/runtime-manifest.schema.json +119 -6
  237. package/lib/host-ipc/host-ipc.schema.json +80 -0
  238. package/lib/host-ipc/runtime-contract.mjs +2 -0
  239. package/lib/host-ipc/source-lock.json +5 -5
  240. package/lib/host-runnable-scope.mjs +19 -0
  241. package/lib/legacy-patterns.mjs +705 -0
  242. package/lib/live-baseline-shape.mjs +30 -0
  243. package/lib/live-baseline.mjs +108 -0
  244. package/lib/live-rule-check.mjs +96 -0
  245. package/lib/local-builder.mjs +20 -5
  246. package/lib/local-content.mjs +6 -4
  247. package/lib/local-development.mjs +96 -24
  248. package/lib/local-room.mjs +12 -0
  249. package/lib/meshy-api.mjs +57 -1
  250. package/lib/meshy-cli.mjs +23 -0
  251. package/lib/meshy-store.mjs +34 -11
  252. package/lib/movement-authority.mjs +24 -0
  253. package/lib/platform-discovery.mjs +61 -0
  254. package/lib/platform-limits.mjs +6 -0
  255. package/lib/playtest-browser.mjs +121 -0
  256. package/lib/playtest-compare.mjs +42 -0
  257. package/lib/playtest-page.mjs +372 -0
  258. package/lib/playtest-vehicle.mjs +234 -0
  259. package/lib/presentation-project-update.mjs +126 -4
  260. package/lib/private-ecs-harness.mjs +39 -17
  261. package/lib/private-event-harness.mjs +3 -5
  262. package/lib/project-validation.mjs +852 -167
  263. package/lib/publish-prechecks.mjs +28 -0
  264. package/lib/relay-notice.mjs +13 -0
  265. package/lib/rule-fuzz.mjs +45 -0
  266. package/lib/rule-pack.mjs +150 -0
  267. package/lib/rule-selection.mjs +130 -0
  268. package/lib/rule-tests-child.mjs +40 -0
  269. package/lib/rule-tests-sandbox.mjs +75 -0
  270. package/lib/runtime-content.mjs +49 -0
  271. package/lib/runtime-download.mjs +94 -31
  272. package/lib/runtime-host-client.mjs +30 -12
  273. package/lib/runtime-host.mjs +7 -10
  274. package/lib/runtime-install.mjs +46 -6
  275. package/lib/runtime-prechecks.mjs +133 -0
  276. package/lib/runtime-proxy-fetch.mjs +117 -0
  277. package/lib/runtime-snapshot.mjs +20 -20
  278. package/lib/runtime-source.mjs +30 -14
  279. package/lib/sandbox-projection/v1/room-state-projection.mjs +116 -0
  280. package/lib/scene-assets.mjs +5 -5
  281. package/lib/scene-import-profiles.mjs +8 -0
  282. package/lib/scene-import.mjs +737 -0
  283. package/lib/server-entities-check.mjs +160 -0
  284. package/lib/toolchain-history.json +602 -0
  285. package/lib/vendor/mcp.mjs +33787 -0
  286. package/lib/vendor/smol-toml.mjs +744 -0
  287. package/lib/writable-by-others.mjs +8 -0
  288. package/live-rule-slot.source-lock.json +20 -0
  289. package/llms.txt +43 -0
  290. package/local-builder.snapshot.lock.json +3 -3
  291. package/local-content.snapshot.lock.json +112 -8
  292. package/node_modules/pngjs/CHANGELOG.md +128 -0
  293. package/package.json +251 -23
  294. package/public-runtime.snapshot.lock.json +13 -9
  295. package/realtime-revision.source-lock.json +20 -0
  296. package/runtime-catalog.json +16 -16
  297. package/sandbox-projection.source-lock.json +15 -0
  298. package/sdk/client/index.js +3 -2
  299. package/source-package.snapshot.lock.json +5 -5
  300. package/templates/document-presentation/README.md +5 -0
  301. package/templates/document-presentation/assets.js +36 -10
  302. package/templates/document-presentation/authority.js +25 -7
  303. package/templates/document-presentation/live-view.js +100 -0
  304. package/templates/document-presentation/local-first.js +45 -0
  305. package/templates/document-presentation/motion.js +2 -0
  306. package/templates/document-presentation/ready-gate.js +37 -0
  307. package/templates/document-presentation/state-view.js +26 -0
  308. package/templates/document-presentation/weather-blend.js +57 -0
  309. package/templates/document-presentation/weather-particles.js +192 -0
  310. package/templates/document-presentation/wet-ripples.js +61 -0
  311. package/templates/examples/coin-rush/README.md +5 -0
  312. package/templates/examples/coin-rush/chrona.generate.json +63 -0
  313. package/templates/examples/coin-rush/content/assets/runtime/arena.gltf +399 -0
  314. package/templates/examples/coin-rush/content/assets/runtime/runner.gltf +197 -0
  315. package/templates/examples/coin-rush/content/bindings/resources.json +19 -0
  316. package/templates/examples/coin-rush/content/gameplay/client/presentation.js +44 -0
  317. package/templates/examples/coin-rush/content/gameplay/shared/rules.js +49 -0
  318. package/templates/examples/coin-rush/content/manifest.json +100 -0
  319. package/templates/examples/coin-rush/content/provenance.json +20 -0
  320. package/templates/examples/coin-rush/content/rules/ground.json +45 -0
  321. package/templates/examples/coin-rush/content/tests/budgets.json +5 -0
  322. package/templates/examples/coin-rush/content/tests/rules.json +16 -0
  323. package/templates/examples/open-creation/README.md +5 -0
  324. package/templates/examples/open-creation/chrona.generate.json +55 -0
  325. package/templates/examples/open-creation/content/assets/runtime/arena.gltf +399 -0
  326. package/templates/examples/open-creation/content/assets/runtime/runner.gltf +197 -0
  327. package/templates/examples/open-creation/content/bindings/resources.json +19 -0
  328. package/templates/examples/open-creation/content/gameplay/client/presentation.js +33 -0
  329. package/templates/examples/open-creation/content/gameplay/shared/rules.js +29 -0
  330. package/templates/examples/open-creation/content/manifest.json +100 -0
  331. package/templates/examples/open-creation/content/provenance.json +20 -0
  332. package/templates/examples/open-creation/content/rules/ground.json +45 -0
  333. package/templates/examples/open-creation/content/tests/budgets.json +5 -0
  334. package/templates/examples/open-creation/content/tests/rules.json +16 -0
  335. package/templates/live-rule-slot/score-slot.js +16 -0
  336. package/templates/npm-project/AGENTS.md +101 -4
  337. package/templates/npm-project/preview.command +7 -0
  338. package/templates/npm-project/preview.ps1 +6 -0
  339. package/templates/npm-project/scripts/install-kit.mjs +70 -0
  340. package/templates/npm-project/setup.command +3 -0
  341. package/templates/npm-project/setup.ps1 +14 -0
  342. package/templates/npm-project/setup.sh +11 -0
  343. package/templates/public-untrusted/content/gameplay/client/local-first.js +45 -0
  344. package/templates/public-untrusted/content/gameplay/client/smoothing.js +83 -0
  345. package/templates/public-untrusted/content/manifest.json +2 -1
  346. package/templates/public-untrusted/content/tests/scenarios.json +20 -2
  347. package/contracts/ugc/capability-wiring/v1/capability-proposal.schema.json +0 -82
  348. package/contracts/ugc/capability-wiring/v1/conformance/js/wiring-validator.mjs +0 -95
  349. package/contracts/ugc/capability-wiring/v1/conformance/web/index.html +0 -5
  350. package/contracts/ugc/capability-wiring/v1/conformance/web/runner.mjs +0 -32
  351. package/contracts/ugc/capability-wiring/v1/contract-set.json +0 -8
  352. package/contracts/ugc/capability-wiring/v1/error-codes.json +0 -15
  353. package/contracts/ugc/capability-wiring/v1/needs-capability.schema.json +0 -18
  354. package/contracts/ugc/capability-wiring/v1/testdata/vectors.json +0 -128
  355. package/contracts/ugc/capability-wiring/v1/wiring-release.schema.json +0 -66
  356. package/contracts/ugc/controlled-presentation/v1/README.md +0 -175
  357. package/contracts/ugc/controlled-presentation/v1/approval.schema.json +0 -53
  358. package/contracts/ugc/controlled-presentation/v1/command.schema.json +0 -243
  359. package/contracts/ugc/controlled-presentation/v1/conformance/run-vectors.mjs +0 -39
  360. package/contracts/ugc/controlled-presentation/v1/conformance/run-view-vectors.mjs +0 -54
  361. package/contracts/ugc/controlled-presentation/v1/conformance/web/index.html +0 -1
  362. package/contracts/ugc/controlled-presentation/v1/conformance/web/runner.mjs +0 -4
  363. package/contracts/ugc/controlled-presentation/v1/conformance/web/view-runner.mjs +0 -5
  364. package/contracts/ugc/controlled-presentation/v1/conformance/web/view.html +0 -1
  365. package/contracts/ugc/controlled-presentation/v1/context.schema.json +0 -19
  366. package/contracts/ugc/controlled-presentation/v1/contract-set.json +0 -33
  367. package/contracts/ugc/controlled-presentation/v1/export-view.mjs +0 -44
  368. package/contracts/ugc/controlled-presentation/v1/grant.schema.json +0 -120
  369. package/contracts/ugc/controlled-presentation/v1/presentation.mjs +0 -180
  370. package/contracts/ugc/controlled-presentation/v1/testdata/vectors.json +0 -565
  371. package/contracts/ugc/controlled-presentation/v1/view.mjs +0 -46
  372. package/contracts/ugc/controlled-presentation/v1/view.schema.json +0 -90
  373. package/contracts/ugc/core-ecs/v1/README.md +0 -13
  374. package/contracts/ugc/core-ecs/v1/api.json +0 -28
  375. package/contracts/ugc/core-ecs/v1/conformance/run-vectors.mjs +0 -33
  376. package/contracts/ugc/core-ecs/v1/conformance/web/index.html +0 -1
  377. package/contracts/ugc/core-ecs/v1/conformance/web/runner.mjs +0 -4
  378. package/contracts/ugc/core-ecs/v1/test-fixture.schema.json +0 -169
  379. package/contracts/ugc/core-ecs/v1/testdata/vectors.json +0 -57
  380. package/contracts/ugc/document-presentation/v1/README.md +0 -167
  381. package/contracts/ugc/document-presentation/v1/contract-set.json +0 -18
  382. package/contracts/ugc/document-presentation/v1/document.schema.json +0 -161
  383. package/contracts/ugc/document-presentation/v1/document.test.mjs +0 -138
  384. package/contracts/ugc/document-presentation/v1/source.schema.json +0 -88
  385. package/contracts/ugc/ecs-runtime/v1/README.md +0 -25
  386. package/contracts/ugc/ecs-runtime/v1/api.json +0 -46
  387. package/contracts/ugc/ecs-runtime/v1/conformance/run-vectors.mjs +0 -41
  388. package/contracts/ugc/ecs-runtime/v1/conformance/web/index.html +0 -3
  389. package/contracts/ugc/ecs-runtime/v1/conformance/web/runner.mjs +0 -5
  390. package/contracts/ugc/ecs-runtime/v1/testdata/vectors.json +0 -1318
  391. package/contracts/ugc/gameplay-tests/v1/README.md +0 -78
  392. package/contracts/ugc/gameplay-tests/v1/cases.mjs +0 -70
  393. package/contracts/ugc/gameplay-tests/v1/cases.schema.json +0 -262
  394. package/contracts/ugc/gameplay-tests/v1/conformance/run-vectors.mjs +0 -21
  395. package/contracts/ugc/gameplay-tests/v1/conformance/web/index.html +0 -1
  396. package/contracts/ugc/gameplay-tests/v1/conformance/web/runner.mjs +0 -4
  397. package/contracts/ugc/gameplay-tests/v1/contract-set.json +0 -9
  398. package/contracts/ugc/gameplay-tests/v1/scene-step.mjs +0 -49
  399. package/contracts/ugc/gameplay-tests/v1/testdata/vectors.json +0 -1504
  400. package/contracts/ugc/ground-rules/v1/README.md +0 -44
  401. package/contracts/ugc/ground-rules/v1/conformance/run-vectors.mjs +0 -31
  402. package/contracts/ugc/ground-rules/v1/conformance/web/index.html +0 -1
  403. package/contracts/ugc/ground-rules/v1/conformance/web/runner.mjs +0 -4
  404. package/contracts/ugc/ground-rules/v1/contract-set.json +0 -9
  405. package/contracts/ugc/ground-rules/v1/effective-ground-rules.schema.json +0 -27
  406. package/contracts/ugc/ground-rules/v1/ground-rules.schema.json +0 -33
  407. package/contracts/ugc/ground-rules/v1/testdata/vectors.json +0 -57
  408. package/contracts/ugc/ground-rules/v2/README.md +0 -88
  409. package/contracts/ugc/ground-rules/v2/contract-set.json +0 -20
  410. package/contracts/ugc/ground-rules/v2/ground-rules.schema.json +0 -373
  411. package/contracts/ugc/ground-rules/v2/spaces.test.mjs +0 -58
  412. package/contracts/ugc/ground-rules/v2/spatial-source.schema.json +0 -788
  413. package/contracts/ugc/ground-rules/v2/spatial.test.mjs +0 -142
  414. package/contracts/ugc/ground-rules/v2.2/README.md +0 -73
  415. package/contracts/ugc/ground-rules/v2.2/center-band.test.mjs +0 -149
  416. package/contracts/ugc/ground-rules/v2.2/contract-set.json +0 -8
  417. package/contracts/ugc/ground-rules/v2.2/spatial-source.schema.json +0 -1049
  418. package/contracts/ugc/personal-state/v1/README.md +0 -181
  419. package/contracts/ugc/personal-state/v1/declaration.schema.json +0 -295
  420. package/contracts/ugc/personal-state/v1/declaration.test.mjs +0 -26
  421. package/contracts/ugc/personal-state/v1/marker.schema.json +0 -9
  422. package/contracts/ugc/personal-state/v1/node-plan.test.mjs +0 -65
  423. package/contracts/ugc/pipeline/v1/PLATFORM-SOURCE.md +0 -54
  424. package/contracts/ugc/pipeline/v1/PRESENTATION.md +0 -13
  425. package/contracts/ugc/pipeline/v1/build-record.schema.json +0 -93
  426. package/contracts/ugc/pipeline/v1/conformance/js/pipeline-validator.mjs +0 -196
  427. package/contracts/ugc/pipeline/v1/conformance/js/platform-release-validator.mjs +0 -78
  428. package/contracts/ugc/pipeline/v1/conformance/web/index.html +0 -5
  429. package/contracts/ugc/pipeline/v1/conformance/web/runner.mjs +0 -30
  430. package/contracts/ugc/pipeline/v1/contract-set.json +0 -30
  431. package/contracts/ugc/pipeline/v1/error-codes.json +0 -95
  432. package/contracts/ugc/pipeline/v1/platform-publication-binding.schema.json +0 -56
  433. package/contracts/ugc/pipeline/v1/public-release-descriptor.schema.json +0 -264
  434. package/contracts/ugc/pipeline/v1/publication-operation.schema.json +0 -97
  435. package/contracts/ugc/pipeline/v1/release-index.schema.json +0 -192
  436. package/contracts/ugc/pipeline/v1/review-decision.schema.json +0 -212
  437. package/contracts/ugc/pipeline/v1/submission-receipt.schema.json +0 -15
  438. package/contracts/ugc/pipeline/v1/testdata/vectors.json +0 -1713
  439. package/contracts/ugc/private-event-view/v1/README.md +0 -83
  440. package/contracts/ugc/private-event-view/v1/conformance/run-vectors.mjs +0 -65
  441. package/contracts/ugc/private-event-view/v1/conformance/web/index.html +0 -1
  442. package/contracts/ugc/private-event-view/v1/conformance/web/runner.mjs +0 -5
  443. package/contracts/ugc/private-event-view/v1/contract-set.json +0 -9
  444. package/contracts/ugc/private-event-view/v1/export.mjs +0 -22
  445. package/contracts/ugc/private-event-view/v1/testdata/vectors.json +0 -22
  446. package/contracts/ugc/private-event-view/v1/view.mjs +0 -130
  447. package/contracts/ugc/private-event-view/v1/view.schema.json +0 -204
  448. package/contracts/ugc/private-events/v1/README.md +0 -102
  449. package/contracts/ugc/private-events/v1/conformance/run-vectors.mjs +0 -52
  450. package/contracts/ugc/private-events/v1/conformance/web/index.html +0 -1
  451. package/contracts/ugc/private-events/v1/conformance/web/runner.mjs +0 -4
  452. package/contracts/ugc/private-events/v1/contract-set.json +0 -9
  453. package/contracts/ugc/private-events/v1/events.schema.json +0 -19
  454. package/contracts/ugc/private-events/v1/grant.schema.json +0 -15
  455. package/contracts/ugc/private-events/v1/output.schema.json +0 -15
  456. package/contracts/ugc/private-events/v1/testdata/vectors.json +0 -55
  457. package/contracts/ugc/private-state/v1/README.md +0 -95
  458. package/contracts/ugc/private-state/v1/conformance/run-vectors.mjs +0 -40
  459. package/contracts/ugc/private-state/v1/conformance/web/index.html +0 -1
  460. package/contracts/ugc/private-state/v1/conformance/web/runner.mjs +0 -4
  461. package/contracts/ugc/private-state/v1/contract-set.json +0 -9
  462. package/contracts/ugc/private-state/v1/field-table.schema.json +0 -136
  463. package/contracts/ugc/private-state/v1/projection.schema.json +0 -515
  464. package/contracts/ugc/private-state/v1/testdata/vectors.json +0 -76
  465. package/contracts/ugc/private-state-view/v1/README.md +0 -91
  466. package/contracts/ugc/private-state-view/v1/conformance/run-vectors.mjs +0 -52
  467. package/contracts/ugc/private-state-view/v1/conformance/web/index.html +0 -1
  468. package/contracts/ugc/private-state-view/v1/conformance/web/runner.mjs +0 -5
  469. package/contracts/ugc/private-state-view/v1/contract-set.json +0 -24
  470. package/contracts/ugc/private-state-view/v1/export.mjs +0 -29
  471. package/contracts/ugc/private-state-view/v1/publication.schema.json +0 -82
  472. package/contracts/ugc/private-state-view/v1/testdata/vectors.json +0 -21
  473. package/contracts/ugc/private-state-view/v1/view.mjs +0 -199
  474. package/contracts/ugc/private-state-view/v1/view.schema.json +0 -255
  475. package/contracts/ugc/public-runtime/v1/static-room-runtime.test.mjs +0 -225
  476. package/contracts/ugc/registry/v1/capabilities-lock.schema.json +0 -110
  477. package/contracts/ugc/registry/v1/capability-query-result.schema.json +0 -33
  478. package/contracts/ugc/registry/v1/capability-query.schema.json +0 -14
  479. package/contracts/ugc/registry/v1/capability-registry.schema.json +0 -83
  480. package/contracts/ugc/registry/v1/conformance/web/index.html +0 -5
  481. package/contracts/ugc/registry/v1/conformance/web/runner.mjs +0 -68
  482. package/contracts/ugc/registry/v1/contract-set.json +0 -23
  483. package/contracts/ugc/registry/v1/effective-budgets.schema.json +0 -34
  484. package/contracts/ugc/registry/v1/error-codes.json +0 -11
  485. package/contracts/ugc/registry/v1/network-profile-lock.schema.json +0 -26
  486. package/contracts/ugc/registry/v1/registry.json +0 -1
  487. package/contracts/ugc/registry/v1/resolution-policy.json +0 -70
  488. package/contracts/ugc/registry/v1/resolution-result.schema.json +0 -49
  489. package/contracts/ugc/registry/v1/testdata/vectors.json +0 -405
  490. package/contracts/ugc/resource-bindings/v1/AUTHORED-AVATAR.md +0 -133
  491. package/contracts/ugc/resource-bindings/v1/README.md +0 -61
  492. package/contracts/ugc/resource-bindings/v1/authored-avatar.schema.json +0 -48
  493. package/contracts/ugc/resource-bindings/v1/bindings.schema.json +0 -45
  494. package/contracts/ugc/resource-bindings/v1/conformance/authored-avatar-vectors.mjs +0 -26
  495. package/contracts/ugc/resource-bindings/v1/conformance/run-vectors.mjs +0 -32
  496. package/contracts/ugc/resource-bindings/v1/conformance/web/index.html +0 -1
  497. package/contracts/ugc/resource-bindings/v1/conformance/web/runner.mjs +0 -13
  498. package/contracts/ugc/resource-bindings/v1/contract-set.json +0 -9
  499. package/contracts/ugc/resource-bindings/v1/testdata/authored-avatar-vectors.json +0 -146
  500. package/contracts/ugc/resource-bindings/v1/testdata/authored-avatar.json +0 -13
  501. package/contracts/ugc/resource-bindings/v1/testdata/vectors.json +0 -68
  502. package/contracts/ugc/sandbox/v1/conformance/web/index.html +0 -5
  503. package/contracts/ugc/sandbox/v1/conformance/web/runner.mjs +0 -26
  504. package/contracts/ugc/sandbox/v1/contract-set.json +0 -19
  505. package/contracts/ugc/sandbox/v1/error-codes.json +0 -25
  506. package/contracts/ugc/sandbox/v1/execution-result.schema.json +0 -80
  507. package/contracts/ugc/sandbox/v1/launch-request.schema.json +0 -96
  508. package/contracts/ugc/sandbox/v1/lifecycle-message.schema.json +0 -18
  509. package/contracts/ugc/sandbox/v1/local-launch-request.schema.json +0 -34
  510. package/contracts/ugc/sandbox/v1/private-ecs-grant.schema.json +0 -32
  511. package/contracts/ugc/sandbox/v1/sandbox-profile.schema.json +0 -70
  512. package/contracts/ugc/sandbox/v1/testdata/vectors.json +0 -89
  513. package/contracts/ugc/scene-interaction/v1/README.md +0 -63
  514. package/contracts/ugc/scene-interaction/v1/conformance/run-vectors.mjs +0 -26
  515. package/contracts/ugc/scene-interaction/v1/conformance/web/index.html +0 -1
  516. package/contracts/ugc/scene-interaction/v1/conformance/web/runner.mjs +0 -4
  517. package/contracts/ugc/scene-interaction/v1/contract-set.json +0 -26
  518. package/contracts/ugc/scene-interaction/v1/effective-targets.schema.json +0 -76
  519. package/contracts/ugc/scene-interaction/v1/request.schema.json +0 -30
  520. package/contracts/ugc/scene-interaction/v1/result.schema.json +0 -88
  521. package/contracts/ugc/scene-interaction/v1/targets.schema.json +0 -49
  522. package/contracts/ugc/scene-interaction/v1/testdata/vectors.json +0 -732
  523. package/contracts/ugc/scene-interaction/v2/README.md +0 -63
  524. package/contracts/ugc/scene-interaction/v2/contract-set.json +0 -19
  525. package/contracts/ugc/scene-interaction/v2/metric.test.mjs +0 -99
  526. package/contracts/ugc/scene-interaction/v2/targets.schema.json +0 -229
  527. package/contracts/ugc/scene-presentation/v1/INK-MATH.md +0 -64
  528. package/contracts/ugc/scene-presentation/v1/README.md +0 -126
  529. package/contracts/ugc/scene-presentation/v1/RENDER-POLICY.md +0 -63
  530. package/contracts/ugc/scene-presentation/v1/conformance/ink-vectors.mjs +0 -34
  531. package/contracts/ugc/scene-presentation/v1/conformance/render-policy-vectors.mjs +0 -62
  532. package/contracts/ugc/scene-presentation/v1/conformance/vectors.mjs +0 -128
  533. package/contracts/ugc/scene-presentation/v1/contract-set.json +0 -6
  534. package/contracts/ugc/scene-presentation/v1/ink-math.mjs +0 -70
  535. package/contracts/ugc/scene-presentation/v1/render-policy.schema.json +0 -27
  536. package/contracts/ugc/scene-presentation/v1/scene.schema.json +0 -66
  537. package/contracts/ugc/v1/COVER.md +0 -38
  538. package/contracts/ugc/v1/SCENE-PROVENANCE.md +0 -54
  539. package/contracts/ugc/v1/candidate-submission.schema.json +0 -16
  540. package/contracts/ugc/v1/capability-request.schema.json +0 -29
  541. package/contracts/ugc/v1/compatibility.json +0 -32
  542. package/contracts/ugc/v1/components.schema.json +0 -77
  543. package/contracts/ugc/v1/conformance/js/capability-operations.mjs +0 -13
  544. package/contracts/ugc/v1/conformance/js/scene-provenance.mjs +0 -121
  545. package/contracts/ugc/v1/conformance/js/source-validator.mjs +0 -99
  546. package/contracts/ugc/v1/conformance/web/index.html +0 -5
  547. package/contracts/ugc/v1/conformance/web/runner.mjs +0 -82
  548. package/contracts/ugc/v1/contract-set.json +0 -38
  549. package/contracts/ugc/v1/creator-sdk.json +0 -84
  550. package/contracts/ugc/v1/error-codes.json +0 -53
  551. package/contracts/ugc/v1/manifest.schema.json +0 -215
  552. package/contracts/ugc/v1/network-intent.schema.json +0 -15
  553. package/contracts/ugc/v1/prefabs.schema.json +0 -29
  554. package/contracts/ugc/v1/provenance.schema.json +0 -160
  555. package/contracts/ugc/v1/scene.schema.json +0 -37
  556. package/contracts/ugc/v1/testdata/capability-operation-vectors.json +0 -243
  557. package/contracts/ugc/v1/testdata/cover-vectors.json +0 -25
  558. package/contracts/ugc/v1/testdata/invalid/authored-avatar-missing-capability.json +0 -44
  559. package/contracts/ugc/v1/testdata/invalid/authored-avatar-wrong-capability.json +0 -51
  560. package/contracts/ugc/v1/testdata/invalid/budget-overflow.json +0 -1
  561. package/contracts/ugc/v1/testdata/invalid/build-field-override.json +0 -1
  562. package/contracts/ugc/v1/testdata/invalid/creator-server-entrypoint.json +0 -5
  563. package/contracts/ugc/v1/testdata/invalid/forbidden-network-control.json +0 -1
  564. package/contracts/ugc/v1/testdata/invalid/ground-authority.json +0 -57
  565. package/contracts/ugc/v1/testdata/invalid/ground-budget.json +0 -56
  566. package/contracts/ugc/v1/testdata/invalid/ground-dependency.json +0 -49
  567. package/contracts/ugc/v1/testdata/invalid/ground-identity.json +0 -56
  568. package/contracts/ugc/v1/testdata/invalid/ground-missing.json +0 -13
  569. package/contracts/ugc/v1/testdata/invalid/ground-optional.json +0 -60
  570. package/contracts/ugc/v1/testdata/invalid/ground-path.json +0 -56
  571. package/contracts/ugc/v1/testdata/invalid/ground-run-dependency.json +0 -56
  572. package/contracts/ugc/v1/testdata/invalid/ground-version.json +0 -56
  573. package/contracts/ugc/v1/testdata/invalid/missing-required-field.json +0 -1
  574. package/contracts/ugc/v1/testdata/invalid/missing-shared-entrypoint.json +0 -5
  575. package/contracts/ugc/v1/testdata/invalid/path-escape.json +0 -1
  576. package/contracts/ugc/v1/testdata/invalid/private-events-authority.json +0 -35
  577. package/contracts/ugc/v1/testdata/invalid/private-events-budget.json +0 -35
  578. package/contracts/ugc/v1/testdata/invalid/private-events-dependency.json +0 -27
  579. package/contracts/ugc/v1/testdata/invalid/private-events-empty.json +0 -20
  580. package/contracts/ugc/v1/testdata/invalid/private-events-identity.json +0 -34
  581. package/contracts/ugc/v1/testdata/invalid/private-events-missing.json +0 -13
  582. package/contracts/ugc/v1/testdata/invalid/private-events-optional.json +0 -38
  583. package/contracts/ugc/v1/testdata/invalid/private-events-path.json +0 -34
  584. package/contracts/ugc/v1/testdata/invalid/private-events-type.json +0 -34
  585. package/contracts/ugc/v1/testdata/invalid/private-events-unknown-ref.json +0 -34
  586. package/contracts/ugc/v1/testdata/invalid/private-events-version.json +0 -34
  587. package/contracts/ugc/v1/testdata/invalid/resource-bindings-identity.json +0 -18
  588. package/contracts/ugc/v1/testdata/invalid/resource-bindings-kind.json +0 -19
  589. package/contracts/ugc/v1/testdata/invalid/resource-bindings-missing.json +0 -6
  590. package/contracts/ugc/v1/testdata/invalid/resource-bindings-path.json +0 -6
  591. package/contracts/ugc/v1/testdata/invalid/resource-bindings-type.json +0 -8
  592. package/contracts/ugc/v1/testdata/invalid/resource-bindings-unknown.json +0 -18
  593. package/contracts/ugc/v1/testdata/invalid/scene-interactions-authority.json +0 -61
  594. package/contracts/ugc/v1/testdata/invalid/scene-interactions-core-unknown.json +0 -61
  595. package/contracts/ugc/v1/testdata/invalid/scene-interactions-dependency.json +0 -53
  596. package/contracts/ugc/v1/testdata/invalid/scene-interactions-identity.json +0 -60
  597. package/contracts/ugc/v1/testdata/invalid/scene-interactions-missing-transform.json +0 -50
  598. package/contracts/ugc/v1/testdata/invalid/scene-interactions-missing.json +0 -49
  599. package/contracts/ugc/v1/testdata/invalid/scene-interactions-optional.json +0 -64
  600. package/contracts/ugc/v1/testdata/invalid/scene-interactions-partial-transform.json +0 -59
  601. package/contracts/ugc/v1/testdata/invalid/scene-interactions-path.json +0 -60
  602. package/contracts/ugc/v1/testdata/invalid/scene-interactions-radius.json +0 -60
  603. package/contracts/ugc/v1/testdata/invalid/scene-interactions-unknown-target.json +0 -60
  604. package/contracts/ugc/v1/testdata/invalid/scene-interactions-version.json +0 -60
  605. package/contracts/ugc/v1/testdata/invalid/scene-presentation-authority.json +0 -166
  606. package/contracts/ugc/v1/testdata/invalid/scene-presentation-capability.json +0 -158
  607. package/contracts/ugc/v1/testdata/invalid/scene-presentation-identity.json +0 -165
  608. package/contracts/ugc/v1/testdata/invalid/scene-presentation-missing.json +0 -13
  609. package/contracts/ugc/v1/testdata/invalid/scene-presentation-optional.json +0 -169
  610. package/contracts/ugc/v1/testdata/invalid/scene-presentation-path.json +0 -165
  611. package/contracts/ugc/v1/testdata/invalid/scene-presentation-undeclared.json +0 -163
  612. package/contracts/ugc/v1/testdata/invalid/scene-presentation-unknown-material.json +0 -165
  613. package/contracts/ugc/v1/testdata/invalid/schema-incompatible.json +0 -1
  614. package/contracts/ugc/v1/testdata/invalid/unknown-required-component.json +0 -1
  615. package/contracts/ugc/v1/testdata/invalid/world-scene-dual-motion.json +0 -7
  616. package/contracts/ugc/v1/testdata/invalid/world-scene-identity.json +0 -90
  617. package/contracts/ugc/v1/testdata/invalid/world-scene-missing-capability.json +0 -85
  618. package/contracts/ugc/v1/testdata/invalid/world-scene-missing.json +0 -28
  619. package/contracts/ugc/v1/testdata/invalid/world-scene-optional-capability.json +0 -94
  620. package/contracts/ugc/v1/testdata/invalid/world-scene-path.json +0 -6
  621. package/contracts/ugc/v1/testdata/invalid/world-scene-version.json +0 -90
  622. package/contracts/ugc/v1/testdata/scene-provenance-vectors.json +0 -56
  623. package/contracts/ugc/v1/testdata/source-vectors.json +0 -83
  624. package/contracts/ugc/v1/testdata/valid/authored-avatar.json +0 -51
  625. package/contracts/ugc/v1/testdata/valid/boundary.json +0 -1
  626. package/contracts/ugc/v1/testdata/valid/components.json +0 -15
  627. package/contracts/ugc/v1/testdata/valid/cosmetic.json +0 -9
  628. package/contracts/ugc/v1/testdata/valid/ground-rules.json +0 -56
  629. package/contracts/ugc/v1/testdata/valid/minimal.json +0 -15
  630. package/contracts/ugc/v1/testdata/valid/prefabs.json +0 -11
  631. package/contracts/ugc/v1/testdata/valid/private-events.json +0 -34
  632. package/contracts/ugc/v1/testdata/valid/resource-bindings.json +0 -18
  633. package/contracts/ugc/v1/testdata/valid/scene-interactions.json +0 -60
  634. package/contracts/ugc/v1/testdata/valid/scene-presentation.json +0 -165
  635. package/contracts/ugc/v1/testdata/valid/scene.json +0 -6
  636. package/contracts/ugc/v1/testdata/valid/unknown-optional-component.json +0 -1
  637. package/contracts/ugc/v1/testdata/valid/world-scene.json +0 -90
  638. package/contracts/ugc/v1/testdata/vectors.json +0 -555
  639. package/contracts/ugc/v1/validation-report.schema.json +0 -61
  640. package/contracts/ugc/world-scene/v1/collision-identity.mjs +0 -73
  641. package/contracts/ugc/world-scene/v1/collision-target.schema.json +0 -18
  642. package/contracts/ugc/world-scene/v1/conformance/flight-avatar-vectors.mjs +0 -27
  643. package/contracts/ugc/world-scene/v1/conformance/run-vectors.mjs +0 -29
  644. package/contracts/ugc/world-scene/v1/coordinates.schema.json +0 -16
  645. package/contracts/ugc/world-scene/v1/flight-avatar-actions.mjs +0 -3
  646. package/contracts/ugc/world-scene/v1/flight-avatar-sample.schema.json +0 -14
  647. package/contracts/ugc/world-scene/v1/scene-declaration.schema.json +0 -40
  648. package/contracts/ugc/world-scene/v1/testdata/flight-avatar-actions.json +0 -48
  649. package/contracts/ugc/world-scene/v1/testdata/scene-declaration-vectors.json +0 -103
  650. package/contracts/ugc/world-scene/v1/testdata/vectors.json +0 -55
  651. package/contracts/ugc/world-scene/v1/visual-tileset.mjs +0 -112
  652. package/contracts/ugc/world-scene/v1/visual-tileset.schema.json +0 -35
  653. package/contracts/ugc/world-scene/v2/ASSET-GRAPH.md +0 -13
  654. package/contracts/ugc/world-scene/v2/ENCODED-RESOURCES.md +0 -117
  655. package/contracts/ugc/world-scene/v2/PARTITION.md +0 -59
  656. package/contracts/ugc/world-scene/v2/VISUAL-TILESET.md +0 -80
  657. package/contracts/ugc/world-scene/v2/asset-graph.mjs +0 -169
  658. package/contracts/ugc/world-scene/v2/collision-index.schema.json +0 -29
  659. package/contracts/ugc/world-scene/v2/collision-partition.schema.json +0 -37
  660. package/contracts/ugc/world-scene/v2/conformance/asset-graph-vectors.mjs +0 -52
  661. package/contracts/ugc/world-scene/v2/conformance/collision-index-vectors.mjs +0 -29
  662. package/contracts/ugc/world-scene/v2/conformance/encoded-resource-vectors.mjs +0 -17
  663. package/contracts/ugc/world-scene/v2/conformance/partition-vectors.mjs +0 -74
  664. package/contracts/ugc/world-scene/v2/conformance/visual-vectors.mjs +0 -24
  665. package/contracts/ugc/world-scene/v2/contract-set.json +0 -50
  666. package/contracts/ugc/world-scene/v2/encoded-resource.schema.json +0 -17
  667. package/contracts/ugc/world-scene/v2/scene-declaration.schema.json +0 -21
  668. package/contracts/ugc/world-scene/v2/testdata/asset-graph-vectors.json +0 -3354
  669. package/contracts/ugc/world-scene/v2/testdata/collision-index-vectors.json +0 -103
  670. package/contracts/ugc/world-scene/v2/testdata/encoded-resource-vectors.json +0 -372
  671. package/contracts/ugc/world-scene/v2/testdata/visual-vectors.json +0 -43
  672. package/contracts/ugc/world-scene/v2/vendor/pako-raw-inflate.provenance.json +0 -43
  673. package/contracts/ugc/world-scene/v2/visual-tileset.mjs +0 -107
  674. package/contracts/ugc/world-scene/v2/visual-tileset.schema.json +0 -33
  675. package/contracts/ugc/world-scene-runtime/v1/runtime-plan.schema.json +0 -660
  676. package/contracts/ugc/world-scene-runtime/v1/testdata/policy-vectors.json +0 -40
  677. package/contracts/ugc/world-scene-runtime/v2/COLLISION-CAPACITY.md +0 -74
  678. package/contracts/ugc/world-scene-runtime/v2/REPORT.md +0 -91
  679. package/contracts/ugc/world-scene-runtime/v2/RUNTIME-PROJECTION.md +0 -110
  680. package/contracts/ugc/world-scene-runtime/v2/VISUAL-WORK.md +0 -72
  681. package/contracts/ugc/world-scene-runtime/v2/collision-capacity.schema.json +0 -62
  682. package/contracts/ugc/world-scene-runtime/v2/conformance/capacity-vectors.mjs +0 -25
  683. package/contracts/ugc/world-scene-runtime/v2/conformance/report-vectors.mjs +0 -141
  684. package/contracts/ugc/world-scene-runtime/v2/conformance/runtime-vectors.mjs +0 -41
  685. package/contracts/ugc/world-scene-runtime/v2/conformance/visual-work-vectors.mjs +0 -21
  686. package/contracts/ugc/world-scene-runtime/v2/contract-set.json +0 -45
  687. package/contracts/ugc/world-scene-runtime/v2/report.mjs +0 -184
  688. package/contracts/ugc/world-scene-runtime/v2/runtime-plan.schema.json +0 -38
  689. package/contracts/ugc/world-scene-runtime/v2/testdata/capacity-vectors.json +0 -30
  690. package/contracts/ugc/world-scene-runtime/v2/testdata/report-fixture.json +0 -250
  691. package/contracts/ugc/world-scene-runtime/v2/testdata/runtime-vectors.json +0 -39
  692. package/contracts/ugc/world-scene-runtime/v2/testdata/visual-work-vectors.json +0 -28
  693. package/contracts/ugc/world-scene-runtime/v2/visual-work-policy.mjs +0 -59
  694. package/document-presentation.snapshot.lock.json +0 -40
  695. package/ground-endpoint.snapshot.lock.json +0 -36
  696. package/ground-spaces.snapshot.lock.json +0 -57
  697. package/lib/creator-source-archive.mjs +0 -182
  698. package/node_modules/@esbuild/darwin-arm64/README.md +0 -3
  699. package/node_modules/@esbuild/darwin-arm64/bin/esbuild +0 -0
  700. package/node_modules/@esbuild/darwin-arm64/package.json +0 -20
  701. package/node_modules/@esbuild/darwin-x64/README.md +0 -3
  702. package/node_modules/@esbuild/darwin-x64/bin/esbuild +0 -0
  703. package/node_modules/@esbuild/darwin-x64/package.json +0 -20
  704. package/node_modules/@esbuild/linux-arm64/README.md +0 -3
  705. package/node_modules/@esbuild/linux-arm64/bin/esbuild +0 -0
  706. package/node_modules/@esbuild/linux-arm64/package.json +0 -20
  707. package/node_modules/@esbuild/linux-x64/README.md +0 -3
  708. package/node_modules/@esbuild/linux-x64/bin/esbuild +0 -0
  709. package/node_modules/@esbuild/linux-x64/package.json +0 -20
  710. package/node_modules/@modelcontextprotocol/core/LICENSE +0 -216
  711. package/node_modules/@modelcontextprotocol/core/README.md +0 -40
  712. package/node_modules/@modelcontextprotocol/core/dist/auth-BWdKR39I.d.mts +0 -8501
  713. package/node_modules/@modelcontextprotocol/core/dist/auth-BWdKR39I.d.mts.map +0 -1
  714. package/node_modules/@modelcontextprotocol/core/dist/auth-CUe6YdwF.mjs +0 -1678
  715. package/node_modules/@modelcontextprotocol/core/dist/auth-CUe6YdwF.mjs.map +0 -1
  716. package/node_modules/@modelcontextprotocol/core/dist/auth-CfDMXiII.cjs +0 -2899
  717. package/node_modules/@modelcontextprotocol/core/dist/auth-CfDMXiII.cjs.map +0 -1
  718. package/node_modules/@modelcontextprotocol/core/dist/auth-hYtaIUZm.d.cts +0 -8501
  719. package/node_modules/@modelcontextprotocol/core/dist/auth-hYtaIUZm.d.cts.map +0 -1
  720. package/node_modules/@modelcontextprotocol/core/dist/index.cjs +0 -175
  721. package/node_modules/@modelcontextprotocol/core/dist/index.d.cts +0 -2
  722. package/node_modules/@modelcontextprotocol/core/dist/index.d.mts +0 -2
  723. package/node_modules/@modelcontextprotocol/core/dist/index.mjs +0 -3
  724. package/node_modules/@modelcontextprotocol/core/dist/internal.cjs +0 -201
  725. package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts +0 -99
  726. package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts.map +0 -1
  727. package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts +0 -99
  728. package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts.map +0 -1
  729. package/node_modules/@modelcontextprotocol/core/dist/internal.mjs +0 -3
  730. package/node_modules/@modelcontextprotocol/core/package.json +0 -85
  731. package/node_modules/@modelcontextprotocol/server/LICENSE +0 -216
  732. package/node_modules/@modelcontextprotocol/server/README.md +0 -30
  733. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CEoC__sr.mjs +0 -7514
  734. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CEoC__sr.mjs.map +0 -1
  735. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CgI-5L6O.d.mts +0 -1071
  736. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CgI-5L6O.d.mts.map +0 -1
  737. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-FOQRM7up.d.cts +0 -1071
  738. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-FOQRM7up.d.cts.map +0 -1
  739. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-ZaoO9afR.cjs +0 -7531
  740. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-ZaoO9afR.cjs.map +0 -1
  741. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-BwbPzsdI.cjs +0 -986
  742. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-BwbPzsdI.cjs.map +0 -1
  743. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-C03CSigr.d.mts +0 -74
  744. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-C03CSigr.d.mts.map +0 -1
  745. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-doTkZbTr.d.cts +0 -74
  746. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-doTkZbTr.d.cts.map +0 -1
  747. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-p3WaZPqB.mjs +0 -981
  748. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-p3WaZPqB.mjs.map +0 -1
  749. package/node_modules/@modelcontextprotocol/server/dist/chunk-Bnu9O96Y.cjs +0 -60
  750. package/node_modules/@modelcontextprotocol/server/dist/chunk-Br0eD_fh.mjs +0 -42
  751. package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-CLhGwQTn.d.mts +0 -4043
  752. package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-CLhGwQTn.d.mts.map +0 -1
  753. package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-dBHMsxwf.d.cts +0 -4045
  754. package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-dBHMsxwf.d.cts.map +0 -1
  755. package/node_modules/@modelcontextprotocol/server/dist/dialects-D8eXzoGv.cjs +0 -46
  756. package/node_modules/@modelcontextprotocol/server/dist/dialects-D8eXzoGv.cjs.map +0 -1
  757. package/node_modules/@modelcontextprotocol/server/dist/dialects-DoSzNhcb.mjs +0 -34
  758. package/node_modules/@modelcontextprotocol/server/dist/dialects-DoSzNhcb.mjs.map +0 -1
  759. package/node_modules/@modelcontextprotocol/server/dist/index.cjs +0 -2055
  760. package/node_modules/@modelcontextprotocol/server/dist/index.cjs.map +0 -1
  761. package/node_modules/@modelcontextprotocol/server/dist/index.d.cts +0 -739
  762. package/node_modules/@modelcontextprotocol/server/dist/index.d.cts.map +0 -1
  763. package/node_modules/@modelcontextprotocol/server/dist/index.d.mts +0 -739
  764. package/node_modules/@modelcontextprotocol/server/dist/index.d.mts.map +0 -1
  765. package/node_modules/@modelcontextprotocol/server/dist/index.mjs +0 -1870
  766. package/node_modules/@modelcontextprotocol/server/dist/index.mjs.map +0 -1
  767. package/node_modules/@modelcontextprotocol/server/dist/mcp-D7GmuPnv.cjs +0 -2022
  768. package/node_modules/@modelcontextprotocol/server/dist/mcp-D7GmuPnv.cjs.map +0 -1
  769. package/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs +0 -1931
  770. package/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs.map +0 -1
  771. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.cjs +0 -23
  772. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.cjs.map +0 -1
  773. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.cts +0 -11
  774. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.cts.map +0 -1
  775. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.mts +0 -11
  776. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.mts.map +0 -1
  777. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.mjs +0 -22
  778. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.mjs.map +0 -1
  779. package/node_modules/@modelcontextprotocol/server/dist/shimsNode.cjs +0 -12
  780. package/node_modules/@modelcontextprotocol/server/dist/shimsNode.d.cts +0 -3
  781. package/node_modules/@modelcontextprotocol/server/dist/shimsNode.d.mts +0 -3
  782. package/node_modules/@modelcontextprotocol/server/dist/shimsNode.mjs +0 -4
  783. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs +0 -30
  784. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs.map +0 -1
  785. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.cts +0 -10
  786. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.cts.map +0 -1
  787. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.mts +0 -10
  788. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.mts.map +0 -1
  789. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs +0 -29
  790. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs.map +0 -1
  791. package/node_modules/@modelcontextprotocol/server/dist/src-CX2iR2pK.mjs +0 -7606
  792. package/node_modules/@modelcontextprotocol/server/dist/src-CX2iR2pK.mjs.map +0 -1
  793. package/node_modules/@modelcontextprotocol/server/dist/src-STyD_Vvf.cjs +0 -8104
  794. package/node_modules/@modelcontextprotocol/server/dist/src-STyD_Vvf.cjs.map +0 -1
  795. package/node_modules/@modelcontextprotocol/server/dist/stdio.cjs +0 -564
  796. package/node_modules/@modelcontextprotocol/server/dist/stdio.cjs.map +0 -1
  797. package/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts +0 -107
  798. package/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts.map +0 -1
  799. package/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts +0 -107
  800. package/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts.map +0 -1
  801. package/node_modules/@modelcontextprotocol/server/dist/stdio.mjs +0 -562
  802. package/node_modules/@modelcontextprotocol/server/dist/stdio.mjs.map +0 -1
  803. package/node_modules/@modelcontextprotocol/server/dist/types-DUs7mGBv.d.mts +0 -1099
  804. package/node_modules/@modelcontextprotocol/server/dist/types-DUs7mGBv.d.mts.map +0 -1
  805. package/node_modules/@modelcontextprotocol/server/dist/types-DsbMXNFL.d.cts +0 -1099
  806. package/node_modules/@modelcontextprotocol/server/dist/types-DsbMXNFL.d.cts.map +0 -1
  807. package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.cjs +0 -5
  808. package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.d.cts +0 -2
  809. package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.d.mts +0 -2
  810. package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.mjs +0 -3
  811. package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.cjs +0 -3
  812. package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.d.cts +0 -2
  813. package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.d.mts +0 -2
  814. package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.mjs +0 -3
  815. package/node_modules/@modelcontextprotocol/server/package.json +0 -160
  816. package/node_modules/esbuild/LICENSE.md +0 -21
  817. package/node_modules/esbuild/README.md +0 -3
  818. package/node_modules/esbuild/bin/esbuild +0 -223
  819. package/node_modules/esbuild/install.js +0 -289
  820. package/node_modules/esbuild/lib/main.d.ts +0 -716
  821. package/node_modules/esbuild/lib/main.js +0 -2242
  822. package/node_modules/esbuild/package.json +0 -49
  823. package/node_modules/smol-toml/LICENSE +0 -24
  824. package/node_modules/smol-toml/README.md +0 -236
  825. package/node_modules/smol-toml/dist/date.d.ts +0 -41
  826. package/node_modules/smol-toml/dist/date.js +0 -127
  827. package/node_modules/smol-toml/dist/error.d.ts +0 -38
  828. package/node_modules/smol-toml/dist/error.js +0 -63
  829. package/node_modules/smol-toml/dist/extract.d.ts +0 -30
  830. package/node_modules/smol-toml/dist/extract.js +0 -109
  831. package/node_modules/smol-toml/dist/index.cjs +0 -906
  832. package/node_modules/smol-toml/dist/index.d.ts +0 -43
  833. package/node_modules/smol-toml/dist/index.js +0 -33
  834. package/node_modules/smol-toml/dist/parse.d.ts +0 -37
  835. package/node_modules/smol-toml/dist/parse.js +0 -148
  836. package/node_modules/smol-toml/dist/primitive.d.ts +0 -31
  837. package/node_modules/smol-toml/dist/primitive.js +0 -178
  838. package/node_modules/smol-toml/dist/stringify.d.ts +0 -31
  839. package/node_modules/smol-toml/dist/stringify.js +0 -163
  840. package/node_modules/smol-toml/dist/struct.d.ts +0 -32
  841. package/node_modules/smol-toml/dist/struct.js +0 -194
  842. package/node_modules/smol-toml/dist/util.d.ts +0 -42
  843. package/node_modules/smol-toml/dist/util.js +0 -106
  844. package/node_modules/smol-toml/package.json +0 -54
  845. package/node_modules/zod/LICENSE +0 -21
  846. package/node_modules/zod/README.md +0 -218
  847. package/node_modules/zod/compile.cjs +0 -77
  848. package/node_modules/zod/compile.d.cts +0 -1
  849. package/node_modules/zod/compile.d.ts +0 -1
  850. package/node_modules/zod/compile.js +0 -52
  851. package/node_modules/zod/index.cjs +0 -33
  852. package/node_modules/zod/index.d.cts +0 -3
  853. package/node_modules/zod/index.d.ts +0 -3
  854. package/node_modules/zod/index.js +0 -7
  855. package/node_modules/zod/locales/index.cjs +0 -17
  856. package/node_modules/zod/locales/index.d.cts +0 -1
  857. package/node_modules/zod/locales/index.d.ts +0 -1
  858. package/node_modules/zod/locales/index.js +0 -1
  859. package/node_modules/zod/locales/package.json +0 -7
  860. package/node_modules/zod/mini/index.cjs +0 -32
  861. package/node_modules/zod/mini/index.d.cts +0 -3
  862. package/node_modules/zod/mini/index.d.ts +0 -3
  863. package/node_modules/zod/mini/index.js +0 -3
  864. package/node_modules/zod/mini/package.json +0 -7
  865. package/node_modules/zod/package.json +0 -146
  866. package/node_modules/zod/src/compile.ts +0 -56
  867. package/node_modules/zod/src/index.ts +0 -7
  868. package/node_modules/zod/src/locales/index.ts +0 -1
  869. package/node_modules/zod/src/mini/index.ts +0 -3
  870. package/node_modules/zod/src/v3/ZodError.ts +0 -340
  871. package/node_modules/zod/src/v3/benchmarks/datetime.ts +0 -58
  872. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -80
  873. package/node_modules/zod/src/v3/benchmarks/index.ts +0 -59
  874. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +0 -57
  875. package/node_modules/zod/src/v3/benchmarks/object.ts +0 -69
  876. package/node_modules/zod/src/v3/benchmarks/primitives.ts +0 -162
  877. package/node_modules/zod/src/v3/benchmarks/realworld.ts +0 -63
  878. package/node_modules/zod/src/v3/benchmarks/string.ts +0 -55
  879. package/node_modules/zod/src/v3/benchmarks/union.ts +0 -80
  880. package/node_modules/zod/src/v3/errors.ts +0 -13
  881. package/node_modules/zod/src/v3/external.ts +0 -6
  882. package/node_modules/zod/src/v3/helpers/enumUtil.ts +0 -17
  883. package/node_modules/zod/src/v3/helpers/errorUtil.ts +0 -8
  884. package/node_modules/zod/src/v3/helpers/parseUtil.ts +0 -176
  885. package/node_modules/zod/src/v3/helpers/partialUtil.ts +0 -34
  886. package/node_modules/zod/src/v3/helpers/typeAliases.ts +0 -2
  887. package/node_modules/zod/src/v3/helpers/util.ts +0 -224
  888. package/node_modules/zod/src/v3/index.ts +0 -4
  889. package/node_modules/zod/src/v3/locales/en.ts +0 -124
  890. package/node_modules/zod/src/v3/standard-schema.ts +0 -113
  891. package/node_modules/zod/src/v3/tests/Mocker.ts +0 -54
  892. package/node_modules/zod/src/v3/tests/all-errors.test.ts +0 -157
  893. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +0 -28
  894. package/node_modules/zod/src/v3/tests/array.test.ts +0 -71
  895. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +0 -388
  896. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +0 -46
  897. package/node_modules/zod/src/v3/tests/base.test.ts +0 -29
  898. package/node_modules/zod/src/v3/tests/bigint.test.ts +0 -55
  899. package/node_modules/zod/src/v3/tests/branded.test.ts +0 -53
  900. package/node_modules/zod/src/v3/tests/catch.test.ts +0 -220
  901. package/node_modules/zod/src/v3/tests/coerce.test.ts +0 -133
  902. package/node_modules/zod/src/v3/tests/complex.test.ts +0 -70
  903. package/node_modules/zod/src/v3/tests/custom.test.ts +0 -31
  904. package/node_modules/zod/src/v3/tests/date.test.ts +0 -32
  905. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +0 -186
  906. package/node_modules/zod/src/v3/tests/default.test.ts +0 -112
  907. package/node_modules/zod/src/v3/tests/description.test.ts +0 -33
  908. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +0 -315
  909. package/node_modules/zod/src/v3/tests/enum.test.ts +0 -80
  910. package/node_modules/zod/src/v3/tests/error.test.ts +0 -586
  911. package/node_modules/zod/src/v3/tests/firstparty.test.ts +0 -87
  912. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -21
  913. package/node_modules/zod/src/v3/tests/function.test.ts +0 -261
  914. package/node_modules/zod/src/v3/tests/generics.test.ts +0 -48
  915. package/node_modules/zod/src/v3/tests/instanceof.test.ts +0 -37
  916. package/node_modules/zod/src/v3/tests/intersection.test.ts +0 -128
  917. package/node_modules/zod/src/v3/tests/language-server.source.ts +0 -76
  918. package/node_modules/zod/src/v3/tests/language-server.test.ts +0 -206
  919. package/node_modules/zod/src/v3/tests/literal.test.ts +0 -36
  920. package/node_modules/zod/src/v3/tests/map.test.ts +0 -110
  921. package/node_modules/zod/src/v3/tests/masking.test.ts +0 -4
  922. package/node_modules/zod/src/v3/tests/mocker.test.ts +0 -19
  923. package/node_modules/zod/src/v3/tests/nan.test.ts +0 -24
  924. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +0 -87
  925. package/node_modules/zod/src/v3/tests/nullable.test.ts +0 -42
  926. package/node_modules/zod/src/v3/tests/number.test.ts +0 -176
  927. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +0 -29
  928. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +0 -29
  929. package/node_modules/zod/src/v3/tests/object.test.ts +0 -431
  930. package/node_modules/zod/src/v3/tests/optional.test.ts +0 -42
  931. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +0 -23
  932. package/node_modules/zod/src/v3/tests/parser.test.ts +0 -41
  933. package/node_modules/zod/src/v3/tests/partials.test.ts +0 -243
  934. package/node_modules/zod/src/v3/tests/pickomit.test.ts +0 -111
  935. package/node_modules/zod/src/v3/tests/pipeline.test.ts +0 -29
  936. package/node_modules/zod/src/v3/tests/preprocess.test.ts +0 -186
  937. package/node_modules/zod/src/v3/tests/primitive.test.ts +0 -440
  938. package/node_modules/zod/src/v3/tests/promise.test.ts +0 -90
  939. package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -114
  940. package/node_modules/zod/src/v3/tests/record.test.ts +0 -171
  941. package/node_modules/zod/src/v3/tests/recursive.test.ts +0 -197
  942. package/node_modules/zod/src/v3/tests/refine.test.ts +0 -313
  943. package/node_modules/zod/src/v3/tests/safeparse.test.ts +0 -27
  944. package/node_modules/zod/src/v3/tests/set.test.ts +0 -142
  945. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +0 -83
  946. package/node_modules/zod/src/v3/tests/string.test.ts +0 -922
  947. package/node_modules/zod/src/v3/tests/transformer.test.ts +0 -233
  948. package/node_modules/zod/src/v3/tests/tuple.test.ts +0 -90
  949. package/node_modules/zod/src/v3/tests/unions.test.ts +0 -57
  950. package/node_modules/zod/src/v3/tests/validations.test.ts +0 -133
  951. package/node_modules/zod/src/v3/tests/void.test.ts +0 -15
  952. package/node_modules/zod/src/v3/types.ts +0 -5138
  953. package/node_modules/zod/src/v4/classic/checks.ts +0 -33
  954. package/node_modules/zod/src/v4/classic/coerce.ts +0 -27
  955. package/node_modules/zod/src/v4/classic/compat.ts +0 -78
  956. package/node_modules/zod/src/v4/classic/deep-partial.ts +0 -76
  957. package/node_modules/zod/src/v4/classic/errors.ts +0 -97
  958. package/node_modules/zod/src/v4/classic/external.ts +0 -55
  959. package/node_modules/zod/src/v4/classic/from-json-schema.ts +0 -721
  960. package/node_modules/zod/src/v4/classic/in-out.ts +0 -45
  961. package/node_modules/zod/src/v4/classic/index.ts +0 -5
  962. package/node_modules/zod/src/v4/classic/iso.ts +0 -20
  963. package/node_modules/zod/src/v4/classic/parse.ts +0 -88
  964. package/node_modules/zod/src/v4/classic/schemas.ts +0 -2862
  965. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +0 -26
  966. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +0 -86
  967. package/node_modules/zod/src/v4/classic/tests/array.test.ts +0 -264
  968. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +0 -351
  969. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +0 -381
  970. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +0 -68
  971. package/node_modules/zod/src/v4/classic/tests/base.test.ts +0 -7
  972. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +0 -83
  973. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +0 -106
  974. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +0 -604
  975. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +0 -20
  976. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +0 -572
  977. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +0 -704
  978. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +0 -160
  979. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -374
  980. package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +0 -76
  981. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +0 -40
  982. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +0 -720
  983. package/node_modules/zod/src/v4/classic/tests/date.test.ts +0 -92
  984. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -316
  985. package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +0 -380
  986. package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +0 -32
  987. package/node_modules/zod/src/v4/classic/tests/default.test.ts +0 -455
  988. package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +0 -27
  989. package/node_modules/zod/src/v4/classic/tests/description.test.ts +0 -32
  990. package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +0 -221
  991. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -836
  992. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +0 -296
  993. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +0 -917
  994. package/node_modules/zod/src/v4/classic/tests/error.test.ts +0 -979
  995. package/node_modules/zod/src/v4/classic/tests/file.test.ts +0 -96
  996. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -179
  997. package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +0 -26
  998. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +0 -1310
  999. package/node_modules/zod/src/v4/classic/tests/function.test.ts +0 -391
  1000. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +0 -72
  1001. package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +0 -32
  1002. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +0 -67
  1003. package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +0 -159
  1004. package/node_modules/zod/src/v4/classic/tests/index.test.ts +0 -958
  1005. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +0 -281
  1006. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -107
  1007. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -334
  1008. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +0 -183
  1009. package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +0 -39
  1010. package/node_modules/zod/src/v4/classic/tests/json.test.ts +0 -109
  1011. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +0 -262
  1012. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +0 -128
  1013. package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +0 -29
  1014. package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +0 -24
  1015. package/node_modules/zod/src/v4/classic/tests/map.test.ts +0 -342
  1016. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +0 -21
  1017. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +0 -168
  1018. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +0 -101
  1019. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +0 -22
  1020. package/node_modules/zod/src/v4/classic/tests/number.test.ts +0 -362
  1021. package/node_modules/zod/src/v4/classic/tests/object.test.ts +0 -950
  1022. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +0 -234
  1023. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +0 -366
  1024. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +0 -497
  1025. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -211
  1026. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +0 -101
  1027. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +0 -74
  1028. package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +0 -44
  1029. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +0 -351
  1030. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +0 -175
  1031. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
  1032. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +0 -23
  1033. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -184
  1034. package/node_modules/zod/src/v4/classic/tests/record.test.ts +0 -885
  1035. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -662
  1036. package/node_modules/zod/src/v4/classic/tests/redos.test.ts +0 -68
  1037. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +0 -693
  1038. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +0 -243
  1039. package/node_modules/zod/src/v4/classic/tests/set.test.ts +0 -190
  1040. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -134
  1041. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +0 -125
  1042. package/node_modules/zod/src/v4/classic/tests/string.test.ts +0 -1346
  1043. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +0 -124
  1044. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -780
  1045. package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +0 -438
  1046. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -4537
  1047. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +0 -378
  1048. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -511
  1049. package/node_modules/zod/src/v4/classic/tests/union.test.ts +0 -310
  1050. package/node_modules/zod/src/v4/classic/tests/url.test.ts +0 -13
  1051. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +0 -76
  1052. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +0 -283
  1053. package/node_modules/zod/src/v4/classic/tests/void.test.ts +0 -12
  1054. package/node_modules/zod/src/v4/core/api.ts +0 -1859
  1055. package/node_modules/zod/src/v4/core/checks.ts +0 -1306
  1056. package/node_modules/zod/src/v4/core/compile.ts +0 -2188
  1057. package/node_modules/zod/src/v4/core/core.ts +0 -232
  1058. package/node_modules/zod/src/v4/core/doc.ts +0 -48
  1059. package/node_modules/zod/src/v4/core/errors.ts +0 -546
  1060. package/node_modules/zod/src/v4/core/index.ts +0 -19
  1061. package/node_modules/zod/src/v4/core/json-schema-generator.ts +0 -131
  1062. package/node_modules/zod/src/v4/core/json-schema-processors.ts +0 -830
  1063. package/node_modules/zod/src/v4/core/json-schema.ts +0 -148
  1064. package/node_modules/zod/src/v4/core/memoizer.ts +0 -284
  1065. package/node_modules/zod/src/v4/core/parse.ts +0 -288
  1066. package/node_modules/zod/src/v4/core/regexes.ts +0 -207
  1067. package/node_modules/zod/src/v4/core/registries.ts +0 -105
  1068. package/node_modules/zod/src/v4/core/schemas.ts +0 -5028
  1069. package/node_modules/zod/src/v4/core/standard-schema.ts +0 -159
  1070. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +0 -969
  1071. package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +0 -89
  1072. package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +0 -26
  1073. package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +0 -34
  1074. package/node_modules/zod/src/v4/core/tests/compile.test.ts +0 -1639
  1075. package/node_modules/zod/src/v4/core/tests/extend.test.ts +0 -59
  1076. package/node_modules/zod/src/v4/core/tests/index.test.ts +0 -46
  1077. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +0 -124
  1078. package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +0 -214
  1079. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
  1080. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +0 -180
  1081. package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +0 -72
  1082. package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +0 -379
  1083. package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +0 -163
  1084. package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +0 -46
  1085. package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +0 -42
  1086. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +0 -128
  1087. package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +0 -69
  1088. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
  1089. package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +0 -105
  1090. package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +0 -125
  1091. package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +0 -45
  1092. package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +0 -51
  1093. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +0 -31
  1094. package/node_modules/zod/src/v4/core/to-json-schema.ts +0 -855
  1095. package/node_modules/zod/src/v4/core/util.ts +0 -1209
  1096. package/node_modules/zod/src/v4/core/versions.ts +0 -5
  1097. package/node_modules/zod/src/v4/core/visit.ts +0 -193
  1098. package/node_modules/zod/src/v4/core/zsf.ts +0 -323
  1099. package/node_modules/zod/src/v4/index.ts +0 -4
  1100. package/node_modules/zod/src/v4/locales/ar.ts +0 -118
  1101. package/node_modules/zod/src/v4/locales/az.ts +0 -114
  1102. package/node_modules/zod/src/v4/locales/be.ts +0 -186
  1103. package/node_modules/zod/src/v4/locales/bg.ts +0 -131
  1104. package/node_modules/zod/src/v4/locales/bn.ts +0 -121
  1105. package/node_modules/zod/src/v4/locales/ca.ts +0 -119
  1106. package/node_modules/zod/src/v4/locales/ckb.ts +0 -138
  1107. package/node_modules/zod/src/v4/locales/cs.ts +0 -121
  1108. package/node_modules/zod/src/v4/locales/da.ts +0 -126
  1109. package/node_modules/zod/src/v4/locales/de.ts +0 -119
  1110. package/node_modules/zod/src/v4/locales/el.ts +0 -122
  1111. package/node_modules/zod/src/v4/locales/en.ts +0 -134
  1112. package/node_modules/zod/src/v4/locales/eo.ts +0 -121
  1113. package/node_modules/zod/src/v4/locales/es.ts +0 -143
  1114. package/node_modules/zod/src/v4/locales/fa.ts +0 -129
  1115. package/node_modules/zod/src/v4/locales/fi.ts +0 -124
  1116. package/node_modules/zod/src/v4/locales/fr-CA.ts +0 -119
  1117. package/node_modules/zod/src/v4/locales/fr.ts +0 -137
  1118. package/node_modules/zod/src/v4/locales/gu.ts +0 -121
  1119. package/node_modules/zod/src/v4/locales/he.ts +0 -251
  1120. package/node_modules/zod/src/v4/locales/hi.ts +0 -124
  1121. package/node_modules/zod/src/v4/locales/hr.ts +0 -133
  1122. package/node_modules/zod/src/v4/locales/hu.ts +0 -120
  1123. package/node_modules/zod/src/v4/locales/hy.ts +0 -173
  1124. package/node_modules/zod/src/v4/locales/id.ts +0 -118
  1125. package/node_modules/zod/src/v4/locales/index.ts +0 -62
  1126. package/node_modules/zod/src/v4/locales/is.ts +0 -122
  1127. package/node_modules/zod/src/v4/locales/it.ts +0 -119
  1128. package/node_modules/zod/src/v4/locales/ja.ts +0 -117
  1129. package/node_modules/zod/src/v4/locales/ka.ts +0 -126
  1130. package/node_modules/zod/src/v4/locales/kh.ts +0 -7
  1131. package/node_modules/zod/src/v4/locales/km.ts +0 -122
  1132. package/node_modules/zod/src/v4/locales/kn.ts +0 -124
  1133. package/node_modules/zod/src/v4/locales/ko.ts +0 -124
  1134. package/node_modules/zod/src/v4/locales/lt.ts +0 -241
  1135. package/node_modules/zod/src/v4/locales/mk.ts +0 -121
  1136. package/node_modules/zod/src/v4/locales/ms.ts +0 -118
  1137. package/node_modules/zod/src/v4/locales/ne.ts +0 -126
  1138. package/node_modules/zod/src/v4/locales/nl.ts +0 -124
  1139. package/node_modules/zod/src/v4/locales/nn.ts +0 -119
  1140. package/node_modules/zod/src/v4/locales/no.ts +0 -119
  1141. package/node_modules/zod/src/v4/locales/ota.ts +0 -120
  1142. package/node_modules/zod/src/v4/locales/pl.ts +0 -121
  1143. package/node_modules/zod/src/v4/locales/ps.ts +0 -129
  1144. package/node_modules/zod/src/v4/locales/pt-BR.ts +0 -159
  1145. package/node_modules/zod/src/v4/locales/pt.ts +0 -157
  1146. package/node_modules/zod/src/v4/locales/ro.ts +0 -130
  1147. package/node_modules/zod/src/v4/locales/ru.ts +0 -186
  1148. package/node_modules/zod/src/v4/locales/sk.ts +0 -121
  1149. package/node_modules/zod/src/v4/locales/sl.ts +0 -121
  1150. package/node_modules/zod/src/v4/locales/sv.ts +0 -122
  1151. package/node_modules/zod/src/v4/locales/ta.ts +0 -121
  1152. package/node_modules/zod/src/v4/locales/th.ts +0 -122
  1153. package/node_modules/zod/src/v4/locales/tk.ts +0 -111
  1154. package/node_modules/zod/src/v4/locales/tr.ts +0 -114
  1155. package/node_modules/zod/src/v4/locales/ua.ts +0 -7
  1156. package/node_modules/zod/src/v4/locales/uk.ts +0 -120
  1157. package/node_modules/zod/src/v4/locales/ur.ts +0 -122
  1158. package/node_modules/zod/src/v4/locales/uz.ts +0 -118
  1159. package/node_modules/zod/src/v4/locales/vi.ts +0 -120
  1160. package/node_modules/zod/src/v4/locales/yo.ts +0 -127
  1161. package/node_modules/zod/src/v4/locales/zh-CN.ts +0 -119
  1162. package/node_modules/zod/src/v4/locales/zh-TW.ts +0 -118
  1163. package/node_modules/zod/src/v4/mini/checks.ts +0 -33
  1164. package/node_modules/zod/src/v4/mini/coerce.ts +0 -27
  1165. package/node_modules/zod/src/v4/mini/deep-partial.ts +0 -73
  1166. package/node_modules/zod/src/v4/mini/external.ts +0 -50
  1167. package/node_modules/zod/src/v4/mini/in-out.ts +0 -45
  1168. package/node_modules/zod/src/v4/mini/index.ts +0 -3
  1169. package/node_modules/zod/src/v4/mini/iso.ts +0 -66
  1170. package/node_modules/zod/src/v4/mini/parse.ts +0 -16
  1171. package/node_modules/zod/src/v4/mini/schemas.ts +0 -2026
  1172. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +0 -57
  1173. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +0 -190
  1174. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +0 -94
  1175. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +0 -158
  1176. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +0 -582
  1177. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +0 -36
  1178. package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +0 -84
  1179. package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +0 -54
  1180. package/node_modules/zod/src/v4/mini/tests/error.test.ts +0 -41
  1181. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -14
  1182. package/node_modules/zod/src/v4/mini/tests/index.test.ts +0 -1060
  1183. package/node_modules/zod/src/v4/mini/tests/number.test.ts +0 -109
  1184. package/node_modules/zod/src/v4/mini/tests/object.test.ts +0 -292
  1185. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +0 -43
  1186. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +0 -325
  1187. package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +0 -50
  1188. package/node_modules/zod/src/v4/mini/tests/string.test.ts +0 -373
  1189. package/node_modules/zod/src/v4-mini/index.ts +0 -3
  1190. package/node_modules/zod/v3/ZodError.cjs +0 -148
  1191. package/node_modules/zod/v3/ZodError.d.cts +0 -164
  1192. package/node_modules/zod/v3/ZodError.d.ts +0 -164
  1193. package/node_modules/zod/v3/ZodError.js +0 -143
  1194. package/node_modules/zod/v3/errors.cjs +0 -17
  1195. package/node_modules/zod/v3/errors.d.cts +0 -5
  1196. package/node_modules/zod/v3/errors.d.ts +0 -5
  1197. package/node_modules/zod/v3/errors.js +0 -9
  1198. package/node_modules/zod/v3/external.cjs +0 -22
  1199. package/node_modules/zod/v3/external.d.cts +0 -6
  1200. package/node_modules/zod/v3/external.d.ts +0 -6
  1201. package/node_modules/zod/v3/external.js +0 -6
  1202. package/node_modules/zod/v3/helpers/enumUtil.cjs +0 -2
  1203. package/node_modules/zod/v3/helpers/enumUtil.d.cts +0 -8
  1204. package/node_modules/zod/v3/helpers/enumUtil.d.ts +0 -8
  1205. package/node_modules/zod/v3/helpers/enumUtil.js +0 -1
  1206. package/node_modules/zod/v3/helpers/errorUtil.cjs +0 -9
  1207. package/node_modules/zod/v3/helpers/errorUtil.d.cts +0 -9
  1208. package/node_modules/zod/v3/helpers/errorUtil.d.ts +0 -9
  1209. package/node_modules/zod/v3/helpers/errorUtil.js +0 -6
  1210. package/node_modules/zod/v3/helpers/parseUtil.cjs +0 -124
  1211. package/node_modules/zod/v3/helpers/parseUtil.d.cts +0 -78
  1212. package/node_modules/zod/v3/helpers/parseUtil.d.ts +0 -78
  1213. package/node_modules/zod/v3/helpers/parseUtil.js +0 -109
  1214. package/node_modules/zod/v3/helpers/partialUtil.cjs +0 -2
  1215. package/node_modules/zod/v3/helpers/partialUtil.d.cts +0 -8
  1216. package/node_modules/zod/v3/helpers/partialUtil.d.ts +0 -8
  1217. package/node_modules/zod/v3/helpers/partialUtil.js +0 -1
  1218. package/node_modules/zod/v3/helpers/typeAliases.cjs +0 -2
  1219. package/node_modules/zod/v3/helpers/typeAliases.d.cts +0 -2
  1220. package/node_modules/zod/v3/helpers/typeAliases.d.ts +0 -2
  1221. package/node_modules/zod/v3/helpers/typeAliases.js +0 -1
  1222. package/node_modules/zod/v3/helpers/util.cjs +0 -137
  1223. package/node_modules/zod/v3/helpers/util.d.cts +0 -85
  1224. package/node_modules/zod/v3/helpers/util.d.ts +0 -85
  1225. package/node_modules/zod/v3/helpers/util.js +0 -133
  1226. package/node_modules/zod/v3/index.cjs +0 -33
  1227. package/node_modules/zod/v3/index.d.cts +0 -4
  1228. package/node_modules/zod/v3/index.d.ts +0 -4
  1229. package/node_modules/zod/v3/index.js +0 -4
  1230. package/node_modules/zod/v3/locales/en.cjs +0 -112
  1231. package/node_modules/zod/v3/locales/en.d.cts +0 -3
  1232. package/node_modules/zod/v3/locales/en.d.ts +0 -3
  1233. package/node_modules/zod/v3/locales/en.js +0 -109
  1234. package/node_modules/zod/v3/package.json +0 -7
  1235. package/node_modules/zod/v3/standard-schema.cjs +0 -2
  1236. package/node_modules/zod/v3/standard-schema.d.cts +0 -102
  1237. package/node_modules/zod/v3/standard-schema.d.ts +0 -102
  1238. package/node_modules/zod/v3/standard-schema.js +0 -1
  1239. package/node_modules/zod/v3/types.cjs +0 -3779
  1240. package/node_modules/zod/v3/types.d.cts +0 -1034
  1241. package/node_modules/zod/v3/types.d.ts +0 -1034
  1242. package/node_modules/zod/v3/types.js +0 -3697
  1243. package/node_modules/zod/v4/classic/checks.cjs +0 -34
  1244. package/node_modules/zod/v4/classic/checks.d.cts +0 -1
  1245. package/node_modules/zod/v4/classic/checks.d.ts +0 -1
  1246. package/node_modules/zod/v4/classic/checks.js +0 -1
  1247. package/node_modules/zod/v4/classic/coerce.cjs +0 -47
  1248. package/node_modules/zod/v4/classic/coerce.d.cts +0 -17
  1249. package/node_modules/zod/v4/classic/coerce.d.ts +0 -17
  1250. package/node_modules/zod/v4/classic/coerce.js +0 -17
  1251. package/node_modules/zod/v4/classic/compat.cjs +0 -61
  1252. package/node_modules/zod/v4/classic/compat.d.cts +0 -48
  1253. package/node_modules/zod/v4/classic/compat.d.ts +0 -48
  1254. package/node_modules/zod/v4/classic/compat.js +0 -31
  1255. package/node_modules/zod/v4/classic/deep-partial.cjs +0 -39
  1256. package/node_modules/zod/v4/classic/deep-partial.d.cts +0 -14
  1257. package/node_modules/zod/v4/classic/deep-partial.d.ts +0 -14
  1258. package/node_modules/zod/v4/classic/deep-partial.js +0 -13
  1259. package/node_modules/zod/v4/classic/errors.cjs +0 -83
  1260. package/node_modules/zod/v4/classic/errors.d.cts +0 -29
  1261. package/node_modules/zod/v4/classic/errors.d.ts +0 -29
  1262. package/node_modules/zod/v4/classic/errors.js +0 -57
  1263. package/node_modules/zod/v4/classic/external.cjs +0 -76
  1264. package/node_modules/zod/v4/classic/external.d.cts +0 -19
  1265. package/node_modules/zod/v4/classic/external.d.ts +0 -19
  1266. package/node_modules/zod/v4/classic/external.js +0 -17
  1267. package/node_modules/zod/v4/classic/from-json-schema.cjs +0 -686
  1268. package/node_modules/zod/v4/classic/from-json-schema.d.cts +0 -12
  1269. package/node_modules/zod/v4/classic/from-json-schema.d.ts +0 -12
  1270. package/node_modules/zod/v4/classic/from-json-schema.js +0 -660
  1271. package/node_modules/zod/v4/classic/in-out.cjs +0 -63
  1272. package/node_modules/zod/v4/classic/in-out.d.cts +0 -8
  1273. package/node_modules/zod/v4/classic/in-out.d.ts +0 -8
  1274. package/node_modules/zod/v4/classic/in-out.js +0 -36
  1275. package/node_modules/zod/v4/classic/index.cjs +0 -33
  1276. package/node_modules/zod/v4/classic/index.d.cts +0 -3
  1277. package/node_modules/zod/v4/classic/index.d.ts +0 -3
  1278. package/node_modules/zod/v4/classic/index.js +0 -4
  1279. package/node_modules/zod/v4/classic/iso.cjs +0 -49
  1280. package/node_modules/zod/v4/classic/iso.d.cts +0 -7
  1281. package/node_modules/zod/v4/classic/iso.d.ts +0 -7
  1282. package/node_modules/zod/v4/classic/iso.js +0 -15
  1283. package/node_modules/zod/v4/classic/package.json +0 -7
  1284. package/node_modules/zod/v4/classic/parse.cjs +0 -44
  1285. package/node_modules/zod/v4/classic/parse.d.cts +0 -44
  1286. package/node_modules/zod/v4/classic/parse.d.ts +0 -44
  1287. package/node_modules/zod/v4/classic/parse.js +0 -16
  1288. package/node_modules/zod/v4/classic/schemas.cjs +0 -1611
  1289. package/node_modules/zod/v4/classic/schemas.d.cts +0 -802
  1290. package/node_modules/zod/v4/classic/schemas.d.ts +0 -802
  1291. package/node_modules/zod/v4/classic/schemas.js +0 -1491
  1292. package/node_modules/zod/v4/core/api.cjs +0 -1246
  1293. package/node_modules/zod/v4/core/api.d.cts +0 -329
  1294. package/node_modules/zod/v4/core/api.d.ts +0 -329
  1295. package/node_modules/zod/v4/core/api.js +0 -1104
  1296. package/node_modules/zod/v4/core/checks.cjs +0 -607
  1297. package/node_modules/zod/v4/core/checks.d.cts +0 -278
  1298. package/node_modules/zod/v4/core/checks.d.ts +0 -278
  1299. package/node_modules/zod/v4/core/checks.js +0 -581
  1300. package/node_modules/zod/v4/core/compile.cjs +0 -1813
  1301. package/node_modules/zod/v4/core/compile.d.cts +0 -51
  1302. package/node_modules/zod/v4/core/compile.d.ts +0 -51
  1303. package/node_modules/zod/v4/core/compile.js +0 -1783
  1304. package/node_modules/zod/v4/core/core.cjs +0 -148
  1305. package/node_modules/zod/v4/core/core.d.cts +0 -82
  1306. package/node_modules/zod/v4/core/core.d.ts +0 -82
  1307. package/node_modules/zod/v4/core/core.js +0 -141
  1308. package/node_modules/zod/v4/core/doc.cjs +0 -37
  1309. package/node_modules/zod/v4/core/doc.d.cts +0 -16
  1310. package/node_modules/zod/v4/core/doc.d.ts +0 -16
  1311. package/node_modules/zod/v4/core/doc.js +0 -33
  1312. package/node_modules/zod/v4/core/errors.cjs +0 -301
  1313. package/node_modules/zod/v4/core/errors.d.cts +0 -225
  1314. package/node_modules/zod/v4/core/errors.d.ts +0 -225
  1315. package/node_modules/zod/v4/core/errors.js +0 -270
  1316. package/node_modules/zod/v4/core/index.cjs +0 -51
  1317. package/node_modules/zod/v4/core/index.d.cts +0 -19
  1318. package/node_modules/zod/v4/core/index.d.ts +0 -19
  1319. package/node_modules/zod/v4/core/index.js +0 -19
  1320. package/node_modules/zod/v4/core/json-schema-generator.cjs +0 -103
  1321. package/node_modules/zod/v4/core/json-schema-generator.d.cts +0 -65
  1322. package/node_modules/zod/v4/core/json-schema-generator.d.ts +0 -65
  1323. package/node_modules/zod/v4/core/json-schema-generator.js +0 -99
  1324. package/node_modules/zod/v4/core/json-schema-processors.cjs +0 -813
  1325. package/node_modules/zod/v4/core/json-schema-processors.d.cts +0 -49
  1326. package/node_modules/zod/v4/core/json-schema-processors.d.ts +0 -49
  1327. package/node_modules/zod/v4/core/json-schema-processors.js +0 -747
  1328. package/node_modules/zod/v4/core/json-schema.cjs +0 -2
  1329. package/node_modules/zod/v4/core/json-schema.d.cts +0 -89
  1330. package/node_modules/zod/v4/core/json-schema.d.ts +0 -89
  1331. package/node_modules/zod/v4/core/json-schema.js +0 -1
  1332. package/node_modules/zod/v4/core/memoizer.cjs +0 -272
  1333. package/node_modules/zod/v4/core/memoizer.d.cts +0 -15
  1334. package/node_modules/zod/v4/core/memoizer.d.ts +0 -15
  1335. package/node_modules/zod/v4/core/memoizer.js +0 -265
  1336. package/node_modules/zod/v4/core/package.json +0 -7
  1337. package/node_modules/zod/v4/core/parse.cjs +0 -193
  1338. package/node_modules/zod/v4/core/parse.d.cts +0 -52
  1339. package/node_modules/zod/v4/core/parse.d.ts +0 -52
  1340. package/node_modules/zod/v4/core/parse.js +0 -154
  1341. package/node_modules/zod/v4/core/regexes.cjs +0 -184
  1342. package/node_modules/zod/v4/core/regexes.d.cts +0 -87
  1343. package/node_modules/zod/v4/core/regexes.d.ts +0 -87
  1344. package/node_modules/zod/v4/core/regexes.js +0 -150
  1345. package/node_modules/zod/v4/core/registries.cjs +0 -56
  1346. package/node_modules/zod/v4/core/registries.d.cts +0 -35
  1347. package/node_modules/zod/v4/core/registries.d.ts +0 -35
  1348. package/node_modules/zod/v4/core/registries.js +0 -51
  1349. package/node_modules/zod/v4/core/schemas.cjs +0 -2481
  1350. package/node_modules/zod/v4/core/schemas.d.cts +0 -1253
  1351. package/node_modules/zod/v4/core/schemas.d.ts +0 -1253
  1352. package/node_modules/zod/v4/core/schemas.js +0 -2440
  1353. package/node_modules/zod/v4/core/standard-schema.cjs +0 -2
  1354. package/node_modules/zod/v4/core/standard-schema.d.cts +0 -126
  1355. package/node_modules/zod/v4/core/standard-schema.d.ts +0 -126
  1356. package/node_modules/zod/v4/core/standard-schema.js +0 -1
  1357. package/node_modules/zod/v4/core/to-json-schema.cjs +0 -660
  1358. package/node_modules/zod/v4/core/to-json-schema.d.cts +0 -153
  1359. package/node_modules/zod/v4/core/to-json-schema.d.ts +0 -153
  1360. package/node_modules/zod/v4/core/to-json-schema.js +0 -650
  1361. package/node_modules/zod/v4/core/util.cjs +0 -915
  1362. package/node_modules/zod/v4/core/util.d.cts +0 -257
  1363. package/node_modules/zod/v4/core/util.d.ts +0 -257
  1364. package/node_modules/zod/v4/core/util.js +0 -846
  1365. package/node_modules/zod/v4/core/versions.cjs +0 -8
  1366. package/node_modules/zod/v4/core/versions.d.cts +0 -5
  1367. package/node_modules/zod/v4/core/versions.d.ts +0 -5
  1368. package/node_modules/zod/v4/core/versions.js +0 -5
  1369. package/node_modules/zod/v4/core/visit.cjs +0 -195
  1370. package/node_modules/zod/v4/core/visit.d.cts +0 -30
  1371. package/node_modules/zod/v4/core/visit.d.ts +0 -30
  1372. package/node_modules/zod/v4/core/visit.js +0 -169
  1373. package/node_modules/zod/v4/index.cjs +0 -32
  1374. package/node_modules/zod/v4/index.d.cts +0 -3
  1375. package/node_modules/zod/v4/index.d.ts +0 -3
  1376. package/node_modules/zod/v4/index.js +0 -4
  1377. package/node_modules/zod/v4/locales/ar.cjs +0 -136
  1378. package/node_modules/zod/v4/locales/ar.d.cts +0 -5
  1379. package/node_modules/zod/v4/locales/ar.d.ts +0 -4
  1380. package/node_modules/zod/v4/locales/ar.js +0 -109
  1381. package/node_modules/zod/v4/locales/az.cjs +0 -135
  1382. package/node_modules/zod/v4/locales/az.d.cts +0 -5
  1383. package/node_modules/zod/v4/locales/az.d.ts +0 -4
  1384. package/node_modules/zod/v4/locales/az.js +0 -108
  1385. package/node_modules/zod/v4/locales/be.cjs +0 -193
  1386. package/node_modules/zod/v4/locales/be.d.cts +0 -5
  1387. package/node_modules/zod/v4/locales/be.d.ts +0 -4
  1388. package/node_modules/zod/v4/locales/be.js +0 -166
  1389. package/node_modules/zod/v4/locales/bg.cjs +0 -150
  1390. package/node_modules/zod/v4/locales/bg.d.cts +0 -5
  1391. package/node_modules/zod/v4/locales/bg.d.ts +0 -4
  1392. package/node_modules/zod/v4/locales/bg.js +0 -123
  1393. package/node_modules/zod/v4/locales/bn.cjs +0 -138
  1394. package/node_modules/zod/v4/locales/bn.d.cts +0 -5
  1395. package/node_modules/zod/v4/locales/bn.d.ts +0 -4
  1396. package/node_modules/zod/v4/locales/bn.js +0 -111
  1397. package/node_modules/zod/v4/locales/ca.cjs +0 -137
  1398. package/node_modules/zod/v4/locales/ca.d.cts +0 -5
  1399. package/node_modules/zod/v4/locales/ca.d.ts +0 -4
  1400. package/node_modules/zod/v4/locales/ca.js +0 -110
  1401. package/node_modules/zod/v4/locales/ckb.cjs +0 -158
  1402. package/node_modules/zod/v4/locales/ckb.d.cts +0 -5
  1403. package/node_modules/zod/v4/locales/ckb.d.ts +0 -4
  1404. package/node_modules/zod/v4/locales/ckb.js +0 -131
  1405. package/node_modules/zod/v4/locales/cs.cjs +0 -141
  1406. package/node_modules/zod/v4/locales/cs.d.cts +0 -5
  1407. package/node_modules/zod/v4/locales/cs.d.ts +0 -4
  1408. package/node_modules/zod/v4/locales/cs.js +0 -114
  1409. package/node_modules/zod/v4/locales/da.cjs +0 -145
  1410. package/node_modules/zod/v4/locales/da.d.cts +0 -5
  1411. package/node_modules/zod/v4/locales/da.d.ts +0 -4
  1412. package/node_modules/zod/v4/locales/da.js +0 -118
  1413. package/node_modules/zod/v4/locales/de.cjs +0 -138
  1414. package/node_modules/zod/v4/locales/de.d.cts +0 -5
  1415. package/node_modules/zod/v4/locales/de.d.ts +0 -4
  1416. package/node_modules/zod/v4/locales/de.js +0 -111
  1417. package/node_modules/zod/v4/locales/el.cjs +0 -137
  1418. package/node_modules/zod/v4/locales/el.d.cts +0 -5
  1419. package/node_modules/zod/v4/locales/el.d.ts +0 -4
  1420. package/node_modules/zod/v4/locales/el.js +0 -110
  1421. package/node_modules/zod/v4/locales/en.cjs +0 -150
  1422. package/node_modules/zod/v4/locales/en.d.cts +0 -5
  1423. package/node_modules/zod/v4/locales/en.d.ts +0 -4
  1424. package/node_modules/zod/v4/locales/en.js +0 -123
  1425. package/node_modules/zod/v4/locales/eo.cjs +0 -139
  1426. package/node_modules/zod/v4/locales/eo.d.cts +0 -5
  1427. package/node_modules/zod/v4/locales/eo.d.ts +0 -4
  1428. package/node_modules/zod/v4/locales/eo.js +0 -112
  1429. package/node_modules/zod/v4/locales/es.cjs +0 -161
  1430. package/node_modules/zod/v4/locales/es.d.cts +0 -5
  1431. package/node_modules/zod/v4/locales/es.d.ts +0 -4
  1432. package/node_modules/zod/v4/locales/es.js +0 -134
  1433. package/node_modules/zod/v4/locales/fa.cjs +0 -144
  1434. package/node_modules/zod/v4/locales/fa.d.cts +0 -5
  1435. package/node_modules/zod/v4/locales/fa.d.ts +0 -4
  1436. package/node_modules/zod/v4/locales/fa.js +0 -117
  1437. package/node_modules/zod/v4/locales/fi.cjs +0 -142
  1438. package/node_modules/zod/v4/locales/fi.d.cts +0 -5
  1439. package/node_modules/zod/v4/locales/fi.d.ts +0 -4
  1440. package/node_modules/zod/v4/locales/fi.js +0 -115
  1441. package/node_modules/zod/v4/locales/fr-CA.cjs +0 -137
  1442. package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -5
  1443. package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
  1444. package/node_modules/zod/v4/locales/fr-CA.js +0 -110
  1445. package/node_modules/zod/v4/locales/fr.cjs +0 -154
  1446. package/node_modules/zod/v4/locales/fr.d.cts +0 -5
  1447. package/node_modules/zod/v4/locales/fr.d.ts +0 -4
  1448. package/node_modules/zod/v4/locales/fr.js +0 -127
  1449. package/node_modules/zod/v4/locales/gu.cjs +0 -138
  1450. package/node_modules/zod/v4/locales/gu.d.cts +0 -5
  1451. package/node_modules/zod/v4/locales/gu.d.ts +0 -4
  1452. package/node_modules/zod/v4/locales/gu.js +0 -111
  1453. package/node_modules/zod/v4/locales/he.cjs +0 -246
  1454. package/node_modules/zod/v4/locales/he.d.cts +0 -5
  1455. package/node_modules/zod/v4/locales/he.d.ts +0 -4
  1456. package/node_modules/zod/v4/locales/he.js +0 -219
  1457. package/node_modules/zod/v4/locales/hi.cjs +0 -136
  1458. package/node_modules/zod/v4/locales/hi.d.cts +0 -5
  1459. package/node_modules/zod/v4/locales/hi.d.ts +0 -4
  1460. package/node_modules/zod/v4/locales/hi.js +0 -109
  1461. package/node_modules/zod/v4/locales/hr.cjs +0 -151
  1462. package/node_modules/zod/v4/locales/hr.d.cts +0 -5
  1463. package/node_modules/zod/v4/locales/hr.d.ts +0 -4
  1464. package/node_modules/zod/v4/locales/hr.js +0 -124
  1465. package/node_modules/zod/v4/locales/hu.cjs +0 -138
  1466. package/node_modules/zod/v4/locales/hu.d.cts +0 -5
  1467. package/node_modules/zod/v4/locales/hu.d.ts +0 -4
  1468. package/node_modules/zod/v4/locales/hu.js +0 -111
  1469. package/node_modules/zod/v4/locales/hy.cjs +0 -183
  1470. package/node_modules/zod/v4/locales/hy.d.cts +0 -5
  1471. package/node_modules/zod/v4/locales/hy.d.ts +0 -4
  1472. package/node_modules/zod/v4/locales/hy.js +0 -156
  1473. package/node_modules/zod/v4/locales/id.cjs +0 -136
  1474. package/node_modules/zod/v4/locales/id.d.cts +0 -5
  1475. package/node_modules/zod/v4/locales/id.d.ts +0 -4
  1476. package/node_modules/zod/v4/locales/id.js +0 -109
  1477. package/node_modules/zod/v4/locales/index.cjs +0 -131
  1478. package/node_modules/zod/v4/locales/index.d.cts +0 -62
  1479. package/node_modules/zod/v4/locales/index.d.ts +0 -62
  1480. package/node_modules/zod/v4/locales/index.js +0 -62
  1481. package/node_modules/zod/v4/locales/is.cjs +0 -139
  1482. package/node_modules/zod/v4/locales/is.d.cts +0 -5
  1483. package/node_modules/zod/v4/locales/is.d.ts +0 -4
  1484. package/node_modules/zod/v4/locales/is.js +0 -112
  1485. package/node_modules/zod/v4/locales/it.cjs +0 -138
  1486. package/node_modules/zod/v4/locales/it.d.cts +0 -5
  1487. package/node_modules/zod/v4/locales/it.d.ts +0 -4
  1488. package/node_modules/zod/v4/locales/it.js +0 -111
  1489. package/node_modules/zod/v4/locales/ja.cjs +0 -137
  1490. package/node_modules/zod/v4/locales/ja.d.cts +0 -5
  1491. package/node_modules/zod/v4/locales/ja.d.ts +0 -4
  1492. package/node_modules/zod/v4/locales/ja.js +0 -110
  1493. package/node_modules/zod/v4/locales/ka.cjs +0 -142
  1494. package/node_modules/zod/v4/locales/ka.d.cts +0 -5
  1495. package/node_modules/zod/v4/locales/ka.d.ts +0 -4
  1496. package/node_modules/zod/v4/locales/ka.js +0 -115
  1497. package/node_modules/zod/v4/locales/kh.cjs +0 -12
  1498. package/node_modules/zod/v4/locales/kh.d.cts +0 -5
  1499. package/node_modules/zod/v4/locales/kh.d.ts +0 -5
  1500. package/node_modules/zod/v4/locales/kh.js +0 -5
  1501. package/node_modules/zod/v4/locales/km.cjs +0 -140
  1502. package/node_modules/zod/v4/locales/km.d.cts +0 -5
  1503. package/node_modules/zod/v4/locales/km.d.ts +0 -4
  1504. package/node_modules/zod/v4/locales/km.js +0 -113
  1505. package/node_modules/zod/v4/locales/kn.cjs +0 -141
  1506. package/node_modules/zod/v4/locales/kn.d.cts +0 -5
  1507. package/node_modules/zod/v4/locales/kn.d.ts +0 -4
  1508. package/node_modules/zod/v4/locales/kn.js +0 -114
  1509. package/node_modules/zod/v4/locales/ko.cjs +0 -141
  1510. package/node_modules/zod/v4/locales/ko.d.cts +0 -5
  1511. package/node_modules/zod/v4/locales/ko.d.ts +0 -4
  1512. package/node_modules/zod/v4/locales/ko.js +0 -114
  1513. package/node_modules/zod/v4/locales/lt.cjs +0 -232
  1514. package/node_modules/zod/v4/locales/lt.d.cts +0 -5
  1515. package/node_modules/zod/v4/locales/lt.d.ts +0 -4
  1516. package/node_modules/zod/v4/locales/lt.js +0 -205
  1517. package/node_modules/zod/v4/locales/mk.cjs +0 -139
  1518. package/node_modules/zod/v4/locales/mk.d.cts +0 -5
  1519. package/node_modules/zod/v4/locales/mk.d.ts +0 -4
  1520. package/node_modules/zod/v4/locales/mk.js +0 -112
  1521. package/node_modules/zod/v4/locales/ms.cjs +0 -137
  1522. package/node_modules/zod/v4/locales/ms.d.cts +0 -5
  1523. package/node_modules/zod/v4/locales/ms.d.ts +0 -4
  1524. package/node_modules/zod/v4/locales/ms.js +0 -110
  1525. package/node_modules/zod/v4/locales/ne.cjs +0 -136
  1526. package/node_modules/zod/v4/locales/ne.d.cts +0 -5
  1527. package/node_modules/zod/v4/locales/ne.d.ts +0 -4
  1528. package/node_modules/zod/v4/locales/ne.js +0 -109
  1529. package/node_modules/zod/v4/locales/nl.cjs +0 -140
  1530. package/node_modules/zod/v4/locales/nl.d.cts +0 -5
  1531. package/node_modules/zod/v4/locales/nl.d.ts +0 -4
  1532. package/node_modules/zod/v4/locales/nl.js +0 -113
  1533. package/node_modules/zod/v4/locales/nn.cjs +0 -138
  1534. package/node_modules/zod/v4/locales/nn.d.cts +0 -5
  1535. package/node_modules/zod/v4/locales/nn.d.ts +0 -4
  1536. package/node_modules/zod/v4/locales/nn.js +0 -111
  1537. package/node_modules/zod/v4/locales/no.cjs +0 -138
  1538. package/node_modules/zod/v4/locales/no.d.cts +0 -5
  1539. package/node_modules/zod/v4/locales/no.d.ts +0 -4
  1540. package/node_modules/zod/v4/locales/no.js +0 -111
  1541. package/node_modules/zod/v4/locales/ota.cjs +0 -139
  1542. package/node_modules/zod/v4/locales/ota.d.cts +0 -5
  1543. package/node_modules/zod/v4/locales/ota.d.ts +0 -4
  1544. package/node_modules/zod/v4/locales/ota.js +0 -112
  1545. package/node_modules/zod/v4/locales/package.json +0 -7
  1546. package/node_modules/zod/v4/locales/pl.cjs +0 -139
  1547. package/node_modules/zod/v4/locales/pl.d.cts +0 -5
  1548. package/node_modules/zod/v4/locales/pl.d.ts +0 -4
  1549. package/node_modules/zod/v4/locales/pl.js +0 -112
  1550. package/node_modules/zod/v4/locales/ps.cjs +0 -144
  1551. package/node_modules/zod/v4/locales/ps.d.cts +0 -5
  1552. package/node_modules/zod/v4/locales/ps.d.ts +0 -4
  1553. package/node_modules/zod/v4/locales/ps.js +0 -117
  1554. package/node_modules/zod/v4/locales/pt-BR.cjs +0 -168
  1555. package/node_modules/zod/v4/locales/pt-BR.d.cts +0 -5
  1556. package/node_modules/zod/v4/locales/pt-BR.d.ts +0 -4
  1557. package/node_modules/zod/v4/locales/pt-BR.js +0 -141
  1558. package/node_modules/zod/v4/locales/pt.cjs +0 -167
  1559. package/node_modules/zod/v4/locales/pt.d.cts +0 -5
  1560. package/node_modules/zod/v4/locales/pt.d.ts +0 -4
  1561. package/node_modules/zod/v4/locales/pt.js +0 -140
  1562. package/node_modules/zod/v4/locales/ro.cjs +0 -147
  1563. package/node_modules/zod/v4/locales/ro.d.cts +0 -5
  1564. package/node_modules/zod/v4/locales/ro.d.ts +0 -4
  1565. package/node_modules/zod/v4/locales/ro.js +0 -120
  1566. package/node_modules/zod/v4/locales/ru.cjs +0 -193
  1567. package/node_modules/zod/v4/locales/ru.d.cts +0 -5
  1568. package/node_modules/zod/v4/locales/ru.d.ts +0 -4
  1569. package/node_modules/zod/v4/locales/ru.js +0 -166
  1570. package/node_modules/zod/v4/locales/sk.cjs +0 -141
  1571. package/node_modules/zod/v4/locales/sk.d.cts +0 -5
  1572. package/node_modules/zod/v4/locales/sk.d.ts +0 -4
  1573. package/node_modules/zod/v4/locales/sk.js +0 -114
  1574. package/node_modules/zod/v4/locales/sl.cjs +0 -139
  1575. package/node_modules/zod/v4/locales/sl.d.cts +0 -5
  1576. package/node_modules/zod/v4/locales/sl.d.ts +0 -4
  1577. package/node_modules/zod/v4/locales/sl.js +0 -112
  1578. package/node_modules/zod/v4/locales/sv.cjs +0 -140
  1579. package/node_modules/zod/v4/locales/sv.d.cts +0 -5
  1580. package/node_modules/zod/v4/locales/sv.d.ts +0 -4
  1581. package/node_modules/zod/v4/locales/sv.js +0 -113
  1582. package/node_modules/zod/v4/locales/ta.cjs +0 -140
  1583. package/node_modules/zod/v4/locales/ta.d.cts +0 -5
  1584. package/node_modules/zod/v4/locales/ta.d.ts +0 -4
  1585. package/node_modules/zod/v4/locales/ta.js +0 -113
  1586. package/node_modules/zod/v4/locales/th.cjs +0 -140
  1587. package/node_modules/zod/v4/locales/th.d.cts +0 -5
  1588. package/node_modules/zod/v4/locales/th.d.ts +0 -4
  1589. package/node_modules/zod/v4/locales/th.js +0 -113
  1590. package/node_modules/zod/v4/locales/tk.cjs +0 -132
  1591. package/node_modules/zod/v4/locales/tk.d.cts +0 -5
  1592. package/node_modules/zod/v4/locales/tk.d.ts +0 -4
  1593. package/node_modules/zod/v4/locales/tk.js +0 -105
  1594. package/node_modules/zod/v4/locales/tr.cjs +0 -135
  1595. package/node_modules/zod/v4/locales/tr.d.cts +0 -5
  1596. package/node_modules/zod/v4/locales/tr.d.ts +0 -4
  1597. package/node_modules/zod/v4/locales/tr.js +0 -108
  1598. package/node_modules/zod/v4/locales/ua.cjs +0 -12
  1599. package/node_modules/zod/v4/locales/ua.d.cts +0 -5
  1600. package/node_modules/zod/v4/locales/ua.d.ts +0 -5
  1601. package/node_modules/zod/v4/locales/ua.js +0 -5
  1602. package/node_modules/zod/v4/locales/uk.cjs +0 -138
  1603. package/node_modules/zod/v4/locales/uk.d.cts +0 -5
  1604. package/node_modules/zod/v4/locales/uk.d.ts +0 -4
  1605. package/node_modules/zod/v4/locales/uk.js +0 -111
  1606. package/node_modules/zod/v4/locales/ur.cjs +0 -140
  1607. package/node_modules/zod/v4/locales/ur.d.cts +0 -5
  1608. package/node_modules/zod/v4/locales/ur.d.ts +0 -4
  1609. package/node_modules/zod/v4/locales/ur.js +0 -113
  1610. package/node_modules/zod/v4/locales/uz.cjs +0 -138
  1611. package/node_modules/zod/v4/locales/uz.d.cts +0 -5
  1612. package/node_modules/zod/v4/locales/uz.d.ts +0 -4
  1613. package/node_modules/zod/v4/locales/uz.js +0 -111
  1614. package/node_modules/zod/v4/locales/vi.cjs +0 -138
  1615. package/node_modules/zod/v4/locales/vi.d.cts +0 -5
  1616. package/node_modules/zod/v4/locales/vi.d.ts +0 -4
  1617. package/node_modules/zod/v4/locales/vi.js +0 -111
  1618. package/node_modules/zod/v4/locales/yo.cjs +0 -137
  1619. package/node_modules/zod/v4/locales/yo.d.cts +0 -5
  1620. package/node_modules/zod/v4/locales/yo.d.ts +0 -4
  1621. package/node_modules/zod/v4/locales/yo.js +0 -110
  1622. package/node_modules/zod/v4/locales/zh-CN.cjs +0 -139
  1623. package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -5
  1624. package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
  1625. package/node_modules/zod/v4/locales/zh-CN.js +0 -112
  1626. package/node_modules/zod/v4/locales/zh-TW.cjs +0 -137
  1627. package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -5
  1628. package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
  1629. package/node_modules/zod/v4/locales/zh-TW.js +0 -110
  1630. package/node_modules/zod/v4/mini/checks.cjs +0 -35
  1631. package/node_modules/zod/v4/mini/checks.d.cts +0 -1
  1632. package/node_modules/zod/v4/mini/checks.d.ts +0 -1
  1633. package/node_modules/zod/v4/mini/checks.js +0 -1
  1634. package/node_modules/zod/v4/mini/coerce.cjs +0 -52
  1635. package/node_modules/zod/v4/mini/coerce.d.cts +0 -7
  1636. package/node_modules/zod/v4/mini/coerce.d.ts +0 -7
  1637. package/node_modules/zod/v4/mini/coerce.js +0 -22
  1638. package/node_modules/zod/v4/mini/deep-partial.cjs +0 -39
  1639. package/node_modules/zod/v4/mini/deep-partial.d.cts +0 -14
  1640. package/node_modules/zod/v4/mini/deep-partial.d.ts +0 -14
  1641. package/node_modules/zod/v4/mini/deep-partial.js +0 -13
  1642. package/node_modules/zod/v4/mini/external.cjs +0 -74
  1643. package/node_modules/zod/v4/mini/external.d.cts +0 -16
  1644. package/node_modules/zod/v4/mini/external.d.ts +0 -16
  1645. package/node_modules/zod/v4/mini/external.js +0 -16
  1646. package/node_modules/zod/v4/mini/in-out.cjs +0 -63
  1647. package/node_modules/zod/v4/mini/in-out.d.cts +0 -8
  1648. package/node_modules/zod/v4/mini/in-out.d.ts +0 -8
  1649. package/node_modules/zod/v4/mini/in-out.js +0 -36
  1650. package/node_modules/zod/v4/mini/index.cjs +0 -32
  1651. package/node_modules/zod/v4/mini/index.d.cts +0 -3
  1652. package/node_modules/zod/v4/mini/index.d.ts +0 -3
  1653. package/node_modules/zod/v4/mini/index.js +0 -3
  1654. package/node_modules/zod/v4/mini/iso.cjs +0 -64
  1655. package/node_modules/zod/v4/mini/iso.d.cts +0 -22
  1656. package/node_modules/zod/v4/mini/iso.d.ts +0 -22
  1657. package/node_modules/zod/v4/mini/iso.js +0 -34
  1658. package/node_modules/zod/v4/mini/package.json +0 -7
  1659. package/node_modules/zod/v4/mini/parse.cjs +0 -18
  1660. package/node_modules/zod/v4/mini/parse.d.cts +0 -1
  1661. package/node_modules/zod/v4/mini/parse.d.ts +0 -1
  1662. package/node_modules/zod/v4/mini/parse.js +0 -1
  1663. package/node_modules/zod/v4/mini/schemas.cjs +0 -1111
  1664. package/node_modules/zod/v4/mini/schemas.d.cts +0 -475
  1665. package/node_modules/zod/v4/mini/schemas.d.ts +0 -475
  1666. package/node_modules/zod/v4/mini/schemas.js +0 -987
  1667. package/node_modules/zod/v4/package.json +0 -7
  1668. package/node_modules/zod/v4-mini/index.cjs +0 -32
  1669. package/node_modules/zod/v4-mini/index.d.cts +0 -3
  1670. package/node_modules/zod/v4-mini/index.d.ts +0 -3
  1671. package/node_modules/zod/v4-mini/index.js +0 -3
  1672. package/node_modules/zod/v4-mini/package.json +0 -7
  1673. package/personal-state.snapshot.lock.json +0 -40
  1674. package/scene-interaction-v2.snapshot.lock.json +0 -36
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcp-DXXb3Vv3.mjs","names":["COMPLETABLE_SYMBOL: unique symbol","onerror?: (error: Error) => void","honored: SubscriptionFilter","controller!: ReadableStreamDefaultController<Uint8Array>","unsubscribe: (() => void) | undefined","keepAliveTimer: ReturnType<typeof setInterval> | undefined","abortCleanup: (() => void) | undefined","CHANGE_NOTIFICATION_METHODS: ReadonlySet<string>","_maxSubscriptions: number","uriParam: unknown","out: NotificationBody[]","out: ListenCloseFrame[]","_host: LegacyInputRequiredShimHost","responses: Record<string, unknown> | undefined","coerced: [string, CoercedEmbeddedInputRequest][]","legOptions: RequestOptions","ctxNext: ServerContext","INPUT_REQUIRED_CAPABLE_METHODS: ReadonlySet<string>","writeClientIdentity: (server: Server, identity: PerRequestClientIdentity) => void","installDiscoverHandler: (server: Server, servedModernVersions: readonly string[]) => void","readServerIdentity: (server: Server) => Implementation","_serverInfo: Implementation","transportSessionId: string | undefined","threshold: LoggingLevel | undefined","rawRequestState: unknown","result: Result","formParams: ElicitRequestFormParams","toolDefinition: Tool","templateResources: Resource[]","uri: URL","metadata: ResourceMetadata","registeredResource: RegisteredResource","registeredResourceTemplate: RegisteredResourceTemplate","registeredPrompt: RegisteredPrompt","registeredTool: RegisteredTool","_callbacks: {\n /**\n * A callback to list all resources matching this template. This is required to be specified, even if `undefined`, to avoid accidentally forgetting resource listing.\n */\n list: ListResourcesCallback | undefined;\n\n /**\n * An optional callback to autocomplete variables within the URI template. Useful for clients and users to discover possible values.\n */\n complete?: {\n [variable: string]: CompleteResourceTemplateCallback;\n };\n }","callback","EMPTY_COMPLETION_RESULT: CompleteResult"],"sources":["../src/server/completable.ts","../src/server/sseKeepAlive.ts","../src/server/serverEventBus.ts","../src/server/listenRouter.ts","../src/server/legacyInputRequiredShim.ts","../src/server/server.ts","../src/server/mcp.ts"],"sourcesContent":["import type { StandardSchemaV1 } from '@modelcontextprotocol/core-internal';\n\nexport const COMPLETABLE_SYMBOL: unique symbol = Symbol.for('mcp.completable');\n\nexport type CompleteCallback<T extends StandardSchemaV1 = StandardSchemaV1> = (\n value: StandardSchemaV1.InferInput<T>,\n context?: {\n arguments?: Record<string, string>;\n }\n) => StandardSchemaV1.InferInput<T>[] | Promise<StandardSchemaV1.InferInput<T>[]>;\n\nexport type CompletableMeta<T extends StandardSchemaV1 = StandardSchemaV1> = {\n complete: CompleteCallback<T>;\n};\n\nexport type CompletableSchema<T extends StandardSchemaV1> = T & {\n [COMPLETABLE_SYMBOL]: CompletableMeta<T>;\n};\n\n/**\n * Wraps a schema to provide autocompletion capabilities. Useful for, e.g., prompt arguments in MCP.\n *\n * @example\n * ```ts source=\"./completable.examples.ts#completable_basicUsage\"\n * server.registerPrompt(\n * 'review-code',\n * {\n * title: 'Code Review',\n * argsSchema: z.object({\n * language: completable(z.string().describe('Programming language'), value =>\n * ['typescript', 'javascript', 'python', 'rust', 'go'].filter(lang => lang.startsWith(value))\n * )\n * })\n * },\n * ({ language }) => ({\n * messages: [\n * {\n * role: 'user' as const,\n * content: {\n * type: 'text' as const,\n * text: `Review this ${language} code.`\n * }\n * }\n * ]\n * })\n * );\n * ```\n *\n * @see {@linkcode server/mcp.McpServer.registerPrompt | McpServer.registerPrompt} for using completable schemas in prompt argument definitions\n */\nexport function completable<T extends StandardSchemaV1>(schema: T, complete: CompleteCallback<T>): CompletableSchema<T> {\n Object.defineProperty(schema as object, COMPLETABLE_SYMBOL, {\n value: { complete } as CompletableMeta<T>,\n enumerable: false,\n writable: false,\n configurable: false\n });\n return schema as CompletableSchema<T>;\n}\n\n/**\n * Checks if a schema is completable (has completion metadata).\n */\nexport function isCompletable(schema: unknown): schema is CompletableSchema<StandardSchemaV1> {\n return !!schema && typeof schema === 'object' && COMPLETABLE_SYMBOL in (schema as object);\n}\n\n/**\n * Gets the completer callback from a completable schema, if it exists.\n */\nexport function getCompleter<T extends StandardSchemaV1>(schema: T): CompleteCallback<T> | undefined {\n const meta = (schema as unknown as { [COMPLETABLE_SYMBOL]?: CompletableMeta<T> })[COMPLETABLE_SYMBOL];\n return meta?.complete as CompleteCallback<T> | undefined;\n}\n","/** Default interval between SSE keep-alive comment frames. */\nexport const DEFAULT_SSE_KEEP_ALIVE_MS = 15_000;\n\nconst MAX_TIMER_DELAY_MS = 2 ** 31 - 1;\n\n/** Arms an unref'd timer, or disables keep-alive for invalid delays. */\nexport function armSseKeepAlive(intervalMs: number, onTick: () => void): ReturnType<typeof setInterval> | undefined {\n if (!Number.isFinite(intervalMs) || intervalMs < 1) {\n return undefined;\n }\n\n const timer = setInterval(onTick, Math.min(intervalMs, MAX_TIMER_DELAY_MS));\n (timer as { unref?: () => void }).unref?.();\n return timer;\n}\n","import type { ServerCapabilities, SubscriptionFilter } from '@modelcontextprotocol/core-internal';\n\n/**\n * A change event a server publishes for delivery on open `subscriptions/listen`\n * streams. Each variant maps onto exactly one notification method:\n *\n * - `tools_list_changed` → `notifications/tools/list_changed`\n * - `prompts_list_changed` → `notifications/prompts/list_changed`\n * - `resources_list_changed` → `notifications/resources/list_changed`\n * - `resource_updated` → `notifications/resources/updated` (carries the URI)\n *\n * The bus carries the EVENT, not the wire shape — the entry's listen router\n * owns subscription-id stamping and per-stream filtering.\n */\nexport type ServerEvent =\n | { kind: 'tools_list_changed' }\n | { kind: 'prompts_list_changed' }\n | { kind: 'resources_list_changed' }\n | { kind: 'resource_updated'; uri: string };\n\n/**\n * The server-side change-event seam for `subscriptions/listen`.\n *\n * The serving entry (`createMcpHandler`) owns the per-stream listen router:\n * each open `subscriptions/listen` stream registers a listener via\n * `subscribe()`, and consumer code (typically via `handler.notify.*` sugar)\n * publishes change events via `publish()`. In-process servers can use the\n * default {@linkcode InMemoryServerEventBus}; multi-process deployments\n * implement this interface over their own pub/sub.\n *\n * The SDK owns wire semantics (ack-first, filtering, subscription-id\n * stamping, teardown); a `ServerEventBus` only sources the events. It MUST\n * NOT echo back to the listener that published an event when called from\n * inside that listener (no surprise here — the default delivers\n * synchronously and listeners never publish).\n */\nexport interface ServerEventBus {\n /**\n * Publish a change event to every registered listener.\n */\n publish(event: ServerEvent): void;\n /**\n * Register a listener; returns an idempotent unsubscribe function.\n */\n subscribe(listener: (event: ServerEvent) => void): () => void;\n}\n\n/**\n * A `ServerEventBus` backed by an in-process listener set.\n *\n * `publish()` delivers synchronously to the live listener set (a listener\n * unsubscribing itself mid-dispatch is safe; the entry's listen-router\n * listeners never unsubscribe peers). A throwing listener does not stop\n * delivery to the others.\n */\nexport class InMemoryServerEventBus implements ServerEventBus {\n private readonly _listeners = new Set<(event: ServerEvent) => void>();\n\n /**\n * @param onerror - Optional callback for errors thrown by listeners\n * during dispatch.\n */\n constructor(private readonly onerror?: (error: Error) => void) {}\n\n publish(event: ServerEvent): void {\n for (const listener of this._listeners) {\n try {\n listener(event);\n } catch (error) {\n this.onerror?.(error instanceof Error ? error : new Error(String(error)));\n }\n }\n }\n\n subscribe(listener: (event: ServerEvent) => void): () => void {\n this._listeners.add(listener);\n let live = true;\n return () => {\n if (!live) return;\n live = false;\n this._listeners.delete(listener);\n };\n }\n\n /** The number of currently registered listeners (test/introspection only — the routers track capacity via their own open-subscription set). */\n get listenerCount(): number {\n return this._listeners.size;\n }\n}\n\n/**\n * Typed publish-side facade over `bus.publish` returned by `createMcpHandler`:\n * each method publishes the corresponding {@linkcode ServerEvent}. Prefer this\n * over calling `bus.publish` directly — the names match the wire methods.\n */\nexport interface ServerNotifier {\n /** Publish `notifications/tools/list_changed` to every open subscription that opted in. */\n toolsChanged(): void;\n /** Publish `notifications/prompts/list_changed` to every open subscription that opted in. */\n promptsChanged(): void;\n /** Publish `notifications/resources/list_changed` to every open subscription that opted in. */\n resourcesChanged(): void;\n /** Publish `notifications/resources/updated` for `uri` to every open subscription that opted in to that URI. */\n resourceUpdated(uri: string): void;\n}\n\n/** Build a {@linkcode ServerNotifier} over a bus. */\nexport function createServerNotifier(bus: ServerEventBus): ServerNotifier {\n return {\n toolsChanged: () => bus.publish({ kind: 'tools_list_changed' }),\n promptsChanged: () => bus.publish({ kind: 'prompts_list_changed' }),\n resourcesChanged: () => bus.publish({ kind: 'resources_list_changed' }),\n resourceUpdated: (uri: string) => bus.publish({ kind: 'resource_updated', uri })\n };\n}\n\n/**\n * Whether a `subscriptions/listen` filter accepts a given change event.\n *\n * Pure: no I/O, no mutation. The filter governs ONLY the four\n * subscription-gated change types — non-gated notifications never reach the\n * bus and are not modeled here.\n *\n * `resource_updated` matches only when `resourceSubscriptions` is present and\n * contains the event's URI exactly (per the spec: \"for these resource URIs\").\n */\nexport function listenFilterAccepts(filter: SubscriptionFilter, event: ServerEvent): boolean {\n switch (event.kind) {\n case 'tools_list_changed': {\n return filter.toolsListChanged === true;\n }\n case 'prompts_list_changed': {\n return filter.promptsListChanged === true;\n }\n case 'resources_list_changed': {\n return filter.resourcesListChanged === true;\n }\n case 'resource_updated': {\n return filter.resourceSubscriptions !== undefined && filter.resourceSubscriptions.includes(event.uri);\n }\n }\n}\n\n/**\n * The honored subset of a requested filter: keeps only the fields the client\n * explicitly opted in to (drops `false` and absent fields), narrowed against\n * the server's declared capabilities when supplied. The serving entry sends\n * this back in `notifications/subscriptions/acknowledged` so the ack reflects\n * what the server can actually deliver.\n *\n * - `toolsListChanged` is honored only when `capabilities.tools.listChanged`\n * is advertised; likewise `promptsListChanged` / `resourcesListChanged`.\n * - `resourceSubscriptions` is honored only when\n * `capabilities.resources.subscribe` is advertised.\n *\n * `capabilities` is optional on this pure helper for test convenience only —\n * both wired routers REQUIRE capabilities at the call site (the HTTP router's\n * `serve()` takes a required parameter; `StdioListenRouter.serve()` throws\n * before `setServerCapabilities()` was called), so the fail-open\n * `undefined → honor everything` branch is never reachable on a wired entry.\n */\nexport function honoredSubset(requested: SubscriptionFilter, capabilities?: ServerCapabilities): SubscriptionFilter {\n const honored: SubscriptionFilter = {};\n const allow = (bit: unknown): boolean => capabilities === undefined || bit === true;\n if (requested.toolsListChanged === true && allow(capabilities?.tools?.listChanged)) honored.toolsListChanged = true;\n if (requested.promptsListChanged === true && allow(capabilities?.prompts?.listChanged)) honored.promptsListChanged = true;\n if (requested.resourcesListChanged === true && allow(capabilities?.resources?.listChanged)) honored.resourcesListChanged = true;\n if (\n requested.resourceSubscriptions !== undefined &&\n requested.resourceSubscriptions.length > 0 &&\n allow(capabilities?.resources?.subscribe)\n ) {\n honored.resourceSubscriptions = [...requested.resourceSubscriptions];\n }\n return honored;\n}\n\n/** Map a {@linkcode ServerEvent} onto its wire notification `{method, params}`. */\nexport function serverEventToNotification(event: ServerEvent): { method: string; params?: { uri: string } } {\n switch (event.kind) {\n case 'tools_list_changed': {\n return { method: 'notifications/tools/list_changed' };\n }\n case 'prompts_list_changed': {\n return { method: 'notifications/prompts/list_changed' };\n }\n case 'resources_list_changed': {\n return { method: 'notifications/resources/list_changed' };\n }\n case 'resource_updated': {\n return { method: 'notifications/resources/updated', params: { uri: event.uri } };\n }\n }\n}\n","/**\n * The entry-handled `subscriptions/listen` router for the HTTP serving entry.\n *\n * `createMcpHandler` recognizes a modern-classified `subscriptions/listen`\n * request and routes it here: the entry owns ack-first, per-stream filtering,\n * subscription-id stamping, keepalive, capacity guarding, and teardown. The\n * consumer's factory IS constructed for listen, to read the instance's\n * declared `ServerCapabilities` only — the probe instance is never connected\n * and is closed immediately after the capabilities read. Token verification\n * and any per-request authorization still belong at the middleware layer\n * mounted in front of `createMcpHandler` (the entry's documented authz\n * posture).\n *\n * Per the spec at protocol revision 2026-07-28:\n * - The acknowledged notification is the FIRST message on the stream and\n * carries the honored subset of the requested filter.\n * - Every notification on the stream (including the ack) carries the listen\n * request's JSON-RPC id under `_meta['io.modelcontextprotocol/subscriptionId']`.\n * - The server MUST NOT deliver a notification type the client did not request.\n * - Server-side graceful close (`closeAll()`) emits the empty\n * `subscriptions/listen` JSON-RPC result (the `SubscriptionsListenResult` —\n * `_meta` carries the subscription id) before closing the stream; an abrupt\n * transport close carries no response and the client treats it as a\n * disconnect.\n */\nimport type {\n Implementation,\n JSONRPCRequest,\n RequestId,\n ServerCapabilities,\n SubscriptionFilter\n} from '@modelcontextprotocol/core-internal';\nimport { codecForVersion, MODERN_WIRE_REVISION, SERVER_INFO_META_KEY, SUBSCRIPTION_ID_META_KEY } from '@modelcontextprotocol/core-internal';\n\nimport type { ServerEventBus } from './serverEventBus';\nimport { honoredSubset, listenFilterAccepts, serverEventToNotification } from './serverEventBus';\nimport { armSseKeepAlive, DEFAULT_SSE_KEEP_ALIVE_MS } from './sseKeepAlive';\n\n/** Default capacity guard: refuse a new subscription when this many are already open. */\nexport const DEFAULT_MAX_SUBSCRIPTIONS = 1024;\n\n/** Options for {@linkcode createListenRouter}. */\nexport interface ListenRouterOptions {\n /** The event bus listen streams subscribe to. */\n bus: ServerEventBus;\n /** Reject a new listen with `-32603` when this many subscriptions are already open (default 1024). */\n maxSubscriptions?: number;\n /** SSE comment-frame keepalive interval; `0` disables keepalive (default 15000). */\n keepAliveMs?: number;\n /** Out-of-band error reporting (never alters the response). */\n onerror?: (error: Error) => void;\n}\n\n/**\n * A wire-shape notification body (method + loose params).\n * @internal\n */\nexport interface NotificationBody {\n method: string;\n params: { _meta?: Record<string, unknown>; [key: string]: unknown };\n}\n\nfunction jsonRpcError(id: RequestId | null, code: number, message: string): Response {\n return Response.json({ jsonrpc: '2.0', error: { code, message }, id }, { status: 200 });\n}\n\n/** Stamp the subscription id onto a notification's `_meta`. Non-mutating. */\nfunction stampSubscriptionId(\n notification: { method: string; params?: { _meta?: Record<string, unknown>; [key: string]: unknown } },\n subscriptionId: RequestId\n): NotificationBody {\n return {\n method: notification.method,\n params: {\n ...notification.params,\n _meta: { ...notification.params?._meta, [SUBSCRIPTION_ID_META_KEY]: subscriptionId }\n }\n };\n}\n\n/**\n * Read the requested filter off a `subscriptions/listen` request body.\n * Returns the validated filter, or `undefined` when `params.notifications`\n * is absent or fails the schema (the caller answers `-32602` — the spec\n * marks `notifications` REQUIRED on the listen request).\n */\nexport function parseListenFilter(message: JSONRPCRequest): SubscriptionFilter | undefined {\n // `subscriptions/listen` is 2026-only vocabulary; route through the era\n // codec's request validator (the wire layer owns the filter schema).\n const outcome = codecForVersion(MODERN_WIRE_REVISION).validateRequest('subscriptions/listen', message);\n return outcome.ok ? outcome.value.params?.notifications : undefined;\n}\n\n/**\n * The HTTP listen router: holds the set of open subscriptions and serves\n * each listen request as an SSE response.\n */\nexport interface ListenRouter {\n /**\n * Serve one `subscriptions/listen` request and return the SSE `Response`\n * (or, on capacity / params rejection, the in-band JSON-RPC error\n * `Response`). The ack notification is the first SSE frame.\n *\n * `capabilities` is required: the acknowledged filter is always narrowed\n * against what the serving instance advertises (honoring a filter without\n * capabilities would fail open and deliver unadvertised types).\n * `serverInfo` is the serving instance's identity, stamped onto the\n * graceful-close result's `_meta` (the spec's `SubscriptionsListenResultMeta`\n * extends `ResultMetaObject`, so the serverInfo SHOULD applies there too).\n */\n serve(message: JSONRPCRequest, signal: AbortSignal | undefined, capabilities: ServerCapabilities, serverInfo: Implementation): Response;\n /**\n * Gracefully close every open subscription stream: emits the empty\n * `subscriptions/listen` JSON-RPC result (the spec's graceful-close\n * signal) as the final SSE frame, then closes the stream.\n */\n closeAll(): void;\n /** The number of currently open subscription streams (for tests / introspection). */\n readonly openCount: number;\n}\n\nexport function createListenRouter(options: ListenRouterOptions): ListenRouter {\n const { bus, onerror } = options;\n const maxSubscriptions = options.maxSubscriptions ?? DEFAULT_MAX_SUBSCRIPTIONS;\n const keepAliveMs = options.keepAliveMs ?? DEFAULT_SSE_KEEP_ALIVE_MS;\n\n const open = new Set<(graceful: boolean) => void>();\n\n function serve(\n message: JSONRPCRequest,\n signal: AbortSignal | undefined,\n capabilities: ServerCapabilities,\n serverInfo: Implementation\n ): Response {\n // Capacity guard, pre-ack: in-band -32603 on HTTP 200.\n if (open.size >= maxSubscriptions) {\n onerror?.(new Error(`subscriptions/listen refused: subscription limit reached (${maxSubscriptions})`));\n return jsonRpcError(message.id, -32_603, 'Subscription limit reached');\n }\n const filter = parseListenFilter(message);\n if (filter === undefined) {\n return jsonRpcError(message.id, -32_602, \"Invalid params: 'notifications' is required and must be a valid SubscriptionFilter\");\n }\n const honored = honoredSubset(filter, capabilities);\n // The spec carries the listen request's JSON-RPC id verbatim as the\n // subscription id; demux is per-connection (each HTTP listen has its\n // own SSE stream) so client-chosen ids cannot route across requests.\n const subscriptionId = message.id;\n\n const encoder = new TextEncoder();\n let controller!: ReadableStreamDefaultController<Uint8Array>;\n let closed = false;\n let unsubscribe: (() => void) | undefined;\n let keepAliveTimer: ReturnType<typeof setInterval> | undefined;\n let abortCleanup: (() => void) | undefined;\n\n const writeFrame = (frame: string) => {\n if (closed) return;\n try {\n controller.enqueue(encoder.encode(frame));\n } catch (error) {\n onerror?.(error instanceof Error ? error : new Error(String(error)));\n }\n };\n const writeNotification = (method: string, params: { _meta?: Record<string, unknown>; [key: string]: unknown }) => {\n writeFrame(`event: message\\ndata: ${JSON.stringify({ jsonrpc: '2.0', method, params })}\\n\\n`);\n };\n\n const teardown = (graceful: boolean) => {\n if (closed) return;\n if (graceful) {\n // Server-side graceful close: emit the empty\n // `subscriptions/listen` JSON-RPC result before closing the\n // stream so the client distinguishes graceful end from a\n // transport drop. Written before `closed = true` so writeFrame\n // still enqueues.\n writeFrame(\n `event: message\\ndata: ${JSON.stringify({\n jsonrpc: '2.0',\n id: subscriptionId,\n result: {\n resultType: 'complete',\n _meta: { [SUBSCRIPTION_ID_META_KEY]: subscriptionId, [SERVER_INFO_META_KEY]: serverInfo }\n }\n })}\\n\\n`\n );\n }\n closed = true;\n try {\n unsubscribe?.();\n } catch (error) {\n onerror?.(error instanceof Error ? error : new Error(String(error)));\n }\n if (keepAliveTimer !== undefined) clearInterval(keepAliveTimer);\n abortCleanup?.();\n open.delete(teardown);\n try {\n controller.close();\n } catch {\n // Already closed/cancelled by the consumer.\n }\n };\n\n const readable = new ReadableStream<Uint8Array>({\n start(streamController) {\n controller = streamController;\n\n // Ack-first MUST: the acknowledged notification is the first\n // frame on the stream, stamped with the subscription id.\n const ack = stampSubscriptionId(\n { method: 'notifications/subscriptions/acknowledged', params: { notifications: honored } },\n subscriptionId\n );\n writeNotification(ack.method, ack.params);\n\n // Only after the ack frame is enqueued does delivery activate.\n unsubscribe = bus.subscribe(event => {\n if (closed || !listenFilterAccepts(honored, event)) return;\n const note = stampSubscriptionId(serverEventToNotification(event), subscriptionId);\n writeNotification(note.method, note.params);\n });\n\n keepAliveTimer = armSseKeepAlive(keepAliveMs, () => writeFrame(': keepalive\\n\\n'));\n\n open.add(teardown);\n },\n cancel() {\n // The client closed the SSE stream — the spec's HTTP cancel\n // signal. Not a server-side graceful close, so no listen\n // result is written (and the consumer is gone anyway).\n teardown(false);\n }\n });\n\n if (signal !== undefined) {\n if (signal.aborted) {\n teardown(false);\n } else {\n const onAbort = () => teardown(false);\n signal.addEventListener('abort', onAbort, { once: true });\n abortCleanup = () => signal.removeEventListener('abort', onAbort);\n }\n }\n\n return new Response(readable, {\n status: 200,\n headers: {\n 'Content-Type': 'text/event-stream',\n 'Cache-Control': 'no-cache, no-transform',\n Connection: 'keep-alive',\n 'X-Accel-Buffering': 'no'\n }\n });\n }\n\n return {\n serve,\n closeAll() {\n for (const teardown of open) teardown(true);\n },\n get openCount() {\n return open.size;\n }\n };\n}\n\n/* ------------------------------------------------------------------------ *\n * Stdio listen router\n * ------------------------------------------------------------------------ */\n\n/** A graceful-close `subscriptions/listen` result frame emitted by {@linkcode StdioListenRouter.teardownAll}. */\nexport interface ListenCloseFrame {\n jsonrpc: '2.0';\n id: RequestId;\n result: {\n resultType: 'complete';\n _meta: { [SUBSCRIPTION_ID_META_KEY]: RequestId; [SERVER_INFO_META_KEY]?: Implementation };\n };\n}\n\nconst CHANGE_NOTIFICATION_METHODS: ReadonlySet<string> = new Set([\n 'notifications/tools/list_changed',\n 'notifications/prompts/list_changed',\n 'notifications/resources/list_changed',\n 'notifications/resources/updated'\n]);\n\n/**\n * Per-connection listen state for the stdio entry. One instance is held by\n * `serveStdio` for the connection lifetime; it routes inbound\n * `subscriptions/listen` / `notifications/cancelled` and rewrites outbound\n * change notifications onto the active subscriptions. No bus — the long-lived\n * pinned instance's existing `send*ListChanged()` calls feed straight into\n * `routeOutbound()`.\n */\nexport class StdioListenRouter {\n /** Active subscriptions, keyed by the listen request's JSON-RPC id verbatim. */\n private readonly _subs = new Map<RequestId, SubscriptionFilter>();\n /**\n * The serving instance's declared capabilities. Filled in by the entry\n * once the modern instance is constructed (the router is created before\n * the instance exists), so the acknowledged filter is narrowed against\n * what the server can actually deliver.\n */\n private _serverCapabilities: ServerCapabilities | undefined;\n /**\n * The serving instance's identity, stamped onto the graceful-close\n * results' `_meta` (the spec's `SubscriptionsListenResultMeta` extends\n * `ResultMetaObject`). Handed over together with the capabilities.\n */\n private _serverInfo: Implementation | undefined;\n\n constructor(\n private readonly _maxSubscriptions: number = DEFAULT_MAX_SUBSCRIPTIONS,\n serverCapabilities?: ServerCapabilities,\n serverInfo?: Implementation\n ) {\n this._serverCapabilities = serverCapabilities;\n this._serverInfo = serverInfo;\n }\n\n /**\n * Record the serving instance's declared capabilities and identity once\n * it has been constructed. Called by `serveStdio`'s connect path;\n * subsequent `serve()` calls narrow the honored filter against the\n * capabilities, and `teardownAll()` stamps the identity.\n */\n setServerCapabilities(capabilities: ServerCapabilities, serverInfo?: Implementation): void {\n this._serverCapabilities = capabilities;\n if (serverInfo !== undefined) this._serverInfo = serverInfo;\n }\n\n /** Whether `id` is an active listen subscription on this connection. */\n has(id: RequestId): boolean {\n return this._subs.has(id);\n }\n\n /**\n * Serve one inbound `subscriptions/listen` request: registers the\n * subscription and returns the stamped acknowledged notification (or, on\n * capacity / params rejection, the in-band JSON-RPC error response).\n *\n * @throws when called before {@linkcode setServerCapabilities} (or the\n * constructor) has supplied the serving instance's capabilities. Honoring a\n * filter without knowing the server's advertised capabilities would fail\n * open (deliver unadvertised types); the entry guarantees capabilities are\n * set before any listen request is routed here.\n */\n serve(message: JSONRPCRequest): NotificationBody | { jsonrpc: '2.0'; id: RequestId; error: { code: number; message: string } } {\n if (this._serverCapabilities === undefined) {\n throw new Error(\n 'StdioListenRouter.serve() called before setServerCapabilities(); refusing to honor a filter without capabilities'\n );\n }\n if (this._subs.size >= this._maxSubscriptions) {\n return { jsonrpc: '2.0', id: message.id, error: { code: -32_603, message: 'Subscription limit reached' } };\n }\n const filter = parseListenFilter(message);\n if (filter === undefined) {\n return {\n jsonrpc: '2.0',\n id: message.id,\n error: { code: -32_602, message: \"Invalid params: 'notifications' is required and must be a valid SubscriptionFilter\" }\n };\n }\n const honored = honoredSubset(filter, this._serverCapabilities);\n this._subs.set(message.id, honored);\n return stampSubscriptionId({ method: 'notifications/subscriptions/acknowledged', params: { notifications: honored } }, message.id);\n }\n\n /**\n * Tear down one subscription (inbound `notifications/cancelled`). Returns\n * `true` when a subscription was removed. After this call NOTHING further\n * is delivered for that subscription id (the post-cancel hardening).\n */\n cancel(id: RequestId): boolean {\n return this._subs.delete(id);\n }\n\n /**\n * Route an outbound notification through the active subscriptions.\n *\n * - For a subscription-gated change notification, returns one stamped copy\n * per subscription that opted in to it (an empty array means it is\n * dropped — the modern era never delivers an un-requested change type).\n * - For any other outbound message, returns `'passthrough'` (the entry\n * forwards it as-is).\n */\n routeOutbound(message: { method: string; params?: { [key: string]: unknown } }): NotificationBody[] | 'passthrough' {\n if (!CHANGE_NOTIFICATION_METHODS.has(message.method)) {\n return 'passthrough';\n }\n const uriParam: unknown = message.params?.['uri'];\n const uri = typeof uriParam === 'string' ? uriParam : undefined;\n const event = notificationToServerEvent(message.method, uri);\n const out: NotificationBody[] = [];\n for (const [subscriptionId, filter] of this._subs) {\n if (listenFilterAccepts(filter, event)) {\n out.push(stampSubscriptionId({ method: message.method, params: message.params ?? {} }, subscriptionId));\n }\n }\n return out;\n }\n\n /**\n * Server-side graceful teardown of every active subscription: returns the\n * empty `subscriptions/listen` JSON-RPC result for each subscription id —\n * the spec's graceful-close signal, `_meta` carrying the subscription id\n * and the serving instance's identity — for the entry to emit before\n * closing the wire. Clears the set so nothing further is delivered.\n */\n teardownAll(): ListenCloseFrame[] {\n const out: ListenCloseFrame[] = [];\n for (const id of this._subs.keys()) {\n out.push({\n jsonrpc: '2.0',\n id,\n result: {\n resultType: 'complete',\n _meta: {\n [SUBSCRIPTION_ID_META_KEY]: id,\n ...(this._serverInfo !== undefined && { [SERVER_INFO_META_KEY]: this._serverInfo })\n }\n }\n });\n }\n this._subs.clear();\n return out;\n }\n}\n\nfunction notificationToServerEvent(method: string, uri: string | undefined): import('./serverEventBus').ServerEvent {\n switch (method) {\n case 'notifications/tools/list_changed': {\n return { kind: 'tools_list_changed' };\n }\n case 'notifications/prompts/list_changed': {\n return { kind: 'prompts_list_changed' };\n }\n case 'notifications/resources/list_changed': {\n return { kind: 'resources_list_changed' };\n }\n default: {\n return { kind: 'resource_updated', uri: uri ?? '' };\n }\n }\n}\n","/**\n * The legacy `input_required` shim: serves write-once handlers on 2025-era\n * sessions. `Server` holds one instance and delegates to it from the\n * multi-round-trip seam when a handler returns an input-required result on a\n * 2025-era request: each embedded request goes out as a real server→client\n * request (`elicitation/create` / `sampling/createMessage` / `roots/list`,\n * stamped with the originating request id for stream association), and the\n * handler is re-entered with the collected `inputResponses` until it returns\n * a final result or the round cap is exhausted.\n *\n * Semantics mirror the modern client driver so a handler cannot tell which\n * era fulfilled it: per-round REPLACED `inputResponses`, byte-exact\n * `requestState` echo (re-verified by the configured hook each round), paced\n * requestState-only rounds. The loop lives inside the originating request's\n * lifetime — nothing is parked, cancellation chains through every leg.\n * Failures surface per family: tools/call → `isError` tool results,\n * prompts/resources → JSON-RPC errors; malformed results fail loudly as\n * server bugs. Package-internal — not exported from the index.\n */\nimport type {\n ClientCapabilities,\n CreateMessageRequest,\n ElicitRequestFormParams,\n ElicitRequestURLParams,\n JSONRPCRequest,\n RequestOptions,\n Result,\n ServerContext\n} from '@modelcontextprotocol/core-internal';\nimport {\n inputRequiredRoundsExceededMessage,\n isInputRequiredResult,\n linkedRoundAbort,\n missingClientCapabilities,\n ProtocolError,\n ProtocolErrorCode,\n REQUEST_STATE_ONLY_LEG_PACING_MS,\n requestStateAccessor,\n requiredClientCapabilitiesForInputRequest,\n sleep,\n withRequestStateValue\n} from '@modelcontextprotocol/core-internal';\n\n/**\n * Default handler re-entries per originating request — tighter than the\n * client driver's 10 because the shim holds a live wire request open.\n */\nconst DEFAULT_LEGACY_SHIM_MAX_ROUNDS = 8;\n\n/** Default per-leg timeout: legs are human-paced, so the 60s protocol default is wrong. */\nconst DEFAULT_LEGACY_SHIM_ROUND_TIMEOUT_MS = 600_000;\n\n/** The `ServerOptions.inputRequired` bag with defaults applied. */\nexport interface ResolvedLegacyShimOptions {\n maxRounds: number;\n roundTimeoutMs: number;\n legacyShim: boolean;\n}\n\n/** Resolves and validates `ServerOptions.inputRequired`, failing loudly at construction time. */\nexport function resolveLegacyShimOptions(\n options: { maxRounds?: number; roundTimeoutMs?: number; legacyShim?: boolean } | undefined\n): ResolvedLegacyShimOptions {\n if (options?.maxRounds !== undefined && (!Number.isInteger(options.maxRounds) || options.maxRounds < 1)) {\n throw new RangeError(`inputRequired.maxRounds must be a positive integer (got ${options.maxRounds})`);\n }\n if (options?.roundTimeoutMs !== undefined && (!Number.isFinite(options.roundTimeoutMs) || options.roundTimeoutMs <= 0)) {\n throw new RangeError(`inputRequired.roundTimeoutMs must be a positive number (got ${options.roundTimeoutMs})`);\n }\n return {\n maxRounds: options?.maxRounds ?? DEFAULT_LEGACY_SHIM_MAX_ROUNDS,\n roundTimeoutMs: options?.roundTimeoutMs ?? DEFAULT_LEGACY_SHIM_ROUND_TIMEOUT_MS,\n legacyShim: options?.legacyShim ?? true\n };\n}\n\n/** The embedded input-request kinds the 2026-07-28 revision defines. */\nexport type EmbeddedInputRequestMethod = 'elicitation/create' | 'sampling/createMessage' | 'roots/list';\n\n/** A coerced `inputRequests` entry: the kind-narrowed embedded request. */\nexport interface CoercedEmbeddedInputRequest {\n method: EmbeddedInputRequestMethod;\n params?: Record<string, unknown>;\n}\n\n/**\n * Validates one `inputRequests` entry: malformed or unknown kinds are server\n * bugs and fail loudly on both eras. Shared by the modern seam's capability\n * check and the shim's gate.\n */\nexport function coerceEmbeddedInputRequest(\n method: string,\n key: string,\n entry: unknown\n): { embedded: CoercedEmbeddedInputRequest; required: ClientCapabilities } {\n if (entry === null || typeof entry !== 'object' || typeof (entry as { method?: unknown }).method !== 'string') {\n throw new ProtocolError(\n ProtocolErrorCode.InternalError,\n `Handler for ${method} returned an invalid input request '${key}': each inputRequests entry must be an ` +\n `embedded elicitation/create, sampling/createMessage, or roots/list request`\n );\n }\n const embedded = entry as { method: string; params?: Record<string, unknown> };\n const required = requiredClientCapabilitiesForInputRequest(embedded);\n if (required === undefined) {\n throw new ProtocolError(\n ProtocolErrorCode.InternalError,\n `Handler for ${method} returned an input request '${key}' of kind '${embedded.method}', which is not an ` +\n `embedded request the 2026-07-28 revision defines`\n );\n }\n return { embedded: embedded as CoercedEmbeddedInputRequest, required };\n}\n\n/**\n * The 2025-11-25 URL-mode wire shape requires an `elicitationId`; the 2026\n * in-band shape has none, so URL legs mint one (CSPRNG-backed, with a\n * getRandomValues fallback for runtimes without `randomUUID`).\n */\nfunction syntheticElicitationId(): string {\n const webCrypto = globalThis.crypto;\n if (webCrypto?.randomUUID !== undefined) {\n return webCrypto.randomUUID();\n }\n const bytes = new Uint8Array(16);\n webCrypto.getRandomValues(bytes);\n bytes[6] = (bytes[6]! & 0x0f) | 0x40;\n bytes[8] = (bytes[8]! & 0x3f) | 0x80;\n const hex = [...bytes].map(byte => byte.toString(16).padStart(2, '0')).join('');\n return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;\n}\n\n/** Per-family surfacing: tools/call → isError result (the 2025 idiom); prompts/resources → JSON-RPC error. */\nfunction legacyShimFailure(method: string, message: string): Result {\n if (method === 'tools/call') {\n return { content: [{ type: 'text', text: message }], isError: true };\n }\n throw new ProtocolError(ProtocolErrorCode.InternalError, message);\n}\n\n/**\n * Everything the shim needs from `Server`: the knobs, the per-request\n * resolved capability view (initialize state on sessionful legacy; empty on\n * per-request stateless instances), the requestState verify runner\n * (deny-on-error → the frozen `-32602`), and the 2025-era senders. The\n * shim's own gate is authoritative; elicitation accepted content passes\n * through UNVALIDATED for parity with the modern client driver.\n */\nexport interface LegacyInputRequiredShimHost {\n readonly maxRounds: number;\n readonly roundTimeoutMs: number;\n resolvedClientCapabilities(ctx: ServerContext): ClientCapabilities | undefined;\n verifyRequestState(state: string, ctx: ServerContext, method: string): Promise<unknown>;\n sendElicitation(params: ElicitRequestFormParams | ElicitRequestURLParams, options: RequestOptions): Promise<unknown>;\n sendSampling(params: CreateMessageRequest['params'], options: RequestOptions): Promise<unknown>;\n listRoots(params: Record<string, unknown> | undefined, options: RequestOptions): Promise<unknown>;\n}\n\n/** The fulfilment loop — see the module doc for the contract. */\nexport class LegacyInputRequiredShim {\n constructor(private readonly _host: LegacyInputRequiredShimHost) {}\n\n async fulfill(\n method: string,\n handler: (request: JSONRPCRequest, ctx: ServerContext) => Promise<Result>,\n request: JSONRPCRequest,\n ctx: ServerContext,\n firstResult: Result\n ): Promise<Result> {\n const { maxRounds, roundTimeoutMs } = this._host;\n const outerSignal = ctx.mcpReq.signal;\n let current = firstResult;\n let round = 0;\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n round += 1;\n if (round > maxRounds) {\n return legacyShimFailure(method, inputRequiredRoundsExceededMessage(method, maxRounds));\n }\n\n // At-least-one re-check per round (server bug → loud, as on modern).\n const inputRequests = current.inputRequests as Record<string, unknown> | null | undefined;\n const hasInputRequests = inputRequests != null && Object.keys(inputRequests).length > 0;\n const requestState = typeof current.requestState === 'string' ? current.requestState : undefined;\n if (!hasInputRequests && requestState === undefined) {\n throw new ProtocolError(\n ProtocolErrorCode.InternalError,\n `Handler for ${method} returned an input-required result with neither inputRequests nor requestState ` +\n `(every InputRequiredResult must include at least one of the two)`\n );\n }\n\n let responses: Record<string, unknown> | undefined;\n if (hasInputRequests) {\n // The shim's own capability pre-check (never gated on\n // enforceStrictCapabilities). The whole round gates before\n // any wire traffic, so a refusal has no side effects.\n const declared = this._host.resolvedClientCapabilities(ctx);\n const coerced: [string, CoercedEmbeddedInputRequest][] = [];\n for (const [key, entry] of Object.entries(inputRequests!)) {\n const { embedded, required } = coerceEmbeddedInputRequest(method, key, entry);\n // Request-carrying kinds need params; absent = server bug.\n if (embedded.method !== 'roots/list' && embedded.params === undefined) {\n throw new ProtocolError(\n ProtocolErrorCode.InternalError,\n `Handler for ${method} returned an input request '${key}' of kind '${embedded.method}' without params`\n );\n }\n const missing = missingClientCapabilities(required, declared);\n if (missing !== undefined) {\n return legacyShimFailure(\n method,\n `Cannot request input '${key}' (${embedded.method}): the client on this 2025-era connection did not ` +\n `declare the required capability${declared === undefined ? ' (no client capabilities are available on this connection — per-request legacy serving cannot receive server-to-client requests)' : ''}`\n );\n }\n coerced.push([key, embedded]);\n }\n\n // Fulfil concurrently (driver parity); first failure aborts siblings.\n const roundAbort = linkedRoundAbort(outerSignal);\n try {\n const legOptions: RequestOptions = {\n relatedRequestId: ctx.mcpReq.id,\n timeout: roundTimeoutMs,\n resetTimeoutOnProgress: true,\n // The no-op handler stamps a progressToken on the leg —\n // without one, resetTimeoutOnProgress could never fire.\n onprogress: () => {},\n signal: roundAbort.signal\n };\n const fulfilled = await Promise.all(\n coerced.map(async ([key, embedded]) => {\n try {\n return [key, await this._dispatchLeg(embedded, legOptions)] as const;\n } catch (error) {\n roundAbort.abort(error);\n throw error;\n }\n })\n );\n responses = Object.fromEntries(fulfilled);\n } catch (error) {\n if (outerSignal.aborted) {\n // Cancelled requests are never answered — propagate.\n throw error;\n }\n return legacyShimFailure(\n method,\n `Fulfilling input required by '${method}' failed: ${error instanceof Error ? error.message : String(error)}`\n );\n } finally {\n roundAbort.dispose();\n }\n } else {\n // requestState-only round: paced so the loop never hot-spins\n // (driver parity); counted in the same round cap.\n await sleep(REQUEST_STATE_ONLY_LEG_PACING_MS, outerSignal);\n }\n\n // Byte-exact requestState echo: build the round's context first,\n // verify against it (the order and view a modern wire retry\n // gets), then swap in the decoded payload. Deny-on-error → -32602.\n let ctxNext: ServerContext = {\n ...ctx,\n mcpReq: {\n ...ctx.mcpReq,\n // REPLACE semantics: this round's responses only — multi-step\n // flows thread earlier answers through requestState.\n inputResponses: responses,\n droppedInputResponseKeys: undefined,\n requestState: requestStateAccessor(requestState)\n }\n };\n if (requestState !== undefined) {\n const decoded = await this._host.verifyRequestState(requestState, ctxNext, method);\n if (decoded !== undefined) {\n ctxNext = withRequestStateValue(ctxNext, decoded);\n }\n }\n\n // Re-entry hits the same stored handler a wire retry would\n // (for McpServer: the full funnel).\n const next = await handler(request, ctxNext);\n if (!isInputRequiredResult(next)) {\n return next;\n }\n current = next;\n }\n }\n\n /** Routes one embedded request through the host's existing 2025-era senders (gate already ran). */\n private async _dispatchLeg(embedded: CoercedEmbeddedInputRequest, options: RequestOptions): Promise<unknown> {\n switch (embedded.method) {\n case 'elicitation/create': {\n let params = embedded.params as ElicitRequestFormParams | ElicitRequestURLParams;\n if (params.mode === 'url' && (params as ElicitRequestURLParams).elicitationId === undefined) {\n params = { ...(params as ElicitRequestURLParams), elicitationId: syntheticElicitationId() };\n }\n return await this._host.sendElicitation(params, options);\n }\n case 'sampling/createMessage': {\n return await this._host.sendSampling(embedded.params as CreateMessageRequest['params'], options);\n }\n case 'roots/list': {\n return await this._host.listRoots(embedded.params, options);\n }\n }\n }\n}\n","import type {\n BaseContext,\n CacheableResultMethod,\n CacheHint,\n CallToolResult,\n ClientCapabilities,\n CreateMessageRequest,\n CreateMessageRequestParamsBase,\n CreateMessageRequestParamsWithTools,\n CreateMessageResult,\n CreateMessageResultWithTools,\n DiscoverResult,\n ElicitRequestFormParams,\n ElicitRequestURLParams,\n ElicitResult,\n EmptyResult,\n Implementation,\n InitializeRequest,\n InitializeResult,\n JSONRPCRequest,\n JsonSchemaType,\n jsonSchemaValidator,\n ListRootsRequest,\n ListRootsResult,\n LoggingLevel,\n LoggingMessageNotification,\n MessageExtraInfo,\n NotificationMethod,\n NotificationOptions,\n ProtocolOptions,\n RequestMethod,\n RequestOptions,\n ResourceUpdatedNotification,\n Result,\n ServerCapabilities,\n ServerContext,\n ToolResultContent,\n ToolUseContent\n} from '@modelcontextprotocol/core-internal';\nimport {\n assertValidCacheHint,\n attachCacheHintFallback,\n CLIENT_CAPABILITIES_META_KEY,\n codecForVersion,\n isInputRequiredResult,\n isModernProtocolVersion,\n LATEST_PROTOCOL_VERSION,\n legacyProtocolVersions,\n LOG_LEVEL_META_KEY,\n LoggingLevelSchema,\n mergeCapabilities,\n missingClientCapabilities,\n MissingRequiredClientCapabilityError,\n modernProtocolVersions,\n normalizeContentlessToolResult,\n parseSchema,\n Protocol,\n ProtocolError,\n ProtocolErrorCode,\n SdkError,\n SdkErrorCode,\n withRequestStateValue\n} from '@modelcontextprotocol/core-internal';\nimport { DefaultJsonSchemaValidator } from '@modelcontextprotocol/server/_shims';\n\nimport { coerceEmbeddedInputRequest, LegacyInputRequiredShim, resolveLegacyShimOptions } from './legacyInputRequiredShim';\n\n/**\n * The request methods whose 2026-07-28 result vocabulary includes\n * `input_required` (the multi round-trip methods). Returning an\n * input-required result from any other handler is a server bug.\n */\nconst INPUT_REQUIRED_CAPABLE_METHODS: ReadonlySet<string> = new Set(['tools/call', 'prompts/get', 'resources/read']);\n\nexport type ServerOptions = ProtocolOptions & {\n /**\n * Capabilities to advertise as being supported by this server.\n *\n * Note: per the MCP spec, a server that declares a capability MUST respond to that\n * capability's requests (e.g. `tools/list` for `tools`) — potentially with an empty\n * result — rather than with a \"Method not found\" error. {@linkcode server/mcp.McpServer | McpServer}\n * handles this automatically for capabilities declared here; when using the low-level\n * {@linkcode Server} directly, you are responsible for registering a request handler for\n * every capability you declare.\n */\n capabilities?: ServerCapabilities;\n\n /**\n * Optional instructions describing how to use the server and its features.\n */\n instructions?: string;\n\n /**\n * JSON Schema validator for elicitation response validation.\n *\n * The validator is used to validate user input returned from elicitation\n * requests against the requested schema.\n *\n * @default Runtime-selected validator (AJV-backed on Node.js, `@cfworker/json-schema`-backed on browser/workerd runtimes)\n */\n jsonSchemaValidator?: jsonSchemaValidator;\n\n /**\n * Cache hints for the cacheable results of the 2026-07-28 protocol\n * revision (`ttlMs` / `cacheScope`), keyed by operation. The cacheable\n * operations are `tools/list`, `prompts/list`, `resources/list`,\n * `resources/templates/list`, `resources/read` and `server/discover`. The\n * hint is used when the result for that operation does not provide its own\n * cache fields — most useful for the list results and `server/discover`,\n * which the SDK builds itself. A hint registered with an individual\n * resource (`registerResource(..., { cacheHint })`) takes precedence for\n * that resource's `resources/read` results, field by field: a field the\n * per-resource hint leaves unset still falls back to the per-operation\n * hint configured here.\n *\n * Absent hints (or omitting this option entirely) keep today's behavior:\n * cacheable 2026-07-28 results are emitted with `ttlMs: 0` and\n * `cacheScope: 'private'`. Responses to 2025-era requests are never\n * affected. Invalid values throw a `RangeError` at construction time.\n */\n cacheHints?: Partial<Record<CacheableResultMethod, CacheHint>>;\n\n /**\n * Multi-round-trip serving knobs. On 2026-era requests the client\n * fulfils `input_required` returns; on 2025-era connections the SDK's\n * legacy shim fulfils them server-side (real server→client requests +\n * handler re-entry), so handlers are written once and serve both eras.\n */\n inputRequired?: {\n /**\n * Handler re-entries per originating request before the shim fails\n * (tools/call: `isError` result; prompts/resources: JSON-RPC error).\n * @default 8\n */\n maxRounds?: number;\n\n /**\n * Per-leg timeout (ms) for the shim's embedded server→client\n * requests, sent with `resetTimeoutOnProgress: true`. Human-paced —\n * deliberately far above the 60s protocol default.\n * @default 600_000\n */\n roundTimeoutMs?: number;\n\n /**\n * `false` disables the shim: an `input_required` return on a\n * 2025-era request fails loudly (the pre-shim behavior).\n * @default true\n */\n legacyShim?: boolean;\n };\n\n /**\n * Multi-round-trip `requestState` integrity hook (protocol revision\n * 2026-07-28).\n */\n requestState?: {\n /**\n * Called on every multi-round-trip request round whose echoed\n * `requestState` is a string (i.e. whenever\n * `ctx.mcpReq.requestState()` would return one), BEFORE the handler\n * runs — including the legacy shim's in-process rounds. Throw or\n * reject to refuse the request: the seam answers with a wire-level\n * `-32602` Invalid Params error whose message is frozen to\n * `\"Invalid or expired requestState\"` and whose `data.reason` is\n * `'invalid_request_state'` — the thrown reason is surfaced via the\n * server's `onerror` callback only and never reaches the wire.\n *\n * This is the place to put HMAC or AEAD verification of\n * `requestState`. The spec MUST for integrity-protecting state that\n * influences authorization, resource access, or business logic is on\n * the server author (basic/patterns/mrtr, server requirements 4–5);\n * the SDK provides NO default verification —\n * {@linkcode server/requestStateCodec.createRequestStateCodec | createRequestStateCodec}\n * is the SDK-provided HMAC helper whose `verify` drops in here\n * directly. Leaving this option unconfigured keeps the passthrough\n * behavior — `ctx.mcpReq.requestState()` returns the raw wire string,\n * which MUST be treated as attacker-controlled input.\n *\n * The resolved value is LOAD-BEARING: when the hook resolves with a\n * non-`undefined` value — as\n * {@linkcode server/requestStateCodec.RequestStateCodec | RequestStateCodec}`.verify`\n * does (the decoded payload) — the seam hands THAT value to the\n * handler via the typed `ctx.mcpReq.requestState<T>()` accessor, so a\n * codec-using handler reads its verified state with no second decode\n * call. A verifier that is not also the decoder should resolve\n * `undefined` (return nothing) to keep the accessor on the raw wire\n * string — resolving an incidental value (e.g. a boolean\n * verification flag) would replace what the handler reads.\n */\n verify?: (state: string, ctx: ServerContext) => unknown | Promise<unknown>;\n };\n};\n\n/*\n * Package-internal hooks for the 2026-07-28 serving entries (the per-request\n * HTTP entry `createMcpHandler` and the connection-pinned stdio entry\n * `serveStdio`).\n *\n * The connection-scoped client-identity fields and the modern-only handler set are\n * private to `Server`; the serving entries in this package need to write/install\n * them on the fresh instance they get from a consumer factory. The static initializer\n * below hands these module-scoped closures privileged access; the exported wrappers\n * are imported by sibling modules in this package only and are deliberately NOT\n * re-exported from the package index (they are not public API).\n */\nlet writeClientIdentity: (server: Server, identity: PerRequestClientIdentity) => void;\nlet installDiscoverHandler: (server: Server, servedModernVersions: readonly string[]) => void;\nlet readServerIdentity: (server: Server) => Implementation;\n\n/** Connection-scoped client-identity fields backfilled per request from a validated `_meta` envelope. */\nexport interface PerRequestClientIdentity {\n /** The client's name/version information, when the envelope carried it. */\n clientInfo?: Implementation;\n /** The client's declared capabilities, when the envelope carried them. */\n clientCapabilities?: ClientCapabilities;\n}\n\n/**\n * Package-internal: backfills the connection-scoped client-identity fields of a\n * per-request server instance from the request's validated `_meta` envelope, so the\n * (deprecated) {@linkcode Server.getClientCapabilities} / {@linkcode Server.getClientVersion}\n * accessors keep answering on instances that never see an `initialize` handshake.\n * Not public API.\n */\nexport function seedClientIdentityFromEnvelope(server: Server, identity: PerRequestClientIdentity): void {\n writeClientIdentity(server, identity);\n}\n\n/**\n * Package-internal: installs the modern-only `server/discover` handler on an instance\n * the HTTP entry has marked as serving the 2026-07-28 era, and makes sure the modern\n * revisions the entry serves appear in the instance's supported-versions list (so the\n * discover advertisement and version-mismatch errors name them). Idempotent.\n * Hand-constructed instances are unaffected: nothing else calls this, so they keep\n * answering `-32601` unless their own supported-versions list opts into a modern\n * revision. Not public API.\n */\nexport function installModernOnlyHandlers(server: Server, servedModernVersions: readonly string[]): void {\n installDiscoverHandler(server, servedModernVersions);\n}\n\n/**\n * Package-internal: the instance's implementation identity, for the serving\n * entries to stamp onto entry-built results (the `subscriptions/listen`\n * graceful-close result — built outside the encode seam, but the spec's\n * `SubscriptionsListenResultMeta` extends `ResultMetaObject`, so it carries\n * the serverInfo SHOULD like every other result). Not public API.\n */\nexport function serverIdentityOf(server: Server): Implementation {\n return readServerIdentity(server);\n}\n\n/**\n * An MCP server on top of a pluggable transport.\n *\n * This server will automatically respond to the initialization flow as initiated from the client.\n *\n * @deprecated Use {@linkcode server/mcp.McpServer | McpServer} instead for the high-level API. Only use `Server` for advanced use cases.\n */\nexport class Server extends Protocol<ServerContext> {\n private _clientCapabilities?: ClientCapabilities;\n private _clientVersion?: Implementation;\n\n static {\n writeClientIdentity = (server, identity) => {\n if (identity.clientCapabilities !== undefined) {\n server._clientCapabilities = identity.clientCapabilities;\n }\n if (identity.clientInfo !== undefined) {\n server._clientVersion = identity.clientInfo;\n }\n };\n installDiscoverHandler = (server, servedModernVersions) => {\n const missing = servedModernVersions.filter(version => !server._supportedProtocolVersions.includes(version));\n if (missing.length > 0) {\n // Never mutate the existing array in place: the default supported-versions\n // list is a shared module constant.\n server._supportedProtocolVersions = [...server._supportedProtocolVersions, ...missing];\n }\n server.setRequestHandler('server/discover', () => server._ondiscover());\n };\n readServerIdentity = server => server._serverInfo;\n }\n private _capabilities: ServerCapabilities;\n private _instructions?: string;\n private _jsonSchemaValidator: jsonSchemaValidator;\n private _cacheHints?: ServerOptions['cacheHints'];\n private _requestStateVerify?: (state: string, ctx: ServerContext) => unknown | Promise<unknown>;\n private _inputRequiredServing: { maxRounds: number; roundTimeoutMs: number; legacyShim: boolean };\n private _legacyShim?: LegacyInputRequiredShim;\n\n /** Lazily-built legacy shim; the loop lives in legacyInputRequiredShim.ts behind a narrow host contract. */\n private _legacyInputRequiredShim(): LegacyInputRequiredShim {\n return (this._legacyShim ??= new LegacyInputRequiredShim({\n maxRounds: this._inputRequiredServing.maxRounds,\n roundTimeoutMs: this._inputRequiredServing.roundTimeoutMs,\n resolvedClientCapabilities: ctx => this._inputRequestCapabilityView(ctx),\n verifyRequestState: (state, ctx, method) => this._verifyRequestState(state, ctx, method),\n sendElicitation: (params, options) => this._sendElicitationLeg(params, options, { validateAcceptedContent: false }),\n sendSampling: (params, options) => this.createMessage(params, options),\n listRoots: (params, options) => this.listRoots(params, options)\n }));\n }\n\n /**\n * Callback for when initialization has fully completed (i.e., the client has sent an `notifications/initialized` notification).\n */\n oninitialized?: () => void;\n\n /**\n * Initializes this server with the given name and version information.\n */\n constructor(\n private _serverInfo: Implementation,\n options?: ServerOptions\n ) {\n super(options);\n this._capabilities = options?.capabilities ? { ...options.capabilities } : {};\n this._instructions = options?.instructions;\n this._jsonSchemaValidator = options?.jsonSchemaValidator ?? new DefaultJsonSchemaValidator();\n this._requestStateVerify = options?.requestState?.verify;\n\n this._inputRequiredServing = resolveLegacyShimOptions(options?.inputRequired);\n\n // Configured cache hints fail loudly at construction time (before any\n // handler registration consults them).\n if (options?.cacheHints !== undefined) {\n for (const [operation, hint] of Object.entries(options.cacheHints)) {\n if (hint !== undefined) {\n assertValidCacheHint(hint, `cacheHints['${operation}']`);\n }\n }\n this._cacheHints = options.cacheHints;\n }\n\n this.setRequestHandler('initialize', request => this._oninitialize(request));\n this.setNotificationHandler('notifications/initialized', () => this.oninitialized?.());\n\n // server/discover is installed only when the supported-versions list\n // carries a modern revision: a legacy-only server keeps answering -32601.\n // A hand-constructed instance is never era-bound, so the handler stays\n // unreachable behind the era gate until a serving entry (createMcpHandler,\n // serveStdio) marks the instance as serving the 2026-07-28 era.\n if (modernProtocolVersions(this._supportedProtocolVersions).length > 0) {\n this.setRequestHandler('server/discover', () => this._ondiscover());\n }\n\n if (this._capabilities.logging) {\n this._registerLoggingHandler();\n }\n }\n\n /**\n * Registers the built-in `logging/setLevel` request handler.\n *\n * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577).\n * Remains functional during the deprecation window (at least twelve months).\n * Migrate to stderr logging (STDIO servers) or OpenTelemetry.\n */\n private _registerLoggingHandler(): void {\n this.setRequestHandler('logging/setLevel', async (request, ctx) => {\n const transportSessionId: string | undefined =\n ctx.sessionId || (ctx.http?.req?.headers.get('mcp-session-id') as string) || undefined;\n const { level } = request.params;\n const parseResult = parseSchema(LoggingLevelSchema, level);\n if (parseResult.success) {\n this._loggingLevels.set(transportSessionId, parseResult.data);\n }\n return {};\n });\n }\n\n protected override buildContext(ctx: BaseContext, transportInfo?: MessageExtraInfo): ServerContext {\n // Only create http when there's actual HTTP transport info or auth info\n const hasHttpInfo = ctx.http || transportInfo?.request || transportInfo?.closeSSEStream || transportInfo?.closeStandaloneSSEStream;\n return {\n ...ctx,\n mcpReq: {\n ...ctx.mcpReq,\n // Deprecated as of protocol version 2026-07-28 (SEP-2577): `log` and\n // `requestSampling` remain functional during the deprecation window\n // (at least twelve months). See ServerContext for migration guidance.\n log: (level, data, logger) => {\n if (!this._capabilities.logging) {\n return Promise.resolve();\n }\n // Level filter: on a 2026-era request the client declares its\n // threshold per request via the `_meta.logLevel` envelope key\n // (the modern equivalent of `logging/setLevel`, which is not a\n // request method on that revision). The spec at 2026-07-28\n // says an absent key means the server MUST NOT send\n // `notifications/message` for the request — so an absent key\n // suppresses, it does not mean \"send everything\". On\n // 2025-era connections the session-scoped level set via\n // `logging/setLevel` applies exactly as before (an absent\n // session level there continues to mean no filter).\n let threshold: LoggingLevel | undefined;\n if (this._servedModernEra()) {\n threshold = ctx.mcpReq.envelope?.[LOG_LEVEL_META_KEY] as LoggingLevel | undefined;\n if (threshold === undefined) {\n return Promise.resolve();\n }\n } else {\n threshold = this._loggingLevels.get(ctx.sessionId) ?? this._loggingLevels.get(undefined);\n }\n if (threshold !== undefined && this.LOG_LEVEL_SEVERITY.get(level)! < this.LOG_LEVEL_SEVERITY.get(threshold)!) {\n return Promise.resolve();\n }\n // Emit request-related (like progress and `ctx.mcpReq.notify`)\n // so the notification rides the in-flight exchange. Without the\n // related-request stamp, per-request hosting (`createMcpHandler`,\n // either era) silently drops the message because it has no\n // session-wide stream to deliver it on.\n return ctx.mcpReq.notify({ method: 'notifications/message', params: { level, data, logger } });\n },\n elicitInput: (params, options) => this.elicitInput(params, options),\n requestSampling: (params, options) => this.createMessage(params, options)\n },\n http: hasHttpInfo\n ? {\n ...ctx.http,\n req: transportInfo?.request,\n closeSSE: transportInfo?.closeSSEStream,\n closeStandaloneSSE: transportInfo?.closeStandaloneSSEStream\n }\n : undefined\n };\n }\n\n // Map log levels by session id\n private _loggingLevels = new Map<string | undefined, LoggingLevel>();\n\n // Map LogLevelSchema to severity index\n private readonly LOG_LEVEL_SEVERITY = new Map(LoggingLevelSchema.options.map((level, index) => [level, index]));\n\n // Is a message with the given level ignored in the log level set for the given session id?\n private isMessageIgnored = (level: LoggingLevel, sessionId?: string): boolean => {\n const currentLevel = this._loggingLevels.get(sessionId);\n return currentLevel ? this.LOG_LEVEL_SEVERITY.get(level)! < this.LOG_LEVEL_SEVERITY.get(currentLevel)! : false;\n };\n\n /**\n * Registers new capabilities. This can only be called before connecting to a transport.\n *\n * The new capabilities will be merged with any existing capabilities previously given (e.g., at initialization).\n */\n public registerCapabilities(capabilities: ServerCapabilities): void {\n if (this.transport) {\n throw new SdkError(SdkErrorCode.AlreadyConnected, 'Cannot register capabilities after connecting to transport');\n }\n const hadLogging = !!this._capabilities.logging;\n this._capabilities = mergeCapabilities(this._capabilities, capabilities);\n if (!hadLogging && this._capabilities.logging) {\n this._registerLoggingHandler();\n }\n }\n\n /**\n * Enforces server-side validation for `tools/call` results regardless of how the\n * handler was registered, attaches the configured per-operation cache hint\n * (when one exists) so the 2026-07-28 encode seam can fill `ttlMs`/`cacheScope`\n * for results that do not provide their own, and owns the multi-round-trip\n * seam: on the methods whose 2026-07-28 result vocabulary includes\n * `input_required` (`tools/call`, `prompts/get`, `resources/read`) an\n * input-required return skips result-schema validation and is checked\n * against the served era, the at-least-one rule, and the request's own\n * declared client capabilities; on every other method an input-required\n * return is a server bug and fails loudly. The hint rides a symbol-keyed\n * property that is never serialized, so 2025-era responses are unaffected.\n */\n protected override _wrapHandler(\n method: string,\n handler: (request: JSONRPCRequest, ctx: ServerContext) => Promise<Result>\n ): (request: JSONRPCRequest, ctx: ServerContext) => Promise<Result> {\n if (method !== 'tools/call') {\n const cacheHint = (this._cacheHints as Record<string, CacheHint | undefined> | undefined)?.[method];\n const isInputRequiredCapable = INPUT_REQUIRED_CAPABLE_METHODS.has(method);\n if (cacheHint === undefined && !isInputRequiredCapable) {\n // Server-bug guard: an input-required return from a method\n // whose result vocabulary does not include it is never\n // mis-typed onto the wire.\n return async (request, ctx) => {\n const result = await handler(request, ctx);\n if (isInputRequiredResult(result)) {\n throw new ProtocolError(\n ProtocolErrorCode.InternalError,\n `Handler for ${method} returned an input-required result, but only tools/call, prompts/get and ` +\n `resources/read support input_required (protocol revision 2026-07-28)`\n );\n }\n return result;\n };\n }\n return async (request, ctx) => {\n const result = isInputRequiredCapable\n ? await this._invokeInputRequiredCapableHandler(method, handler, request, ctx)\n : await handler(request, ctx);\n if (isInputRequiredResult(result)) {\n if (!isInputRequiredCapable) {\n throw new ProtocolError(\n ProtocolErrorCode.InternalError,\n `Handler for ${method} returned an input-required result, but only tools/call, prompts/get and ` +\n `resources/read support input_required (protocol revision 2026-07-28)`\n );\n }\n // Never cache-stamped (the encode contract skips\n // non-complete results); the hint is not attached.\n return result;\n }\n return cacheHint === undefined ? result : attachCacheHintFallback(result, cacheHint);\n };\n }\n return async (request, ctx) => {\n // Era-exact validation via the function-only WireCodec contract:\n // resolved from the instance era at dispatch time (the era gate\n // guarantees tools/call exists on the serving era, so the\n // `not-in-era` arm is an internal error). The era registry entry\n // IS the plain CallToolResult schema (the result map is aligned\n // to the typed map — no widened unions), so no narrower surface\n // is needed.\n const codec = codecForVersion(this._negotiatedProtocolVersion);\n const validatedRequest = codec.validateRequest('tools/call', request);\n if (!validatedRequest.ok) {\n throw new ProtocolError(\n validatedRequest.reason === 'not-in-era' ? ProtocolErrorCode.InternalError : ProtocolErrorCode.InvalidParams,\n validatedRequest.reason === 'not-in-era'\n ? 'No wire schema for tools/call in the resolved era'\n : `Invalid tools/call request: ${validatedRequest.message}`\n );\n }\n\n const result = await this._invokeInputRequiredCapableHandler('tools/call', handler, request, ctx);\n if (isInputRequiredResult(result)) {\n // Already checked by the seam; the CallToolResult schema does\n // not apply to it (no widening — InputRequiredResult travels\n // alongside).\n return result;\n }\n\n // v1-parity authoring affordance, era-independent: a content-less\n // handler result normalizes to content: [] before era validation.\n // Other result families' bodies stay un-normalized and fail loudly.\n const normalizedResult = normalizeContentlessToolResult(result);\n\n const validationResult = codec.validateResult('tools/call', normalizedResult);\n if (!validationResult.ok) {\n throw new ProtocolError(\n validationResult.reason === 'not-in-era' ? ProtocolErrorCode.InternalError : ProtocolErrorCode.InvalidParams,\n validationResult.reason === 'not-in-era'\n ? 'No wire schema for tools/call in the resolved era'\n : `Invalid tools/call result: ${validationResult.message}`\n );\n }\n\n return validationResult.value;\n };\n }\n\n /**\n * Whether this instance is bound to a 2026-07-28-or-later protocol\n * revision. Era is instance state — a serving entry (`createMcpHandler`,\n * `serveStdio`) marks the instance modern at construction; a 2025-era\n * `initialize` handshake binds it legacy. The multi-round-trip seam reads\n * this directly: there is no per-request era consult.\n */\n private _servedModernEra(): boolean {\n return this._negotiatedProtocolVersion !== undefined && isModernProtocolVersion(this._negotiatedProtocolVersion);\n }\n\n /**\n * Invokes a handler for one of the multi-round-trip methods and applies\n * the input-required seam:\n *\n * - a `UrlElicitationRequiredError` (or any 2025-style server→client\n * request idiom) escaping the handler on a request served on the\n * 2026-07-28 era fails LOUDLY with a clear steer to\n * `inputRequired.elicitUrl(...)` — the `-32042` error never reaches the\n * 2026-07-28 wire and the throw is not silently converted. Requests\n * served on the 2025 era keep today's `-32042` behavior byte-exact (the\n * error is rethrown unchanged).\n * - an input-required RETURN toward a 2026-07-28 request must satisfy\n * the at-least-one rule, and every embedded request must be covered by\n * the capabilities declared on the request's envelope (violations\n * answer the typed `-32021` error). Toward a 2025-era request the\n * return is fulfilled by the default-on legacy shim, whose own gate\n * consults the initialize-declared capabilities and surfaces\n * violations per family; `inputRequired.legacyShim: false` restores\n * the pre-shim loud failure.\n */\n private async _invokeInputRequiredCapableHandler(\n method: string,\n handler: (request: JSONRPCRequest, ctx: ServerContext) => Promise<Result>,\n request: JSONRPCRequest,\n ctx: ServerContext\n ): Promise<Result> {\n const servedModern = this._servedModernEra();\n\n // The configured requestState.verify hook runs above the handler (and\n // therefore above the McpServer tools/call funnel), so a rejection\n // reaches the wire as a real JSON-RPC error rather than an `isError`\n // tool result. The wire message is FROZEN — the thrown reason is\n // surfaced via `onerror` only. A non-string `requestState` value (the\n // wire field is `string | undefined`) is treated as invalid regardless\n // of whether a hook is configured, so a malformed value cannot bypass\n // verification.\n const rawRequestState: unknown = ctx.mcpReq.requestState();\n if (rawRequestState !== undefined && typeof rawRequestState !== 'string') {\n throw new ProtocolError(ProtocolErrorCode.InvalidParams, 'Invalid or expired requestState', {\n reason: 'invalid_request_state'\n });\n }\n let ctxForHandler = ctx;\n if (typeof rawRequestState === 'string') {\n const decoded = await this._verifyRequestState(rawRequestState, ctx, method);\n if (decoded !== undefined) {\n ctxForHandler = withRequestStateValue(ctx, decoded);\n }\n }\n\n let result: Result;\n try {\n result = await handler(request, ctxForHandler);\n } catch (error) {\n if (error instanceof ProtocolError && error.code === ProtocolErrorCode.UrlElicitationRequired) {\n if (!servedModern) {\n // 2025-era behavior is frozen: the error reaches the wire\n // exactly as it does today.\n throw error;\n }\n // 2026-era requests do not carry the -32042 surface. A\n // 2025-style throw fails loudly with a clear steer rather than\n // being converted: the handler should return\n // inputRequired.elicitUrl(...) instead.\n throw new ProtocolError(\n ProtocolErrorCode.InternalError,\n `URL elicitation cannot be signalled by throwing UrlElicitationRequiredError on protocol revision ` +\n `${this._negotiatedProtocolVersion}: return inputRequired({ inputRequests: { …: inputRequired.elicitUrl(...) } }) ` +\n `from the handler instead. The urlElicitationRequired error (-32042) of earlier revisions is not ` +\n `available on this revision.`\n );\n }\n throw error;\n }\n\n if (!isInputRequiredResult(result)) {\n return result;\n }\n\n if (!servedModern) {\n if (!this._inputRequiredServing.legacyShim) {\n // The escape hatch (`inputRequired.legacyShim: false`)\n // restores the pre-shim posture: the 2025-era wire has no\n // input_required vocabulary, so fail loudly rather than\n // putting a mis-typed result on the wire.\n throw new ProtocolError(\n ProtocolErrorCode.InternalError,\n `Handler for ${method} returned an input-required result, but this request is served on protocol revision ` +\n `${this._negotiatedProtocolVersion ?? LATEST_PROTOCOL_VERSION}, which has no input_required vocabulary`\n );\n }\n // Write-once handlers served to deployed 2025 clients.\n return await this._legacyInputRequiredShim().fulfill(method, handler, request, ctxForHandler, result);\n }\n\n // F7 at-least-one re-check (hand-built results are legal; the rule is\n // re-checked at the seam).\n const inputRequests = result.inputRequests as Record<string, unknown> | null | undefined;\n const hasInputRequests = inputRequests != null && Object.keys(inputRequests).length > 0;\n const hasRequestState = typeof result.requestState === 'string';\n if (!hasInputRequests && !hasRequestState) {\n throw new ProtocolError(\n ProtocolErrorCode.InternalError,\n `Handler for ${method} returned an input-required result with neither inputRequests nor requestState ` +\n `(every InputRequiredResult must include at least one of the two)`\n );\n }\n\n // Per-embedded-request capability check against the request's own\n // envelope declaration (-32021 on violation).\n if (hasInputRequests) {\n const declared = this._inputRequestCapabilityView(ctx);\n for (const [key, entry] of Object.entries(inputRequests)) {\n const { embedded, required } = coerceEmbeddedInputRequest(method, key, entry);\n const missing = missingClientCapabilities(required, declared);\n if (missing !== undefined) {\n throw new MissingRequiredClientCapabilityError(\n { requiredCapabilities: missing },\n `Cannot request input '${key}' (${embedded.method}): the request's client capabilities do not declare ` +\n `the required capability`\n );\n }\n }\n }\n\n return result;\n }\n\n /**\n * Runs the configured `requestState.verify` hook and returns its\n * resolved value (`undefined` when unconfigured or the hook returns\n * nothing). Deny-on-error: any hook failure answers the frozen `-32602`;\n * the reason goes to `onerror` only.\n */\n private async _verifyRequestState(state: string, ctx: ServerContext, method: string): Promise<unknown> {\n if (this._requestStateVerify === undefined) {\n return undefined;\n }\n try {\n return await this._requestStateVerify(state, ctx);\n } catch (error) {\n this.onerror?.(\n new Error(`requestState verification rejected ${method}: ${error instanceof Error ? error.message : String(error)}`)\n );\n throw new ProtocolError(ProtocolErrorCode.InvalidParams, 'Invalid or expired requestState', {\n reason: 'invalid_request_state'\n });\n }\n }\n\n /**\n * The per-request resolved client-capabilities view: the request's own\n * `_meta` envelope on the 2026 era; the `initialize`-declared state on a\n * 2025-era connection. Per-request instances that never saw an\n * initialize (stateless legacy) hold nothing, so gates refuse there.\n */\n private _inputRequestCapabilityView(ctx: ServerContext): ClientCapabilities | undefined {\n return this._servedModernEra()\n ? (ctx.mcpReq.envelope?.[CLIENT_CAPABILITIES_META_KEY] as ClientCapabilities | undefined)\n : this._clientCapabilities;\n }\n\n /**\n * Guard for the push-style server→client request APIs ({@linkcode createMessage},\n * {@linkcode elicitInput}, {@linkcode listRoots}, {@linkcode ping}) on a\n * modern-era instance: the 2026-07-28 revision has no server→client request\n * channel, so the call fails before any wire traffic with a typed error\n * whose message steers to `inputRequired(...)`. The base era gate would\n * also reject it; this guard runs first to carry the steer.\n */\n private _assertPushApiInServedEra(method: string): void {\n if (this._servedModernEra()) {\n throw new SdkError(\n SdkErrorCode.MethodNotSupportedByProtocolVersion,\n `Server-to-client requests are not available on protocol revision ${this._negotiatedProtocolVersion}: ` +\n `'${method}' cannot be sent while serving a request on that revision. ` +\n `Return inputRequired({ ... }) from the handler instead — the client fulfils the embedded ` +\n `requests and retries the original request (multi round-trip requests).`,\n { method, era: '2026-07-28' }\n );\n }\n }\n\n protected assertCapabilityForMethod(method: RequestMethod | string): void {\n switch (method) {\n case 'sampling/createMessage': {\n if (!this._clientCapabilities?.sampling) {\n throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Client does not support sampling (required for ${method})`);\n }\n break;\n }\n\n case 'elicitation/create': {\n if (!this._clientCapabilities?.elicitation) {\n throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Client does not support elicitation (required for ${method})`);\n }\n break;\n }\n\n case 'roots/list': {\n if (!this._clientCapabilities?.roots) {\n throw new SdkError(\n SdkErrorCode.CapabilityNotSupported,\n `Client does not support listing roots (required for ${method})`\n );\n }\n break;\n }\n\n case 'ping': {\n // No specific capability required for ping\n break;\n }\n }\n }\n\n protected assertNotificationCapability(method: NotificationMethod | string): void {\n switch (method) {\n case 'notifications/message': {\n if (!this._capabilities.logging) {\n throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Server does not support logging (required for ${method})`);\n }\n break;\n }\n\n case 'notifications/resources/updated':\n case 'notifications/resources/list_changed': {\n if (!this._capabilities.resources) {\n throw new SdkError(\n SdkErrorCode.CapabilityNotSupported,\n `Server does not support notifying about resources (required for ${method})`\n );\n }\n break;\n }\n\n case 'notifications/tools/list_changed': {\n if (!this._capabilities.tools) {\n throw new SdkError(\n SdkErrorCode.CapabilityNotSupported,\n `Server does not support notifying of tool list changes (required for ${method})`\n );\n }\n break;\n }\n\n case 'notifications/prompts/list_changed': {\n if (!this._capabilities.prompts) {\n throw new SdkError(\n SdkErrorCode.CapabilityNotSupported,\n `Server does not support notifying of prompt list changes (required for ${method})`\n );\n }\n break;\n }\n\n case 'notifications/elicitation/complete': {\n if (!this._clientCapabilities?.elicitation?.url) {\n throw new SdkError(\n SdkErrorCode.CapabilityNotSupported,\n `Client does not support URL elicitation (required for ${method})`\n );\n }\n break;\n }\n\n case 'notifications/cancelled': {\n // Cancellation notifications are always allowed\n break;\n }\n\n case 'notifications/progress': {\n // Progress notifications are always allowed\n break;\n }\n }\n }\n\n protected assertRequestHandlerCapability(method: string): void {\n switch (method) {\n case 'completion/complete': {\n if (!this._capabilities.completions) {\n throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Server does not support completions (required for ${method})`);\n }\n break;\n }\n\n case 'logging/setLevel': {\n if (!this._capabilities.logging) {\n throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Server does not support logging (required for ${method})`);\n }\n break;\n }\n\n case 'prompts/get':\n case 'prompts/list': {\n if (!this._capabilities.prompts) {\n throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Server does not support prompts (required for ${method})`);\n }\n break;\n }\n\n case 'resources/list':\n case 'resources/templates/list':\n case 'resources/read': {\n if (!this._capabilities.resources) {\n throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Server does not support resources (required for ${method})`);\n }\n break;\n }\n\n case 'tools/call':\n case 'tools/list': {\n if (!this._capabilities.tools) {\n throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Server does not support tools (required for ${method})`);\n }\n break;\n }\n\n case 'ping':\n case 'initialize': {\n // No specific capability required for these methods\n break;\n }\n }\n }\n\n private async _oninitialize(request: InitializeRequest): Promise<InitializeResult> {\n const requestedVersion = request.params.protocolVersion;\n\n this._clientCapabilities = request.params.capabilities;\n this._clientVersion = request.params.clientInfo;\n\n // A 2026-07-28-or-later revision is NEVER negotiated via the legacy\n // `initialize` handshake — only ever selected through `server/discover` —\n // so the accept check and counter-offer consult only the legacy subset.\n const legacyVersions = legacyProtocolVersions(this._supportedProtocolVersions);\n const protocolVersion = legacyVersions.includes(requestedVersion)\n ? requestedVersion\n : (legacyVersions[0] ?? LATEST_PROTOCOL_VERSION);\n\n // The negotiated version is the instance's connection state — it IS\n // the wire-era selection for everything this instance sends and\n // receives from here on (legacy handshake ⇒ a legacy-era version).\n this._negotiatedProtocolVersion = protocolVersion;\n this.transport?.setProtocolVersion?.(protocolVersion);\n\n return {\n protocolVersion,\n capabilities: this.getCapabilities(),\n serverInfo: this._serverInfo,\n ...(this._instructions && { instructions: this._instructions })\n };\n }\n\n /**\n * Answers `server/discover` (protocol revision 2026-07-28). `supportedVersions`\n * lists only modern revisions (2025-era versions are negotiated via `initialize`);\n * the capabilities are advertised as-is, listChanged/subscribe bits included\n * (see {@linkcode discoverAdvertisedCapabilities}).\n */\n private _ondiscover(): DiscoverResult {\n // Server identity is not a body field: the encode seam stamps it into\n // the result `_meta` via `_outboundServerInfo` (spec PR #3002).\n return {\n supportedVersions: modernProtocolVersions(this._supportedProtocolVersions),\n capabilities: discoverAdvertisedCapabilities(this.getCapabilities()),\n ...(this._instructions && { instructions: this._instructions })\n };\n }\n\n /**\n * The identity the 2026-era encode seam stamps into every outbound\n * result's `_meta` under `io.modelcontextprotocol/serverInfo` (spec PR\n * #3002: servers SHOULD identify themselves on every response).\n */\n protected override _outboundServerInfo(): Implementation | undefined {\n return this._serverInfo;\n }\n\n /**\n * After initialization has completed, this will be populated with the client's reported capabilities.\n *\n * @deprecated Read client identity from the per-request handler context instead: on\n * 2026-07-28 (per-request envelope) requests `ctx.mcpReq.envelope` carries the client's\n * declared capabilities, while on 2025-era connections this accessor keeps returning the\n * `initialize`-scoped value. The accessor remains functional — instances serving the\n * 2026-07-28 era are backfilled per request from the validated envelope.\n */\n getClientCapabilities(): ClientCapabilities | undefined {\n return this._clientCapabilities;\n }\n\n /**\n * After initialization has completed, this will be populated with information about the client's name and version.\n *\n * @deprecated Read client identity from the per-request handler context instead: on\n * 2026-07-28 (per-request envelope) requests `ctx.mcpReq.envelope` carries the client's\n * name and version, while on 2025-era connections this accessor keeps returning the\n * `initialize`-scoped value. The accessor remains functional — instances serving the\n * 2026-07-28 era are backfilled per request from the validated envelope.\n */\n getClientVersion(): Implementation | undefined {\n return this._clientVersion;\n }\n\n /**\n * After initialization has completed, this will be populated with the protocol version negotiated\n * with the client (the version the server responded with during the initialize handshake), or\n * `undefined` before initialization.\n *\n * @deprecated Read the protocol revision from the per-request handler context instead: on\n * 2026-07-28 (per-request envelope) requests `ctx.mcpReq.envelope` names the revision the\n * request was sent for, while on 2025-era connections this accessor keeps returning the\n * `initialize`-negotiated version. The accessor remains functional — instances serving the\n * 2026-07-28 era report that revision.\n */\n getNegotiatedProtocolVersion(): string | undefined {\n return this._negotiatedProtocolVersion;\n }\n\n /**\n * Project a `tools/call` result through this instance's negotiated wire\n * codec — the era-agnostic SEP-2106 §4.3 TextContent auto-append, plus on\n * the 2025 era the `{result:…}` wrap when `structuredContent` is a\n * non-object value or the advertised `outputSchema` had a non-object root.\n * Identity for object-shaped `structuredContent` on the 2026 era.\n *\n * `McpServer`'s built-in `tools/call` handler routes through this method.\n * Low-level `setRequestHandler('tools/call', …)` authors call it\n * themselves so the projection lives in one place (the codec) and the\n * server-side handler stays era-blind.\n *\n * This is the only codec function exposed on `Server` — the full\n * `WireCodec` is intentionally not part of the public surface.\n */\n public projectCallToolResult(\n result: CallToolResult,\n advertisedOutputSchema: Readonly<Record<string, unknown>> | undefined\n ): CallToolResult {\n return this._wireCodec().projectCallToolResult(result, advertisedOutputSchema);\n }\n\n /**\n * Returns the current server capabilities.\n */\n public getCapabilities(): ServerCapabilities {\n return this._capabilities;\n }\n\n /**\n * Sends a `ping` request to the connected client.\n *\n * @deprecated The 2026-07-28 protocol removed ping; it throws on a 2026-07-28-era instance.\n * If your factory serves both eras, this only works on the legacy path.\n */\n async ping(): Promise<EmptyResult> {\n this._assertPushApiInServedEra('ping');\n return this.request({ method: 'ping' });\n }\n\n /**\n * Request LLM sampling from the client (without tools).\n * Returns single content block for backwards compatibility.\n *\n * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577).\n * Throws on a 2026-07-28-era request — use {@link index.inputRequired | inputRequired} (multi-round-trip) instead,\n * or migrate to calling LLM provider APIs directly. The 2025 push-style server-to-client\n * request model is replaced by input_required results in the 2026-07-28 protocol. If your\n * factory serves both eras, this only works on the legacy path.\n */\n async createMessage(params: CreateMessageRequestParamsBase, options?: RequestOptions): Promise<CreateMessageResult>;\n\n /**\n * Request LLM sampling from the client with tool support.\n * Returns content that may be a single block or array (for parallel tool calls).\n *\n * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577).\n * Throws on a 2026-07-28-era request — use {@link index.inputRequired | inputRequired} (multi-round-trip) instead,\n * or migrate to calling LLM provider APIs directly. The 2025 push-style server-to-client\n * request model is replaced by input_required results in the 2026-07-28 protocol. If your\n * factory serves both eras, this only works on the legacy path.\n */\n async createMessage(params: CreateMessageRequestParamsWithTools, options?: RequestOptions): Promise<CreateMessageResultWithTools>;\n\n /**\n * Request LLM sampling from the client.\n * When tools may or may not be present, returns the union type.\n *\n * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577).\n * Throws on a 2026-07-28-era request — use {@link index.inputRequired | inputRequired} (multi-round-trip) instead,\n * or migrate to calling LLM provider APIs directly. The 2025 push-style server-to-client\n * request model is replaced by input_required results in the 2026-07-28 protocol. If your\n * factory serves both eras, this only works on the legacy path.\n */\n async createMessage(\n params: CreateMessageRequest['params'],\n options?: RequestOptions\n ): Promise<CreateMessageResult | CreateMessageResultWithTools>;\n\n // Implementation\n async createMessage(\n params: CreateMessageRequest['params'],\n options?: RequestOptions\n ): Promise<CreateMessageResult | CreateMessageResultWithTools> {\n this._assertPushApiInServedEra('sampling/createMessage');\n // Capability check - only required when tools/toolChoice are provided\n if ((params.tools || params.toolChoice) && !this._clientCapabilities?.sampling?.tools) {\n throw new SdkError(SdkErrorCode.CapabilityNotSupported, 'Client does not support sampling tools capability.');\n }\n\n // Message structure validation - always validate tool_use/tool_result pairs.\n // These may appear even without tools/toolChoice in the current request when\n // a previous sampling request returned tool_use and this is a follow-up with results.\n if (params.messages.length > 0) {\n const lastMessage = params.messages.at(-1)!;\n const lastContent = Array.isArray(lastMessage.content) ? lastMessage.content : [lastMessage.content];\n const hasToolResults = lastContent.some(c => c.type === 'tool_result');\n\n const previousMessage = params.messages.length > 1 ? params.messages.at(-2) : undefined;\n const previousContent = previousMessage\n ? Array.isArray(previousMessage.content)\n ? previousMessage.content\n : [previousMessage.content]\n : [];\n const hasPreviousToolUse = previousContent.some(c => c.type === 'tool_use');\n\n if (hasToolResults) {\n if (lastContent.some(c => c.type !== 'tool_result')) {\n throw new ProtocolError(\n ProtocolErrorCode.InvalidParams,\n 'The last message must contain only tool_result content if any is present'\n );\n }\n if (!hasPreviousToolUse) {\n throw new ProtocolError(\n ProtocolErrorCode.InvalidParams,\n 'tool_result blocks are not matching any tool_use from the previous message'\n );\n }\n }\n if (hasPreviousToolUse) {\n const toolUseIds = new Set(previousContent.filter(c => c.type === 'tool_use').map(c => (c as ToolUseContent).id));\n const toolResultIds = new Set(\n lastContent.filter(c => c.type === 'tool_result').map(c => (c as ToolResultContent).toolUseId)\n );\n if (toolUseIds.size !== toolResultIds.size || ![...toolUseIds].every(id => toolResultIds.has(id))) {\n throw new ProtocolError(\n ProtocolErrorCode.InvalidParams,\n 'ids of tool_result blocks and tool_use blocks from previous message do not match'\n );\n }\n }\n }\n\n // The result schema depends on the REQUEST params (tools vs no tools),\n // which a method-keyed registry entry cannot express — the era codec's\n // `samplingResultVariant` owns the with-tools/plain pair. The funnel's\n // registry-result path runs first (era-gated: sampling/createMessage\n // is not a wire request on the 2026 era, so a modern-era instance\n // fails with the typed era error before anything reaches the\n // transport), then the variant validator narrows the wide result.\n const hasTools = Boolean(params.tools || params.toolChoice);\n const wide = await this.request({ method: 'sampling/createMessage', params }, options);\n const outcome = this._wireCodec().samplingResultVariant(hasTools, wide);\n if (!outcome.ok) {\n // `not-in-era` is unreachable on the path that gets here (the era\n // gate above filters out 2026 instances); `invalid` is a peer bug.\n throw new SdkError(\n SdkErrorCode.InvalidResult,\n `Invalid sampling/createMessage result: ${outcome.reason === 'invalid' ? outcome.message : outcome.reason}`\n );\n }\n return outcome.value;\n }\n\n /**\n * Creates an elicitation request for the given parameters.\n * For backwards compatibility, `mode` may be omitted for form requests and will default to `\"form\"`.\n * @param params The parameters for the elicitation request.\n * @param options Optional request options.\n * @returns The result of the elicitation request.\n *\n * @deprecated Throws on a 2026-07-28-era request — use {@link index.inputRequired | inputRequired} (multi-round-trip)\n * instead. The 2025 push-style server-to-client request model is replaced by input_required\n * results in the 2026-07-28 protocol. If your factory serves both eras, this only works on the\n * legacy path.\n */\n async elicitInput(params: ElicitRequestFormParams | ElicitRequestURLParams, options?: RequestOptions): Promise<ElicitResult> {\n this._assertPushApiInServedEra('elicitation/create');\n const mode = (params.mode ?? 'form') as 'form' | 'url';\n\n switch (mode) {\n case 'url': {\n if (!this._clientCapabilities?.elicitation?.url) {\n throw new SdkError(SdkErrorCode.CapabilityNotSupported, 'Client does not support url elicitation.');\n }\n break;\n }\n case 'form': {\n if (!this._clientCapabilities?.elicitation?.form) {\n throw new SdkError(SdkErrorCode.CapabilityNotSupported, 'Client does not support form elicitation.');\n }\n break;\n }\n }\n\n return this._sendElicitationLeg(params, options);\n }\n\n /**\n * The capability-check-free core of {@linkcode elicitInput}. The shim\n * uses it because its gate differs from the public checks: a bare\n * `elicitation: {}` counts as form support (the pre-mode rule), and\n * accepted content passes through unvalidated for parity with the\n * modern client driver (handlers validate via the schema-aware\n * `acceptedContent` overload and can re-ask).\n */\n private async _sendElicitationLeg(\n params: ElicitRequestFormParams | ElicitRequestURLParams,\n options?: RequestOptions,\n behavior?: { validateAcceptedContent: boolean }\n ): Promise<ElicitResult> {\n const mode = (params.mode ?? 'form') as 'form' | 'url';\n const validateAcceptedContent = behavior?.validateAcceptedContent ?? true;\n\n switch (mode) {\n case 'url': {\n const urlParams = params as ElicitRequestURLParams;\n // Method-keyed request(): the era registry's plain\n // ElicitResult schema is exactly the narrow surface.\n return this.request({ method: 'elicitation/create', params: urlParams }, options);\n }\n case 'form': {\n const formParams: ElicitRequestFormParams =\n params.mode === 'form' ? (params as ElicitRequestFormParams) : { ...(params as ElicitRequestFormParams), mode: 'form' };\n\n const result = await this.request({ method: 'elicitation/create', params: formParams }, options);\n\n if (validateAcceptedContent && result.action === 'accept' && result.content && formParams.requestedSchema) {\n try {\n const validator = this._jsonSchemaValidator.getValidator(formParams.requestedSchema as JsonSchemaType);\n const validationResult = validator(result.content);\n\n if (!validationResult.valid) {\n throw new ProtocolError(\n ProtocolErrorCode.InvalidParams,\n `Elicitation response content does not match requested schema: ${validationResult.errorMessage}`\n );\n }\n } catch (error) {\n if (error instanceof ProtocolError) {\n throw error;\n }\n throw new ProtocolError(\n ProtocolErrorCode.InternalError,\n `Error validating elicitation response: ${error instanceof Error ? error.message : String(error)}`\n );\n }\n }\n return result;\n }\n }\n }\n\n /**\n * Creates a reusable callback that, when invoked, will send a `notifications/elicitation/complete`\n * notification for the specified elicitation ID.\n *\n * The notification (and the `elicitationId` it references) exists only on protocol revision\n * 2025-11-25 — the 2026-07-28 revision removed both. On a connection negotiated at 2026-07-28 the\n * returned callback rejects with a typed local error before anything reaches the transport\n * (the method is not part of that revision's wire registry).\n *\n * @param elicitationId The ID of the elicitation to mark as complete.\n * @param options Optional notification options. Useful when the completion notification should be related to a prior request.\n * @returns A function that emits the completion notification when awaited.\n */\n createElicitationCompletionNotifier(elicitationId: string, options?: NotificationOptions): () => Promise<void> {\n if (!this._clientCapabilities?.elicitation?.url) {\n throw new SdkError(\n SdkErrorCode.CapabilityNotSupported,\n 'Client does not support URL elicitation (required for notifications/elicitation/complete)'\n );\n }\n\n return () =>\n this.notification(\n {\n method: 'notifications/elicitation/complete',\n params: {\n elicitationId\n }\n },\n options\n );\n }\n\n /**\n * Requests the list of roots from the client.\n *\n * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577).\n * Throws on a 2026-07-28-era request — use {@link index.inputRequired | inputRequired} (multi-round-trip) instead,\n * or migrate to passing paths via tool parameters, resource URIs, or configuration. The 2025\n * push-style server-to-client request model is replaced by input_required results in the\n * 2026-07-28 protocol. If your factory serves both eras, this only works on the legacy path.\n */\n async listRoots(params?: ListRootsRequest['params'], options?: RequestOptions): Promise<ListRootsResult> {\n this._assertPushApiInServedEra('roots/list');\n return this.request({ method: 'roots/list', params }, options);\n }\n\n /**\n * Sends a logging message to the client, if connected.\n * Note: You only need to send the parameters object, not the entire JSON-RPC message.\n * @see {@linkcode LoggingMessageNotification}\n * @param params\n * @param sessionId Optional for stateless transports and backward compatibility.\n *\n * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577).\n * Remains functional during the deprecation window (at least twelve months).\n * Migrate to stderr logging (STDIO servers) or OpenTelemetry.\n */\n async sendLoggingMessage(params: LoggingMessageNotification['params'], sessionId?: string) {\n if (this._capabilities.logging && !this.isMessageIgnored(params.level, sessionId)) {\n return this.notification({ method: 'notifications/message', params });\n }\n }\n\n async sendResourceUpdated(params: ResourceUpdatedNotification['params']) {\n return this.notification({\n method: 'notifications/resources/updated',\n params\n });\n }\n\n async sendResourceListChanged() {\n return this.notification({\n method: 'notifications/resources/list_changed'\n });\n }\n\n async sendToolListChanged() {\n return this.notification({ method: 'notifications/tools/list_changed' });\n }\n\n async sendPromptListChanged() {\n return this.notification({ method: 'notifications/prompts/list_changed' });\n }\n}\n\n/**\n * The capability set a server advertises on `server/discover`. Pure — never\n * mutates the input; the legacy `initialize` advertisement is untouched.\n *\n * The serving entries serve `subscriptions/listen` themselves, so the\n * `listChanged` and `resources.subscribe` capability bits are advertised\n * as-is: a modern-era client uses them to decide which notification types to\n * request on its listen filter.\n */\nexport function discoverAdvertisedCapabilities(capabilities: ServerCapabilities): ServerCapabilities {\n return { ...capabilities };\n}\n","import type {\n BaseMetadata,\n CacheHint,\n CallToolResult,\n CompleteRequestPrompt,\n CompleteRequestResourceTemplate,\n CompleteResult,\n GetPromptResult,\n Icon,\n Implementation,\n InputRequiredResult,\n ListPromptsResult,\n ListResourcesResult,\n ListToolsResult,\n LoggingMessageNotification,\n Prompt,\n PromptReference,\n ReadResourceResult,\n Resource,\n ResourceTemplateReference,\n Result,\n ServerContext,\n StandardSchemaWithJSON,\n Tool,\n ToolAnnotations,\n ToolExecution,\n Transport,\n Variables\n} from '@modelcontextprotocol/core-internal';\nimport {\n assertCompleteRequestPrompt,\n assertCompleteRequestResourceTemplate,\n assertValidCacheHint,\n attachCacheHintFallback,\n isInputRequiredResult,\n normalizeRawShapeSchema,\n promptArgumentsFromStandardSchema,\n ProtocolError,\n ProtocolErrorCode,\n ResourceNotFoundError,\n scanXMcpHeaderDeclarations,\n standardSchemaToJsonSchema,\n UriTemplate,\n validateAndWarnToolName,\n validateStandardSchema\n} from '@modelcontextprotocol/core-internal';\nimport type * as z from 'zod/v4';\n\nimport { getCompleter, isCompletable } from './completable';\nimport type { ServerOptions } from './server';\nimport { Server } from './server';\n\n/**\n * High-level MCP server that provides a simpler API for working with resources, tools, and prompts.\n * For advanced usage (like sending notifications or setting custom request handlers), use the underlying\n * {@linkcode Server} instance available via the {@linkcode McpServer.server | server} property.\n *\n * @example\n * ```ts source=\"./mcp.examples.ts#McpServer_basicUsage\"\n * const server = new McpServer({\n * name: 'my-server',\n * version: '1.0.0'\n * });\n * ```\n */\nexport class McpServer {\n /**\n * The underlying {@linkcode Server} instance, useful for advanced operations like sending notifications.\n */\n public readonly server: Server;\n\n private _registeredResources: { [uri: string]: RegisteredResource } = {};\n private _registeredResourceTemplates: {\n [name: string]: RegisteredResourceTemplate;\n } = {};\n private _registeredTools: { [name: string]: RegisteredTool } = {};\n private _registeredPrompts: { [name: string]: RegisteredPrompt } = {};\n /**\n * Per-tool JSON-converted `inputSchema`, memoized so the SEP-2243\n * registration-time scan and the pre-dispatch validation step share one\n * conversion instead of paying it twice per request under the\n * per-request-factory `createMcpHandler` model.\n */\n private _toolInputSchemaJson: { [name: string]: Record<string, unknown> } = {};\n\n /**\n * The JSON-serialized `inputSchema` of a registered tool, or `undefined`\n * when no such tool is registered. Used by the HTTP entry's pre-dispatch\n * SEP-2243 `Mcp-Param-*` validation step (which needs the same JSON Schema\n * `tools/list` would emit, before dispatch reaches the handler).\n *\n * @internal\n */\n toolInputSchemaJson(name: string): Record<string, unknown> | undefined {\n const tool = this._registeredTools[name];\n if (tool === undefined || !tool.enabled) return undefined;\n if (Object.hasOwn(this._toolInputSchemaJson, name)) return this._toolInputSchemaJson[name];\n if (tool.inputSchema === undefined) return EMPTY_OBJECT_JSON_SCHEMA;\n // Lazy path: the memo slot is unset because `registerTool`'s eager\n // conversion threw (and was swallowed per its \"warn, never throw\"\n // contract) or `update({paramsSchema})`/rename invalidated it. The\n // pre-dispatch SEP-2243 caller must not turn that into a 500 for a\n // `tools/call` whose body-authoritative dispatch would otherwise\n // succeed — return `undefined` so validation is skipped and the\n // conversion failure stays where it always surfaced (`tools/list`).\n // A successful re-derive is memoized so the per-request-factory\n // `createMcpHandler` model does not re-convert on every call.\n try {\n const json = standardSchemaToJsonSchema(tool.inputSchema, 'input');\n this._toolInputSchemaJson[name] = json;\n return json;\n } catch {\n return undefined;\n }\n }\n\n constructor(serverInfo: Implementation, options?: ServerOptions) {\n this.server = new Server(serverInfo, options);\n\n // Per the MCP spec, a server that declares a primitive capability MUST respond to its\n // list method (potentially with an empty result) rather than \"Method not found\" — even\n // if nothing has been registered yet. Handlers are normally installed lazily on first\n // registration, so eagerly install them here for any capability declared up front.\n // (Users of the low-level `Server` class remain responsible for their own handlers.)\n if (options?.capabilities?.tools) {\n this.setToolRequestHandlers();\n }\n if (options?.capabilities?.resources) {\n this.setResourceRequestHandlers();\n }\n if (options?.capabilities?.prompts) {\n this.setPromptRequestHandlers();\n }\n }\n\n /**\n * Attaches to the given transport, starts it, and starts listening for messages.\n *\n * The `server` object assumes ownership of the {@linkcode Transport}, replacing any callbacks that have already been set, and expects that it is the only user of the {@linkcode Transport} instance going forward.\n *\n * @example\n * ```ts source=\"./mcp.examples.ts#McpServer_connect_stdio\"\n * const server = new McpServer({ name: 'my-server', version: '1.0.0' });\n * const transport = new StdioServerTransport();\n * await server.connect(transport);\n * ```\n */\n async connect(transport: Transport): Promise<void> {\n return await this.server.connect(transport);\n }\n\n /**\n * Closes the connection.\n */\n async close(): Promise<void> {\n await this.server.close();\n }\n\n private _toolHandlersInitialized = false;\n\n private setToolRequestHandlers() {\n if (this._toolHandlersInitialized) {\n return;\n }\n\n this.server.assertCanSetRequestHandler('tools/list');\n this.server.assertCanSetRequestHandler('tools/call');\n\n this.server.registerCapabilities({\n tools: {\n listChanged: this.server.getCapabilities().tools?.listChanged ?? true\n }\n });\n\n // Note: tools are listed in registration (insertion) order, which keeps the ordering\n // deterministic across requests when the underlying tool set has not changed, as\n // recommended by the spec.\n this.server.setRequestHandler(\n 'tools/list',\n (): ListToolsResult => ({\n tools: Object.entries(this._registeredTools)\n .filter(([, tool]) => tool.enabled)\n .map(([name, tool]): Tool => {\n const toolDefinition: Tool = {\n name,\n title: tool.title,\n description: tool.description,\n inputSchema: tool.inputSchema\n ? (standardSchemaToJsonSchema(tool.inputSchema, 'input') as Tool['inputSchema'])\n : EMPTY_OBJECT_JSON_SCHEMA,\n annotations: tool.annotations,\n icons: tool.icons,\n execution: tool.execution,\n _meta: tool._meta\n };\n\n if (tool.outputSchema) {\n // SEP-2106 legacy interop (non-object outputSchema roots wrapped in\n // `{type:'object',properties:{result:<natural>},required:['result']}` toward\n // 2025-era clients) lives in the 2025 wire codec's `encodeResult('tools/list', …)`\n // — this handler is era-blind and emits the natural converted schema.\n toolDefinition.outputSchema = standardSchemaToJsonSchema(tool.outputSchema, 'output') as Tool['outputSchema'];\n }\n\n return toolDefinition;\n })\n })\n );\n\n this.server.setRequestHandler('tools/call', async (request, ctx): Promise<CallToolResult | InputRequiredResult> => {\n const tool = this._registeredTools[request.params.name];\n if (!tool) {\n throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Tool ${request.params.name} not found`);\n }\n if (!tool.enabled) {\n throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Tool ${request.params.name} disabled`);\n }\n\n try {\n const args = await this.validateToolInput(tool, request.params.arguments, request.params.name);\n const result = await this.executeToolHandler(tool, args, ctx);\n await this.validateToolOutput(tool, result, request.params.name);\n if (isInputRequiredResult(result)) return result;\n // SEP-2106 result-side projection (the era-agnostic TextContent auto-append; the\n // `{result:…}` wrap on the 2025 era) lives behind the wire codec's\n // `projectCallToolResult`. The codec receives the SAME advertised JSON Schema\n // `tools/list` emits (and that the codec's `encodeResult('tools/list', …)` may have\n // wrapped) so the listing and the call cannot diverge.\n return this.server.projectCallToolResult(result, tool.outputSchemaJson);\n } catch (error) {\n if (error instanceof ProtocolError && error.code === ProtocolErrorCode.UrlElicitationRequired) {\n throw error; // Return the error to the caller without wrapping in CallToolResult\n }\n return this.createToolError(error instanceof Error ? error.message : String(error));\n }\n });\n\n this._toolHandlersInitialized = true;\n }\n\n /**\n * Creates a tool error result.\n *\n * @param errorMessage - The error message.\n * @returns The tool error result.\n */\n private createToolError(errorMessage: string): CallToolResult {\n return {\n content: [\n {\n type: 'text',\n text: errorMessage\n }\n ],\n isError: true\n };\n }\n\n /**\n * Validates tool input arguments against the tool's input schema.\n */\n private async validateToolInput<\n ToolType extends RegisteredTool,\n Args extends ToolType['inputSchema'] extends infer InputSchema\n ? InputSchema extends StandardSchemaWithJSON\n ? StandardSchemaWithJSON.InferOutput<InputSchema>\n : undefined\n : undefined\n >(tool: ToolType, args: Args, toolName: string): Promise<Args> {\n if (!tool.inputSchema) {\n return undefined as Args;\n }\n\n const parseResult = await validateStandardSchema(tool.inputSchema, args ?? {});\n if (!parseResult.success) {\n throw new ProtocolError(\n ProtocolErrorCode.InvalidParams,\n `Input validation error: Invalid arguments for tool ${toolName}: ${parseResult.error}`\n );\n }\n\n return parseResult.data as unknown as Args;\n }\n\n /**\n * Validates tool output against the tool's output schema.\n */\n private async validateToolOutput(tool: RegisteredTool, result: CallToolResult | InputRequiredResult, toolName: string): Promise<void> {\n if (!tool.outputSchema) {\n return;\n }\n\n // An input-required result is not the tool's final output: structured\n // content is only required (and validated) on the completing result.\n if (isInputRequiredResult(result)) {\n return;\n }\n\n if (result.isError) {\n return;\n }\n\n // SEP-2106: `structuredContent` may legally be any JSON value including `null`, `0`,\n // `false`, `\"\"`. The presence check is therefore `=== undefined` (not falsy); when present,\n // the value is ALWAYS validated against the output schema — a falsy value against an\n // object-typed schema fails validation, so this is not a guard weakening.\n if (result.structuredContent === undefined) {\n throw new ProtocolError(\n ProtocolErrorCode.InvalidParams,\n `Output validation error: Tool ${toolName} has an output schema but no structured content was provided`\n );\n }\n\n // if the tool has an output schema, validate structured content\n const parseResult = await validateStandardSchema(tool.outputSchema, result.structuredContent);\n if (!parseResult.success) {\n throw new ProtocolError(\n ProtocolErrorCode.InvalidParams,\n `Output validation error: Invalid structured content for tool ${toolName}: ${parseResult.error}`\n );\n }\n }\n\n /**\n * Executes a tool handler.\n */\n private async executeToolHandler(\n tool: RegisteredTool,\n args: unknown,\n ctx: ServerContext\n ): Promise<CallToolResult | InputRequiredResult> {\n // Executor encapsulates handler invocation with proper types\n return tool.executor(args, ctx);\n }\n\n private _completionHandlerInitialized = false;\n\n private setCompletionRequestHandler() {\n if (this._completionHandlerInitialized) {\n return;\n }\n\n this.server.assertCanSetRequestHandler('completion/complete');\n\n this.server.registerCapabilities({\n completions: {}\n });\n\n this.server.setRequestHandler('completion/complete', async (request): Promise<CompleteResult> => {\n switch (request.params.ref.type) {\n case 'ref/prompt': {\n assertCompleteRequestPrompt(request);\n return this.handlePromptCompletion(request, request.params.ref);\n }\n\n case 'ref/resource': {\n assertCompleteRequestResourceTemplate(request);\n return this.handleResourceCompletion(request, request.params.ref);\n }\n\n default: {\n throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Invalid completion reference: ${request.params.ref}`);\n }\n }\n });\n\n this._completionHandlerInitialized = true;\n }\n\n private async handlePromptCompletion(request: CompleteRequestPrompt, ref: PromptReference): Promise<CompleteResult> {\n const prompt = this._registeredPrompts[ref.name];\n if (!prompt) {\n throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Prompt ${ref.name} not found`);\n }\n\n if (!prompt.enabled) {\n throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Prompt ${ref.name} disabled`);\n }\n\n if (!prompt.argsSchema) {\n return EMPTY_COMPLETION_RESULT;\n }\n\n const promptShape = getSchemaShape(prompt.argsSchema);\n const field = unwrapOptionalSchema(promptShape?.[request.params.argument.name]);\n if (!isCompletable(field)) {\n return EMPTY_COMPLETION_RESULT;\n }\n\n const completer = getCompleter(field);\n if (!completer) {\n return EMPTY_COMPLETION_RESULT;\n }\n\n const suggestions = await completer(request.params.argument.value, request.params.context);\n return createCompletionResult(suggestions);\n }\n\n private async handleResourceCompletion(\n request: CompleteRequestResourceTemplate,\n ref: ResourceTemplateReference\n ): Promise<CompleteResult> {\n const template = Object.values(this._registeredResourceTemplates).find(t => t.resourceTemplate.uriTemplate.toString() === ref.uri);\n\n if (!template) {\n if (this._registeredResources[ref.uri]) {\n // Attempting to autocomplete a fixed resource URI is not an error in the spec (but probably should be).\n return EMPTY_COMPLETION_RESULT;\n }\n\n throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Resource template ${request.params.ref.uri} not found`);\n }\n\n const completer = template.resourceTemplate.completeCallback(request.params.argument.name);\n if (!completer) {\n return EMPTY_COMPLETION_RESULT;\n }\n\n const suggestions = await completer(request.params.argument.value, request.params.context);\n return createCompletionResult(suggestions);\n }\n\n private _resourceHandlersInitialized = false;\n\n private setResourceRequestHandlers() {\n if (this._resourceHandlersInitialized) {\n return;\n }\n\n this.server.assertCanSetRequestHandler('resources/list');\n this.server.assertCanSetRequestHandler('resources/templates/list');\n this.server.assertCanSetRequestHandler('resources/read');\n\n this.server.registerCapabilities({\n resources: {\n listChanged: this.server.getCapabilities().resources?.listChanged ?? true\n }\n });\n\n this.server.setRequestHandler('resources/list', async (_request, ctx) => {\n const resources = Object.entries(this._registeredResources)\n .filter(([_, resource]) => resource.enabled)\n .map(([uri, resource]) => ({\n uri,\n name: resource.name,\n ...resource.metadata\n }));\n\n const templateResources: Resource[] = [];\n for (const template of Object.values(this._registeredResourceTemplates)) {\n if (!template.resourceTemplate.listCallback) {\n continue;\n }\n\n const result = await template.resourceTemplate.listCallback(ctx);\n for (const resource of result.resources) {\n templateResources.push({\n ...template.metadata,\n // the defined resource metadata should override the template metadata if present\n ...resource\n });\n }\n }\n\n return { resources: [...resources, ...templateResources] };\n });\n\n this.server.setRequestHandler('resources/templates/list', async () => {\n const resourceTemplates = Object.entries(this._registeredResourceTemplates).map(([name, template]) => ({\n name,\n uriTemplate: template.resourceTemplate.uriTemplate.toString(),\n ...template.metadata\n }));\n\n return { resourceTemplates };\n });\n\n this.server.setRequestHandler('resources/read', async (request, ctx) => {\n let uri: URL;\n try {\n uri = new URL(request.params.uri);\n } catch {\n throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Resource URI ${request.params.uri} is invalid`, {\n uri: request.params.uri,\n reason: 'invalid_uri'\n });\n }\n\n // First check for exact resource match\n const resource = this._registeredResources[uri.toString()];\n if (resource) {\n if (!resource.enabled) {\n throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Resource ${uri} disabled`);\n }\n // A per-resource cache hint is the most specific configured\n // author for this result's 2026-07-28 cache fields; it rides a\n // never-serialized carrier and is resolved at the encode seam.\n return attachCacheHintFallback(await resource.readCallback(uri, ctx), resource.cacheHint);\n }\n\n // Then check templates\n for (const template of Object.values(this._registeredResourceTemplates)) {\n const variables = template.resourceTemplate.uriTemplate.match(uri.toString());\n if (variables) {\n return attachCacheHintFallback(await template.readCallback(uri, variables, ctx), template.cacheHint);\n }\n }\n\n // Domain layer throws one neutral resource-not-found error; the\n // era-aware encode seam (WireCodec.encodeErrorCode) selects the\n // wire code (−32602 on every era).\n throw new ResourceNotFoundError(request.params.uri);\n });\n\n this._resourceHandlersInitialized = true;\n }\n\n private _promptHandlersInitialized = false;\n\n private setPromptRequestHandlers() {\n if (this._promptHandlersInitialized) {\n return;\n }\n\n this.server.assertCanSetRequestHandler('prompts/list');\n this.server.assertCanSetRequestHandler('prompts/get');\n\n this.server.registerCapabilities({\n prompts: {\n listChanged: this.server.getCapabilities().prompts?.listChanged ?? true\n }\n });\n\n this.server.setRequestHandler(\n 'prompts/list',\n (): ListPromptsResult => ({\n prompts: Object.entries(this._registeredPrompts)\n .filter(([, prompt]) => prompt.enabled)\n .map(([name, prompt]): Prompt => {\n return {\n name,\n title: prompt.title,\n description: prompt.description,\n arguments: prompt.argsSchema ? promptArgumentsFromStandardSchema(prompt.argsSchema) : undefined,\n icons: prompt.icons,\n _meta: prompt._meta\n };\n })\n })\n );\n\n this.server.setRequestHandler('prompts/get', async (request, ctx): Promise<GetPromptResult | InputRequiredResult> => {\n const prompt = this._registeredPrompts[request.params.name];\n if (!prompt) {\n throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Prompt ${request.params.name} not found`);\n }\n\n if (!prompt.enabled) {\n throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Prompt ${request.params.name} disabled`);\n }\n\n // Handler encapsulates parsing and callback invocation with proper types\n return prompt.handler(request.params.arguments, ctx);\n });\n\n this._promptHandlersInitialized = true;\n }\n\n /**\n * Registers a resource with a config object and callback.\n * For static resources, use a URI string. For dynamic resources, use a {@linkcode ResourceTemplate}.\n *\n * @example\n * ```ts source=\"./mcp.examples.ts#McpServer_registerResource_static\"\n * server.registerResource(\n * 'config',\n * 'config://app',\n * {\n * title: 'Application Config',\n * mimeType: 'text/plain'\n * },\n * async uri => ({\n * contents: [{ uri: uri.href, text: 'App configuration here' }]\n * })\n * );\n * ```\n */\n registerResource(\n name: string,\n uriOrTemplate: string,\n config: ResourceMetadata & { cacheHint?: CacheHint },\n readCallback: ReadResourceCallback\n ): RegisteredResource;\n registerResource(\n name: string,\n uriOrTemplate: ResourceTemplate,\n config: ResourceMetadata & { cacheHint?: CacheHint },\n readCallback: ReadResourceTemplateCallback\n ): RegisteredResourceTemplate;\n registerResource(\n name: string,\n uriOrTemplate: string | ResourceTemplate,\n config: ResourceMetadata & { cacheHint?: CacheHint },\n readCallback: ReadResourceCallback | ReadResourceTemplateCallback\n ): RegisteredResource | RegisteredResourceTemplate {\n // The cache hint configures the encode-time cache fields of this\n // resource's `resources/read` results (2026-07-28); it is not resource\n // metadata and never appears on `resources/list` entries.\n const cacheHint = config.cacheHint;\n let metadata: ResourceMetadata = config;\n if (cacheHint !== undefined) {\n assertValidCacheHint(cacheHint, `resource ${name}`);\n const rest = { ...config };\n delete rest.cacheHint;\n metadata = rest;\n }\n\n if (typeof uriOrTemplate === 'string') {\n if (this._registeredResources[uriOrTemplate]) {\n throw new Error(`Resource ${uriOrTemplate} is already registered`);\n }\n\n const registeredResource = this._createRegisteredResource(\n name,\n (config as BaseMetadata).title,\n uriOrTemplate,\n metadata,\n readCallback as ReadResourceCallback\n );\n if (cacheHint !== undefined) {\n registeredResource.cacheHint = cacheHint;\n }\n\n this.setResourceRequestHandlers();\n this.sendResourceListChanged();\n return registeredResource;\n } else {\n if (this._registeredResourceTemplates[name]) {\n throw new Error(`Resource template ${name} is already registered`);\n }\n\n const registeredResourceTemplate = this._createRegisteredResourceTemplate(\n name,\n (config as BaseMetadata).title,\n uriOrTemplate,\n metadata,\n readCallback as ReadResourceTemplateCallback\n );\n if (cacheHint !== undefined) {\n registeredResourceTemplate.cacheHint = cacheHint;\n }\n\n this.setResourceRequestHandlers();\n this.sendResourceListChanged();\n return registeredResourceTemplate;\n }\n }\n\n private _createRegisteredResource(\n name: string,\n title: string | undefined,\n uri: string,\n metadata: ResourceMetadata | undefined,\n readCallback: ReadResourceCallback\n ): RegisteredResource {\n const registeredResource: RegisteredResource = {\n name,\n title,\n metadata,\n readCallback,\n enabled: true,\n disable: () => registeredResource.update({ enabled: false }),\n enable: () => registeredResource.update({ enabled: true }),\n remove: () => registeredResource.update({ uri: null }),\n update: updates => {\n if (updates.uri !== undefined && updates.uri !== uri) {\n delete this._registeredResources[uri];\n if (updates.uri) this._registeredResources[updates.uri] = registeredResource;\n }\n if (updates.name !== undefined) registeredResource.name = updates.name;\n if (updates.title !== undefined) registeredResource.title = updates.title;\n if (updates.metadata !== undefined) registeredResource.metadata = updates.metadata;\n if (updates.callback !== undefined) registeredResource.readCallback = updates.callback;\n if (updates.enabled !== undefined) registeredResource.enabled = updates.enabled;\n this.sendResourceListChanged();\n }\n };\n this._registeredResources[uri] = registeredResource;\n return registeredResource;\n }\n\n private _createRegisteredResourceTemplate(\n name: string,\n title: string | undefined,\n template: ResourceTemplate,\n metadata: ResourceMetadata | undefined,\n readCallback: ReadResourceTemplateCallback\n ): RegisteredResourceTemplate {\n const registeredResourceTemplate: RegisteredResourceTemplate = {\n resourceTemplate: template,\n title,\n metadata,\n readCallback,\n enabled: true,\n disable: () => registeredResourceTemplate.update({ enabled: false }),\n enable: () => registeredResourceTemplate.update({ enabled: true }),\n remove: () => registeredResourceTemplate.update({ name: null }),\n update: updates => {\n if (updates.name !== undefined && updates.name !== name) {\n delete this._registeredResourceTemplates[name];\n if (updates.name) this._registeredResourceTemplates[updates.name] = registeredResourceTemplate;\n }\n if (updates.title !== undefined) registeredResourceTemplate.title = updates.title;\n if (updates.template !== undefined) registeredResourceTemplate.resourceTemplate = updates.template;\n if (updates.metadata !== undefined) registeredResourceTemplate.metadata = updates.metadata;\n if (updates.callback !== undefined) registeredResourceTemplate.readCallback = updates.callback;\n if (updates.enabled !== undefined) registeredResourceTemplate.enabled = updates.enabled;\n this.sendResourceListChanged();\n }\n };\n this._registeredResourceTemplates[name] = registeredResourceTemplate;\n\n // If the resource template has any completion callbacks, enable completions capability\n const variableNames = template.uriTemplate.variableNames;\n const hasCompleter = Array.isArray(variableNames) && variableNames.some(v => !!template.completeCallback(v));\n if (hasCompleter) {\n this.setCompletionRequestHandler();\n }\n\n return registeredResourceTemplate;\n }\n\n private _createRegisteredPrompt(\n name: string,\n title: string | undefined,\n description: string | undefined,\n argsSchema: StandardSchemaWithJSON | undefined,\n callback: PromptCallback<StandardSchemaWithJSON | undefined>,\n icons: Icon[] | undefined,\n _meta: Record<string, unknown> | undefined\n ): RegisteredPrompt {\n // Track current schema and callback for handler regeneration\n let currentArgsSchema = argsSchema;\n let currentCallback = callback;\n\n const registeredPrompt: RegisteredPrompt = {\n title,\n description,\n argsSchema,\n icons,\n _meta,\n handler: createPromptHandler(name, argsSchema, callback),\n enabled: true,\n disable: () => registeredPrompt.update({ enabled: false }),\n enable: () => registeredPrompt.update({ enabled: true }),\n remove: () => registeredPrompt.update({ name: null }),\n update: updates => {\n if (updates.name !== undefined && updates.name !== name) {\n delete this._registeredPrompts[name];\n if (updates.name) this._registeredPrompts[updates.name] = registeredPrompt;\n }\n if (updates.title !== undefined) registeredPrompt.title = updates.title;\n if (updates.description !== undefined) registeredPrompt.description = updates.description;\n if (updates.icons !== undefined) registeredPrompt.icons = updates.icons;\n if (updates._meta !== undefined) registeredPrompt._meta = updates._meta;\n\n // Track if we need to regenerate the handler\n let needsHandlerRegen = false;\n if (updates.argsSchema !== undefined) {\n registeredPrompt.argsSchema = updates.argsSchema;\n currentArgsSchema = updates.argsSchema;\n needsHandlerRegen = true;\n }\n if (updates.callback !== undefined) {\n currentCallback = updates.callback as PromptCallback<StandardSchemaWithJSON | undefined>;\n needsHandlerRegen = true;\n }\n if (needsHandlerRegen) {\n registeredPrompt.handler = createPromptHandler(name, currentArgsSchema, currentCallback);\n }\n\n if (updates.enabled !== undefined) registeredPrompt.enabled = updates.enabled;\n this.sendPromptListChanged();\n }\n };\n this._registeredPrompts[name] = registeredPrompt;\n\n // If any argument uses a Completable schema, enable completions capability\n if (argsSchema) {\n const shape = getSchemaShape(argsSchema);\n if (shape) {\n const hasCompletable = Object.values(shape).some(field => {\n const inner = unwrapOptionalSchema(field);\n return isCompletable(inner);\n });\n if (hasCompletable) {\n this.setCompletionRequestHandler();\n }\n }\n }\n\n return registeredPrompt;\n }\n\n private _createRegisteredTool(\n name: string,\n title: string | undefined,\n description: string | undefined,\n inputSchema: StandardSchemaWithJSON | undefined,\n outputSchema: StandardSchemaWithJSON | undefined,\n annotations: ToolAnnotations | undefined,\n icons: Icon[] | undefined,\n execution: ToolExecution | undefined,\n _meta: Record<string, unknown> | undefined,\n handler: AnyToolHandler<StandardSchemaWithJSON | undefined>\n ): RegisteredTool {\n // Validate tool name according to SEP specification\n validateAndWarnToolName(name);\n\n // SEP-2243 registration-time declaration-validity check (additive: warn,\n // never throw — clients enforce by exclusion, servers by header\n // validation; a malformed declaration here should not block local\n // development against a stdio client that ignores it). The conversion\n // is memoized so the pre-dispatch validation step in `createMcpHandler`\n // (and `toolInputSchemaJson()`) does not repeat it for the same tool.\n // `standardSchemaToJsonSchema` can throw for schemas it cannot convert\n // (e.g. a vendor without `~standard.jsonSchema`); the try/catch keeps\n // the \"warn, never throw\" contract.\n if (inputSchema !== undefined) {\n try {\n const json = standardSchemaToJsonSchema(inputSchema, 'input');\n this._toolInputSchemaJson[name] = json;\n const scan = scanXMcpHeaderDeclarations(json);\n if (!scan.valid) {\n console.warn(\n `[mcp-sdk] tool '${name}' carries an invalid x-mcp-header declaration and will be excluded by ` +\n `conforming Streamable HTTP clients: ${scan.reason}`\n );\n }\n } catch {\n // Conversion failure: leave the cache slot unset so the lazy\n // path in `toolInputSchemaJson()` (and `tools/list`) surfaces\n // the failure where it always has.\n }\n }\n\n // Track current handler for executor regeneration\n let currentHandler = handler;\n\n const registeredTool: RegisteredTool = {\n title,\n description,\n inputSchema,\n outputSchema,\n outputSchemaJson: convertOutputSchemaJson(outputSchema),\n annotations,\n icons,\n execution,\n _meta,\n handler: handler,\n executor: createToolExecutor(inputSchema, handler),\n enabled: true,\n disable: () => registeredTool.update({ enabled: false }),\n enable: () => registeredTool.update({ enabled: true }),\n remove: () => registeredTool.update({ name: null }),\n update: updates => {\n // The closure's `name` tracks the CURRENT registry key, not\n // the original registration name — renaming reassigns it so\n // subsequent paramsSchema/rename invalidations evict the live\n // `_toolInputSchemaJson` slot rather than the original.\n if (updates.name !== undefined && updates.name !== name) {\n if (typeof updates.name === 'string') {\n validateAndWarnToolName(updates.name);\n }\n delete this._registeredTools[name];\n delete this._toolInputSchemaJson[name];\n if (updates.name) {\n // The TARGET key may already be occupied by another\n // tool (rename has no duplicate-name guard) — drop\n // its memo too, otherwise `toolInputSchemaJson()`\n // returns the displaced tool's converted schema and\n // the SEP-2243 pre-dispatch validation runs against\n // the wrong schema for this name.\n delete this._toolInputSchemaJson[updates.name];\n this._registeredTools[updates.name] = registeredTool;\n name = updates.name;\n }\n }\n if (updates.title !== undefined) registeredTool.title = updates.title;\n if (updates.description !== undefined) registeredTool.description = updates.description;\n\n // Track if we need to regenerate the executor\n let needsExecutorRegen = false;\n if (updates.paramsSchema !== undefined) {\n registeredTool.inputSchema = updates.paramsSchema;\n delete this._toolInputSchemaJson[name];\n needsExecutorRegen = true;\n }\n if (updates.callback !== undefined) {\n registeredTool.handler = updates.callback;\n currentHandler = updates.callback as AnyToolHandler<StandardSchemaWithJSON | undefined>;\n needsExecutorRegen = true;\n }\n if (needsExecutorRegen) {\n registeredTool.executor = createToolExecutor(registeredTool.inputSchema, currentHandler);\n }\n\n if (updates.outputSchema !== undefined) {\n registeredTool.outputSchema = updates.outputSchema;\n registeredTool.outputSchemaJson = convertOutputSchemaJson(updates.outputSchema);\n }\n if (updates.annotations !== undefined) registeredTool.annotations = updates.annotations;\n if (updates.icons !== undefined) registeredTool.icons = updates.icons;\n if (updates._meta !== undefined) registeredTool._meta = updates._meta;\n if (updates.enabled !== undefined) registeredTool.enabled = updates.enabled;\n this.sendToolListChanged();\n }\n };\n this._registeredTools[name] = registeredTool;\n\n this.setToolRequestHandlers();\n this.sendToolListChanged();\n\n return registeredTool;\n }\n\n /**\n * Registers a tool with a config object and callback.\n *\n * @example\n * ```ts source=\"./mcp.examples.ts#McpServer_registerTool_basic\"\n * server.registerTool(\n * 'calculate-bmi',\n * {\n * title: 'BMI Calculator',\n * description: 'Calculate Body Mass Index',\n * inputSchema: z.object({\n * weightKg: z.number(),\n * heightM: z.number()\n * }),\n * outputSchema: z.object({ bmi: z.number() })\n * },\n * async ({ weightKg, heightM }) => {\n * const output = { bmi: weightKg / (heightM * heightM) };\n * return {\n * content: [{ type: 'text', text: JSON.stringify(output) }],\n * structuredContent: output\n * };\n * }\n * );\n * ```\n */\n registerTool<OutputArgs extends StandardSchemaWithJSON, InputArgs extends StandardSchemaWithJSON | undefined = undefined>(\n name: string,\n config: {\n title?: string;\n description?: string;\n inputSchema?: InputArgs;\n outputSchema?: OutputArgs;\n annotations?: ToolAnnotations;\n icons?: Icon[];\n _meta?: Record<string, unknown>;\n },\n cb: ToolCallback<InputArgs>\n ): RegisteredTool;\n /** @deprecated Wrap with `z.object({...})` instead. Raw-shape form: `inputSchema`/`outputSchema` may be a plain `{ field: z.string() }` record; it is auto-wrapped with `z.object()`. */\n registerTool<InputArgs extends ZodRawShape, OutputArgs extends ZodRawShape | StandardSchemaWithJSON | undefined = undefined>(\n name: string,\n config: {\n title?: string;\n description?: string;\n inputSchema?: InputArgs;\n outputSchema?: OutputArgs;\n annotations?: ToolAnnotations;\n icons?: Icon[];\n _meta?: Record<string, unknown>;\n },\n cb: LegacyToolCallback<InputArgs>\n ): RegisteredTool;\n registerTool(\n name: string,\n config: {\n title?: string;\n description?: string;\n inputSchema?: StandardSchemaWithJSON | ZodRawShape;\n outputSchema?: StandardSchemaWithJSON | ZodRawShape;\n annotations?: ToolAnnotations;\n icons?: Icon[];\n _meta?: Record<string, unknown>;\n },\n cb: ToolCallback<StandardSchemaWithJSON | undefined> | LegacyToolCallback<ZodRawShape>\n ): RegisteredTool {\n if (this._registeredTools[name]) {\n throw new Error(`Tool ${name} is already registered`);\n }\n\n const { title, description, inputSchema, outputSchema, annotations, icons, _meta } = config;\n\n return this._createRegisteredTool(\n name,\n title,\n description,\n normalizeRawShapeSchema(inputSchema),\n normalizeRawShapeSchema(outputSchema),\n annotations,\n icons,\n undefined,\n _meta,\n cb as ToolCallback<StandardSchemaWithJSON | undefined>\n );\n }\n\n /**\n * Registers a prompt with a config object and callback.\n *\n * @example\n * ```ts source=\"./mcp.examples.ts#McpServer_registerPrompt_basic\"\n * server.registerPrompt(\n * 'review-code',\n * {\n * title: 'Code Review',\n * description: 'Review code for best practices',\n * argsSchema: z.object({ code: z.string() })\n * },\n * ({ code }) => ({\n * messages: [\n * {\n * role: 'user' as const,\n * content: {\n * type: 'text' as const,\n * text: `Please review this code:\\n\\n${code}`\n * }\n * }\n * ]\n * })\n * );\n * ```\n */\n registerPrompt<Args extends StandardSchemaWithJSON>(\n name: string,\n config: {\n title?: string;\n description?: string;\n argsSchema?: Args;\n icons?: Icon[];\n _meta?: Record<string, unknown>;\n },\n cb: PromptCallback<Args>\n ): RegisteredPrompt;\n /** @deprecated Wrap with `z.object({...})` instead. Raw-shape form: `argsSchema` may be a plain `{ field: z.string() }` record; it is auto-wrapped with `z.object()`. */\n registerPrompt<Args extends ZodRawShape>(\n name: string,\n config: {\n title?: string;\n description?: string;\n argsSchema?: Args;\n icons?: Icon[];\n _meta?: Record<string, unknown>;\n },\n cb: LegacyPromptCallback<Args>\n ): RegisteredPrompt;\n registerPrompt(\n name: string,\n config: {\n title?: string;\n description?: string;\n argsSchema?: StandardSchemaWithJSON | ZodRawShape;\n icons?: Icon[];\n _meta?: Record<string, unknown>;\n },\n cb: PromptCallback<StandardSchemaWithJSON> | LegacyPromptCallback<ZodRawShape>\n ): RegisteredPrompt {\n if (this._registeredPrompts[name]) {\n throw new Error(`Prompt ${name} is already registered`);\n }\n\n const { title, description, argsSchema, icons, _meta } = config;\n\n const registeredPrompt = this._createRegisteredPrompt(\n name,\n title,\n description,\n normalizeRawShapeSchema(argsSchema),\n cb as PromptCallback<StandardSchemaWithJSON | undefined>,\n icons,\n _meta\n );\n\n this.setPromptRequestHandlers();\n this.sendPromptListChanged();\n\n return registeredPrompt;\n }\n\n /**\n * Checks if the server is connected to a transport.\n * @returns `true` if the server is connected\n */\n isConnected() {\n return this.server.transport !== undefined;\n }\n\n /**\n * Sends a logging message to the client, if connected.\n * Note: You only need to send the parameters object, not the entire JSON-RPC message.\n * @see {@linkcode LoggingMessageNotification}\n * @param params\n * @param sessionId Optional for stateless transports and backward compatibility.\n *\n * @example\n * ```ts source=\"./mcp.examples.ts#McpServer_sendLoggingMessage_basic\"\n * await server.sendLoggingMessage({\n * level: 'info',\n * data: 'Processing complete'\n * });\n * ```\n *\n * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577).\n * Remains functional during the deprecation window (at least twelve months).\n * Migrate to stderr logging (STDIO servers) or OpenTelemetry.\n */\n async sendLoggingMessage(params: LoggingMessageNotification['params'], sessionId?: string) {\n return this.server.sendLoggingMessage(params, sessionId);\n }\n /**\n * Sends a resource list changed event to the client, if connected.\n */\n sendResourceListChanged() {\n if (this.isConnected()) {\n this.server.sendResourceListChanged();\n }\n }\n\n /**\n * Sends a tool list changed event to the client, if connected.\n */\n sendToolListChanged() {\n if (this.isConnected()) {\n this.server.sendToolListChanged();\n }\n }\n\n /**\n * Sends a prompt list changed event to the client, if connected.\n */\n sendPromptListChanged() {\n if (this.isConnected()) {\n this.server.sendPromptListChanged();\n }\n }\n}\n\n/**\n * A callback to complete one variable within a resource template's URI template.\n */\nexport type CompleteResourceTemplateCallback = (\n value: string,\n context?: {\n arguments?: Record<string, string>;\n }\n) => string[] | Promise<string[]>;\n\n/**\n * A resource template combines a URI pattern with optional functionality to enumerate\n * all resources matching that pattern.\n */\nexport class ResourceTemplate {\n private _uriTemplate: UriTemplate;\n\n constructor(\n uriTemplate: string | UriTemplate,\n private _callbacks: {\n /**\n * A callback to list all resources matching this template. This is required to be specified, even if `undefined`, to avoid accidentally forgetting resource listing.\n */\n list: ListResourcesCallback | undefined;\n\n /**\n * An optional callback to autocomplete variables within the URI template. Useful for clients and users to discover possible values.\n */\n complete?: {\n [variable: string]: CompleteResourceTemplateCallback;\n };\n }\n ) {\n this._uriTemplate = typeof uriTemplate === 'string' ? new UriTemplate(uriTemplate) : uriTemplate;\n }\n\n /**\n * Gets the URI template pattern.\n */\n get uriTemplate(): UriTemplate {\n return this._uriTemplate;\n }\n\n /**\n * Gets the list callback, if one was provided.\n */\n get listCallback(): ListResourcesCallback | undefined {\n return this._callbacks.list;\n }\n\n /**\n * Gets the callback for completing a specific URI template variable, if one was provided.\n */\n completeCallback(variable: string): CompleteResourceTemplateCallback | undefined {\n return this._callbacks.complete?.[variable];\n }\n}\n\n/**\n * A plain record of Zod field schemas, e.g. `{ name: z.string() }`. Accepted by\n * `registerTool`/`registerPrompt` as a shorthand; auto-wrapped with `z.object()`.\n * Zod schemas only — `z.object()` cannot wrap other Standard Schema libraries.\n */\nexport type ZodRawShape = Record<string, z.ZodType>;\n\n/** Infers the parsed-output type of a {@linkcode ZodRawShape}. */\nexport type InferRawShape<S extends ZodRawShape> = z.infer<z.ZodObject<S>>;\n\n/** {@linkcode ToolCallback} variant used when `inputSchema` is a {@linkcode ZodRawShape}. */\nexport type LegacyToolCallback<Args extends ZodRawShape | undefined> = Args extends ZodRawShape\n ? (\n args: InferRawShape<Args>,\n ctx: ServerContext\n ) => CallToolResult | InputRequiredResult | Promise<CallToolResult | InputRequiredResult>\n : (ctx: ServerContext) => CallToolResult | InputRequiredResult | Promise<CallToolResult | InputRequiredResult>;\n\n/** {@linkcode PromptCallback} variant used when `argsSchema` is a {@linkcode ZodRawShape}. */\nexport type LegacyPromptCallback<Args extends ZodRawShape | undefined> = Args extends ZodRawShape\n ? (\n args: InferRawShape<Args>,\n ctx: ServerContext\n ) => GetPromptResult | InputRequiredResult | Promise<GetPromptResult | InputRequiredResult>\n : (ctx: ServerContext) => GetPromptResult | InputRequiredResult | Promise<GetPromptResult | InputRequiredResult>;\n\nexport type BaseToolCallback<\n SendResultT extends Result,\n Ctx extends ServerContext,\n Args extends StandardSchemaWithJSON | undefined\n> = Args extends StandardSchemaWithJSON\n ? (args: StandardSchemaWithJSON.InferOutput<Args>, ctx: Ctx) => SendResultT | Promise<SendResultT>\n : (ctx: Ctx) => SendResultT | Promise<SendResultT>;\n\n/**\n * Callback for a tool handler registered with {@linkcode McpServer.registerTool}.\n */\nexport type ToolCallback<Args extends StandardSchemaWithJSON | undefined = undefined> = BaseToolCallback<\n CallToolResult | InputRequiredResult,\n ServerContext,\n Args\n>;\n\n/**\n * Tool handler callback type.\n */\nexport type AnyToolHandler<Args extends StandardSchemaWithJSON | undefined = undefined> = ToolCallback<Args>;\n\n/**\n * Internal executor type that encapsulates handler invocation with proper types.\n */\ntype ToolExecutor = (args: unknown, ctx: ServerContext) => Promise<CallToolResult | InputRequiredResult>;\n\nexport type RegisteredTool = {\n title?: string;\n description?: string;\n inputSchema?: StandardSchemaWithJSON;\n outputSchema?: StandardSchemaWithJSON;\n /**\n * @hidden\n * The converted JSON Schema of `outputSchema`, memoised at registration (and on\n * `update({outputSchema})`) so the `tools/call` handler passes the SAME advertised schema\n * `tools/list` emits to the wire codec's `projectCallToolResult` — the SEP-2106 `{result:…}`\n * wrap predicate follows the schema's root, never the runtime value shape. `undefined` when\n * no `outputSchema` is registered or its conversion threw (see {@link convertOutputSchemaJson}).\n */\n outputSchemaJson?: Record<string, unknown>;\n annotations?: ToolAnnotations;\n icons?: Icon[];\n execution?: ToolExecution;\n _meta?: Record<string, unknown>;\n handler: AnyToolHandler<StandardSchemaWithJSON | undefined>;\n /** @hidden */\n executor: ToolExecutor;\n enabled: boolean;\n enable(): void;\n disable(): void;\n update(updates: {\n name?: string | null;\n title?: string;\n description?: string;\n paramsSchema?: StandardSchemaWithJSON;\n outputSchema?: StandardSchemaWithJSON;\n annotations?: ToolAnnotations;\n icons?: Icon[];\n _meta?: Record<string, unknown>;\n callback?: ToolCallback<StandardSchemaWithJSON>;\n enabled?: boolean;\n }): void;\n remove(): void;\n};\n\n/**\n * Creates an executor that invokes the handler with the appropriate arguments.\n * When `inputSchema` is defined, the handler is called with `(args, ctx)`.\n * When `inputSchema` is undefined, the handler is called with just `(ctx)`.\n */\nfunction createToolExecutor(\n inputSchema: StandardSchemaWithJSON | undefined,\n handler: AnyToolHandler<StandardSchemaWithJSON | undefined>\n): ToolExecutor {\n if (inputSchema) {\n const callback = handler as ToolCallbackInternal;\n return async (args, ctx) => callback(args, ctx);\n }\n\n // When no inputSchema, call with just ctx (the handler expects (ctx) signature)\n const callback = handler as (\n ctx: ServerContext\n ) => CallToolResult | InputRequiredResult | Promise<CallToolResult | InputRequiredResult>;\n return async (_args, ctx) => callback(ctx);\n}\n\nconst EMPTY_OBJECT_JSON_SCHEMA = {\n type: 'object' as const,\n properties: {}\n};\n\n/**\n * Convert a registered `outputSchema` to JSON Schema, memoised on {@link RegisteredTool.outputSchemaJson}\n * so `tools/call` passes the SAME advertised schema to the wire codec's `projectCallToolResult` that\n * `tools/list` emits (and that the 2025 codec's `encodeResult('tools/list', …)` may wrap). A conversion\n * failure yields `undefined` so the failure surfaces where it always has (`tools/list`).\n */\nfunction convertOutputSchemaJson(outputSchema: StandardSchemaWithJSON | undefined): Record<string, unknown> | undefined {\n if (outputSchema === undefined) return undefined;\n try {\n return standardSchemaToJsonSchema(outputSchema, 'output');\n } catch {\n return undefined;\n }\n}\n\n/**\n * Additional, optional information for annotating a resource.\n */\nexport type ResourceMetadata = Omit<Resource, 'uri' | 'name'>;\n\n/**\n * Callback to list all resources matching a given template.\n */\nexport type ListResourcesCallback = (ctx: ServerContext) => ListResourcesResult | Promise<ListResourcesResult>;\n\n/**\n * Callback to read a resource at a given URI.\n */\nexport type ReadResourceCallback = (\n uri: URL,\n ctx: ServerContext\n) => ReadResourceResult | InputRequiredResult | Promise<ReadResourceResult | InputRequiredResult>;\n\nexport type RegisteredResource = {\n name: string;\n title?: string;\n metadata?: ResourceMetadata;\n /** Cache hint applied to this resource's `resources/read` results on the 2026-07-28 revision. */\n cacheHint?: CacheHint;\n readCallback: ReadResourceCallback;\n enabled: boolean;\n enable(): void;\n disable(): void;\n update(updates: {\n name?: string;\n title?: string;\n uri?: string | null;\n metadata?: ResourceMetadata;\n callback?: ReadResourceCallback;\n enabled?: boolean;\n }): void;\n remove(): void;\n};\n\n/**\n * Callback to read a resource at a given URI, following a filled-in URI template.\n */\nexport type ReadResourceTemplateCallback = (\n uri: URL,\n variables: Variables,\n ctx: ServerContext\n) => ReadResourceResult | InputRequiredResult | Promise<ReadResourceResult | InputRequiredResult>;\n\nexport type RegisteredResourceTemplate = {\n resourceTemplate: ResourceTemplate;\n title?: string;\n metadata?: ResourceMetadata;\n /** Cache hint applied to this template's `resources/read` results on the 2026-07-28 revision. */\n cacheHint?: CacheHint;\n readCallback: ReadResourceTemplateCallback;\n enabled: boolean;\n enable(): void;\n disable(): void;\n update(updates: {\n name?: string | null;\n title?: string;\n template?: ResourceTemplate;\n metadata?: ResourceMetadata;\n callback?: ReadResourceTemplateCallback;\n enabled?: boolean;\n }): void;\n remove(): void;\n};\n\nexport type PromptCallback<Args extends StandardSchemaWithJSON | undefined = undefined> = Args extends StandardSchemaWithJSON\n ? (\n args: StandardSchemaWithJSON.InferOutput<Args>,\n ctx: ServerContext\n ) => GetPromptResult | InputRequiredResult | Promise<GetPromptResult | InputRequiredResult>\n : (ctx: ServerContext) => GetPromptResult | InputRequiredResult | Promise<GetPromptResult | InputRequiredResult>;\n\n/**\n * Internal handler type that encapsulates parsing and callback invocation.\n * This allows type-safe handling without runtime type assertions.\n */\ntype PromptHandler = (args: Record<string, unknown> | undefined, ctx: ServerContext) => Promise<GetPromptResult | InputRequiredResult>;\n\ntype ToolCallbackInternal = (\n args: unknown,\n ctx: ServerContext\n) => CallToolResult | InputRequiredResult | Promise<CallToolResult | InputRequiredResult>;\n\nexport type RegisteredPrompt = {\n title?: string;\n description?: string;\n argsSchema?: StandardSchemaWithJSON;\n icons?: Icon[];\n _meta?: Record<string, unknown>;\n /** @hidden */\n handler: PromptHandler;\n enabled: boolean;\n enable(): void;\n disable(): void;\n update<Args extends StandardSchemaWithJSON>(updates: {\n name?: string | null;\n title?: string;\n description?: string;\n argsSchema?: Args;\n icons?: Icon[];\n _meta?: Record<string, unknown>;\n callback?: PromptCallback<Args>;\n enabled?: boolean;\n }): void;\n remove(): void;\n};\n\n/**\n * Creates a type-safe prompt handler that captures the schema and callback in a closure.\n * This eliminates the need for type assertions at the call site.\n */\nfunction createPromptHandler(\n name: string,\n argsSchema: StandardSchemaWithJSON | undefined,\n callback: PromptCallback<StandardSchemaWithJSON | undefined>\n): PromptHandler {\n if (argsSchema) {\n const typedCallback = callback as (\n args: unknown,\n ctx: ServerContext\n ) => GetPromptResult | InputRequiredResult | Promise<GetPromptResult | InputRequiredResult>;\n\n return async (args, ctx) => {\n const parseResult = await validateStandardSchema(argsSchema, args);\n if (!parseResult.success) {\n throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Invalid arguments for prompt ${name}: ${parseResult.error}`);\n }\n return typedCallback(parseResult.data, ctx);\n };\n } else {\n const typedCallback = callback as (\n ctx: ServerContext\n ) => GetPromptResult | InputRequiredResult | Promise<GetPromptResult | InputRequiredResult>;\n\n return async (_args, ctx) => {\n return typedCallback(ctx);\n };\n }\n}\n\nfunction createCompletionResult(suggestions: readonly unknown[]): CompleteResult {\n const values = suggestions.map(String).slice(0, 100);\n return {\n completion: {\n values,\n total: suggestions.length,\n hasMore: suggestions.length > 100\n }\n };\n}\n\nconst EMPTY_COMPLETION_RESULT: CompleteResult = {\n completion: {\n values: [],\n hasMore: false\n }\n};\n\n/** @internal Gets the shape of a Zod object schema */\nfunction getSchemaShape(schema: unknown): Record<string, unknown> | undefined {\n const candidate = schema as { shape?: unknown };\n if (candidate.shape && typeof candidate.shape === 'object') {\n return candidate.shape as Record<string, unknown>;\n }\n return undefined;\n}\n\n/** @internal Checks if a Zod schema is optional */\nfunction isOptionalSchema(schema: unknown): boolean {\n const candidate = schema as { type?: string } | null | undefined;\n return candidate?.type === 'optional';\n}\n\n/** @internal Unwraps an optional Zod schema */\nfunction unwrapOptionalSchema(schema: unknown): unknown {\n if (!isOptionalSchema(schema)) {\n return schema;\n }\n const candidate = schema as { def?: { innerType?: unknown } };\n return candidate.def?.inner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,QACb,OAAM,IAAI,cAAc,kBAAkB,eAAe,gCAAgC,KAAK,IAAI,YAAY,QAAQ;AAE1H,UAAO,cAAc,YAAY,MAAM,IAAI;;QAE5C;EACH,MAAM,gBAAgB;AAItB,SAAO,OAAO,OAAO,QAAQ;AACzB,UAAO,cAAc,IAAI;;;;AAKrC,SAAS,uBAAuB,aAAiD;AAE7E,QAAO,EACH,YAAY;EACR,QAHO,YAAY,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI;EAI5C,OAAO,YAAY;EACnB,SAAS,YAAY,SAAS;EACjC,EACJ;;AAGL,MAAMC,0BAA0C,EAC5C,YAAY;CACR,QAAQ,EAAE;CACV,SAAS;CACZ,EACJ;;AAGD,SAAS,eAAe,QAAsD;CAC1E,MAAM,YAAY;AAClB,KAAI,UAAU,SAAS,OAAO,UAAU,UAAU,SAC9C,QAAO,UAAU;;;AAMzB,SAAS,iBAAiB,QAA0B;AAEhD,QADkB,QACA,SAAS;;;AAI/B,SAAS,qBAAqB,QAA0B;AACpD,KAAI,CAAC,iBAAiB,OAAO,CACzB,QAAO;AAGX,QADkB,OACD,KAAK,aAAa"}
@@ -1,23 +0,0 @@
1
- const require_cfWorkerProvider = require('./cfWorkerProvider-BwbPzsdI.cjs');
2
-
3
- //#region src/shimsBrowser.ts
4
- /**
5
- * Stub process object for non-Node.js environments.
6
- * StdioServerTransport is not supported in Cloudflare Workers/browser environments.
7
- */
8
- function notSupported() {
9
- throw new Error("StdioServerTransport is not supported in this environment. Use StreamableHTTPServerTransport instead.");
10
- }
11
- const process = {
12
- get stdin() {
13
- return notSupported();
14
- },
15
- get stdout() {
16
- return notSupported();
17
- }
18
- };
19
-
20
- //#endregion
21
- exports.DefaultJsonSchemaValidator = require_cfWorkerProvider.CfWorkerJsonSchemaValidator;
22
- exports.process = process;
23
- //# sourceMappingURL=shimsBrowser.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shimsBrowser.cjs","names":[],"sources":["../src/shimsBrowser.ts"],"sourcesContent":["/**\n * Browser runtime shims for server package\n *\n * This file is selected via package.json export conditions when bundling for\n * browsers. It binds the same platform choices as the workerd shim (the\n * cfWorker validator, the process stub) WITHOUT the module-scope\n * `preloadSchemas()` call: in a browser, module evaluation is page load —\n * boot latency — so schema construction stays lazy, exactly like Node.\n */\nexport { CfWorkerJsonSchemaValidator as DefaultJsonSchemaValidator } from '@modelcontextprotocol/core-internal/validators/cfWorker';\n\n/**\n * Stub process object for non-Node.js environments.\n * StdioServerTransport is not supported in Cloudflare Workers/browser environments.\n */\nfunction notSupported(): never {\n throw new Error('StdioServerTransport is not supported in this environment. Use StreamableHTTPServerTransport instead.');\n}\n\nexport const process = {\n get stdin(): never {\n return notSupported();\n },\n get stdout(): never {\n return notSupported();\n }\n};\n"],"mappings":";;;;;;;AAeA,SAAS,eAAsB;AAC3B,OAAM,IAAI,MAAM,wGAAwG;;AAG5H,MAAa,UAAU;CACnB,IAAI,QAAe;AACf,SAAO,cAAc;;CAEzB,IAAI,SAAgB;AAChB,SAAO,cAAc;;CAE5B"}
@@ -1,11 +0,0 @@
1
- import { t as CfWorkerJsonSchemaValidator } from "./cfWorkerProvider-doTkZbTr.cjs";
2
-
3
- //#region src/shimsBrowser.d.ts
4
-
5
- declare const process: {
6
- readonly stdin: never;
7
- readonly stdout: never;
8
- };
9
- //#endregion
10
- export { CfWorkerJsonSchemaValidator as DefaultJsonSchemaValidator, process };
11
- //# sourceMappingURL=shimsBrowser.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shimsBrowser.d.cts","names":[],"sources":["../src/shimsBrowser.ts"],"sourcesContent":[],"mappings":";;;;cAmBa"}
@@ -1,11 +0,0 @@
1
- import { t as CfWorkerJsonSchemaValidator } from "./cfWorkerProvider-C03CSigr.mjs";
2
-
3
- //#region src/shimsBrowser.d.ts
4
-
5
- declare const process: {
6
- readonly stdin: never;
7
- readonly stdout: never;
8
- };
9
- //#endregion
10
- export { CfWorkerJsonSchemaValidator as DefaultJsonSchemaValidator, process };
11
- //# sourceMappingURL=shimsBrowser.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shimsBrowser.d.mts","names":[],"sources":["../src/shimsBrowser.ts"],"sourcesContent":[],"mappings":";;;;cAmBa"}
@@ -1,22 +0,0 @@
1
- import { t as CfWorkerJsonSchemaValidator } from "./cfWorkerProvider-p3WaZPqB.mjs";
2
-
3
- //#region src/shimsBrowser.ts
4
- /**
5
- * Stub process object for non-Node.js environments.
6
- * StdioServerTransport is not supported in Cloudflare Workers/browser environments.
7
- */
8
- function notSupported() {
9
- throw new Error("StdioServerTransport is not supported in this environment. Use StreamableHTTPServerTransport instead.");
10
- }
11
- const process = {
12
- get stdin() {
13
- return notSupported();
14
- },
15
- get stdout() {
16
- return notSupported();
17
- }
18
- };
19
-
20
- //#endregion
21
- export { CfWorkerJsonSchemaValidator as DefaultJsonSchemaValidator, process };
22
- //# sourceMappingURL=shimsBrowser.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shimsBrowser.mjs","names":[],"sources":["../src/shimsBrowser.ts"],"sourcesContent":["/**\n * Browser runtime shims for server package\n *\n * This file is selected via package.json export conditions when bundling for\n * browsers. It binds the same platform choices as the workerd shim (the\n * cfWorker validator, the process stub) WITHOUT the module-scope\n * `preloadSchemas()` call: in a browser, module evaluation is page load —\n * boot latency — so schema construction stays lazy, exactly like Node.\n */\nexport { CfWorkerJsonSchemaValidator as DefaultJsonSchemaValidator } from '@modelcontextprotocol/core-internal/validators/cfWorker';\n\n/**\n * Stub process object for non-Node.js environments.\n * StdioServerTransport is not supported in Cloudflare Workers/browser environments.\n */\nfunction notSupported(): never {\n throw new Error('StdioServerTransport is not supported in this environment. Use StreamableHTTPServerTransport instead.');\n}\n\nexport const process = {\n get stdin(): never {\n return notSupported();\n },\n get stdout(): never {\n return notSupported();\n }\n};\n"],"mappings":";;;;;;;AAeA,SAAS,eAAsB;AAC3B,OAAM,IAAI,MAAM,wGAAwG;;AAG5H,MAAa,UAAU;CACnB,IAAI,QAAe;AACf,SAAO,cAAc;;CAEzB,IAAI,SAAgB;AAChB,SAAO,cAAc;;CAE5B"}