@atxp/client 0.10.3 → 0.10.4

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 (781) hide show
  1. package/dist/_virtual/additionalItems.js +4 -0
  2. package/dist/_virtual/additionalItems.js.map +1 -0
  3. package/dist/_virtual/additionalItems2.js +4 -0
  4. package/dist/_virtual/additionalItems2.js.map +1 -0
  5. package/dist/_virtual/additionalProperties.js +4 -0
  6. package/dist/_virtual/additionalProperties.js.map +1 -0
  7. package/dist/_virtual/additionalProperties2.js +4 -0
  8. package/dist/_virtual/additionalProperties2.js.map +1 -0
  9. package/dist/_virtual/ajv.js +1 -1
  10. package/dist/_virtual/ajv2.js +4 -0
  11. package/dist/_virtual/ajv2.js.map +1 -0
  12. package/dist/_virtual/ajv3.js +4 -0
  13. package/dist/_virtual/ajv3.js.map +1 -0
  14. package/dist/_virtual/allOf.js +4 -0
  15. package/dist/_virtual/allOf.js.map +1 -0
  16. package/dist/_virtual/allOf2.js +4 -0
  17. package/dist/_virtual/allOf2.js.map +1 -0
  18. package/dist/_virtual/anyOf.js +4 -0
  19. package/dist/_virtual/anyOf.js.map +1 -0
  20. package/dist/_virtual/anyOf2.js +4 -0
  21. package/dist/_virtual/anyOf2.js.map +1 -0
  22. package/dist/_virtual/applicability.js +4 -0
  23. package/dist/_virtual/applicability.js.map +1 -0
  24. package/dist/_virtual/applicability2.js +4 -0
  25. package/dist/_virtual/applicability2.js.map +1 -0
  26. package/dist/_virtual/boolSchema.js +4 -0
  27. package/dist/_virtual/boolSchema.js.map +1 -0
  28. package/dist/_virtual/boolSchema2.js +4 -0
  29. package/dist/_virtual/boolSchema2.js.map +1 -0
  30. package/dist/_virtual/code.js +4 -0
  31. package/dist/_virtual/code.js.map +1 -0
  32. package/dist/_virtual/code2.js +4 -0
  33. package/dist/_virtual/code2.js.map +1 -0
  34. package/dist/_virtual/code3.js +4 -0
  35. package/dist/_virtual/code3.js.map +1 -0
  36. package/dist/_virtual/code4.js +4 -0
  37. package/dist/_virtual/code4.js.map +1 -0
  38. package/dist/_virtual/const.js +4 -0
  39. package/dist/_virtual/const.js.map +1 -0
  40. package/dist/_virtual/const2.js +4 -0
  41. package/dist/_virtual/const2.js.map +1 -0
  42. package/dist/_virtual/contains.js +4 -0
  43. package/dist/_virtual/contains.js.map +1 -0
  44. package/dist/_virtual/contains2.js +4 -0
  45. package/dist/_virtual/contains2.js.map +1 -0
  46. package/dist/_virtual/core.js +4 -0
  47. package/dist/_virtual/core.js.map +1 -0
  48. package/dist/_virtual/core2.js +4 -0
  49. package/dist/_virtual/core2.js.map +1 -0
  50. package/dist/_virtual/dataType.js +4 -0
  51. package/dist/_virtual/dataType.js.map +1 -0
  52. package/dist/_virtual/dataType2.js +4 -0
  53. package/dist/_virtual/dataType2.js.map +1 -0
  54. package/dist/_virtual/defaults.js +4 -0
  55. package/dist/_virtual/defaults.js.map +1 -0
  56. package/dist/_virtual/defaults2.js +4 -0
  57. package/dist/_virtual/defaults2.js.map +1 -0
  58. package/dist/_virtual/dependencies.js +4 -0
  59. package/dist/_virtual/dependencies.js.map +1 -0
  60. package/dist/_virtual/dependencies2.js +4 -0
  61. package/dist/_virtual/dependencies2.js.map +1 -0
  62. package/dist/_virtual/draft7.js +4 -0
  63. package/dist/_virtual/draft7.js.map +1 -0
  64. package/dist/_virtual/draft72.js +4 -0
  65. package/dist/_virtual/draft72.js.map +1 -0
  66. package/dist/_virtual/enum.js +4 -0
  67. package/dist/_virtual/enum.js.map +1 -0
  68. package/dist/_virtual/enum2.js +4 -0
  69. package/dist/_virtual/enum2.js.map +1 -0
  70. package/dist/_virtual/equal.js +4 -0
  71. package/dist/_virtual/equal.js.map +1 -0
  72. package/dist/_virtual/equal2.js +4 -0
  73. package/dist/_virtual/equal2.js.map +1 -0
  74. package/dist/_virtual/errors.js +4 -0
  75. package/dist/_virtual/errors.js.map +1 -0
  76. package/dist/_virtual/errors2.js +4 -0
  77. package/dist/_virtual/errors2.js.map +1 -0
  78. package/dist/_virtual/format.js +4 -0
  79. package/dist/_virtual/format.js.map +1 -0
  80. package/dist/_virtual/format2.js +4 -0
  81. package/dist/_virtual/format2.js.map +1 -0
  82. package/dist/_virtual/formats.js +4 -0
  83. package/dist/_virtual/formats.js.map +1 -0
  84. package/dist/_virtual/id.js +4 -0
  85. package/dist/_virtual/id.js.map +1 -0
  86. package/dist/_virtual/id2.js +4 -0
  87. package/dist/_virtual/id2.js.map +1 -0
  88. package/dist/_virtual/if.js +4 -0
  89. package/dist/_virtual/if.js.map +1 -0
  90. package/dist/_virtual/if2.js +4 -0
  91. package/dist/_virtual/if2.js.map +1 -0
  92. package/dist/_virtual/index.js +6 -2
  93. package/dist/_virtual/index.js.map +1 -1
  94. package/dist/_virtual/index10.js +4 -0
  95. package/dist/_virtual/index10.js.map +1 -0
  96. package/dist/_virtual/index11.js +4 -0
  97. package/dist/_virtual/index11.js.map +1 -0
  98. package/dist/_virtual/index12.js +4 -0
  99. package/dist/_virtual/index12.js.map +1 -0
  100. package/dist/_virtual/index13.js +4 -0
  101. package/dist/_virtual/index13.js.map +1 -0
  102. package/dist/_virtual/index14.js +4 -0
  103. package/dist/_virtual/index14.js.map +1 -0
  104. package/dist/_virtual/index15.js +4 -0
  105. package/dist/_virtual/index15.js.map +1 -0
  106. package/dist/_virtual/index16.js +4 -0
  107. package/dist/_virtual/index16.js.map +1 -0
  108. package/dist/_virtual/index17.js +4 -0
  109. package/dist/_virtual/index17.js.map +1 -0
  110. package/dist/_virtual/index18.js +4 -0
  111. package/dist/_virtual/index18.js.map +1 -0
  112. package/dist/_virtual/index19.js +4 -0
  113. package/dist/_virtual/index19.js.map +1 -0
  114. package/dist/_virtual/index2.js +4 -0
  115. package/dist/_virtual/index2.js.map +1 -0
  116. package/dist/_virtual/index20.js +4 -0
  117. package/dist/_virtual/index20.js.map +1 -0
  118. package/dist/_virtual/index21.js +4 -0
  119. package/dist/_virtual/index21.js.map +1 -0
  120. package/dist/_virtual/index3.js +4 -0
  121. package/dist/_virtual/index3.js.map +1 -0
  122. package/dist/_virtual/index4.js +4 -0
  123. package/dist/_virtual/index4.js.map +1 -0
  124. package/dist/_virtual/index5.js +4 -0
  125. package/dist/_virtual/index5.js.map +1 -0
  126. package/dist/_virtual/index6.js +4 -0
  127. package/dist/_virtual/index6.js.map +1 -0
  128. package/dist/_virtual/index7.js +4 -0
  129. package/dist/_virtual/index7.js.map +1 -0
  130. package/dist/_virtual/index8.js +4 -0
  131. package/dist/_virtual/index8.js.map +1 -0
  132. package/dist/_virtual/index9.js +4 -0
  133. package/dist/_virtual/index9.js.map +1 -0
  134. package/dist/_virtual/items.js +4 -0
  135. package/dist/_virtual/items.js.map +1 -0
  136. package/dist/_virtual/items2.js +4 -0
  137. package/dist/_virtual/items2.js.map +1 -0
  138. package/dist/_virtual/items2020.js +4 -0
  139. package/dist/_virtual/items2020.js.map +1 -0
  140. package/dist/_virtual/items20202.js +4 -0
  141. package/dist/_virtual/items20202.js.map +1 -0
  142. package/dist/_virtual/keyword.js +4 -0
  143. package/dist/_virtual/keyword.js.map +1 -0
  144. package/dist/_virtual/keyword2.js +4 -0
  145. package/dist/_virtual/keyword2.js.map +1 -0
  146. package/dist/_virtual/limit.js +4 -0
  147. package/dist/_virtual/limit.js.map +1 -0
  148. package/dist/_virtual/limitItems.js +4 -0
  149. package/dist/_virtual/limitItems.js.map +1 -0
  150. package/dist/_virtual/limitItems2.js +4 -0
  151. package/dist/_virtual/limitItems2.js.map +1 -0
  152. package/dist/_virtual/limitLength.js +4 -0
  153. package/dist/_virtual/limitLength.js.map +1 -0
  154. package/dist/_virtual/limitLength2.js +4 -0
  155. package/dist/_virtual/limitLength2.js.map +1 -0
  156. package/dist/_virtual/limitNumber.js +4 -0
  157. package/dist/_virtual/limitNumber.js.map +1 -0
  158. package/dist/_virtual/limitNumber2.js +4 -0
  159. package/dist/_virtual/limitNumber2.js.map +1 -0
  160. package/dist/_virtual/limitProperties.js +4 -0
  161. package/dist/_virtual/limitProperties.js.map +1 -0
  162. package/dist/_virtual/limitProperties2.js +4 -0
  163. package/dist/_virtual/limitProperties2.js.map +1 -0
  164. package/dist/_virtual/metadata.js +4 -0
  165. package/dist/_virtual/metadata.js.map +1 -0
  166. package/dist/_virtual/metadata2.js +4 -0
  167. package/dist/_virtual/metadata2.js.map +1 -0
  168. package/dist/_virtual/multipleOf.js +4 -0
  169. package/dist/_virtual/multipleOf.js.map +1 -0
  170. package/dist/_virtual/multipleOf2.js +4 -0
  171. package/dist/_virtual/multipleOf2.js.map +1 -0
  172. package/dist/_virtual/names.js +4 -0
  173. package/dist/_virtual/names.js.map +1 -0
  174. package/dist/_virtual/names2.js +4 -0
  175. package/dist/_virtual/names2.js.map +1 -0
  176. package/dist/_virtual/not.js +4 -0
  177. package/dist/_virtual/not.js.map +1 -0
  178. package/dist/_virtual/not2.js +4 -0
  179. package/dist/_virtual/not2.js.map +1 -0
  180. package/dist/_virtual/oneOf.js +4 -0
  181. package/dist/_virtual/oneOf.js.map +1 -0
  182. package/dist/_virtual/oneOf2.js +4 -0
  183. package/dist/_virtual/oneOf2.js.map +1 -0
  184. package/dist/_virtual/pattern.js +4 -0
  185. package/dist/_virtual/pattern.js.map +1 -0
  186. package/dist/_virtual/pattern2.js +4 -0
  187. package/dist/_virtual/pattern2.js.map +1 -0
  188. package/dist/_virtual/patternProperties.js +4 -0
  189. package/dist/_virtual/patternProperties.js.map +1 -0
  190. package/dist/_virtual/patternProperties2.js +4 -0
  191. package/dist/_virtual/patternProperties2.js.map +1 -0
  192. package/dist/_virtual/prefixItems.js +4 -0
  193. package/dist/_virtual/prefixItems.js.map +1 -0
  194. package/dist/_virtual/prefixItems2.js +4 -0
  195. package/dist/_virtual/prefixItems2.js.map +1 -0
  196. package/dist/_virtual/properties.js +4 -0
  197. package/dist/_virtual/properties.js.map +1 -0
  198. package/dist/_virtual/properties2.js +4 -0
  199. package/dist/_virtual/properties2.js.map +1 -0
  200. package/dist/_virtual/propertyNames.js +4 -0
  201. package/dist/_virtual/propertyNames.js.map +1 -0
  202. package/dist/_virtual/propertyNames2.js +4 -0
  203. package/dist/_virtual/propertyNames2.js.map +1 -0
  204. package/dist/_virtual/ref.js +4 -0
  205. package/dist/_virtual/ref.js.map +1 -0
  206. package/dist/_virtual/ref2.js +4 -0
  207. package/dist/_virtual/ref2.js.map +1 -0
  208. package/dist/_virtual/ref_error.js +4 -0
  209. package/dist/_virtual/ref_error.js.map +1 -0
  210. package/dist/_virtual/ref_error2.js +4 -0
  211. package/dist/_virtual/ref_error2.js.map +1 -0
  212. package/dist/_virtual/required.js +4 -0
  213. package/dist/_virtual/required.js.map +1 -0
  214. package/dist/_virtual/required2.js +4 -0
  215. package/dist/_virtual/required2.js.map +1 -0
  216. package/dist/_virtual/resolve.js +4 -0
  217. package/dist/_virtual/resolve.js.map +1 -0
  218. package/dist/_virtual/resolve2.js +4 -0
  219. package/dist/_virtual/resolve2.js.map +1 -0
  220. package/dist/_virtual/rules.js +4 -0
  221. package/dist/_virtual/rules.js.map +1 -0
  222. package/dist/_virtual/rules2.js +4 -0
  223. package/dist/_virtual/rules2.js.map +1 -0
  224. package/dist/_virtual/scope.js +4 -0
  225. package/dist/_virtual/scope.js.map +1 -0
  226. package/dist/_virtual/scope2.js +4 -0
  227. package/dist/_virtual/scope2.js.map +1 -0
  228. package/dist/_virtual/subschema.js +4 -0
  229. package/dist/_virtual/subschema.js.map +1 -0
  230. package/dist/_virtual/subschema2.js +4 -0
  231. package/dist/_virtual/subschema2.js.map +1 -0
  232. package/dist/_virtual/thenElse.js +4 -0
  233. package/dist/_virtual/thenElse.js.map +1 -0
  234. package/dist/_virtual/thenElse2.js +4 -0
  235. package/dist/_virtual/thenElse2.js.map +1 -0
  236. package/dist/_virtual/types.js +4 -0
  237. package/dist/_virtual/types.js.map +1 -0
  238. package/dist/_virtual/types2.js +4 -0
  239. package/dist/_virtual/types2.js.map +1 -0
  240. package/dist/_virtual/ucs2length.js +4 -0
  241. package/dist/_virtual/ucs2length.js.map +1 -0
  242. package/dist/_virtual/ucs2length2.js +4 -0
  243. package/dist/_virtual/ucs2length2.js.map +1 -0
  244. package/dist/_virtual/uniqueItems.js +4 -0
  245. package/dist/_virtual/uniqueItems.js.map +1 -0
  246. package/dist/_virtual/uniqueItems2.js +4 -0
  247. package/dist/_virtual/uniqueItems2.js.map +1 -0
  248. package/dist/_virtual/uri.js +4 -0
  249. package/dist/_virtual/uri.js.map +1 -0
  250. package/dist/_virtual/uri2.js +4 -0
  251. package/dist/_virtual/uri2.js.map +1 -0
  252. package/dist/_virtual/util.js +4 -0
  253. package/dist/_virtual/util.js.map +1 -0
  254. package/dist/_virtual/util2.js +4 -0
  255. package/dist/_virtual/util2.js.map +1 -0
  256. package/dist/_virtual/validation_error.js +4 -0
  257. package/dist/_virtual/validation_error.js.map +1 -0
  258. package/dist/_virtual/validation_error2.js +4 -0
  259. package/dist/_virtual/validation_error2.js.map +1 -0
  260. package/dist/atxpAccount.d.ts +20 -0
  261. package/dist/atxpAccount.d.ts.map +1 -0
  262. package/dist/atxpAccount.js +161 -0
  263. package/dist/atxpAccount.js.map +1 -0
  264. package/dist/atxpFetcher.d.ts.map +1 -1
  265. package/dist/atxpFetcher.js +3 -2
  266. package/dist/atxpFetcher.js.map +1 -1
  267. package/dist/base.cjs +34 -0
  268. package/dist/base.cjs.map +1 -0
  269. package/dist/base.d.ts +4 -0
  270. package/dist/base.d.ts.map +1 -0
  271. package/dist/base.js +5 -0
  272. package/dist/base.js.map +1 -0
  273. package/dist/baseAccount.d.ts +20 -0
  274. package/dist/baseAccount.d.ts.map +1 -0
  275. package/dist/baseAccount.js +47 -0
  276. package/dist/baseAccount.js.map +1 -0
  277. package/dist/baseConstants.d.ts +10 -0
  278. package/dist/baseConstants.d.ts.map +1 -0
  279. package/dist/baseConstants.js +21 -0
  280. package/dist/baseConstants.js.map +1 -0
  281. package/dist/basePaymentMaker.d.ts +23 -0
  282. package/dist/basePaymentMaker.d.ts.map +1 -0
  283. package/dist/basePaymentMaker.js +169 -0
  284. package/dist/basePaymentMaker.js.map +1 -0
  285. package/dist/index.cjs +19885 -11547
  286. package/dist/index.cjs.map +1 -1
  287. package/dist/index.js +19885 -11547
  288. package/dist/index.js.map +1 -1
  289. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js +277 -202
  290. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js.map +1 -1
  291. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js +399 -65
  292. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js.map +1 -1
  293. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js +195 -93
  294. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js.map +1 -1
  295. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/client.js +187 -0
  296. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/client.js.map +1 -0
  297. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js +60 -0
  298. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js.map +1 -0
  299. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js +18 -0
  300. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js.map +1 -0
  301. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/errors.js +25 -17
  302. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/errors.js.map +1 -1
  303. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +85 -0
  304. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js.map +1 -0
  305. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js +30 -0
  306. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js.map +1 -0
  307. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js +3 -3
  308. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js.map +1 -1
  309. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js +129 -123
  310. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js.map +1 -1
  311. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +785 -114
  312. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js.map +1 -1
  313. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.js +41 -0
  314. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.js.map +1 -0
  315. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +1207 -513
  316. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js.map +1 -1
  317. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js +90 -0
  318. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js.map +1 -0
  319. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/ajv.js +71 -0
  320. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/ajv.js.map +1 -0
  321. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/code.js +169 -0
  322. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/code.js.map +1 -0
  323. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js +712 -0
  324. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js.map +1 -0
  325. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/scope.js +157 -0
  326. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -0
  327. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/errors.js +139 -0
  328. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/errors.js.map +1 -0
  329. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/index.js +259 -0
  330. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/index.js.map +1 -0
  331. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/names.js +40 -0
  332. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/names.js.map +1 -0
  333. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/ref_error.js +24 -0
  334. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/ref_error.js.map +1 -0
  335. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/resolve.js +169 -0
  336. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/resolve.js.map +1 -0
  337. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/rules.js +37 -0
  338. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/rules.js.map +1 -0
  339. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js +191 -0
  340. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js.map +1 -0
  341. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/applicability.js +30 -0
  342. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -0
  343. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/boolSchema.js +64 -0
  344. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -0
  345. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/dataType.js +219 -0
  346. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -0
  347. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/defaults.js +48 -0
  348. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -0
  349. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/index.js +541 -0
  350. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/index.js.map +1 -0
  351. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/keyword.js +139 -0
  352. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -0
  353. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/subschema.js +94 -0
  354. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -0
  355. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/core.js +642 -0
  356. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/core.js.map +1 -0
  357. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/refs/data.json.js +31 -0
  358. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/refs/data.json.js.map +1 -0
  359. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/refs/json-schema-draft-07.json.js +254 -0
  360. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/refs/json-schema-draft-07.json.js.map +1 -0
  361. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/runtime/equal.js +19 -0
  362. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/runtime/equal.js.map +1 -0
  363. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/runtime/ucs2length.js +35 -0
  364. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -0
  365. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/runtime/uri.js +18 -0
  366. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/runtime/uri.js.map +1 -0
  367. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/runtime/validation_error.js +22 -0
  368. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/runtime/validation_error.js.map +1 -0
  369. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +62 -0
  370. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -0
  371. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +121 -0
  372. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -0
  373. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/allOf.js +35 -0
  374. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -0
  375. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +24 -0
  376. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -0
  377. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/contains.js +108 -0
  378. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -0
  379. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +101 -0
  380. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -0
  381. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/if.js +79 -0
  382. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -0
  383. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/index.js +71 -0
  384. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -0
  385. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/items.js +66 -0
  386. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -0
  387. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/items2020.js +45 -0
  388. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -0
  389. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/not.js +38 -0
  390. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -0
  391. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +73 -0
  392. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -0
  393. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +89 -0
  394. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -0
  395. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +24 -0
  396. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -0
  397. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/properties.js +69 -0
  398. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -0
  399. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +51 -0
  400. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -0
  401. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +25 -0
  402. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -0
  403. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/code.js +145 -0
  404. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/code.js.map +1 -0
  405. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/core/id.js +21 -0
  406. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -0
  407. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/core/index.js +29 -0
  408. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -0
  409. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/core/ref.js +139 -0
  410. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -0
  411. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/discriminator/index.js +120 -0
  412. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -0
  413. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/discriminator/types.js +20 -0
  414. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -0
  415. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/draft7.js +33 -0
  416. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -0
  417. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/format/format.js +104 -0
  418. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -0
  419. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/format/index.js +18 -0
  420. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -0
  421. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/metadata.js +29 -0
  422. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -0
  423. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/const.js +39 -0
  424. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -0
  425. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/enum.js +62 -0
  426. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -0
  427. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/index.js +54 -0
  428. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -0
  429. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/limitItems.js +36 -0
  430. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -0
  431. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/limitLength.js +41 -0
  432. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -0
  433. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +39 -0
  434. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -0
  435. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +36 -0
  436. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -0
  437. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +38 -0
  438. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -0
  439. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/pattern.js +37 -0
  440. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -0
  441. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/required.js +93 -0
  442. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -0
  443. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +79 -0
  444. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -0
  445. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/json-schema-traverse/index.js +104 -0
  446. package/dist/node_modules/@modelcontextprotocol/sdk/node_modules/json-schema-traverse/index.js.map +1 -0
  447. package/dist/node_modules/ajv/dist/ajv.js +71 -0
  448. package/dist/node_modules/ajv/dist/ajv.js.map +1 -0
  449. package/dist/node_modules/ajv/dist/compile/codegen/code.js +169 -0
  450. package/dist/node_modules/ajv/dist/compile/codegen/code.js.map +1 -0
  451. package/dist/node_modules/ajv/dist/compile/codegen/index.js +712 -0
  452. package/dist/node_modules/ajv/dist/compile/codegen/index.js.map +1 -0
  453. package/dist/node_modules/ajv/dist/compile/codegen/scope.js +157 -0
  454. package/dist/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -0
  455. package/dist/node_modules/ajv/dist/compile/errors.js +139 -0
  456. package/dist/node_modules/ajv/dist/compile/errors.js.map +1 -0
  457. package/dist/node_modules/ajv/dist/compile/index.js +259 -0
  458. package/dist/node_modules/ajv/dist/compile/index.js.map +1 -0
  459. package/dist/node_modules/ajv/dist/compile/names.js +40 -0
  460. package/dist/node_modules/ajv/dist/compile/names.js.map +1 -0
  461. package/dist/node_modules/ajv/dist/compile/ref_error.js +24 -0
  462. package/dist/node_modules/ajv/dist/compile/ref_error.js.map +1 -0
  463. package/dist/node_modules/ajv/dist/compile/resolve.js +169 -0
  464. package/dist/node_modules/ajv/dist/compile/resolve.js.map +1 -0
  465. package/dist/node_modules/ajv/dist/compile/rules.js +37 -0
  466. package/dist/node_modules/ajv/dist/compile/rules.js.map +1 -0
  467. package/dist/node_modules/ajv/dist/compile/util.js +191 -0
  468. package/dist/node_modules/ajv/dist/compile/util.js.map +1 -0
  469. package/dist/node_modules/ajv/dist/compile/validate/applicability.js +30 -0
  470. package/dist/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -0
  471. package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js +64 -0
  472. package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -0
  473. package/dist/node_modules/ajv/dist/compile/validate/dataType.js +219 -0
  474. package/dist/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -0
  475. package/dist/node_modules/ajv/dist/compile/validate/defaults.js +48 -0
  476. package/dist/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -0
  477. package/dist/node_modules/ajv/dist/compile/validate/index.js +541 -0
  478. package/dist/node_modules/ajv/dist/compile/validate/index.js.map +1 -0
  479. package/dist/node_modules/ajv/dist/compile/validate/keyword.js +139 -0
  480. package/dist/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -0
  481. package/dist/node_modules/ajv/dist/compile/validate/subschema.js +94 -0
  482. package/dist/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -0
  483. package/dist/node_modules/ajv/dist/core.js +642 -0
  484. package/dist/node_modules/ajv/dist/core.js.map +1 -0
  485. package/dist/node_modules/ajv/dist/refs/data.json.js +31 -0
  486. package/dist/node_modules/ajv/dist/refs/data.json.js.map +1 -0
  487. package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js +254 -0
  488. package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js.map +1 -0
  489. package/dist/node_modules/ajv/dist/runtime/equal.js +19 -0
  490. package/dist/node_modules/ajv/dist/runtime/equal.js.map +1 -0
  491. package/dist/node_modules/ajv/dist/runtime/ucs2length.js +35 -0
  492. package/dist/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -0
  493. package/dist/node_modules/ajv/dist/runtime/uri.js +18 -0
  494. package/dist/node_modules/ajv/dist/runtime/uri.js.map +1 -0
  495. package/dist/node_modules/ajv/dist/runtime/validation_error.js +22 -0
  496. package/dist/node_modules/ajv/dist/runtime/validation_error.js.map +1 -0
  497. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +62 -0
  498. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -0
  499. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +121 -0
  500. package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -0
  501. package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js +35 -0
  502. package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -0
  503. package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +24 -0
  504. package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -0
  505. package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js +108 -0
  506. package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -0
  507. package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +101 -0
  508. package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -0
  509. package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js +79 -0
  510. package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -0
  511. package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js +71 -0
  512. package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -0
  513. package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js +66 -0
  514. package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -0
  515. package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js +45 -0
  516. package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -0
  517. package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js +38 -0
  518. package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -0
  519. package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +73 -0
  520. package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -0
  521. package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +89 -0
  522. package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -0
  523. package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +24 -0
  524. package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -0
  525. package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js +69 -0
  526. package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -0
  527. package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +51 -0
  528. package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -0
  529. package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +25 -0
  530. package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -0
  531. package/dist/node_modules/ajv/dist/vocabularies/code.js +145 -0
  532. package/dist/node_modules/ajv/dist/vocabularies/code.js.map +1 -0
  533. package/dist/node_modules/ajv/dist/vocabularies/core/id.js +21 -0
  534. package/dist/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -0
  535. package/dist/node_modules/ajv/dist/vocabularies/core/index.js +29 -0
  536. package/dist/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -0
  537. package/dist/node_modules/ajv/dist/vocabularies/core/ref.js +139 -0
  538. package/dist/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -0
  539. package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js +120 -0
  540. package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -0
  541. package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js +20 -0
  542. package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -0
  543. package/dist/node_modules/ajv/dist/vocabularies/draft7.js +33 -0
  544. package/dist/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -0
  545. package/dist/node_modules/ajv/dist/vocabularies/format/format.js +104 -0
  546. package/dist/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -0
  547. package/dist/node_modules/ajv/dist/vocabularies/format/index.js +18 -0
  548. package/dist/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -0
  549. package/dist/node_modules/ajv/dist/vocabularies/metadata.js +29 -0
  550. package/dist/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -0
  551. package/dist/node_modules/ajv/dist/vocabularies/validation/const.js +39 -0
  552. package/dist/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -0
  553. package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js +62 -0
  554. package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -0
  555. package/dist/node_modules/ajv/dist/vocabularies/validation/index.js +54 -0
  556. package/dist/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -0
  557. package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js +36 -0
  558. package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -0
  559. package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js +41 -0
  560. package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -0
  561. package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +39 -0
  562. package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -0
  563. package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +36 -0
  564. package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -0
  565. package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +38 -0
  566. package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -0
  567. package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js +37 -0
  568. package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -0
  569. package/dist/node_modules/ajv/dist/vocabularies/validation/required.js +93 -0
  570. package/dist/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -0
  571. package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +79 -0
  572. package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -0
  573. package/dist/node_modules/ajv-formats/dist/formats.js +221 -0
  574. package/dist/node_modules/ajv-formats/dist/formats.js.map +1 -0
  575. package/dist/node_modules/ajv-formats/dist/index.js +53 -0
  576. package/dist/node_modules/ajv-formats/dist/index.js.map +1 -0
  577. package/dist/node_modules/ajv-formats/dist/limit.js +84 -0
  578. package/dist/node_modules/ajv-formats/dist/limit.js.map +1 -0
  579. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/ajv.js +71 -0
  580. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/ajv.js.map +1 -0
  581. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/code.js +169 -0
  582. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/code.js.map +1 -0
  583. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/index.js +712 -0
  584. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/index.js.map +1 -0
  585. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/scope.js +157 -0
  586. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -0
  587. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/errors.js +139 -0
  588. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/errors.js.map +1 -0
  589. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/index.js +259 -0
  590. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/index.js.map +1 -0
  591. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/names.js +40 -0
  592. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/names.js.map +1 -0
  593. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/ref_error.js +24 -0
  594. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/ref_error.js.map +1 -0
  595. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.js +169 -0
  596. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.js.map +1 -0
  597. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/rules.js +37 -0
  598. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/rules.js.map +1 -0
  599. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/util.js +191 -0
  600. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/util.js.map +1 -0
  601. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/applicability.js +30 -0
  602. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -0
  603. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/boolSchema.js +64 -0
  604. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -0
  605. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/dataType.js +219 -0
  606. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -0
  607. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/defaults.js +48 -0
  608. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -0
  609. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/index.js +541 -0
  610. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/index.js.map +1 -0
  611. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/keyword.js +139 -0
  612. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -0
  613. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/subschema.js +94 -0
  614. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -0
  615. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/core.js +642 -0
  616. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/core.js.map +1 -0
  617. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/refs/data.json.js +31 -0
  618. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/refs/data.json.js.map +1 -0
  619. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/refs/json-schema-draft-07.json.js +254 -0
  620. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/refs/json-schema-draft-07.json.js.map +1 -0
  621. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/equal.js +19 -0
  622. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/equal.js.map +1 -0
  623. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/ucs2length.js +35 -0
  624. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -0
  625. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/uri.js +18 -0
  626. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/uri.js.map +1 -0
  627. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/validation_error.js +22 -0
  628. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/validation_error.js.map +1 -0
  629. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +62 -0
  630. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -0
  631. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +121 -0
  632. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -0
  633. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/allOf.js +35 -0
  634. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -0
  635. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +24 -0
  636. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -0
  637. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/contains.js +108 -0
  638. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -0
  639. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +101 -0
  640. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -0
  641. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/if.js +79 -0
  642. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -0
  643. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/index.js +71 -0
  644. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -0
  645. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/items.js +66 -0
  646. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -0
  647. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/items2020.js +45 -0
  648. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -0
  649. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/not.js +38 -0
  650. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -0
  651. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +73 -0
  652. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -0
  653. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +89 -0
  654. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -0
  655. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +24 -0
  656. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -0
  657. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/properties.js +69 -0
  658. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -0
  659. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +51 -0
  660. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -0
  661. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +25 -0
  662. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -0
  663. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/code.js +145 -0
  664. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/code.js.map +1 -0
  665. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/core/id.js +21 -0
  666. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -0
  667. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/core/index.js +29 -0
  668. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -0
  669. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/core/ref.js +139 -0
  670. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -0
  671. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/index.js +120 -0
  672. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -0
  673. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/types.js +20 -0
  674. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -0
  675. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/draft7.js +33 -0
  676. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -0
  677. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/format/format.js +104 -0
  678. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -0
  679. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/format/index.js +18 -0
  680. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -0
  681. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/metadata.js +29 -0
  682. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -0
  683. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/const.js +39 -0
  684. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -0
  685. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/enum.js +62 -0
  686. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -0
  687. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/index.js +54 -0
  688. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -0
  689. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitItems.js +36 -0
  690. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -0
  691. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitLength.js +41 -0
  692. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -0
  693. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +39 -0
  694. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -0
  695. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +36 -0
  696. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -0
  697. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +38 -0
  698. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -0
  699. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/pattern.js +37 -0
  700. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -0
  701. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/required.js +93 -0
  702. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -0
  703. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +79 -0
  704. package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -0
  705. package/dist/node_modules/ajv-formats/node_modules/json-schema-traverse/index.js +104 -0
  706. package/dist/node_modules/ajv-formats/node_modules/json-schema-traverse/index.js.map +1 -0
  707. package/dist/node_modules/fast-uri/index.js +353 -0
  708. package/dist/node_modules/fast-uri/index.js.map +1 -0
  709. package/dist/node_modules/fast-uri/lib/schemes.js +279 -0
  710. package/dist/node_modules/fast-uri/lib/schemes.js.map +1 -0
  711. package/dist/node_modules/fast-uri/lib/utils.js +345 -0
  712. package/dist/node_modules/fast-uri/lib/utils.js.map +1 -0
  713. package/dist/node_modules/json-schema-traverse/index.js +6 -2
  714. package/dist/node_modules/json-schema-traverse/index.js.map +1 -1
  715. package/dist/node_modules/pkce-challenge/dist/index.browser.js +8 -5
  716. package/dist/node_modules/pkce-challenge/dist/index.browser.js.map +1 -1
  717. package/dist/node_modules/zod/v4/classic/coerce.js +9 -0
  718. package/dist/node_modules/zod/v4/classic/coerce.js.map +1 -0
  719. package/dist/node_modules/zod/v4/classic/compat.js +8 -0
  720. package/dist/node_modules/zod/v4/classic/compat.js.map +1 -0
  721. package/dist/node_modules/zod/v4/classic/errors.js +44 -0
  722. package/dist/node_modules/zod/v4/classic/errors.js.map +1 -0
  723. package/dist/node_modules/zod/v4/classic/iso.js +36 -0
  724. package/dist/node_modules/zod/v4/classic/iso.js.map +1 -0
  725. package/dist/node_modules/zod/v4/classic/parse.js +10 -0
  726. package/dist/node_modules/zod/v4/classic/parse.js.map +1 -0
  727. package/dist/node_modules/zod/v4/classic/schemas.js +674 -0
  728. package/dist/node_modules/zod/v4/classic/schemas.js.map +1 -0
  729. package/dist/node_modules/zod/v4/core/api.js +468 -0
  730. package/dist/node_modules/zod/v4/core/api.js.map +1 -0
  731. package/dist/node_modules/zod/v4/core/checks.js +413 -0
  732. package/dist/node_modules/zod/v4/core/checks.js.map +1 -0
  733. package/dist/node_modules/zod/v4/core/core.js +60 -0
  734. package/dist/node_modules/zod/v4/core/core.js.map +1 -0
  735. package/dist/node_modules/zod/v4/core/doc.js +38 -0
  736. package/dist/node_modules/zod/v4/core/doc.js.map +1 -0
  737. package/dist/node_modules/zod/v4/core/errors.js +86 -0
  738. package/dist/node_modules/zod/v4/core/errors.js.map +1 -0
  739. package/dist/node_modules/zod/v4/core/parse.js +59 -0
  740. package/dist/node_modules/zod/v4/core/parse.js.map +1 -0
  741. package/dist/node_modules/zod/v4/core/regexes.js +81 -0
  742. package/dist/node_modules/zod/v4/core/regexes.js.map +1 -0
  743. package/dist/node_modules/zod/v4/core/registries.js +52 -0
  744. package/dist/node_modules/zod/v4/core/registries.js.map +1 -0
  745. package/dist/node_modules/zod/v4/core/schemas.js +1328 -0
  746. package/dist/node_modules/zod/v4/core/schemas.js.map +1 -0
  747. package/dist/node_modules/zod/v4/core/util.js +335 -0
  748. package/dist/node_modules/zod/v4/core/util.js.map +1 -0
  749. package/dist/node_modules/zod/v4/core/versions.js +8 -0
  750. package/dist/node_modules/zod/v4/core/versions.js.map +1 -0
  751. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +2 -0
  752. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js.map +1 -0
  753. package/dist/polygon.cjs +39 -0
  754. package/dist/polygon.cjs.map +1 -0
  755. package/dist/polygon.d.ts +1 -0
  756. package/dist/polygon.d.ts.map +1 -0
  757. package/dist/polygon.js +2 -0
  758. package/dist/polygon.js.map +1 -0
  759. package/dist/solana.cjs +20 -0
  760. package/dist/solana.cjs.map +1 -0
  761. package/dist/solana.d.ts +2 -0
  762. package/dist/solana.d.ts.map +1 -0
  763. package/dist/solana.js +3 -0
  764. package/dist/solana.js.map +1 -0
  765. package/dist/solanaAccount.d.ts +13 -0
  766. package/dist/solanaAccount.d.ts.map +1 -0
  767. package/dist/solanaAccount.js +34 -0
  768. package/dist/solanaAccount.js.map +1 -0
  769. package/dist/solanaPaymentMaker.d.ts +25 -0
  770. package/dist/solanaPaymentMaker.d.ts.map +1 -0
  771. package/dist/solanaPaymentMaker.js +108 -0
  772. package/dist/solanaPaymentMaker.js.map +1 -0
  773. package/dist/types.js +152 -0
  774. package/dist/types.js.map +1 -0
  775. package/dist/world.cjs +39 -0
  776. package/dist/world.cjs.map +1 -0
  777. package/dist/world.d.ts +1 -0
  778. package/dist/world.d.ts.map +1 -0
  779. package/dist/world.js +2 -0
  780. package/dist/world.js.map +1 -0
  781. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"file":"streamableHttp.js","sources":["../../../../../../../../../node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js"],"sourcesContent":["import { isInitializedNotification, isJSONRPCRequest, isJSONRPCResponse, JSONRPCMessageSchema } from \"../types.js\";\nimport { auth, extractResourceMetadataUrl, UnauthorizedError } from \"./auth.js\";\nimport { EventSourceParserStream } from \"eventsource-parser/stream\";\n// Default reconnection options for StreamableHTTP connections\nconst DEFAULT_STREAMABLE_HTTP_RECONNECTION_OPTIONS = {\n initialReconnectionDelay: 1000,\n maxReconnectionDelay: 30000,\n reconnectionDelayGrowFactor: 1.5,\n maxRetries: 2,\n};\nexport class StreamableHTTPError extends Error {\n constructor(code, message) {\n super(`Streamable HTTP error: ${message}`);\n this.code = code;\n }\n}\n/**\n * Client transport for Streamable HTTP: this implements the MCP Streamable HTTP transport specification.\n * It will connect to a server using HTTP POST for sending messages and HTTP GET with Server-Sent Events\n * for receiving messages.\n */\nexport class StreamableHTTPClientTransport {\n constructor(url, opts) {\n var _a;\n this._url = url;\n this._resourceMetadataUrl = undefined;\n this._requestInit = opts === null || opts === void 0 ? void 0 : opts.requestInit;\n this._authProvider = opts === null || opts === void 0 ? void 0 : opts.authProvider;\n this._fetch = opts === null || opts === void 0 ? void 0 : opts.fetch;\n this._sessionId = opts === null || opts === void 0 ? void 0 : opts.sessionId;\n this._reconnectionOptions = (_a = opts === null || opts === void 0 ? void 0 : opts.reconnectionOptions) !== null && _a !== void 0 ? _a : DEFAULT_STREAMABLE_HTTP_RECONNECTION_OPTIONS;\n }\n async _authThenStart() {\n var _a;\n if (!this._authProvider) {\n throw new UnauthorizedError(\"No auth provider\");\n }\n let result;\n try {\n result = await auth(this._authProvider, { serverUrl: this._url, resourceMetadataUrl: this._resourceMetadataUrl, fetchFn: this._fetch });\n }\n catch (error) {\n (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error);\n throw error;\n }\n if (result !== \"AUTHORIZED\") {\n throw new UnauthorizedError();\n }\n return await this._startOrAuthSse({ resumptionToken: undefined });\n }\n async _commonHeaders() {\n var _a;\n const headers = {};\n if (this._authProvider) {\n const tokens = await this._authProvider.tokens();\n if (tokens) {\n headers[\"Authorization\"] = `Bearer ${tokens.access_token}`;\n }\n }\n if (this._sessionId) {\n headers[\"mcp-session-id\"] = this._sessionId;\n }\n if (this._protocolVersion) {\n headers[\"mcp-protocol-version\"] = this._protocolVersion;\n }\n const extraHeaders = this._normalizeHeaders((_a = this._requestInit) === null || _a === void 0 ? void 0 : _a.headers);\n return new Headers({\n ...headers,\n ...extraHeaders,\n });\n }\n async _startOrAuthSse(options) {\n var _a, _b, _c;\n const { resumptionToken } = options;\n try {\n // Try to open an initial SSE stream with GET to listen for server messages\n // This is optional according to the spec - server may not support it\n const headers = await this._commonHeaders();\n headers.set(\"Accept\", \"text/event-stream\");\n // Include Last-Event-ID header for resumable streams if provided\n if (resumptionToken) {\n headers.set(\"last-event-id\", resumptionToken);\n }\n const response = await ((_a = this._fetch) !== null && _a !== void 0 ? _a : fetch)(this._url, {\n method: \"GET\",\n headers,\n signal: (_b = this._abortController) === null || _b === void 0 ? void 0 : _b.signal,\n });\n if (!response.ok) {\n if (response.status === 401 && this._authProvider) {\n // Need to authenticate\n return await this._authThenStart();\n }\n // 405 indicates that the server does not offer an SSE stream at GET endpoint\n // This is an expected case that should not trigger an error\n if (response.status === 405) {\n return;\n }\n throw new StreamableHTTPError(response.status, `Failed to open SSE stream: ${response.statusText}`);\n }\n this._handleSseStream(response.body, options, true);\n }\n catch (error) {\n (_c = this.onerror) === null || _c === void 0 ? void 0 : _c.call(this, error);\n throw error;\n }\n }\n /**\n * Calculates the next reconnection delay using backoff algorithm\n *\n * @param attempt Current reconnection attempt count for the specific stream\n * @returns Time to wait in milliseconds before next reconnection attempt\n */\n _getNextReconnectionDelay(attempt) {\n // Access default values directly, ensuring they're never undefined\n const initialDelay = this._reconnectionOptions.initialReconnectionDelay;\n const growFactor = this._reconnectionOptions.reconnectionDelayGrowFactor;\n const maxDelay = this._reconnectionOptions.maxReconnectionDelay;\n // Cap at maximum delay\n return Math.min(initialDelay * Math.pow(growFactor, attempt), maxDelay);\n }\n _normalizeHeaders(headers) {\n if (!headers)\n return {};\n if (headers instanceof Headers) {\n return Object.fromEntries(headers.entries());\n }\n if (Array.isArray(headers)) {\n return Object.fromEntries(headers);\n }\n return { ...headers };\n }\n /**\n * Schedule a reconnection attempt with exponential backoff\n *\n * @param lastEventId The ID of the last received event for resumability\n * @param attemptCount Current reconnection attempt count for this specific stream\n */\n _scheduleReconnection(options, attemptCount = 0) {\n var _a;\n // Use provided options or default options\n const maxRetries = this._reconnectionOptions.maxRetries;\n // Check if we've exceeded maximum retry attempts\n if (maxRetries > 0 && attemptCount >= maxRetries) {\n (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, new Error(`Maximum reconnection attempts (${maxRetries}) exceeded.`));\n return;\n }\n // Calculate next delay based on current attempt count\n const delay = this._getNextReconnectionDelay(attemptCount);\n // Schedule the reconnection\n setTimeout(() => {\n // Use the last event ID to resume where we left off\n this._startOrAuthSse(options).catch(error => {\n var _a;\n (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, new Error(`Failed to reconnect SSE stream: ${error instanceof Error ? error.message : String(error)}`));\n // Schedule another attempt if this one failed, incrementing the attempt counter\n this._scheduleReconnection(options, attemptCount + 1);\n });\n }, delay);\n }\n _handleSseStream(stream, options, isReconnectable) {\n if (!stream) {\n return;\n }\n const { onresumptiontoken, replayMessageId } = options;\n let lastEventId;\n const processStream = async () => {\n var _a, _b, _c, _d;\n // this is the closest we can get to trying to catch network errors\n // if something happens reader will throw\n try {\n // Create a pipeline: binary stream -> text decoder -> SSE parser\n const reader = stream\n .pipeThrough(new TextDecoderStream())\n .pipeThrough(new EventSourceParserStream())\n .getReader();\n while (true) {\n const { value: event, done } = await reader.read();\n if (done) {\n break;\n }\n // Update last event ID if provided\n if (event.id) {\n lastEventId = event.id;\n onresumptiontoken === null || onresumptiontoken === void 0 ? void 0 : onresumptiontoken(event.id);\n }\n if (!event.event || event.event === \"message\") {\n try {\n const message = JSONRPCMessageSchema.parse(JSON.parse(event.data));\n if (replayMessageId !== undefined && isJSONRPCResponse(message)) {\n message.id = replayMessageId;\n }\n (_a = this.onmessage) === null || _a === void 0 ? void 0 : _a.call(this, message);\n }\n catch (error) {\n (_b = this.onerror) === null || _b === void 0 ? void 0 : _b.call(this, error);\n }\n }\n }\n }\n catch (error) {\n // Handle stream errors - likely a network disconnect\n (_c = this.onerror) === null || _c === void 0 ? void 0 : _c.call(this, new Error(`SSE stream disconnected: ${error}`));\n // Attempt to reconnect if the stream disconnects unexpectedly and we aren't closing\n if (isReconnectable &&\n this._abortController &&\n !this._abortController.signal.aborted) {\n // Use the exponential backoff reconnection strategy\n try {\n this._scheduleReconnection({\n resumptionToken: lastEventId,\n onresumptiontoken,\n replayMessageId\n }, 0);\n }\n catch (error) {\n (_d = this.onerror) === null || _d === void 0 ? void 0 : _d.call(this, new Error(`Failed to reconnect: ${error instanceof Error ? error.message : String(error)}`));\n }\n }\n }\n };\n processStream();\n }\n async start() {\n if (this._abortController) {\n throw new Error(\"StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.\");\n }\n this._abortController = new AbortController();\n }\n /**\n * Call this method after the user has finished authorizing via their user agent and is redirected back to the MCP client application. This will exchange the authorization code for an access token, enabling the next connection attempt to successfully auth.\n */\n async finishAuth(authorizationCode) {\n if (!this._authProvider) {\n throw new UnauthorizedError(\"No auth provider\");\n }\n const result = await auth(this._authProvider, { serverUrl: this._url, authorizationCode, resourceMetadataUrl: this._resourceMetadataUrl, fetchFn: this._fetch });\n if (result !== \"AUTHORIZED\") {\n throw new UnauthorizedError(\"Failed to authorize\");\n }\n }\n async close() {\n var _a, _b;\n // Abort any pending requests\n (_a = this._abortController) === null || _a === void 0 ? void 0 : _a.abort();\n (_b = this.onclose) === null || _b === void 0 ? void 0 : _b.call(this);\n }\n async send(message, options) {\n var _a, _b, _c, _d;\n try {\n const { resumptionToken, onresumptiontoken } = options || {};\n if (resumptionToken) {\n // If we have at last event ID, we need to reconnect the SSE stream\n this._startOrAuthSse({ resumptionToken, replayMessageId: isJSONRPCRequest(message) ? message.id : undefined }).catch(err => { var _a; return (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, err); });\n return;\n }\n const headers = await this._commonHeaders();\n headers.set(\"content-type\", \"application/json\");\n headers.set(\"accept\", \"application/json, text/event-stream\");\n const init = {\n ...this._requestInit,\n method: \"POST\",\n headers,\n body: JSON.stringify(message),\n signal: (_a = this._abortController) === null || _a === void 0 ? void 0 : _a.signal,\n };\n const response = await ((_b = this._fetch) !== null && _b !== void 0 ? _b : fetch)(this._url, init);\n // Handle session ID received during initialization\n const sessionId = response.headers.get(\"mcp-session-id\");\n if (sessionId) {\n this._sessionId = sessionId;\n }\n if (!response.ok) {\n if (response.status === 401 && this._authProvider) {\n this._resourceMetadataUrl = extractResourceMetadataUrl(response);\n const result = await auth(this._authProvider, { serverUrl: this._url, resourceMetadataUrl: this._resourceMetadataUrl, fetchFn: this._fetch });\n if (result !== \"AUTHORIZED\") {\n throw new UnauthorizedError();\n }\n // Purposely _not_ awaited, so we don't call onerror twice\n return this.send(message);\n }\n const text = await response.text().catch(() => null);\n throw new Error(`Error POSTing to endpoint (HTTP ${response.status}): ${text}`);\n }\n // If the response is 202 Accepted, there's no body to process\n if (response.status === 202) {\n // if the accepted notification is initialized, we start the SSE stream\n // if it's supported by the server\n if (isInitializedNotification(message)) {\n // Start without a lastEventId since this is a fresh connection\n this._startOrAuthSse({ resumptionToken: undefined }).catch(err => { var _a; return (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, err); });\n }\n return;\n }\n // Get original message(s) for detecting request IDs\n const messages = Array.isArray(message) ? message : [message];\n const hasRequests = messages.filter(msg => \"method\" in msg && \"id\" in msg && msg.id !== undefined).length > 0;\n // Check the response type\n const contentType = response.headers.get(\"content-type\");\n if (hasRequests) {\n if (contentType === null || contentType === void 0 ? void 0 : contentType.includes(\"text/event-stream\")) {\n // Handle SSE stream responses for requests\n // We use the same handler as standalone streams, which now supports\n // reconnection with the last event ID\n this._handleSseStream(response.body, { onresumptiontoken }, false);\n }\n else if (contentType === null || contentType === void 0 ? void 0 : contentType.includes(\"application/json\")) {\n // For non-streaming servers, we might get direct JSON responses\n const data = await response.json();\n const responseMessages = Array.isArray(data)\n ? data.map(msg => JSONRPCMessageSchema.parse(msg))\n : [JSONRPCMessageSchema.parse(data)];\n for (const msg of responseMessages) {\n (_c = this.onmessage) === null || _c === void 0 ? void 0 : _c.call(this, msg);\n }\n }\n else {\n throw new StreamableHTTPError(-1, `Unexpected content type: ${contentType}`);\n }\n }\n }\n catch (error) {\n (_d = this.onerror) === null || _d === void 0 ? void 0 : _d.call(this, error);\n throw error;\n }\n }\n get sessionId() {\n return this._sessionId;\n }\n /**\n * Terminates the current session by sending a DELETE request to the server.\n *\n * Clients that no longer need a particular session\n * (e.g., because the user is leaving the client application) SHOULD send an\n * HTTP DELETE to the MCP endpoint with the Mcp-Session-Id header to explicitly\n * terminate the session.\n *\n * The server MAY respond with HTTP 405 Method Not Allowed, indicating that\n * the server does not allow clients to terminate sessions.\n */\n async terminateSession() {\n var _a, _b, _c;\n if (!this._sessionId) {\n return; // No session to terminate\n }\n try {\n const headers = await this._commonHeaders();\n const init = {\n ...this._requestInit,\n method: \"DELETE\",\n headers,\n signal: (_a = this._abortController) === null || _a === void 0 ? void 0 : _a.signal,\n };\n const response = await ((_b = this._fetch) !== null && _b !== void 0 ? _b : fetch)(this._url, init);\n // We specifically handle 405 as a valid response according to the spec,\n // meaning the server does not support explicit session termination\n if (!response.ok && response.status !== 405) {\n throw new StreamableHTTPError(response.status, `Failed to terminate session: ${response.statusText}`);\n }\n this._sessionId = undefined;\n }\n catch (error) {\n (_c = this.onerror) === null || _c === void 0 ? void 0 : _c.call(this, error);\n throw error;\n }\n }\n setProtocolVersion(version) {\n this._protocolVersion = version;\n }\n get protocolVersion() {\n return this._protocolVersion;\n }\n}\n//# sourceMappingURL=streamableHttp.js.map"],"names":[],"mappings":";;;;AAGA;AACA,MAAM,4CAA4C,GAAG;AACrD,IAAI,wBAAwB,EAAE,IAAI;AAClC,IAAI,oBAAoB,EAAE,KAAK;AAC/B,IAAI,2BAA2B,EAAE,GAAG;AACpC,IAAI,UAAU,EAAE,CAAC;AACjB,CAAC;AACM,MAAM,mBAAmB,SAAS,KAAK,CAAC;AAC/C,IAAI,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE;AAC/B,QAAQ,KAAK,CAAC,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC,CAAC;AAClD,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,6BAA6B,CAAC;AAC3C,IAAI,WAAW,CAAC,GAAG,EAAE,IAAI,EAAE;AAC3B,QAAQ,IAAI,EAAE;AACd,QAAQ,IAAI,CAAC,IAAI,GAAG,GAAG;AACvB,QAAQ,IAAI,CAAC,oBAAoB,GAAG,SAAS;AAC7C,QAA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,OAAO;AACvB,gBAAgB,MAAM,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC,gBAAgB,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM;AACnG,aAAa;AACb,YAAY,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,MAAM,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,GAAG,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC;AAC/G;AACA;AACA,YAAY,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE;AACzD,gBAAgB,MAAM,IAAI,mBAAmB,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,6BAA6B,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;AACrH,YAAY;AACZ,YAAY,IAAI,CAAC,UAAU,GAAG,SAAS;AACvC,QAAQ;AACR,QAAQ,OAAO,KAAK,EAAE;AACtB,YAAY,CAAC,EAAE,GAAG,IAAI,CAAC,OAAO,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,MAAM,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;AACzF,YAAY,MAAM,KAAK;AACvB,QAAQ;AACR,IAAI;AACJ,IAAI,kBAAkB,CAAC,OAAO,EAAE;AAChC,QAAQ,IAAI,CAAC,gBAAgB,GAAG,OAAO;AACvC,IAAI;AACJ,IAAI,IAAI,eAAe,GAAG;AAC1B,QAAQ,OAAO,IAAI,CAAC,gBAAgB;AACpC,IAAI;AACJ;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"streamableHttp.js","sources":["../../../../../../../../../node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js"],"sourcesContent":["import { createFetchWithInit, normalizeHeaders } from '../shared/transport.js';\nimport { isInitializedNotification, isJSONRPCRequest, isJSONRPCResultResponse, JSONRPCMessageSchema } from '../types.js';\nimport { auth, extractWWWAuthenticateParams, UnauthorizedError } from './auth.js';\nimport { EventSourceParserStream } from 'eventsource-parser/stream';\n// Default reconnection options for StreamableHTTP connections\nconst DEFAULT_STREAMABLE_HTTP_RECONNECTION_OPTIONS = {\n initialReconnectionDelay: 1000,\n maxReconnectionDelay: 30000,\n reconnectionDelayGrowFactor: 1.5,\n maxRetries: 2\n};\nexport class StreamableHTTPError extends Error {\n constructor(code, message) {\n super(`Streamable HTTP error: ${message}`);\n this.code = code;\n }\n}\n/**\n * Client transport for Streamable HTTP: this implements the MCP Streamable HTTP transport specification.\n * It will connect to a server using HTTP POST for sending messages and HTTP GET with Server-Sent Events\n * for receiving messages.\n */\nexport class StreamableHTTPClientTransport {\n constructor(url, opts) {\n this._hasCompletedAuthFlow = false; // Circuit breaker: detect auth success followed by immediate 401\n this._url = url;\n this._resourceMetadataUrl = undefined;\n this._scope = undefined;\n this._requestInit = opts?.requestInit;\n this._authProvider = opts?.authProvider;\n this._fetch = opts?.fetch;\n this._fetchWithInit = createFetchWithInit(opts?.fetch, opts?.requestInit);\n this._sessionId = opts?.sessionId;\n this._reconnectionOptions = opts?.reconnectionOptions ?? DEFAULT_STREAMABLE_HTTP_RECONNECTION_OPTIONS;\n }\n async _authThenStart() {\n if (!this._authProvider) {\n throw new UnauthorizedError('No auth provider');\n }\n let result;\n try {\n result = await auth(this._authProvider, {\n serverUrl: this._url,\n resourceMetadataUrl: this._resourceMetadataUrl,\n scope: this._scope,\n fetchFn: this._fetchWithInit\n });\n }\n catch (error) {\n this.onerror?.(error);\n throw error;\n }\n if (result !== 'AUTHORIZED') {\n throw new UnauthorizedError();\n }\n return await this._startOrAuthSse({ resumptionToken: undefined });\n }\n async _commonHeaders() {\n const headers = {};\n if (this._authProvider) {\n const tokens = await this._authProvider.tokens();\n if (tokens) {\n headers['Authorization'] = `Bearer ${tokens.access_token}`;\n }\n }\n if (this._sessionId) {\n headers['mcp-session-id'] = this._sessionId;\n }\n if (this._protocolVersion) {\n headers['mcp-protocol-version'] = this._protocolVersion;\n }\n const extraHeaders = normalizeHeaders(this._requestInit?.headers);\n return new Headers({\n ...headers,\n ...extraHeaders\n });\n }\n async _startOrAuthSse(options) {\n const { resumptionToken } = options;\n try {\n // Try to open an initial SSE stream with GET to listen for server messages\n // This is optional according to the spec - server may not support it\n const headers = await this._commonHeaders();\n headers.set('Accept', 'text/event-stream');\n // Include Last-Event-ID header for resumable streams if provided\n if (resumptionToken) {\n headers.set('last-event-id', resumptionToken);\n }\n const response = await (this._fetch ?? fetch)(this._url, {\n method: 'GET',\n headers,\n signal: this._abortController?.signal\n });\n if (!response.ok) {\n await response.body?.cancel();\n if (response.status === 401 && this._authProvider) {\n // Need to authenticate\n return await this._authThenStart();\n }\n // 405 indicates that the server does not offer an SSE stream at GET endpoint\n // This is an expected case that should not trigger an error\n if (response.status === 405) {\n return;\n }\n throw new StreamableHTTPError(response.status, `Failed to open SSE stream: ${response.statusText}`);\n }\n this._handleSseStream(response.body, options, true);\n }\n catch (error) {\n this.onerror?.(error);\n throw error;\n }\n }\n /**\n * Calculates the next reconnection delay using backoff algorithm\n *\n * @param attempt Current reconnection attempt count for the specific stream\n * @returns Time to wait in milliseconds before next reconnection attempt\n */\n _getNextReconnectionDelay(attempt) {\n // Use server-provided retry value if available\n if (this._serverRetryMs !== undefined) {\n return this._serverRetryMs;\n }\n // Fall back to exponential backoff\n const initialDelay = this._reconnectionOptions.initialReconnectionDelay;\n const growFactor = this._reconnectionOptions.reconnectionDelayGrowFactor;\n const maxDelay = this._reconnectionOptions.maxReconnectionDelay;\n // Cap at maximum delay\n return Math.min(initialDelay * Math.pow(growFactor, attempt), maxDelay);\n }\n /**\n * Schedule a reconnection attempt using server-provided retry interval or backoff\n *\n * @param lastEventId The ID of the last received event for resumability\n * @param attemptCount Current reconnection attempt count for this specific stream\n */\n _scheduleReconnection(options, attemptCount = 0) {\n // Use provided options or default options\n const maxRetries = this._reconnectionOptions.maxRetries;\n // Check if we've exceeded maximum retry attempts\n if (attemptCount >= maxRetries) {\n this.onerror?.(new Error(`Maximum reconnection attempts (${maxRetries}) exceeded.`));\n return;\n }\n // Calculate next delay based on current attempt count\n const delay = this._getNextReconnectionDelay(attemptCount);\n // Schedule the reconnection\n this._reconnectionTimeout = setTimeout(() => {\n // Use the last event ID to resume where we left off\n this._startOrAuthSse(options).catch(error => {\n this.onerror?.(new Error(`Failed to reconnect SSE stream: ${error instanceof Error ? error.message : String(error)}`));\n // Schedule another attempt if this one failed, incrementing the attempt counter\n this._scheduleReconnection(options, attemptCount + 1);\n });\n }, delay);\n }\n _handleSseStream(stream, options, isReconnectable) {\n if (!stream) {\n return;\n }\n const { onresumptiontoken, replayMessageId } = options;\n let lastEventId;\n // Track whether we've received a priming event (event with ID)\n // Per spec, server SHOULD send a priming event with ID before closing\n let hasPrimingEvent = false;\n // Track whether we've received a response - if so, no need to reconnect\n // Reconnection is for when server disconnects BEFORE sending response\n let receivedResponse = false;\n const processStream = async () => {\n // this is the closest we can get to trying to catch network errors\n // if something happens reader will throw\n try {\n // Create a pipeline: binary stream -> text decoder -> SSE parser\n const reader = stream\n .pipeThrough(new TextDecoderStream())\n .pipeThrough(new EventSourceParserStream({\n onRetry: (retryMs) => {\n // Capture server-provided retry value for reconnection timing\n this._serverRetryMs = retryMs;\n }\n }))\n .getReader();\n while (true) {\n const { value: event, done } = await reader.read();\n if (done) {\n break;\n }\n // Update last event ID if provided\n if (event.id) {\n lastEventId = event.id;\n // Mark that we've received a priming event - stream is now resumable\n hasPrimingEvent = true;\n onresumptiontoken?.(event.id);\n }\n // Skip events with no data (priming events, keep-alives)\n if (!event.data) {\n continue;\n }\n if (!event.event || event.event === 'message') {\n try {\n const message = JSONRPCMessageSchema.parse(JSON.parse(event.data));\n if (isJSONRPCResultResponse(message)) {\n // Mark that we received a response - no need to reconnect for this request\n receivedResponse = true;\n if (replayMessageId !== undefined) {\n message.id = replayMessageId;\n }\n }\n this.onmessage?.(message);\n }\n catch (error) {\n this.onerror?.(error);\n }\n }\n }\n // Handle graceful server-side disconnect\n // Server may close connection after sending event ID and retry field\n // Reconnect if: already reconnectable (GET stream) OR received a priming event (POST stream with event ID)\n // BUT don't reconnect if we already received a response - the request is complete\n const canResume = isReconnectable || hasPrimingEvent;\n const needsReconnect = canResume && !receivedResponse;\n if (needsReconnect && this._abortController && !this._abortController.signal.aborted) {\n this._scheduleReconnection({\n resumptionToken: lastEventId,\n onresumptiontoken,\n replayMessageId\n }, 0);\n }\n }\n catch (error) {\n // Handle stream errors - likely a network disconnect\n this.onerror?.(new Error(`SSE stream disconnected: ${error}`));\n // Attempt to reconnect if the stream disconnects unexpectedly and we aren't closing\n // Reconnect if: already reconnectable (GET stream) OR received a priming event (POST stream with event ID)\n // BUT don't reconnect if we already received a response - the request is complete\n const canResume = isReconnectable || hasPrimingEvent;\n const needsReconnect = canResume && !receivedResponse;\n if (needsReconnect && this._abortController && !this._abortController.signal.aborted) {\n // Use the exponential backoff reconnection strategy\n try {\n this._scheduleReconnection({\n resumptionToken: lastEventId,\n onresumptiontoken,\n replayMessageId\n }, 0);\n }\n catch (error) {\n this.onerror?.(new Error(`Failed to reconnect: ${error instanceof Error ? error.message : String(error)}`));\n }\n }\n }\n };\n processStream();\n }\n async start() {\n if (this._abortController) {\n throw new Error('StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.');\n }\n this._abortController = new AbortController();\n }\n /**\n * Call this method after the user has finished authorizing via their user agent and is redirected back to the MCP client application. This will exchange the authorization code for an access token, enabling the next connection attempt to successfully auth.\n */\n async finishAuth(authorizationCode) {\n if (!this._authProvider) {\n throw new UnauthorizedError('No auth provider');\n }\n const result = await auth(this._authProvider, {\n serverUrl: this._url,\n authorizationCode,\n resourceMetadataUrl: this._resourceMetadataUrl,\n scope: this._scope,\n fetchFn: this._fetchWithInit\n });\n if (result !== 'AUTHORIZED') {\n throw new UnauthorizedError('Failed to authorize');\n }\n }\n async close() {\n if (this._reconnectionTimeout) {\n clearTimeout(this._reconnectionTimeout);\n this._reconnectionTimeout = undefined;\n }\n this._abortController?.abort();\n this.onclose?.();\n }\n async send(message, options) {\n try {\n const { resumptionToken, onresumptiontoken } = options || {};\n if (resumptionToken) {\n // If we have at last event ID, we need to reconnect the SSE stream\n this._startOrAuthSse({ resumptionToken, replayMessageId: isJSONRPCRequest(message) ? message.id : undefined }).catch(err => this.onerror?.(err));\n return;\n }\n const headers = await this._commonHeaders();\n headers.set('content-type', 'application/json');\n headers.set('accept', 'application/json, text/event-stream');\n const init = {\n ...this._requestInit,\n method: 'POST',\n headers,\n body: JSON.stringify(message),\n signal: this._abortController?.signal\n };\n const response = await (this._fetch ?? fetch)(this._url, init);\n // Handle session ID received during initialization\n const sessionId = response.headers.get('mcp-session-id');\n if (sessionId) {\n this._sessionId = sessionId;\n }\n if (!response.ok) {\n const text = await response.text().catch(() => null);\n if (response.status === 401 && this._authProvider) {\n // Prevent infinite recursion when server returns 401 after successful auth\n if (this._hasCompletedAuthFlow) {\n throw new StreamableHTTPError(401, 'Server returned 401 after successful authentication');\n }\n const { resourceMetadataUrl, scope } = extractWWWAuthenticateParams(response);\n this._resourceMetadataUrl = resourceMetadataUrl;\n this._scope = scope;\n const result = await auth(this._authProvider, {\n serverUrl: this._url,\n resourceMetadataUrl: this._resourceMetadataUrl,\n scope: this._scope,\n fetchFn: this._fetchWithInit\n });\n if (result !== 'AUTHORIZED') {\n throw new UnauthorizedError();\n }\n // Mark that we completed auth flow\n this._hasCompletedAuthFlow = true;\n // Purposely _not_ awaited, so we don't call onerror twice\n return this.send(message);\n }\n if (response.status === 403 && this._authProvider) {\n const { resourceMetadataUrl, scope, error } = extractWWWAuthenticateParams(response);\n if (error === 'insufficient_scope') {\n const wwwAuthHeader = response.headers.get('WWW-Authenticate');\n // Check if we've already tried upscoping with this header to prevent infinite loops.\n if (this._lastUpscopingHeader === wwwAuthHeader) {\n throw new StreamableHTTPError(403, 'Server returned 403 after trying upscoping');\n }\n if (scope) {\n this._scope = scope;\n }\n if (resourceMetadataUrl) {\n this._resourceMetadataUrl = resourceMetadataUrl;\n }\n // Mark that upscoping was tried.\n this._lastUpscopingHeader = wwwAuthHeader ?? undefined;\n const result = await auth(this._authProvider, {\n serverUrl: this._url,\n resourceMetadataUrl: this._resourceMetadataUrl,\n scope: this._scope,\n fetchFn: this._fetch\n });\n if (result !== 'AUTHORIZED') {\n throw new UnauthorizedError();\n }\n return this.send(message);\n }\n }\n throw new StreamableHTTPError(response.status, `Error POSTing to endpoint: ${text}`);\n }\n // Reset auth loop flag on successful response\n this._hasCompletedAuthFlow = false;\n this._lastUpscopingHeader = undefined;\n // If the response is 202 Accepted, there's no body to process\n if (response.status === 202) {\n await response.body?.cancel();\n // if the accepted notification is initialized, we start the SSE stream\n // if it's supported by the server\n if (isInitializedNotification(message)) {\n // Start without a lastEventId since this is a fresh connection\n this._startOrAuthSse({ resumptionToken: undefined }).catch(err => this.onerror?.(err));\n }\n return;\n }\n // Get original message(s) for detecting request IDs\n const messages = Array.isArray(message) ? message : [message];\n const hasRequests = messages.filter(msg => 'method' in msg && 'id' in msg && msg.id !== undefined).length > 0;\n // Check the response type\n const contentType = response.headers.get('content-type');\n if (hasRequests) {\n if (contentType?.includes('text/event-stream')) {\n // Handle SSE stream responses for requests\n // We use the same handler as standalone streams, which now supports\n // reconnection with the last event ID\n this._handleSseStream(response.body, { onresumptiontoken }, false);\n }\n else if (contentType?.includes('application/json')) {\n // For non-streaming servers, we might get direct JSON responses\n const data = await response.json();\n const responseMessages = Array.isArray(data)\n ? data.map(msg => JSONRPCMessageSchema.parse(msg))\n : [JSONRPCMessageSchema.parse(data)];\n for (const msg of responseMessages) {\n this.onmessage?.(msg);\n }\n }\n else {\n await response.body?.cancel();\n throw new StreamableHTTPError(-1, `Unexpected content type: ${contentType}`);\n }\n }\n else {\n // No requests in message but got 200 OK - still need to release connection\n await response.body?.cancel();\n }\n }\n catch (error) {\n this.onerror?.(error);\n throw error;\n }\n }\n get sessionId() {\n return this._sessionId;\n }\n /**\n * Terminates the current session by sending a DELETE request to the server.\n *\n * Clients that no longer need a particular session\n * (e.g., because the user is leaving the client application) SHOULD send an\n * HTTP DELETE to the MCP endpoint with the Mcp-Session-Id header to explicitly\n * terminate the session.\n *\n * The server MAY respond with HTTP 405 Method Not Allowed, indicating that\n * the server does not allow clients to terminate sessions.\n */\n async terminateSession() {\n if (!this._sessionId) {\n return; // No session to terminate\n }\n try {\n const headers = await this._commonHeaders();\n const init = {\n ...this._requestInit,\n method: 'DELETE',\n headers,\n signal: this._abortController?.signal\n };\n const response = await (this._fetch ?? fetch)(this._url, init);\n await response.body?.cancel();\n // We specifically handle 405 as a valid response according to the spec,\n // meaning the server does not support explicit session termination\n if (!response.ok && response.status !== 405) {\n throw new StreamableHTTPError(response.status, `Failed to terminate session: ${response.statusText}`);\n }\n this._sessionId = undefined;\n }\n catch (error) {\n this.onerror?.(error);\n throw error;\n }\n }\n setProtocolVersion(version) {\n this._protocolVersion = version;\n }\n get protocolVersion() {\n return this._protocolVersion;\n }\n /**\n * Resume an SSE stream from a previous event ID.\n * Opens a GET SSE connection with Last-Event-ID header to replay missed events.\n *\n * @param lastEventId The event ID to resume from\n * @param options Optional callback to receive new resumption tokens\n */\n async resumeStream(lastEventId, options) {\n await this._startOrAuthSse({\n resumptionToken: lastEventId,\n onresumptiontoken: options?.onresumptiontoken\n });\n }\n}\n//# sourceMappingURL=streamableHttp.js.map"],"names":[],"mappings":";;;;;AAIA;AACA,MAAM,4CAA4C,GAAG;AACrD,IAAI,wBAAwB,EAAE,IAAI;AAClC,IAAI,oBAAoB,EAAE,KAAK;AAC/B,IAAI,2BAA2B,EAAE,GAAG;AACpC,IAAI,UAAU,EAAE;AAChB,CAAC;AACM,MAAM,mBAAmB,SAAS,KAAK,CAAC;AAC/C,IAAI,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE;AAC/B,QAAQ,KAAK,CAAC,CAAC,uBAAu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YAAY,CAAC,WAAW,EAAE,OAAO,EAAE;AAC7C,QAAQ,MAAM,IAAI,CAAC,eAAe,CAAC;AACnC,YAAY,eAAe,EAAE,WAAW;AACxC,YAAY,iBAAiB,EAAE,OAAO,EAAE;AACxC,SAAS,CAAC;AACV,IAAI;AACJ;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,187 @@
