@spotlightjs/spotlight 4.10.0 → 4.11.1

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 (215) hide show
  1. package/dist/_virtual/index.js +3 -3
  2. package/dist/_virtual/index2.js +3 -3
  3. package/dist/_virtual/index3.js +3 -3
  4. package/dist/_virtual/index8.js +3 -3
  5. package/dist/_virtual/index9.js +3 -3
  6. package/dist/node_modules/.pnpm/{@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13 → @modelcontextprotocol_sdk@1.27.1_zod@4.1.13}/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js +5 -3
  7. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js.map +1 -0
  8. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/client.js.map +1 -0
  9. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js.map +1 -0
  10. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js.map +1 -0
  11. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js.map +1 -0
  12. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js +224 -0
  13. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js.map +1 -0
  14. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js.map +1 -0
  15. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js.map +1 -0
  16. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js.map +1 -0
  17. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js.map +1 -0
  18. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js.map +1 -0
  19. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js.map +1 -0
  20. package/dist/node_modules/.pnpm/{@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13 → @modelcontextprotocol_sdk@1.27.1_zod@4.1.13}/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +13 -1
  21. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js.map +1 -0
  22. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js.map +1 -0
  23. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js.map +1 -0
  24. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js.map +1 -0
  25. package/dist/node_modules/.pnpm/{@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13 → @modelcontextprotocol_sdk@1.27.1_zod@4.1.13}/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js +3 -3
  26. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js.map +1 -0
  27. package/dist/node_modules/.pnpm/{ajv-formats@3.0.1_ajv@8.17.1 → ajv-formats@3.0.1_ajv@8.18.0}/node_modules/ajv-formats/dist/formats.js.map +1 -1
  28. package/dist/node_modules/.pnpm/{ajv-formats@3.0.1_ajv@8.17.1 → ajv-formats@3.0.1_ajv@8.18.0}/node_modules/ajv-formats/dist/index.js +3 -3
  29. package/dist/node_modules/.pnpm/{ajv-formats@3.0.1_ajv@8.17.1 → ajv-formats@3.0.1_ajv@8.18.0}/node_modules/ajv-formats/dist/index.js.map +1 -1
  30. package/dist/node_modules/.pnpm/{ajv-formats@3.0.1_ajv@8.17.1 → ajv-formats@3.0.1_ajv@8.18.0}/node_modules/ajv-formats/dist/limit.js +4 -4
  31. package/dist/node_modules/.pnpm/{ajv-formats@3.0.1_ajv@8.17.1 → ajv-formats@3.0.1_ajv@8.18.0}/node_modules/ajv-formats/dist/limit.js.map +1 -1
  32. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/ajv.js +6 -6
  33. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/ajv.js.map +1 -1
  34. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/codegen/code.js.map +1 -1
  35. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/codegen/index.js +2 -2
  36. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/codegen/index.js.map +1 -1
  37. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -1
  38. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/errors.js +2 -2
  39. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/errors.js.map +1 -1
  40. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/index.js +3 -3
  41. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/index.js.map +1 -1
  42. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/names.js +2 -2
  43. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/names.js.map +1 -1
  44. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/ref_error.js.map +1 -1
  45. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/resolve.js.map +1 -1
  46. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/rules.js.map +1 -1
  47. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/util.js +2 -2
  48. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/util.js.map +1 -1
  49. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -1
  50. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/validate/boolSchema.js +2 -2
  51. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -1
  52. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/validate/dataType.js +2 -2
  53. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -1
  54. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/validate/defaults.js +2 -2
  55. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -1
  56. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/validate/index.js +3 -3
  57. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/validate/index.js.map +1 -1
  58. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/validate/keyword.js +2 -2
  59. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -1
  60. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/validate/subschema.js +2 -2
  61. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -1
  62. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/core.js +3 -3
  63. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/core.js.map +1 -1
  64. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/runtime/equal.js.map +1 -1
  65. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -1
  66. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/runtime/uri.js.map +1 -1
  67. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/runtime/validation_error.js.map +1 -1
  68. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +2 -2
  69. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -1
  70. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +2 -2
  71. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -1
  72. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -1
  73. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -1
  74. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/contains.js +2 -2
  75. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -1
  76. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +2 -2
  77. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -1
  78. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/if.js +2 -2
  79. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -1
  80. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/index.js +2 -2
  81. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -1
  82. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/items.js +2 -2
  83. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -1
  84. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/items2020.js +2 -2
  85. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -1
  86. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -1
  87. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +2 -2
  88. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -1
  89. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +2 -2
  90. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -1
  91. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -1
  92. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/properties.js +2 -2
  93. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -1
  94. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +2 -2
  95. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -1
  96. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -1
  97. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/code.js +2 -2
  98. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/code.js.map +1 -1
  99. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -1
  100. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -1
  101. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/core/ref.js +2 -2
  102. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -1
  103. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/discriminator/index.js +3 -3
  104. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -1
  105. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -1
  106. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/draft7.js +3 -3
  107. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -1
  108. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/format/format.js +2 -2
  109. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -1
  110. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/format/index.js +6 -6
  111. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -1
  112. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -1
  113. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/validation/const.js +2 -2
  114. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -1
  115. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/validation/enum.js +2 -2
  116. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -1
  117. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -1
  118. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/validation/limitItems.js +2 -2
  119. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -1
  120. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/validation/limitLength.js +2 -2
  121. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -1
  122. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +2 -2
  123. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -1
  124. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +2 -2
  125. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -1
  126. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +2 -2
  127. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -1
  128. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/validation/pattern.js +16 -5
  129. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -0
  130. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/validation/required.js +2 -2
  131. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -1
  132. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +2 -2
  133. package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -1
  134. package/dist/node_modules/.pnpm/{hono@4.10.3 → hono@4.12.8}/node_modules/hono/dist/helper/streaming/sse.js +7 -2
  135. package/dist/node_modules/.pnpm/hono@4.12.8/node_modules/hono/dist/helper/streaming/sse.js.map +1 -0
  136. package/dist/node_modules/.pnpm/{hono@4.10.3 → hono@4.12.8}/node_modules/hono/dist/middleware/cors/index.js.map +1 -1
  137. package/dist/node_modules/.pnpm/{hono@4.10.3 → hono@4.12.8}/node_modules/hono/dist/utils/html.js.map +1 -1
  138. package/dist/node_modules/.pnpm/{hono@4.10.3 → hono@4.12.8}/node_modules/hono/dist/utils/stream.js +11 -1
  139. package/dist/node_modules/.pnpm/hono@4.12.8/node_modules/hono/dist/utils/stream.js.map +1 -0
  140. package/dist/sentry-config.js +2 -2
  141. package/dist/server/cli/help.js +18 -14
  142. package/dist/server/cli/mcp.js +3 -3
  143. package/dist/server/cli/run.js +2 -2
  144. package/dist/server/cli/tail.js +12 -1
  145. package/dist/server/cli.js +2 -2
  146. package/dist/server/main.js +2 -2
  147. package/dist/server/mcp/mcp.js +3 -3
  148. package/dist/server/routes/stream/index.d.ts +32 -4
  149. package/dist/server/routes/stream/streaming.js +2 -2
  150. package/dist/ui/assets/index.js +48 -48
  151. package/dist/ui/assets/instrumentation.js +2 -2
  152. package/dist/ui/assets/main.css +1 -1
  153. package/dist/ui/assets/serverTimingMeta.js +2 -2
  154. package/package.json +4 -4
  155. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js.map +0 -1
  156. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/client.js.map +0 -1
  157. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js.map +0 -1
  158. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js.map +0 -1
  159. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js.map +0 -1
  160. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js +0 -82
  161. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js.map +0 -1
  162. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js.map +0 -1
  163. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js.map +0 -1
  164. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js.map +0 -1
  165. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js.map +0 -1
  166. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js.map +0 -1
  167. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js.map +0 -1
  168. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js.map +0 -1
  169. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js.map +0 -1
  170. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js.map +0 -1
  171. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js.map +0 -1
  172. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js.map +0 -1
  173. package/dist/node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +0 -1
  174. package/dist/node_modules/.pnpm/hono@4.10.3/node_modules/hono/dist/helper/streaming/sse.js.map +0 -1
  175. package/dist/node_modules/.pnpm/hono@4.10.3/node_modules/hono/dist/utils/stream.js.map +0 -1
  176. /package/dist/node_modules/.pnpm/{@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13 → @modelcontextprotocol_sdk@1.27.1_zod@4.1.13}/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/client.js +0 -0
  177. /package/dist/node_modules/.pnpm/{@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13 → @modelcontextprotocol_sdk@1.27.1_zod@4.1.13}/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js +0 -0
  178. /package/dist/node_modules/.pnpm/{@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13 → @modelcontextprotocol_sdk@1.27.1_zod@4.1.13}/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js +0 -0
  179. /package/dist/node_modules/.pnpm/{@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13 → @modelcontextprotocol_sdk@1.27.1_zod@4.1.13}/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js +0 -0
  180. /package/dist/node_modules/.pnpm/{@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13 → @modelcontextprotocol_sdk@1.27.1_zod@4.1.13}/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js +0 -0
  181. /package/dist/node_modules/.pnpm/{@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13 → @modelcontextprotocol_sdk@1.27.1_zod@4.1.13}/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js +0 -0
  182. /package/dist/node_modules/.pnpm/{@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13 → @modelcontextprotocol_sdk@1.27.1_zod@4.1.13}/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js +0 -0
  183. /package/dist/node_modules/.pnpm/{@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13 → @modelcontextprotocol_sdk@1.27.1_zod@4.1.13}/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js +0 -0
  184. /package/dist/node_modules/.pnpm/{@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13 → @modelcontextprotocol_sdk@1.27.1_zod@4.1.13}/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +0 -0
  185. /package/dist/node_modules/.pnpm/{@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13 → @modelcontextprotocol_sdk@1.27.1_zod@4.1.13}/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js +0 -0
  186. /package/dist/node_modules/.pnpm/{@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13 → @modelcontextprotocol_sdk@1.27.1_zod@4.1.13}/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js +0 -0
  187. /package/dist/node_modules/.pnpm/{@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13 → @modelcontextprotocol_sdk@1.27.1_zod@4.1.13}/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js +0 -0
  188. /package/dist/node_modules/.pnpm/{@modelcontextprotocol_sdk@1.25.2_hono@4.10.3_zod@4.1.13 → @modelcontextprotocol_sdk@1.27.1_zod@4.1.13}/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +0 -0
  189. /package/dist/node_modules/.pnpm/{ajv-formats@3.0.1_ajv@8.17.1 → ajv-formats@3.0.1_ajv@8.18.0}/node_modules/ajv-formats/dist/formats.js +0 -0
  190. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/codegen/code.js +0 -0
  191. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/codegen/scope.js +0 -0
  192. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/ref_error.js +0 -0
  193. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/resolve.js +0 -0
  194. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/rules.js +0 -0
  195. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/compile/validate/applicability.js +0 -0
  196. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/refs/data.json.js +0 -0
  197. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/refs/data.json.js.map +0 -0
  198. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/refs/json-schema-draft-07.json.js +0 -0
  199. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/refs/json-schema-draft-07.json.js.map +0 -0
  200. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/runtime/equal.js +0 -0
  201. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/runtime/ucs2length.js +0 -0
  202. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/runtime/uri.js +0 -0
  203. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/runtime/validation_error.js +0 -0
  204. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/allOf.js +0 -0
  205. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +0 -0
  206. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/not.js +0 -0
  207. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +0 -0
  208. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +0 -0
  209. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/core/id.js +0 -0
  210. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/core/index.js +0 -0
  211. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/discriminator/types.js +0 -0
  212. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/metadata.js +0 -0
  213. /package/dist/node_modules/.pnpm/{ajv@8.17.1 → ajv@8.18.0}/node_modules/ajv/dist/vocabularies/validation/index.js +0 -0
  214. /package/dist/node_modules/.pnpm/{hono@4.10.3 → hono@4.12.8}/node_modules/hono/dist/middleware/cors/index.js +0 -0
  215. /package/dist/node_modules/.pnpm/{hono@4.10.3 → hono@4.12.8}/node_modules/hono/dist/utils/html.js +0 -0
