mcp-use 2.0.0-beta.2 → 2.0.0-beta.21

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 (1081) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/bin/args.d.ts +10 -0
  3. package/dist/bin/args.d.ts.map +1 -1
  4. package/dist/bin/main.d.ts +8 -0
  5. package/dist/bin/main.d.ts.map +1 -1
  6. package/dist/bin/start.d.ts.map +1 -1
  7. package/dist/bin.js +22 -6
  8. package/dist/bin.js.map +1 -1
  9. package/dist/branding.d.ts +82 -0
  10. package/dist/branding.d.ts.map +1 -0
  11. package/dist/chunk-22Y3WIJP.js +62 -0
  12. package/dist/chunk-22Y3WIJP.js.map +1 -0
  13. package/dist/chunk-EAPJUSK7.js +98 -0
  14. package/dist/chunk-EAPJUSK7.js.map +1 -0
  15. package/dist/chunk-FC2Z2VFO.js +99 -0
  16. package/dist/chunk-FC2Z2VFO.js.map +1 -0
  17. package/dist/{public-route-7IK5D7V7.js → chunk-G62AMJHS.js} +17 -12
  18. package/dist/chunk-G62AMJHS.js.map +1 -0
  19. package/dist/{chunk-UDLRVMML.js → chunk-IGVT7UV6.js} +94 -23
  20. package/dist/chunk-IGVT7UV6.js.map +1 -0
  21. package/dist/chunk-KIZ72TIK.js +38 -0
  22. package/dist/chunk-KIZ72TIK.js.map +1 -0
  23. package/dist/{chunk-Q4PUTBMV.js → chunk-QBAJXPRQ.js} +21 -1
  24. package/dist/chunk-QBAJXPRQ.js.map +1 -0
  25. package/dist/{chunk-SFI2T6TE.js → chunk-QUUANIE4.js} +34 -80
  26. package/dist/chunk-QUUANIE4.js.map +1 -0
  27. package/dist/{chunk-RQRT27Q3.js → chunk-RHITI5QM.js} +190 -16
  28. package/dist/chunk-RHITI5QM.js.map +1 -0
  29. package/dist/chunk-Z326HADF.js +82 -0
  30. package/dist/chunk-Z326HADF.js.map +1 -0
  31. package/dist/chunk-ZJJD33SF.js +741 -0
  32. package/dist/chunk-ZJJD33SF.js.map +1 -0
  33. package/dist/cli/build.d.ts +21 -15
  34. package/dist/cli/build.d.ts.map +1 -1
  35. package/dist/cli/dev.d.ts +4 -0
  36. package/dist/cli/dev.d.ts.map +1 -1
  37. package/dist/cli/entry.d.ts +1 -1
  38. package/dist/cli/entry.d.ts.map +1 -1
  39. package/dist/cli/mcp-env-declaration.d.ts +20 -0
  40. package/dist/cli/mcp-env-declaration.d.ts.map +1 -0
  41. package/dist/cli/next-compat.d.ts +21 -0
  42. package/dist/cli/next-compat.d.ts.map +1 -0
  43. package/dist/cli/next-server-shims.d.ts +52 -0
  44. package/dist/cli/next-server-shims.d.ts.map +1 -0
  45. package/dist/cli/port.d.ts.map +1 -1
  46. package/dist/cli/tunnel.d.ts.map +1 -1
  47. package/dist/cli/views-bindings.d.ts +9 -0
  48. package/dist/cli/views-bindings.d.ts.map +1 -1
  49. package/dist/cli/views-plugin.d.ts.map +1 -1
  50. package/dist/cli/views.d.ts +23 -8
  51. package/dist/cli/views.d.ts.map +1 -1
  52. package/dist/cli/workspace.d.ts +4 -9
  53. package/dist/cli/workspace.d.ts.map +1 -1
  54. package/dist/commands/build.js +171 -34
  55. package/dist/commands/build.js.map +1 -1
  56. package/dist/commands/client.d.ts.map +1 -1
  57. package/dist/commands/client.js +1 -1
  58. package/dist/commands/dev.js +145 -40
  59. package/dist/commands/dev.js.map +1 -1
  60. package/dist/commands/load-client.d.ts +9 -2
  61. package/dist/commands/load-client.d.ts.map +1 -1
  62. package/dist/commands/screenshot.js +1 -1
  63. package/dist/commands/start.js +5 -1
  64. package/dist/commands/start.js.map +1 -1
  65. package/dist/completable.d.ts +9 -0
  66. package/dist/completable.d.ts.map +1 -1
  67. package/dist/config.d.ts +125 -4
  68. package/dist/config.d.ts.map +1 -1
  69. package/dist/fetch-app.d.ts +43 -0
  70. package/dist/fetch-app.d.ts.map +1 -1
  71. package/dist/index.d.ts +20 -5
  72. package/dist/index.d.ts.map +1 -1
  73. package/dist/index.js +1318 -251
  74. package/dist/index.js.map +1 -1
  75. package/dist/inspector-shell.d.ts +19 -6
  76. package/dist/inspector-shell.d.ts.map +1 -1
  77. package/dist/internal/resource-completion.js +7 -0
  78. package/dist/internal/resource-completion.js.map +1 -0
  79. package/dist/landing-handler-WE66NIGB.js +37 -0
  80. package/dist/landing-handler-WE66NIGB.js.map +1 -0
  81. package/dist/landing-handler.d.ts +24 -0
  82. package/dist/landing-handler.d.ts.map +1 -0
  83. package/dist/landing.d.ts +67 -0
  84. package/dist/landing.d.ts.map +1 -0
  85. package/dist/landing.js +7 -0
  86. package/dist/landing.js.map +1 -0
  87. package/dist/mcp-proxy-5YQJJ4RT.js +282 -0
  88. package/dist/mcp-proxy-5YQJJ4RT.js.map +1 -0
  89. package/dist/mcp-proxy.d.ts +153 -0
  90. package/dist/mcp-proxy.d.ts.map +1 -0
  91. package/dist/middleware/cors.d.ts +11 -0
  92. package/dist/middleware/cors.d.ts.map +1 -0
  93. package/dist/middleware/mcp-middleware.d.ts +179 -0
  94. package/dist/middleware/mcp-middleware.d.ts.map +1 -0
  95. package/dist/mount-mcp.d.ts +0 -4
  96. package/dist/mount-mcp.d.ts.map +1 -1
  97. package/dist/next/config.d.ts +39 -0
  98. package/dist/next/config.d.ts.map +1 -0
  99. package/dist/next/handler.d.ts +17 -0
  100. package/dist/next/handler.d.ts.map +1 -0
  101. package/dist/next/index.d.ts +5 -0
  102. package/dist/next/index.d.ts.map +1 -0
  103. package/dist/next/index.js +172 -0
  104. package/dist/next/index.js.map +1 -0
  105. package/dist/next-server-shims.js +108 -0
  106. package/dist/next-server-shims.js.map +1 -0
  107. package/dist/oauth/better-auth.d.ts +29 -0
  108. package/dist/oauth/better-auth.d.ts.map +1 -0
  109. package/dist/oauth/better-auth.js +76 -0
  110. package/dist/oauth/better-auth.js.map +1 -0
  111. package/dist/oauth/index.js +2 -1
  112. package/dist/public-route-RWJVJQTX.js +9 -0
  113. package/dist/public-route-RWJVJQTX.js.map +1 -0
  114. package/dist/react/components/theme-provider.d.ts +3 -0
  115. package/dist/react/components/theme-provider.d.ts.map +1 -1
  116. package/dist/react/hooks/use-files.d.ts +25 -0
  117. package/dist/react/hooks/use-files.d.ts.map +1 -0
  118. package/dist/react/hooks/use-host-context.d.ts +5 -0
  119. package/dist/react/hooks/use-host-context.d.ts.map +1 -1
  120. package/dist/react/index.d.ts +2 -0
  121. package/dist/react/index.d.ts.map +1 -1
  122. package/dist/react/index.js +124 -3
  123. package/dist/react/index.js.map +1 -1
  124. package/dist/react/runtime/view-runtime.d.ts +23 -0
  125. package/dist/react/runtime/view-runtime.d.ts.map +1 -1
  126. package/dist/react/types/file-types.d.ts +16 -0
  127. package/dist/react/types/file-types.d.ts.map +1 -0
  128. package/dist/react/types/register.d.ts +1 -1
  129. package/dist/react/types/register.d.ts.map +1 -1
  130. package/dist/resource-completion.d.ts +12 -0
  131. package/dist/resource-completion.d.ts.map +1 -0
  132. package/dist/resources.d.ts +59 -4
  133. package/dist/resources.d.ts.map +1 -1
  134. package/dist/server.d.ts +120 -7
  135. package/dist/server.d.ts.map +1 -1
  136. package/dist/tools.d.ts +21 -10
  137. package/dist/tools.d.ts.map +1 -1
  138. package/dist/views/constants.d.ts +1 -1
  139. package/dist/views/csp-env.d.ts +37 -0
  140. package/dist/views/csp-env.d.ts.map +1 -0
  141. package/dist/views/document.d.ts +30 -13
  142. package/dist/views/document.d.ts.map +1 -1
  143. package/dist/views/index.d.ts +4 -3
  144. package/dist/views/index.d.ts.map +1 -1
  145. package/dist/views/origin.d.ts +37 -9
  146. package/dist/views/origin.d.ts.map +1 -1
  147. package/dist/views/public-route.d.ts +10 -4
  148. package/dist/views/public-route.d.ts.map +1 -1
  149. package/dist/views/register.d.ts +1 -1
  150. package/dist/views/routes.d.ts +20 -1
  151. package/dist/views/routes.d.ts.map +1 -1
  152. package/dist/views/types.d.ts +23 -14
  153. package/dist/views/types.d.ts.map +1 -1
  154. package/dist/views/wire.d.ts +26 -36
  155. package/dist/views/wire.d.ts.map +1 -1
  156. package/node_modules/@modelcontextprotocol/client/LICENSE +216 -0
  157. package/node_modules/@modelcontextprotocol/client/README.md +26 -0
  158. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-Asx17_Co.mjs +7069 -0
  159. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-Asx17_Co.mjs.map +1 -0
  160. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-B7GnTXYx.d.mts +1054 -0
  161. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-B7GnTXYx.d.mts.map +1 -0
  162. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-B_4czhCS.d.cts +1054 -0
  163. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-B_4czhCS.d.cts.map +1 -0
  164. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-DNzBrkxq.cjs +7086 -0
  165. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-DNzBrkxq.cjs.map +1 -0
  166. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-D9GAttn8.d.cts +59 -0
  167. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-D9GAttn8.d.cts.map +1 -0
  168. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-DbU8BxXO.mjs +970 -0
  169. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-DbU8BxXO.mjs.map +1 -0
  170. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-Djgwc46-.cjs +976 -0
  171. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-Djgwc46-.cjs.map +1 -0
  172. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-Xtj52JOa.d.mts +59 -0
  173. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-Xtj52JOa.d.mts.map +1 -0
  174. package/node_modules/@modelcontextprotocol/client/dist/chunk-Bnu9O96Y.cjs +60 -0
  175. package/node_modules/@modelcontextprotocol/client/dist/chunk-Br0eD_fh.mjs +42 -0
  176. package/node_modules/@modelcontextprotocol/client/dist/index-ZagFkUbt.d.mts +2675 -0
  177. package/node_modules/@modelcontextprotocol/client/dist/index-ZagFkUbt.d.mts.map +1 -0
  178. package/node_modules/@modelcontextprotocol/client/dist/index-gN3EXmil.d.cts +2678 -0
  179. package/node_modules/@modelcontextprotocol/client/dist/index-gN3EXmil.d.cts.map +1 -0
  180. package/node_modules/@modelcontextprotocol/client/dist/index.cjs +5427 -0
  181. package/node_modules/@modelcontextprotocol/client/dist/index.cjs.map +1 -0
  182. package/node_modules/@modelcontextprotocol/client/dist/index.d.cts +3196 -0
  183. package/node_modules/@modelcontextprotocol/client/dist/index.d.cts.map +1 -0
  184. package/node_modules/@modelcontextprotocol/client/dist/index.d.mts +3196 -0
  185. package/node_modules/@modelcontextprotocol/client/dist/index.d.mts.map +1 -0
  186. package/node_modules/@modelcontextprotocol/client/dist/index.mjs +5224 -0
  187. package/node_modules/@modelcontextprotocol/client/dist/index.mjs.map +1 -0
  188. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.cjs +14 -0
  189. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.cjs.map +1 -0
  190. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.cts +13 -0
  191. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.cts.map +1 -0
  192. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.mts +13 -0
  193. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.mts.map +1 -0
  194. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.mjs +13 -0
  195. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.mjs.map +1 -0
  196. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.cjs +14 -0
  197. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.cjs.map +1 -0
  198. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.cts +13 -0
  199. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.cts.map +1 -0
  200. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.mts +13 -0
  201. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.mts.map +1 -0
  202. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.mjs +13 -0
  203. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.mjs.map +1 -0
  204. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.cjs +21 -0
  205. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.cjs.map +1 -0
  206. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.cts +13 -0
  207. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.cts.map +1 -0
  208. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.mts +13 -0
  209. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.mts.map +1 -0
  210. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.mjs +20 -0
  211. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.mjs.map +1 -0
  212. package/node_modules/@modelcontextprotocol/client/dist/src-BzzZSQyL.cjs +7331 -0
  213. package/node_modules/@modelcontextprotocol/client/dist/src-BzzZSQyL.cjs.map +1 -0
  214. package/node_modules/@modelcontextprotocol/client/dist/src-DGeA9On3.mjs +6963 -0
  215. package/node_modules/@modelcontextprotocol/client/dist/src-DGeA9On3.mjs.map +1 -0
  216. package/node_modules/@modelcontextprotocol/client/dist/stdio.cjs +181 -0
  217. package/node_modules/@modelcontextprotocol/client/dist/stdio.cjs.map +1 -0
  218. package/node_modules/@modelcontextprotocol/client/dist/stdio.d.cts +87 -0
  219. package/node_modules/@modelcontextprotocol/client/dist/stdio.d.cts.map +1 -0
  220. package/node_modules/@modelcontextprotocol/client/dist/stdio.d.mts +87 -0
  221. package/node_modules/@modelcontextprotocol/client/dist/stdio.d.mts.map +1 -0
  222. package/node_modules/@modelcontextprotocol/client/dist/stdio.mjs +176 -0
  223. package/node_modules/@modelcontextprotocol/client/dist/stdio.mjs.map +1 -0
  224. package/node_modules/@modelcontextprotocol/client/dist/types-BDNQEPSs.d.mts +1099 -0
  225. package/node_modules/@modelcontextprotocol/client/dist/types-BDNQEPSs.d.mts.map +1 -0
  226. package/node_modules/@modelcontextprotocol/client/dist/types-DsbMXNFL.d.cts +1099 -0
  227. package/node_modules/@modelcontextprotocol/client/dist/types-DsbMXNFL.d.cts.map +1 -0
  228. package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.cjs +5 -0
  229. package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.d.cts +2 -0
  230. package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.d.mts +2 -0
  231. package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.mjs +3 -0
  232. package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.cjs +3 -0
  233. package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.d.cts +2 -0
  234. package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.d.mts +2 -0
  235. package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.mjs +3 -0
  236. package/node_modules/@modelcontextprotocol/client/package.json +166 -0
  237. package/node_modules/@modelcontextprotocol/core/LICENSE +216 -0
  238. package/node_modules/@modelcontextprotocol/core/README.md +40 -0
  239. package/node_modules/@modelcontextprotocol/core/dist/auth-BUWfrB3C.d.cts +8198 -0
  240. package/node_modules/@modelcontextprotocol/core/dist/auth-BUWfrB3C.d.cts.map +1 -0
  241. package/node_modules/@modelcontextprotocol/core/dist/auth-CEFpHq32.cjs +2862 -0
  242. package/node_modules/@modelcontextprotocol/core/dist/auth-CEFpHq32.cjs.map +1 -0
  243. package/node_modules/@modelcontextprotocol/core/dist/auth-CNbu4K4a.d.mts +8198 -0
  244. package/node_modules/@modelcontextprotocol/core/dist/auth-CNbu4K4a.d.mts.map +1 -0
  245. package/node_modules/@modelcontextprotocol/core/dist/auth-DFgbUATV.mjs +1653 -0
  246. package/node_modules/@modelcontextprotocol/core/dist/auth-DFgbUATV.mjs.map +1 -0
  247. package/node_modules/@modelcontextprotocol/core/dist/index.cjs +174 -0
  248. package/node_modules/@modelcontextprotocol/core/dist/index.d.cts +2 -0
  249. package/node_modules/@modelcontextprotocol/core/dist/index.d.mts +2 -0
  250. package/node_modules/@modelcontextprotocol/core/dist/index.mjs +3 -0
  251. package/node_modules/@modelcontextprotocol/core/dist/internal.cjs +199 -0
  252. package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts +87 -0
  253. package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts.map +1 -0
  254. package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts +87 -0
  255. package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts.map +1 -0
  256. package/node_modules/@modelcontextprotocol/core/dist/internal.mjs +3 -0
  257. package/node_modules/@modelcontextprotocol/core/package.json +85 -0
  258. package/node_modules/jose/LICENSE.md +21 -0
  259. package/node_modules/jose/README.md +153 -0
  260. package/node_modules/jose/dist/types/index.d.ts +55 -0
  261. package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +31 -0
  262. package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +65 -0
  263. package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +31 -0
  264. package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +83 -0
  265. package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +31 -0
  266. package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +74 -0
  267. package/node_modules/jose/dist/types/jwk/embedded.d.ts +17 -0
  268. package/node_modules/jose/dist/types/jwk/thumbprint.d.ts +32 -0
  269. package/node_modules/jose/dist/types/jwks/local.d.ts +29 -0
  270. package/node_modules/jose/dist/types/jwks/remote.d.ts +237 -0
  271. package/node_modules/jose/dist/types/jws/compact/sign.d.ts +36 -0
  272. package/node_modules/jose/dist/types/jws/compact/verify.d.ts +33 -0
  273. package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +42 -0
  274. package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +33 -0
  275. package/node_modules/jose/dist/types/jws/general/sign.d.ts +53 -0
  276. package/node_modules/jose/dist/types/jws/general/verify.d.ts +33 -0
  277. package/node_modules/jose/dist/types/jwt/decrypt.d.ts +35 -0
  278. package/node_modules/jose/dist/types/jwt/encrypt.d.ts +91 -0
  279. package/node_modules/jose/dist/types/jwt/sign.d.ts +43 -0
  280. package/node_modules/jose/dist/types/jwt/unsecured.d.ts +43 -0
  281. package/node_modules/jose/dist/types/jwt/verify.d.ts +37 -0
  282. package/node_modules/jose/dist/types/key/export.d.ts +33 -0
  283. package/node_modules/jose/dist/types/key/generate_key_pair.d.ts +47 -0
  284. package/node_modules/jose/dist/types/key/generate_secret.d.ts +35 -0
  285. package/node_modules/jose/dist/types/key/import.d.ts +83 -0
  286. package/node_modules/jose/dist/types/types.d.ts +841 -0
  287. package/node_modules/jose/dist/types/util/base64url.d.ts +9 -0
  288. package/node_modules/jose/dist/types/util/decode_jwt.d.ts +18 -0
  289. package/node_modules/jose/dist/types/util/decode_protected_header.d.ts +17 -0
  290. package/node_modules/jose/dist/types/util/errors.d.ts +213 -0
  291. package/node_modules/jose/dist/webapi/index.js +32 -0
  292. package/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +27 -0
  293. package/node_modules/jose/dist/webapi/jwe/compact/encrypt.js +27 -0
  294. package/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +165 -0
  295. package/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +169 -0
  296. package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +31 -0
  297. package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +187 -0
  298. package/node_modules/jose/dist/webapi/jwk/embedded.js +17 -0
  299. package/node_modules/jose/dist/webapi/jwk/thumbprint.js +68 -0
  300. package/node_modules/jose/dist/webapi/jwks/local.js +119 -0
  301. package/node_modules/jose/dist/webapi/jwks/remote.js +179 -0
  302. package/node_modules/jose/dist/webapi/jws/compact/sign.js +18 -0
  303. package/node_modules/jose/dist/webapi/jws/compact/verify.js +21 -0
  304. package/node_modules/jose/dist/webapi/jws/flattened/sign.js +92 -0
  305. package/node_modules/jose/dist/webapi/jws/flattened/verify.js +120 -0
  306. package/node_modules/jose/dist/webapi/jws/general/sign.js +73 -0
  307. package/node_modules/jose/dist/webapi/jws/general/verify.js +24 -0
  308. package/node_modules/jose/dist/webapi/jwt/decrypt.js +23 -0
  309. package/node_modules/jose/dist/webapi/jwt/encrypt.js +108 -0
  310. package/node_modules/jose/dist/webapi/jwt/sign.js +52 -0
  311. package/node_modules/jose/dist/webapi/jwt/unsecured.js +63 -0
  312. package/node_modules/jose/dist/webapi/jwt/verify.js +15 -0
  313. package/node_modules/jose/dist/webapi/key/export.js +11 -0
  314. package/node_modules/jose/dist/webapi/key/generate_key_pair.js +97 -0
  315. package/node_modules/jose/dist/webapi/key/generate_secret.js +40 -0
  316. package/node_modules/jose/dist/webapi/key/import.js +57 -0
  317. package/node_modules/jose/dist/webapi/lib/aesgcmkw.js +16 -0
  318. package/node_modules/jose/dist/webapi/lib/aeskw.js +25 -0
  319. package/node_modules/jose/dist/webapi/lib/asn1.js +243 -0
  320. package/node_modules/jose/dist/webapi/lib/base64.js +22 -0
  321. package/node_modules/jose/dist/webapi/lib/buffer_utils.js +43 -0
  322. package/node_modules/jose/dist/webapi/lib/cek.js +19 -0
  323. package/node_modules/jose/dist/webapi/lib/check_cek_length.js +7 -0
  324. package/node_modules/jose/dist/webapi/lib/check_iv_length.js +7 -0
  325. package/node_modules/jose/dist/webapi/lib/check_key_length.js +8 -0
  326. package/node_modules/jose/dist/webapi/lib/check_key_type.js +122 -0
  327. package/node_modules/jose/dist/webapi/lib/crypto_key.js +143 -0
  328. package/node_modules/jose/dist/webapi/lib/decrypt.js +106 -0
  329. package/node_modules/jose/dist/webapi/lib/decrypt_key_management.js +127 -0
  330. package/node_modules/jose/dist/webapi/lib/digest.js +4 -0
  331. package/node_modules/jose/dist/webapi/lib/ecdhes.js +52 -0
  332. package/node_modules/jose/dist/webapi/lib/encrypt.js +74 -0
  333. package/node_modules/jose/dist/webapi/lib/encrypt_key_management.js +92 -0
  334. package/node_modules/jose/dist/webapi/lib/get_sign_verify_key.js +12 -0
  335. package/node_modules/jose/dist/webapi/lib/invalid_key_input.js +27 -0
  336. package/node_modules/jose/dist/webapi/lib/is_disjoint.js +21 -0
  337. package/node_modules/jose/dist/webapi/lib/is_jwk.js +6 -0
  338. package/node_modules/jose/dist/webapi/lib/is_key_like.js +17 -0
  339. package/node_modules/jose/dist/webapi/lib/is_object.js +14 -0
  340. package/node_modules/jose/dist/webapi/lib/iv.js +19 -0
  341. package/node_modules/jose/dist/webapi/lib/jwk_to_key.js +109 -0
  342. package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +238 -0
  343. package/node_modules/jose/dist/webapi/lib/key_to_jwk.js +31 -0
  344. package/node_modules/jose/dist/webapi/lib/normalize_key.js +176 -0
  345. package/node_modules/jose/dist/webapi/lib/pbes2kw.js +39 -0
  346. package/node_modules/jose/dist/webapi/lib/private_symbols.js +1 -0
  347. package/node_modules/jose/dist/webapi/lib/rsaes.js +24 -0
  348. package/node_modules/jose/dist/webapi/lib/sign.js +9 -0
  349. package/node_modules/jose/dist/webapi/lib/subtle_dsa.js +31 -0
  350. package/node_modules/jose/dist/webapi/lib/validate_algorithms.js +10 -0
  351. package/node_modules/jose/dist/webapi/lib/validate_crit.js +33 -0
  352. package/node_modules/jose/dist/webapi/lib/verify.js +14 -0
  353. package/node_modules/jose/dist/webapi/util/base64url.js +30 -0
  354. package/node_modules/jose/dist/webapi/util/decode_jwt.js +32 -0
  355. package/node_modules/jose/dist/webapi/util/decode_protected_header.js +34 -0
  356. package/node_modules/jose/dist/webapi/util/errors.js +99 -0
  357. package/node_modules/jose/package.json +200 -0
  358. package/node_modules/zod/LICENSE +21 -0
  359. package/node_modules/zod/README.md +191 -0
  360. package/node_modules/zod/index.cjs +33 -0
  361. package/node_modules/zod/index.d.cts +4 -0
  362. package/node_modules/zod/index.d.ts +4 -0
  363. package/node_modules/zod/index.js +4 -0
  364. package/node_modules/zod/locales/index.cjs +17 -0
  365. package/node_modules/zod/locales/index.d.cts +1 -0
  366. package/node_modules/zod/locales/index.d.ts +1 -0
  367. package/node_modules/zod/locales/index.js +1 -0
  368. package/node_modules/zod/locales/package.json +7 -0
  369. package/node_modules/zod/mini/index.cjs +32 -0
  370. package/node_modules/zod/mini/index.d.cts +3 -0
  371. package/node_modules/zod/mini/index.d.ts +3 -0
  372. package/node_modules/zod/mini/index.js +3 -0
  373. package/node_modules/zod/mini/package.json +7 -0
  374. package/node_modules/zod/package.json +135 -0
  375. package/node_modules/zod/src/index.ts +4 -0
  376. package/node_modules/zod/src/locales/index.ts +1 -0
  377. package/node_modules/zod/src/mini/index.ts +3 -0
  378. package/node_modules/zod/src/v3/ZodError.ts +330 -0
  379. package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  380. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  381. package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
  382. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  383. package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
  384. package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  385. package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  386. package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
  387. package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
  388. package/node_modules/zod/src/v3/errors.ts +13 -0
  389. package/node_modules/zod/src/v3/external.ts +6 -0
  390. package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  391. package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  392. package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  393. package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  394. package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  395. package/node_modules/zod/src/v3/helpers/util.ts +224 -0
  396. package/node_modules/zod/src/v3/index.ts +4 -0
  397. package/node_modules/zod/src/v3/locales/en.ts +124 -0
  398. package/node_modules/zod/src/v3/standard-schema.ts +113 -0
  399. package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
  400. package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  401. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  402. package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
  403. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  404. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  405. package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
  406. package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  407. package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
  408. package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
  409. package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  410. package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
  411. package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
  412. package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
  413. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  414. package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
  415. package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
  416. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  417. package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
  418. package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
  419. package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  420. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  421. package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
  422. package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
  423. package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  424. package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  425. package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  426. package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  427. package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
  428. package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
  429. package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
  430. package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  431. package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
  432. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  433. package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  434. package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
  435. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  436. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  437. package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
  438. package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
  439. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  440. package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
  441. package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
  442. package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  443. package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  444. package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  445. package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  446. package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
  447. package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  448. package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
  449. package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  450. package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
  451. package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  452. package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
  453. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  454. package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
  455. package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  456. package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  457. package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
  458. package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
  459. package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
  460. package/node_modules/zod/src/v3/types.ts +5138 -0
  461. package/node_modules/zod/src/v4/classic/checks.ts +32 -0
  462. package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
  463. package/node_modules/zod/src/v4/classic/compat.ts +70 -0
  464. package/node_modules/zod/src/v4/classic/errors.ts +82 -0
  465. package/node_modules/zod/src/v4/classic/external.ts +52 -0
  466. package/node_modules/zod/src/v4/classic/from-json-schema.ts +659 -0
  467. package/node_modules/zod/src/v4/classic/index.ts +5 -0
  468. package/node_modules/zod/src/v4/classic/iso.ts +90 -0
  469. package/node_modules/zod/src/v4/classic/parse.ts +82 -0
  470. package/node_modules/zod/src/v4/classic/schemas.ts +2672 -0
  471. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  472. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
  473. package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  474. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +216 -0
  475. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  476. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  477. package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  478. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  479. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
  480. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +326 -0
  481. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  482. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
  483. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +703 -0
  484. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  485. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
  486. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  487. package/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
  488. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
  489. package/node_modules/zod/src/v4/classic/tests/default.test.ts +409 -0
  490. package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
  491. package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  492. package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +197 -0
  493. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +694 -0
  494. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  495. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +807 -0
  496. package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  497. package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
  498. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
  499. package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
  500. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +895 -0
  501. package/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
  502. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  503. package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +39 -0
  504. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
  505. package/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
  506. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
  507. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
  508. package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +46 -0
  509. package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
  510. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  511. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
  512. package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
  513. package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
  514. package/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
  515. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  516. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  517. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
  518. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  519. package/node_modules/zod/src/v4/classic/tests/number.test.ts +325 -0
  520. package/node_modules/zod/src/v4/classic/tests/object.test.ts +717 -0
  521. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +333 -0
  522. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +450 -0
  523. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
  524. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
  525. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
  526. package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +26 -0
  527. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +351 -0
  528. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  529. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  530. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  531. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  532. package/node_modules/zod/src/v4/classic/tests/record.test.ts +717 -0
  533. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +631 -0
  534. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +633 -0
  535. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
  536. package/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
  537. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
  538. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
  539. package/node_modules/zod/src/v4/classic/tests/string.test.ts +1224 -0
  540. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
  541. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
  542. package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
  543. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +3125 -0
  544. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +378 -0
  545. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +496 -0
  546. package/node_modules/zod/src/v4/classic/tests/union.test.ts +273 -0
  547. package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
  548. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  549. package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  550. package/node_modules/zod/src/v4/core/api.ts +1823 -0
  551. package/node_modules/zod/src/v4/core/checks.ts +1293 -0
  552. package/node_modules/zod/src/v4/core/config.ts +15 -0
  553. package/node_modules/zod/src/v4/core/core.ts +153 -0
  554. package/node_modules/zod/src/v4/core/doc.ts +44 -0
  555. package/node_modules/zod/src/v4/core/errors.ts +455 -0
  556. package/node_modules/zod/src/v4/core/index.ts +16 -0
  557. package/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
  558. package/node_modules/zod/src/v4/core/json-schema-processors.ts +666 -0
  559. package/node_modules/zod/src/v4/core/json-schema.ts +147 -0
  560. package/node_modules/zod/src/v4/core/parse.ts +195 -0
  561. package/node_modules/zod/src/v4/core/regexes.ts +190 -0
  562. package/node_modules/zod/src/v4/core/registries.ts +105 -0
  563. package/node_modules/zod/src/v4/core/schemas.ts +4730 -0
  564. package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
  565. package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
  566. package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  567. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  568. package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +215 -0
  569. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  570. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
  571. package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
  572. package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
  573. package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
  574. package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
  575. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  576. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  577. package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
  578. package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
  579. package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
  580. package/node_modules/zod/src/v4/core/to-json-schema.ts +622 -0
  581. package/node_modules/zod/src/v4/core/util.ts +983 -0
  582. package/node_modules/zod/src/v4/core/versions.ts +5 -0
  583. package/node_modules/zod/src/v4/core/zsf.ts +323 -0
  584. package/node_modules/zod/src/v4/index.ts +4 -0
  585. package/node_modules/zod/src/v4/locales/ar.ts +115 -0
  586. package/node_modules/zod/src/v4/locales/az.ts +111 -0
  587. package/node_modules/zod/src/v4/locales/be.ts +176 -0
  588. package/node_modules/zod/src/v4/locales/bg.ts +128 -0
  589. package/node_modules/zod/src/v4/locales/ca.ts +116 -0
  590. package/node_modules/zod/src/v4/locales/cs.ts +118 -0
  591. package/node_modules/zod/src/v4/locales/da.ts +123 -0
  592. package/node_modules/zod/src/v4/locales/de.ts +116 -0
  593. package/node_modules/zod/src/v4/locales/el.ts +121 -0
  594. package/node_modules/zod/src/v4/locales/en.ts +123 -0
  595. package/node_modules/zod/src/v4/locales/eo.ts +118 -0
  596. package/node_modules/zod/src/v4/locales/es.ts +141 -0
  597. package/node_modules/zod/src/v4/locales/fa.ts +126 -0
  598. package/node_modules/zod/src/v4/locales/fi.ts +121 -0
  599. package/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
  600. package/node_modules/zod/src/v4/locales/fr.ts +132 -0
  601. package/node_modules/zod/src/v4/locales/he.ts +246 -0
  602. package/node_modules/zod/src/v4/locales/hr.ts +131 -0
  603. package/node_modules/zod/src/v4/locales/hu.ts +117 -0
  604. package/node_modules/zod/src/v4/locales/hy.ts +164 -0
  605. package/node_modules/zod/src/v4/locales/id.ts +115 -0
  606. package/node_modules/zod/src/v4/locales/index.ts +52 -0
  607. package/node_modules/zod/src/v4/locales/is.ts +119 -0
  608. package/node_modules/zod/src/v4/locales/it.ts +116 -0
  609. package/node_modules/zod/src/v4/locales/ja.ts +114 -0
  610. package/node_modules/zod/src/v4/locales/ka.ts +123 -0
  611. package/node_modules/zod/src/v4/locales/kh.ts +7 -0
  612. package/node_modules/zod/src/v4/locales/km.ts +119 -0
  613. package/node_modules/zod/src/v4/locales/ko.ts +121 -0
  614. package/node_modules/zod/src/v4/locales/lt.ts +239 -0
  615. package/node_modules/zod/src/v4/locales/mk.ts +118 -0
  616. package/node_modules/zod/src/v4/locales/ms.ts +115 -0
  617. package/node_modules/zod/src/v4/locales/nl.ts +121 -0
  618. package/node_modules/zod/src/v4/locales/no.ts +116 -0
  619. package/node_modules/zod/src/v4/locales/ota.ts +117 -0
  620. package/node_modules/zod/src/v4/locales/pl.ts +118 -0
  621. package/node_modules/zod/src/v4/locales/ps.ts +126 -0
  622. package/node_modules/zod/src/v4/locales/pt.ts +116 -0
  623. package/node_modules/zod/src/v4/locales/ro.ts +129 -0
  624. package/node_modules/zod/src/v4/locales/ru.ts +176 -0
  625. package/node_modules/zod/src/v4/locales/sl.ts +118 -0
  626. package/node_modules/zod/src/v4/locales/sv.ts +119 -0
  627. package/node_modules/zod/src/v4/locales/ta.ts +118 -0
  628. package/node_modules/zod/src/v4/locales/th.ts +119 -0
  629. package/node_modules/zod/src/v4/locales/tr.ts +111 -0
  630. package/node_modules/zod/src/v4/locales/ua.ts +7 -0
  631. package/node_modules/zod/src/v4/locales/uk.ts +117 -0
  632. package/node_modules/zod/src/v4/locales/ur.ts +119 -0
  633. package/node_modules/zod/src/v4/locales/uz.ts +117 -0
  634. package/node_modules/zod/src/v4/locales/vi.ts +117 -0
  635. package/node_modules/zod/src/v4/locales/yo.ts +124 -0
  636. package/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
  637. package/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
  638. package/node_modules/zod/src/v4/mini/checks.ts +32 -0
  639. package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
  640. package/node_modules/zod/src/v4/mini/external.ts +41 -0
  641. package/node_modules/zod/src/v4/mini/index.ts +3 -0
  642. package/node_modules/zod/src/v4/mini/iso.ts +66 -0
  643. package/node_modules/zod/src/v4/mini/parse.ts +14 -0
  644. package/node_modules/zod/src/v4/mini/schemas.ts +1947 -0
  645. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
  646. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  647. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
  648. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  649. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +548 -0
  650. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  651. package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  652. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
  653. package/node_modules/zod/src/v4/mini/tests/index.test.ts +993 -0
  654. package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  655. package/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
  656. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  657. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +325 -0
  658. package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
  659. package/node_modules/zod/src/v4/mini/tests/string.test.ts +352 -0
  660. package/node_modules/zod/src/v4-mini/index.ts +3 -0
  661. package/node_modules/zod/v3/ZodError.cjs +138 -0
  662. package/node_modules/zod/v3/ZodError.d.cts +164 -0
  663. package/node_modules/zod/v3/ZodError.d.ts +164 -0
  664. package/node_modules/zod/v3/ZodError.js +133 -0
  665. package/node_modules/zod/v3/errors.cjs +17 -0
  666. package/node_modules/zod/v3/errors.d.cts +5 -0
  667. package/node_modules/zod/v3/errors.d.ts +5 -0
  668. package/node_modules/zod/v3/errors.js +9 -0
  669. package/node_modules/zod/v3/external.cjs +22 -0
  670. package/node_modules/zod/v3/external.d.cts +6 -0
  671. package/node_modules/zod/v3/external.d.ts +6 -0
  672. package/node_modules/zod/v3/external.js +6 -0
  673. package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
  674. package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  675. package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  676. package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  677. package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
  678. package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  679. package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  680. package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  681. package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
  682. package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  683. package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  684. package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  685. package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
  686. package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  687. package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  688. package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  689. package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
  690. package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  691. package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  692. package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  693. package/node_modules/zod/v3/helpers/util.cjs +137 -0
  694. package/node_modules/zod/v3/helpers/util.d.cts +85 -0
  695. package/node_modules/zod/v3/helpers/util.d.ts +85 -0
  696. package/node_modules/zod/v3/helpers/util.js +133 -0
  697. package/node_modules/zod/v3/index.cjs +33 -0
  698. package/node_modules/zod/v3/index.d.cts +4 -0
  699. package/node_modules/zod/v3/index.d.ts +4 -0
  700. package/node_modules/zod/v3/index.js +4 -0
  701. package/node_modules/zod/v3/locales/en.cjs +112 -0
  702. package/node_modules/zod/v3/locales/en.d.cts +3 -0
  703. package/node_modules/zod/v3/locales/en.d.ts +3 -0
  704. package/node_modules/zod/v3/locales/en.js +109 -0
  705. package/node_modules/zod/v3/package.json +7 -0
  706. package/node_modules/zod/v3/standard-schema.cjs +2 -0
  707. package/node_modules/zod/v3/standard-schema.d.cts +102 -0
  708. package/node_modules/zod/v3/standard-schema.d.ts +102 -0
  709. package/node_modules/zod/v3/standard-schema.js +1 -0
  710. package/node_modules/zod/v3/types.cjs +3777 -0
  711. package/node_modules/zod/v3/types.d.cts +1034 -0
  712. package/node_modules/zod/v3/types.d.ts +1034 -0
  713. package/node_modules/zod/v3/types.js +3695 -0
  714. package/node_modules/zod/v4/classic/checks.cjs +33 -0
  715. package/node_modules/zod/v4/classic/checks.d.cts +1 -0
  716. package/node_modules/zod/v4/classic/checks.d.ts +1 -0
  717. package/node_modules/zod/v4/classic/checks.js +1 -0
  718. package/node_modules/zod/v4/classic/coerce.cjs +47 -0
  719. package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
  720. package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
  721. package/node_modules/zod/v4/classic/coerce.js +17 -0
  722. package/node_modules/zod/v4/classic/compat.cjs +61 -0
  723. package/node_modules/zod/v4/classic/compat.d.cts +50 -0
  724. package/node_modules/zod/v4/classic/compat.d.ts +50 -0
  725. package/node_modules/zod/v4/classic/compat.js +31 -0
  726. package/node_modules/zod/v4/classic/errors.cjs +74 -0
  727. package/node_modules/zod/v4/classic/errors.d.cts +30 -0
  728. package/node_modules/zod/v4/classic/errors.d.ts +30 -0
  729. package/node_modules/zod/v4/classic/errors.js +48 -0
  730. package/node_modules/zod/v4/classic/external.cjs +73 -0
  731. package/node_modules/zod/v4/classic/external.d.cts +16 -0
  732. package/node_modules/zod/v4/classic/external.d.ts +16 -0
  733. package/node_modules/zod/v4/classic/external.js +20 -0
  734. package/node_modules/zod/v4/classic/from-json-schema.cjs +625 -0
  735. package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
  736. package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
  737. package/node_modules/zod/v4/classic/from-json-schema.js +599 -0
  738. package/node_modules/zod/v4/classic/index.cjs +33 -0
  739. package/node_modules/zod/v4/classic/index.d.cts +4 -0
  740. package/node_modules/zod/v4/classic/index.d.ts +4 -0
  741. package/node_modules/zod/v4/classic/index.js +4 -0
  742. package/node_modules/zod/v4/classic/iso.cjs +60 -0
  743. package/node_modules/zod/v4/classic/iso.d.cts +22 -0
  744. package/node_modules/zod/v4/classic/iso.d.ts +22 -0
  745. package/node_modules/zod/v4/classic/iso.js +30 -0
  746. package/node_modules/zod/v4/classic/package.json +7 -0
  747. package/node_modules/zod/v4/classic/parse.cjs +41 -0
  748. package/node_modules/zod/v4/classic/parse.d.cts +31 -0
  749. package/node_modules/zod/v4/classic/parse.d.ts +31 -0
  750. package/node_modules/zod/v4/classic/parse.js +15 -0
  751. package/node_modules/zod/v4/classic/schemas.cjs +1511 -0
  752. package/node_modules/zod/v4/classic/schemas.d.cts +767 -0
  753. package/node_modules/zod/v4/classic/schemas.d.ts +767 -0
  754. package/node_modules/zod/v4/classic/schemas.js +1395 -0
  755. package/node_modules/zod/v4/core/api.cjs +1227 -0
  756. package/node_modules/zod/v4/core/api.d.cts +325 -0
  757. package/node_modules/zod/v4/core/api.d.ts +325 -0
  758. package/node_modules/zod/v4/core/api.js +1087 -0
  759. package/node_modules/zod/v4/core/checks.cjs +601 -0
  760. package/node_modules/zod/v4/core/checks.d.cts +278 -0
  761. package/node_modules/zod/v4/core/checks.d.ts +278 -0
  762. package/node_modules/zod/v4/core/checks.js +575 -0
  763. package/node_modules/zod/v4/core/core.cjs +85 -0
  764. package/node_modules/zod/v4/core/core.d.cts +70 -0
  765. package/node_modules/zod/v4/core/core.d.ts +70 -0
  766. package/node_modules/zod/v4/core/core.js +78 -0
  767. package/node_modules/zod/v4/core/doc.cjs +39 -0
  768. package/node_modules/zod/v4/core/doc.d.cts +14 -0
  769. package/node_modules/zod/v4/core/doc.d.ts +14 -0
  770. package/node_modules/zod/v4/core/doc.js +35 -0
  771. package/node_modules/zod/v4/core/errors.cjs +216 -0
  772. package/node_modules/zod/v4/core/errors.d.cts +221 -0
  773. package/node_modules/zod/v4/core/errors.d.ts +221 -0
  774. package/node_modules/zod/v4/core/errors.js +185 -0
  775. package/node_modules/zod/v4/core/index.cjs +47 -0
  776. package/node_modules/zod/v4/core/index.d.cts +16 -0
  777. package/node_modules/zod/v4/core/index.d.ts +16 -0
  778. package/node_modules/zod/v4/core/index.js +16 -0
  779. package/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
  780. package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
  781. package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
  782. package/node_modules/zod/v4/core/json-schema-generator.js +95 -0
  783. package/node_modules/zod/v4/core/json-schema-processors.cjs +644 -0
  784. package/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
  785. package/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
  786. package/node_modules/zod/v4/core/json-schema-processors.js +601 -0
  787. package/node_modules/zod/v4/core/json-schema.cjs +2 -0
  788. package/node_modules/zod/v4/core/json-schema.d.cts +88 -0
  789. package/node_modules/zod/v4/core/json-schema.d.ts +88 -0
  790. package/node_modules/zod/v4/core/json-schema.js +1 -0
  791. package/node_modules/zod/v4/core/package.json +7 -0
  792. package/node_modules/zod/v4/core/parse.cjs +131 -0
  793. package/node_modules/zod/v4/core/parse.d.cts +49 -0
  794. package/node_modules/zod/v4/core/parse.d.ts +49 -0
  795. package/node_modules/zod/v4/core/parse.js +93 -0
  796. package/node_modules/zod/v4/core/regexes.cjs +172 -0
  797. package/node_modules/zod/v4/core/regexes.d.cts +85 -0
  798. package/node_modules/zod/v4/core/regexes.d.ts +85 -0
  799. package/node_modules/zod/v4/core/regexes.js +139 -0
  800. package/node_modules/zod/v4/core/registries.cjs +56 -0
  801. package/node_modules/zod/v4/core/registries.d.cts +35 -0
  802. package/node_modules/zod/v4/core/registries.d.ts +35 -0
  803. package/node_modules/zod/v4/core/registries.js +51 -0
  804. package/node_modules/zod/v4/core/schemas.cjs +2270 -0
  805. package/node_modules/zod/v4/core/schemas.d.cts +1184 -0
  806. package/node_modules/zod/v4/core/schemas.d.ts +1184 -0
  807. package/node_modules/zod/v4/core/schemas.js +2239 -0
  808. package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
  809. package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
  810. package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
  811. package/node_modules/zod/v4/core/standard-schema.js +1 -0
  812. package/node_modules/zod/v4/core/to-json-schema.cjs +457 -0
  813. package/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
  814. package/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
  815. package/node_modules/zod/v4/core/to-json-schema.js +448 -0
  816. package/node_modules/zod/v4/core/util.cjs +734 -0
  817. package/node_modules/zod/v4/core/util.d.cts +200 -0
  818. package/node_modules/zod/v4/core/util.d.ts +200 -0
  819. package/node_modules/zod/v4/core/util.js +674 -0
  820. package/node_modules/zod/v4/core/versions.cjs +8 -0
  821. package/node_modules/zod/v4/core/versions.d.cts +5 -0
  822. package/node_modules/zod/v4/core/versions.d.ts +5 -0
  823. package/node_modules/zod/v4/core/versions.js +5 -0
  824. package/node_modules/zod/v4/index.cjs +22 -0
  825. package/node_modules/zod/v4/index.d.cts +3 -0
  826. package/node_modules/zod/v4/index.d.ts +3 -0
  827. package/node_modules/zod/v4/index.js +3 -0
  828. package/node_modules/zod/v4/locales/ar.cjs +133 -0
  829. package/node_modules/zod/v4/locales/ar.d.cts +5 -0
  830. package/node_modules/zod/v4/locales/ar.d.ts +4 -0
  831. package/node_modules/zod/v4/locales/ar.js +106 -0
  832. package/node_modules/zod/v4/locales/az.cjs +132 -0
  833. package/node_modules/zod/v4/locales/az.d.cts +5 -0
  834. package/node_modules/zod/v4/locales/az.d.ts +4 -0
  835. package/node_modules/zod/v4/locales/az.js +105 -0
  836. package/node_modules/zod/v4/locales/be.cjs +183 -0
  837. package/node_modules/zod/v4/locales/be.d.cts +5 -0
  838. package/node_modules/zod/v4/locales/be.d.ts +4 -0
  839. package/node_modules/zod/v4/locales/be.js +156 -0
  840. package/node_modules/zod/v4/locales/bg.cjs +147 -0
  841. package/node_modules/zod/v4/locales/bg.d.cts +5 -0
  842. package/node_modules/zod/v4/locales/bg.d.ts +4 -0
  843. package/node_modules/zod/v4/locales/bg.js +120 -0
  844. package/node_modules/zod/v4/locales/ca.cjs +134 -0
  845. package/node_modules/zod/v4/locales/ca.d.cts +5 -0
  846. package/node_modules/zod/v4/locales/ca.d.ts +4 -0
  847. package/node_modules/zod/v4/locales/ca.js +107 -0
  848. package/node_modules/zod/v4/locales/cs.cjs +138 -0
  849. package/node_modules/zod/v4/locales/cs.d.cts +5 -0
  850. package/node_modules/zod/v4/locales/cs.d.ts +4 -0
  851. package/node_modules/zod/v4/locales/cs.js +111 -0
  852. package/node_modules/zod/v4/locales/da.cjs +142 -0
  853. package/node_modules/zod/v4/locales/da.d.cts +5 -0
  854. package/node_modules/zod/v4/locales/da.d.ts +4 -0
  855. package/node_modules/zod/v4/locales/da.js +115 -0
  856. package/node_modules/zod/v4/locales/de.cjs +135 -0
  857. package/node_modules/zod/v4/locales/de.d.cts +5 -0
  858. package/node_modules/zod/v4/locales/de.d.ts +4 -0
  859. package/node_modules/zod/v4/locales/de.js +108 -0
  860. package/node_modules/zod/v4/locales/el.cjs +136 -0
  861. package/node_modules/zod/v4/locales/el.d.cts +5 -0
  862. package/node_modules/zod/v4/locales/el.d.ts +4 -0
  863. package/node_modules/zod/v4/locales/el.js +109 -0
  864. package/node_modules/zod/v4/locales/en.cjs +140 -0
  865. package/node_modules/zod/v4/locales/en.d.cts +5 -0
  866. package/node_modules/zod/v4/locales/en.d.ts +4 -0
  867. package/node_modules/zod/v4/locales/en.js +113 -0
  868. package/node_modules/zod/v4/locales/eo.cjs +136 -0
  869. package/node_modules/zod/v4/locales/eo.d.cts +5 -0
  870. package/node_modules/zod/v4/locales/eo.d.ts +4 -0
  871. package/node_modules/zod/v4/locales/eo.js +109 -0
  872. package/node_modules/zod/v4/locales/es.cjs +159 -0
  873. package/node_modules/zod/v4/locales/es.d.cts +5 -0
  874. package/node_modules/zod/v4/locales/es.d.ts +4 -0
  875. package/node_modules/zod/v4/locales/es.js +132 -0
  876. package/node_modules/zod/v4/locales/fa.cjs +141 -0
  877. package/node_modules/zod/v4/locales/fa.d.cts +5 -0
  878. package/node_modules/zod/v4/locales/fa.d.ts +4 -0
  879. package/node_modules/zod/v4/locales/fa.js +114 -0
  880. package/node_modules/zod/v4/locales/fi.cjs +139 -0
  881. package/node_modules/zod/v4/locales/fi.d.cts +5 -0
  882. package/node_modules/zod/v4/locales/fi.d.ts +4 -0
  883. package/node_modules/zod/v4/locales/fi.js +112 -0
  884. package/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
  885. package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
  886. package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  887. package/node_modules/zod/v4/locales/fr-CA.js +107 -0
  888. package/node_modules/zod/v4/locales/fr.cjs +152 -0
  889. package/node_modules/zod/v4/locales/fr.d.cts +5 -0
  890. package/node_modules/zod/v4/locales/fr.d.ts +4 -0
  891. package/node_modules/zod/v4/locales/fr.js +125 -0
  892. package/node_modules/zod/v4/locales/he.cjs +241 -0
  893. package/node_modules/zod/v4/locales/he.d.cts +5 -0
  894. package/node_modules/zod/v4/locales/he.d.ts +4 -0
  895. package/node_modules/zod/v4/locales/he.js +214 -0
  896. package/node_modules/zod/v4/locales/hr.cjs +149 -0
  897. package/node_modules/zod/v4/locales/hr.d.cts +5 -0
  898. package/node_modules/zod/v4/locales/hr.d.ts +4 -0
  899. package/node_modules/zod/v4/locales/hr.js +122 -0
  900. package/node_modules/zod/v4/locales/hu.cjs +135 -0
  901. package/node_modules/zod/v4/locales/hu.d.cts +5 -0
  902. package/node_modules/zod/v4/locales/hu.d.ts +4 -0
  903. package/node_modules/zod/v4/locales/hu.js +108 -0
  904. package/node_modules/zod/v4/locales/hy.cjs +174 -0
  905. package/node_modules/zod/v4/locales/hy.d.cts +5 -0
  906. package/node_modules/zod/v4/locales/hy.d.ts +4 -0
  907. package/node_modules/zod/v4/locales/hy.js +147 -0
  908. package/node_modules/zod/v4/locales/id.cjs +133 -0
  909. package/node_modules/zod/v4/locales/id.d.cts +5 -0
  910. package/node_modules/zod/v4/locales/id.d.ts +4 -0
  911. package/node_modules/zod/v4/locales/id.js +106 -0
  912. package/node_modules/zod/v4/locales/index.cjs +111 -0
  913. package/node_modules/zod/v4/locales/index.d.cts +52 -0
  914. package/node_modules/zod/v4/locales/index.d.ts +52 -0
  915. package/node_modules/zod/v4/locales/index.js +52 -0
  916. package/node_modules/zod/v4/locales/is.cjs +136 -0
  917. package/node_modules/zod/v4/locales/is.d.cts +5 -0
  918. package/node_modules/zod/v4/locales/is.d.ts +4 -0
  919. package/node_modules/zod/v4/locales/is.js +109 -0
  920. package/node_modules/zod/v4/locales/it.cjs +135 -0
  921. package/node_modules/zod/v4/locales/it.d.cts +5 -0
  922. package/node_modules/zod/v4/locales/it.d.ts +4 -0
  923. package/node_modules/zod/v4/locales/it.js +108 -0
  924. package/node_modules/zod/v4/locales/ja.cjs +134 -0
  925. package/node_modules/zod/v4/locales/ja.d.cts +5 -0
  926. package/node_modules/zod/v4/locales/ja.d.ts +4 -0
  927. package/node_modules/zod/v4/locales/ja.js +107 -0
  928. package/node_modules/zod/v4/locales/ka.cjs +139 -0
  929. package/node_modules/zod/v4/locales/ka.d.cts +5 -0
  930. package/node_modules/zod/v4/locales/ka.d.ts +4 -0
  931. package/node_modules/zod/v4/locales/ka.js +112 -0
  932. package/node_modules/zod/v4/locales/kh.cjs +12 -0
  933. package/node_modules/zod/v4/locales/kh.d.cts +5 -0
  934. package/node_modules/zod/v4/locales/kh.d.ts +5 -0
  935. package/node_modules/zod/v4/locales/kh.js +5 -0
  936. package/node_modules/zod/v4/locales/km.cjs +137 -0
  937. package/node_modules/zod/v4/locales/km.d.cts +5 -0
  938. package/node_modules/zod/v4/locales/km.d.ts +4 -0
  939. package/node_modules/zod/v4/locales/km.js +110 -0
  940. package/node_modules/zod/v4/locales/ko.cjs +138 -0
  941. package/node_modules/zod/v4/locales/ko.d.cts +5 -0
  942. package/node_modules/zod/v4/locales/ko.d.ts +4 -0
  943. package/node_modules/zod/v4/locales/ko.js +111 -0
  944. package/node_modules/zod/v4/locales/lt.cjs +230 -0
  945. package/node_modules/zod/v4/locales/lt.d.cts +5 -0
  946. package/node_modules/zod/v4/locales/lt.d.ts +4 -0
  947. package/node_modules/zod/v4/locales/lt.js +203 -0
  948. package/node_modules/zod/v4/locales/mk.cjs +136 -0
  949. package/node_modules/zod/v4/locales/mk.d.cts +5 -0
  950. package/node_modules/zod/v4/locales/mk.d.ts +4 -0
  951. package/node_modules/zod/v4/locales/mk.js +109 -0
  952. package/node_modules/zod/v4/locales/ms.cjs +134 -0
  953. package/node_modules/zod/v4/locales/ms.d.cts +5 -0
  954. package/node_modules/zod/v4/locales/ms.d.ts +4 -0
  955. package/node_modules/zod/v4/locales/ms.js +107 -0
  956. package/node_modules/zod/v4/locales/nl.cjs +137 -0
  957. package/node_modules/zod/v4/locales/nl.d.cts +5 -0
  958. package/node_modules/zod/v4/locales/nl.d.ts +4 -0
  959. package/node_modules/zod/v4/locales/nl.js +110 -0
  960. package/node_modules/zod/v4/locales/no.cjs +135 -0
  961. package/node_modules/zod/v4/locales/no.d.cts +5 -0
  962. package/node_modules/zod/v4/locales/no.d.ts +4 -0
  963. package/node_modules/zod/v4/locales/no.js +108 -0
  964. package/node_modules/zod/v4/locales/ota.cjs +136 -0
  965. package/node_modules/zod/v4/locales/ota.d.cts +5 -0
  966. package/node_modules/zod/v4/locales/ota.d.ts +4 -0
  967. package/node_modules/zod/v4/locales/ota.js +109 -0
  968. package/node_modules/zod/v4/locales/package.json +7 -0
  969. package/node_modules/zod/v4/locales/pl.cjs +136 -0
  970. package/node_modules/zod/v4/locales/pl.d.cts +5 -0
  971. package/node_modules/zod/v4/locales/pl.d.ts +4 -0
  972. package/node_modules/zod/v4/locales/pl.js +109 -0
  973. package/node_modules/zod/v4/locales/ps.cjs +141 -0
  974. package/node_modules/zod/v4/locales/ps.d.cts +5 -0
  975. package/node_modules/zod/v4/locales/ps.d.ts +4 -0
  976. package/node_modules/zod/v4/locales/ps.js +114 -0
  977. package/node_modules/zod/v4/locales/pt.cjs +135 -0
  978. package/node_modules/zod/v4/locales/pt.d.cts +5 -0
  979. package/node_modules/zod/v4/locales/pt.d.ts +4 -0
  980. package/node_modules/zod/v4/locales/pt.js +108 -0
  981. package/node_modules/zod/v4/locales/ro.cjs +146 -0
  982. package/node_modules/zod/v4/locales/ro.d.cts +5 -0
  983. package/node_modules/zod/v4/locales/ro.d.ts +4 -0
  984. package/node_modules/zod/v4/locales/ro.js +119 -0
  985. package/node_modules/zod/v4/locales/ru.cjs +183 -0
  986. package/node_modules/zod/v4/locales/ru.d.cts +5 -0
  987. package/node_modules/zod/v4/locales/ru.d.ts +4 -0
  988. package/node_modules/zod/v4/locales/ru.js +156 -0
  989. package/node_modules/zod/v4/locales/sl.cjs +136 -0
  990. package/node_modules/zod/v4/locales/sl.d.cts +5 -0
  991. package/node_modules/zod/v4/locales/sl.d.ts +4 -0
  992. package/node_modules/zod/v4/locales/sl.js +109 -0
  993. package/node_modules/zod/v4/locales/sv.cjs +137 -0
  994. package/node_modules/zod/v4/locales/sv.d.cts +5 -0
  995. package/node_modules/zod/v4/locales/sv.d.ts +4 -0
  996. package/node_modules/zod/v4/locales/sv.js +110 -0
  997. package/node_modules/zod/v4/locales/ta.cjs +137 -0
  998. package/node_modules/zod/v4/locales/ta.d.cts +5 -0
  999. package/node_modules/zod/v4/locales/ta.d.ts +4 -0
  1000. package/node_modules/zod/v4/locales/ta.js +110 -0
  1001. package/node_modules/zod/v4/locales/th.cjs +137 -0
  1002. package/node_modules/zod/v4/locales/th.d.cts +5 -0
  1003. package/node_modules/zod/v4/locales/th.d.ts +4 -0
  1004. package/node_modules/zod/v4/locales/th.js +110 -0
  1005. package/node_modules/zod/v4/locales/tr.cjs +132 -0
  1006. package/node_modules/zod/v4/locales/tr.d.cts +5 -0
  1007. package/node_modules/zod/v4/locales/tr.d.ts +4 -0
  1008. package/node_modules/zod/v4/locales/tr.js +105 -0
  1009. package/node_modules/zod/v4/locales/ua.cjs +12 -0
  1010. package/node_modules/zod/v4/locales/ua.d.cts +5 -0
  1011. package/node_modules/zod/v4/locales/ua.d.ts +5 -0
  1012. package/node_modules/zod/v4/locales/ua.js +5 -0
  1013. package/node_modules/zod/v4/locales/uk.cjs +135 -0
  1014. package/node_modules/zod/v4/locales/uk.d.cts +5 -0
  1015. package/node_modules/zod/v4/locales/uk.d.ts +4 -0
  1016. package/node_modules/zod/v4/locales/uk.js +108 -0
  1017. package/node_modules/zod/v4/locales/ur.cjs +137 -0
  1018. package/node_modules/zod/v4/locales/ur.d.cts +5 -0
  1019. package/node_modules/zod/v4/locales/ur.d.ts +4 -0
  1020. package/node_modules/zod/v4/locales/ur.js +110 -0
  1021. package/node_modules/zod/v4/locales/uz.cjs +137 -0
  1022. package/node_modules/zod/v4/locales/uz.d.cts +5 -0
  1023. package/node_modules/zod/v4/locales/uz.d.ts +4 -0
  1024. package/node_modules/zod/v4/locales/uz.js +110 -0
  1025. package/node_modules/zod/v4/locales/vi.cjs +135 -0
  1026. package/node_modules/zod/v4/locales/vi.d.cts +5 -0
  1027. package/node_modules/zod/v4/locales/vi.d.ts +4 -0
  1028. package/node_modules/zod/v4/locales/vi.js +108 -0
  1029. package/node_modules/zod/v4/locales/yo.cjs +134 -0
  1030. package/node_modules/zod/v4/locales/yo.d.cts +5 -0
  1031. package/node_modules/zod/v4/locales/yo.d.ts +4 -0
  1032. package/node_modules/zod/v4/locales/yo.js +107 -0
  1033. package/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
  1034. package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
  1035. package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  1036. package/node_modules/zod/v4/locales/zh-CN.js +109 -0
  1037. package/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
  1038. package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
  1039. package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  1040. package/node_modules/zod/v4/locales/zh-TW.js +107 -0
  1041. package/node_modules/zod/v4/mini/checks.cjs +34 -0
  1042. package/node_modules/zod/v4/mini/checks.d.cts +1 -0
  1043. package/node_modules/zod/v4/mini/checks.d.ts +1 -0
  1044. package/node_modules/zod/v4/mini/checks.js +1 -0
  1045. package/node_modules/zod/v4/mini/coerce.cjs +52 -0
  1046. package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
  1047. package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
  1048. package/node_modules/zod/v4/mini/coerce.js +22 -0
  1049. package/node_modules/zod/v4/mini/external.cjs +63 -0
  1050. package/node_modules/zod/v4/mini/external.d.cts +13 -0
  1051. package/node_modules/zod/v4/mini/external.d.ts +13 -0
  1052. package/node_modules/zod/v4/mini/external.js +14 -0
  1053. package/node_modules/zod/v4/mini/index.cjs +32 -0
  1054. package/node_modules/zod/v4/mini/index.d.cts +3 -0
  1055. package/node_modules/zod/v4/mini/index.d.ts +3 -0
  1056. package/node_modules/zod/v4/mini/index.js +3 -0
  1057. package/node_modules/zod/v4/mini/iso.cjs +64 -0
  1058. package/node_modules/zod/v4/mini/iso.d.cts +22 -0
  1059. package/node_modules/zod/v4/mini/iso.d.ts +22 -0
  1060. package/node_modules/zod/v4/mini/iso.js +34 -0
  1061. package/node_modules/zod/v4/mini/package.json +7 -0
  1062. package/node_modules/zod/v4/mini/parse.cjs +16 -0
  1063. package/node_modules/zod/v4/mini/parse.d.cts +1 -0
  1064. package/node_modules/zod/v4/mini/parse.d.ts +1 -0
  1065. package/node_modules/zod/v4/mini/parse.js +1 -0
  1066. package/node_modules/zod/v4/mini/schemas.cjs +1083 -0
  1067. package/node_modules/zod/v4/mini/schemas.d.cts +445 -0
  1068. package/node_modules/zod/v4/mini/schemas.d.ts +445 -0
  1069. package/node_modules/zod/v4/mini/schemas.js +961 -0
  1070. package/node_modules/zod/v4/package.json +7 -0
  1071. package/node_modules/zod/v4-mini/index.cjs +32 -0
  1072. package/node_modules/zod/v4-mini/index.d.cts +3 -0
  1073. package/node_modules/zod/v4-mini/index.d.ts +3 -0
  1074. package/node_modules/zod/v4-mini/index.js +3 -0
  1075. package/node_modules/zod/v4-mini/package.json +7 -0
  1076. package/package.json +26 -10
  1077. package/dist/chunk-Q4PUTBMV.js.map +0 -1
  1078. package/dist/chunk-RQRT27Q3.js.map +0 -1
  1079. package/dist/chunk-SFI2T6TE.js.map +0 -1
  1080. package/dist/chunk-UDLRVMML.js.map +0 -1
  1081. package/dist/public-route-7IK5D7V7.js.map +0 -1