1
+ import { CallToolResultSchema, McpError, ErrorCode } from '../../types.js';
2
+
3
+ /**
4
+ * Experimental client task features for MCP SDK.
5
+ * WARNING: These APIs are experimental and may change without notice.
6
+ *
7
+ * @experimental
8
+ */
9
+ /**
10
+ * Experimental task features for MCP clients.
11
+ *
12
+ * Access via `client.experimental.tasks`:
13
+ * ```typescript
14
+ * const stream = client.experimental.tasks.callToolStream({ name: 'tool', arguments: {} });
15
+ * const task = await client.experimental.tasks.getTask(taskId);
16
+ * ```
17
+ *
18
+ * @experimental
19
+ */
20
+ class ExperimentalClientTasks {
21
+ constructor(_client) {
22
+ this._client = _client;
23
+ }
24
+ /**
25
+ * Calls a tool and returns an AsyncGenerator that yields response messages.
26
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
27
+ *
28
+ * This method provides streaming access to tool execution, allowing you to
29
+ * observe intermediate task status updates for long-running tool calls.
30
+ * Automatically validates structured output if the tool has an outputSchema.
31
+ *
32
+ * @example
33
+ * ```typescript
34
+ * const stream = client.experimental.tasks.callToolStream({ name: 'myTool', arguments: {} });
35
+ * for await (const message of stream) {
36
+ * switch (message.type) {
37
+ * case 'taskCreated':
38
+ * console.log('Tool execution started:', message.task.taskId);
39
+ * break;
40
+ * case 'taskStatus':
41
+ * console.log('Tool status:', message.task.status);
42
+ * break;
43
+ * case 'result':
44
+ * console.log('Tool result:', message.result);
45
+ * break;
46
+ * case 'error':
47
+ * console.error('Tool error:', message.error);
48
+ * break;
49
+ * }
50
+ * }
51
+ * ```
52
+ *
53
+ * @param params - Tool call parameters (name and arguments)
54
+ * @param resultSchema - Zod schema for validating the result (defaults to CallToolResultSchema)
55
+ * @param options - Optional request options (timeout, signal, task creation params, etc.)
56
+ * @returns AsyncGenerator that yields ResponseMessage objects
57
+ *
58
+ * @experimental
59
+ */
60
+ async *callToolStream(params, resultSchema = CallToolResultSchema, options) {
61
+ // Access Client's internal methods
62
+ const clientInternal = this._client;
63
+ // Add task creation parameters if server supports it and not explicitly provided
64
+ const optionsWithTask = {
65
+ ...options,
66
+ // We check if the tool is known to be a task during auto-configuration, but assume
67
+ // the caller knows what they're doing if they pass this explicitly
68
+ task: options?.task ?? (clientInternal.isToolTask(params.name) ? {} : undefined)
69
+ };
70
+ const stream = clientInternal.requestStream({ method: 'tools/call', params }, resultSchema, optionsWithTask);
71
+ // Get the validator for this tool (if it has an output schema)
72
+ const validator = clientInternal.getToolOutputValidator(params.name);
73
+ // Iterate through the stream and validate the final result if needed
74
+ for await (const message of stream) {
75
+ // If this is a result message and the tool has an output schema, validate it
76
+ if (message.type === 'result' && validator) {
77
+ const result = message.result;
78
+ // If tool has outputSchema, it MUST return structuredContent (unless it's an error)
79
+ if (!result.structuredContent && !result.isError) {
80
+ yield {
81
+ type: 'error',
82
+ error: new McpError(ErrorCode.InvalidRequest, `Tool ${params.name} has an output schema but did not return structured content`)
83
+ };
84
+ return;
85
+ }
86
+ // Only validate structured content if present (not when there's an error)
87
+ if (result.structuredContent) {
88
+ try {
89
+ // Validate the structured content against the schema
90
+ const validationResult = validator(result.structuredContent);
91
+ if (!validationResult.valid) {
92
+ yield {
93
+ type: 'error',
94
+ error: new McpError(ErrorCode.InvalidParams, `Structured content does not match the tool's output schema: ${validationResult.errorMessage}`)
95
+ };
96
+ return;
97
+ }
98
+ }
99
+ catch (error) {
100
+ if (error instanceof McpError) {
101
+ yield { type: 'error', error };
102
+ return;
103
+ }
104
+ yield {
105
+ type: 'error',
106
+ error: new McpError(ErrorCode.InvalidParams, `Failed to validate structured content: ${error instanceof Error ? error.message : String(error)}`)
107
+ };
108
+ return;
109
+ }
110
+ }
111
+ }
112
+ // Yield the message (either validated result or any other message type)
113
+ yield message;
114
+ }
115
+ }
116
+ /**
117
+ * Gets the current status of a task.
118
+ *
119
+ * @param taskId - The task identifier
120
+ * @param options - Optional request options
121
+ * @returns The task status
122
+ *
123
+ * @experimental
124
+ */
125
+ async getTask(taskId, options) {
126
+ return this._client.getTask({ taskId }, options);
127
+ }
128
+ /**
129
+ * Retrieves the result of a completed task.
130
+ *
131
+ * @param taskId - The task identifier
132
+ * @param resultSchema - Zod schema for validating the result
133
+ * @param options - Optional request options
134
+ * @returns The task result
135
+ *
136
+ * @experimental
137
+ */
138
+ async getTaskResult(taskId, resultSchema, options) {
139
+ // Delegate to the client's underlying Protocol method
140
+ return this._client.getTaskResult({ taskId }, resultSchema, options);
141
+ }
142
+ /**
143
+ * Lists tasks with optional pagination.
144
+ *
145
+ * @param cursor - Optional pagination cursor
146
+ * @param options - Optional request options
147
+ * @returns List of tasks with optional next cursor
148
+ *
149
+ * @experimental
150
+ */
151
+ async listTasks(cursor, options) {
152
+ // Delegate to the client's underlying Protocol method
153
+ return this._client.listTasks(cursor ? { cursor } : undefined, options);
154
+ }
155
+ /**
156
+ * Cancels a running task.
157
+ *
158
+ * @param taskId - The task identifier
159
+ * @param options - Optional request options
160
+ *
161
+ * @experimental
162
+ */
163
+ async cancelTask(taskId, options) {
164
+ // Delegate to the client's underlying Protocol method
165
+ return this._client.cancelTask({ taskId }, options);
166
+ }
167
+ /**
168
+ * Sends a request and returns an AsyncGenerator that yields response messages.
169
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
170
+ *
171
+ * This method provides streaming access to request processing, allowing you to
172
+ * observe intermediate task status updates for task-augmented requests.
173
+ *
174
+ * @param request - The request to send
175
+ * @param resultSchema - Zod schema for validating the result
176
+ * @param options - Optional request options (timeout, signal, task creation params, etc.)
177
+ * @returns AsyncGenerator that yields ResponseMessage objects
178
+ *
179
+ * @experimental
180
+ */
181
+ requestStream(request, resultSchema, options) {
182
+ return this._client.requestStream(request, resultSchema, options);
183
+ }
184
+ }
185
+
186
+ export { ExperimentalClientTasks };
187
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sources":["../../../../../../../../../../node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/client.js"],"sourcesContent":["/**\n * Experimental client task features for MCP SDK.\n * WARNING: These APIs are experimental and may change without notice.\n *\n * @experimental\n */\nimport { CallToolResultSchema, McpError, ErrorCode } from '../../types.js';\n/**\n * Experimental task features for MCP clients.\n *\n * Access via `client.experimental.tasks`:\n * ```typescript\n * const stream = client.experimental.tasks.callToolStream({ name: 'tool', arguments: {} });\n * const task = await client.experimental.tasks.getTask(taskId);\n * ```\n *\n * @experimental\n */\nexport class ExperimentalClientTasks {\n constructor(_client) {\n this._client = _client;\n }\n /**\n * Calls a tool and returns an AsyncGenerator that yields response messages.\n * The generator is guaranteed to end with either a 'result' or 'error' message.\n *\n * This method provides streaming access to tool execution, allowing you to\n * observe intermediate task status updates for long-running tool calls.\n * Automatically validates structured output if the tool has an outputSchema.\n *\n * @example\n * ```typescript\n * const stream = client.experimental.tasks.callToolStream({ name: 'myTool', arguments: {} });\n * for await (const message of stream) {\n * switch (message.type) {\n * case 'taskCreated':\n * console.log('Tool execution started:', message.task.taskId);\n * break;\n * case 'taskStatus':\n * console.log('Tool status:', message.task.status);\n * break;\n * case 'result':\n * console.log('Tool result:', message.result);\n * break;\n * case 'error':\n * console.error('Tool error:', message.error);\n * break;\n * }\n * }\n * ```\n *\n * @param params - Tool call parameters (name and arguments)\n * @param resultSchema - Zod schema for validating the result (defaults to CallToolResultSchema)\n * @param options - Optional request options (timeout, signal, task creation params, etc.)\n * @returns AsyncGenerator that yields ResponseMessage objects\n *\n * @experimental\n */\n async *callToolStream(params, resultSchema = CallToolResultSchema, options) {\n // Access Client's internal methods\n const clientInternal = this._client;\n // Add task creation parameters if server supports it and not explicitly provided\n const optionsWithTask = {\n ...options,\n // We check if the tool is known to be a task during auto-configuration, but assume\n // the caller knows what they're doing if they pass this explicitly\n task: options?.task ?? (clientInternal.isToolTask(params.name) ? {} : undefined)\n };\n const stream = clientInternal.requestStream({ method: 'tools/call', params }, resultSchema, optionsWithTask);\n // Get the validator for this tool (if it has an output schema)\n const validator = clientInternal.getToolOutputValidator(params.name);\n // Iterate through the stream and validate the final result if needed\n for await (const message of stream) {\n // If this is a result message and the tool has an output schema, validate it\n if (message.type === 'result' && validator) {\n const result = message.result;\n // If tool has outputSchema, it MUST return structuredContent (unless it's an error)\n if (!result.structuredContent && !result.isError) {\n yield {\n type: 'error',\n error: new McpError(ErrorCode.InvalidRequest, `Tool ${params.name} has an output schema but did not return structured content`)\n };\n return;\n }\n // Only validate structured content if present (not when there's an error)\n if (result.structuredContent) {\n try {\n // Validate the structured content against the schema\n const validationResult = validator(result.structuredContent);\n if (!validationResult.valid) {\n yield {\n type: 'error',\n error: new McpError(ErrorCode.InvalidParams, `Structured content does not match the tool's output schema: ${validationResult.errorMessage}`)\n };\n return;\n }\n }\n catch (error) {\n if (error instanceof McpError) {\n yield { type: 'error', error };\n return;\n }\n yield {\n type: 'error',\n error: new McpError(ErrorCode.InvalidParams, `Failed to validate structured content: ${error instanceof Error ? error.message : String(error)}`)\n };\n return;\n }\n }\n }\n // Yield the message (either validated result or any other message type)\n yield message;\n }\n }\n /**\n * Gets the current status of a task.\n *\n * @param taskId - The task identifier\n * @param options - Optional request options\n * @returns The task status\n *\n * @experimental\n */\n async getTask(taskId, options) {\n return this._client.getTask({ taskId }, options);\n }\n /**\n * Retrieves the result of a completed task.\n *\n * @param taskId - The task identifier\n * @param resultSchema - Zod schema for validating the result\n * @param options - Optional request options\n * @returns The task result\n *\n * @experimental\n */\n async getTaskResult(taskId, resultSchema, options) {\n // Delegate to the client's underlying Protocol method\n return this._client.getTaskResult({ taskId }, resultSchema, options);\n }\n /**\n * Lists tasks with optional pagination.\n *\n * @param cursor - Optional pagination cursor\n * @param options - Optional request options\n * @returns List of tasks with optional next cursor\n *\n * @experimental\n */\n async listTasks(cursor, options) {\n // Delegate to the client's underlying Protocol method\n return this._client.listTasks(cursor ? { cursor } : undefined, options);\n }\n /**\n * Cancels a running task.\n *\n * @param taskId - The task identifier\n * @param options - Optional request options\n *\n * @experimental\n */\n async cancelTask(taskId, options) {\n // Delegate to the client's underlying Protocol method\n return this._client.cancelTask({ taskId }, options);\n }\n /**\n * Sends a request and returns an AsyncGenerator that yields response messages.\n * The generator is guaranteed to end with either a 'result' or 'error' message.\n *\n * This method provides streaming access to request processing, allowing you to\n * observe intermediate task status updates for task-augmented requests.\n *\n * @param request - The request to send\n * @param resultSchema - Zod schema for validating the result\n * @param options - Optional request options (timeout, signal, task creation params, etc.)\n * @returns AsyncGenerator that yields ResponseMessage objects\n *\n * @experimental\n */\n requestStream(request, resultSchema, options) {\n return this._client.requestStream(request, resultSchema, options);\n }\n}\n//# sourceMappingURL=client.js.map"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,uBAAuB,CAAC;AACrC,IAAI,WAAW,CAAC,OAAO,EAAE;AACzB,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO;AAC9B,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,oBAAoB,EAAE,OAAO,EAAE;AAChF;AACA,QAAQ,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO;AAC3C;AACA,QAAQ,MAAM,eAAe,GAAG;AAChC,YAAY,GAAG,OAAO;AACtB;AACA;AACA,YAAY,IAAI,EAAE,OAAO,EAAE,IAAI,KAAK,cAAc,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC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O,EAAE;AACtC;AACA,QAAQ,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC;AAC3D,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE;AAClD,QAAQ,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC;AACzE,IAAI;AACJ;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Experimental task capability assertion helpers.
3
+ * WARNING: These APIs are experimental and may change without notice.
4
+ *
5
+ * @experimental
6
+ */
7
+ /**
8
+ * Asserts that task creation is supported for tools/call.
9
+ * Used by Client.assertTaskCapability and Server.assertTaskHandlerCapability.
10
+ *
11
+ * @param requests - The task requests capability object
12
+ * @param method - The method being checked
13
+ * @param entityName - 'Server' or 'Client' for error messages
14
+ * @throws Error if the capability is not supported
15
+ *
16
+ * @experimental
17
+ */
18
+ function assertToolsCallTaskCapability(requests, method, entityName) {
19
+ if (!requests) {
20
+ throw new Error(`${entityName} does not support task creation (required for ${method})`);
21
+ }
22
+ switch (method) {
23
+ case 'tools/call':
24
+ if (!requests.tools?.call) {
25
+ throw new Error(`${entityName} does not support task creation for tools/call (required for ${method})`);
26
+ }
27
+ break;
28
+ }
29
+ }
30
+ /**
31
+ * Asserts that task creation is supported for sampling/createMessage or elicitation/create.
32
+ * Used by Server.assertTaskCapability and Client.assertTaskHandlerCapability.
33
+ *
34
+ * @param requests - The task requests capability object
35
+ * @param method - The method being checked
36
+ * @param entityName - 'Server' or 'Client' for error messages
37
+ * @throws Error if the capability is not supported
38
+ *
39
+ * @experimental
40
+ */
41
+ function assertClientRequestTaskCapability(requests, method, entityName) {
42
+ if (!requests) {
43
+ throw new Error(`${entityName} does not support task creation (required for ${method})`);
44
+ }
45
+ switch (method) {
46
+ case 'sampling/createMessage':
47
+ if (!requests.sampling?.createMessage) {
48
+ throw new Error(`${entityName} does not support task creation for sampling/createMessage (required for ${method})`);
49
+ }
50
+ break;
51
+ case 'elicitation/create':
52
+ if (!requests.elicitation?.create) {
53
+ throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method})`);
54
+ }
55
+ break;
56
+ }
57
+ }
58
+
59
+ export { assertClientRequestTaskCapability, assertToolsCallTaskCapability };
60
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sources":["../../../../../../../../../../node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js"],"sourcesContent":["/**\n * Experimental task capability assertion helpers.\n * WARNING: These APIs are experimental and may change without notice.\n *\n * @experimental\n */\n/**\n * Asserts that task creation is supported for tools/call.\n * Used by Client.assertTaskCapability and Server.assertTaskHandlerCapability.\n *\n * @param requests - The task requests capability object\n * @param method - The method being checked\n * @param entityName - 'Server' or 'Client' for error messages\n * @throws Error if the capability is not supported\n *\n * @experimental\n */\nexport function assertToolsCallTaskCapability(requests, method, entityName) {\n if (!requests) {\n throw new Error(`${entityName} does not support task creation (required for ${method})`);\n }\n switch (method) {\n case 'tools/call':\n if (!requests.tools?.call) {\n throw new Error(`${entityName} does not support task creation for tools/call (required for ${method})`);\n }\n break;\n default:\n // Method doesn't support tasks, which is fine - no error\n break;\n }\n}\n/**\n * Asserts that task creation is supported for sampling/createMessage or elicitation/create.\n * Used by Server.assertTaskCapability and Client.assertTaskHandlerCapability.\n *\n * @param requests - The task requests capability object\n * @param method - The method being checked\n * @param entityName - 'Server' or 'Client' for error messages\n * @throws Error if the capability is not supported\n *\n * @experimental\n */\nexport function assertClientRequestTaskCapability(requests, method, entityName) {\n if (!requests) {\n throw new Error(`${entityName} does not support task creation (required for ${method})`);\n }\n switch (method) {\n case 'sampling/createMessage':\n if (!requests.sampling?.createMessage) {\n throw new Error(`${entityName} does not support task creation for sampling/createMessage (required for ${method})`);\n }\n break;\n case 'elicitation/create':\n if (!requests.elicitation?.create) {\n throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method})`);\n }\n break;\n default:\n // Method doesn't support tasks, which is fine - no error\n break;\n }\n}\n//# sourceMappingURL=helpers.js.map"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,6BAA6B,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE;AAC5E,IAAI,IAAI,CAAC,QAAQ,EAAE;AACnB,QAAQ,MAAM,IAAI,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,8CAA8C,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;AAChG,IAAI;AACJ,IAAI,QAAQ,MAAM;AAClB,QAAQ,KAAK,YAAY;AACzB,YAAY,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE;AACvC,gBAAgB,MAAM,IAAI,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,6DAA6D,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;AACvH,YAAY;AACZ,YAAY;AAIZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,iCAAiC,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE;AAChF,IAAI,IAAI,CAAC,QAAQ,EAAE;AACnB,QAAQ,MAAM,IAAI,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,8CAA8C,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;AAChG,IAAI;AACJ,IAAI,QAAQ,MAAM;AAClB,QAAQ,KAAK,wBAAwB;AACrC,YAAY,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,aAAa,EAAE;AACnD,gBAAgB,MAAM,IAAI,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,yEAAyE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;AACnI,YAAY;AACZ,YAAY;AACZ,QAAQ,KAAK,oBAAoB;AACjC,YAAY,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE;AAC/C,gBAAgB,MAAM,IAAI,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,qEAAqE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;AAC/H,YAAY;AACZ,YAAY;AAIZ;AACA;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Experimental task interfaces for MCP SDK.
3
+ * WARNING: These APIs are experimental and may change without notice.
4
+ */
5
+ /**
6
+ * Checks if a task status represents a terminal state.
7
+ * Terminal states are those where the task has finished and will not change.
8
+ *
9
+ * @param status - The task status to check
10
+ * @returns True if the status is terminal (completed, failed, or cancelled)
11
+ * @experimental
12
+ */
13
+ function isTerminal(status) {
14
+ return status === 'completed' || status === 'failed' || status === 'cancelled';
15
+ }
16
+
17
+ export { isTerminal };
18
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sources":["../../../../../../../../../../node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js"],"sourcesContent":["/**\n * Experimental task interfaces for MCP SDK.\n * WARNING: These APIs are experimental and may change without notice.\n */\n/**\n * Checks if a task status represents a terminal state.\n * Terminal states are those where the task has finished and will not change.\n *\n * @param status - The task status to check\n * @returns True if the status is terminal (completed, failed, or cancelled)\n * @experimental\n */\nexport function isTerminal(status) {\n return status === 'completed' || status === 'failed' || status === 'cancelled';\n}\n//# sourceMappingURL=interfaces.js.map"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,UAAU,CAAC,MAAM,EAAE;AACnC,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,WAAW;AAClF;;;;","x_google_ignoreList":[0]}
@@ -31,14 +31,14 @@ class OAuthError extends Error {
31
31
  */
32
32
  class InvalidRequestError extends OAuthError {
33
33
  }
34
- InvalidRequestError.errorCode = "invalid_request";
34
+ InvalidRequestError.errorCode = 'invalid_request';
35
35
  /**
36
36
  * Invalid client error - Client authentication failed (e.g., unknown client, no client
37
37
  * authentication included, or unsupported authentication method).
38
38
  */
39
39
  class InvalidClientError extends OAuthError {
40
40
  }
41
- InvalidClientError.errorCode = "invalid_client";
41
+ InvalidClientError.errorCode = 'invalid_client';
42
42
  /**
43
43
  * Invalid grant error - The provided authorization grant or refresh token is
44
44
  * invalid, expired, revoked, does not match the redirection URI used in the
@@ -46,96 +46,103 @@ InvalidClientError.errorCode = "invalid_client";
46
46
  */
47
47
  class InvalidGrantError extends OAuthError {
48
48
  }
49
- InvalidGrantError.errorCode = "invalid_grant";
49
+ InvalidGrantError.errorCode = 'invalid_grant';
50
50
  /**
51
51
  * Unauthorized client error - The authenticated client is not authorized to use
52
52
  * this authorization grant type.
53
53
  */
54
54
  class UnauthorizedClientError extends OAuthError {
55
55
  }
56
- UnauthorizedClientError.errorCode = "unauthorized_client";
56
+ UnauthorizedClientError.errorCode = 'unauthorized_client';
57
57
  /**
58
58
  * Unsupported grant type error - The authorization grant type is not supported
59
59
  * by the authorization server.
60
60
  */
61
61
  class UnsupportedGrantTypeError extends OAuthError {
62
62
  }
63
- UnsupportedGrantTypeError.errorCode = "unsupported_grant_type";
63
+ UnsupportedGrantTypeError.errorCode = 'unsupported_grant_type';
64
64
  /**
65
65
  * Invalid scope error - The requested scope is invalid, unknown, malformed, or
66
66
  * exceeds the scope granted by the resource owner.
67
67
  */
68
68
  class InvalidScopeError extends OAuthError {
69
69
  }
70
- InvalidScopeError.errorCode = "invalid_scope";
70
+ InvalidScopeError.errorCode = 'invalid_scope';
71
71
  /**
72
72
  * Access denied error - The resource owner or authorization server denied the request.
73
73
  */
74
74
  class AccessDeniedError extends OAuthError {
75
75
  }
76
- AccessDeniedError.errorCode = "access_denied";
76
+ AccessDeniedError.errorCode = 'access_denied';
77
77
  /**
78
78
  * Server error - The authorization server encountered an unexpected condition
79
79
  * that prevented it from fulfilling the request.
80
80
  */
81
81
  class ServerError extends OAuthError {
82
82
  }
83
- ServerError.errorCode = "server_error";
83
+ ServerError.errorCode = 'server_error';
84
84
  /**
85
85
  * Temporarily unavailable error - The authorization server is currently unable to
86
86
  * handle the request due to a temporary overloading or maintenance of the server.
87
87
  */
88
88
  class TemporarilyUnavailableError extends OAuthError {
89
89
  }
90
- TemporarilyUnavailableError.errorCode = "temporarily_unavailable";
90
+ TemporarilyUnavailableError.errorCode = 'temporarily_unavailable';
91
91
  /**
92
92
  * Unsupported response type error - The authorization server does not support
93
93
  * obtaining an authorization code using this method.
94
94
  */
95
95
  class UnsupportedResponseTypeError extends OAuthError {
96
96
  }
97
- UnsupportedResponseTypeError.errorCode = "unsupported_response_type";
97
+ UnsupportedResponseTypeError.errorCode = 'unsupported_response_type';
98
98
  /**
99
99
  * Unsupported token type error - The authorization server does not support
100
100
  * the requested token type.
101
101
  */
102
102
  class UnsupportedTokenTypeError extends OAuthError {
103
103
  }
104
- UnsupportedTokenTypeError.errorCode = "unsupported_token_type";
104
+ UnsupportedTokenTypeError.errorCode = 'unsupported_token_type';
105
105
  /**
106
106
  * Invalid token error - The access token provided is expired, revoked, malformed,
107
107
  * or invalid for other reasons.
108
108
  */
109
109
  class InvalidTokenError extends OAuthError {
110
110
  }
111
- InvalidTokenError.errorCode = "invalid_token";
111
+ InvalidTokenError.errorCode = 'invalid_token';
112
112
  /**
113
113
  * Method not allowed error - The HTTP method used is not allowed for this endpoint.
114
114
  * (Custom, non-standard error)
115
115
  */
116
116
  class MethodNotAllowedError extends OAuthError {
117
117
  }
118
- MethodNotAllowedError.errorCode = "method_not_allowed";
118
+ MethodNotAllowedError.errorCode = 'method_not_allowed';
119
119
  /**
120
120
  * Too many requests error - Rate limit exceeded.
121
121
  * (Custom, non-standard error based on RFC 6585)
122
122
  */
123
123
  class TooManyRequestsError extends OAuthError {
124
124
  }
125
- TooManyRequestsError.errorCode = "too_many_requests";
125
+ TooManyRequestsError.errorCode = 'too_many_requests';
126
126
  /**
127
127
  * Invalid client metadata error - The client metadata is invalid.
128
128
  * (Custom error for dynamic client registration - RFC 7591)
129
129
  */
130
130
  class InvalidClientMetadataError extends OAuthError {
131
131
  }
132
- InvalidClientMetadataError.errorCode = "invalid_client_metadata";
132
+ InvalidClientMetadataError.errorCode = 'invalid_client_metadata';
133
133
  /**
134
134
  * Insufficient scope error - The request requires higher privileges than provided by the access token.
135
135
  */
136
136
  class InsufficientScopeError extends OAuthError {
137
137
  }
138
- InsufficientScopeError.errorCode = "insufficient_scope";
138
+ InsufficientScopeError.errorCode = 'insufficient_scope';
139
+ /**
140
+ * Invalid target error - The requested resource is invalid, missing, unknown, or malformed.
141
+ * (Custom error for resource indicators - RFC 8707)
142
+ */
143
+ class InvalidTargetError extends OAuthError {
144
+ }
145
+ InvalidTargetError.errorCode = 'invalid_target';
139
146
  /**
140
147
  * A full list of all OAuthErrors, enabling parsing from error responses
141
148
  */
@@ -156,7 +163,8 @@ const OAUTH_ERRORS = {
156
163
  [TooManyRequestsError.errorCode]: TooManyRequestsError,
157
164
  [InvalidClientMetadataError.errorCode]: InvalidClientMetadataError,
158
165
  [InsufficientScopeError.errorCode]: InsufficientScopeError,
166
+ [InvalidTargetError.errorCode]: InvalidTargetError
159
167
  };
160
168
 
161
- export { AccessDeniedError, InsufficientScopeError, InvalidClientError, InvalidClientMetadataError, InvalidGrantError, InvalidRequestError, InvalidScopeError, InvalidTokenError, MethodNotAllowedError, OAUTH_ERRORS, OAuthError, ServerError, TemporarilyUnavailableError, TooManyRequestsError, UnauthorizedClientError, UnsupportedGrantTypeError, UnsupportedResponseTypeError, UnsupportedTokenTypeError };
169
+ export { AccessDeniedError, InsufficientScopeError, InvalidClientError, InvalidClientMetadataError, InvalidGrantError, InvalidRequestError, InvalidScopeError, InvalidTargetError, InvalidTokenError, MethodNotAllowedError, OAUTH_ERRORS, OAuthError, ServerError, TemporarilyUnavailableError, TooManyRequestsError, UnauthorizedClientError, UnsupportedGrantTypeError, UnsupportedResponseTypeError, UnsupportedTokenTypeError };
162
170
  //# sourceMappingURL=errors.js.map