@@ -2,12 +2,12 @@
2
2
  !(function() {
3
3
  try {
4
4
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "e20a70bc-7a8c-4b90-a482-a7dc323044ba", e._sentryDebugIdIdentifier = "sentry-dbid-e20a70bc-7a8c-4b90-a482-a7dc323044ba");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "42a9f4a6-0062-4f39-946b-9843c2cb882f", e._sentryDebugIdIdentifier = "sentry-dbid-42a9f4a6-0062-4f39-946b-9843c2cb882f");
6
6
  } catch (e2) {
7
7
  }
8
8
  })();
9
- var discriminator = {};
9
+ var validate = {};
10
10
  export {
11
- discriminator as __exports
11
+ validate as __exports
12
12
  };
13
13
  //# sourceMappingURL=index.js.map
@@ -2,12 +2,12 @@
2
2
  !(function() {
3
3
  try {
4
4
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "42a9f4a6-0062-4f39-946b-9843c2cb882f", e._sentryDebugIdIdentifier = "sentry-dbid-42a9f4a6-0062-4f39-946b-9843c2cb882f");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "677747a1-7319-43c5-a006-61ab595c65a1", e._sentryDebugIdIdentifier = "sentry-dbid-677747a1-7319-43c5-a006-61ab595c65a1");
6
6
  } catch (e2) {
7
7
  }
8
8
  })();
9
- var validate = {};
9
+ var codegen = {};
10
10
  export {
11
- validate as __exports
11
+ codegen as __exports
12
12
  };
13
13
  //# sourceMappingURL=index2.js.map
@@ -2,12 +2,12 @@
2
2
  !(function() {
3
3
  try {
4
4
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "677747a1-7319-43c5-a006-61ab595c65a1", e._sentryDebugIdIdentifier = "sentry-dbid-677747a1-7319-43c5-a006-61ab595c65a1");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "e20a70bc-7a8c-4b90-a482-a7dc323044ba", e._sentryDebugIdIdentifier = "sentry-dbid-e20a70bc-7a8c-4b90-a482-a7dc323044ba");
6
6
  } catch (e2) {
7
7
  }
8
8
  })();
9
- var codegen = {};
9
+ var discriminator = {};
10
10
  export {
11
- codegen as __exports
11
+ discriminator as __exports
12
12
  };
13
13
  //# sourceMappingURL=index3.js.map
@@ -2,12 +2,12 @@
2
2
  !(function() {
3
3
  try {
4
4
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "ee898fdd-0d2f-40fe-9d7b-7815db645dca", e._sentryDebugIdIdentifier = "sentry-dbid-ee898fdd-0d2f-40fe-9d7b-7815db645dca");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "c3f174db-b34a-4f42-b65a-21ecec032299", e._sentryDebugIdIdentifier = "sentry-dbid-c3f174db-b34a-4f42-b65a-21ecec032299");
6
6
  } catch (e2) {
7
7
  }
8
8
  })();
9
- var applicator = {};
9
+ var format = {};
10
10
  export {
11
- applicator as __exports
11
+ format as __exports
12
12
  };
13
13
  //# sourceMappingURL=index8.js.map
@@ -2,12 +2,12 @@
2
2
  !(function() {
3
3
  try {
4
4
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "c3f174db-b34a-4f42-b65a-21ecec032299", e._sentryDebugIdIdentifier = "sentry-dbid-c3f174db-b34a-4f42-b65a-21ecec032299");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "ee898fdd-0d2f-40fe-9d7b-7815db645dca", e._sentryDebugIdIdentifier = "sentry-dbid-ee898fdd-0d2f-40fe-9d7b-7815db645dca");
6
6
  } catch (e2) {
7
7
  }
8
8
  })();
9
- var format = {};
9
+ var applicator = {};
10
10
  export {
11
- format as __exports
11
+ applicator as __exports
12
12
  };
13
13
  //# sourceMappingURL=index9.js.map
@@ -2,12 +2,12 @@
2
2
  !(function() {
3
3
  try {
4
4
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "e44c9e7b-93bf-43ad-9edd-7af94ad501f9", e._sentryDebugIdIdentifier = "sentry-dbid-e44c9e7b-93bf-43ad-9edd-7af94ad501f9");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "7ef023e4-427b-4880-a7ec-3a160149a555", e._sentryDebugIdIdentifier = "sentry-dbid-7ef023e4-427b-4880-a7ec-3a160149a555");
6
6
  } catch (e2) {
7
7
  }
8
8
  })();
9
9
  import { Protocol, mergeCapabilities } from "../shared/protocol.js";
10
- import { ToolListChangedNotificationSchema, PromptListChangedNotificationSchema, ResourceListChangedNotificationSchema, LATEST_PROTOCOL_VERSION, InitializeResultSchema, SUPPORTED_PROTOCOL_VERSIONS, EmptyResultSchema, CompleteResultSchema, GetPromptResultSchema, ListPromptsResultSchema, ListResourcesResultSchema, ListResourceTemplatesResultSchema, ReadResourceResultSchema, CallToolResultSchema, McpError, ErrorCode, ListToolsResultSchema, ListChangedOptionsBaseSchema, ElicitRequestSchema, CreateTaskResultSchema, ElicitResultSchema, CreateMessageRequestSchema, CreateMessageResultSchema } from "../types.js";
10
+ import { ToolListChangedNotificationSchema, PromptListChangedNotificationSchema, ResourceListChangedNotificationSchema, LATEST_PROTOCOL_VERSION, InitializeResultSchema, SUPPORTED_PROTOCOL_VERSIONS, EmptyResultSchema, CompleteResultSchema, GetPromptResultSchema, ListPromptsResultSchema, ListResourcesResultSchema, ListResourceTemplatesResultSchema, ReadResourceResultSchema, CallToolResultSchema, McpError, ErrorCode, ListToolsResultSchema, ListChangedOptionsBaseSchema, ElicitRequestSchema, CreateTaskResultSchema, ElicitResultSchema, CreateMessageRequestSchema, CreateMessageResultWithToolsSchema, CreateMessageResultSchema } from "../types.js";
11
11
  import { AjvJsonSchemaValidator } from "../validation/ajv-provider.js";
12
12
  import { getObjectShape, isZ4Schema, safeParse } from "../server/zod-compat.js";
13
13
  import { ExperimentalClientTasks } from "../experimental/tasks/client.js";
@@ -206,7 +206,9 @@ class Client extends Protocol {
206
206
  }
207
207
  return taskValidationResult.data;
208
208
  }
209
- const validationResult = safeParse(CreateMessageResultSchema, result);
209
+ const hasTools = params.tools || params.toolChoice;
210
+ const resultSchema = hasTools ? CreateMessageResultWithToolsSchema : CreateMessageResultSchema;
211
+ const validationResult = safeParse(resultSchema, result);
210
212
  if (!validationResult.success) {
211
213
  const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error);