@@ -0,0 +1,2675 @@
1
+ import { AnnotationsSchema, AudioContentSchema, AuthorizationServerMetadata, BAGGAGE_META_KEY, BaseMetadataSchema, BaseRequestParamsSchema, BlobResourceContentsSchema, BooleanSchemaSchema, CLIENT_CAPABILITIES_META_KEY, CLIENT_INFO_META_KEY, CallToolRequestParamsSchema, CallToolRequestSchema, CallToolResultSchema, CancelTaskRequestSchema, CancelTaskResultSchema, CancelledNotificationParamsSchema, CancelledNotificationSchema, ClientCapabilitiesSchema, ClientNotificationSchema, ClientRequestSchema, ClientResultSchema, ClientTasksCapabilitySchema, CompatibilityCallToolResultSchema, CompleteRequestParamsSchema, CompleteRequestSchema, CompleteResultSchema, ContentBlockSchema, CreateMessageRequestParamsSchema, CreateMessageRequestSchema, CreateMessageResultSchema, CreateMessageResultWithToolsSchema, CreateTaskResultSchema, CursorSchema, DEFAULT_NEGOTIATED_PROTOCOL_VERSION, DiscoverRequestSchema, DiscoverResultSchema, ElicitRequestFormParamsSchema, ElicitRequestParamsSchema, ElicitRequestSchema, ElicitRequestURLParamsSchema, ElicitResultSchema, ElicitationCompleteNotificationParamsSchema, ElicitationCompleteNotificationSchema, EmbeddedResourceSchema, EmptyResultSchema, EnumSchemaSchema, GetPromptRequestParamsSchema, GetPromptRequestSchema, GetPromptResultSchema, GetTaskPayloadRequestSchema, GetTaskPayloadResultSchema, GetTaskRequestSchema, GetTaskResultSchema, INTERNAL_ERROR, INVALID_PARAMS, INVALID_REQUEST, IconSchema, IconsSchema, IdJagTokenExchangeResponse, ImageContentSchema, ImplementationSchema, InitializeRequestParamsSchema, InitializeRequestSchema, InitializeResultSchema, InitializedNotificationSchema, JSONArray, JSONArraySchema, JSONObject, JSONObjectSchema, JSONRPCErrorResponseSchema, JSONRPCMessageSchema, JSONRPCNotificationSchema, JSONRPCRequestSchema, JSONRPCResponseSchema, JSONRPCResultResponseSchema, JSONRPC_VERSION, JSONValue, JSONValueSchema, LATEST_PROTOCOL_VERSION, LOG_LEVEL_META_KEY, LegacyTitledEnumSchemaSchema, ListChangedOptionsBaseSchema, ListPromptsRequestSchema, ListPromptsResultSchema, ListResourceTemplatesRequestSchema, ListResourceTemplatesResultSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListRootsRequestSchema, ListRootsResultSchema, ListTasksRequestSchema, ListTasksResultSchema, ListToolsRequestSchema, ListToolsResultSchema, LoggingLevelSchema, LoggingMessageNotificationParamsSchema, LoggingMessageNotificationSchema, METHOD_NOT_FOUND, ModelHintSchema, ModelPreferencesSchema, MultiSelectEnumSchemaSchema, NotificationSchema, NotificationsParamsSchema, NumberSchemaSchema, OAuthClientInformation, OAuthClientInformationFull, OAuthClientInformationMixed, OAuthClientMetadata, OAuthClientRegistrationError, OAuthErrorResponse, OAuthMetadata, OAuthProtectedResourceMetadata, OAuthTokenRevocationRequest, OAuthTokens, OpenIdProviderDiscoveryMetadata, OpenIdProviderMetadata, PARSE_ERROR, PROTOCOL_VERSION_META_KEY, PaginatedRequestParamsSchema, PaginatedRequestSchema, PaginatedResultSchema, PingRequestSchema, PrimitiveSchemaDefinitionSchema, ProgressNotificationParamsSchema, ProgressNotificationSchema, ProgressSchema, ProgressTokenSchema, PromptArgumentSchema, PromptListChangedNotificationSchema, PromptMessageSchema, PromptReferenceSchema, PromptSchema, RELATED_TASK_META_KEY, ReadResourceRequestParamsSchema, ReadResourceRequestSchema, ReadResourceResultSchema, RelatedTaskMetadataSchema, RequestIdSchema, RequestMetaSchema, RequestSchema, ResourceContentsSchema, ResourceLinkSchema, ResourceListChangedNotificationSchema, ResourceRequestParamsSchema, ResourceSchema, ResourceTemplateReferenceSchema, ResourceTemplateSchema, ResourceUpdatedNotificationParamsSchema, ResourceUpdatedNotificationSchema, ResultSchema, RoleSchema, RootSchema, RootsListChangedNotificationSchema, SUBSCRIPTION_ID_META_KEY, SUPPORTED_PROTOCOL_VERSIONS, SamplingContentSchema, SamplingMessageContentBlockSchema, SamplingMessageSchema, ServerCapabilitiesSchema, ServerNotificationSchema, ServerRequestSchema, ServerResultSchema, ServerTasksCapabilitySchema, SetLevelRequestParamsSchema, SetLevelRequestSchema, SingleSelectEnumSchemaSchema, StoredOAuthClientInformation, StoredOAuthTokens, StringSchemaSchema, SubscribeRequestParamsSchema, SubscribeRequestSchema, SubscriptionFilterSchema, SubscriptionsAcknowledgedNotificationParamsSchema, SubscriptionsAcknowledgedNotificationSchema, SubscriptionsListenRequestParamsSchema, SubscriptionsListenRequestSchema, SubscriptionsListenResultMetaSchema, SubscriptionsListenResultSchema, TRACEPARENT_META_KEY, TRACESTATE_META_KEY, TaskAugmentedRequestParamsSchema, TaskCreationParamsSchema, TaskMetadataSchema, TaskSchema, TaskStatusNotificationParamsSchema, TaskStatusNotificationSchema, TaskStatusSchema, TextContentSchema, TextResourceContentsSchema, TitledMultiSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema, ToolAnnotationsSchema, ToolChoiceSchema, ToolExecutionSchema, ToolListChangedNotificationSchema, ToolResultContentSchema, ToolSchema, ToolUseContentSchema, UnsubscribeRequestParamsSchema, UnsubscribeRequestSchema, UntitledMultiSelectEnumSchemaSchema, UntitledSingleSelectEnumSchemaSchema } from "@modelcontextprotocol/core/internal";
2
+ import * as z from "zod/v4";
3
+
4
+ //#region ../core-internal/src/auth/errors.d.ts
5
+ /**
6
+ * OAuth error codes as defined by {@link https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 | RFC 6749}
7
+ * and extensions.
8
+ */
9
+ declare enum OAuthErrorCode {
10
+ /**
11
+ * The request is missing a required parameter, includes an invalid parameter value,
12
+ * includes a parameter more than once, or is otherwise malformed.
13
+ */
14
+ InvalidRequest = "invalid_request",
15
+ /**
16
+ * Client authentication failed (e.g., unknown client, no client authentication included,
17
+ * or unsupported authentication method).
18
+ */
19
+ InvalidClient = "invalid_client",
20
+ /**
21
+ * The provided authorization grant or refresh token is invalid, expired, revoked,
22
+ * does not match the redirection URI used in the authorization request, or was issued to another client.
23
+ */
24
+ InvalidGrant = "invalid_grant",
25
+ /**
26
+ * The authenticated client is not authorized to use this authorization grant type.
27
+ */
28
+ UnauthorizedClient = "unauthorized_client",
29
+ /**
30
+ * The authorization grant type is not supported by the authorization server.
31
+ */
32
+ UnsupportedGrantType = "unsupported_grant_type",
33
+ /**
34
+ * The requested scope is invalid, unknown, malformed, or exceeds the scope granted by the resource owner.
35
+ */
36
+ InvalidScope = "invalid_scope",
37
+ /**
38
+ * The resource owner or authorization server denied the request.
39
+ */
40
+ AccessDenied = "access_denied",
41
+ /**
42
+ * The authorization server encountered an unexpected condition that prevented it from fulfilling the request.
43
+ */
44
+ ServerError = "server_error",
45
+ /**
46
+ * The authorization server is currently unable to handle the request due to temporary overloading or maintenance.
47
+ */
48
+ TemporarilyUnavailable = "temporarily_unavailable",
49
+ /**
50
+ * The authorization server does not support obtaining an authorization code using this method.
51
+ */
52
+ UnsupportedResponseType = "unsupported_response_type",
53
+ /**
54
+ * The authorization server does not support the requested token type.
55
+ */
56
+ UnsupportedTokenType = "unsupported_token_type",
57
+ /**
58
+ * The access token provided is expired, revoked, malformed, or invalid for other reasons.
59
+ */
60
+ InvalidToken = "invalid_token",
61
+ /**
62
+ * The HTTP method used is not allowed for this endpoint. (Custom, non-standard error)
63
+ */
64
+ MethodNotAllowed = "method_not_allowed",
65
+ /**
66
+ * Rate limit exceeded. (Custom, non-standard error based on RFC 6585)
67
+ */
68
+ TooManyRequests = "too_many_requests",
69
+ /**
70
+ * The client metadata is invalid. (Custom error for dynamic client registration - RFC 7591)
71
+ */
72
+ InvalidClientMetadata = "invalid_client_metadata",
73
+ /**
74
+ * The value of one or more redirection URIs is invalid. (Dynamic client registration - RFC 7591 §3.2.2)
75
+ */
76
+ InvalidRedirectUri = "invalid_redirect_uri",
77
+ /**
78
+ * The request requires higher privileges than provided by the access token.
79
+ */
80
+ InsufficientScope = "insufficient_scope",
81
+ /**
82
+ * The requested resource is invalid, missing, unknown, or malformed. (Custom error for resource indicators - RFC 8707)
83
+ */
84
+ InvalidTarget = "invalid_target",
85
+ }
86
+ /**
87
+ * OAuth error class for all OAuth-related errors.
88
+ */
89
+ declare class OAuthError extends Error {
90
+ readonly code: OAuthErrorCode | string;
91
+ readonly errorUri?: string | undefined;
92
+ static [Symbol.hasInstance](value: unknown): boolean;
93
+ /**
94
+ * Brand-based type guard: equivalent to `value instanceof this`, as an
95
+ * explicit static predicate (the axios/AWS-SDK `isInstance` style). Reads
96
+ * the caller's own brand via `this`, so every branded subclass gets a
97
+ * correctly-scoped guard by inheritance. Must be invoked on the class —
98
+ * in callback position write `v => SdkError.isInstance(v)`, not
99
+ * `.filter(SdkError.isInstance)` (detached calls throw rather than
100
+ * silently matching nothing).
101
+ */
102
+ static isInstance<T$1 extends abstract new (...args: never[]) => unknown>(this: T$1, value: unknown): value is InstanceType<T$1>;
103
+ constructor(code: OAuthErrorCode | string, message: string, errorUri?: string | undefined);
104
+ /**
105
+ * Converts the error to a standard OAuth error response object.
106
+ */
107
+ toResponseObject(): OAuthErrorResponse;
108
+ /**
109
+ * Creates an {@linkcode OAuthError} from an OAuth error response.
110
+ */
111
+ static fromResponse(response: OAuthErrorResponse): OAuthError;
112
+ }
113
+ //#endregion
114
+ //#region ../core-internal/src/errors/sdkErrors.d.ts
115
+ /**
116
+ * Error codes for SDK errors (local errors that never cross the wire).
117
+ * Unlike {@linkcode ProtocolErrorCode} which uses numeric JSON-RPC codes, `SdkErrorCode` uses
118
+ * descriptive string values for better developer experience.
119
+ *
120
+ * These errors are thrown locally by the SDK and are never serialized as
121
+ * JSON-RPC error responses.
122
+ */
123
+ declare enum SdkErrorCode {
124
+ /** Transport is not connected */
125
+ NotConnected = "NOT_CONNECTED",
126
+ /** Transport is already connected */
127
+ AlreadyConnected = "ALREADY_CONNECTED",
128
+ /** Protocol is not initialized */
129
+ NotInitialized = "NOT_INITIALIZED",
130
+ /** Required capability is not supported by the remote side */
131
+ CapabilityNotSupported = "CAPABILITY_NOT_SUPPORTED",
132
+ /** Request timed out waiting for response */
133
+ RequestTimeout = "REQUEST_TIMEOUT",
134
+ /** Connection was closed */
135
+ ConnectionClosed = "CONNECTION_CLOSED",
136
+ /** Failed to send message */
137
+ SendFailed = "SEND_FAILED",
138
+ /** Response result failed local schema validation */
139
+ InvalidResult = "INVALID_RESULT",
140
+ /**
141
+ * The response carried a `resultType` discriminator (protocol revision
142
+ * 2026-07-28) naming a result kind this client cannot consume yet, e.g.
143
+ * `input_required`. The kind is carried in `data.resultType`.
144
+ */
145
+ UnsupportedResultType = "UNSUPPORTED_RESULT_TYPE",
146
+ /**
147
+ * The multi-round-trip auto-fulfilment driver exhausted its round cap
148
+ * (`inputRequired.maxRounds`) without the server returning a complete
149
+ * result. `data.rounds` carries the cap that was hit and
150
+ * `data.lastResult` carries the last `input_required` payload received
151
+ * (`{ inputRequests, requestState? }`), so callers can inspect or resume
152
+ * the flow manually.
153
+ */
154
+ InputRequiredRoundsExceeded = "INPUT_REQUIRED_ROUNDS_EXCEEDED",
155
+ /**
156
+ * The auto-aggregating no-`cursor` `listTools()` / `listPrompts()` /
157
+ * `listResources()` / `listResourceTemplates()` walk hit the
158
+ * `ClientOptions.listMaxPages` cap without the server's pagination
159
+ * converging. `data.method` carries the list verb and
160
+ * `data.listMaxPages` the cap that was hit; raise the cap or fall back to
161
+ * explicit per-page `{ cursor }` calls.
162
+ */
163
+ ListPaginationExceeded = "LIST_PAGINATION_EXCEEDED",
164
+ /**
165
+ * The spec method being sent does not exist on the negotiated protocol
166
+ * version's wire era (e.g. `tasks/get` toward a 2026-07-28 peer, or
167
+ * `server/discover` toward a 2025-era peer). Raised locally, before
168
+ * anything reaches the transport. The method and era are carried in
169
+ * `data.method` / `data.era`.
170
+ */
171
+ MethodNotSupportedByProtocolVersion = "METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION",
172
+ /**
173
+ * Protocol-era negotiation at connect time failed without producing either a
174
+ * usable modern (2026-07-28+) era or a definitive legacy fallback signal —
175
+ * e.g. the negotiation mode forbids falling back (`pin`), or the probe hit a
176
+ * network failure (a typed connect error, never an era verdict).
177
+ *
178
+ * Negotiation-phase only: this code is never used once an era is established.
179
+ */
180
+ EraNegotiationFailed = "ERA_NEGOTIATION_FAILED",
181
+ ClientHttpNotImplemented = "CLIENT_HTTP_NOT_IMPLEMENTED",
182
+ ClientHttpAuthentication = "CLIENT_HTTP_AUTHENTICATION",
183
+ ClientHttpForbidden = "CLIENT_HTTP_FORBIDDEN",
184
+ ClientHttpUnexpectedContent = "CLIENT_HTTP_UNEXPECTED_CONTENT",
185
+ ClientHttpFailedToOpenStream = "CLIENT_HTTP_FAILED_TO_OPEN_STREAM",
186
+ ClientHttpFailedToTerminateSession = "CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION",
187
+ }
188
+ /**
189
+ * SDK errors are local errors that never cross the wire.
190
+ * They are distinct from {@linkcode ProtocolError} which represents JSON-RPC protocol errors
191
+ * that are serialized and sent as error responses.
192
+ *
193
+ * @example
194
+ * ```ts source="./sdkErrors.examples.ts#SdkError_basicUsage"
195
+ * try {
196
+ * // Throwing an SDK error
197
+ * throw new SdkError(SdkErrorCode.NotConnected, 'Transport is not connected');
198
+ * } catch (error) {
199
+ * // Checking error type by code
200
+ * if (error instanceof SdkError && error.code === SdkErrorCode.RequestTimeout) {
201
+ * // Handle timeout
202
+ * }
203
+ * }
204
+ * ```
205
+ */
206
+ declare class SdkError extends Error {
207
+ readonly code: SdkErrorCode;
208
+ readonly data?: unknown | undefined;
209
+ static [Symbol.hasInstance](value: unknown): boolean;
210
+ /**
211
+ * Brand-based type guard: equivalent to `value instanceof this`, as an
212
+ * explicit static predicate (the axios/AWS-SDK `isInstance` style). Reads
213
+ * the caller's own brand via `this`, so every branded subclass gets a
214
+ * correctly-scoped guard by inheritance. Must be invoked on the class —
215
+ * in callback position write `v => SdkError.isInstance(v)`, not
216
+ * `.filter(SdkError.isInstance)` (detached calls throw rather than
217
+ * silently matching nothing).
218
+ */
219
+ static isInstance<T$1 extends abstract new (...args: never[]) => unknown>(this: T$1, value: unknown): value is InstanceType<T$1>;
220
+ constructor(code: SdkErrorCode, message: string, data?: unknown | undefined);
221
+ }
222
+ /**
223
+ * Typed shape for HTTP error data carried by {@linkcode SdkHttpError}.
224
+ */
225
+ interface SdkHttpErrorData {
226
+ status: number;
227
+ statusText?: string;
228
+ [key: string]: unknown;
229
+ }
230
+ /**
231
+ * An {@linkcode SdkError} subclass for HTTP transport failures.
232
+ *
233
+ * Thrown by the streamable HTTP transport when the server responds with a
234
+ * non-OK status code. Narrows {@linkcode SdkError.data | data} to
235
+ * {@linkcode SdkHttpErrorData} so consumers can inspect the HTTP status
236
+ * without unsafe casting.
237
+ *
238
+ * @example
239
+ * ```ts source="./sdkErrors.examples.ts#SdkHttpError_basicUsage"
240
+ * if (error instanceof SdkHttpError) {
241
+ * console.log(error.status); // number
242
+ * console.log(error.statusText); // string | undefined
243
+ * }
244
+ * ```
245
+ */
246
+ declare class SdkHttpError extends SdkError {
247
+ readonly data: SdkHttpErrorData;
248
+ constructor(code: SdkErrorCode, message: string, data: SdkHttpErrorData);
249
+ get status(): number;
250
+ get statusText(): string | undefined;
251
+ }
252
+ //#endregion
253
+ //#region ../core-internal/src/shared/authUtils.d.ts
254
+ /**
255
+ * Utilities for handling OAuth resource URIs.
256
+ */
257
+ /**
258
+ * Converts a server URL to a resource URL by removing the fragment.
259
+ * {@link https://datatracker.ietf.org/doc/html/rfc8707#section-2 | RFC 8707 section 2}
260
+ * states that resource URIs "MUST NOT include a fragment component".
261
+ * Keeps everything else unchanged (scheme, domain, port, path, query).
262
+ */
263
+ declare function resourceUrlFromServerUrl(url: URL | string): URL;
264
+ /**
265
+ * Checks if a requested resource URL matches a configured resource URL.
266
+ * A requested resource matches if it has the same scheme, domain, port,
267
+ * and its path starts with the configured resource's path.
268
+ *
269
+ * @param options - The options object
270
+ * @param options.requestedResource - The resource URL being requested
271
+ * @param options.configuredResource - The resource URL that has been configured
272
+ * @returns true if the requested resource matches the configured resource, false otherwise
273
+ */
274
+ declare function checkResourceAllowed({
275
+ requestedResource,
276
+ configuredResource
277
+ }: {
278
+ requestedResource: URL | string;
279
+ configuredResource: URL | string;
280
+ }): boolean;
281
+ declare namespace schemas_d_exports {
282
+ export { AnnotationsSchema, AudioContentSchema, BaseMetadataSchema, BaseRequestParamsSchema, BlobResourceContentsSchema, BooleanSchemaSchema, CallToolRequestParamsSchema, CallToolRequestSchema, CallToolResultSchema, CancelTaskRequestSchema, CancelTaskResultSchema, CancelledNotificationParamsSchema, CancelledNotificationSchema, ClientCapabilitiesSchema, ClientNotificationSchema, ClientRequestSchema, ClientResultSchema, ClientTasksCapabilitySchema, CompatibilityCallToolResultSchema, CompleteRequestParamsSchema, CompleteRequestSchema, CompleteResultSchema, ContentBlockSchema, CreateMessageRequestParamsSchema, CreateMessageRequestSchema, CreateMessageResultSchema, CreateMessageResultWithToolsSchema, CreateTaskResultSchema, CursorSchema, DiscoverRequestSchema, DiscoverResultSchema, ElicitRequestFormParamsSchema, ElicitRequestParamsSchema, ElicitRequestSchema, ElicitRequestURLParamsSchema, ElicitResultSchema, ElicitationCompleteNotificationParamsSchema, ElicitationCompleteNotificationSchema, EmbeddedResourceSchema, EmptyResultSchema, EnumSchemaSchema, GetPromptRequestParamsSchema, GetPromptRequestSchema, GetPromptResultSchema, GetTaskPayloadRequestSchema, GetTaskPayloadResultSchema, GetTaskRequestSchema, GetTaskResultSchema, IconSchema, IconsSchema, ImageContentSchema, ImplementationSchema, InitializeRequestParamsSchema, InitializeRequestSchema, InitializeResultSchema, InitializedNotificationSchema, JSONArraySchema, JSONObjectSchema, JSONRPCErrorResponseSchema, JSONRPCMessageSchema, JSONRPCNotificationSchema, JSONRPCRequestSchema, JSONRPCResponseSchema, JSONRPCResultResponseSchema, JSONValueSchema, LegacyTitledEnumSchemaSchema, ListChangedOptionsBaseSchema, ListPromptsRequestSchema, ListPromptsResultSchema, ListResourceTemplatesRequestSchema, ListResourceTemplatesResultSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListRootsRequestSchema, ListRootsResultSchema, ListTasksRequestSchema, ListTasksResultSchema, ListToolsRequestSchema, ListToolsResultSchema, LoggingLevelSchema, LoggingMessageNotificationParamsSchema, LoggingMessageNotificationSchema, ModelHintSchema, ModelPreferencesSchema, MultiSelectEnumSchemaSchema, NotificationSchema, NotificationsParamsSchema, NumberSchemaSchema, PaginatedRequestParamsSchema, PaginatedRequestSchema, PaginatedResultSchema, PingRequestSchema, PrimitiveSchemaDefinitionSchema, ProgressNotificationParamsSchema, ProgressNotificationSchema, ProgressSchema, ProgressTokenSchema, PromptArgumentSchema, PromptListChangedNotificationSchema, PromptMessageSchema, PromptReferenceSchema, PromptSchema, ReadResourceRequestParamsSchema, ReadResourceRequestSchema, ReadResourceResultSchema, RelatedTaskMetadataSchema, RequestIdSchema, RequestMetaSchema, RequestSchema, ResourceContentsSchema, ResourceLinkSchema, ResourceListChangedNotificationSchema, ResourceRequestParamsSchema, ResourceSchema, ResourceTemplateReferenceSchema, ResourceTemplateSchema, ResourceUpdatedNotificationParamsSchema, ResourceUpdatedNotificationSchema, ResultSchema, RoleSchema, RootSchema, RootsListChangedNotificationSchema, SamplingContentSchema, SamplingMessageContentBlockSchema, SamplingMessageSchema, ServerCapabilitiesSchema, ServerNotificationSchema, ServerRequestSchema, ServerResultSchema, ServerTasksCapabilitySchema, SetLevelRequestParamsSchema, SetLevelRequestSchema, SingleSelectEnumSchemaSchema, StringSchemaSchema, SubscribeRequestParamsSchema, SubscribeRequestSchema, SubscriptionFilterSchema, SubscriptionsAcknowledgedNotificationParamsSchema, SubscriptionsAcknowledgedNotificationSchema, SubscriptionsListenRequestParamsSchema, SubscriptionsListenRequestSchema, SubscriptionsListenResultMetaSchema, SubscriptionsListenResultSchema, TaskAugmentedRequestParamsSchema, TaskCreationParamsSchema, TaskMetadataSchema, TaskSchema, TaskStatusNotificationParamsSchema, TaskStatusNotificationSchema, TaskStatusSchema, TextContentSchema, TextResourceContentsSchema, TitledMultiSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema, ToolAnnotationsSchema, ToolChoiceSchema, ToolExecutionSchema, ToolListChangedNotificationSchema, ToolResultContentSchema, ToolSchema, ToolUseContentSchema, UnsubscribeRequestParamsSchema, UnsubscribeRequestSchema, UntitledMultiSelectEnumSchemaSchema, UntitledSingleSelectEnumSchemaSchema };
283
+ }
284
+ //#endregion
285
+ //#region ../core-internal/src/types/types.d.ts
286
+ /**
287
+ * Utility types
288
+ */
289
+ type ExpandRecursively<T$1> = T$1 extends object ? (T$1 extends infer O ? { [K in keyof O]: ExpandRecursively<O[K]> } : never) : T$1;
290
+ type Primitive = string | number | boolean | bigint | null | undefined;
291
+ type Flatten<T$1> = T$1 extends Primitive ? T$1 : T$1 extends Array<infer U> ? Array<Flatten<U>> : T$1 extends Set<infer U> ? Set<Flatten<U>> : T$1 extends Map<infer K, infer V> ? Map<Flatten<K>, Flatten<V>> : T$1 extends object ? { [K in keyof T$1]: Flatten<T$1[K]> } : T$1;
292
+ type Infer<Schema extends z.ZodTypeAny> = Flatten<z.infer<Schema>>;
293
+ /**
294
+ * Wire-only members hidden from the public types.
295
+ *
296
+ * `resultType` is the protocol-revision-2026-07-28 wire discrimination field
297
+ * on results. It is consumed by the SDK's protocol layer (and stripped before
298
+ * results reach consumers), so the public result types do not declare it.
299
+ * The wire schemas continue to model it internally.
300
+ */
301
+ type WireOnlyResultKey = 'resultType';
302
+ /**
303
+ * Removes wire-only members from a (possibly union) schema-inferred type
304
+ * while preserving every other declared member, optionality, and the loose
305
+ * index signature.
306
+ */
307
+ type StripWireOnly<T$1> = T$1 extends unknown ? { [K in keyof T$1 as K extends WireOnlyResultKey ? never : K]: T$1[K] } : never;
308
+ type ProgressToken = Infer<typeof ProgressTokenSchema>;
309
+ type Cursor = Infer<typeof CursorSchema>;
310
+ type Request = Infer<typeof RequestSchema>;
311
+ /** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */
312
+ type TaskAugmentedRequestParams = Infer<typeof TaskAugmentedRequestParamsSchema>;
313
+ type RequestMeta = Infer<typeof RequestMetaSchema>;
314
+ type Notification = Infer<typeof NotificationSchema>;
315
+ type Result$1 = StripWireOnly<Infer<typeof ResultSchema>>;
316
+ type RequestId = Infer<typeof RequestIdSchema>;
317
+ type JSONRPCRequest = Infer<typeof JSONRPCRequestSchema>;
318
+ type JSONRPCNotification = Infer<typeof JSONRPCNotificationSchema>;
319
+ type JSONRPCErrorResponse = Infer<typeof JSONRPCErrorResponseSchema>;
320
+ type JSONRPCResultResponse = Omit<Infer<typeof JSONRPCResultResponseSchema>, 'result'> & {
321
+ result: Result$1;
322
+ };
323
+ type JSONRPCResponse = JSONRPCResultResponse | JSONRPCErrorResponse;
324
+ type JSONRPCMessage = JSONRPCRequest | JSONRPCNotification | JSONRPCResultResponse | JSONRPCErrorResponse;
325
+ type RequestParams = Infer<typeof BaseRequestParamsSchema>;
326
+ type NotificationParams = Infer<typeof NotificationsParamsSchema>;
327
+ /**
328
+ * The per-request `_meta` envelope carried by every request under protocol revision
329
+ * 2026-07-28 (protocol version, client info, client capabilities, optional log level).
330
+ *
331
+ * Neutral hand-written shape keyed by the public meta-key constants — never
332
+ * inferred from a wire-module schema (this neutral layer does not import from
333
+ * `wire/rev*`). A `type` alias rather than an interface so it stays assignable
334
+ * to `_meta`'s string-indexed object slot.
335
+ */
336
+ type RequestMetaEnvelope = {
337
+ [PROTOCOL_VERSION_META_KEY]: string;
338
+ [CLIENT_INFO_META_KEY]: Implementation;
339
+ [CLIENT_CAPABILITIES_META_KEY]: ClientCapabilities;
340
+ [LOG_LEVEL_META_KEY]?: LoggingLevel;
341
+ };
342
+ type EmptyResult = StripWireOnly<Infer<typeof EmptyResultSchema>>;
343
+ type CancelledNotificationParams = Infer<typeof CancelledNotificationParamsSchema>;
344
+ type CancelledNotification = Infer<typeof CancelledNotificationSchema>;
345
+ type Icon = Infer<typeof IconSchema>;
346
+ type Icons = Infer<typeof IconsSchema>;
347
+ type BaseMetadata = Infer<typeof BaseMetadataSchema>;
348
+ type Annotations = Infer<typeof AnnotationsSchema>;
349
+ type Role = Infer<typeof RoleSchema>;
350
+ type Implementation = Infer<typeof ImplementationSchema>;
351
+ /**
352
+ * Capabilities a client may support.
353
+ *
354
+ * Note: the `roots` and `sampling` capabilities are deprecated as of protocol
355
+ * version 2026-07-28 (SEP-2577); they remain in the specification for at least
356
+ * twelve months. See `ClientCapabilitiesSchema`.
357
+ */
358
+ type ClientCapabilities = Infer<typeof ClientCapabilitiesSchema>;
359
+ type InitializeRequestParams = Infer<typeof InitializeRequestParamsSchema>;
360
+ type InitializeRequest = Infer<typeof InitializeRequestSchema>;
361
+ /**
362
+ * Capabilities a server may support.
363
+ *
364
+ * Note: the `logging` capability is deprecated as of protocol version
365
+ * 2026-07-28 (SEP-2577); it remains in the specification for at least twelve
366
+ * months. See `ServerCapabilitiesSchema`.
367
+ */
368
+ type ServerCapabilities = Infer<typeof ServerCapabilitiesSchema>;
369
+ type InitializeResult = StripWireOnly<Infer<typeof InitializeResultSchema>>;
370
+ type InitializedNotification = Infer<typeof InitializedNotificationSchema>;
371
+ type DiscoverRequest = Infer<typeof DiscoverRequestSchema>;
372
+ type DiscoverResult = StripWireOnly<Infer<typeof DiscoverResultSchema>>;
373
+ type PingRequest = Infer<typeof PingRequestSchema>;
374
+ type Progress = Infer<typeof ProgressSchema>;
375
+ type ProgressNotificationParams = Infer<typeof ProgressNotificationParamsSchema>;
376
+ type ProgressNotification = Infer<typeof ProgressNotificationSchema>;
377
+ /** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */
378
+ type Task = Infer<typeof TaskSchema>;
379
+ /** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */
380
+ type TaskStatus = Infer<typeof TaskStatusSchema>;
381
+ /** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */
382
+ type TaskCreationParams = Infer<typeof TaskCreationParamsSchema>;
383
+ /** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */
384
+ type TaskMetadata = Infer<typeof TaskMetadataSchema>;
385
+ /** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */
386
+ type RelatedTaskMetadata = Infer<typeof RelatedTaskMetadataSchema>;
387
+ /** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */
388
+ type CreateTaskResult = StripWireOnly<Infer<typeof CreateTaskResultSchema>>;
389
+ /** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */
390
+ type TaskStatusNotificationParams = Infer<typeof TaskStatusNotificationParamsSchema>;
391
+ /** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */
392
+ type TaskStatusNotification = Infer<typeof TaskStatusNotificationSchema>;
393
+ /** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */
394
+ type GetTaskRequest = Infer<typeof GetTaskRequestSchema>;
395
+ /** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */
396
+ type GetTaskResult = StripWireOnly<Infer<typeof GetTaskResultSchema>>;
397
+ /** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */
398
+ type GetTaskPayloadRequest = Infer<typeof GetTaskPayloadRequestSchema>;
399
+ /** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */
400
+ type ListTasksRequest = Infer<typeof ListTasksRequestSchema>;
401
+ /** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */
402
+ type ListTasksResult = StripWireOnly<Infer<typeof ListTasksResultSchema>>;
403
+ /** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */
404
+ type CancelTaskRequest = Infer<typeof CancelTaskRequestSchema>;
405
+ /** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */
406
+ type CancelTaskResult = StripWireOnly<Infer<typeof CancelTaskResultSchema>>;
407
+ /** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */
408
+ type GetTaskPayloadResult = StripWireOnly<Infer<typeof GetTaskPayloadResultSchema>>;
409
+ type PaginatedRequestParams = Infer<typeof PaginatedRequestParamsSchema>;
410
+ type PaginatedRequest = Infer<typeof PaginatedRequestSchema>;
411
+ type PaginatedResult = StripWireOnly<Infer<typeof PaginatedResultSchema>>;
412
+ type ResourceContents = Infer<typeof ResourceContentsSchema>;
413
+ type TextResourceContents = Infer<typeof TextResourceContentsSchema>;
414
+ type BlobResourceContents = Infer<typeof BlobResourceContentsSchema>;
415
+ type Resource = Infer<typeof ResourceSchema>;
416
+ type ResourceTemplateType = Infer<typeof ResourceTemplateSchema>;
417
+ type ListResourcesRequest = Infer<typeof ListResourcesRequestSchema>;
418
+ type ListResourcesResult = StripWireOnly<Infer<typeof ListResourcesResultSchema>>;
419
+ type ListResourceTemplatesRequest = Infer<typeof ListResourceTemplatesRequestSchema>;
420
+ type ListResourceTemplatesResult = StripWireOnly<Infer<typeof ListResourceTemplatesResultSchema>>;
421
+ type ResourceRequestParams = Infer<typeof ResourceRequestParamsSchema>;
422
+ type ReadResourceRequestParams = Infer<typeof ReadResourceRequestParamsSchema>;
423
+ type ReadResourceRequest = Infer<typeof ReadResourceRequestSchema>;
424
+ type ReadResourceResult = StripWireOnly<Infer<typeof ReadResourceResultSchema>>;
425
+ type ResourceListChangedNotification = Infer<typeof ResourceListChangedNotificationSchema>;
426
+ type SubscribeRequestParams = Infer<typeof SubscribeRequestParamsSchema>;
427
+ type SubscribeRequest = Infer<typeof SubscribeRequestSchema>;
428
+ type UnsubscribeRequestParams = Infer<typeof UnsubscribeRequestParamsSchema>;
429
+ type UnsubscribeRequest = Infer<typeof UnsubscribeRequestSchema>;
430
+ type ResourceUpdatedNotificationParams = Infer<typeof ResourceUpdatedNotificationParamsSchema>;
431
+ type ResourceUpdatedNotification = Infer<typeof ResourceUpdatedNotificationSchema>;
432
+ type SubscriptionFilter = Infer<typeof SubscriptionFilterSchema>;
433
+ type SubscriptionsListenRequestParams = Infer<typeof SubscriptionsListenRequestParamsSchema>;
434
+ type SubscriptionsListenRequest = Infer<typeof SubscriptionsListenRequestSchema>;
435
+ type SubscriptionsAcknowledgedNotificationParams = Infer<typeof SubscriptionsAcknowledgedNotificationParamsSchema>;
436
+ type SubscriptionsAcknowledgedNotification = Infer<typeof SubscriptionsAcknowledgedNotificationSchema>;
437
+ type SubscriptionsListenResultMeta = Infer<typeof SubscriptionsListenResultMetaSchema>;
438
+ type SubscriptionsListenResult = StripWireOnly<Infer<typeof SubscriptionsListenResultSchema>>;
439
+ type PromptArgument = Infer<typeof PromptArgumentSchema>;
440
+ type Prompt = Infer<typeof PromptSchema>;
441
+ type ListPromptsRequest = Infer<typeof ListPromptsRequestSchema>;
442
+ type ListPromptsResult = StripWireOnly<Infer<typeof ListPromptsResultSchema>>;
443
+ type GetPromptRequestParams = Infer<typeof GetPromptRequestParamsSchema>;
444
+ type GetPromptRequest = Infer<typeof GetPromptRequestSchema>;
445
+ type TextContent = Infer<typeof TextContentSchema>;
446
+ type ImageContent = Infer<typeof ImageContentSchema>;
447
+ type AudioContent = Infer<typeof AudioContentSchema>;
448
+ /**
449
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
450
+ * in the specification for at least twelve months. Migrate to calling LLM
451
+ * provider APIs directly.
452
+ */
453
+ type ToolUseContent = Infer<typeof ToolUseContentSchema>;
454
+ /**
455
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
456
+ * in the specification for at least twelve months. Migrate to calling LLM
457
+ * provider APIs directly.
458
+ */
459
+ type ToolResultContent = Infer<typeof ToolResultContentSchema>;
460
+ type EmbeddedResource = Infer<typeof EmbeddedResourceSchema>;
461
+ type ResourceLink = Infer<typeof ResourceLinkSchema>;
462
+ type ContentBlock = Infer<typeof ContentBlockSchema>;
463
+ type PromptMessage = Infer<typeof PromptMessageSchema>;
464
+ type GetPromptResult = StripWireOnly<Infer<typeof GetPromptResultSchema>>;
465
+ type PromptListChangedNotification = Infer<typeof PromptListChangedNotificationSchema>;
466
+ type ToolAnnotations = Infer<typeof ToolAnnotationsSchema>;
467
+ type ToolExecution = Infer<typeof ToolExecutionSchema>;
468
+ type Tool = Infer<typeof ToolSchema>;
469
+ type ListToolsRequest = Infer<typeof ListToolsRequestSchema>;
470
+ type ListToolsResult = StripWireOnly<Infer<typeof ListToolsResultSchema>>;
471
+ type CallToolRequestParams = Infer<typeof CallToolRequestParamsSchema>;
472
+ type CallToolResult = StripWireOnly<Infer<typeof CallToolResultSchema>>;
473
+ type CompatibilityCallToolResult = StripWireOnly<Infer<typeof CompatibilityCallToolResultSchema>>;
474
+ type CallToolRequest = Infer<typeof CallToolRequestSchema>;
475
+ type ToolListChangedNotification = Infer<typeof ToolListChangedNotificationSchema>;
476
+ /**
477
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
478
+ * in the specification for at least twelve months. Migrate to stderr logging
479
+ * (STDIO servers) or OpenTelemetry.
480
+ */
481
+ type LoggingLevel = Infer<typeof LoggingLevelSchema>;
482
+ /**
483
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
484
+ * in the specification for at least twelve months. Migrate to stderr logging
485
+ * (STDIO servers) or OpenTelemetry.
486
+ */
487
+ type SetLevelRequestParams = Infer<typeof SetLevelRequestParamsSchema>;
488
+ /**
489
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
490
+ * in the specification for at least twelve months. Migrate to stderr logging
491
+ * (STDIO servers) or OpenTelemetry.
492
+ */
493
+ type SetLevelRequest = Infer<typeof SetLevelRequestSchema>;
494
+ /**
495
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
496
+ * in the specification for at least twelve months. Migrate to stderr logging
497
+ * (STDIO servers) or OpenTelemetry.
498
+ */
499
+ type LoggingMessageNotificationParams = Infer<typeof LoggingMessageNotificationParamsSchema>;
500
+ /**
501
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
502
+ * in the specification for at least twelve months. Migrate to stderr logging
503
+ * (STDIO servers) or OpenTelemetry.
504
+ */
505
+ type LoggingMessageNotification = Infer<typeof LoggingMessageNotificationSchema>;
506
+ /**
507
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
508
+ * in the specification for at least twelve months. Migrate to calling LLM
509
+ * provider APIs directly.
510
+ */
511
+ type ToolChoice = Infer<typeof ToolChoiceSchema>;
512
+ /**
513
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
514
+ * in the specification for at least twelve months. Migrate to calling LLM
515
+ * provider APIs directly.
516
+ */
517
+ type ModelHint = Infer<typeof ModelHintSchema>;
518
+ /**
519
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
520
+ * in the specification for at least twelve months. Migrate to calling LLM
521
+ * provider APIs directly.
522
+ */
523
+ type ModelPreferences = Infer<typeof ModelPreferencesSchema>;
524
+ /**
525
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
526
+ * in the specification for at least twelve months. Migrate to calling LLM
527
+ * provider APIs directly.
528
+ */
529
+ type SamplingContent = Infer<typeof SamplingContentSchema>;
530
+ /**
531
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
532
+ * in the specification for at least twelve months. Migrate to calling LLM
533
+ * provider APIs directly.
534
+ */
535
+ type SamplingMessageContentBlock = Infer<typeof SamplingMessageContentBlockSchema>;
536
+ /**
537
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
538
+ * in the specification for at least twelve months. Migrate to calling LLM
539
+ * provider APIs directly.
540
+ */
541
+ type SamplingMessage = Infer<typeof SamplingMessageSchema>;
542
+ /**
543
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
544
+ * in the specification for at least twelve months. Migrate to calling LLM
545
+ * provider APIs directly.
546
+ */
547
+ type CreateMessageRequestParams = Infer<typeof CreateMessageRequestParamsSchema>;
548
+ /**
549
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
550
+ * in the specification for at least twelve months. Migrate to calling LLM
551
+ * provider APIs directly.
552
+ */
553
+ type CreateMessageRequest = Infer<typeof CreateMessageRequestSchema>;
554
+ /**
555
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
556
+ * in the specification for at least twelve months. Migrate to calling LLM
557
+ * provider APIs directly.
558
+ */
559
+ type CreateMessageResult = StripWireOnly<Infer<typeof CreateMessageResultSchema>>;
560
+ /**
561
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
562
+ * in the specification for at least twelve months. Migrate to calling LLM
563
+ * provider APIs directly.
564
+ */
565
+ type CreateMessageResultWithTools = StripWireOnly<Infer<typeof CreateMessageResultWithToolsSchema>>;
566
+ type BooleanSchema = Infer<typeof BooleanSchemaSchema>;
567
+ type StringSchema = Infer<typeof StringSchemaSchema>;
568
+ type NumberSchema = Infer<typeof NumberSchemaSchema>;
569
+ type EnumSchema = Infer<typeof EnumSchemaSchema>;
570
+ type UntitledSingleSelectEnumSchema = Infer<typeof UntitledSingleSelectEnumSchemaSchema>;
571
+ type TitledSingleSelectEnumSchema = Infer<typeof TitledSingleSelectEnumSchemaSchema>;
572
+ type LegacyTitledEnumSchema = Infer<typeof LegacyTitledEnumSchemaSchema>;
573
+ type UntitledMultiSelectEnumSchema = Infer<typeof UntitledMultiSelectEnumSchemaSchema>;
574
+ type TitledMultiSelectEnumSchema = Infer<typeof TitledMultiSelectEnumSchemaSchema>;
575
+ type SingleSelectEnumSchema = Infer<typeof SingleSelectEnumSchemaSchema>;
576
+ type MultiSelectEnumSchema = Infer<typeof MultiSelectEnumSchemaSchema>;
577
+ type PrimitiveSchemaDefinition = Infer<typeof PrimitiveSchemaDefinitionSchema>;
578
+ type ElicitRequestParams = Infer<typeof ElicitRequestParamsSchema>;
579
+ type ElicitRequestFormParams = Infer<typeof ElicitRequestFormParamsSchema>;
580
+ type ElicitRequestURLParams = Infer<typeof ElicitRequestURLParamsSchema>;
581
+ type ElicitRequest = Infer<typeof ElicitRequestSchema>;
582
+ /** @deprecated Removed from the spec by #2891 (2026-07-28). 2025-era only; the 2026-07-28 wire codec excludes this notification. */
583
+ type ElicitationCompleteNotificationParams = Infer<typeof ElicitationCompleteNotificationParamsSchema>;
584
+ /** @deprecated Removed from the spec by #2891 (2026-07-28). 2025-era only; the 2026-07-28 wire codec excludes this notification. */
585
+ type ElicitationCompleteNotification = Infer<typeof ElicitationCompleteNotificationSchema>;
586
+ type ElicitResult = StripWireOnly<Infer<typeof ElicitResultSchema>>;
587
+ type ResourceTemplateReference = Infer<typeof ResourceTemplateReferenceSchema>;
588
+ type PromptReference = Infer<typeof PromptReferenceSchema>;
589
+ type CompleteRequestParams = Infer<typeof CompleteRequestParamsSchema>;
590
+ type CompleteRequest = Infer<typeof CompleteRequestSchema>;
591
+ type CompleteResult = StripWireOnly<Infer<typeof CompleteResultSchema>>;
592
+ /**
593
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
594
+ * in the specification for at least twelve months. Migrate to passing paths via
595
+ * tool parameters, resource URIs, or configuration.
596
+ */
597
+ type Root = Infer<typeof RootSchema>;
598
+ /**
599
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
600
+ * in the specification for at least twelve months. Migrate to passing paths via
601
+ * tool parameters, resource URIs, or configuration.
602
+ */
603
+ type ListRootsRequest = Infer<typeof ListRootsRequestSchema>;
604
+ /**
605
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
606
+ * in the specification for at least twelve months. Migrate to passing paths via
607
+ * tool parameters, resource URIs, or configuration.
608
+ */
609
+ type ListRootsResult = StripWireOnly<Infer<typeof ListRootsResultSchema>>;
610
+ /**
611
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
612
+ * in the specification for at least twelve months. Migrate to passing paths via
613
+ * tool parameters, resource URIs, or configuration.
614
+ */
615
+ type RootsListChangedNotification = Infer<typeof RootsListChangedNotificationSchema>;
616
+ /**
617
+ * A single embedded (de-JSON-RPC'd) input request inside an
618
+ * {@linkcode InputRequiredResult}: an elicitation, sampling, or roots request
619
+ * object carried in-band rather than sent as a server→client JSON-RPC request.
620
+ */
621
+ type InputRequest = CreateMessageRequest | ListRootsRequest | ElicitRequest;
622
+ /**
623
+ * A single embedded (de-JSON-RPC'd) input response inside a retried request's
624
+ * `inputResponses`: the bare result object for the corresponding
625
+ * {@linkcode InputRequest} (never wrapped in a `{method, result}` envelope).
626
+ */
627
+ type InputResponse = CreateMessageResult | ListRootsResult | ElicitResult;
628
+ /**
629
+ * A map of embedded input requests, keyed by server-assigned identifiers that
630
+ * are unique within the scope of the request.
631
+ */
632
+ interface InputRequests {
633
+ [key: string]: InputRequest;
634
+ }
635
+ /**
636
+ * A map of embedded input responses. Keys correspond to the keys of the
637
+ * {@linkcode InputRequests} map the server sent; values are the client's bare
638
+ * result for each request.
639
+ */
640
+ interface InputResponses {
641
+ [key: string]: InputResponse;
642
+ }
643
+ /**
644
+ * The input-required result a handler for a multi-round-trip method
645
+ * (`tools/call`, `prompts/get`, `resources/read`) returns to request more
646
+ * input from the client (protocol revision 2026-07-28). Build it with the
647
+ * `inputRequired()` builder; hand-built literals are equally legal —
648
+ * `resultType: 'input_required'` is the discriminator, and the SDK re-checks
649
+ * the at-least-one rule at the seam.
650
+ *
651
+ * This is the one place the wire discriminator `resultType` appears on the
652
+ * neutral surface: the handler authors it, the 2026-07-28 codec passes it
653
+ * through to the wire, and consumers receiving results never see it (complete
654
+ * results are lifted).
655
+ *
656
+ * At least one of `inputRequests` or `requestState` must be present.
657
+ *
658
+ * `requestState` is an opaque, server-minted string echoed back verbatim by
659
+ * the client on retry. It travels through the client and MUST be treated by
660
+ * the server as attacker-controlled input on re-entry: if it influences
661
+ * authorization, resource access, or business logic, the server MUST protect
662
+ * its integrity (e.g. HMAC or AEAD) and MUST reject state that fails
663
+ * verification (spec: basic/patterns/mrtr §Server Requirements). The SDK
664
+ * applies no integrity protection by default — without a configured
665
+ * `ServerOptions.requestState.verify` hook, `ctx.mcpReq.requestState()`
666
+ * returns the raw, unverified string; with one, the seam rejects state the
667
+ * hook refuses and the accessor returns the hook's decoded payload.
668
+ */
669
+ interface InputRequiredResult extends Result$1 {
670
+ resultType: 'input_required';
671
+ /** Embedded requests the client must fulfil before retrying. */
672
+ inputRequests?: InputRequests;
673
+ /** Opaque server state the client echoes back verbatim on retry. */
674
+ requestState?: string;
675
+ }
676
+ type ClientRequest = Infer<typeof ClientRequestSchema>;
677
+ type ClientNotification = Infer<typeof ClientNotificationSchema>;
678
+ type ClientResult = StripWireOnly<Infer<typeof ClientResultSchema>>;
679
+ type ServerRequest = Infer<typeof ServerRequestSchema>;
680
+ type ServerNotification = Infer<typeof ServerNotificationSchema>;
681
+ type ServerResult = StripWireOnly<Infer<typeof ServerResultSchema>>;
682
+ type MethodToTypeMap<U$1> = { [T in U$1 as T extends {
683
+ method: infer M extends string;
684
+ } ? M : never]: T };
685
+ /**
686
+ * Task methods are 2025-11-25 wire vocabulary with no SDK runtime: the task
687
+ * wire types stay importable (see the Tasks section above), but the typed
688
+ * method surface — `request()`, `setRequestHandler()`, `ctx.mcpReq.send()` —
689
+ * does not offer them. The wire schemas keep parsing task vocabulary for
690
+ * interoperability with 2025-11-25 peers.
691
+ */
692
+ type TaskRequestMethod = 'tasks/get' | 'tasks/result' | 'tasks/list' | 'tasks/cancel';
693
+ type TaskNotificationMethod = 'notifications/tasks/status';
694
+ type RequestMethod = Exclude<ClientRequest['method'] | ServerRequest['method'], TaskRequestMethod>;
695
+ type NotificationMethod = Exclude<ClientNotification['method'] | ServerNotification['method'], TaskNotificationMethod>;
696
+ type RequestTypeMap = MethodToTypeMap<Exclude<ClientRequest | ServerRequest, {
697
+ method: TaskRequestMethod;
698
+ }>>;
699
+ type NotificationTypeMap = MethodToTypeMap<Exclude<ClientNotification | ServerNotification, {
700
+ method: TaskNotificationMethod;
701
+ }>>;
702
+ type ResultTypeMap = {
703
+ ping: EmptyResult;
704
+ initialize: InitializeResult;
705
+ 'server/discover': DiscoverResult;
706
+ 'completion/complete': CompleteResult;
707
+ 'logging/setLevel': EmptyResult;
708
+ 'prompts/get': GetPromptResult;
709
+ 'prompts/list': ListPromptsResult;
710
+ 'resources/list': ListResourcesResult;
711
+ 'resources/templates/list': ListResourceTemplatesResult;
712
+ 'resources/read': ReadResourceResult;
713
+ 'resources/subscribe': EmptyResult;
714
+ 'resources/unsubscribe': EmptyResult;
715
+ 'subscriptions/listen': SubscriptionsListenResult;
716
+ 'tools/call': CallToolResult;
717
+ 'tools/list': ListToolsResult;
718
+ 'sampling/createMessage': CreateMessageResult | CreateMessageResultWithTools;
719
+ 'elicitation/create': ElicitResult;
720
+ 'roots/list': ListRootsResult;
721
+ };
722
+ /**
723
+ * The handler-return counterpart of {@linkcode ResultTypeMap}: what a
724
+ * registered request handler may RETURN for each method. Identical to
725
+ * `ResultTypeMap` except that the multi-round-trip methods (`tools/call`,
726
+ * `prompts/get`, `resources/read`) additionally accept an
727
+ * {@linkcode InputRequiredResult} (protocol revision 2026-07-28).
728
+ *
729
+ * `ResultTypeMap` itself — what a *requester* receives — is deliberately NOT
730
+ * widened: `client.callTool()` returns a plain {@linkcode CallToolResult} on
731
+ * both protocol eras.
732
+ */
733
+ type HandlerResultTypeMap = { [M in keyof ResultTypeMap]: M extends 'tools/call' | 'prompts/get' | 'resources/read' ? ResultTypeMap[M] | InputRequiredResult : ResultTypeMap[M] };
734
+ /**
735
+ * Information about a validated access token, provided to request handlers.
736
+ */
737
+ interface AuthInfo {
738
+ /**
739
+ * The access token.
740
+ */
741
+ token: string;
742
+ /**
743
+ * The client ID associated with this token.
744
+ */
745
+ clientId: string;
746
+ /**
747
+ * Scopes associated with this token.
748
+ */
749
+ scopes: string[];
750
+ /**
751
+ * When the token expires (in seconds since epoch).
752
+ */
753
+ expiresAt?: number;
754
+ /**
755
+ * The RFC 8707 resource server identifier for which this token is valid.
756
+ * If set, this MUST match the MCP server's resource identifier (minus hash fragment).
757
+ */
758
+ resource?: URL;
759
+ /**
760
+ * Additional data associated with the token.
761
+ * This field should be used for any additional data that needs to be attached to the auth info.
762
+ */
763
+ extra?: Record<string, unknown>;
764
+ }
765
+ type JSONRPCErrorObject = {
766
+ code: number;
767
+ message: string;
768
+ data?: unknown;
769
+ };
770
+ interface ParseError extends JSONRPCErrorObject {
771
+ code: typeof PARSE_ERROR;
772
+ }
773
+ interface InvalidRequestError extends JSONRPCErrorObject {
774
+ code: typeof INVALID_REQUEST;
775
+ }
776
+ interface MethodNotFoundError extends JSONRPCErrorObject {
777
+ code: typeof METHOD_NOT_FOUND;
778
+ }
779
+ interface InvalidParamsError extends JSONRPCErrorObject {
780
+ code: typeof INVALID_PARAMS;
781
+ }
782
+ interface InternalError extends JSONRPCErrorObject {
783
+ code: typeof INTERNAL_ERROR;
784
+ }
785
+ /**
786
+ * Data carried by a `-32021` MissingRequiredClientCapability protocol error
787
+ * (protocol revision 2026-07-28).
788
+ */
789
+ interface MissingRequiredClientCapabilityErrorData {
790
+ /**
791
+ * The capabilities the server requires from the client to process the
792
+ * request, in the `ClientCapabilities` shape (only the missing
793
+ * capabilities are listed).
794
+ */
795
+ requiredCapabilities: ClientCapabilities;
796
+ }
797
+ /**
798
+ * Data carried by a `-32022` UnsupportedProtocolVersion protocol error
799
+ * (protocol revision 2026-07-28).
800
+ */
801
+ interface UnsupportedProtocolVersionErrorData {
802
+ /**
803
+ * Protocol versions the receiver supports. The sender should choose a
804
+ * mutually supported version from this list and retry.
805
+ */
806
+ supported: string[];
807
+ /**
808
+ * The protocol version that was requested.
809
+ */
810
+ requested: string;
811
+ }
812
+ /**
813
+ * Callback type for list changed notifications.
814
+ */
815
+ type ListChangedCallback<T$1> = (error: Error | null, items: T$1[] | null) => void;
816
+ /**
817
+ * Options for subscribing to list changed notifications.
818
+ *
819
+ * @typeParam T - The type of items in the list (`Tool`, `Prompt`, or `Resource`)
820
+ */
821
+ type ListChangedOptions<T$1> = {
822
+ /**
823
+ * If `true`, the list will be refreshed automatically when a list changed notification is received.
824
+ * @default true
825
+ */
826
+ autoRefresh?: boolean;
827
+ /**
828
+ * Debounce time in milliseconds. Set to `0` to disable.
829
+ * @default 300
830
+ */
831
+ debounceMs?: number;
832
+ /**
833
+ * Callback invoked when the list changes.
834
+ *
835
+ * If `autoRefresh` is `true`, `items` contains the updated list.
836
+ * If `autoRefresh` is `false`, `items` is `null` (caller should refresh manually).
837
+ */
838
+ onChanged: ListChangedCallback<T$1>;
839
+ };
840
+ /**
841
+ * Configuration for list changed notification handlers.
842
+ *
843
+ * Use this to configure handlers for tools, prompts, and resources list changes
844
+ * when creating a client.
845
+ *
846
+ * Note: Handlers are only activated if the server advertises the corresponding
847
+ * `listChanged` capability (e.g., `tools.listChanged: true`). If the server
848
+ * doesn't advertise this capability, the handler will not be set up.
849
+ */
850
+ type ListChangedHandlers = {
851
+ /**
852
+ * Handler for tool list changes.
853
+ */
854
+ tools?: ListChangedOptions<Tool>;
855
+ /**
856
+ * Handler for prompt list changes.
857
+ */
858
+ prompts?: ListChangedOptions<Prompt>;
859
+ /**
860
+ * Handler for resource list changes.
861
+ */
862
+ resources?: ListChangedOptions<Resource>;
863
+ };
864
+ /**
865
+ * Protocol-era classification of an inbound message.
866
+ *
867
+ * Populated by transports that classify messages at the edge (e.g. an HTTP
868
+ * entry distinguishing 2025-era from 2026-era traffic). The wire era itself
869
+ * is connection state (the negotiated protocol version held by the
870
+ * `Client`/`Server` instance); the protocol layer validates a classified
871
+ * message against that instance era at dispatch — a mismatch is treated as
872
+ * an entry/routing error, never a per-message era switch. Unclassified
873
+ * traffic is dispatched on the instance era unchanged.
874
+ */
875
+ interface MessageClassification {
876
+ /**
877
+ * The wire era the message was classified into: `legacy` for the
878
+ * 2025-11-25 family of revisions, `modern` for 2026-07-28 and later.
879
+ */
880
+ era: 'legacy' | 'modern';
881
+ /**
882
+ * The exact protocol revision, when the classifier derived one.
883
+ */
884
+ revision?: string;
885
+ }
886
+ /**
887
+ * Extra information about a message.
888
+ */
889
+ interface MessageExtraInfo {
890
+ /**
891
+ * The original HTTP request.
892
+ */
893
+ request?: globalThis.Request;
894
+ /**
895
+ * Protocol-era classification of the message, when the transport
896
+ * classified it at the edge. Validated by the protocol layer against the
897
+ * instance's negotiated era at dispatch (the edge→instance handoff
898
+ * check); it does not select the era itself.
899
+ */
900
+ classification?: MessageClassification;
901
+ /**
902
+ * The authentication information.
903
+ */
904
+ authInfo?: AuthInfo;
905
+ /**
906
+ * Callback to close the SSE stream for this request, triggering client reconnection.
907
+ * Only available when using {@linkcode @modelcontextprotocol/node!streamableHttp.NodeStreamableHTTPServerTransport | NodeStreamableHTTPServerTransport} with eventStore configured.
908
+ */
909
+ closeSSEStream?: () => void;
910
+ /**
911
+ * Callback to close the standalone GET SSE stream, triggering client reconnection.
912
+ * Only available when using {@linkcode @modelcontextprotocol/node!streamableHttp.NodeStreamableHTTPServerTransport | NodeStreamableHTTPServerTransport} with eventStore configured.
913
+ */
914
+ closeStandaloneSSEStream?: () => void;
915
+ }
916
+ type MetaObject = Record<string, unknown>;
917
+ type RequestMetaObject = RequestMeta;
918
+ /**
919
+ * {@linkcode CreateMessageRequestParams} without tools - for backwards-compatible overload.
920
+ * Excludes tools/toolChoice to indicate they should not be provided.
921
+ *
922
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
923
+ * in the specification for at least twelve months. Migrate to calling LLM
924
+ * provider APIs directly.
925
+ */
926
+ type CreateMessageRequestParamsBase = Omit<CreateMessageRequestParams, 'tools' | 'toolChoice'>;
927
+ /**
928
+ * {@linkcode CreateMessageRequestParams} with required tools - for tool-enabled overload.
929
+ *
930
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains
931
+ * in the specification for at least twelve months. Migrate to calling LLM
932
+ * provider APIs directly.
933
+ */
934
+ interface CreateMessageRequestParamsWithTools extends CreateMessageRequestParams {
935
+ tools: Tool[];
936
+ }
937
+ type CompleteRequestResourceTemplate = ExpandRecursively<CompleteRequest & {
938
+ params: CompleteRequestParams & {
939
+ ref: ResourceTemplateReference;
940
+ };
941
+ }>;
942
+ type CompleteRequestPrompt = ExpandRecursively<CompleteRequest & {
943
+ params: CompleteRequestParams & {
944
+ ref: PromptReference;
945
+ };
946
+ }>;
947
+ //#endregion
948
+ //#region ../core-internal/src/wire/codec.d.ts
949
+ /** Wire eras with distinct vocabulary. */
950
+ type WireEra = '2025-11-25' | '2026-07-28';
951
+ /**
952
+ * Wire-only material lifted off an inbound message by the protocol layer
953
+ * before dispatch (the V-3 seam): the reserved `_meta` envelope keys and the
954
+ * multi-round-trip driver fields. This is the typed driver-material channel
955
+ * of the codec contract — handlers never see it; the protocol layer surfaces
956
+ * it via `ctx.mcpReq.envelope` / `.inputResponses` / `.requestState`, and the
957
+ * MRTR driver (M4.1) consumes the retry fields from here.
958
+ */
959
+ interface LiftedWireMaterial {
960
+ envelope?: Partial<RequestMetaEnvelope>;
961
+ inputResponses?: Record<string, unknown>;
962
+ requestState?: string;
963
+ }
964
+ /**
965
+ * Tri-state validation outcome — the function-only contract for what the
966
+ * schema-getter pair (`hasRequestMethod` ⇒ −32601-by-absence; `…Schema(m)
967
+ * .parse` throw ⇒ −32602) used to encode in two pieces. Preserving the split
968
+ * is the point: collapsing 'absent from this era's registry' into 'invalid'
969
+ * would make the in-band fallback chain (validate → on `not-in-era` fall to
970
+ * validateInputRequest) treat absence as failure and never fall through.
971
+ */
972
+ type ValidateOutcome<T$1> = {
973
+ readonly ok: true;
974
+ readonly value: T$1;
975
+ }
976
+ /**
977
+ * Method is spec vocabulary but absent from THIS era's registry. Callers
978
+ * map to −32601 (inbound) or a typed local SdkError (outbound), or fall
979
+ * through to the in-band validator.
980
+ */ | {
981
+ readonly ok: false;
982
+ readonly reason: 'not-in-era';
983
+ }
984
+ /**
985
+ * Method is in this era's registry; payload failed the era-exact schema.
986
+ * Callers map to −32602.
987
+ */ | {
988
+ readonly ok: false;
989
+ readonly reason: 'invalid';
990
+ readonly message: string;
991
+ };
992
+ /** A single self-identifying problem found while validating a per-request `_meta` envelope. */
993
+ interface EnvelopeIssue {
994
+ /**
995
+ * The envelope key the problem is about: one of the reserved `_meta`
996
+ * keys, or a dotted path inside one.
997
+ */
998
+ readonly key: string;
999
+ /** A short description of what is wrong with that key (`missing`, or a validation message). */
1000
+ readonly problem: string;
1001
+ }
1002
+ /** Material a Client supplies for an era to build its per-request `_meta` envelope from. */
1003
+ interface OutboundEnvelopeMaterial {
1004
+ readonly protocolVersion: string;
1005
+ readonly clientInfo: Implementation;
1006
+ readonly clientCapabilities: ClientCapabilities;
1007
+ readonly logLevel?: LoggingLevel;
1008
+ }
1009
+ /** Result decode outcomes — the raw-first discrimination (V-1) lives in `decodeResult`. */
1010
+ type DecodedResult = {
1011
+ kind: 'complete';
1012
+ /** The neutral result value: wire-only material consumed/stripped. */
1013
+ result: Result$1;
1014
+ } | {
1015
+ kind: 'input_required';
1016
+ /**
1017
+ * Driver-only material (never consumer-visible). The full
1018
+ * multi-round-trip driver is M4.1 scope; this seam carries the
1019
+ * discriminated payload to it.
1020
+ */
1021
+ inputRequests: Record<string, unknown>;
1022
+ requestState?: string;
1023
+ } | {
1024
+ kind: 'invalid';
1025
+ error: SdkError;
1026
+ };
1027
+ /**
1028
+ * The per-era wire codec contract (design C §3, adapted to the live funnel
1029
+ * layout: the universal wire-only LIFT runs once in the protocol layer for
1030
+ * every message — spec, custom, and fallback paths alike — and codecs consume
1031
+ * the lifted material rather than re-implementing the strip per era).
1032
+ */
1033
+ interface WireCodec {
1034
+ readonly era: WireEra;
1035
+ /** Registry membership — the deletion story (inbound −32601 by absence; outbound typed local error). */
1036
+ hasRequestMethod(method: string): boolean;
1037
+ hasNotificationMethod(method: string): boolean;
1038
+ hasInputRequestMethod(method: string): boolean;
1039
+ /** Era-exact request validation. `not-in-era` ≡ −32601-by-absence; `invalid` ≡ −32602. */
1040
+ validateRequest<M$1 extends RequestMethod>(method: M$1, raw: unknown): ValidateOutcome<RequestTypeMap[M$1]>;
1041
+ validateRequest(method: string, raw: unknown): ValidateOutcome<unknown>;
1042
+ /** Era-exact result validation (same registry as `validateRequest`). */
1043
+ validateResult<M$1 extends RequestMethod>(method: M$1, raw: unknown): ValidateOutcome<ResultTypeMap[M$1]>;
1044
+ validateResult(method: string, raw: unknown): ValidateOutcome<unknown>;
1045
+ /** Era-exact notification validation. */
1046
+ validateNotification<M$1 extends NotificationMethod>(method: M$1, raw: unknown): ValidateOutcome<NotificationTypeMap[M$1]>;
1047
+ validateNotification(method: string, raw: unknown): ValidateOutcome<unknown>;
1048
+ /**
1049
+ * In-band (de-JSON-RPC'd) input-request validation — the embedded
1050
+ * requests a multi-round-trip `input_required` result may carry. Always
1051
+ * `not-in-era` on the 2025 era (elicitation/sampling/roots are wire
1052
+ * request methods there). Does NOT grant registry membership.
1053
+ */
1054
+ validateInputRequest<M$1 extends RequestMethod>(method: M$1, raw: unknown): ValidateOutcome<RequestTypeMap[M$1]>;
1055
+ validateInputRequest(method: string, raw: unknown): ValidateOutcome<unknown>;
1056
+ /** In-band bare-response validation answering an embedded input request. */
1057
+ validateInputResponse<M$1 extends RequestMethod>(method: M$1, raw: unknown): ValidateOutcome<ResultTypeMap[M$1]>;
1058
+ validateInputResponse(method: string, raw: unknown): ValidateOutcome<unknown>;
1059
+ /**
1060
+ * Param-conditional `sampling/createMessage` result validation — the one
1061
+ * spec result whose schema depends on REQUEST params (tools vs no tools).
1062
+ * The 2025 era owns the with-tools/plain frozen schemas; the 2026 era
1063
+ * returns `not-in-era` (sampling is in-band there — callers fall through
1064
+ * to `validateInputResponse`).
1065
+ */
1066
+ samplingResultVariant(hasTools: true, raw: unknown): ValidateOutcome<CreateMessageResultWithTools>;
1067
+ samplingResultVariant(hasTools: false, raw: unknown): ValidateOutcome<CreateMessageResult>;
1068
+ samplingResultVariant(hasTools: boolean, raw: unknown): ValidateOutcome<CreateMessageResult | CreateMessageResultWithTools>;
1069
+ /**
1070
+ * Outbound per-request `_meta` envelope encode. Returns the keyed object
1071
+ * to merge into `params._meta` on this era, or `undefined` when this era
1072
+ * carries no per-request envelope (the 2025 era — legacy wire stays
1073
+ * byte-identical).
1074
+ */
1075
+ outboundEnvelope(material: OutboundEnvelopeMaterial): Readonly<Record<string, unknown>> | undefined;
1076
+ /**
1077
+ * Structured envelope validation: maps a `_meta` object to
1078
+ * self-identifying issues. The 2025 era never requires an envelope and
1079
+ * always returns `[]`; the 2026 era owns the required-key pre-pass plus
1080
+ * the wire-exact `RequestMetaEnvelopeSchema` parse.
1081
+ */
1082
+ validateEnvelopeMeta(meta: Readonly<Record<string, unknown>>): EnvelopeIssue[];
1083
+ /**
1084
+ * Per-registration `tools/call` result projection. Two independent
1085
+ * decisions, both owned here so server-side code never re-derives them:
1086
+ *
1087
+ * - SEP-2106 §4.3 TextContent auto-append (EVERY era, value-shape-based):
1088
+ * when `structuredContent` is a non-object value (array/primitive/
1089
+ * `null`) and the handler authored no `type:'text'` block, append
1090
+ * `{type:'text', text: JSON.stringify(value)}` so consumers that read
1091
+ * only `content` still receive a rendering. The author opts out by
1092
+ * returning any `text` block themselves.
1093
+ *
1094
+ * - `{result:…}` wrap (2025 era only): wrap as `{result:<value>}` when the
1095
+ * value is non-object (the 2025 wire shape requires `structuredContent`
1096
+ * to be an object — a schema-less tool returning `[1,2,3]` would
1097
+ * otherwise ship wire-illegal bytes) OR when the tool's ADVERTISED
1098
+ * `outputSchema` has a non-object root (so the result matches the
1099
+ * `encodeResult('tools/list')` projection of the same tool). Identity on
1100
+ * the 2026 era — the wire shape carries the natural value directly.
1101
+ */
1102
+ projectCallToolResult(result: CallToolResult, advertisedOutputSchema: Readonly<Record<string, unknown>> | undefined): CallToolResult;
1103
+ /**
1104
+ * Step 1 of result decoding: RAW `resultType` handling BEFORE any schema
1105
+ * validation (V-1's structural home). Era postures (Q1-SD3):
1106
+ * - 2026 era: required discriminator — absent ⇒ typed error naming the
1107
+ * spec violation; `input_required` ⇒ driver payload; unknown ⇒ invalid,
1108
+ * no retry; `complete` ⇒ consume + lift.
1109
+ * - 2025 era: `resultType` is foreign vocabulary ⇒ strip-on-lift.
1110
+ */
1111
+ decodeResult(method: string, raw: unknown): DecodedResult;
1112
+ /**
1113
+ * Outbound result mapping (the stamp seam). The 2025-era codec is the
1114
+ * identity — it has NO stamp code path (the never-stamp guarantee). The
1115
+ * 2026-era codec strictly enforces the 2026 wire shape for the known
1116
+ * deleted-field set (`execution.taskSupport`, `capabilities.tasks` —
1117
+ * Q1-SD3 iii), stamps `resultType`, and fills the required
1118
+ * `ttlMs`/`cacheScope` fields on cacheable results.
1119
+ */
1120
+ encodeResult(method: string, result: Result$1): Result$1;
1121
+ /**
1122
+ * Outbound error-code mapping (the error half of the stamp seam). A
1123
+ * handler-thrown `ProtocolError`'s numeric code passes through here on
1124
+ * its way to the JSON-RPC error response, so per-era wire-code selection
1125
+ * lives in the codec rather than in handler/funnel code. The current
1126
+ * mapping is identical on both eras (the `-32002` resource-not-found
1127
+ * domain code maps to `-32602` Invalid Params on the wire — the
1128
+ * 2026-07-28 spec MUST, and what the deployed v1.x SDK already emits on
1129
+ * earlier revisions); the seam is the structural home for any future
1130
+ * per-era divergence. Unknown codes pass through unchanged.
1131
+ */
1132
+ encodeErrorCode(code: number): number;
1133
+ /**
1134
+ * @deprecated Use {@link validateEnvelopeMeta}. Inbound envelope
1135
+ * enforcement for era-classified traffic: validates the lifted envelope
1136
+ * material of a request. Returns an error message when the era requires
1137
+ * an envelope and it is missing/invalid (→ −32602 at the dispatch
1138
+ * layer); `undefined` when acceptable. The 2025 era never requires an
1139
+ * envelope.
1140
+ */
1141
+ checkInboundEnvelope(material: LiftedWireMaterial): string | undefined;
1142
+ }
1143
+ //#endregion
1144
+ //#region ../core-internal/src/util/standardSchema.d.ts
1145
+ interface StandardTypedV1<Input = unknown, Output = Input> {
1146
+ readonly '~standard': StandardTypedV1.Props<Input, Output>;
1147
+ }
1148
+ declare namespace StandardTypedV1 {
1149
+ interface Props<Input = unknown, Output = Input> {
1150
+ readonly version: 1;
1151
+ readonly vendor: string;
1152
+ readonly types?: Types<Input, Output> | undefined;
1153
+ }
1154
+ interface Types<Input = unknown, Output = Input> {
1155
+ readonly input: Input;
1156
+ readonly output: Output;
1157
+ }
1158
+ type InferInput<Schema extends StandardTypedV1> = NonNullable<Schema['~standard']['types']>['input'];
1159
+ type InferOutput<Schema extends StandardTypedV1> = NonNullable<Schema['~standard']['types']>['output'];
1160
+ }
1161
+ interface StandardSchemaV1<Input = unknown, Output = Input> {
1162
+ readonly '~standard': StandardSchemaV1.Props<Input, Output>;
1163
+ }
1164
+ declare namespace StandardSchemaV1 {
1165
+ interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
1166
+ readonly validate: (value: unknown, options?: Options | undefined) => Result<Output> | Promise<Result<Output>>;
1167
+ }
1168
+ interface Options {
1169
+ readonly libraryOptions?: Record<string, unknown> | undefined;
1170
+ }
1171
+ type Result<Output> = SuccessResult<Output> | FailureResult;
1172
+ interface SuccessResult<Output> {
1173
+ readonly value: Output;
1174
+ readonly issues?: undefined;
1175
+ }
1176
+ interface FailureResult {
1177
+ readonly issues: ReadonlyArray<Issue>;
1178
+ }
1179
+ interface Issue {
1180
+ readonly message: string;
1181
+ readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
1182
+ }
1183
+ interface PathSegment {
1184
+ readonly key: PropertyKey;
1185
+ }
1186
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
1187
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
1188
+ }
1189
+ interface StandardJSONSchemaV1<Input = unknown, Output = Input> {
1190
+ readonly '~standard': StandardJSONSchemaV1.Props<Input, Output>;
1191
+ }
1192
+ declare namespace StandardJSONSchemaV1 {
1193
+ interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
1194
+ readonly jsonSchema: Converter;
1195
+ }
1196
+ interface Converter {
1197
+ readonly input: (options: Options) => Record<string, unknown>;
1198
+ readonly output: (options: Options) => Record<string, unknown>;
1199
+ }
1200
+ type Target = 'draft-2020-12' | 'draft-07' | 'openapi-3.0' | (object & string);
1201
+ interface Options {
1202
+ readonly target: Target;
1203
+ readonly libraryOptions?: Record<string, unknown> | undefined;
1204
+ }
1205
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
1206
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
1207
+ }
1208
+ /**
1209
+ * Combined interface for schemas with both validation and JSON Schema conversion —
1210
+ * the intersection of {@linkcode StandardSchemaV1} and {@linkcode StandardJSONSchemaV1}.
1211
+ *
1212
+ * This is the type accepted by `registerTool` / `registerPrompt`. The SDK needs
1213
+ * `~standard.jsonSchema` to advertise the tool's argument shape in `tools/list`, and
1214
+ * `~standard.validate` to check incoming arguments when a `tools/call` arrives.
1215
+ *
1216
+ * Zod v4, ArkType, and Valibot (via `@valibot/to-json-schema`'s `toStandardJsonSchema`)
1217
+ * all implement both interfaces.
1218
+ *
1219
+ * @see https://standardschema.dev/ for the Standard Schema specification
1220
+ */
1221
+ interface StandardSchemaWithJSON<Input = unknown, Output = Input> {
1222
+ readonly '~standard': StandardSchemaV1.Props<Input, Output> & StandardJSONSchemaV1.Props<Input, Output>;
1223
+ }
1224
+ declare namespace StandardSchemaWithJSON {
1225
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
1226
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
1227
+ }
1228
+ /**
1229
+ * Narrowing of {@linkcode StandardSchemaV1} whose `validate` is guaranteed synchronous.
1230
+ *
1231
+ * The Zod schemas backing `specTypeSchemas` contain no async refinements or transforms,
1232
+ * so every entry satisfies this interface. Consumers can call `validate()` and access
1233
+ * `.issues` / `.value` on the result without `await`.
1234
+ *
1235
+ * `StandardSchemaV1Sync` is assignable to `StandardSchemaV1` — it is a strict subtype.
1236
+ */
1237
+ interface StandardSchemaV1Sync<Input = unknown, Output = Input> extends StandardSchemaV1<Input, Output> {
1238
+ readonly '~standard': StandardSchemaV1Sync.Props<Input, Output>;
1239
+ }
1240
+ declare namespace StandardSchemaV1Sync {
1241
+ interface Props<Input = unknown, Output = Input> extends StandardSchemaV1.Props<Input, Output> {
1242
+ readonly validate: (value: unknown, options?: StandardSchemaV1.Options | undefined) => StandardSchemaV1.Result<Output>;
1243
+ }
1244
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
1245
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
1246
+ }
1247
+ //#endregion
1248
+ //#region ../core-internal/src/shared/inputRequired.d.ts
1249
+ /**
1250
+ * Wraps a result schema so a request issued through `client.request()` /
1251
+ * `ctx.mcpReq.send()` with `allowInputRequired: true` is typed as either the
1252
+ * schema's result or an {@linkcode InputRequiredResult}.
1253
+ *
1254
+ * The manual multi-round-trip path: pass `{ allowInputRequired: true }` in the
1255
+ * request options so an `input_required` response is handed back to the
1256
+ * caller instead of being auto-fulfilled (or rejected), and wrap the result
1257
+ * schema with `withInputRequired()` so the returned value is typed and
1258
+ * validated correctly for both outcomes — `input_required` values pass
1259
+ * through as-is, complete results validate against the wrapped schema.
1260
+ */
1261
+ declare function withInputRequired<S extends StandardSchemaV1>(schema: S): StandardSchemaV1<unknown, StandardSchemaV1.InferOutput<S> | InputRequiredResult>;
1262
+ //#endregion
1263
+ //#region ../core-internal/src/shared/inputRequiredDriver.d.ts
1264
+ /**
1265
+ * Multi-round-trip driver options (`inputRequired` on the client options bag).
1266
+ */
1267
+ interface InputRequiredOptions {
1268
+ /**
1269
+ * Fulfil `input_required` results automatically by dispatching the
1270
+ * embedded requests to the registered handlers and retrying.
1271
+ *
1272
+ * Set to `false` for manual mode: an `input_required` response then
1273
+ * surfaces as a typed error unless the individual call opts in with
1274
+ * `allowInputRequired: true` (and, for typed results on the explicit
1275
+ * schema path, `withInputRequired()`).
1276
+ *
1277
+ * @default true
1278
+ */
1279
+ autoFulfill?: boolean;
1280
+ /**
1281
+ * Maximum number of rounds (retries) the driver performs for a single
1282
+ * call before failing with a typed
1283
+ * {@linkcode SdkErrorCode.InputRequiredRoundsExceeded} error.
1284
+ *
1285
+ * @default 10
1286
+ */
1287
+ maxRounds?: number;
1288
+ }
1289
+ //#endregion
1290
+ //#region ../core-internal/src/types/enums.d.ts
1291
+ /**
1292
+ * Error codes for protocol errors that cross the wire as JSON-RPC error responses.
1293
+ * These follow the JSON-RPC specification and MCP-specific extensions.
1294
+ */
1295
+ declare enum ProtocolErrorCode {
1296
+ ParseError = -32700,
1297
+ InvalidRequest = -32600,
1298
+ MethodNotFound = -32601,
1299
+ InvalidParams = -32602,
1300
+ InternalError = -32603,
1301
+ /**
1302
+ * Resource not found.
1303
+ *
1304
+ * Receive-tolerated only: the SDK never EMITS `-32002` — `resources/read`
1305
+ * misses answer `-32602` (Invalid Params) on every protocol revision per
1306
+ * the 2026-07-28 spec MUST, and a handler-thrown `-32002` is mapped to
1307
+ * `-32602` at the era encode seam. The member stays importable so clients
1308
+ * can recognise `-32002` from peers built on earlier SDK releases (the
1309
+ * spec's "clients SHOULD also accept `-32002`" backwards-compatibility
1310
+ * clause). Throw `ResourceNotFoundError` instead.
1311
+ */
1312
+ ResourceNotFound = -32002,
1313
+ /**
1314
+ * Processing the request requires a capability the client did not declare
1315
+ * in the request's `clientCapabilities` (protocol revision 2026-07-28).
1316
+ */
1317
+ MissingRequiredClientCapability = -32021,
1318
+ /**
1319
+ * The request's protocol version is unknown to the server or unsupported
1320
+ * by it (protocol revision 2026-07-28).
1321
+ */
1322
+ UnsupportedProtocolVersion = -32022,
1323
+ UrlElicitationRequired = -32042,
1324
+ }
1325
+ //#endregion
1326
+ //#region ../core-internal/src/types/errors.d.ts
1327
+ /**
1328
+ * Protocol errors are JSON-RPC errors that cross the wire as error responses.
1329
+ * They use numeric error codes from the {@linkcode ProtocolErrorCode} enum.
1330
+ *
1331
+ * `instanceof` on this class (and its subclasses) is brand-matched, so it works
1332
+ * across separately bundled copies of the SDK — e.g. an error constructed by
1333
+ * `@modelcontextprotocol/client` matches the class re-exported by
1334
+ * `@modelcontextprotocol/server` in the same process.
1335
+ */
1336
+ declare class ProtocolError extends Error {
1337
+ readonly code: number;
1338
+ readonly data?: unknown | undefined;
1339
+ static [Symbol.hasInstance](value: unknown): boolean;
1340
+ /**
1341
+ * Brand-based type guard: equivalent to `value instanceof this`, as an
1342
+ * explicit static predicate (the axios/AWS-SDK `isInstance` style). Reads
1343
+ * the caller's own brand via `this`, so every branded subclass gets a
1344
+ * correctly-scoped guard by inheritance. Must be invoked on the class —
1345
+ * in callback position write `v => SdkError.isInstance(v)`, not
1346
+ * `.filter(SdkError.isInstance)` (detached calls throw rather than
1347
+ * silently matching nothing).
1348
+ */
1349
+ static isInstance<T$1 extends abstract new (...args: never[]) => unknown>(this: T$1, value: unknown): value is InstanceType<T$1>;
1350
+ constructor(code: number, message: string, data?: unknown | undefined);
1351
+ /**
1352
+ * Factory method to create the appropriate error type based on the error code and data
1353
+ */
1354
+ static fromError(code: number, message: string, data?: unknown): ProtocolError;
1355
+ }
1356
+ /**
1357
+ * Error type for a `resources/read` miss: the requested resource does not
1358
+ * exist. The wire code is `-32602` (Invalid Params) on every protocol
1359
+ * revision — the spec MUST for revision 2026-07-28, and the value the v1.x
1360
+ * SDK has always emitted on earlier revisions. The error data echoes the
1361
+ * requested URI.
1362
+ *
1363
+ * Recognise this error by checking `error.data` is exactly `{ uri: string }`
1364
+ * (a `-32602` whose data carries `uri` and nothing else is resource-not-found;
1365
+ * any other `-32602` is an ordinary Invalid Params). For backwards compatibility, clients should also
1366
+ * accept `-32002` as resource not found — earlier SDK builds emitted that
1367
+ * code, and {@linkcode ProtocolError.fromError} reconstructs this class for
1368
+ * either code **when `error.data` carries `uri`** (a bare `-32002` without
1369
+ * `data.uri` stays a generic {@linkcode ProtocolError}). `instanceof` checks
1370
+ * are brand-matched and work across separately bundled copies of the SDK.
1371
+ */
1372
+ declare class ResourceNotFoundError extends ProtocolError {
1373
+ constructor(uri: string, message?: string);
1374
+ /** The URI that was requested and not found. */
1375
+ get uri(): string;
1376
+ }
1377
+ /**
1378
+ * Specialized error type when a tool requires a URL mode elicitation.
1379
+ * This makes it nicer for the client to handle since there is specific data to work with instead of just a code to check against.
1380
+ */
1381
+ declare class UrlElicitationRequiredError extends ProtocolError {
1382
+ constructor(elicitations: ElicitRequestURLParams[], message?: string);
1383
+ get elicitations(): ElicitRequestURLParams[];
1384
+ }
1385
+ /**
1386
+ * Error type for the `-32022` UnsupportedProtocolVersion protocol error (protocol
1387
+ * revision 2026-07-28): the request's protocol version is unknown to the server or
1388
+ * unsupported by it.
1389
+ *
1390
+ * The error data lists the protocol versions the receiver supports (`supported`),
1391
+ * so the sender can choose a mutually supported version and retry, and echoes the
1392
+ * version that was requested (`requested`).
1393
+ */
1394
+ declare class UnsupportedProtocolVersionError extends ProtocolError {
1395
+ constructor(data: UnsupportedProtocolVersionErrorData, message?: string);
1396
+ /**
1397
+ * Protocol versions the receiver supports.
1398
+ */
1399
+ get supported(): string[];
1400
+ /**
1401
+ * The protocol version that was requested.
1402
+ */
1403
+ get requested(): string;
1404
+ }
1405
+ /**
1406
+ * Error type for the `-32021` MissingRequiredClientCapability protocol error
1407
+ * (protocol revision 2026-07-28): processing the request requires a capability
1408
+ * the client did not declare in the request's `clientCapabilities`.
1409
+ *
1410
+ * The error data lists the missing capabilities (`requiredCapabilities`) in
1411
+ * the `ClientCapabilities` shape, so the client can see exactly what it would
1412
+ * have to declare for the request to be served. On HTTP, the response status
1413
+ * is `400 Bad Request`.
1414
+ *
1415
+ * Recognize this error by its code and `data.requiredCapabilities`, or by
1416
+ * `instanceof` — checks are brand-matched and work across separately bundled
1417
+ * copies of the SDK.
1418
+ */
1419
+ declare class MissingRequiredClientCapabilityError extends ProtocolError {
1420
+ constructor(data: MissingRequiredClientCapabilityErrorData, message?: string);
1421
+ /**
1422
+ * The capabilities the server requires from the client to process the
1423
+ * request (only the missing capabilities are listed).
1424
+ */
1425
+ get requiredCapabilities(): ClientCapabilities;
1426
+ }
1427
+ //#endregion
1428
+ //#region ../core-internal/src/types/guards.d.ts
1429
+ /**
1430
+ * Validates and parses an unknown value as a JSON-RPC message.
1431
+ *
1432
+ * Use this to validate incoming messages in custom transport implementations.
1433
+ * Throws if the value does not conform to the JSON-RPC message schema.
1434
+ *
1435
+ * @param value - The value to validate (typically a parsed JSON object).
1436
+ * @returns The validated {@linkcode JSONRPCMessage}.
1437
+ * @throws If validation fails.
1438
+ */
1439
+ declare function parseJSONRPCMessage(value: unknown): JSONRPCMessage;
1440
+ declare const isJSONRPCRequest: (value: unknown) => value is JSONRPCRequest;
1441
+ declare const isJSONRPCNotification: (value: unknown) => value is JSONRPCNotification;
1442
+ /**
1443
+ * Checks if a value is a valid {@linkcode JSONRPCResultResponse}.
1444
+ * @param value - The value to check.
1445
+ *
1446
+ * @returns True if the value is a valid {@linkcode JSONRPCResultResponse}, false otherwise.
1447
+ */
1448
+ declare const isJSONRPCResultResponse: (value: unknown) => value is JSONRPCResultResponse;
1449
+ /**
1450
+ * Checks if a value is a valid {@linkcode JSONRPCErrorResponse}.
1451
+ * @param value - The value to check.
1452
+ *
1453
+ * @returns True if the value is a valid {@linkcode JSONRPCErrorResponse}, false otherwise.
1454
+ */
1455
+ declare const isJSONRPCErrorResponse: (value: unknown) => value is JSONRPCErrorResponse;
1456
+ /**
1457
+ * Checks if a value is a valid {@linkcode JSONRPCResponse} (either a result or error response).
1458
+ * @param value - The value to check.
1459
+ *
1460
+ * @returns True if the value is a valid {@linkcode JSONRPCResponse}, false otherwise.
1461
+ */
1462
+ declare const isJSONRPCResponse: (value: unknown) => value is JSONRPCResponse;
1463
+ /**
1464
+ * Checks if a value is a valid {@linkcode CallToolResult}.
1465
+ *
1466
+ * This is a consumer-side VALUE check against the neutral model, not a wire
1467
+ * validator: a raw wire object that additionally carries wire-only members
1468
+ * (e.g. `resultType`) still passes through the loose index signature. Use a
1469
+ * transport-level parse to validate raw wire traffic.
1470
+ *
1471
+ * @param value - The value to check.
1472
+ *
1473
+ * @returns True if the value is a valid {@linkcode CallToolResult}, false otherwise.
1474
+ */
1475
+ declare const isCallToolResult: (value: unknown) => value is CallToolResult;
1476
+ /**
1477
+ * Checks whether a value is an input-required result (protocol revision
1478
+ * 2026-07-28): the multi-round-trip return shape discriminated by
1479
+ * `resultType: 'input_required'`.
1480
+ *
1481
+ * This is a discriminator check, not a full validator — the at-least-one rule
1482
+ * (`inputRequests` or `requestState`) is enforced by the `inputRequired()`
1483
+ * builder and re-checked by the server seam for hand-built values.
1484
+ *
1485
+ * @param value - The value to check.
1486
+ * @returns True if the value carries the `input_required` discriminator.
1487
+ */
1488
+ declare const isInputRequiredResult: (value: unknown) => value is InputRequiredResult;
1489
+ /**
1490
+ * Checks if a value is a valid {@linkcode TaskAugmentedRequestParams}.
1491
+ * @param value - The value to check.
1492
+ *
1493
+ * @returns True if the value is a valid {@linkcode TaskAugmentedRequestParams}, false otherwise.
1494
+ *
1495
+ * @deprecated Recognizes 2025-11-25 task wire vocabulary, which has no SDK
1496
+ * runtime; kept importable for interoperability only.
1497
+ */
1498
+ declare const isTaskAugmentedRequestParams: (value: unknown) => value is TaskAugmentedRequestParams;
1499
+ declare const isInitializeRequest: (value: unknown) => value is InitializeRequest;
1500
+ declare const isInitializedNotification: (value: unknown) => value is InitializedNotification;
1501
+ declare function assertCompleteRequestPrompt(request: CompleteRequest): asserts request is CompleteRequestPrompt;
1502
+ declare function assertCompleteRequestResourceTemplate(request: CompleteRequest): asserts request is CompleteRequestResourceTemplate;
1503
+ //#endregion
1504
+ //#region ../core-internal/src/types/specTypeSchema.d.ts
1505
+ /**
1506
+ * Explicit allowlist of protocol Zod schemas that correspond to a public spec type in `types.ts`.
1507
+ *
1508
+ * This intentionally excludes internal helper schemas exported from `schemas.ts` that have no
1509
+ * matching public type (e.g. `ListChangedOptionsBaseSchema`, `BaseRequestParamsSchema`,
1510
+ * `NotificationsParamsSchema`, `ClientTasksCapabilitySchema`, `ServerTasksCapabilitySchema`).
1511
+ * Keeping the list explicit means new public spec types must be added here deliberately, and
1512
+ * internals never leak into `SpecTypeName`.
1513
+ *
1514
+ * `ResourceTemplateSchema` is included; its public type is exported as `ResourceTemplateType`
1515
+ * (the bare name collides with the server package's `ResourceTemplate` class), so
1516
+ * `SpecTypes['ResourceTemplate']` is structurally equal to `ResourceTemplateType` rather than to
1517
+ * a type literally named `ResourceTemplate`.
1518
+ */
1519
+ declare const SPEC_SCHEMA_KEYS: readonly ["AnnotationsSchema", "AudioContentSchema", "BaseMetadataSchema", "BlobResourceContentsSchema", "BooleanSchemaSchema", "CallToolRequestSchema", "CallToolRequestParamsSchema", "CallToolResultSchema", "CancelledNotificationSchema", "CancelledNotificationParamsSchema", "CancelTaskRequestSchema", "CancelTaskResultSchema", "ClientCapabilitiesSchema", "ClientNotificationSchema", "ClientRequestSchema", "ClientResultSchema", "CompatibilityCallToolResultSchema", "CompleteRequestSchema", "CompleteRequestParamsSchema", "CompleteResultSchema", "ContentBlockSchema", "CreateMessageRequestSchema", "CreateMessageRequestParamsSchema", "CreateMessageResultSchema", "CreateMessageResultWithToolsSchema", "CreateTaskResultSchema", "CursorSchema", "DiscoverRequestSchema", "DiscoverResultSchema", "ElicitationCompleteNotificationSchema", "ElicitationCompleteNotificationParamsSchema", "ElicitRequestSchema", "ElicitRequestFormParamsSchema", "ElicitRequestParamsSchema", "ElicitRequestURLParamsSchema", "ElicitResultSchema", "EmbeddedResourceSchema", "EmptyResultSchema", "EnumSchemaSchema", "GetPromptRequestSchema", "GetPromptRequestParamsSchema", "GetPromptResultSchema", "GetTaskPayloadRequestSchema", "GetTaskPayloadResultSchema", "GetTaskRequestSchema", "GetTaskResultSchema", "IconSchema", "IconsSchema", "ImageContentSchema", "ImplementationSchema", "InitializedNotificationSchema", "InitializeRequestSchema", "InitializeRequestParamsSchema", "InitializeResultSchema", "JSONArraySchema", "JSONObjectSchema", "JSONRPCErrorResponseSchema", "JSONRPCMessageSchema", "JSONRPCNotificationSchema", "JSONRPCRequestSchema", "JSONRPCResponseSchema", "JSONRPCResultResponseSchema", "JSONValueSchema", "LegacyTitledEnumSchemaSchema", "ListPromptsRequestSchema", "ListPromptsResultSchema", "ListResourcesRequestSchema", "ListResourcesResultSchema", "ListResourceTemplatesRequestSchema", "ListResourceTemplatesResultSchema", "ListRootsRequestSchema", "ListRootsResultSchema", "ListTasksRequestSchema", "ListTasksResultSchema", "ListToolsRequestSchema", "ListToolsResultSchema", "LoggingLevelSchema", "LoggingMessageNotificationSchema", "LoggingMessageNotificationParamsSchema", "ModelHintSchema", "ModelPreferencesSchema", "MultiSelectEnumSchemaSchema", "NotificationSchema", "NumberSchemaSchema", "PaginatedRequestSchema", "PaginatedRequestParamsSchema", "PaginatedResultSchema", "PingRequestSchema", "PrimitiveSchemaDefinitionSchema", "ProgressSchema", "ProgressNotificationSchema", "ProgressNotificationParamsSchema", "ProgressTokenSchema", "PromptSchema", "PromptArgumentSchema", "PromptListChangedNotificationSchema", "PromptMessageSchema", "PromptReferenceSchema", "ReadResourceRequestSchema", "ReadResourceRequestParamsSchema", "ReadResourceResultSchema", "RelatedTaskMetadataSchema", "RequestSchema", "RequestIdSchema", "RequestMetaSchema", "ResourceSchema", "ResourceContentsSchema", "ResourceLinkSchema", "ResourceListChangedNotificationSchema", "ResourceRequestParamsSchema", "ResourceTemplateSchema", "ResourceTemplateReferenceSchema", "ResourceUpdatedNotificationSchema", "ResourceUpdatedNotificationParamsSchema", "ResultSchema", "RoleSchema", "RootSchema", "RootsListChangedNotificationSchema", "SamplingContentSchema", "SamplingMessageSchema", "SamplingMessageContentBlockSchema", "ServerCapabilitiesSchema", "ServerNotificationSchema", "ServerRequestSchema", "ServerResultSchema", "SetLevelRequestSchema", "SetLevelRequestParamsSchema", "SingleSelectEnumSchemaSchema", "StringSchemaSchema", "SubscribeRequestSchema", "SubscribeRequestParamsSchema", "SubscriptionFilterSchema", "SubscriptionsAcknowledgedNotificationSchema", "SubscriptionsAcknowledgedNotificationParamsSchema", "SubscriptionsListenRequestSchema", "SubscriptionsListenRequestParamsSchema", "SubscriptionsListenResultSchema", "SubscriptionsListenResultMetaSchema", "TaskAugmentedRequestParamsSchema", "TaskCreationParamsSchema", "TaskMetadataSchema", "TaskSchema", "TaskStatusSchema", "TaskStatusNotificationSchema", "TaskStatusNotificationParamsSchema", "TextContentSchema", "TextResourceContentsSchema", "TitledMultiSelectEnumSchemaSchema", "TitledSingleSelectEnumSchemaSchema", "ToolSchema", "ToolAnnotationsSchema", "ToolChoiceSchema", "ToolExecutionSchema", "ToolListChangedNotificationSchema", "ToolResultContentSchema", "ToolUseContentSchema", "UnsubscribeRequestSchema", "UnsubscribeRequestParamsSchema", "UntitledMultiSelectEnumSchemaSchema", "UntitledSingleSelectEnumSchemaSchema"];
1520
+ declare const authSchemas: {
1521
+ readonly IdJagTokenExchangeResponseSchema: z.ZodObject<{
1522
+ issued_token_type: z.ZodLiteral<"urn:ietf:params:oauth:token-type:id-jag">;
1523
+ access_token: z.ZodString;
1524
+ token_type: z.ZodOptional<z.ZodString>;
1525
+ expires_in: z.ZodOptional<z.ZodNumber>;
1526
+ scope: z.ZodOptional<z.ZodString>;
1527
+ }, z.core.$strip>;
1528
+ readonly OAuthClientInformationFullSchema: z.ZodObject<{
1529
+ redirect_uris: z.ZodArray<z.ZodURL>;
1530
+ token_endpoint_auth_method: z.ZodOptional<z.ZodString>;
1531
+ grant_types: z.ZodOptional<z.ZodArray<z.ZodString>>;
1532
+ response_types: z.ZodOptional<z.ZodArray<z.ZodString>>;
1533
+ application_type: z.ZodOptional<z.ZodString>;
1534
+ client_name: z.ZodOptional<z.ZodString>;
1535
+ client_uri: z.ZodOptional<z.ZodURL>;
1536
+ logo_uri: z.ZodUnion<[z.ZodOptional<z.ZodURL>, z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<undefined, "">>]>;
1537
+ scope: z.ZodOptional<z.ZodString>;
1538
+ contacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
1539
+ tos_uri: z.ZodUnion<[z.ZodOptional<z.ZodURL>, z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<undefined, "">>]>;
1540
+ policy_uri: z.ZodOptional<z.ZodString>;
1541
+ jwks_uri: z.ZodOptional<z.ZodURL>;
1542
+ jwks: z.ZodOptional<z.ZodAny>;
1543
+ software_id: z.ZodOptional<z.ZodString>;
1544
+ software_version: z.ZodOptional<z.ZodString>;
1545
+ software_statement: z.ZodOptional<z.ZodString>;
1546
+ client_id: z.ZodString;
1547
+ client_secret: z.ZodOptional<z.ZodString>;
1548
+ client_id_issued_at: z.ZodOptional<z.ZodNumber>;
1549
+ client_secret_expires_at: z.ZodOptional<z.ZodNumber>;
1550
+ }, z.core.$strip>;
1551
+ readonly OAuthClientInformationSchema: z.ZodObject<{
1552
+ client_id: z.ZodString;
1553
+ client_secret: z.ZodOptional<z.ZodString>;
1554
+ client_id_issued_at: z.ZodOptional<z.ZodNumber>;
1555
+ client_secret_expires_at: z.ZodOptional<z.ZodNumber>;
1556
+ }, z.core.$strip>;
1557
+ readonly OAuthClientMetadataSchema: z.ZodObject<{
1558
+ redirect_uris: z.ZodArray<z.ZodURL>;
1559
+ token_endpoint_auth_method: z.ZodOptional<z.ZodString>;
1560
+ grant_types: z.ZodOptional<z.ZodArray<z.ZodString>>;
1561
+ response_types: z.ZodOptional<z.ZodArray<z.ZodString>>;
1562
+ application_type: z.ZodOptional<z.ZodString>;
1563
+ client_name: z.ZodOptional<z.ZodString>;
1564
+ client_uri: z.ZodOptional<z.ZodURL>;
1565
+ logo_uri: z.ZodUnion<[z.ZodOptional<z.ZodURL>, z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<undefined, "">>]>;
1566
+ scope: z.ZodOptional<z.ZodString>;
1567
+ contacts: z.ZodOptional<z.ZodArray<z.ZodString>>;
1568
+ tos_uri: z.ZodUnion<[z.ZodOptional<z.ZodURL>, z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<undefined, "">>]>;
1569
+ policy_uri: z.ZodOptional<z.ZodString>;
1570
+ jwks_uri: z.ZodOptional<z.ZodURL>;
1571
+ jwks: z.ZodOptional<z.ZodAny>;
1572
+ software_id: z.ZodOptional<z.ZodString>;
1573
+ software_version: z.ZodOptional<z.ZodString>;
1574
+ software_statement: z.ZodOptional<z.ZodString>;
1575
+ }, z.core.$strip>;
1576
+ readonly OAuthClientRegistrationErrorSchema: z.ZodObject<{
1577
+ error: z.ZodString;
1578
+ error_description: z.ZodOptional<z.ZodString>;
1579
+ }, z.core.$strip>;
1580
+ readonly OAuthErrorResponseSchema: z.ZodObject<{
1581
+ error: z.ZodString;
1582
+ error_description: z.ZodOptional<z.ZodString>;
1583
+ error_uri: z.ZodOptional<z.ZodString>;
1584
+ }, z.core.$strip>;
1585
+ readonly OAuthMetadataSchema: z.ZodObject<{
1586
+ issuer: z.ZodString;
1587
+ authorization_endpoint: z.ZodURL;
1588
+ token_endpoint: z.ZodURL;
1589
+ registration_endpoint: z.ZodOptional<z.ZodURL>;
1590
+ scopes_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1591
+ response_types_supported: z.ZodArray<z.ZodString>;
1592
+ response_modes_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1593
+ grant_types_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1594
+ token_endpoint_auth_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1595
+ token_endpoint_auth_signing_alg_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1596
+ service_documentation: z.ZodOptional<z.ZodURL>;
1597
+ revocation_endpoint: z.ZodOptional<z.ZodURL>;
1598
+ revocation_endpoint_auth_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1599
+ revocation_endpoint_auth_signing_alg_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1600
+ introspection_endpoint: z.ZodOptional<z.ZodString>;
1601
+ introspection_endpoint_auth_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1602
+ introspection_endpoint_auth_signing_alg_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1603
+ code_challenge_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1604
+ client_id_metadata_document_supported: z.ZodOptional<z.ZodBoolean>;
1605
+ authorization_response_iss_parameter_supported: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
1606
+ }, z.core.$loose>;
1607
+ readonly OAuthProtectedResourceMetadataSchema: z.ZodObject<{
1608
+ resource: z.ZodString;
1609
+ authorization_servers: z.ZodOptional<z.ZodArray<z.ZodURL>>;
1610
+ jwks_uri: z.ZodOptional<z.ZodString>;
1611
+ scopes_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1612
+ bearer_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1613
+ resource_signing_alg_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1614
+ resource_name: z.ZodOptional<z.ZodString>;
1615
+ resource_documentation: z.ZodOptional<z.ZodString>;
1616
+ resource_policy_uri: z.ZodOptional<z.ZodString>;
1617
+ resource_tos_uri: z.ZodOptional<z.ZodString>;
1618
+ tls_client_certificate_bound_access_tokens: z.ZodOptional<z.ZodBoolean>;
1619
+ authorization_details_types_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1620
+ dpop_signing_alg_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1621
+ dpop_bound_access_tokens_required: z.ZodOptional<z.ZodBoolean>;
1622
+ }, z.core.$loose>;
1623
+ readonly OAuthTokenRevocationRequestSchema: z.ZodObject<{
1624
+ token: z.ZodString;
1625
+ token_type_hint: z.ZodOptional<z.ZodString>;
1626
+ }, z.core.$strip>;
1627
+ readonly OAuthTokensSchema: z.ZodObject<{
1628
+ access_token: z.ZodString;
1629
+ id_token: z.ZodOptional<z.ZodString>;
1630
+ token_type: z.ZodString;
1631
+ expires_in: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
1632
+ scope: z.ZodOptional<z.ZodString>;
1633
+ refresh_token: z.ZodOptional<z.ZodString>;
1634
+ }, z.core.$strip>;
1635
+ readonly OpenIdProviderDiscoveryMetadataSchema: z.ZodObject<{
1636
+ code_challenge_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1637
+ issuer: z.ZodString;
1638
+ authorization_endpoint: z.ZodURL;
1639
+ token_endpoint: z.ZodURL;
1640
+ userinfo_endpoint: z.ZodOptional<z.ZodURL>;
1641
+ jwks_uri: z.ZodURL;
1642
+ registration_endpoint: z.ZodOptional<z.ZodURL>;
1643
+ scopes_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1644
+ response_types_supported: z.ZodArray<z.ZodString>;
1645
+ response_modes_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1646
+ grant_types_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1647
+ acr_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1648
+ subject_types_supported: z.ZodArray<z.ZodString>;
1649
+ id_token_signing_alg_values_supported: z.ZodArray<z.ZodString>;
1650
+ id_token_encryption_alg_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1651
+ id_token_encryption_enc_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1652
+ userinfo_signing_alg_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1653
+ userinfo_encryption_alg_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1654
+ userinfo_encryption_enc_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1655
+ request_object_signing_alg_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1656
+ request_object_encryption_alg_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1657
+ request_object_encryption_enc_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1658
+ token_endpoint_auth_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1659
+ token_endpoint_auth_signing_alg_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1660
+ display_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1661
+ claim_types_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1662
+ claims_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1663
+ service_documentation: z.ZodOptional<z.ZodString>;
1664
+ claims_locales_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1665
+ ui_locales_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1666
+ claims_parameter_supported: z.ZodOptional<z.ZodBoolean>;
1667
+ request_parameter_supported: z.ZodOptional<z.ZodBoolean>;
1668
+ request_uri_parameter_supported: z.ZodOptional<z.ZodBoolean>;
1669
+ require_request_uri_registration: z.ZodOptional<z.ZodBoolean>;
1670
+ op_policy_uri: z.ZodOptional<z.ZodURL>;
1671
+ op_tos_uri: z.ZodOptional<z.ZodURL>;
1672
+ client_id_metadata_document_supported: z.ZodOptional<z.ZodBoolean>;
1673
+ authorization_response_iss_parameter_supported: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
1674
+ }, z.core.$strip>;
1675
+ readonly OpenIdProviderMetadataSchema: z.ZodObject<{
1676
+ issuer: z.ZodString;
1677
+ authorization_endpoint: z.ZodURL;
1678
+ token_endpoint: z.ZodURL;
1679
+ userinfo_endpoint: z.ZodOptional<z.ZodURL>;
1680
+ jwks_uri: z.ZodURL;
1681
+ registration_endpoint: z.ZodOptional<z.ZodURL>;
1682
+ scopes_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1683
+ response_types_supported: z.ZodArray<z.ZodString>;
1684
+ response_modes_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1685
+ grant_types_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1686
+ acr_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1687
+ subject_types_supported: z.ZodArray<z.ZodString>;
1688
+ id_token_signing_alg_values_supported: z.ZodArray<z.ZodString>;
1689
+ id_token_encryption_alg_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1690
+ id_token_encryption_enc_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1691
+ userinfo_signing_alg_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1692
+ userinfo_encryption_alg_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1693
+ userinfo_encryption_enc_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1694
+ request_object_signing_alg_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1695
+ request_object_encryption_alg_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1696
+ request_object_encryption_enc_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1697
+ token_endpoint_auth_methods_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1698
+ token_endpoint_auth_signing_alg_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1699
+ display_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1700
+ claim_types_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1701
+ claims_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1702
+ service_documentation: z.ZodOptional<z.ZodString>;
1703
+ claims_locales_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1704
+ ui_locales_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
1705
+ claims_parameter_supported: z.ZodOptional<z.ZodBoolean>;
1706
+ request_parameter_supported: z.ZodOptional<z.ZodBoolean>;
1707
+ request_uri_parameter_supported: z.ZodOptional<z.ZodBoolean>;
1708
+ require_request_uri_registration: z.ZodOptional<z.ZodBoolean>;
1709
+ op_policy_uri: z.ZodOptional<z.ZodURL>;
1710
+ op_tos_uri: z.ZodOptional<z.ZodURL>;
1711
+ client_id_metadata_document_supported: z.ZodOptional<z.ZodBoolean>;
1712
+ authorization_response_iss_parameter_supported: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
1713
+ }, z.core.$loose>;
1714
+ };
1715
+ type ProtocolSchemaKey = (typeof SPEC_SCHEMA_KEYS)[number];
1716
+ type AuthSchemaKey = keyof typeof authSchemas;
1717
+ type SchemaKey = ProtocolSchemaKey | AuthSchemaKey;
1718
+ type SchemaFor<K$1 extends SchemaKey> = K$1 extends ProtocolSchemaKey ? (typeof schemas_d_exports)[K$1] : K$1 extends AuthSchemaKey ? (typeof authSchemas)[K$1] : never;
1719
+ type StripSchemaSuffix<K$1> = K$1 extends `${infer N}Schema` ? N : never;
1720
+ /**
1721
+ * Union of every named type in the SDK's protocol and OAuth schemas (e.g. `'CallToolResult'`,
1722
+ * `'ContentBlock'`, `'Tool'`, `'OAuthTokens'`). Derived from the internal Zod schemas, so it stays
1723
+ * in sync with the spec.
1724
+ */
1725
+ type SpecTypeName = StripSchemaSuffix<SchemaKey>;
1726
+ /**
1727
+ * Maps each {@linkcode SpecTypeName} to its TypeScript type.
1728
+ *
1729
+ * `SpecTypes['Tool']` is equivalent to importing the `Tool` type directly.
1730
+ * These validators cover the NEUTRAL model — the consumer-facing shapes with
1731
+ * no wire-only members (`resultType`, the reserved `_meta` envelope keys).
1732
+ * Per-revision WIRE validators are deliberately not public surface; they are
1733
+ * planned to return as versioned `zod-schemas/<revision>` exports for
1734
+ * consumers who validate raw wire traffic themselves.
1735
+ */
1736
+ type SpecTypes = { [K in SchemaKey as StripSchemaSuffix<K>]: SchemaFor<K> extends z.ZodType ? z.output<SchemaFor<K>> : never };
1737
+ /**
1738
+ * Input shape for each {@linkcode SpecTypeName}. For most types this equals {@linkcode SpecTypes},
1739
+ * but a few schemas apply defaults/preprocessing, so the accepted input may be looser than the
1740
+ * resulting output type.
1741
+ */
1742
+ type SpecTypeInputs = { [K in SchemaKey as StripSchemaSuffix<K>]: SchemaFor<K> extends z.ZodType ? z.input<SchemaFor<K>> : never };
1743
+ type SchemaRecord = { readonly [K in SpecTypeName]: StandardSchemaV1Sync<SpecTypeInputs[K], SpecTypes[K]> };
1744
+ type GuardRecord = { readonly [K in SpecTypeName]: (value: unknown) => value is SpecTypeInputs[K] };
1745
+ /**
1746
+ * Runtime validators for every MCP spec type, keyed by type name.
1747
+ *
1748
+ * Use this when you need to validate a spec-defined shape at a boundary the SDK does not own, for
1749
+ * example an extension's custom-method payload that embeds a `CallToolResult`, or a value read from
1750
+ * storage that should be a `Tool`.
1751
+ *
1752
+ * Each entry implements the Standard Schema interface, so it composes with any
1753
+ * Standard-Schema-aware library. For a simple boolean check, use {@linkcode isSpecType} instead.
1754
+ *
1755
+ * @example
1756
+ * ```ts source="./specTypeSchema.examples.ts#specTypeSchemas_basicUsage"
1757
+ * const result = specTypeSchemas.CallToolResult['~standard'].validate(untrusted);
1758
+ * if (result.issues === undefined) {
1759
+ * // result.value is CallToolResult
1760
+ * }
1761
+ * ```
1762
+ */
1763
+ declare const specTypeSchemas: SchemaRecord;
1764
+ /**
1765
+ * Type predicates for every MCP spec type, keyed by type name.
1766
+ *
1767
+ * Returns `true` if the value satisfies the schema's input type (`z.input<>`, before defaults and
1768
+ * transforms are applied), and narrows to that input type. For schemas with `.default()` or
1769
+ * `.preprocess()`, this may accept values that do not structurally match the named output type;
1770
+ * for example `isSpecType.CallToolResult({})` is `true` because `content` has a default. Use
1771
+ * `specTypeSchemas.X['~standard'].validate(value)` when you need the validated output value.
1772
+ *
1773
+ * Each guard is a standalone function, so it can be passed directly as a callback.
1774
+ *
1775
+ * @example
1776
+ * ```ts source="./specTypeSchema.examples.ts#isSpecType_basicUsage"
1777
+ * if (isSpecType.ContentBlock(value)) {
1778
+ * // value is ContentBlock
1779
+ * }
1780
+ *
1781
+ * const blocks = mixed.filter(isSpecType.ContentBlock);
1782
+ * ```
1783
+ */
1784
+ declare const isSpecType: GuardRecord;
1785
+ //#endregion
1786
+ //#region ../core-internal/src/shared/transport.d.ts
1787
+ type FetchLike = (url: string | URL, init?: RequestInit) => Promise<Response>;
1788
+ /**
1789
+ * Creates a fetch function that includes base `RequestInit` options.
1790
+ * This ensures requests inherit settings like credentials, mode, headers, etc. from the base init.
1791
+ *
1792
+ * @param baseFetch - The base fetch function to wrap (defaults to global `fetch`)
1793
+ * @param baseInit - The base `RequestInit` to merge with each request
1794
+ * @returns A wrapped fetch function that merges base options with call-specific options
1795
+ */
1796
+ declare function createFetchWithInit(baseFetch?: FetchLike, baseInit?: RequestInit): FetchLike;
1797
+ /**
1798
+ * Options for sending a JSON-RPC message.
1799
+ */
1800
+ type TransportSendOptions = {
1801
+ /**
1802
+ * If present, `relatedRequestId` is used to indicate to the transport which incoming request to associate this outgoing message with.
1803
+ */
1804
+ relatedRequestId?: RequestId | undefined;
1805
+ /**
1806
+ * The resumption token used to continue long-running requests that were interrupted.
1807
+ *
1808
+ * This allows clients to reconnect and continue from where they left off, if supported by the transport.
1809
+ */
1810
+ resumptionToken?: string | undefined;
1811
+ /**
1812
+ * A callback that is invoked when the resumption token changes, if supported by the transport.
1813
+ *
1814
+ * This allows clients to persist the latest token for potential reconnection.
1815
+ */
1816
+ onresumptiontoken?: ((token: string) => void) | undefined;
1817
+ /**
1818
+ * An abort signal for THIS outbound message's underlying request, when the
1819
+ * transport sends one outbound message per underlying request (the
1820
+ * Streamable HTTP transport's POST-per-request model). Aborting it cancels
1821
+ * the underlying request (and its SSE response stream) without closing the
1822
+ * transport. Transports that share a single channel (stdio, in-memory)
1823
+ * ignore it.
1824
+ */
1825
+ requestSignal?: AbortSignal | undefined;
1826
+ /**
1827
+ * Fired by transports that open a per-request stream (the Streamable HTTP
1828
+ * transport's POST-per-request SSE response) when that stream ends or
1829
+ * errors for any reason OTHER than a deliberate `requestSignal` abort —
1830
+ * i.e. the server closed the stream, the network dropped it, or
1831
+ * reconnection was exhausted. Transports that share a single channel
1832
+ * (stdio, in-memory) ignore it.
1833
+ */
1834
+ onRequestStreamEnd?: (() => void) | undefined;
1835
+ /**
1836
+ * Additional HTTP headers to send with THIS outbound message, when the
1837
+ * transport sends one outbound message per underlying HTTP request (the
1838
+ * Streamable HTTP transport's POST-per-request model). Transports that
1839
+ * share a single channel (stdio, in-memory) ignore it.
1840
+ *
1841
+ * The Client uses this to attach SEP-2243 `Mcp-Param-{Name}` headers to a
1842
+ * `tools/call` request on a 2026-07-28 connection. Values are sent
1843
+ * verbatim — encode anything that is not a safe RFC 9110 field value
1844
+ * before passing it here.
1845
+ */
1846
+ headers?: Readonly<Record<string, string>> | undefined;
1847
+ };
1848
+ /**
1849
+ * Describes the minimal contract for an MCP transport that a client or server can communicate over.
1850
+ */
1851
+ interface Transport {
1852
+ /**
1853
+ * Starts processing messages on the transport, including any connection steps that might need to be taken.
1854
+ *
1855
+ * This method should only be called after callbacks are installed, or else messages may be lost.
1856
+ *
1857
+ * NOTE: This method should not be called explicitly when using {@linkcode @modelcontextprotocol/client!client/client.Client | Client} or {@linkcode @modelcontextprotocol/server!server/server.Server | Server} classes, as they will implicitly call {@linkcode Transport.start | start()}.
1858
+ */
1859
+ start(): Promise<void>;
1860
+ /**
1861
+ * Sends a JSON-RPC message (request or response).
1862
+ *
1863
+ * If present, `relatedRequestId` is used to indicate to the transport which incoming request to associate this outgoing message with.
1864
+ */
1865
+ send(message: JSONRPCMessage, options?: TransportSendOptions): Promise<void>;
1866
+ /**
1867
+ * Closes the connection.
1868
+ */
1869
+ close(): Promise<void>;
1870
+ /**
1871
+ * `true` when this transport opens one underlying request per outbound
1872
+ * JSON-RPC request (the Streamable HTTP POST-per-request model) and
1873
+ * therefore honors {@linkcode TransportSendOptions.requestSignal}. The
1874
+ * 2026-07-28 spec makes closing that per-request stream the cancellation
1875
+ * signal — the protocol layer aborts `requestSignal` instead of POSTing
1876
+ * `notifications/cancelled` when this flag is set on a 2026-era
1877
+ * connection. Transports that share a single channel (stdio, in-memory)
1878
+ * leave it `undefined`.
1879
+ */
1880
+ readonly hasPerRequestStream?: boolean;
1881
+ /**
1882
+ * Callback for when the connection is closed for any reason.
1883
+ *
1884
+ * This should be invoked when {@linkcode Transport.close | close()} is called as well.
1885
+ */
1886
+ onclose?: (() => void) | undefined;
1887
+ /**
1888
+ * Callback for when an error occurs.
1889
+ *
1890
+ * Note that errors are not necessarily fatal; they are used for reporting any kind of exceptional condition out of band.
1891
+ */
1892
+ onerror?: ((error: Error) => void) | undefined;
1893
+ /**
1894
+ * Callback for when a message (request or response) is received over the connection.
1895
+ *
1896
+ * Includes the {@linkcode MessageExtraInfo.request | request} and {@linkcode MessageExtraInfo.authInfo | authInfo} if the transport is authenticated.
1897
+ *
1898
+ * The {@linkcode MessageExtraInfo.request | request} can be used to get the original request information (headers, etc.)
1899
+ */
1900
+ onmessage?: (<T$1 extends JSONRPCMessage>(message: T$1, extra?: MessageExtraInfo) => void) | undefined;
1901
+ /**
1902
+ * The session ID generated for this connection.
1903
+ */
1904
+ sessionId?: string | undefined;
1905
+ /**
1906
+ * Sets the protocol version used for the connection (called when the initialize response is received).
1907
+ */
1908
+ setProtocolVersion?: ((version: string) => void) | undefined;
1909
+ /**
1910
+ * Sets the supported protocol versions for header validation (called during connect).
1911
+ * This allows the server to pass its supported versions to the transport.
1912
+ */
1913
+ setSupportedProtocolVersions?: ((versions: string[]) => void) | undefined;
1914
+ }
1915
+ //#endregion
1916
+ //#region ../core-internal/src/shared/protocol.d.ts
1917
+ /**
1918
+ * Callback for progress notifications.
1919
+ */
1920
+ type ProgressCallback = (progress: Progress) => void;
1921
+ /**
1922
+ * Additional initialization options.
1923
+ */
1924
+ type ProtocolOptions = {
1925
+ /**
1926
+ * Protocol versions supported. The legacy `initialize` handshake offers and
1927
+ * falls back to the first 2025-era entry in the list (the client sends it,
1928
+ * the server counter-offers it); 2026-era entries are only ever selected via
1929
+ * `server/discover`. Passed to transport during {@linkcode Protocol.connect | connect()}.
1930
+ *
1931
+ * @default {@linkcode SUPPORTED_PROTOCOL_VERSIONS}
1932
+ */
1933
+ supportedProtocolVersions?: string[];
1934
+ /**
1935
+ * Whether to restrict emitted requests to only those that the remote side has indicated that they can handle, through their advertised capabilities.
1936
+ *
1937
+ * Note that this DOES NOT affect checking of _local_ side capabilities, as it is considered a logic error to mis-specify those.
1938
+ *
1939
+ * Currently this defaults to `false`, for backwards compatibility with SDK versions that did not advertise capabilities correctly. In future, this will default to `true`.
1940
+ */
1941
+ enforceStrictCapabilities?: boolean;
1942
+ /**
1943
+ * An array of notification method names that should be automatically debounced.
1944
+ * Any notifications with a method in this list will be coalesced if they
1945
+ * occur in the same tick of the event loop.
1946
+ * e.g., `['notifications/tools/list_changed']`
1947
+ */
1948
+ debouncedNotificationMethods?: string[];
1949
+ };
1950
+ /**
1951
+ * The default request timeout, in milliseconds.
1952
+ */
1953
+ declare const DEFAULT_REQUEST_TIMEOUT_MSEC = 60000;
1954
+ /**
1955
+ * Options that can be given per request.
1956
+ */
1957
+ type RequestOptions = {
1958
+ /**
1959
+ * If set, requests progress notifications from the remote end (if supported). When progress notifications are received, this callback will be invoked.
1960
+ */
1961
+ onprogress?: ProgressCallback;
1962
+ /**
1963
+ * Can be used to cancel an in-flight request. This will cause an `AbortError` to be raised from {@linkcode Protocol.request | request()}.
1964
+ */
1965
+ signal?: AbortSignal;
1966
+ /**
1967
+ * A timeout (in milliseconds) for this request. If exceeded, an {@linkcode SdkError} with code {@linkcode SdkErrorCode.RequestTimeout} will be raised from {@linkcode Protocol.request | request()}.
1968
+ *
1969
+ * If not specified, {@linkcode DEFAULT_REQUEST_TIMEOUT_MSEC} will be used as the timeout.
1970
+ */
1971
+ timeout?: number;
1972
+ /**
1973
+ * If `true`, receiving a progress notification will reset the request timeout.
1974
+ * This is useful for long-running operations that send periodic progress updates.
1975
+ * Default: `false`
1976
+ */
1977
+ resetTimeoutOnProgress?: boolean;
1978
+ /**
1979
+ * Maximum total time (in milliseconds) to wait for a response.
1980
+ * If exceeded, an {@linkcode SdkError} with code {@linkcode SdkErrorCode.RequestTimeout} will be raised, regardless of progress notifications.
1981
+ * If not specified, there is no maximum total timeout.
1982
+ *
1983
+ * For multi-round-trip requests fulfilled by the auto-fulfilment driver
1984
+ * (protocol revision 2026-07-28), the budget bounds the WHOLE flow: every
1985
+ * retry leg is given only the time remaining.
1986
+ */
1987
+ maxTotalTimeout?: number;
1988
+ /**
1989
+ * Manual multi-round-trip mode for this call (protocol revision
1990
+ * 2026-07-28): when the response is an `input_required` result, hand it
1991
+ * back to the caller instead of auto-fulfilling it (or raising a typed
1992
+ * error). The resolved value is the neutral input-required shape
1993
+ * (`resultType: 'input_required'`, `inputRequests?`, `requestState?`);
1994
+ * wrap the result schema with `withInputRequired()` on the explicit
1995
+ * schema path to type both outcomes. The caller is then responsible for
1996
+ * gathering the requested input and retrying the original request with
1997
+ * `inputResponses` / `requestState` params and a fresh request.
1998
+ *
1999
+ * Default: `false`.
2000
+ */
2001
+ allowInputRequired?: boolean;
2002
+ } & TransportSendOptions;
2003
+ /**
2004
+ * Flow context handed to {@linkcode Protocol._resolveNonCompleteResult}: the
2005
+ * originating request, its options, the wire codec that decoded the response,
2006
+ * the timestamp the originating leg was issued at (for whole-flow timeout
2007
+ * accounting), and a `retry` closure that re-enters the request funnel with
2008
+ * fresh params on a fresh request id.
2009
+ */
2010
+ interface NonCompleteResultFlow<T$1 extends StandardSchemaV1 = StandardSchemaV1> {
2011
+ codec: WireCodec;
2012
+ request: Request;
2013
+ resultSchema: T$1;
2014
+ options: RequestOptions | undefined;
2015
+ flowStartedAt: number;
2016
+ /** Re-issue the originating request with the given params and per-leg options. */
2017
+ retry(params: Record<string, unknown> | undefined, legOptions: RequestOptions): Promise<unknown>;
2018
+ }
2019
+ /**
2020
+ * Options that can be given per notification.
2021
+ */
2022
+ type NotificationOptions = {
2023
+ /**
2024
+ * May be used to indicate to the transport which incoming request to associate this outgoing notification with.
2025
+ */
2026
+ relatedRequestId?: RequestId;
2027
+ };
2028
+ /**
2029
+ * The type of `ctx.mcpReq.requestState`. The type parameter is
2030
+ * caller-asserted (no validation, like the two-argument `acceptedContent<T>`)
2031
+ * — pair with `createRequestStateCodec<T>` so the claim is backed by the
2032
+ * codec's verification.
2033
+ */
2034
+ type RequestStateAccessor = <T$1 = unknown>() => T$1 | undefined;
2035
+ /**
2036
+ * Base context provided to all request handlers.
2037
+ */
2038
+ type BaseContext = {
2039
+ /**
2040
+ * The session ID from the transport, if available.
2041
+ */
2042
+ sessionId?: string;
2043
+ /**
2044
+ * Information about the MCP request being handled.
2045
+ */
2046
+ mcpReq: {
2047
+ /**
2048
+ * The JSON-RPC ID of the request being handled.
2049
+ */
2050
+ id: RequestId;
2051
+ /**
2052
+ * The method name of the request (e.g., 'tools/call', 'ping').
2053
+ */
2054
+ method: string;
2055
+ /**
2056
+ * Metadata from the original request, with the reserved
2057
+ * `io.modelcontextprotocol/*` envelope keys already lifted out
2058
+ * (readable via `ctx.mcpReq.envelope`).
2059
+ */
2060
+ _meta?: RequestMeta;
2061
+ /**
2062
+ * The per-request `_meta` envelope (protocol revision 2026-07-28):
2063
+ * the reserved `io.modelcontextprotocol/*` keys carried by the
2064
+ * request, lifted out of the `_meta` the handler sees. Surfaced as
2065
+ * received — `Partial` because only the keys the request actually
2066
+ * carried are present (envelope requiredness is enforced per request
2067
+ * at dispatch time, not by the lift); only present at all when the
2068
+ * request carried envelope keys.
2069
+ */
2070
+ envelope?: Partial<RequestMetaEnvelope>;
2071
+ /**
2072
+ * Multi-round-trip input responses carried by a retried request
2073
+ * (protocol revision 2026-07-28), lifted out of the params the
2074
+ * handler sees. Entries are the BARE response objects keyed by the
2075
+ * identifiers the server assigned in `inputRequests`; entries that do
2076
+ * not look like bare responses (e.g. a `{method, result}` wrapper)
2077
+ * are dropped and their keys recorded in `droppedInputResponseKeys`.
2078
+ *
2079
+ * The values arrive from the client and are NOT validated by the SDK
2080
+ * — treat them as untrusted input.
2081
+ */
2082
+ inputResponses?: Record<string, unknown>;
2083
+ /**
2084
+ * Keys of `inputResponses` entries the SDK dropped because they were
2085
+ * not bare response objects (for example the wrapped `{method,
2086
+ * result}` shape some peers emit). Surfaced so a handler can re-issue
2087
+ * the corresponding input request rather than hard-fail.
2088
+ */
2089
+ droppedInputResponseKeys?: string[];
2090
+ /**
2091
+ * Reads the multi-round-trip request state for the current round:
2092
+ * the value the configured `ServerOptions.requestState.verify` hook
2093
+ * resolved with (e.g. `createRequestStateCodec.verify`'s decoded
2094
+ * payload — `mint<T>`/`requestState<T>()` are the typed pair), the
2095
+ * raw wire string when no hook is configured, or `undefined` when
2096
+ * the round carried no state. The type parameter is a compile-time
2097
+ * cast only.
2098
+ *
2099
+ * SECURITY: `requestState` round-trips through the client and MUST
2100
+ * be treated as attacker-controlled input. The SDK applies no
2101
+ * integrity protection by default — servers whose state influences
2102
+ * authorization or business logic MUST integrity-protect it and
2103
+ * verify via the `requestState.verify` hook (spec:
2104
+ * basic/patterns/mrtr, server requirements 4–5).
2105
+ */
2106
+ requestState: RequestStateAccessor;
2107
+ /**
2108
+ * An abort signal used to communicate if the request was cancelled from the sender's side.
2109
+ */
2110
+ signal: AbortSignal;
2111
+ /**
2112
+ * Sends a request that relates to the current request being handled.
2113
+ *
2114
+ * This is used by certain transports to correctly associate related messages.
2115
+ *
2116
+ * For spec methods the result type is inferred from the method name.
2117
+ * For custom (non-spec) methods, pass a result schema as the second argument.
2118
+ */
2119
+ send: {
2120
+ <M$1 extends RequestMethod>(request: {
2121
+ method: M$1;
2122
+ params?: Record<string, unknown>;
2123
+ }, options?: RequestOptions): Promise<ResultTypeMap[M$1]>;
2124
+ <T$1 extends StandardSchemaV1>(request: Request, resultSchema: T$1, options?: RequestOptions): Promise<StandardSchemaV1.InferOutput<T$1>>;
2125
+ };
2126
+ /**
2127
+ * Sends a notification that relates to the current request being handled.
2128
+ *
2129
+ * This is used by certain transports to correctly associate related messages.
2130
+ */
2131
+ notify: (notification: Notification) => Promise<void>;
2132
+ };
2133
+ /**
2134
+ * HTTP transport information, only available when using an HTTP-based transport.
2135
+ */
2136
+ http?: {
2137
+ /**
2138
+ * Information about a validated access token, provided to request handlers.
2139
+ */
2140
+ authInfo?: AuthInfo;
2141
+ };
2142
+ };
2143
+ /**
2144
+ * Context provided to server-side request handlers, extending {@linkcode BaseContext} with server-specific fields.
2145
+ */
2146
+ type ServerContext = BaseContext & {
2147
+ mcpReq: {
2148
+ /**
2149
+ * Send a log message notification to the client.
2150
+ * Respects the client's log level filter set via logging/setLevel.
2151
+ *
2152
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577).
2153
+ * Remains functional during the deprecation window (at least twelve months).
2154
+ * Migrate to stderr logging (STDIO servers) or OpenTelemetry.
2155
+ */
2156
+ log: (level: LoggingLevel, data: unknown, logger?: string) => Promise<void>;
2157
+ /**
2158
+ * Send an elicitation request to the client, requesting user input.
2159
+ *
2160
+ * @deprecated Throws on a 2026-07-28-era request — return `inputRequired(...)`
2161
+ * (multi-round-trip) from the handler instead. The 2025 push-style server-to-client request model is
2162
+ * replaced by input_required results in the 2026-07-28 protocol. If your factory serves
2163
+ * both eras, this only works on the legacy path.
2164
+ */
2165
+ elicitInput: (params: ElicitRequestFormParams | ElicitRequestURLParams, options?: RequestOptions) => Promise<ElicitResult>;
2166
+ /**
2167
+ * Request LLM sampling from the client.
2168
+ *
2169
+ * @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577).
2170
+ * Throws on a 2026-07-28-era request — return `inputRequired(...)` (multi-round-trip)
2171
+ * from the handler instead, or migrate to calling LLM provider APIs directly. The 2025 push-style
2172
+ * server-to-client request model is replaced by input_required results in the 2026-07-28
2173
+ * protocol. If your factory serves both eras, this only works on the legacy path.
2174
+ */
2175
+ requestSampling: (params: CreateMessageRequest['params'], options?: RequestOptions) => Promise<CreateMessageResult | CreateMessageResultWithTools>;
2176
+ };
2177
+ http?: {
2178
+ /**
2179
+ * The original HTTP request.
2180
+ */
2181
+ req?: globalThis.Request;
2182
+ /**
2183
+ * Closes the SSE stream for this request, triggering client reconnection.
2184
+ * Only available when using a StreamableHTTPServerTransport with eventStore configured.
2185
+ */
2186
+ closeSSE?: () => void;
2187
+ /**
2188
+ * Closes the standalone GET SSE stream, triggering client reconnection.
2189
+ * Only available when using a StreamableHTTPServerTransport with eventStore configured.
2190
+ */
2191
+ closeStandaloneSSE?: () => void;
2192
+ };
2193
+ };
2194
+ /**
2195
+ * Context provided to client-side request handlers.
2196
+ */
2197
+ type ClientContext = BaseContext;
2198
+ /**
2199
+ * Implements MCP protocol framing on top of a pluggable transport, including
2200
+ * features like request/response linking, notifications, and progress.
2201
+ *
2202
+ * `Protocol` is abstract; `Client` and `Server` are the concrete role-specific
2203
+ * implementations most code should use. Consumers that run their own JSON-RPC
2204
+ * protocol on the engine (custom methods, own handshake — e.g. the MCP Apps SDK)
2205
+ * extend `Protocol` directly instead: `connect()` wires the transport without
2206
+ * performing the MCP `initialize` handshake. Subclasses implement `buildContext`
2207
+ * (identity is fine) and the three capability assertion hooks.
2208
+ */
2209
+ declare abstract class Protocol<ContextT extends BaseContext> {
2210
+ private _options?;
2211
+ private _transport?;
2212
+ private _requestMessageId;
2213
+ private _requestHandlers;
2214
+ private _requestHandlerAbortControllers;
2215
+ private _notificationHandlers;
2216
+ private _responseHandlers;
2217
+ private _progressHandlers;
2218
+ private _timeoutInfo;
2219
+ private _pendingDebouncedNotifications;
2220
+ /**
2221
+ * The protocol version negotiated for the current connection (`undefined`
2222
+ * before negotiation completes), which determines the wire era this
2223
+ * instance speaks. Set by the SDK's negotiation and initialize paths
2224
+ * (`Client.connect`, `Server._oninitialize`).
2225
+ */
2226
+ protected _negotiatedProtocolVersion?: string;
2227
+ protected _supportedProtocolVersions: string[];
2228
+ /**
2229
+ * Callback for when the connection is closed for any reason.
2230
+ *
2231
+ * This is invoked when {@linkcode Protocol.close | close()} is called as well.
2232
+ */
2233
+ onclose?: () => void;
2234
+ /**
2235
+ * Callback for when an error occurs.
2236
+ *
2237
+ * Note that errors are not necessarily fatal; they are used for reporting any kind of exceptional condition out of band.
2238
+ */
2239
+ onerror?: (error: Error) => void;
2240
+ /**
2241
+ * A handler to invoke for any request types that do not have their own handler installed.
2242
+ */
2243
+ fallbackRequestHandler?: (request: JSONRPCRequest, ctx: ContextT) => Promise<Result$1>;
2244
+ /**
2245
+ * A handler to invoke for any notification types that do not have their own handler installed.
2246
+ */
2247
+ fallbackNotificationHandler?: (notification: Notification) => Promise<void>;
2248
+ constructor(_options?: ProtocolOptions | undefined);
2249
+ /**
2250
+ * Builds the context object for request handlers. Subclasses must override
2251
+ * to return the appropriate context type (e.g., ServerContext adds HTTP request info).
2252
+ */
2253
+ protected abstract buildContext(ctx: BaseContext, transportInfo?: MessageExtraInfo): ContextT;
2254
+ /**
2255
+ * Drop consult for inbound messages whose transport did not classify them
2256
+ * at the edge — long-lived channels such as stdio, where a role class may
2257
+ * need to decline traffic the negotiated era has no answer for (the
2258
+ * client-side inbound-request drop on modern-era connections: the
2259
+ * 2026-07-28 era has no server→client request channel, and on stdio the
2260
+ * client must never write JSON-RPC responses).
2261
+ *
2262
+ * Consulted ONLY when the transport supplied no
2263
+ * {@linkcode MessageExtraInfo.classification}: edge-classified traffic
2264
+ * never reaches the hook. Returning `'drop'` discards the message without
2265
+ * writing any response (requests are surfaced via `onerror`). The base
2266
+ * implementation returns `undefined`: unclassified traffic keeps today's
2267
+ * dispatch path unchanged. Era selection never happens here — era is
2268
+ * instance state, owned by the serving entry that constructed and
2269
+ * connected the instance.
2270
+ */
2271
+ protected _shouldDropInbound(_message: JSONRPCRequest | JSONRPCNotification): 'drop' | undefined;
2272
+ /**
2273
+ * The per-request `_meta` envelope this instance attaches to every outgoing
2274
+ * request and notification, when one applies. The base implementation
2275
+ * returns `undefined` (no envelope — the 2025-era posture, so legacy-era
2276
+ * outbound traffic is byte-identical to a build without this seam).
2277
+ * `Client` overrides it on a connection that negotiated a modern (2026-07-28+)
2278
+ * era to return the reserved protocol-version / client-info /
2279
+ * client-capabilities keys. User-supplied `_meta` keys take precedence over
2280
+ * the auto-attached ones.
2281
+ */
2282
+ protected _outboundMetaEnvelope(): Readonly<Record<string, unknown>> | undefined;
2283
+ /**
2284
+ * Attach this instance's outbound `_meta` envelope (when one is configured)
2285
+ * to a request or notification. A no-op when the seam returns `undefined`
2286
+ * — the message returns by reference, so the legacy-era wire stays
2287
+ * byte-identical. User-supplied `_meta` keys are spread last so they win
2288
+ * over the auto-attached envelope keys.
2289
+ */
2290
+ private _envelopeOutbound;
2291
+ /**
2292
+ * Extension point for non-`complete` decoded results in the response
2293
+ * funnel: a result the wire codec discriminated into a kind other than
2294
+ * `'complete'` or `'invalid'` is handed here for the role class to
2295
+ * resolve. The base default surfaces it as a typed
2296
+ * {@linkcode SdkErrorCode.UnsupportedResultType} error (no retry).
2297
+ *
2298
+ * Intended consumers (named so the seam stays accountable):
2299
+ * - the `Client`'s multi-round-trip auto-fulfilment engine, which fulfils
2300
+ * `'input_required'` results through the registered
2301
+ * elicitation/sampling/roots handlers and retries via `flow.retry`;
2302
+ * - a future client-side terminal-result handler for
2303
+ * `subscriptions/listen`, when the spec defines one.
2304
+ *
2305
+ * `Server` instances never receive `input_required` responses on their
2306
+ * outbound legs and leave the base behavior in place.
2307
+ */
2308
+ protected _resolveNonCompleteResult<T$1 extends StandardSchemaV1>(decoded: ReturnType<WireCodec['decodeResult']> & {
2309
+ kind: 'input_required';
2310
+ }, flow: NonCompleteResultFlow<T$1>): Promise<unknown>;
2311
+ /**
2312
+ * Protected accessor for a registered request handler. Used by role
2313
+ * classes that dispatch synthesized requests through the same stored
2314
+ * handler chain (e.g. the `Client` fulfilling an embedded multi-round-trip
2315
+ * input request).
2316
+ */
2317
+ protected _getRequestHandler(method: string): ((request: JSONRPCRequest, ctx: ContextT) => Promise<Result$1>) | undefined;
2318
+ private _oncancel;
2319
+ private _setupTimeout;
2320
+ private _resetTimeout;
2321
+ private _cleanupTimeout;
2322
+ /**
2323
+ * Attaches to the given transport, starts it, and starts listening for messages.
2324
+ *
2325
+ * The caller 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.
2326
+ */
2327
+ connect(transport: Transport): Promise<void>;
2328
+ /**
2329
+ * Transport-close hook. Subclass overrides MUST call `super._onclose()`
2330
+ * after their own cleanup — base teardown (response-handler settlement,
2331
+ * timeout clearing, in-flight request abort) does not run otherwise.
2332
+ */
2333
+ protected _onclose(): void;
2334
+ private _onerror;
2335
+ /**
2336
+ * Inbound-notification dispatch. Subclass overrides MUST delegate
2337
+ * unmatched traffic to `super._onnotification(rawNotification, extra)` —
2338
+ * an override that consumes only what it owns and falls through to base
2339
+ * dispatch for everything else.
2340
+ */
2341
+ protected _onnotification(rawNotification: JSONRPCNotification, extra?: MessageExtraInfo): void;
2342
+ private _onrequest;
2343
+ private _onprogress;
2344
+ /**
2345
+ * Inbound-response dispatch. Subclass overrides MUST delegate unmatched
2346
+ * traffic to `super._onresponse(response)` — an override that consumes
2347
+ * only what it owns and falls through to base dispatch for everything
2348
+ * else.
2349
+ */
2350
+ protected _onresponse(response: JSONRPCResponse | JSONRPCErrorResponse): void;
2351
+ get transport(): Transport | undefined;
2352
+ /**
2353
+ * Closes the connection.
2354
+ */
2355
+ close(): Promise<void>;
2356
+ /**
2357
+ * A method to check if a capability is supported by the remote side, for the given method to be called.
2358
+ *
2359
+ * This should be implemented by subclasses.
2360
+ */
2361
+ protected abstract assertCapabilityForMethod(method: RequestMethod | string): void;
2362
+ /**
2363
+ * A method to check if a notification is supported by the local side, for the given method to be sent.
2364
+ *
2365
+ * This should be implemented by subclasses.
2366
+ */
2367
+ protected abstract assertNotificationCapability(method: NotificationMethod | string): void;
2368
+ /**
2369
+ * A method to check if a request handler is supported by the local side, for the given method to be handled.
2370
+ *
2371
+ * This should be implemented by subclasses.
2372
+ */
2373
+ protected abstract assertRequestHandlerCapability(method: string): void;
2374
+ /**
2375
+ * Sends a request and waits for a response.
2376
+ *
2377
+ * For spec methods the result schema is resolved automatically from the method name
2378
+ * and the return type is method-keyed. For custom (non-spec) methods, pass a
2379
+ * `resultSchema` as the second argument; the response is validated against it and
2380
+ * the return type is inferred from the schema.
2381
+ *
2382
+ * Do not use this method to emit notifications! Use {@linkcode Protocol.notification | notification()} instead.
2383
+ */
2384
+ request<M$1 extends RequestMethod>(request: {
2385
+ method: M$1;
2386
+ params?: Record<string, unknown>;
2387
+ }, options?: RequestOptions): Promise<ResultTypeMap[M$1]>;
2388
+ request<T$1 extends StandardSchemaV1>(request: Request, resultSchema: T$1, options?: RequestOptions): Promise<StandardSchemaV1.InferOutput<T$1>>;
2389
+ /**
2390
+ * The wire codec for this instance's negotiated era — the phase-2 truth:
2391
+ * everything an established connection sends and receives resolves
2392
+ * through it. Legacy until a version has been negotiated.
2393
+ */
2394
+ private _negotiatedWireCodec;
2395
+ /**
2396
+ * Protected accessor for the instance's negotiated wire codec, for role
2397
+ * classes (Client/Server/McpServer) routing era-dependent behavior
2398
+ * through the codec's function-only surface — `samplingResultVariant`,
2399
+ * `outboundEnvelope`, `projectCallToolResult` — instead of branching on
2400
+ * the protocol version themselves.
2401
+ */
2402
+ protected _wireCodec(): WireCodec;
2403
+ /**
2404
+ * Outbound codec resolution: while the negotiated version is still unset
2405
+ * (the negotiation window), lifecycle messages are bootstrap-pinned BY
2406
+ * METHOD — they self-identify their era (`initialize` IS the legacy
2407
+ * handshake, `server/discover` IS the modern probe). Once a version has
2408
+ * been negotiated, the instance era is authoritative for everything — a
2409
+ * negotiated session never re-routes a method onto the other era.
2410
+ */
2411
+ private _resolveOutboundCodec;
2412
+ /**
2413
+ * Era gate for outbound requests — deletions are physical in BOTH
2414
+ * directions: sending a spec method that the resolved era does not define
2415
+ * dies locally with a typed error before anything reaches the transport.
2416
+ * Methods outside the spec universe are consumer-owned extension methods
2417
+ * and stay era-blind.
2418
+ */
2419
+ private _assertOutboundRequestInEra;
2420
+ /**
2421
+ * Sends a request and waits for a response, using the provided schema for
2422
+ * validation instead of the era registry's method-keyed entry.
2423
+ *
2424
+ * This is the internal implementation used by SDK methods whose result
2425
+ * schema cannot be expressed as a method-keyed registry entry — the one
2426
+ * surviving case is `server.createMessage`, whose result schema depends
2427
+ * on the REQUEST params (tools vs no tools) — and by callers passing
2428
+ * explicit compatibility schemas. Spec methods are still era-gated here:
2429
+ * an explicit schema never smuggles a deleted method onto the wire.
2430
+ */
2431
+ protected _requestWithSchema<T$1 extends StandardSchemaV1>(request: Request, resultSchema: T$1, options?: RequestOptions): Promise<StandardSchemaV1.InferOutput<T$1>>;
2432
+ /**
2433
+ * The request funnel proper, keyed by the resolved era codec: the codec
2434
+ * owns result decoding (raw-first `resultType` discrimination — V-1 —
2435
+ * and the era's lift posture) before the schema validation step.
2436
+ */
2437
+ private _requestWithSchemaViaCodec;
2438
+ /**
2439
+ * Emits a notification, which is a one-way message that does not expect a response.
2440
+ */
2441
+ notification(notification: Notification, options?: NotificationOptions): Promise<void>;
2442
+ /**
2443
+ * The notification funnel proper, keyed by the resolved era codec —
2444
+ * direct sends and related notifications (`ctx.mcpReq.notify`) alike
2445
+ * resolve through the instance's negotiated era at send time.
2446
+ */
2447
+ private _notificationViaCodec;
2448
+ /**
2449
+ * Registers a handler to invoke when this protocol object receives a request with the given method.
2450
+ *
2451
+ * Note that this will replace any previous request handler for the same method.
2452
+ *
2453
+ * For spec methods, pass `(method, handler)`; the request is parsed with the spec
2454
+ * schema and the handler receives the typed `Request`. For custom (non-spec)
2455
+ * methods, pass `(method, schemas, handler)`; `params` are validated against
2456
+ * `schemas.params` and the handler receives the parsed params object directly.
2457
+ * Supplying `schemas.result` types the handler's return value.
2458
+ *
2459
+ * @example Custom request method
2460
+ * ```ts source="./protocol.examples.ts#Protocol_setRequestHandler_customMethod"
2461
+ * const SearchParams = z.object({ query: z.string(), limit: z.number().optional() });
2462
+ * const SearchResult = z.object({ hits: z.array(z.string()) });
2463
+ *
2464
+ * protocol.setRequestHandler('acme/search', { params: SearchParams, result: SearchResult }, async (params, _ctx) => {
2465
+ * return { hits: [`result for ${params.query}`] };
2466
+ * });
2467
+ * ```
2468
+ */
2469
+ setRequestHandler<M$1 extends RequestMethod>(method: M$1, handler: (request: RequestTypeMap[M$1], ctx: ContextT) => HandlerResultTypeMap[M$1] | Promise<HandlerResultTypeMap[M$1]>): void;
2470
+ setRequestHandler<P extends StandardSchemaV1, R extends StandardSchemaV1 | undefined = undefined>(method: string, schemas: {
2471
+ params: P;
2472
+ result?: R;
2473
+ }, handler: (params: StandardSchemaV1.InferOutput<P>, ctx: ContextT) => InferHandlerResult<R> | Promise<InferHandlerResult<R>>): void;
2474
+ /**
2475
+ * Hook for subclasses to wrap a registered request handler with role-specific
2476
+ * validation or behavior (e.g. `Server` validates `tools/call` results, `Client`
2477
+ * validates `elicitation/create` mode and result). Runs for both the 2-arg and
2478
+ * 3-arg registration paths. The default implementation is identity.
2479
+ *
2480
+ * Subclasses overriding this hook avoid redeclaring `setRequestHandler`'s overload set.
2481
+ */
2482
+ protected _wrapHandler(_method: string, handler: (request: JSONRPCRequest, ctx: ContextT) => Promise<Result$1>): (request: JSONRPCRequest, ctx: ContextT) => Promise<Result$1>;
2483
+ /**
2484
+ * Removes the request handler for the given method.
2485
+ */
2486
+ removeRequestHandler(method: RequestMethod | string): void;
2487
+ /**
2488
+ * Asserts that a request handler has not already been set for the given method, in preparation for a new one being automatically installed.
2489
+ */
2490
+ assertCanSetRequestHandler(method: RequestMethod | string): void;
2491
+ /**
2492
+ * Registers a handler to invoke when this protocol object receives a notification with the given method.
2493
+ *
2494
+ * Note that this will replace any previous notification handler for the same method.
2495
+ *
2496
+ * For spec methods, pass `(method, handler)`; the notification is parsed with the
2497
+ * spec schema. For custom (non-spec) methods, pass `(method, schemas, handler)`;
2498
+ * `params` are validated against `schemas.params` and the handler receives the
2499
+ * parsed params object directly. The raw notification is passed as the second
2500
+ * argument; `_meta` is recoverable via `notification.params?._meta` (minus the
2501
+ * reserved `io.modelcontextprotocol/*` envelope keys, which the protocol layer
2502
+ * lifts out before dispatch).
2503
+ */
2504
+ setNotificationHandler<M$1 extends NotificationMethod>(method: M$1, handler: (notification: NotificationTypeMap[M$1]) => void | Promise<void>): void;
2505
+ setNotificationHandler<P extends StandardSchemaV1>(method: string, schemas: {
2506
+ params: P;
2507
+ }, handler: (params: StandardSchemaV1.InferOutput<P>, notification: Notification) => void | Promise<void>): void;
2508
+ /**
2509
+ * Removes the notification handler for the given method.
2510
+ */
2511
+ removeNotificationHandler(method: NotificationMethod | string): void;
2512
+ }
2513
+ /**
2514
+ * Schema bundle accepted by {@linkcode Protocol.setRequestHandler | setRequestHandler}'s 3-arg form.
2515
+ *
2516
+ * `params` is required and validates the inbound `request.params`. `result` is optional;
2517
+ * when supplied it types the handler's return value (no runtime validation is performed
2518
+ * on the result).
2519
+ */
2520
+ interface RequestHandlerSchemas<P extends StandardSchemaV1 = StandardSchemaV1, R extends StandardSchemaV1 | undefined = StandardSchemaV1 | undefined> {
2521
+ params: P;
2522
+ result?: R;
2523
+ }
2524
+ type InferHandlerResult<R extends StandardSchemaV1 | undefined> = R extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<R> : Result$1;
2525
+ declare function mergeCapabilities(base: ServerCapabilities, additional: Partial<ServerCapabilities>): ServerCapabilities;
2526
+ declare function mergeCapabilities(base: ClientCapabilities, additional: Partial<ClientCapabilities>): ClientCapabilities;
2527
+ //#endregion
2528
+ //#region ../core-internal/src/shared/mediaType.d.ts
2529
+ /**
2530
+ * Whether a raw `Content-Type` header value denotes `application/json`.
2531
+ * Parameters (for example `charset=utf-8`) are allowed and ignored; malformed
2532
+ * parameter sections do not reject a header whose media type is unambiguously
2533
+ * `application/json` (see `mediaTypeEssence` for the exact grammar).
2534
+ */
2535
+ declare function isJsonContentType(header: string | null | undefined): boolean;
2536
+ //#endregion
2537
+ //#region ../core-internal/src/shared/metadataUtils.d.ts
2538
+ /**
2539
+ * Utilities for working with {@linkcode BaseMetadata} objects.
2540
+ */
2541
+ /**
2542
+ * Gets the display name for an object with {@linkcode BaseMetadata}.
2543
+ * For tools, the precedence is: `title` → {@linkcode index.ToolAnnotations | annotations}.`title` → `name`
2544
+ * For other objects: `title` → `name`
2545
+ * This implements the spec requirement: "if no title is provided, name should be used for display purposes"
2546
+ */
2547
+ declare function getDisplayName(metadata: BaseMetadata | (BaseMetadata & {
2548
+ annotations?: {
2549
+ title?: string;
2550
+ };
2551
+ })): string;
2552
+ //#endregion
2553
+ //#region ../core-internal/src/shared/protocolEras.d.ts
2554
+ /**
2555
+ * Protocol-era helpers (pure module). The MCP wire protocol splits into two eras:
2556
+ * legacy (the 2025-11-25 family and earlier; the version is negotiated via the
2557
+ * `initialize` handshake) and modern (2026-07-28 and later; no `initialize` —
2558
+ * servers advertise versions via `server/discover` and every request carries a
2559
+ * `_meta` envelope).
2560
+ *
2561
+ * An operation that belongs to one era must only ever consult that era's subset
2562
+ * of a supported-versions list: `initialize` never accepts or counter-offers a
2563
+ * modern revision, and the `server/discover` advertisement only ever contains
2564
+ * modern revisions.
2565
+ */
2566
+ /**
2567
+ * The protocol era of a connection: `'legacy'` for the 2025-11-25 family and
2568
+ * earlier (negotiated via `initialize`), `'modern'` for 2026-07-28 and later
2569
+ * (negotiated via `server/discover`; every request carries a `_meta` envelope).
2570
+ */
2571
+ type ProtocolEra = 'legacy' | 'modern';
2572
+ //#endregion
2573
+ //#region ../core-internal/src/shared/stdio.d.ts
2574
+ declare const STDIO_DEFAULT_MAX_BUFFER_SIZE: number;
2575
+ /**
2576
+ * Buffers a continuous stdio stream into discrete JSON-RPC messages.
2577
+ */
2578
+ declare class ReadBuffer {
2579
+ private _buffer?;
2580
+ private _maxBufferSize;
2581
+ constructor(options?: {
2582
+ maxBufferSize?: number;
2583
+ });
2584
+ append(chunk: Buffer): void;
2585
+ readMessage(): JSONRPCMessage | null;
2586
+ clear(): void;
2587
+ }
2588
+ declare function deserializeMessage(line: string): JSONRPCMessage;
2589
+ declare function serializeMessage(message: JSONRPCMessage): string;
2590
+ //#endregion
2591
+ //#region ../core-internal/src/shared/uriTemplate.d.ts
2592
+ type Variables = Record<string, string | string[]>;
2593
+ declare class UriTemplate {
2594
+ /**
2595
+ * Returns true if the given string contains any URI template expressions.
2596
+ * A template expression is a sequence of characters enclosed in curly braces,
2597
+ * like `{foo}` or `{?bar}`.
2598
+ */
2599
+ static isTemplate(str: string): boolean;
2600
+ private static validateLength;
2601
+ private readonly template;
2602
+ private readonly parts;
2603
+ get variableNames(): string[];
2604
+ constructor(template: string);
2605
+ toString(): string;
2606
+ private parse;
2607
+ private getOperator;
2608
+ private getNames;
2609
+ private encodeValue;
2610
+ private expandPart;
2611
+ expand(variables: Variables): string;
2612
+ private escapeRegExp;
2613
+ private partToRegExp;
2614
+ match(uri: string): Variables | null;
2615
+ }
2616
+ //#endregion
2617
+ //#region ../core-internal/src/util/inMemory.d.ts
2618
+ /**
2619
+ * In-memory transport for creating clients and servers that talk to each other within the same process.
2620
+ *
2621
+ * Intended for testing and development. For production in-process connections, use
2622
+ * `StreamableHTTPClientTransport` against a local server URL.
2623
+ */
2624
+ declare class InMemoryTransport implements Transport {
2625
+ private _otherTransport?;
2626
+ private _messageQueue;
2627
+ private _closed;
2628
+ onclose?: () => void;
2629
+ onerror?: (error: Error) => void;
2630
+ onmessage?: (message: JSONRPCMessage, extra?: {
2631
+ authInfo?: AuthInfo;
2632
+ }) => void;
2633
+ sessionId?: string;
2634
+ /**
2635
+ * Creates a pair of linked in-memory transports that can communicate with each other. One should be passed to a {@linkcode @modelcontextprotocol/client!client/client.Client | Client} and one to a {@linkcode @modelcontextprotocol/server!server/server.Server | Server}.
2636
+ */
2637
+ static createLinkedPair(): [InMemoryTransport, InMemoryTransport];
2638
+ start(): Promise<void>;
2639
+ close(): Promise<void>;
2640
+ /**
2641
+ * Sends a message with optional auth info.
2642
+ * This is useful for testing authentication scenarios.
2643
+ */
2644
+ send(message: JSONRPCMessage, options?: {
2645
+ relatedRequestId?: RequestId;
2646
+ authInfo?: AuthInfo;
2647
+ }): Promise<void>;
2648
+ }
2649
+ //#endregion
2650
+ //#region ../core-internal/src/wire/preload.d.ts
2651
+ /**
2652
+ * Eagerly builds every lazily-constructed wire-schema layer, so that no later
2653
+ * validation pays schema-construction cost.
2654
+ *
2655
+ * Synchronous and idempotent: every layer is a memo, so the first call does
2656
+ * all the work and subsequent calls return immediately. Reference identity is
2657
+ * unaffected — this forces the same memos every lazy consumer pulls through.
2658
+ *
2659
+ * Call it at module scope on platforms that bill per-request CPU but not
2660
+ * module evaluation (isolate-based edge/serverless runtimes), where deferring
2661
+ * construction would move it into the first request of every fresh isolate:
2662
+ *
2663
+ * ```ts
2664
+ * // from '@modelcontextprotocol/server' or '@modelcontextprotocol/client' —
2665
+ * // each package bundles its own schema copy, so warm the one(s) you import.
2666
+ * preloadSchemas(); // module scope — runs during isolate warm-up
2667
+ * ```
2668
+ *
2669
+ * On Node CLIs and other process-per-invocation runtimes, prefer the lazy
2670
+ * default — there, module-scope construction is pure added boot latency.
2671
+ */
2672
+ declare function preloadSchemas(): void;
2673
+ //#endregion
2674
+ export { withInputRequired as $, resourceUrlFromServerUrl as $i, Notification as $n, SetLevelRequestParams as $r, GetTaskResult as $t, SpecTypes as A, UnsubscribeRequestParams as Ai, ListPromptsRequest as An, RequestTypeMap as Ar, CreateMessageRequestParamsWithTools as At, isJSONRPCNotification as B, INVALID_REQUEST as Bi, ListToolsRequest as Bn, Result$1 as Br, ElicitRequestURLParams as Bt, ServerContext as C, ToolAnnotations as Ci, JSONRPCResponse as Cn, Request as Cr, CompleteRequestPrompt as Ct, TransportSendOptions as D, ToolResultContent as Di, ListChangedCallback as Dn, RequestMetaObject as Dr, CreateMessageRequest as Dt, Transport as E, ToolListChangedNotification as Ei, LegacyTitledEnumSchema as En, RequestMetaEnvelope as Er, ContentBlock as Et, isCallToolResult as F, CLIENT_CAPABILITIES_META_KEY as Fi, ListResourcesResult as Fn, ResourceRequestParams as Fr, DiscoverRequest as Ft, parseJSONRPCMessage as G, PARSE_ERROR as Gi, MessageClassification as Gn, SamplingContent as Gr, EmptyResult as Gt, isJSONRPCResponse as H, LATEST_PROTOCOL_VERSION as Hi, LoggingLevel as Hn, Role as Hr, ElicitationCompleteNotification as Ht, isInitializeRequest as I, CLIENT_INFO_META_KEY as Ii, ListRootsRequest as In, ResourceTemplateReference as Ir, DiscoverResult as It, ResourceNotFoundError as J, SUBSCRIPTION_ID_META_KEY as Ji, MethodNotFoundError as Jn, ServerCapabilities as Jr, GetPromptRequestParams as Jt, MissingRequiredClientCapabilityError as K, PROTOCOL_VERSION_META_KEY as Ki, MessageExtraInfo as Kn, SamplingMessage as Kr, EnumSchema as Kt, isInitializedNotification as L, DEFAULT_NEGOTIATED_PROTOCOL_VERSION as Li, ListRootsResult as Ln, ResourceTemplateType as Lr, ElicitRequest as Lt, specTypeSchemas as M, UntitledMultiSelectEnumSchema as Mi, ListResourceTemplatesRequest as Mn, ResourceContents as Mr, CreateMessageResultWithTools as Mt, assertCompleteRequestPrompt as N, UntitledSingleSelectEnumSchema as Ni, ListResourceTemplatesResult as Nn, ResourceLink as Nr, CreateTaskResult as Nt, createFetchWithInit as O, ToolUseContent as Oi, ListChangedHandlers as On, RequestMethod as Or, CreateMessageRequestParams as Ot, assertCompleteRequestResourceTemplate as P, BAGGAGE_META_KEY as Pi, ListResourcesRequest as Pn, ResourceListChangedNotification as Pr, Cursor as Pt, InputRequiredOptions as Q, checkResourceAllowed as Qi, MultiSelectEnumSchema as Qn, SetLevelRequest as Qr, GetTaskRequest as Qt, isInputRequiredResult as R, INTERNAL_ERROR as Ri, ListTasksRequest as Rn, ResourceUpdatedNotification as Rr, ElicitRequestFormParams as Rt, RequestStateAccessor as S, Tool as Si, JSONRPCRequest as Sn, RelatedTaskMetadata as Sr, CompleteRequestParams as St, FetchLike as T, ToolExecution as Ti, JSONValue as Tn, RequestMeta as Tr, CompleteResult as Tt, isJSONRPCResultResponse as U, LOG_LEVEL_META_KEY as Ui, LoggingMessageNotification as Un, Root as Ur, ElicitationCompleteNotificationParams as Ut, isJSONRPCRequest as V, JSONRPC_VERSION as Vi, ListToolsResult as Vn, ResultTypeMap as Vr, ElicitResult as Vt, isTaskAugmentedRequestParams as W, METHOD_NOT_FOUND as Wi, LoggingMessageNotificationParams as Wn, RootsListChangedNotification as Wr, EmbeddedResource as Wt, UrlElicitationRequiredError as X, TRACEPARENT_META_KEY as Xi, ModelHint as Xn, ServerRequest as Xr, GetTaskPayloadRequest as Xt, UnsupportedProtocolVersionError as Y, SUPPORTED_PROTOCOL_VERSIONS as Yi, MissingRequiredClientCapabilityErrorData as Yn, ServerNotification as Yr, GetPromptResult as Yt, ProtocolErrorCode as Z, TRACESTATE_META_KEY as Zi, ModelPreferences as Zn, ServerResult as Zr, GetTaskPayloadResult as Zt, ProgressCallback as _, OAuthTokens as _a, TaskStatusNotificationParams as _i, JSONArray as _n, PromptMessage as _r, ClientNotification as _t, ReadBuffer as a, OAuthErrorCode as aa, SubscriptionsAcknowledgedNotification as ai, InitializeRequest as an, PaginatedRequestParams as ar, AuthInfo as at, RequestHandlerSchemas as b, StoredOAuthClientInformation as ba, TitledMultiSelectEnumSchema as bi, JSONRPCMessage as bn, ReadResourceRequestParams as br, CompatibilityCallToolResult as bt, serializeMessage as c, OAuthClientInformation as ca, SubscriptionsListenRequestParams as ci, InitializedNotification as cn, PingRequest as cr, BooleanSchema as ct, isJsonContentType as d, OAuthClientMetadata as da, Task as di, InputRequiredResult as dn, ProgressNotification as dr, CallToolResult as dt, SdkError as ea, SingleSelectEnumSchema as ei, HandlerResultTypeMap as en, NotificationMethod as er, StandardSchemaV1 as et, BaseContext as f, OAuthClientRegistrationError as fa, TaskAugmentedRequestParams as fi, InputResponse as fn, ProgressNotificationParams as fr, CancelTaskRequest as ft, NotificationOptions as g, OAuthTokenRevocationRequest as ga, TaskStatusNotification as gi, InvalidRequestError as gn, PromptListChangedNotification as gr, ClientCapabilities as gt, NonCompleteResultFlow as h, OAuthProtectedResourceMetadata as ha, TaskStatus as hi, InvalidParamsError as hn, PromptArgument as hr, CancelledNotificationParams as ht, Variables as i, OAuthError as ia, SubscriptionFilter as ii, Implementation as in, PaginatedRequest as ir, AudioContent as it, isSpecType as j, UnsupportedProtocolVersionErrorData as ji, ListPromptsResult as jn, Resource as jr, CreateMessageResult as jt, SpecTypeName as k, UnsubscribeRequest as ki, ListChangedOptions as kn, RequestParams as kr, CreateMessageRequestParamsBase as kt, ProtocolEra as l, OAuthClientInformationFull as la, SubscriptionsListenResult as li, InputRequest as ln, PrimitiveSchemaDefinition as lr, CallToolRequest as lt, DEFAULT_REQUEST_TIMEOUT_MSEC as m, OAuthMetadata as ma, TaskMetadata as mi, InternalError as mn, Prompt as mr, CancelledNotification as mt, InMemoryTransport as n, SdkHttpError as na, SubscribeRequest as ni, Icons as nn, NotificationTypeMap as nr, StandardSchemaWithJSON as nt, STDIO_DEFAULT_MAX_BUFFER_SIZE as o, AuthorizationServerMetadata as oa, SubscriptionsAcknowledgedNotificationParams as oi, InitializeRequestParams as on, PaginatedResult as or, BaseMetadata as ot, ClientContext as p, OAuthErrorResponse as pa, TaskCreationParams as pi, InputResponses as pn, ProgressToken as pr, CancelTaskResult as pt, ProtocolError as q, RELATED_TASK_META_KEY as qi, MetaObject as qn, SamplingMessageContentBlock as qr, GetPromptRequest as qt, UriTemplate as r, SdkHttpErrorData as ra, SubscribeRequestParams as ri, ImageContent as rn, NumberSchema as rr, Annotations as rt, deserializeMessage as s, IdJagTokenExchangeResponse as sa, SubscriptionsListenRequest as si, InitializeResult as sn, ParseError as sr, BlobResourceContents as st, preloadSchemas as t, SdkErrorCode as ta, StringSchema as ti, Icon as tn, NotificationParams as tr, StandardSchemaV1Sync as tt, getDisplayName as u, OAuthClientInformationMixed as ua, SubscriptionsListenResultMeta as ui, InputRequests as un, Progress as ur, CallToolRequestParams as ut, Protocol as v, OpenIdProviderDiscoveryMetadata as va, TextContent as vi, JSONObject as vn, PromptReference as vr, ClientRequest as vt, mergeCapabilities as w, ToolChoice as wi, JSONRPCResultResponse as wn, RequestId as wr, CompleteRequestResourceTemplate as wt, RequestOptions as x, StoredOAuthTokens as xa, TitledSingleSelectEnumSchema as xi, JSONRPCNotification as xn, ReadResourceResult as xr, CompleteRequest as xt, ProtocolOptions as y, OpenIdProviderMetadata as ya, TextResourceContents as yi, JSONRPCErrorResponse as yn, ReadResourceRequest as yr, ClientResult as yt, isJSONRPCErrorResponse as z, INVALID_PARAMS as zi, ListTasksResult as zn, ResourceUpdatedNotificationParams as zr, ElicitRequestParams as zt };
2675
+ //# sourceMappingURL=index-ZagFkUbt.d.mts.map