212
214
  throw new McpError(ErrorCode.InvalidParams, `Invalid sampling result: ${errorMessage}`);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../../../../../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js"],"sourcesContent":["import { mergeCapabilities, Protocol } from '../shared/protocol.js';\nimport { CallToolResultSchema, CompleteResultSchema, EmptyResultSchema, ErrorCode, GetPromptResultSchema, InitializeResultSchema, LATEST_PROTOCOL_VERSION, ListPromptsResultSchema, ListResourcesResultSchema, ListResourceTemplatesResultSchema, ListToolsResultSchema, McpError, ReadResourceResultSchema, SUPPORTED_PROTOCOL_VERSIONS, ElicitResultSchema, ElicitRequestSchema, CreateTaskResultSchema, CreateMessageRequestSchema, CreateMessageResultSchema, CreateMessageResultWithToolsSchema, ToolListChangedNotificationSchema, PromptListChangedNotificationSchema, ResourceListChangedNotificationSchema, ListChangedOptionsBaseSchema } from '../types.js';\nimport { AjvJsonSchemaValidator } from '../validation/ajv-provider.js';\nimport { getObjectShape, isZ4Schema, safeParse } from '../server/zod-compat.js';\nimport { ExperimentalClientTasks } from '../experimental/tasks/client.js';\nimport { assertToolsCallTaskCapability, assertClientRequestTaskCapability } from '../experimental/tasks/helpers.js';\n/**\n * Elicitation default application helper. Applies defaults to the data based on the schema.\n *\n * @param schema - The schema to apply defaults to.\n * @param data - The data to apply defaults to.\n */\nfunction applyElicitationDefaults(schema, data) {\n if (!schema || data === null || typeof data !== 'object')\n return;\n // Handle object properties\n if (schema.type === 'object' && schema.properties && typeof schema.properties === 'object') {\n const obj = data;\n const props = schema.properties;\n for (const key of Object.keys(props)) {\n const propSchema = props[key];\n // If missing or explicitly undefined, apply default if present\n if (obj[key] === undefined && Object.prototype.hasOwnProperty.call(propSchema, 'default')) {\n obj[key] = propSchema.default;\n }\n // Recurse into existing nested objects/arrays\n if (obj[key] !== undefined) {\n applyElicitationDefaults(propSchema, obj[key]);\n }\n }\n }\n if (Array.isArray(schema.anyOf)) {\n for (const sub of schema.anyOf) {\n // Skip boolean schemas (true/false are valid JSON Schemas but have no defaults)\n if (typeof sub !== 'boolean') {\n applyElicitationDefaults(sub, data);\n }\n }\n }\n // Combine schemas\n if (Array.isArray(schema.oneOf)) {\n for (const sub of schema.oneOf) {\n // Skip boolean schemas (true/false are valid JSON Schemas but have no defaults)\n if (typeof sub !== 'boolean') {\n applyElicitationDefaults(sub, data);\n }\n }\n }\n}\n/**\n * Determines which elicitation modes are supported based on declared client capabilities.\n *\n * According to the spec:\n * - An empty elicitation capability object defaults to form mode support (backwards compatibility)\n * - URL mode is only supported if explicitly declared\n *\n * @param capabilities - The client's elicitation capabilities\n * @returns An object indicating which modes are supported\n */\nexport function getSupportedElicitationModes(capabilities) {\n if (!capabilities) {\n return { supportsFormMode: false, supportsUrlMode: false };\n }\n const hasFormCapability = capabilities.form !== undefined;\n const hasUrlCapability = capabilities.url !== undefined;\n // If neither form nor url are explicitly declared, form mode is supported (backwards compatibility)\n const supportsFormMode = hasFormCapability || (!hasFormCapability && !hasUrlCapability);\n const supportsUrlMode = hasUrlCapability;\n return { supportsFormMode, supportsUrlMode };\n}\n/**\n * An MCP client on top of a pluggable transport.\n *\n * The client will automatically begin the initialization flow with the server when connect() is called.\n *\n * To use with custom types, extend the base Request/Notification/Result types and pass them as type parameters:\n *\n * ```typescript\n * // Custom schemas\n * const CustomRequestSchema = RequestSchema.extend({...})\n * const CustomNotificationSchema = NotificationSchema.extend({...})\n * const CustomResultSchema = ResultSchema.extend({...})\n *\n * // Type aliases\n * type CustomRequest = z.infer<typeof CustomRequestSchema>\n * type CustomNotification = z.infer<typeof CustomNotificationSchema>\n * type CustomResult = z.infer<typeof CustomResultSchema>\n *\n * // Create typed client\n * const client = new Client<CustomRequest, CustomNotification, CustomResult>({\n * name: \"CustomClient\",\n * version: \"1.0.0\"\n * })\n * ```\n */\nexport class Client extends Protocol {\n /**\n * Initializes this client with the given name and version information.\n */\n constructor(_clientInfo, options) {\n super(options);\n this._clientInfo = _clientInfo;\n this._cachedToolOutputValidators = new Map();\n this._cachedKnownTaskTools = new Set();\n this._cachedRequiredTaskTools = new Set();\n this._listChangedDebounceTimers = new Map();\n this._capabilities = options?.capabilities ?? {};\n this._jsonSchemaValidator = options?.jsonSchemaValidator ?? new AjvJsonSchemaValidator();\n // Store list changed config for setup after connection (when we know server capabilities)\n if (options?.listChanged) {\n this._pendingListChangedConfig = options.listChanged;\n }\n }\n /**\n * Set up handlers for list changed notifications based on config and server capabilities.\n * This should only be called after initialization when server capabilities are known.\n * Handlers are silently skipped if the server doesn't advertise the corresponding listChanged capability.\n * @internal\n */\n _setupListChangedHandlers(config) {\n if (config.tools && this._serverCapabilities?.tools?.listChanged) {\n this._setupListChangedHandler('tools', ToolListChangedNotificationSchema, config.tools, async () => {\n const result = await this.listTools();\n return result.tools;\n });\n }\n if (config.prompts && this._serverCapabilities?.prompts?.listChanged) {\n this._setupListChangedHandler('prompts', PromptListChangedNotificationSchema, config.prompts, async () => {\n const result = await this.listPrompts();\n return result.prompts;\n });\n }\n if (config.resources && this._serverCapabilities?.resources?.listChanged) {\n this._setupListChangedHandler('resources', ResourceListChangedNotificationSchema, config.resources, async () => {\n const result = await this.listResources();\n return result.resources;\n });\n }\n }\n /**\n * Access experimental features.\n *\n * WARNING: These APIs are experimental and may change without notice.\n *\n * @experimental\n */\n get experimental() {\n if (!this._experimental) {\n this._experimental = {\n tasks: new ExperimentalClientTasks(this)\n };\n }\n return this._experimental;\n }\n /**\n * Registers new capabilities. This can only be called before connecting to a transport.\n *\n * The new capabilities will be merged with any existing capabilities previously given (e.g., at initialization).\n */\n registerCapabilities(capabilities) {\n if (this.transport) {\n throw new Error('Cannot register capabilities after connecting to transport');\n }\n this._capabilities = mergeCapabilities(this._capabilities, capabilities);\n }\n /**\n * Override request handler registration to enforce client-side validation for elicitation.\n */\n setRequestHandler(requestSchema, handler) {\n const shape = getObjectShape(requestSchema);\n const methodSchema = shape?.method;\n if (!methodSchema) {\n throw new Error('Schema is missing a method literal');\n }\n // Extract literal value using type-safe property access\n let methodValue;\n if (isZ4Schema(methodSchema)) {\n const v4Schema = methodSchema;\n const v4Def = v4Schema._zod?.def;\n methodValue = v4Def?.value ?? v4Schema.value;\n }\n else {\n const v3Schema = methodSchema;\n const legacyDef = v3Schema._def;\n methodValue = legacyDef?.value ?? v3Schema.value;\n }\n if (typeof methodValue !== 'string') {\n throw new Error('Schema method literal must be a string');\n }\n const method = methodValue;\n if (method === 'elicitation/create') {\n const wrappedHandler = async (request, extra) => {\n const validatedRequest = safeParse(ElicitRequestSchema, request);\n if (!validatedRequest.success) {\n // Type guard: if success is false, error is guaranteed to exist\n const errorMessage = validatedRequest.error instanceof Error ? validatedRequest.error.message : String(validatedRequest.error);\n throw new McpError(ErrorCode.InvalidParams, `Invalid elicitation request: ${errorMessage}`);\n }\n const { params } = validatedRequest.data;\n params.mode = params.mode ?? 'form';\n const { supportsFormMode, supportsUrlMode } = getSupportedElicitationModes(this._capabilities.elicitation);\n if (params.mode === 'form' && !supportsFormMode) {\n throw new McpError(ErrorCode.InvalidParams, 'Client does not support form-mode elicitation requests');\n }\n if (params.mode === 'url' && !supportsUrlMode) {\n throw new McpError(ErrorCode.InvalidParams, 'Client does not support URL-mode elicitation requests');\n }\n const result = await Promise.resolve(handler(request, extra));\n // When task creation is requested, validate and return CreateTaskResult\n if (params.task) {\n const taskValidationResult = safeParse(CreateTaskResultSchema, result);\n if (!taskValidationResult.success) {\n const errorMessage = taskValidationResult.error instanceof Error\n ? taskValidationResult.error.message\n : String(taskValidationResult.error);\n throw new McpError(ErrorCode.InvalidParams, `Invalid task creation result: ${errorMessage}`);\n }\n return taskValidationResult.data;\n }\n // For non-task requests, validate against ElicitResultSchema\n const validationResult = safeParse(ElicitResultSchema, result);\n if (!validationResult.success) {\n // Type guard: if success is false, error is guaranteed to exist\n const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error);\n throw new McpError(ErrorCode.InvalidParams, `Invalid elicitation result: ${errorMessage}`);\n }\n const validatedResult = validationResult.data;\n const requestedSchema = params.mode === 'form' ? params.requestedSchema : undefined;\n if (params.mode === 'form' && validatedResult.action === 'accept' && validatedResult.content && requestedSchema) {\n if (this._capabilities.elicitation?.form?.applyDefaults) {\n try {\n applyElicitationDefaults(requestedSchema, validatedResult.content);\n }\n catch {\n // gracefully ignore errors in default application\n }\n }\n }\n return validatedResult;\n };\n // Install the wrapped handler\n return super.setRequestHandler(requestSchema, wrappedHandler);\n }\n if (method === 'sampling/createMessage') {\n const wrappedHandler = async (request, extra) => {\n const validatedRequest = safeParse(CreateMessageRequestSchema, request);\n if (!validatedRequest.success) {\n const errorMessage = validatedRequest.error instanceof Error ? validatedRequest.error.message : String(validatedRequest.error);\n throw new McpError(ErrorCode.InvalidParams, `Invalid sampling request: ${errorMessage}`);\n }\n const { params } = validatedRequest.data;\n const result = await Promise.resolve(handler(request, extra));\n // When task creation is requested, validate and return CreateTaskResult\n if (params.task) {\n const taskValidationResult = safeParse(CreateTaskResultSchema, result);\n if (!taskValidationResult.success) {\n const errorMessage = taskValidationResult.error instanceof Error\n ? taskValidationResult.error.message\n : String(taskValidationResult.error);\n throw new McpError(ErrorCode.InvalidParams, `Invalid task creation result: ${errorMessage}`);\n }\n return taskValidationResult.data;\n }\n // For non-task requests, validate against appropriate schema based on tools presence\n const hasTools = params.tools || params.toolChoice;\n const resultSchema = hasTools ? CreateMessageResultWithToolsSchema : CreateMessageResultSchema;\n const validationResult = safeParse(resultSchema, result);\n if (!validationResult.success) {\n const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error);\n throw new McpError(ErrorCode.InvalidParams, `Invalid sampling result: ${errorMessage}`);\n }\n return validationResult.data;\n };\n // Install the wrapped handler\n return super.setRequestHandler(requestSchema, wrappedHandler);\n }\n // Other handlers use default behavior\n return super.setRequestHandler(requestSchema, handler);\n }\n assertCapability(capability, method) {\n if (!this._serverCapabilities?.[capability]) {\n throw new Error(`Server does not support ${capability} (required for ${method})`);\n }\n }\n async connect(transport, options) {\n await super.connect(transport);\n // When transport sessionId is already set this means we are trying to reconnect.\n // In this case we don't need to initialize again.\n if (transport.sessionId !== undefined) {\n return;\n }\n try {\n const result = await this.request({\n method: 'initialize',\n params: {\n protocolVersion: LATEST_PROTOCOL_VERSION,\n capabilities: this._capabilities,\n clientInfo: this._clientInfo\n }\n }, InitializeResultSchema, options);\n if (result === undefined) {\n throw new Error(`Server sent invalid initialize result: ${result}`);\n }\n if (!SUPPORTED_PROTOCOL_VERSIONS.includes(result.protocolVersion)) {\n throw new Error(`Server's protocol version is not supported: ${result.protocolVersion}`);\n }\n this._serverCapabilities = result.capabilities;\n this._serverVersion = result.serverInfo;\n // HTTP transports must set the protocol version in each header after initialization.\n if (transport.setProtocolVersion) {\n transport.setProtocolVersion(result.protocolVersion);\n }\n this._instructions = result.instructions;\n await this.notification({\n method: 'notifications/initialized'\n });\n // Set up list changed handlers now that we know server capabilities\n if (this._pendingListChangedConfig) {\n this._setupListChangedHandlers(this._pendingListChangedConfig);\n this._pendingListChangedConfig = undefined;\n }\n }\n catch (error) {\n // Disconnect if initialization fails.\n void this.close();\n throw error;\n }\n }\n /**\n * After initialization has completed, this will be populated with the server's reported capabilities.\n */\n getServerCapabilities() {\n return this._serverCapabilities;\n }\n /**\n * After initialization has completed, this will be populated with information about the server's name and version.\n */\n getServerVersion() {\n return this._serverVersion;\n }\n /**\n * After initialization has completed, this may be populated with information about the server's instructions.\n */\n getInstructions() {\n return this._instructions;\n }\n assertCapabilityForMethod(method) {\n switch (method) {\n case 'logging/setLevel':\n if (!this._serverCapabilities?.logging) {\n throw new Error(`Server does not support logging (required for ${method})`);\n }\n break;\n case 'prompts/get':\n case 'prompts/list':\n if (!this._serverCapabilities?.prompts) {\n throw new Error(`Server does not support prompts (required for ${method})`);\n }\n break;\n case 'resources/list':\n case 'resources/templates/list':\n case 'resources/read':\n case 'resources/subscribe':\n case 'resources/unsubscribe':\n if (!this._serverCapabilities?.resources) {\n throw new Error(`Server does not support resources (required for ${method})`);\n }\n if (method === 'resources/subscribe' && !this._serverCapabilities.resources.subscribe) {\n throw new Error(`Server does not support resource subscriptions (required for ${method})`);\n }\n break;\n case 'tools/call':\n case 'tools/list':\n if (!this._serverCapabilities?.tools) {\n throw new Error(`Server does not support tools (required for ${method})`);\n }\n break;\n case 'completion/complete':\n if (!this._serverCapabilities?.completions) {\n throw new Error(`Server does not support completions (required for ${method})`);\n }\n break;\n case 'initialize':\n // No specific capability required for initialize\n break;\n case 'ping':\n // No specific capability required for ping\n break;\n }\n }\n assertNotificationCapability(method) {\n switch (method) {\n case 'notifications/roots/list_changed':\n if (!this._capabilities.roots?.listChanged) {\n throw new Error(`Client does not support roots list changed notifications (required for ${method})`);\n }\n break;\n case 'notifications/initialized':\n // No specific capability required for initialized\n break;\n case 'notifications/cancelled':\n // Cancellation notifications are always allowed\n break;\n case 'notifications/progress':\n // Progress notifications are always allowed\n break;\n }\n }\n assertRequestHandlerCapability(method) {\n // Task handlers are registered in Protocol constructor before _capabilities is initialized\n // Skip capability check for task methods during initialization\n if (!this._capabilities) {\n return;\n }\n switch (method) {\n case 'sampling/createMessage':\n if (!this._capabilities.sampling) {\n throw new Error(`Client does not support sampling capability (required for ${method})`);\n }\n break;\n case 'elicitation/create':\n if (!this._capabilities.elicitation) {\n throw new Error(`Client does not support elicitation capability (required for ${method})`);\n }\n break;\n case 'roots/list':\n if (!this._capabilities.roots) {\n throw new Error(`Client does not support roots capability (required for ${method})`);\n }\n break;\n case 'tasks/get':\n case 'tasks/list':\n case 'tasks/result':\n case 'tasks/cancel':\n if (!this._capabilities.tasks) {\n throw new Error(`Client does not support tasks capability (required for ${method})`);\n }\n break;\n case 'ping':\n // No specific capability required for ping\n break;\n }\n }\n assertTaskCapability(method) {\n assertToolsCallTaskCapability(this._serverCapabilities?.tasks?.requests, method, 'Server');\n }\n assertTaskHandlerCapability(method) {\n // Task handlers are registered in Protocol constructor before _capabilities is initialized\n // Skip capability check for task methods during initialization\n if (!this._capabilities) {\n return;\n }\n assertClientRequestTaskCapability(this._capabilities.tasks?.requests, method, 'Client');\n }\n async ping(options) {\n return this.request({ method: 'ping' }, EmptyResultSchema, options);\n }\n async complete(params, options) {\n return this.request({ method: 'completion/complete', params }, CompleteResultSchema, options);\n }\n async setLoggingLevel(level, options) {\n return this.request({ method: 'logging/setLevel', params: { level } }, EmptyResultSchema, options);\n }\n async getPrompt(params, options) {\n return this.request({ method: 'prompts/get', params }, GetPromptResultSchema, options);\n }\n async listPrompts(params, options) {\n return this.request({ method: 'prompts/list', params }, ListPromptsResultSchema, options);\n }\n async listResources(params, options) {\n return this.request({ method: 'resources/list', params }, ListResourcesResultSchema, options);\n }\n async listResourceTemplates(params, options) {\n return this.request({ method: 'resources/templates/list', params }, ListResourceTemplatesResultSchema, options);\n }\n async readResource(params, options) {\n return this.request({ method: 'resources/read', params }, ReadResourceResultSchema, options);\n }\n async subscribeResource(params, options) {\n return this.request({ method: 'resources/subscribe', params }, EmptyResultSchema, options);\n }\n async unsubscribeResource(params, options) {\n return this.request({ method: 'resources/unsubscribe', params }, EmptyResultSchema, options);\n }\n /**\n * Calls a tool and waits for the result. Automatically validates structured output if the tool has an outputSchema.\n *\n * For task-based execution with streaming behavior, use client.experimental.tasks.callToolStream() instead.\n */\n async callTool(params, resultSchema = CallToolResultSchema, options) {\n // Guard: required-task tools need experimental API\n if (this.isToolTaskRequired(params.name)) {\n throw new McpError(ErrorCode.InvalidRequest, `Tool \"${params.name}\" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);\n }\n const result = await this.request({ method: 'tools/call', params }, resultSchema, options);\n // Check if the tool has an outputSchema\n const validator = this.getToolOutputValidator(params.name);\n if (validator) {\n // If tool has outputSchema, it MUST return structuredContent (unless it's an error)\n if (!result.structuredContent && !result.isError) {\n throw new McpError(ErrorCode.InvalidRequest, `Tool ${params.name} has an output schema but did not return structured content`);\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 throw new McpError(ErrorCode.InvalidParams, `Structured content does not match the tool's output schema: ${validationResult.errorMessage}`);\n }\n }\n catch (error) {\n if (error instanceof McpError) {\n throw error;\n }\n throw new McpError(ErrorCode.InvalidParams, `Failed to validate structured content: ${error instanceof Error ? error.message : String(error)}`);\n }\n }\n }\n return result;\n }\n isToolTask(toolName) {\n if (!this._serverCapabilities?.tasks?.requests?.tools?.call) {\n return false;\n }\n return this._cachedKnownTaskTools.has(toolName);\n }\n /**\n * Check if a tool requires task-based execution.\n * Unlike isToolTask which includes 'optional' tools, this only checks for 'required'.\n */\n isToolTaskRequired(toolName) {\n return this._cachedRequiredTaskTools.has(toolName);\n }\n /**\n * Cache validators for tool output schemas.\n * Called after listTools() to pre-compile validators for better performance.\n */\n cacheToolMetadata(tools) {\n this._cachedToolOutputValidators.clear();\n this._cachedKnownTaskTools.clear();\n this._cachedRequiredTaskTools.clear();\n for (const tool of tools) {\n // If the tool has an outputSchema, create and cache the validator\n if (tool.outputSchema) {\n const toolValidator = this._jsonSchemaValidator.getValidator(tool.outputSchema);\n this._cachedToolOutputValidators.set(tool.name, toolValidator);\n }\n // If the tool supports task-based execution, cache that information\n const taskSupport = tool.execution?.taskSupport;\n if (taskSupport === 'required' || taskSupport === 'optional') {\n this._cachedKnownTaskTools.add(tool.name);\n }\n if (taskSupport === 'required') {\n this._cachedRequiredTaskTools.add(tool.name);\n }\n }\n }\n /**\n * Get cached validator for a tool\n */\n getToolOutputValidator(toolName) {\n return this._cachedToolOutputValidators.get(toolName);\n }\n async listTools(params, options) {\n const result = await this.request({ method: 'tools/list', params }, ListToolsResultSchema, options);\n // Cache the tools and their output schemas for future validation\n this.cacheToolMetadata(result.tools);\n return result;\n }\n /**\n * Set up a single list changed handler.\n * @internal\n */\n _setupListChangedHandler(listType, notificationSchema, options, fetcher) {\n // Validate options using Zod schema (validates autoRefresh and debounceMs)\n const parseResult = ListChangedOptionsBaseSchema.safeParse(options);\n if (!parseResult.success) {\n throw new Error(`Invalid ${listType} listChanged options: ${parseResult.error.message}`);\n }\n // Validate callback\n if (typeof options.onChanged !== 'function') {\n throw new Error(`Invalid ${listType} listChanged options: onChanged must be a function`);\n }\n const { autoRefresh, debounceMs } = parseResult.data;\n const { onChanged } = options;\n const refresh = async () => {\n if (!autoRefresh) {\n onChanged(null, null);\n return;\n }\n try {\n const items = await fetcher();\n onChanged(null, items);\n }\n catch (e) {\n const error = e instanceof Error ? e : new Error(String(e));\n onChanged(error, null);\n }\n };\n const handler = () => {\n if (debounceMs) {\n // Clear any pending debounce timer for this list type\n const existingTimer = this._listChangedDebounceTimers.get(listType);\n if (existingTimer) {\n clearTimeout(existingTimer);\n }\n // Set up debounced refresh\n const timer = setTimeout(refresh, debounceMs);\n this._listChangedDebounceTimers.set(listType, timer);\n }\n else {\n // No debounce, refresh immediately\n refresh();\n }\n };\n // Register notification handler\n this.setNotificationHandler(notificationSchema, handler);\n }\n async sendRootsListChanged() {\n return this.notification({ method: 'notifications/roots/list_changed' });\n }\n}\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;;;;;;;;;;AAYA,SAAS,yBAAyB,QAAQ,MAAM;AAC5C,MAAI,CAAC,UAAU,SAAS,QAAQ,OAAO,SAAS;AAC5C;AAEJ,MAAI,OAAO,SAAS,YAAY,OAAO,cAAc,OAAO,OAAO,eAAe,UAAU;AACxF,UAAM,MAAM;AACZ,UAAM,QAAQ,OAAO;AACrB,eAAW,OAAO,OAAO,KAAK,KAAK,GAAG;AAClC,YAAM,aAAa,MAAM,GAAG;AAE5B,UAAI,IAAI,GAAG,MAAM,UAAa,OAAO,UAAU,eAAe,KAAK,YAAY,SAAS,GAAG;AACvF,YAAI,GAAG,IAAI,WAAW;AAAA,MAC1B;AAEA,UAAI,IAAI,GAAG,MAAM,QAAW;AACxB,iCAAyB,YAAY,IAAI,GAAG,CAAC;AAAA,MACjD;AAAA,I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,kBAAU,OAAO,IAAI;AAAA,MACzB;AAAA,IACJ;AACA,UAAM,UAAU,MAAM;AAClB,UAAI,YAAY;AAEZ,cAAM,gBAAgB,KAAK,2BAA2B,IAAI,QAAQ;AAClE,YAAI,eAAe;AACf,uBAAa,aAAa;AAAA,QAC9B;AAEA,cAAM,QAAQ,WAAW,SAAS,UAAU;AAC5C,aAAK,2BAA2B,IAAI,UAAU,KAAK;AAAA,MACvD,OACK;AAED,gBAAO;AAAA,MACX;AAAA,IACJ;AAEA,SAAK,uBAAuB,oBAAoB,OAAO;AAAA,EAC3D;AAAA,EACA,MAAM,uBAAuB;AACzB,WAAO,KAAK,aAAa,EAAE,QAAQ,mCAAkC,CAAE;AAAA,EAC3E;AACJ;","x_google_ignoreList":[0]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sources":["../../../../../../../../../../../../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.1.13/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":";;;;;;;;;AAkBO,MAAM,wBAAwB;AAAA,EACjC,YAAY,SAAS;AACjB,SAAK,UAAU;AAAA,EACnB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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A,QACJ;AAAA,MACJ;AAEA,YAAM;AAAA,IACV;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAM,QAAQ,QAAQ,SAAS;AAC3B,WAAO,KAAK,QAAQ,QAAQ,EAAE,OAAM,GAAI,OAAO;AAAA,EACnD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAM,cAAc,QAAQ,cAAc,SAAS;AAE/C,WAAO,KAAK,QAAQ,cAAc,EAAE,OAAM,GAAI,cAAc,OAAO;AAAA,EACvE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAM,UAAU,QAAQ,SAAS;AAE7B,WAAO,KAAK,QAAQ,UAAU,SAAS,EAAE,OAAM,IAAK,QAAW,OAAO;AAAA,EAC1E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,WAAW,QAAQ,SAAS;AAE9B,WAAO,KAAK,QAAQ,WAAW,EAAE,OAAM,GAAI,OAAO;AAAA,EACtD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAeA,cAAc,SAAS,cAAc,SAAS;AAC1C,WAAO,KAAK,QAAQ,cAAc,SAAS,cAAc,OAAO;AAAA,EACpE;AACJ;","x_google_ignoreList":[0]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sources":["../../../../../../../../../../../../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.1.13/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":["e"],"mappings":"AAiBO;AAAA,EAAA,WAAA;AAAA,MAAA;AAAA,QAAA,IAAA,eAAA,OAAA,SAAA,SAAA,eAAA,OAAA,SAAA,SAAA,eAAA,OAAA,aAAA,aAAA,eAAA,OAAA,OAAA,OAAA,CAAA,GAAA,IAAA,IAAA,EAAA,QAAA;AAAA,UAAA,EAAA,kBAAA,EAAA,mBAAA,CAAA,GAAA,EAAA,gBAAA,CAAA,IAAA,wCAAA,EAAA,2BAAA;AAAA,EAAA,SAAAA,IAAA;AAAA,EAAA;AAAA,GAAA;AAAA,SAAS,8BAA8B,UAAU,QAAQ,YAAY;AACxE,MAAI,CAAC,UAAU;AACX,UAAM,IAAI,MAAM,GAAG,UAAU,iDAAiD,MAAM,GAAG;AAAA,EAC3F;AACA,UAAQ,QAAM;AAAA,IACV,KAAK;AACD,UAAI,CAAC,SAAS,OAAO,MAAM;AACvB,cAAM,IAAI,MAAM,GAAG,UAAU,gEAAgE,MAAM,GAAG;AAAA,MAC1G;AACA;AAAA,EAIZ;AACA;AAYO,SAAS,kCAAkC,UAAU,QAAQ,YAAY;AAC5E,MAAI,CAAC,UAAU;AACX,UAAM,IAAI,MAAM,GAAG,UAAU,iDAAiD,MAAM,GAAG;AAAA,EAC3F;AACA,UAAQ,QAAM;AAAA,IACV,KAAK;AACD,UAAI,CAAC,SAAS,UAAU,eAAe;AACnC,cAAM,IAAI,MAAM,GAAG,UAAU,4EAA4E,MAAM,GAAG;AAAA,MACtH;AACA;AAAA,IACJ,KAAK;AACD,UAAI,CAAC,SAAS,aAAa,QAAQ;AAC/B,cAAM,IAAI,MAAM,GAAG,UAAU,wEAAwE,MAAM,GAAG;AAAA,MAClH;AACA;AAAA,EAIZ;AACA;","x_google_ignoreList":[0]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sources":["../../../../../../../../../../../../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.1.13/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":["e"],"mappings":"AAYO;AAAA,EAAA,WAAA;AAAA,MAAA;AAAA,QAAA,IAAA,eAAA,OAAA,SAAA,SAAA,eAAA,OAAA,SAAA,SAAA,eAAA,OAAA,aAAA,aAAA,eAAA,OAAA,OAAA,OAAA,CAAA,GAAA,IAAA,IAAA,EAAA,QAAA;AAAA,UAAA,EAAA,kBAAA,EAAA,mBAAA,CAAA,GAAA,EAAA,gBAAA,CAAA,IAAA,wCAAA,EAAA,2BAAA;AAAA,EAAA,SAAAA,IAAA;AAAA,EAAA;AAAA,GAAA;AAAA,SAAS,WAAW,QAAQ;AAC/B,SAAO,WAAW,eAAe,WAAW,YAAY,WAAW;AACvE;","x_google_ignoreList":[0]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-server.js","sources":["../../../../../../../../../../../../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js"],"sourcesContent":["/**\n * Experimental McpServer task features for MCP SDK.\n * WARNING: These APIs are experimental and may change without notice.\n *\n * @experimental\n */\n/**\n * Experimental task features for McpServer.\n *\n * Access via `server.experimental.tasks`:\n * ```typescript\n * server.experimental.tasks.registerToolTask('long-running', config, handler);\n * ```\n *\n * @experimental\n */\nexport class ExperimentalMcpServerTasks {\n constructor(_mcpServer) {\n this._mcpServer = _mcpServer;\n }\n registerToolTask(name, config, handler) {\n // Validate that taskSupport is not 'forbidden' for task-based tools\n const execution = { taskSupport: 'required', ...config.execution };\n if (execution.taskSupport === 'forbidden') {\n throw new Error(`Cannot register task-based tool '${name}' with taskSupport 'forbidden'. Use registerTool() instead.`);\n }\n // Access McpServer's internal _createRegisteredTool method\n const mcpServerInternal = this._mcpServer;\n return mcpServerInternal._createRegisteredTool(name, config.title, config.description, config.inputSchema, config.outputSchema, config.annotations, execution, config._meta, handler);\n }\n}\n//# sourceMappingURL=mcp-server.js.map"],"names":[],"mappings":";;;;;;;;AAgBO,MAAM,2BAA2B;AAAA,EACpC,YAAY,YAAY;AACpB,SAAK,aAAa;AAAA,EACtB;AAAA,EACA,iBAAiB,MAAM,QAAQ,SAAS;AAEpC,UAAM,YAAY,EAAE,aAAa,YAAY,GAAG,OAAO,UAAS;AAChE,QAAI,UAAU,gBAAgB,aAAa;AACvC,YAAM,IAAI,MAAM,oCAAoC,IAAI,6DAA6D;AAAA,IACzH;AAEA,UAAM,oBAAoB,KAAK;AAC/B,WAAO,kBAAkB,sBAAsB,MAAM,OAAO,OAAO,OAAO,aAAa,OAAO,aAAa,OAAO,cAAc,OAAO,aAAa,WAAW,OAAO,OAAO,OAAO;AAAA,EACxL;AACJ;","x_google_ignoreList":[0]}
@@ -0,0 +1,224 @@
1
+ ;
2
+ !(function() {
3
+ try {
4
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "e8ba392b-0cda-4780-96f0-18366688b9c7", e._sentryDebugIdIdentifier = "sentry-dbid-e8ba392b-0cda-4780-96f0-18366688b9c7");
6
+ } catch (e2) {
7
+ }
8
+ })();
9
+ import { CreateMessageResultSchema, ElicitResultSchema } from "../../types.js";
10
+ class ExperimentalServerTasks {
11
+ constructor(_server) {
12
+ this._server = _server;
13
+ }
14
+ /**
15
+ * Sends a request and returns an AsyncGenerator that yields response messages.
16
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
17
+ *
18
+ * This method provides streaming access to request processing, allowing you to
19
+ * observe intermediate task status updates for task-augmented requests.
20
+ *
21
+ * @param request - The request to send
22
+ * @param resultSchema - Zod schema for validating the result
23
+ * @param options - Optional request options (timeout, signal, task creation params, etc.)
24
+ * @returns AsyncGenerator that yields ResponseMessage objects
25
+ *
26
+ * @experimental
27
+ */
28
+ requestStream(request, resultSchema, options) {
29
+ return this._server.requestStream(request, resultSchema, options);
30
+ }
31
+ /**
32
+ * Sends a sampling request and returns an AsyncGenerator that yields response messages.
33
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
34
+ *
35
+ * For task-augmented requests, yields 'taskCreated' and 'taskStatus' messages
36
+ * before the final result.
37
+ *
38
+ * @example
39
+ * ```typescript
40
+ * const stream = server.experimental.tasks.createMessageStream({
41
+ * messages: [{ role: 'user', content: { type: 'text', text: 'Hello' } }],
42
+ * maxTokens: 100
43
+ * }, {
44
+ * onprogress: (progress) => {
45
+ * // Handle streaming tokens via progress notifications
46
+ * console.log('Progress:', progress.message);
47
+ * }
48
+ * });
49
+ *
50
+ * for await (const message of stream) {
51
+ * switch (message.type) {
52
+ * case 'taskCreated':
53
+ * console.log('Task created:', message.task.taskId);
54
+ * break;
55
+ * case 'taskStatus':
56
+ * console.log('Task status:', message.task.status);
57
+ * break;
58
+ * case 'result':
59
+ * console.log('Final result:', message.result);
60
+ * break;
61
+ * case 'error':
62
+ * console.error('Error:', message.error);
63
+ * break;
64
+ * }
65
+ * }
66
+ * ```
67
+ *
68
+ * @param params - The sampling request parameters
69
+ * @param options - Optional request options (timeout, signal, task creation params, onprogress, etc.)
70
+ * @returns AsyncGenerator that yields ResponseMessage objects
71
+ *
72
+ * @experimental
73
+ */
74
+ createMessageStream(params, options) {
75
+ const clientCapabilities = this._server.getClientCapabilities();
76
+ if ((params.tools || params.toolChoice) && !clientCapabilities?.sampling?.tools) {
77
+ throw new Error("Client does not support sampling tools capability.");
78
+ }
79
+ if (params.messages.length > 0) {
80
+ const lastMessage = params.messages[params.messages.length - 1];
81
+ const lastContent = Array.isArray(lastMessage.content) ? lastMessage.content : [lastMessage.content];
82
+ const hasToolResults = lastContent.some((c) => c.type === "tool_result");
83
+ const previousMessage = params.messages.length > 1 ? params.messages[params.messages.length - 2] : void 0;
84
+ const previousContent = previousMessage ? Array.isArray(previousMessage.content) ? previousMessage.content : [previousMessage.content] : [];
85
+ const hasPreviousToolUse = previousContent.some((c) => c.type === "tool_use");
86
+ if (hasToolResults) {
87
+ if (lastContent.some((c) => c.type !== "tool_result")) {
88
+ throw new Error("The last message must contain only tool_result content if any is present");
89
+ }
90
+ if (!hasPreviousToolUse) {
91
+ throw new Error("tool_result blocks are not matching any tool_use from the previous message");
92
+ }
93
+ }
94
+ if (hasPreviousToolUse) {
95
+ const toolUseIds = new Set(previousContent.filter((c) => c.type === "tool_use").map((c) => c.id));
96
+ const toolResultIds = new Set(lastContent.filter((c) => c.type === "tool_result").map((c) => c.toolUseId));
97
+ if (toolUseIds.size !== toolResultIds.size || ![...toolUseIds].every((id) => toolResultIds.has(id))) {
98
+ throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match");
99
+ }
100
+ }
101
+ }
102
+ return this.requestStream({
103
+ method: "sampling/createMessage",
104
+ params
105
+ }, CreateMessageResultSchema, options);
106
+ }
107
+ /**
108
+ * Sends an elicitation request and returns an AsyncGenerator that yields response messages.
109
+ * The generator is guaranteed to end with either a 'result' or 'error' message.
110
+ *
111
+ * For task-augmented requests (especially URL-based elicitation), yields 'taskCreated'
112
+ * and 'taskStatus' messages before the final result.
113
+ *
114
+ * @example
115
+ * ```typescript
116
+ * const stream = server.experimental.tasks.elicitInputStream({
117
+ * mode: 'url',
118
+ * message: 'Please authenticate',
119
+ * elicitationId: 'auth-123',
120
+ * url: 'https://example.com/auth'
121
+ * }, {
122
+ * task: { ttl: 300000 } // Task-augmented for long-running auth flow
123
+ * });
124
+ *
125
+ * for await (const message of stream) {
126
+ * switch (message.type) {
127
+ * case 'taskCreated':
128
+ * console.log('Task created:', message.task.taskId);
129
+ * break;
130
+ * case 'taskStatus':
131
+ * console.log('Task status:', message.task.status);
132
+ * break;
133
+ * case 'result':
134
+ * console.log('User action:', message.result.action);
135
+ * break;
136
+ * case 'error':
137
+ * console.error('Error:', message.error);
138
+ * break;
139
+ * }
140
+ * }
141
+ * ```
142
+ *
143
+ * @param params - The elicitation request parameters
144
+ * @param options - Optional request options (timeout, signal, task creation params, etc.)
145
+ * @returns AsyncGenerator that yields ResponseMessage objects
146
+ *
147
+ * @experimental
148
+ */
149
+ elicitInputStream(params, options) {
150
+ const clientCapabilities = this._server.getClientCapabilities();
151
+ const mode = params.mode ?? "form";
152
+ switch (mode) {
153
+ case "url": {
154
+ if (!clientCapabilities?.elicitation?.url) {
155
+ throw new Error("Client does not support url elicitation.");
156
+ }
157
+ break;
158
+ }
159
+ case "form": {
160
+ if (!clientCapabilities?.elicitation?.form) {
161
+ throw new Error("Client does not support form elicitation.");
162
+ }
163
+ break;
164
+ }
165
+ }
166
+ const normalizedParams = mode === "form" && params.mode === void 0 ? { ...params, mode: "form" } : params;
167
+ return this.requestStream({
168
+ method: "elicitation/create",
169
+ params: normalizedParams
170
+ }, ElicitResultSchema, options);
171
+ }
172
+ /**
173
+ * Gets the current status of a task.
174
+ *
175
+ * @param taskId - The task identifier
176
+ * @param options - Optional request options
177
+ * @returns The task status
178
+ *
179
+ * @experimental
180
+ */
181
+ async getTask(taskId, options) {
182
+ return this._server.getTask({ taskId }, options);
183
+ }
184
+ /**
185
+ * Retrieves the result of a completed task.
186
+ *
187
+ * @param taskId - The task identifier
188
+ * @param resultSchema - Zod schema for validating the result
189
+ * @param options - Optional request options
190
+ * @returns The task result
191
+ *
192
+ * @experimental
193
+ */
194
+ async getTaskResult(taskId, resultSchema, options) {
195
+ return this._server.getTaskResult({ taskId }, resultSchema, options);
196
+ }
197
+ /**
198
+ * Lists tasks with optional pagination.
199
+ *
200
+ * @param cursor - Optional pagination cursor
201
+ * @param options - Optional request options
202
+ * @returns List of tasks with optional next cursor
203
+ *
204
+ * @experimental
205
+ */
206
+ async listTasks(cursor, options) {
207
+ return this._server.listTasks(cursor ? { cursor } : void 0, options);
208
+ }
209
+ /**
210
+ * Cancels a running task.
211
+ *
212
+ * @param taskId - The task identifier
213
+ * @param options - Optional request options
214
+ *
215
+ * @experimental
216
+ */
217
+ async cancelTask(taskId, options) {
218
+ return this._server.cancelTask({ taskId }, options);
219
+ }
220
+ }
221
+ export {
222
+ ExperimentalServerTasks
223
+ };
224
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.js","sources":["../../../../../../../../../../../../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js"],"sourcesContent":["/**\n * Experimental server task features for MCP SDK.\n * WARNING: These APIs are experimental and may change without notice.\n *\n * @experimental\n */\nimport { CreateMessageResultSchema, ElicitResultSchema } from '../../types.js';\n/**\n * Experimental task features for low-level MCP servers.\n *\n * Access via `server.experimental.tasks`:\n * ```typescript\n * const stream = server.experimental.tasks.requestStream(request, schema, options);\n * ```\n *\n * For high-level server usage with task-based tools, use `McpServer.experimental.tasks` instead.\n *\n * @experimental\n */\nexport class ExperimentalServerTasks {\n constructor(_server) {\n this._server = _server;\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._server.requestStream(request, resultSchema, options);\n }\n /**\n * Sends a sampling 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 * For task-augmented requests, yields 'taskCreated' and 'taskStatus' messages\n * before the final result.\n *\n * @example\n * ```typescript\n * const stream = server.experimental.tasks.createMessageStream({\n * messages: [{ role: 'user', content: { type: 'text', text: 'Hello' } }],\n * maxTokens: 100\n * }, {\n * onprogress: (progress) => {\n * // Handle streaming tokens via progress notifications\n * console.log('Progress:', progress.message);\n * }\n * });\n *\n * for await (const message of stream) {\n * switch (message.type) {\n * case 'taskCreated':\n * console.log('Task created:', message.task.taskId);\n * break;\n * case 'taskStatus':\n * console.log('Task status:', message.task.status);\n * break;\n * case 'result':\n * console.log('Final result:', message.result);\n * break;\n * case 'error':\n * console.error('Error:', message.error);\n * break;\n * }\n * }\n * ```\n *\n * @param params - The sampling request parameters\n * @param options - Optional request options (timeout, signal, task creation params, onprogress, etc.)\n * @returns AsyncGenerator that yields ResponseMessage objects\n *\n * @experimental\n */\n createMessageStream(params, options) {\n // Access client capabilities via the server\n const clientCapabilities = this._server.getClientCapabilities();\n // Capability check - only required when tools/toolChoice are provided\n if ((params.tools || params.toolChoice) && !clientCapabilities?.sampling?.tools) {\n throw new Error('Client does not support sampling tools capability.');\n }\n // Message structure validation - always validate tool_use/tool_result pairs.\n // These may appear even without tools/toolChoice in the current request when\n // a previous sampling request returned tool_use and this is a follow-up with results.\n if (params.messages.length > 0) {\n const lastMessage = params.messages[params.messages.length - 1];\n const lastContent = Array.isArray(lastMessage.content) ? lastMessage.content : [lastMessage.content];\n const hasToolResults = lastContent.some(c => c.type === 'tool_result');\n const previousMessage = params.messages.length > 1 ? params.messages[params.messages.length - 2] : undefined;\n const previousContent = previousMessage\n ? Array.isArray(previousMessage.content)\n ? previousMessage.content\n : [previousMessage.content]\n : [];\n const hasPreviousToolUse = previousContent.some(c => c.type === 'tool_use');\n if (hasToolResults) {\n if (lastContent.some(c => c.type !== 'tool_result')) {\n throw new Error('The last message must contain only tool_result content if any is present');\n }\n if (!hasPreviousToolUse) {\n throw new Error('tool_result blocks are not matching any tool_use from the previous message');\n }\n }\n if (hasPreviousToolUse) {\n // Extract tool_use IDs from previous message and tool_result IDs from current message\n const toolUseIds = new Set(previousContent.filter(c => c.type === 'tool_use').map(c => c.id));\n const toolResultIds = new Set(lastContent.filter(c => c.type === 'tool_result').map(c => c.toolUseId));\n if (toolUseIds.size !== toolResultIds.size || ![...toolUseIds].every(id => toolResultIds.has(id))) {\n throw new Error('ids of tool_result blocks and tool_use blocks from previous message do not match');\n }\n }\n }\n return this.requestStream({\n method: 'sampling/createMessage',\n params\n }, CreateMessageResultSchema, options);\n }\n /**\n * Sends an elicitation 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 * For task-augmented requests (especially URL-based elicitation), yields 'taskCreated'\n * and 'taskStatus' messages before the final result.\n *\n * @example\n * ```typescript\n * const stream = server.experimental.tasks.elicitInputStream({\n * mode: 'url',\n * message: 'Please authenticate',\n * elicitationId: 'auth-123',\n * url: 'https://example.com/auth'\n * }, {\n * task: { ttl: 300000 } // Task-augmented for long-running auth flow\n * });\n *\n * for await (const message of stream) {\n * switch (message.type) {\n * case 'taskCreated':\n * console.log('Task created:', message.task.taskId);\n * break;\n * case 'taskStatus':\n * console.log('Task status:', message.task.status);\n * break;\n * case 'result':\n * console.log('User action:', message.result.action);\n * break;\n * case 'error':\n * console.error('Error:', message.error);\n * break;\n * }\n * }\n * ```\n *\n * @param params - The elicitation request parameters\n * @param options - Optional request options (timeout, signal, task creation params, etc.)\n * @returns AsyncGenerator that yields ResponseMessage objects\n *\n * @experimental\n */\n elicitInputStream(params, options) {\n // Access client capabilities via the server\n const clientCapabilities = this._server.getClientCapabilities();\n const mode = params.mode ?? 'form';\n // Capability check based on mode\n switch (mode) {\n case 'url': {\n if (!clientCapabilities?.elicitation?.url) {\n throw new Error('Client does not support url elicitation.');\n }\n break;\n }\n case 'form': {\n if (!clientCapabilities?.elicitation?.form) {\n throw new Error('Client does not support form elicitation.');\n }\n break;\n }\n }\n // Normalize params to ensure mode is set for form mode (defaults to 'form' per spec)\n const normalizedParams = mode === 'form' && params.mode === undefined ? { ...params, mode: 'form' } : params;\n // Cast to ServerRequest needed because TypeScript can't narrow the union type\n // based on the discriminated 'method' field when constructing the object literal\n return this.requestStream({\n method: 'elicitation/create',\n params: normalizedParams\n }, ElicitResultSchema, options);\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._server.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 return this._server.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 return this._server.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 return this._server.cancelTask({ taskId }, options);\n }\n}\n//# sourceMappingURL=server.js.map"],"names":[],"mappings":";;;;;;;;;AAmBO,MAAM,wBAAwB;AAAA,EACjC,YAAY,SAAS;AACjB,SAAK,UAAU;AAAA,EACnB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAeA,cAAc,SAAS,cAAc,SAAS;AAC1C,WAAO,KAAK,QAAQ,cAAc,SAAS,cAAc,OAAO;AAAA,EACpE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA4CA,oBAAoB,QAAQ,SAAS;AAEjC,UAAM,qBAAqB,KAAK,QAAQ,sBAAqB;AAE7D,SAAK,OAAO,SAAS,OAAO,eAAe,CAAC,oBAAoB,UAAU,OAAO;AAC7E,YAAM,IAAI,MAAM,oDAAoD;AAAA,IACxE;AAIA,QAAI,OAAO,SAAS,SAAS,GAAG;AAC5B,YAAM,cAAc,OAAO,SAAS,OAAO,SAAS,SAAS,CAAC;AAC9D,YAAM,cAAc,MAAM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A;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,WAAW,QAAQ,SAAS;AAC9B,WAAO,KAAK,QAAQ,WAAW,EAAE,OAAM,GAAI,OAAO;AAAA,EACtD;AACJ;","x_google_ignoreList":[0]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"completable.js","sources":["../../../../../../../../../../../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js"],"sourcesContent":["export const COMPLETABLE_SYMBOL = Symbol.for('mcp.completable');\n/**\n * Wraps a Zod type to provide autocompletion capabilities. Useful for, e.g., prompt arguments in MCP.\n * Works with both Zod v3 and v4 schemas.\n */\nexport function completable(schema, complete) {\n Object.defineProperty(schema, COMPLETABLE_SYMBOL, {\n value: { complete },\n enumerable: false,\n writable: false,\n configurable: false\n });\n return schema;\n}\n/**\n * Checks if a schema is completable (has completion metadata).\n */\nexport function isCompletable(schema) {\n return !!schema && typeof schema === 'object' && COMPLETABLE_SYMBOL in schema;\n}\n/**\n * Gets the completer callback from a completable schema, if it exists.\n */\nexport function getCompleter(schema) {\n const meta = schema[COMPLETABLE_SYMBOL];\n return meta?.complete;\n}\n/**\n * Unwraps a completable schema to get the underlying schema.\n * For backward compatibility with code that called `.unwrap()`.\n */\nexport function unwrapCompletable(schema) {\n return schema;\n}\n// Legacy exports for backward compatibility\n// These types are deprecated but kept for existing code\nexport var McpZodTypeKind;\n(function (McpZodTypeKind) {\n McpZodTypeKind[\"Completable\"] = \"McpCompletable\";\n})(McpZodTypeKind || (McpZodTypeKind = {}));\n//# sourceMappingURL=completable.js.map"],"names":["e","McpZodTypeKind"],"mappings":"AAAY;AAAA,EAAA,WAAA;AAAA,MAAA;AAAA,QAAA,IAAA,eAAA,OAAA,SAAA,SAAA,eAAA,OAAA,SAAA,SAAA,eAAA,OAAA,aAAA,aAAA,eAAA,OAAA,OAAA,OAAA,CAAA,GAAA,IAAA,IAAA,EAAA,QAAA;AAAA,UAAA,EAAA,kBAAA,EAAA,mBAAA,CAAA,GAAA,EAAA,gBAAA,CAAA,IAAA,wCAAA,EAAA,2BAAA;AAAA,EAAA,SAAAA,IAAA;AAAA,EAAA;AAAA,GAAA;AAAA,MAAC,qBAAqB,OAAO,IAAI,iBAAiB;AAiBvD,SAAS,cAAc,QAAQ;AAClC,SAAO,CAAC,CAAC,UAAU,OAAO,WAAW,YAAY,sBAAsB;AAC3E;AAIO,SAAS,aAAa,QAAQ;AACjC,QAAM,OAAO,OAAO,kBAAkB;AACtC,SAAO,MAAM;AACjB;AAUU,IAAC;AAAA,CACV,SAAUC,iBAAgB;AACvB,EAAAA,gBAAe,aAAa,IAAI;AACpC,GAAG,mBAAmB,iBAAiB,CAAA,EAAG;","x_google_ignoreList":[0]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../../../../../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js"],"sourcesContent":["import { mergeCapabilities, Protocol } from '../shared/protocol.js';\nimport { CreateMessageResultSchema, CreateMessageResultWithToolsSchema, ElicitResultSchema, EmptyResultSchema, ErrorCode, InitializedNotificationSchema, InitializeRequestSchema, LATEST_PROTOCOL_VERSION, ListRootsResultSchema, LoggingLevelSchema, McpError, SetLevelRequestSchema, SUPPORTED_PROTOCOL_VERSIONS, CallToolRequestSchema, CallToolResultSchema, CreateTaskResultSchema } from '../types.js';\nimport { AjvJsonSchemaValidator } from '../validation/ajv-provider.js';\nimport { getObjectShape, isZ4Schema, safeParse } from './zod-compat.js';\nimport { ExperimentalServerTasks } from '../experimental/tasks/server.js';\nimport { assertToolsCallTaskCapability, assertClientRequestTaskCapability } from '../experimental/tasks/helpers.js';\n/**\n * An MCP server on top of a pluggable transport.\n *\n * This server will automatically respond to the initialization flow as initiated from the client.\n *\n * To use with custom types, extend the base Request/Notification/Result types and pass them as type parameters:\n *\n * ```typescript\n * // Custom schemas\n * const CustomRequestSchema = RequestSchema.extend({...})\n * const CustomNotificationSchema = NotificationSchema.extend({...})\n * const CustomResultSchema = ResultSchema.extend({...})\n *\n * // Type aliases\n * type CustomRequest = z.infer<typeof CustomRequestSchema>\n * type CustomNotification = z.infer<typeof CustomNotificationSchema>\n * type CustomResult = z.infer<typeof CustomResultSchema>\n *\n * // Create typed server\n * const server = new Server<CustomRequest, CustomNotification, CustomResult>({\n * name: \"CustomServer\",\n * version: \"1.0.0\"\n * })\n * ```\n * @deprecated Use `McpServer` instead for the high-level API. Only use `Server` for advanced use cases.\n */\nexport class Server extends Protocol {\n /**\n * Initializes this server with the given name and version information.\n */\n constructor(_serverInfo, options) {\n super(options);\n this._serverInfo = _serverInfo;\n // Map log levels by session id\n this._loggingLevels = new Map();\n // Map LogLevelSchema to severity index\n this.LOG_LEVEL_SEVERITY = new Map(LoggingLevelSchema.options.map((level, index) => [level, index]));\n // Is a message with the given level ignored in the log level set for the given session id?\n this.isMessageIgnored = (level, sessionId) => {\n const currentLevel = this._loggingLevels.get(sessionId);\n return currentLevel ? this.LOG_LEVEL_SEVERITY.get(level) < this.LOG_LEVEL_SEVERITY.get(currentLevel) : false;\n };\n this._capabilities = options?.capabilities ?? {};\n this._instructions = options?.instructions;\n this._jsonSchemaValidator = options?.jsonSchemaValidator ?? new AjvJsonSchemaValidator();\n this.setRequestHandler(InitializeRequestSchema, request => this._oninitialize(request));\n this.setNotificationHandler(InitializedNotificationSchema, () => this.oninitialized?.());\n if (this._capabilities.logging) {\n this.setRequestHandler(SetLevelRequestSchema, async (request, extra) => {\n const transportSessionId = extra.sessionId || extra.requestInfo?.headers['mcp-session-id'] || undefined;\n const { level } = request.params;\n const parseResult = LoggingLevelSchema.safeParse(level);\n if (parseResult.success) {\n this._loggingLevels.set(transportSessionId, parseResult.data);\n }\n return {};\n });\n }\n }\n /**\n * Access experimental features.\n *\n * WARNING: These APIs are experimental and may change without notice.\n *\n * @experimental\n */\n get experimental() {\n if (!this._experimental) {\n this._experimental = {\n tasks: new ExperimentalServerTasks(this)\n };\n }\n return this._experimental;\n }\n /**\n * Registers new capabilities. This can only be called before connecting to a transport.\n *\n * The new capabilities will be merged with any existing capabilities previously given (e.g., at initialization).\n */\n registerCapabilities(capabilities) {\n if (this.transport) {\n throw new Error('Cannot register capabilities after connecting to transport');\n }\n this._capabilities = mergeCapabilities(this._capabilities, capabilities);\n }\n /**\n * Override request handler registration to enforce server-side validation for tools/call.\n */\n setRequestHandler(requestSchema, handler) {\n const shape = getObjectShape(requestSchema);\n const methodSchema = shape?.method;\n if (!methodSchema) {\n throw new Error('Schema is missing a method literal');\n }\n // Extract literal value using type-safe property access\n let methodValue;\n if (isZ4Schema(methodSchema)) {\n const v4Schema = methodSchema;\n const v4Def = v4Schema._zod?.def;\n methodValue = v4Def?.value ?? v4Schema.value;\n }\n else {\n const v3Schema = methodSchema;\n const legacyDef = v3Schema._def;\n methodValue = legacyDef?.value ?? v3Schema.value;\n }\n if (typeof methodValue !== 'string') {\n throw new Error('Schema method literal must be a string');\n }\n const method = methodValue;\n if (method === 'tools/call') {\n const wrappedHandler = async (request, extra) => {\n const validatedRequest = safeParse(CallToolRequestSchema, request);\n if (!validatedRequest.success) {\n const errorMessage = validatedRequest.error instanceof Error ? validatedRequest.error.message : String(validatedRequest.error);\n throw new McpError(ErrorCode.InvalidParams, `Invalid tools/call request: ${errorMessage}`);\n }\n const { params } = validatedRequest.data;\n const result = await Promise.resolve(handler(request, extra));\n // When task creation is requested, validate and return CreateTaskResult\n if (params.task) {\n const taskValidationResult = safeParse(CreateTaskResultSchema, result);\n if (!taskValidationResult.success) {\n const errorMessage = taskValidationResult.error instanceof Error\n ? taskValidationResult.error.message\n : String(taskValidationResult.error);\n throw new McpError(ErrorCode.InvalidParams, `Invalid task creation result: ${errorMessage}`);\n }\n return taskValidationResult.data;\n }\n // For non-task requests, validate against CallToolResultSchema\n const validationResult = safeParse(CallToolResultSchema, result);\n if (!validationResult.success) {\n const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error);\n throw new McpError(ErrorCode.InvalidParams, `Invalid tools/call result: ${errorMessage}`);\n }\n return validationResult.data;\n };\n // Install the wrapped handler\n return super.setRequestHandler(requestSchema, wrappedHandler);\n }\n // Other handlers use default behavior\n return super.setRequestHandler(requestSchema, handler);\n }\n assertCapabilityForMethod(method) {\n switch (method) {\n case 'sampling/createMessage':\n if (!this._clientCapabilities?.sampling) {\n throw new Error(`Client does not support sampling (required for ${method})`);\n }\n break;\n case 'elicitation/create':\n if (!this._clientCapabilities?.elicitation) {\n throw new Error(`Client does not support elicitation (required for ${method})`);\n }\n break;\n case 'roots/list':\n if (!this._clientCapabilities?.roots) {\n throw new Error(`Client does not support listing roots (required for ${method})`);\n }\n break;\n case 'ping':\n // No specific capability required for ping\n break;\n }\n }\n assertNotificationCapability(method) {\n switch (method) {\n case 'notifications/message':\n if (!this._capabilities.logging) {\n throw new Error(`Server does not support logging (required for ${method})`);\n }\n break;\n case 'notifications/resources/updated':\n case 'notifications/resources/list_changed':\n if (!this._capabilities.resources) {\n throw new Error(`Server does not support notifying about resources (required for ${method})`);\n }\n break;\n case 'notifications/tools/list_changed':\n if (!this._capabilities.tools) {\n throw new Error(`Server does not support notifying of tool list changes (required for ${method})`);\n }\n break;\n case 'notifications/prompts/list_changed':\n if (!this._capabilities.prompts) {\n throw new Error(`Server does not support notifying of prompt list changes (required for ${method})`);\n }\n break;\n case 'notifications/elicitation/complete':\n if (!this._clientCapabilities?.elicitation?.url) {\n throw new Error(`Client does not support URL elicitation (required for ${method})`);\n }\n break;\n case 'notifications/cancelled':\n // Cancellation notifications are always allowed\n break;\n case 'notifications/progress':\n // Progress notifications are always allowed\n break;\n }\n }\n assertRequestHandlerCapability(method) {\n // Task handlers are registered in Protocol constructor before _capabilities is initialized\n // Skip capability check for task methods during initialization\n if (!this._capabilities) {\n return;\n }\n switch (method) {\n case 'completion/complete':\n if (!this._capabilities.completions) {\n throw new Error(`Server does not support completions (required for ${method})`);\n }\n break;\n case 'logging/setLevel':\n if (!this._capabilities.logging) {\n throw new Error(`Server does not support logging (required for ${method})`);\n }\n break;\n case 'prompts/get':\n case 'prompts/list':\n if (!this._capabilities.prompts) {\n throw new Error(`Server does not support prompts (required for ${method})`);\n }\n break;\n case 'resources/list':\n case 'resources/templates/list':\n case 'resources/read':\n if (!this._capabilities.resources) {\n throw new Error(`Server does not support resources (required for ${method})`);\n }\n break;\n case 'tools/call':\n case 'tools/list':\n if (!this._capabilities.tools) {\n throw new Error(`Server does not support tools (required for ${method})`);\n }\n break;\n case 'tasks/get':\n case 'tasks/list':\n case 'tasks/result':\n case 'tasks/cancel':\n if (!this._capabilities.tasks) {\n throw new Error(`Server does not support tasks capability (required for ${method})`);\n }\n break;\n case 'ping':\n case 'initialize':\n // No specific capability required for these methods\n break;\n }\n }\n assertTaskCapability(method) {\n assertClientRequestTaskCapability(this._clientCapabilities?.tasks?.requests, method, 'Client');\n }\n assertTaskHandlerCapability(method) {\n // Task handlers are registered in Protocol constructor before _capabilities is initialized\n // Skip capability check for task methods during initialization\n if (!this._capabilities) {\n return;\n }\n assertToolsCallTaskCapability(this._capabilities.tasks?.requests, method, 'Server');\n }\n async _oninitialize(request) {\n const requestedVersion = request.params.protocolVersion;\n this._clientCapabilities = request.params.capabilities;\n this._clientVersion = request.params.clientInfo;\n const protocolVersion = SUPPORTED_PROTOCOL_VERSIONS.includes(requestedVersion) ? requestedVersion : LATEST_PROTOCOL_VERSION;\n return {\n protocolVersion,\n capabilities: this.getCapabilities(),\n serverInfo: this._serverInfo,\n ...(this._instructions && { instructions: this._instructions })\n };\n }\n /**\n * After initialization has completed, this will be populated with the client's reported capabilities.\n */\n getClientCapabilities() {\n return this._clientCapabilities;\n }\n /**\n * After initialization has completed, this will be populated with information about the client's name and version.\n */\n getClientVersion() {\n return this._clientVersion;\n }\n getCapabilities() {\n return this._capabilities;\n }\n async ping() {\n return this.request({ method: 'ping' }, EmptyResultSchema);\n }\n // Implementation\n async createMessage(params, options) {\n // Capability check - only required when tools/toolChoice are provided\n if (params.tools || params.toolChoice) {\n if (!this._clientCapabilities?.sampling?.tools) {\n throw new Error('Client does not support sampling tools capability.');\n }\n }\n // Message structure validation - always validate tool_use/tool_result pairs.\n // These may appear even without tools/toolChoice in the current request when\n // a previous sampling request returned tool_use and this is a follow-up with results.\n if (params.messages.length > 0) {\n const lastMessage = params.messages[params.messages.length - 1];\n const lastContent = Array.isArray(lastMessage.content) ? lastMessage.content : [lastMessage.content];\n const hasToolResults = lastContent.some(c => c.type === 'tool_result');\n const previousMessage = params.messages.length > 1 ? params.messages[params.messages.length - 2] : undefined;\n const previousContent = previousMessage\n ? Array.isArray(previousMessage.content)\n ? previousMessage.content\n : [previousMessage.content]\n : [];\n const hasPreviousToolUse = previousContent.some(c => c.type === 'tool_use');\n if (hasToolResults) {\n if (lastContent.some(c => c.type !== 'tool_result')) {\n throw new Error('The last message must contain only tool_result content if any is present');\n }\n if (!hasPreviousToolUse) {\n throw new Error('tool_result blocks are not matching any tool_use from the previous message');\n }\n }\n if (hasPreviousToolUse) {\n const toolUseIds = new Set(previousContent.filter(c => c.type === 'tool_use').map(c => c.id));\n const toolResultIds = new Set(lastContent.filter(c => c.type === 'tool_result').map(c => c.toolUseId));\n if (toolUseIds.size !== toolResultIds.size || ![...toolUseIds].every(id => toolResultIds.has(id))) {\n throw new Error('ids of tool_result blocks and tool_use blocks from previous message do not match');\n }\n }\n }\n // Use different schemas based on whether tools are provided\n if (params.tools) {\n return this.request({ method: 'sampling/createMessage', params }, CreateMessageResultWithToolsSchema, options);\n }\n return this.request({ method: 'sampling/createMessage', params }, CreateMessageResultSchema, options);\n }\n /**\n * Creates an elicitation request for the given parameters.\n * For backwards compatibility, `mode` may be omitted for form requests and will default to `'form'`.\n * @param params The parameters for the elicitation request.\n * @param options Optional request options.\n * @returns The result of the elicitation request.\n */\n async elicitInput(params, options) {\n const mode = (params.mode ?? 'form');\n switch (mode) {\n case 'url': {\n if (!this._clientCapabilities?.elicitation?.url) {\n throw new Error('Client does not support url elicitation.');\n }\n const urlParams = params;\n return this.request({ method: 'elicitation/create', params: urlParams }, ElicitResultSchema, options);\n }\n case 'form': {\n if (!this._clientCapabilities?.elicitation?.form) {\n throw new Error('Client does not support form elicitation.');\n }\n const formParams = params.mode === 'form' ? params : { ...params, mode: 'form' };\n const result = await this.request({ method: 'elicitation/create', params: formParams }, ElicitResultSchema, options);\n if (result.action === 'accept' && result.content && formParams.requestedSchema) {\n try {\n const validator = this._jsonSchemaValidator.getValidator(formParams.requestedSchema);\n const validationResult = validator(result.content);\n if (!validationResult.valid) {\n throw new McpError(ErrorCode.InvalidParams, `Elicitation response content does not match requested schema: ${validationResult.errorMessage}`);\n }\n }\n catch (error) {\n if (error instanceof McpError) {\n throw error;\n }\n throw new McpError(ErrorCode.InternalError, `Error validating elicitation response: ${error instanceof Error ? error.message : String(error)}`);\n }\n }\n return result;\n }\n }\n }\n /**\n * Creates a reusable callback that, when invoked, will send a `notifications/elicitation/complete`\n * notification for the specified elicitation ID.\n *\n * @param elicitationId The ID of the elicitation to mark as complete.\n * @param options Optional notification options. Useful when the completion notification should be related to a prior request.\n * @returns A function that emits the completion notification when awaited.\n */\n createElicitationCompletionNotifier(elicitationId, options) {\n if (!this._clientCapabilities?.elicitation?.url) {\n throw new Error('Client does not support URL elicitation (required for notifications/elicitation/complete)');\n }\n return () => this.notification({\n method: 'notifications/elicitation/complete',\n params: {\n elicitationId\n }\n }, options);\n }\n async listRoots(params, options) {\n return this.request({ method: 'roots/list', params }, ListRootsResultSchema, options);\n }\n /**\n * Sends a logging message to the client, if connected.\n * Note: You only need to send the parameters object, not the entire JSON RPC message\n * @see LoggingMessageNotification\n * @param params\n * @param sessionId optional for stateless and backward compatibility\n */\n async sendLoggingMessage(params, sessionId) {\n if (this._capabilities.logging) {\n if (!this.isMessageIgnored(params.level, sessionId)) {\n return this.notification({ method: 'notifications/message', params });\n }\n }\n }\n async sendResourceUpdated(params) {\n return this.notification({\n method: 'notifications/resources/updated',\n params\n });\n }\n async sendResourceListChanged() {\n return this.notification({\n method: 'notifications/resources/list_changed'\n });\n }\n async sendToolListChanged() {\n return this.notification({ method: 'notifications/tools/list_changed' });\n }\n async sendPromptListChanged() {\n return this.notification({ method: 'notifications/prompts/list_changed' });\n }\n}\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;;;;;;;;;;AAgCO,MAAM,eAAe,SAAS;AAAA;AAAA;AAAA;AAAA,EAIjC,YAAY,aAAa,SAAS;AAC9B,UAAM,OAAO;AACb,SAAK,cAAc;AAEnB,SAAK,iBAAiB,oBAAI,IAAG;AAE7B,SAAK,qBAAqB,IAAI,IAAI,mBAAmB,QAAQ,IAAI,CAAC,OAAO,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC;AAElG,SAAK,mBAAmB,CAAC,OAAO,cAAc;AAC1C,YAAM,eAAe,KAAK,eAAe,IAAI,SAAS;AACtD,aAAO,eAAe,KAAK,mBAAmB,IAAI,KAAK,IAAI,KAAK,mBAAmB,IAAI,YAAY,IAAI;AAAA,IAC3G;AACA,SAAK,gBAAgB,SAAS,gBAAgB,CAAA;AAC9C,SAAK,gBAAgB,SAAS;AAC9B,SAAK,uBAAuB,SAAS,uBAAuB,IAAI,uBAAsB;AACtF,SAAK,kBAAkB,yBAAyB,aAAW,KAAK,cAAc,OAAO,CAAC;AACtF,SAAK,uBAAuB,+BAA+B,MAAM,KAAK,gBAAa,CAAI;AACvF,QAAI,KAAK,cAAc,SAAS;AAC5B,WAAK,kBAAkB,uBAAuB,OAAO,SAAS,UAAU;AACpE,cAAM,qBAAqB,MAAM,aAAa,MAAM,aAAa,QAAQ,gBAAgB,KAAK;AAC9F,cAAM,EAAE,UAAU,QAAQ;AAC1B,cAAM,cAAc,mBAAmB,UAAU,KAAK;AACtD,YAAI,YAAY,SAAS;AACrB,eAAK,eAAe,IAAI,oBAAoB,YAAY,IAAI;AAAA,QAChE;AACA,eAAO,CAAA;AAAA,MACX,CA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