@amplitude/ai 0.1.0

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 (510) hide show
  1. package/.cursor/skills/instrument-with-amplitude-ai/SKILL.md +50 -0
  2. package/AGENTS.md +79 -0
  3. package/LICENSE +21 -0
  4. package/README.md +2111 -0
  5. package/bin/amplitude-ai-completions.mjs +19 -0
  6. package/bin/amplitude-ai-doctor.mjs +26 -0
  7. package/bin/amplitude-ai-init.mjs +27 -0
  8. package/bin/amplitude-ai-instrument.mjs +52 -0
  9. package/bin/amplitude-ai-mcp.mjs +8 -0
  10. package/bin/amplitude-ai-register-catalog.mjs +156 -0
  11. package/bin/amplitude-ai-status.mjs +28 -0
  12. package/bin/amplitude-ai.mjs +43 -0
  13. package/bin/validate-catalog-constants.mjs +134 -0
  14. package/data/agent_event_catalog.json +1277 -0
  15. package/dist/_virtual/rolldown_runtime.js +31 -0
  16. package/dist/bound-agent.d.ts +56 -0
  17. package/dist/bound-agent.d.ts.map +1 -0
  18. package/dist/bound-agent.js +155 -0
  19. package/dist/bound-agent.js.map +1 -0
  20. package/dist/cli/doctor.d.ts +17 -0
  21. package/dist/cli/doctor.d.ts.map +1 -0
  22. package/dist/cli/doctor.js +89 -0
  23. package/dist/cli/doctor.js.map +1 -0
  24. package/dist/cli/init.d.ts +14 -0
  25. package/dist/cli/init.d.ts.map +1 -0
  26. package/dist/cli/init.js +40 -0
  27. package/dist/cli/init.js.map +1 -0
  28. package/dist/cli/providers.d.ts +32 -0
  29. package/dist/cli/providers.d.ts.map +1 -0
  30. package/dist/cli/providers.js +46 -0
  31. package/dist/cli/providers.js.map +1 -0
  32. package/dist/cli/status.d.ts +14 -0
  33. package/dist/cli/status.d.ts.map +1 -0
  34. package/dist/cli/status.js +38 -0
  35. package/dist/cli/status.js.map +1 -0
  36. package/dist/client.d.ts +246 -0
  37. package/dist/client.d.ts.map +1 -0
  38. package/dist/client.js +369 -0
  39. package/dist/client.js.map +1 -0
  40. package/dist/config.d.ts +60 -0
  41. package/dist/config.d.ts.map +1 -0
  42. package/dist/config.js +57 -0
  43. package/dist/config.js.map +1 -0
  44. package/dist/context.d.ts +44 -0
  45. package/dist/context.d.ts.map +1 -0
  46. package/dist/context.js +53 -0
  47. package/dist/context.js.map +1 -0
  48. package/dist/core/constants.d.ts +96 -0
  49. package/dist/core/constants.d.ts.map +1 -0
  50. package/dist/core/constants.js +105 -0
  51. package/dist/core/constants.js.map +1 -0
  52. package/dist/core/enrichments.d.ts +139 -0
  53. package/dist/core/enrichments.d.ts.map +1 -0
  54. package/dist/core/enrichments.js +177 -0
  55. package/dist/core/enrichments.js.map +1 -0
  56. package/dist/core/privacy.d.ts +53 -0
  57. package/dist/core/privacy.d.ts.map +1 -0
  58. package/dist/core/privacy.js +235 -0
  59. package/dist/core/privacy.js.map +1 -0
  60. package/dist/core/tracking.d.ts +242 -0
  61. package/dist/core/tracking.d.ts.map +1 -0
  62. package/dist/core/tracking.js +469 -0
  63. package/dist/core/tracking.js.map +1 -0
  64. package/dist/decorators.d.ts +109 -0
  65. package/dist/decorators.d.ts.map +1 -0
  66. package/dist/decorators.js +281 -0
  67. package/dist/decorators.js.map +1 -0
  68. package/dist/exceptions.d.ts +19 -0
  69. package/dist/exceptions.d.ts.map +1 -0
  70. package/dist/exceptions.js +35 -0
  71. package/dist/exceptions.js.map +1 -0
  72. package/dist/index.d.ts +37 -0
  73. package/dist/index.js +38 -0
  74. package/dist/integrations/anthropic-tools.d.ts +38 -0
  75. package/dist/integrations/anthropic-tools.d.ts.map +1 -0
  76. package/dist/integrations/anthropic-tools.js +175 -0
  77. package/dist/integrations/anthropic-tools.js.map +1 -0
  78. package/dist/integrations/crewai.d.ts +14 -0
  79. package/dist/integrations/crewai.d.ts.map +1 -0
  80. package/dist/integrations/crewai.js +19 -0
  81. package/dist/integrations/crewai.js.map +1 -0
  82. package/dist/integrations/langchain.d.ts +37 -0
  83. package/dist/integrations/langchain.d.ts.map +1 -0
  84. package/dist/integrations/langchain.js +189 -0
  85. package/dist/integrations/langchain.js.map +1 -0
  86. package/dist/integrations/llamaindex.d.ts +44 -0
  87. package/dist/integrations/llamaindex.d.ts.map +1 -0
  88. package/dist/integrations/llamaindex.js +144 -0
  89. package/dist/integrations/llamaindex.js.map +1 -0
  90. package/dist/integrations/openai-agents.d.ts +35 -0
  91. package/dist/integrations/openai-agents.d.ts.map +1 -0
  92. package/dist/integrations/openai-agents.js +248 -0
  93. package/dist/integrations/openai-agents.js.map +1 -0
  94. package/dist/integrations/opentelemetry.d.ts +40 -0
  95. package/dist/integrations/opentelemetry.d.ts.map +1 -0
  96. package/dist/integrations/opentelemetry.js +146 -0
  97. package/dist/integrations/opentelemetry.js.map +1 -0
  98. package/dist/internals.d.ts +5 -0
  99. package/dist/internals.js +5 -0
  100. package/dist/mcp/contract.d.ts +27 -0
  101. package/dist/mcp/contract.d.ts.map +1 -0
  102. package/dist/mcp/contract.js +25 -0
  103. package/dist/mcp/contract.js.map +1 -0
  104. package/dist/mcp/index.d.ts +4 -0
  105. package/dist/mcp/index.js +5 -0
  106. package/dist/mcp/patterns.d.ts +11 -0
  107. package/dist/mcp/patterns.d.ts.map +1 -0
  108. package/dist/mcp/patterns.js +38 -0
  109. package/dist/mcp/patterns.js.map +1 -0
  110. package/dist/mcp/server.d.ts +10 -0
  111. package/dist/mcp/server.d.ts.map +1 -0
  112. package/dist/mcp/server.js +241 -0
  113. package/dist/mcp/server.js.map +1 -0
  114. package/dist/mcp/validate-file.d.ts +20 -0
  115. package/dist/mcp/validate-file.d.ts.map +1 -0
  116. package/dist/mcp/validate-file.js +122 -0
  117. package/dist/mcp/validate-file.js.map +1 -0
  118. package/dist/middleware.d.ts +32 -0
  119. package/dist/middleware.d.ts.map +1 -0
  120. package/dist/middleware.js +67 -0
  121. package/dist/middleware.js.map +1 -0
  122. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js +54 -0
  123. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js.map +1 -0
  124. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js +20 -0
  125. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js.map +1 -0
  126. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js +34 -0
  127. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js.map +1 -0
  128. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js +225 -0
  129. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js.map +1 -0
  130. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js +22 -0
  131. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js.map +1 -0
  132. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js +351 -0
  133. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js.map +1 -0
  134. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js +634 -0
  135. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js.map +1 -0
  136. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js +60 -0
  137. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js.map +1 -0
  138. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +122 -0
  139. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js.map +1 -0
  140. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js +37 -0
  141. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js.map +1 -0
  142. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +858 -0
  143. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js.map +1 -0
  144. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js +32 -0
  145. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js.map +1 -0
  146. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js +74 -0
  147. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js.map +1 -0
  148. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +1262 -0
  149. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js.map +1 -0
  150. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js +83 -0
  151. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js.map +1 -0
  152. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/formats.js +195 -0
  153. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/formats.js.map +1 -0
  154. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/index.js +44 -0
  155. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/index.js.map +1 -0
  156. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/limit.js +88 -0
  157. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/limit.js.map +1 -0
  158. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/ajv.js +107 -0
  159. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/ajv.js.map +1 -0
  160. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js +142 -0
  161. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js.map +1 -0
  162. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.js +678 -0
  163. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.js.map +1 -0
  164. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.js +145 -0
  165. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -0
  166. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.js +106 -0
  167. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.js.map +1 -0
  168. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.js +227 -0
  169. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.js.map +1 -0
  170. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/names.js +33 -0
  171. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/names.js.map +1 -0
  172. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.js +22 -0
  173. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.js.map +1 -0
  174. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.js +137 -0
  175. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.js.map +1 -0
  176. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.js +65 -0
  177. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.js.map +1 -0
  178. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.js +150 -0
  179. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.js.map +1 -0
  180. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/applicability.js +27 -0
  181. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -0
  182. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/boolSchema.js +52 -0
  183. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -0
  184. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js +176 -0
  185. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -0
  186. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js +35 -0
  187. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -0
  188. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.js +437 -0
  189. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.js.map +1 -0
  190. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/keyword.js +117 -0
  191. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -0
  192. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.js +76 -0
  193. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -0
  194. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.js +587 -0
  195. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.js.map +1 -0
  196. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/data.js +22 -0
  197. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/data.js.map +1 -0
  198. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-draft-07.js +145 -0
  199. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-draft-07.js.map +1 -0
  200. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/equal.js +16 -0
  201. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/equal.js.map +1 -0
  202. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/ucs2length.js +29 -0
  203. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -0
  204. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/uri.js +16 -0
  205. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/uri.js.map +1 -0
  206. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/validation_error.js +20 -0
  207. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/validation_error.js.map +1 -0
  208. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +61 -0
  209. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -0
  210. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +101 -0
  211. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -0
  212. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js +34 -0
  213. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -0
  214. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +21 -0
  215. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -0
  216. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/contains.js +94 -0
  217. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -0
  218. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +91 -0
  219. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -0
  220. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/if.js +66 -0
  221. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -0
  222. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/index.js +64 -0
  223. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -0
  224. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items.js +63 -0
  225. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -0
  226. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js +39 -0
  227. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -0
  228. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/not.js +36 -0
  229. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -0
  230. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +56 -0
  231. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -0
  232. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +66 -0
  233. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -0
  234. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +22 -0
  235. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -0
  236. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/properties.js +57 -0
  237. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -0
  238. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +46 -0
  239. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -0
  240. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +22 -0
  241. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -0
  242. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/code.js +134 -0
  243. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/code.js.map +1 -0
  244. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/id.js +19 -0
  245. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -0
  246. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/index.js +27 -0
  247. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -0
  248. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js +116 -0
  249. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -0
  250. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.js +106 -0
  251. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -0
  252. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/types.js +18 -0
  253. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -0
  254. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft7.js +31 -0
  255. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -0
  256. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/format.js +97 -0
  257. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -0
  258. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/index.js +15 -0
  259. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -0
  260. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/metadata.js +27 -0
  261. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -0
  262. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/const.js +32 -0
  263. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -0
  264. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/enum.js +54 -0
  265. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -0
  266. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.js +53 -0
  267. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -0
  268. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js +33 -0
  269. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -0
  270. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js +38 -0
  271. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -0
  272. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +52 -0
  273. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -0
  274. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +33 -0
  275. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -0
  276. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +32 -0
  277. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -0
  278. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.js +43 -0
  279. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -0
  280. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/required.js +77 -0
  281. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -0
  282. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +75 -0
  283. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -0
  284. package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js +37 -0
  285. package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js.map +1 -0
  286. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js +240 -0
  287. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js.map +1 -0
  288. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js +194 -0
  289. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js.map +1 -0
  290. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js +286 -0
  291. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js.map +1 -0
  292. package/dist/node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js +82 -0
  293. package/dist/node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js.map +1 -0
  294. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js +37 -0
  295. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js.map +1 -0
  296. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Refs.js +30 -0
  297. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Refs.js.map +1 -0
  298. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +16 -0
  299. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js.map +1 -0
  300. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js +10 -0
  301. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js.map +1 -0
  302. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js +57 -0
  303. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js.map +1 -0
  304. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +17 -0
  305. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js.map +1 -0
  306. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +23 -0
  307. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js.map +1 -0
  308. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +36 -0
  309. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js.map +1 -0
  310. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +8 -0
  311. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js.map +1 -0
  312. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +10 -0
  313. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js.map +1 -0
  314. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +10 -0
  315. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js.map +1 -0
  316. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +39 -0
  317. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js.map +1 -0
  318. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +13 -0
  319. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js.map +1 -0
  320. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +11 -0
  321. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js.map +1 -0
  322. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +11 -0
  323. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js.map +1 -0
  324. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +47 -0
  325. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js.map +1 -0
  326. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +17 -0
  327. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js.map +1 -0
  328. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +38 -0
  329. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js.map +1 -0
  330. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +16 -0
  331. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js.map +1 -0
  332. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +13 -0
  333. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js.map +1 -0
  334. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +11 -0
  335. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js.map +1 -0
  336. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +46 -0
  337. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js.map +1 -0
  338. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +37 -0
  339. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js.map +1 -0
  340. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +64 -0
  341. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js.map +1 -0
  342. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +20 -0
  343. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js.map +1 -0
  344. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +27 -0
  345. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js.map +1 -0
  346. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +10 -0
  347. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js.map +1 -0
  348. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +10 -0
  349. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js.map +1 -0
  350. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +56 -0
  351. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js.map +1 -0
  352. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +21 -0
  353. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js.map +1 -0
  354. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +250 -0
  355. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js.map +1 -0
  356. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +38 -0
  357. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js.map +1 -0
  358. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +10 -0
  359. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js.map +1 -0
  360. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +64 -0
  361. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js.map +1 -0
  362. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +10 -0
  363. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js.map +1 -0
  364. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/selectParser.js +78 -0
  365. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/selectParser.js.map +1 -0
  366. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +70 -0
  367. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js.map +1 -0
  368. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js +104 -0
  369. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js.map +1 -0
  370. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js +11 -0
  371. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js.map +1 -0
  372. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js +10 -0
  373. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js.map +1 -0
  374. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js +110 -0
  375. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js.map +1 -0
  376. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js +99 -0
  377. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js.map +1 -0
  378. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js +84 -0
  379. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js.map +1 -0
  380. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js +3160 -0
  381. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js.map +1 -0
  382. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/errors.js +23 -0
  383. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/errors.js.map +1 -0
  384. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/iso.js +38 -0
  385. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/iso.js.map +1 -0
  386. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/parse.js +12 -0
  387. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/parse.js.map +1 -0
  388. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/schemas.js +611 -0
  389. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/schemas.js.map +1 -0
  390. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/api.js +437 -0
  391. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/api.js.map +1 -0
  392. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/checks.js +360 -0
  393. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/checks.js.map +1 -0
  394. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/core.js +50 -0
  395. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/core.js.map +1 -0
  396. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/doc.js +34 -0
  397. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/doc.js.map +1 -0
  398. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/errors.js +71 -0
  399. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/errors.js.map +1 -0
  400. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/parse.js +74 -0
  401. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/parse.js.map +1 -0
  402. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/regexes.js +63 -0
  403. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/regexes.js.map +1 -0
  404. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/registries.js +50 -0
  405. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/registries.js.map +1 -0
  406. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/schemas.js +1098 -0
  407. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/schemas.js.map +1 -0
  408. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/to-json-schema.js +599 -0
  409. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/to-json-schema.js.map +1 -0
  410. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/util.js +267 -0
  411. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/util.js.map +1 -0
  412. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/versions.js +10 -0
  413. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/versions.js.map +1 -0
  414. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/mini/schemas.js +50 -0
  415. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/mini/schemas.js.map +1 -0
  416. package/dist/patching.d.ts +59 -0
  417. package/dist/patching.d.ts.map +1 -0
  418. package/dist/patching.js +891 -0
  419. package/dist/patching.js.map +1 -0
  420. package/dist/propagation.d.ts +8 -0
  421. package/dist/propagation.d.ts.map +1 -0
  422. package/dist/propagation.js +46 -0
  423. package/dist/propagation.js.map +1 -0
  424. package/dist/providers/anthropic.d.ts +44 -0
  425. package/dist/providers/anthropic.d.ts.map +1 -0
  426. package/dist/providers/anthropic.js +287 -0
  427. package/dist/providers/anthropic.js.map +1 -0
  428. package/dist/providers/azure-openai.d.ts +32 -0
  429. package/dist/providers/azure-openai.d.ts.map +1 -0
  430. package/dist/providers/azure-openai.js +39 -0
  431. package/dist/providers/azure-openai.js.map +1 -0
  432. package/dist/providers/base.d.ts +70 -0
  433. package/dist/providers/base.d.ts.map +1 -0
  434. package/dist/providers/base.js +141 -0
  435. package/dist/providers/base.js.map +1 -0
  436. package/dist/providers/bedrock.d.ts +41 -0
  437. package/dist/providers/bedrock.d.ts.map +1 -0
  438. package/dist/providers/bedrock.js +229 -0
  439. package/dist/providers/bedrock.js.map +1 -0
  440. package/dist/providers/gemini.d.ts +34 -0
  441. package/dist/providers/gemini.d.ts.map +1 -0
  442. package/dist/providers/gemini.js +225 -0
  443. package/dist/providers/gemini.js.map +1 -0
  444. package/dist/providers/mistral.d.ts +32 -0
  445. package/dist/providers/mistral.d.ts.map +1 -0
  446. package/dist/providers/mistral.js +218 -0
  447. package/dist/providers/mistral.js.map +1 -0
  448. package/dist/providers/openai.d.ts +61 -0
  449. package/dist/providers/openai.d.ts.map +1 -0
  450. package/dist/providers/openai.js +530 -0
  451. package/dist/providers/openai.js.map +1 -0
  452. package/dist/register.d.ts +1 -0
  453. package/dist/register.js +46 -0
  454. package/dist/register.js.map +1 -0
  455. package/dist/session.d.ts +46 -0
  456. package/dist/session.d.ts.map +1 -0
  457. package/dist/session.js +144 -0
  458. package/dist/session.js.map +1 -0
  459. package/dist/tenant.d.ts +30 -0
  460. package/dist/tenant.d.ts.map +1 -0
  461. package/dist/tenant.js +23 -0
  462. package/dist/tenant.js.map +1 -0
  463. package/dist/testing.d.ts +46 -0
  464. package/dist/testing.d.ts.map +1 -0
  465. package/dist/testing.js +120 -0
  466. package/dist/testing.js.map +1 -0
  467. package/dist/types.d.ts +384 -0
  468. package/dist/types.d.ts.map +1 -0
  469. package/dist/types.js +13 -0
  470. package/dist/types.js.map +1 -0
  471. package/dist/utils/costs.d.ts +27 -0
  472. package/dist/utils/costs.d.ts.map +1 -0
  473. package/dist/utils/costs.js +63 -0
  474. package/dist/utils/costs.js.map +1 -0
  475. package/dist/utils/debug.d.ts +6 -0
  476. package/dist/utils/debug.d.ts.map +1 -0
  477. package/dist/utils/debug.js +73 -0
  478. package/dist/utils/debug.js.map +1 -0
  479. package/dist/utils/logger.d.ts +11 -0
  480. package/dist/utils/logger.d.ts.map +1 -0
  481. package/dist/utils/logger.js +18 -0
  482. package/dist/utils/logger.js.map +1 -0
  483. package/dist/utils/model-tiers.d.ts +8 -0
  484. package/dist/utils/model-tiers.d.ts.map +1 -0
  485. package/dist/utils/model-tiers.js +76 -0
  486. package/dist/utils/model-tiers.js.map +1 -0
  487. package/dist/utils/providers.d.ts +5 -0
  488. package/dist/utils/providers.d.ts.map +1 -0
  489. package/dist/utils/providers.js +20 -0
  490. package/dist/utils/providers.js.map +1 -0
  491. package/dist/utils/resolve-module.d.ts +5 -0
  492. package/dist/utils/resolve-module.d.ts.map +1 -0
  493. package/dist/utils/resolve-module.js +29 -0
  494. package/dist/utils/resolve-module.js.map +1 -0
  495. package/dist/utils/streaming.d.ts +55 -0
  496. package/dist/utils/streaming.d.ts.map +1 -0
  497. package/dist/utils/streaming.js +72 -0
  498. package/dist/utils/streaming.js.map +1 -0
  499. package/dist/utils/tokens.d.ts +16 -0
  500. package/dist/utils/tokens.d.ts.map +1 -0
  501. package/dist/utils/tokens.js +80 -0
  502. package/dist/utils/tokens.js.map +1 -0
  503. package/dist/wrappers.d.ts +37 -0
  504. package/dist/wrappers.d.ts.map +1 -0
  505. package/dist/wrappers.js +61 -0
  506. package/dist/wrappers.js.map +1 -0
  507. package/llms-full.txt +127 -0
  508. package/llms.txt +28 -0
  509. package/mcp.schema.json +18 -0
  510. package/package.json +189 -0
@@ -0,0 +1,1262 @@
1
+ import { datetime } from "../../../../../../zod@3.25.76/node_modules/zod/v4/classic/iso.js";
2
+ import { _enum, _null, array, boolean, custom, discriminatedUnion, intersection, literal, looseObject, number, object, optional, preprocess, record, string, union, unknown } from "../../../../../../zod@3.25.76/node_modules/zod/v4/classic/schemas.js";
3
+
4
+ //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
5
+ const LATEST_PROTOCOL_VERSION = "2025-11-25";
6
+ const SUPPORTED_PROTOCOL_VERSIONS = [
7
+ LATEST_PROTOCOL_VERSION,
8
+ "2025-06-18",
9
+ "2025-03-26",
10
+ "2024-11-05",
11
+ "2024-10-07"
12
+ ];
13
+ const RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
14
+ const JSONRPC_VERSION = "2.0";
15
+ /**
16
+ * Assert 'object' type schema.
17
+ *
18
+ * @internal
19
+ */
20
+ const AssertObjectSchema = custom((v) => v !== null && (typeof v === "object" || typeof v === "function"));
21
+ /**
22
+ * A progress token, used to associate progress notifications with the original request.
23
+ */
24
+ const ProgressTokenSchema = union([string(), number().int()]);
25
+ /**
26
+ * An opaque token used to represent a cursor for pagination.
27
+ */
28
+ const CursorSchema = string();
29
+ /**
30
+ * Task creation parameters, used to ask that the server create a task to represent a request.
31
+ */
32
+ const TaskCreationParamsSchema = looseObject({
33
+ ttl: union([number(), _null()]).optional(),
34
+ pollInterval: number().optional()
35
+ });
36
+ const TaskMetadataSchema = object({ ttl: number().optional() });
37
+ /**
38
+ * Metadata for associating messages with a task.
39
+ * Include this in the `_meta` field under the key `io.modelcontextprotocol/related-task`.
40
+ */
41
+ const RelatedTaskMetadataSchema = object({ taskId: string() });
42
+ const RequestMetaSchema = looseObject({
43
+ progressToken: ProgressTokenSchema.optional(),
44
+ [RELATED_TASK_META_KEY]: RelatedTaskMetadataSchema.optional()
45
+ });
46
+ /**
47
+ * Common params for any request.
48
+ */
49
+ const BaseRequestParamsSchema = object({ _meta: RequestMetaSchema.optional() });
50
+ /**
51
+ * Common params for any task-augmented request.
52
+ */
53
+ const TaskAugmentedRequestParamsSchema = BaseRequestParamsSchema.extend({ task: TaskMetadataSchema.optional() });
54
+ /**
55
+ * Checks if a value is a valid TaskAugmentedRequestParams.
56
+ * @param value - The value to check.
57
+ *
58
+ * @returns True if the value is a valid TaskAugmentedRequestParams, false otherwise.
59
+ */
60
+ const isTaskAugmentedRequestParams = (value) => TaskAugmentedRequestParamsSchema.safeParse(value).success;
61
+ const RequestSchema = object({
62
+ method: string(),
63
+ params: BaseRequestParamsSchema.loose().optional()
64
+ });
65
+ const NotificationsParamsSchema = object({ _meta: RequestMetaSchema.optional() });
66
+ const NotificationSchema = object({
67
+ method: string(),
68
+ params: NotificationsParamsSchema.loose().optional()
69
+ });
70
+ const ResultSchema = looseObject({ _meta: RequestMetaSchema.optional() });
71
+ /**
72
+ * A uniquely identifying ID for a request in JSON-RPC.
73
+ */
74
+ const RequestIdSchema = union([string(), number().int()]);
75
+ /**
76
+ * A request that expects a response.
77
+ */
78
+ const JSONRPCRequestSchema = object({
79
+ jsonrpc: literal(JSONRPC_VERSION),
80
+ id: RequestIdSchema,
81
+ ...RequestSchema.shape
82
+ }).strict();
83
+ const isJSONRPCRequest = (value) => JSONRPCRequestSchema.safeParse(value).success;
84
+ /**
85
+ * A notification which does not expect a response.
86
+ */
87
+ const JSONRPCNotificationSchema = object({
88
+ jsonrpc: literal(JSONRPC_VERSION),
89
+ ...NotificationSchema.shape
90
+ }).strict();
91
+ const isJSONRPCNotification = (value) => JSONRPCNotificationSchema.safeParse(value).success;
92
+ /**
93
+ * A successful (non-error) response to a request.
94
+ */
95
+ const JSONRPCResultResponseSchema = object({
96
+ jsonrpc: literal(JSONRPC_VERSION),
97
+ id: RequestIdSchema,
98
+ result: ResultSchema
99
+ }).strict();
100
+ /**
101
+ * Checks if a value is a valid JSONRPCResultResponse.
102
+ * @param value - The value to check.
103
+ *
104
+ * @returns True if the value is a valid JSONRPCResultResponse, false otherwise.
105
+ */
106
+ const isJSONRPCResultResponse = (value) => JSONRPCResultResponseSchema.safeParse(value).success;
107
+ /**
108
+ * Error codes defined by the JSON-RPC specification.
109
+ */
110
+ var ErrorCode;
111
+ (function(ErrorCode$1) {
112
+ ErrorCode$1[ErrorCode$1["ConnectionClosed"] = -32e3] = "ConnectionClosed";
113
+ ErrorCode$1[ErrorCode$1["RequestTimeout"] = -32001] = "RequestTimeout";
114
+ ErrorCode$1[ErrorCode$1["ParseError"] = -32700] = "ParseError";
115
+ ErrorCode$1[ErrorCode$1["InvalidRequest"] = -32600] = "InvalidRequest";
116
+ ErrorCode$1[ErrorCode$1["MethodNotFound"] = -32601] = "MethodNotFound";
117
+ ErrorCode$1[ErrorCode$1["InvalidParams"] = -32602] = "InvalidParams";
118
+ ErrorCode$1[ErrorCode$1["InternalError"] = -32603] = "InternalError";
119
+ ErrorCode$1[ErrorCode$1["UrlElicitationRequired"] = -32042] = "UrlElicitationRequired";
120
+ })(ErrorCode || (ErrorCode = {}));
121
+ /**
122
+ * A response to a request that indicates an error occurred.
123
+ */
124
+ const JSONRPCErrorResponseSchema = object({
125
+ jsonrpc: literal(JSONRPC_VERSION),
126
+ id: RequestIdSchema.optional(),
127
+ error: object({
128
+ code: number().int(),
129
+ message: string(),
130
+ data: unknown().optional()
131
+ })
132
+ }).strict();
133
+ /**
134
+ * Checks if a value is a valid JSONRPCErrorResponse.
135
+ * @param value - The value to check.
136
+ *
137
+ * @returns True if the value is a valid JSONRPCErrorResponse, false otherwise.
138
+ */
139
+ const isJSONRPCErrorResponse = (value) => JSONRPCErrorResponseSchema.safeParse(value).success;
140
+ const JSONRPCMessageSchema = union([
141
+ JSONRPCRequestSchema,
142
+ JSONRPCNotificationSchema,
143
+ JSONRPCResultResponseSchema,
144
+ JSONRPCErrorResponseSchema
145
+ ]);
146
+ const JSONRPCResponseSchema = union([JSONRPCResultResponseSchema, JSONRPCErrorResponseSchema]);
147
+ /**
148
+ * A response that indicates success but carries no data.
149
+ */
150
+ const EmptyResultSchema = ResultSchema.strict();
151
+ const CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({
152
+ requestId: RequestIdSchema.optional(),
153
+ reason: string().optional()
154
+ });
155
+ /**
156
+ * This notification can be sent by either side to indicate that it is cancelling a previously-issued request.
157
+ *
158
+ * The request SHOULD still be in-flight, but due to communication latency, it is always possible that this notification MAY arrive after the request has already finished.
159
+ *
160
+ * This notification indicates that the result will be unused, so any associated processing SHOULD cease.
161
+ *
162
+ * A client MUST NOT attempt to cancel its `initialize` request.
163
+ */
164
+ const CancelledNotificationSchema = NotificationSchema.extend({
165
+ method: literal("notifications/cancelled"),
166
+ params: CancelledNotificationParamsSchema
167
+ });
168
+ /**
169
+ * Icon schema for use in tools, prompts, resources, and implementations.
170
+ */
171
+ const IconSchema = object({
172
+ src: string(),
173
+ mimeType: string().optional(),
174
+ sizes: array(string()).optional(),
175
+ theme: _enum(["light", "dark"]).optional()
176
+ });
177
+ /**
178
+ * Base schema to add `icons` property.
179
+ *
180
+ */
181
+ const IconsSchema = object({ icons: array(IconSchema).optional() });
182
+ /**
183
+ * Base metadata interface for common properties across resources, tools, prompts, and implementations.
184
+ */
185
+ const BaseMetadataSchema = object({
186
+ name: string(),
187
+ title: string().optional()
188
+ });
189
+ /**
190
+ * Describes the name and version of an MCP implementation.
191
+ */
192
+ const ImplementationSchema = BaseMetadataSchema.extend({
193
+ ...BaseMetadataSchema.shape,
194
+ ...IconsSchema.shape,
195
+ version: string(),
196
+ websiteUrl: string().optional(),
197
+ description: string().optional()
198
+ });
199
+ const FormElicitationCapabilitySchema = intersection(object({ applyDefaults: boolean().optional() }), record(string(), unknown()));
200
+ const ElicitationCapabilitySchema = preprocess((value) => {
201
+ if (value && typeof value === "object" && !Array.isArray(value)) {
202
+ if (Object.keys(value).length === 0) return { form: {} };
203
+ }
204
+ return value;
205
+ }, intersection(object({
206
+ form: FormElicitationCapabilitySchema.optional(),
207
+ url: AssertObjectSchema.optional()
208
+ }), record(string(), unknown()).optional()));
209
+ /**
210
+ * Task capabilities for clients, indicating which request types support task creation.
211
+ */
212
+ const ClientTasksCapabilitySchema = looseObject({
213
+ list: AssertObjectSchema.optional(),
214
+ cancel: AssertObjectSchema.optional(),
215
+ requests: looseObject({
216
+ sampling: looseObject({ createMessage: AssertObjectSchema.optional() }).optional(),
217
+ elicitation: looseObject({ create: AssertObjectSchema.optional() }).optional()
218
+ }).optional()
219
+ });
220
+ /**
221
+ * Task capabilities for servers, indicating which request types support task creation.
222
+ */
223
+ const ServerTasksCapabilitySchema = looseObject({
224
+ list: AssertObjectSchema.optional(),
225
+ cancel: AssertObjectSchema.optional(),
226
+ requests: looseObject({ tools: looseObject({ call: AssertObjectSchema.optional() }).optional() }).optional()
227
+ });
228
+ /**
229
+ * Capabilities a client may support. Known capabilities are defined here, in this schema, but this is not a closed set: any client can define its own, additional capabilities.
230
+ */
231
+ const ClientCapabilitiesSchema = object({
232
+ experimental: record(string(), AssertObjectSchema).optional(),
233
+ sampling: object({
234
+ context: AssertObjectSchema.optional(),
235
+ tools: AssertObjectSchema.optional()
236
+ }).optional(),
237
+ elicitation: ElicitationCapabilitySchema.optional(),
238
+ roots: object({ listChanged: boolean().optional() }).optional(),
239
+ tasks: ClientTasksCapabilitySchema.optional()
240
+ });
241
+ const InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
242
+ protocolVersion: string(),
243
+ capabilities: ClientCapabilitiesSchema,
244
+ clientInfo: ImplementationSchema
245
+ });
246
+ /**
247
+ * This request is sent from the client to the server when it first connects, asking it to begin initialization.
248
+ */
249
+ const InitializeRequestSchema = RequestSchema.extend({
250
+ method: literal("initialize"),
251
+ params: InitializeRequestParamsSchema
252
+ });
253
+ /**
254
+ * Capabilities that a server may support. Known capabilities are defined here, in this schema, but this is not a closed set: any server can define its own, additional capabilities.
255
+ */
256
+ const ServerCapabilitiesSchema = object({
257
+ experimental: record(string(), AssertObjectSchema).optional(),
258
+ logging: AssertObjectSchema.optional(),
259
+ completions: AssertObjectSchema.optional(),
260
+ prompts: object({ listChanged: boolean().optional() }).optional(),
261
+ resources: object({
262
+ subscribe: boolean().optional(),
263
+ listChanged: boolean().optional()
264
+ }).optional(),
265
+ tools: object({ listChanged: boolean().optional() }).optional(),
266
+ tasks: ServerTasksCapabilitySchema.optional()
267
+ });
268
+ /**
269
+ * After receiving an initialize request from the client, the server sends this response.
270
+ */
271
+ const InitializeResultSchema = ResultSchema.extend({
272
+ protocolVersion: string(),
273
+ capabilities: ServerCapabilitiesSchema,
274
+ serverInfo: ImplementationSchema,
275
+ instructions: string().optional()
276
+ });
277
+ /**
278
+ * This notification is sent from the client to the server after initialization has finished.
279
+ */
280
+ const InitializedNotificationSchema = NotificationSchema.extend({
281
+ method: literal("notifications/initialized"),
282
+ params: NotificationsParamsSchema.optional()
283
+ });
284
+ /**
285
+ * A ping, issued by either the server or the client, to check that the other party is still alive. The receiver must promptly respond, or else may be disconnected.
286
+ */
287
+ const PingRequestSchema = RequestSchema.extend({
288
+ method: literal("ping"),
289
+ params: BaseRequestParamsSchema.optional()
290
+ });
291
+ const ProgressSchema = object({
292
+ progress: number(),
293
+ total: optional(number()),
294
+ message: optional(string())
295
+ });
296
+ const ProgressNotificationParamsSchema = object({
297
+ ...NotificationsParamsSchema.shape,
298
+ ...ProgressSchema.shape,
299
+ progressToken: ProgressTokenSchema
300
+ });
301
+ /**
302
+ * An out-of-band notification used to inform the receiver of a progress update for a long-running request.
303
+ *
304
+ * @category notifications/progress
305
+ */
306
+ const ProgressNotificationSchema = NotificationSchema.extend({
307
+ method: literal("notifications/progress"),
308
+ params: ProgressNotificationParamsSchema
309
+ });
310
+ const PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({ cursor: CursorSchema.optional() });
311
+ const PaginatedRequestSchema = RequestSchema.extend({ params: PaginatedRequestParamsSchema.optional() });
312
+ const PaginatedResultSchema = ResultSchema.extend({ nextCursor: CursorSchema.optional() });
313
+ /**
314
+ * The status of a task.
315
+ * */
316
+ const TaskStatusSchema = _enum([
317
+ "working",
318
+ "input_required",
319
+ "completed",
320
+ "failed",
321
+ "cancelled"
322
+ ]);
323
+ /**
324
+ * A pollable state object associated with a request.
325
+ */
326
+ const TaskSchema = object({
327
+ taskId: string(),
328
+ status: TaskStatusSchema,
329
+ ttl: union([number(), _null()]),
330
+ createdAt: string(),
331
+ lastUpdatedAt: string(),
332
+ pollInterval: optional(number()),
333
+ statusMessage: optional(string())
334
+ });
335
+ /**
336
+ * Result returned when a task is created, containing the task data wrapped in a task field.
337
+ */
338
+ const CreateTaskResultSchema = ResultSchema.extend({ task: TaskSchema });
339
+ /**
340
+ * Parameters for task status notification.
341
+ */
342
+ const TaskStatusNotificationParamsSchema = NotificationsParamsSchema.merge(TaskSchema);
343
+ /**
344
+ * A notification sent when a task's status changes.
345
+ */
346
+ const TaskStatusNotificationSchema = NotificationSchema.extend({
347
+ method: literal("notifications/tasks/status"),
348
+ params: TaskStatusNotificationParamsSchema
349
+ });
350
+ /**
351
+ * A request to get the state of a specific task.
352
+ */
353
+ const GetTaskRequestSchema = RequestSchema.extend({
354
+ method: literal("tasks/get"),
355
+ params: BaseRequestParamsSchema.extend({ taskId: string() })
356
+ });
357
+ /**
358
+ * The response to a tasks/get request.
359
+ */
360
+ const GetTaskResultSchema = ResultSchema.merge(TaskSchema);
361
+ /**
362
+ * A request to get the result of a specific task.
363
+ */
364
+ const GetTaskPayloadRequestSchema = RequestSchema.extend({
365
+ method: literal("tasks/result"),
366
+ params: BaseRequestParamsSchema.extend({ taskId: string() })
367
+ });
368
+ /**
369
+ * The response to a tasks/result request.
370
+ * The structure matches the result type of the original request.
371
+ * For example, a tools/call task would return the CallToolResult structure.
372
+ *
373
+ */
374
+ const GetTaskPayloadResultSchema = ResultSchema.loose();
375
+ /**
376
+ * A request to list tasks.
377
+ */
378
+ const ListTasksRequestSchema = PaginatedRequestSchema.extend({ method: literal("tasks/list") });
379
+ /**
380
+ * The response to a tasks/list request.
381
+ */
382
+ const ListTasksResultSchema = PaginatedResultSchema.extend({ tasks: array(TaskSchema) });
383
+ /**
384
+ * A request to cancel a specific task.
385
+ */
386
+ const CancelTaskRequestSchema = RequestSchema.extend({
387
+ method: literal("tasks/cancel"),
388
+ params: BaseRequestParamsSchema.extend({ taskId: string() })
389
+ });
390
+ /**
391
+ * The response to a tasks/cancel request.
392
+ */
393
+ const CancelTaskResultSchema = ResultSchema.merge(TaskSchema);
394
+ /**
395
+ * The contents of a specific resource or sub-resource.
396
+ */
397
+ const ResourceContentsSchema = object({
398
+ uri: string(),
399
+ mimeType: optional(string()),
400
+ _meta: record(string(), unknown()).optional()
401
+ });
402
+ const TextResourceContentsSchema = ResourceContentsSchema.extend({ text: string() });
403
+ /**
404
+ * A Zod schema for validating Base64 strings that is more performant and
405
+ * robust for very large inputs than the default regex-based check. It avoids
406
+ * stack overflows by using the native `atob` function for validation.
407
+ */
408
+ const Base64Schema = string().refine((val) => {
409
+ try {
410
+ atob(val);
411
+ return true;
412
+ } catch {
413
+ return false;
414
+ }
415
+ }, { message: "Invalid Base64 string" });
416
+ const BlobResourceContentsSchema = ResourceContentsSchema.extend({ blob: Base64Schema });
417
+ /**
418
+ * The sender or recipient of messages and data in a conversation.
419
+ */
420
+ const RoleSchema = _enum(["user", "assistant"]);
421
+ /**
422
+ * Optional annotations providing clients additional context about a resource.
423
+ */
424
+ const AnnotationsSchema = object({
425
+ audience: array(RoleSchema).optional(),
426
+ priority: number().min(0).max(1).optional(),
427
+ lastModified: datetime({ offset: true }).optional()
428
+ });
429
+ /**
430
+ * A known resource that the server is capable of reading.
431
+ */
432
+ const ResourceSchema = object({
433
+ ...BaseMetadataSchema.shape,
434
+ ...IconsSchema.shape,
435
+ uri: string(),
436
+ description: optional(string()),
437
+ mimeType: optional(string()),
438
+ annotations: AnnotationsSchema.optional(),
439
+ _meta: optional(looseObject({}))
440
+ });
441
+ /**
442
+ * A template description for resources available on the server.
443
+ */
444
+ const ResourceTemplateSchema = object({
445
+ ...BaseMetadataSchema.shape,
446
+ ...IconsSchema.shape,
447
+ uriTemplate: string(),
448
+ description: optional(string()),
449
+ mimeType: optional(string()),
450
+ annotations: AnnotationsSchema.optional(),
451
+ _meta: optional(looseObject({}))
452
+ });
453
+ /**
454
+ * Sent from the client to request a list of resources the server has.
455
+ */
456
+ const ListResourcesRequestSchema = PaginatedRequestSchema.extend({ method: literal("resources/list") });
457
+ /**
458
+ * The server's response to a resources/list request from the client.
459
+ */
460
+ const ListResourcesResultSchema = PaginatedResultSchema.extend({ resources: array(ResourceSchema) });
461
+ /**
462
+ * Sent from the client to request a list of resource templates the server has.
463
+ */
464
+ const ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({ method: literal("resources/templates/list") });
465
+ /**
466
+ * The server's response to a resources/templates/list request from the client.
467
+ */
468
+ const ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({ resourceTemplates: array(ResourceTemplateSchema) });
469
+ const ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({ uri: string() });
470
+ /**
471
+ * Parameters for a `resources/read` request.
472
+ */
473
+ const ReadResourceRequestParamsSchema = ResourceRequestParamsSchema;
474
+ /**
475
+ * Sent from the client to the server, to read a specific resource URI.
476
+ */
477
+ const ReadResourceRequestSchema = RequestSchema.extend({
478
+ method: literal("resources/read"),
479
+ params: ReadResourceRequestParamsSchema
480
+ });
481
+ /**
482
+ * The server's response to a resources/read request from the client.
483
+ */
484
+ const ReadResourceResultSchema = ResultSchema.extend({ contents: array(union([TextResourceContentsSchema, BlobResourceContentsSchema])) });
485
+ /**
486
+ * An optional notification from the server to the client, informing it that the list of resources it can read from has changed. This may be issued by servers without any previous subscription from the client.
487
+ */
488
+ const ResourceListChangedNotificationSchema = NotificationSchema.extend({
489
+ method: literal("notifications/resources/list_changed"),
490
+ params: NotificationsParamsSchema.optional()
491
+ });
492
+ const SubscribeRequestParamsSchema = ResourceRequestParamsSchema;
493
+ /**
494
+ * Sent from the client to request resources/updated notifications from the server whenever a particular resource changes.
495
+ */
496
+ const SubscribeRequestSchema = RequestSchema.extend({
497
+ method: literal("resources/subscribe"),
498
+ params: SubscribeRequestParamsSchema
499
+ });
500
+ const UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema;
501
+ /**
502
+ * Sent from the client to request cancellation of resources/updated notifications from the server. This should follow a previous resources/subscribe request.
503
+ */
504
+ const UnsubscribeRequestSchema = RequestSchema.extend({
505
+ method: literal("resources/unsubscribe"),
506
+ params: UnsubscribeRequestParamsSchema
507
+ });
508
+ /**
509
+ * Parameters for a `notifications/resources/updated` notification.
510
+ */
511
+ const ResourceUpdatedNotificationParamsSchema = NotificationsParamsSchema.extend({ uri: string() });
512
+ /**
513
+ * A notification from the server to the client, informing it that a resource has changed and may need to be read again. This should only be sent if the client previously sent a resources/subscribe request.
514
+ */
515
+ const ResourceUpdatedNotificationSchema = NotificationSchema.extend({
516
+ method: literal("notifications/resources/updated"),
517
+ params: ResourceUpdatedNotificationParamsSchema
518
+ });
519
+ /**
520
+ * Describes an argument that a prompt can accept.
521
+ */
522
+ const PromptArgumentSchema = object({
523
+ name: string(),
524
+ description: optional(string()),
525
+ required: optional(boolean())
526
+ });
527
+ /**
528
+ * A prompt or prompt template that the server offers.
529
+ */
530
+ const PromptSchema = object({
531
+ ...BaseMetadataSchema.shape,
532
+ ...IconsSchema.shape,
533
+ description: optional(string()),
534
+ arguments: optional(array(PromptArgumentSchema)),
535
+ _meta: optional(looseObject({}))
536
+ });
537
+ /**
538
+ * Sent from the client to request a list of prompts and prompt templates the server has.
539
+ */
540
+ const ListPromptsRequestSchema = PaginatedRequestSchema.extend({ method: literal("prompts/list") });
541
+ /**
542
+ * The server's response to a prompts/list request from the client.
543
+ */
544
+ const ListPromptsResultSchema = PaginatedResultSchema.extend({ prompts: array(PromptSchema) });
545
+ /**
546
+ * Parameters for a `prompts/get` request.
547
+ */
548
+ const GetPromptRequestParamsSchema = BaseRequestParamsSchema.extend({
549
+ name: string(),
550
+ arguments: record(string(), string()).optional()
551
+ });
552
+ /**
553
+ * Used by the client to get a prompt provided by the server.
554
+ */
555
+ const GetPromptRequestSchema = RequestSchema.extend({
556
+ method: literal("prompts/get"),
557
+ params: GetPromptRequestParamsSchema
558
+ });
559
+ /**
560
+ * Text provided to or from an LLM.
561
+ */
562
+ const TextContentSchema = object({
563
+ type: literal("text"),
564
+ text: string(),
565
+ annotations: AnnotationsSchema.optional(),
566
+ _meta: record(string(), unknown()).optional()
567
+ });
568
+ /**
569
+ * An image provided to or from an LLM.
570
+ */
571
+ const ImageContentSchema = object({
572
+ type: literal("image"),
573
+ data: Base64Schema,
574
+ mimeType: string(),
575
+ annotations: AnnotationsSchema.optional(),
576
+ _meta: record(string(), unknown()).optional()
577
+ });
578
+ /**
579
+ * An Audio provided to or from an LLM.
580
+ */
581
+ const AudioContentSchema = object({
582
+ type: literal("audio"),
583
+ data: Base64Schema,
584
+ mimeType: string(),
585
+ annotations: AnnotationsSchema.optional(),
586
+ _meta: record(string(), unknown()).optional()
587
+ });
588
+ /**
589
+ * A tool call request from an assistant (LLM).
590
+ * Represents the assistant's request to use a tool.
591
+ */
592
+ const ToolUseContentSchema = object({
593
+ type: literal("tool_use"),
594
+ name: string(),
595
+ id: string(),
596
+ input: record(string(), unknown()),
597
+ _meta: record(string(), unknown()).optional()
598
+ });
599
+ /**
600
+ * The contents of a resource, embedded into a prompt or tool call result.
601
+ */
602
+ const EmbeddedResourceSchema = object({
603
+ type: literal("resource"),
604
+ resource: union([TextResourceContentsSchema, BlobResourceContentsSchema]),
605
+ annotations: AnnotationsSchema.optional(),
606
+ _meta: record(string(), unknown()).optional()
607
+ });
608
+ /**
609
+ * A resource that the server is capable of reading, included in a prompt or tool call result.
610
+ *
611
+ * Note: resource links returned by tools are not guaranteed to appear in the results of `resources/list` requests.
612
+ */
613
+ const ResourceLinkSchema = ResourceSchema.extend({ type: literal("resource_link") });
614
+ /**
615
+ * A content block that can be used in prompts and tool results.
616
+ */
617
+ const ContentBlockSchema = union([
618
+ TextContentSchema,
619
+ ImageContentSchema,
620
+ AudioContentSchema,
621
+ ResourceLinkSchema,
622
+ EmbeddedResourceSchema
623
+ ]);
624
+ /**
625
+ * Describes a message returned as part of a prompt.
626
+ */
627
+ const PromptMessageSchema = object({
628
+ role: RoleSchema,
629
+ content: ContentBlockSchema
630
+ });
631
+ /**
632
+ * The server's response to a prompts/get request from the client.
633
+ */
634
+ const GetPromptResultSchema = ResultSchema.extend({
635
+ description: string().optional(),
636
+ messages: array(PromptMessageSchema)
637
+ });
638
+ /**
639
+ * An optional notification from the server to the client, informing it that the list of prompts it offers has changed. This may be issued by servers without any previous subscription from the client.
640
+ */
641
+ const PromptListChangedNotificationSchema = NotificationSchema.extend({
642
+ method: literal("notifications/prompts/list_changed"),
643
+ params: NotificationsParamsSchema.optional()
644
+ });
645
+ /**
646
+ * Additional properties describing a Tool to clients.
647
+ *
648
+ * NOTE: all properties in ToolAnnotations are **hints**.
649
+ * They are not guaranteed to provide a faithful description of
650
+ * tool behavior (including descriptive properties like `title`).
651
+ *
652
+ * Clients should never make tool use decisions based on ToolAnnotations
653
+ * received from untrusted servers.
654
+ */
655
+ const ToolAnnotationsSchema = object({
656
+ title: string().optional(),
657
+ readOnlyHint: boolean().optional(),
658
+ destructiveHint: boolean().optional(),
659
+ idempotentHint: boolean().optional(),
660
+ openWorldHint: boolean().optional()
661
+ });
662
+ /**
663
+ * Execution-related properties for a tool.
664
+ */
665
+ const ToolExecutionSchema = object({ taskSupport: _enum([
666
+ "required",
667
+ "optional",
668
+ "forbidden"
669
+ ]).optional() });
670
+ /**
671
+ * Definition for a tool the client can call.
672
+ */
673
+ const ToolSchema = object({
674
+ ...BaseMetadataSchema.shape,
675
+ ...IconsSchema.shape,
676
+ description: string().optional(),
677
+ inputSchema: object({
678
+ type: literal("object"),
679
+ properties: record(string(), AssertObjectSchema).optional(),
680
+ required: array(string()).optional()
681
+ }).catchall(unknown()),
682
+ outputSchema: object({
683
+ type: literal("object"),
684
+ properties: record(string(), AssertObjectSchema).optional(),
685
+ required: array(string()).optional()
686
+ }).catchall(unknown()).optional(),
687
+ annotations: ToolAnnotationsSchema.optional(),
688
+ execution: ToolExecutionSchema.optional(),
689
+ _meta: record(string(), unknown()).optional()
690
+ });
691
+ /**
692
+ * Sent from the client to request a list of tools the server has.
693
+ */
694
+ const ListToolsRequestSchema = PaginatedRequestSchema.extend({ method: literal("tools/list") });
695
+ /**
696
+ * The server's response to a tools/list request from the client.
697
+ */
698
+ const ListToolsResultSchema = PaginatedResultSchema.extend({ tools: array(ToolSchema) });
699
+ /**
700
+ * The server's response to a tool call.
701
+ */
702
+ const CallToolResultSchema = ResultSchema.extend({
703
+ content: array(ContentBlockSchema).default([]),
704
+ structuredContent: record(string(), unknown()).optional(),
705
+ isError: boolean().optional()
706
+ });
707
+ /**
708
+ * CallToolResultSchema extended with backwards compatibility to protocol version 2024-10-07.
709
+ */
710
+ const CompatibilityCallToolResultSchema = CallToolResultSchema.or(ResultSchema.extend({ toolResult: unknown() }));
711
+ /**
712
+ * Parameters for a `tools/call` request.
713
+ */
714
+ const CallToolRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
715
+ name: string(),
716
+ arguments: record(string(), unknown()).optional()
717
+ });
718
+ /**
719
+ * Used by the client to invoke a tool provided by the server.
720
+ */
721
+ const CallToolRequestSchema = RequestSchema.extend({
722
+ method: literal("tools/call"),
723
+ params: CallToolRequestParamsSchema
724
+ });
725
+ /**
726
+ * An optional notification from the server to the client, informing it that the list of tools it offers has changed. This may be issued by servers without any previous subscription from the client.
727
+ */
728
+ const ToolListChangedNotificationSchema = NotificationSchema.extend({
729
+ method: literal("notifications/tools/list_changed"),
730
+ params: NotificationsParamsSchema.optional()
731
+ });
732
+ /**
733
+ * Base schema for list changed subscription options (without callback).
734
+ * Used internally for Zod validation of autoRefresh and debounceMs.
735
+ */
736
+ const ListChangedOptionsBaseSchema = object({
737
+ autoRefresh: boolean().default(true),
738
+ debounceMs: number().int().nonnegative().default(300)
739
+ });
740
+ /**
741
+ * The severity of a log message.
742
+ */
743
+ const LoggingLevelSchema = _enum([
744
+ "debug",
745
+ "info",
746
+ "notice",
747
+ "warning",
748
+ "error",
749
+ "critical",
750
+ "alert",
751
+ "emergency"
752
+ ]);
753
+ /**
754
+ * Parameters for a `logging/setLevel` request.
755
+ */
756
+ const SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({ level: LoggingLevelSchema });
757
+ /**
758
+ * A request from the client to the server, to enable or adjust logging.
759
+ */
760
+ const SetLevelRequestSchema = RequestSchema.extend({
761
+ method: literal("logging/setLevel"),
762
+ params: SetLevelRequestParamsSchema
763
+ });
764
+ /**
765
+ * Parameters for a `notifications/message` notification.
766
+ */
767
+ const LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend({
768
+ level: LoggingLevelSchema,
769
+ logger: string().optional(),
770
+ data: unknown()
771
+ });
772
+ /**
773
+ * Notification of a log message passed from server to client. If no logging/setLevel request has been sent from the client, the server MAY decide which messages to send automatically.
774
+ */
775
+ const LoggingMessageNotificationSchema = NotificationSchema.extend({
776
+ method: literal("notifications/message"),
777
+ params: LoggingMessageNotificationParamsSchema
778
+ });
779
+ /**
780
+ * Hints to use for model selection.
781
+ */
782
+ const ModelHintSchema = object({ name: string().optional() });
783
+ /**
784
+ * The server's preferences for model selection, requested of the client during sampling.
785
+ */
786
+ const ModelPreferencesSchema = object({
787
+ hints: array(ModelHintSchema).optional(),
788
+ costPriority: number().min(0).max(1).optional(),
789
+ speedPriority: number().min(0).max(1).optional(),
790
+ intelligencePriority: number().min(0).max(1).optional()
791
+ });
792
+ /**
793
+ * Controls tool usage behavior in sampling requests.
794
+ */
795
+ const ToolChoiceSchema = object({ mode: _enum([
796
+ "auto",
797
+ "required",
798
+ "none"
799
+ ]).optional() });
800
+ /**
801
+ * The result of a tool execution, provided by the user (server).
802
+ * Represents the outcome of invoking a tool requested via ToolUseContent.
803
+ */
804
+ const ToolResultContentSchema = object({
805
+ type: literal("tool_result"),
806
+ toolUseId: string().describe("The unique identifier for the corresponding tool call."),
807
+ content: array(ContentBlockSchema).default([]),
808
+ structuredContent: object({}).loose().optional(),
809
+ isError: boolean().optional(),
810
+ _meta: record(string(), unknown()).optional()
811
+ });
812
+ /**
813
+ * Basic content types for sampling responses (without tool use).
814
+ * Used for backwards-compatible CreateMessageResult when tools are not used.
815
+ */
816
+ const SamplingContentSchema = discriminatedUnion("type", [
817
+ TextContentSchema,
818
+ ImageContentSchema,
819
+ AudioContentSchema
820
+ ]);
821
+ /**
822
+ * Content block types allowed in sampling messages.
823
+ * This includes text, image, audio, tool use requests, and tool results.
824
+ */
825
+ const SamplingMessageContentBlockSchema = discriminatedUnion("type", [
826
+ TextContentSchema,
827
+ ImageContentSchema,
828
+ AudioContentSchema,
829
+ ToolUseContentSchema,
830
+ ToolResultContentSchema
831
+ ]);
832
+ /**
833
+ * Describes a message issued to or received from an LLM API.
834
+ */
835
+ const SamplingMessageSchema = object({
836
+ role: RoleSchema,
837
+ content: union([SamplingMessageContentBlockSchema, array(SamplingMessageContentBlockSchema)]),
838
+ _meta: record(string(), unknown()).optional()
839
+ });
840
+ /**
841
+ * Parameters for a `sampling/createMessage` request.
842
+ */
843
+ const CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
844
+ messages: array(SamplingMessageSchema),
845
+ modelPreferences: ModelPreferencesSchema.optional(),
846
+ systemPrompt: string().optional(),
847
+ includeContext: _enum([
848
+ "none",
849
+ "thisServer",
850
+ "allServers"
851
+ ]).optional(),
852
+ temperature: number().optional(),
853
+ maxTokens: number().int(),
854
+ stopSequences: array(string()).optional(),
855
+ metadata: AssertObjectSchema.optional(),
856
+ tools: array(ToolSchema).optional(),
857
+ toolChoice: ToolChoiceSchema.optional()
858
+ });
859
+ /**
860
+ * A request from the server to sample an LLM via the client. The client has full discretion over which model to select. The client should also inform the user before beginning sampling, to allow them to inspect the request (human in the loop) and decide whether to approve it.
861
+ */
862
+ const CreateMessageRequestSchema = RequestSchema.extend({
863
+ method: literal("sampling/createMessage"),
864
+ params: CreateMessageRequestParamsSchema
865
+ });
866
+ /**
867
+ * The client's response to a sampling/create_message request from the server.
868
+ * This is the backwards-compatible version that returns single content (no arrays).
869
+ * Used when the request does not include tools.
870
+ */
871
+ const CreateMessageResultSchema = ResultSchema.extend({
872
+ model: string(),
873
+ stopReason: optional(_enum([
874
+ "endTurn",
875
+ "stopSequence",
876
+ "maxTokens"
877
+ ]).or(string())),
878
+ role: RoleSchema,
879
+ content: SamplingContentSchema
880
+ });
881
+ /**
882
+ * The client's response to a sampling/create_message request when tools were provided.
883
+ * This version supports array content for tool use flows.
884
+ */
885
+ const CreateMessageResultWithToolsSchema = ResultSchema.extend({
886
+ model: string(),
887
+ stopReason: optional(_enum([
888
+ "endTurn",
889
+ "stopSequence",
890
+ "maxTokens",
891
+ "toolUse"
892
+ ]).or(string())),
893
+ role: RoleSchema,
894
+ content: union([SamplingMessageContentBlockSchema, array(SamplingMessageContentBlockSchema)])
895
+ });
896
+ /**
897
+ * Primitive schema definition for boolean fields.
898
+ */
899
+ const BooleanSchemaSchema = object({
900
+ type: literal("boolean"),
901
+ title: string().optional(),
902
+ description: string().optional(),
903
+ default: boolean().optional()
904
+ });
905
+ /**
906
+ * Primitive schema definition for string fields.
907
+ */
908
+ const StringSchemaSchema = object({
909
+ type: literal("string"),
910
+ title: string().optional(),
911
+ description: string().optional(),
912
+ minLength: number().optional(),
913
+ maxLength: number().optional(),
914
+ format: _enum([
915
+ "email",
916
+ "uri",
917
+ "date",
918
+ "date-time"
919
+ ]).optional(),
920
+ default: string().optional()
921
+ });
922
+ /**
923
+ * Primitive schema definition for number fields.
924
+ */
925
+ const NumberSchemaSchema = object({
926
+ type: _enum(["number", "integer"]),
927
+ title: string().optional(),
928
+ description: string().optional(),
929
+ minimum: number().optional(),
930
+ maximum: number().optional(),
931
+ default: number().optional()
932
+ });
933
+ /**
934
+ * Schema for single-selection enumeration without display titles for options.
935
+ */
936
+ const UntitledSingleSelectEnumSchemaSchema = object({
937
+ type: literal("string"),
938
+ title: string().optional(),
939
+ description: string().optional(),
940
+ enum: array(string()),
941
+ default: string().optional()
942
+ });
943
+ /**
944
+ * Schema for single-selection enumeration with display titles for each option.
945
+ */
946
+ const TitledSingleSelectEnumSchemaSchema = object({
947
+ type: literal("string"),
948
+ title: string().optional(),
949
+ description: string().optional(),
950
+ oneOf: array(object({
951
+ const: string(),
952
+ title: string()
953
+ })),
954
+ default: string().optional()
955
+ });
956
+ /**
957
+ * Use TitledSingleSelectEnumSchema instead.
958
+ * This interface will be removed in a future version.
959
+ */
960
+ const LegacyTitledEnumSchemaSchema = object({
961
+ type: literal("string"),
962
+ title: string().optional(),
963
+ description: string().optional(),
964
+ enum: array(string()),
965
+ enumNames: array(string()).optional(),
966
+ default: string().optional()
967
+ });
968
+ const SingleSelectEnumSchemaSchema = union([UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema]);
969
+ /**
970
+ * Schema for multiple-selection enumeration without display titles for options.
971
+ */
972
+ const UntitledMultiSelectEnumSchemaSchema = object({
973
+ type: literal("array"),
974
+ title: string().optional(),
975
+ description: string().optional(),
976
+ minItems: number().optional(),
977
+ maxItems: number().optional(),
978
+ items: object({
979
+ type: literal("string"),
980
+ enum: array(string())
981
+ }),
982
+ default: array(string()).optional()
983
+ });
984
+ /**
985
+ * Schema for multiple-selection enumeration with display titles for each option.
986
+ */
987
+ const TitledMultiSelectEnumSchemaSchema = object({
988
+ type: literal("array"),
989
+ title: string().optional(),
990
+ description: string().optional(),
991
+ minItems: number().optional(),
992
+ maxItems: number().optional(),
993
+ items: object({ anyOf: array(object({
994
+ const: string(),
995
+ title: string()
996
+ })) }),
997
+ default: array(string()).optional()
998
+ });
999
+ /**
1000
+ * Combined schema for multiple-selection enumeration
1001
+ */
1002
+ const MultiSelectEnumSchemaSchema = union([UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema]);
1003
+ /**
1004
+ * Primitive schema definition for enum fields.
1005
+ */
1006
+ const EnumSchemaSchema = union([
1007
+ LegacyTitledEnumSchemaSchema,
1008
+ SingleSelectEnumSchemaSchema,
1009
+ MultiSelectEnumSchemaSchema
1010
+ ]);
1011
+ /**
1012
+ * Union of all primitive schema definitions.
1013
+ */
1014
+ const PrimitiveSchemaDefinitionSchema = union([
1015
+ EnumSchemaSchema,
1016
+ BooleanSchemaSchema,
1017
+ StringSchemaSchema,
1018
+ NumberSchemaSchema
1019
+ ]);
1020
+ /**
1021
+ * Parameters for an `elicitation/create` request for form-based elicitation.
1022
+ */
1023
+ const ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.extend({
1024
+ mode: literal("form").optional(),
1025
+ message: string(),
1026
+ requestedSchema: object({
1027
+ type: literal("object"),
1028
+ properties: record(string(), PrimitiveSchemaDefinitionSchema),
1029
+ required: array(string()).optional()
1030
+ })
1031
+ });
1032
+ /**
1033
+ * Parameters for an `elicitation/create` request for URL-based elicitation.
1034
+ */
1035
+ const ElicitRequestURLParamsSchema = TaskAugmentedRequestParamsSchema.extend({
1036
+ mode: literal("url"),
1037
+ message: string(),
1038
+ elicitationId: string(),
1039
+ url: string().url()
1040
+ });
1041
+ /**
1042
+ * The parameters for a request to elicit additional information from the user via the client.
1043
+ */
1044
+ const ElicitRequestParamsSchema = union([ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema]);
1045
+ /**
1046
+ * A request from the server to elicit user input via the client.
1047
+ * The client should present the message and form fields to the user (form mode)
1048
+ * or navigate to a URL (URL mode).
1049
+ */
1050
+ const ElicitRequestSchema = RequestSchema.extend({
1051
+ method: literal("elicitation/create"),
1052
+ params: ElicitRequestParamsSchema
1053
+ });
1054
+ /**
1055
+ * Parameters for a `notifications/elicitation/complete` notification.
1056
+ *
1057
+ * @category notifications/elicitation/complete
1058
+ */
1059
+ const ElicitationCompleteNotificationParamsSchema = NotificationsParamsSchema.extend({ elicitationId: string() });
1060
+ /**
1061
+ * A notification from the server to the client, informing it of a completion of an out-of-band elicitation request.
1062
+ *
1063
+ * @category notifications/elicitation/complete
1064
+ */
1065
+ const ElicitationCompleteNotificationSchema = NotificationSchema.extend({
1066
+ method: literal("notifications/elicitation/complete"),
1067
+ params: ElicitationCompleteNotificationParamsSchema
1068
+ });
1069
+ /**
1070
+ * The client's response to an elicitation/create request from the server.
1071
+ */
1072
+ const ElicitResultSchema = ResultSchema.extend({
1073
+ action: _enum([
1074
+ "accept",
1075
+ "decline",
1076
+ "cancel"
1077
+ ]),
1078
+ content: preprocess((val) => val === null ? void 0 : val, record(string(), union([
1079
+ string(),
1080
+ number(),
1081
+ boolean(),
1082
+ array(string())
1083
+ ])).optional())
1084
+ });
1085
+ /**
1086
+ * A reference to a resource or resource template definition.
1087
+ */
1088
+ const ResourceTemplateReferenceSchema = object({
1089
+ type: literal("ref/resource"),
1090
+ uri: string()
1091
+ });
1092
+ /**
1093
+ * Identifies a prompt.
1094
+ */
1095
+ const PromptReferenceSchema = object({
1096
+ type: literal("ref/prompt"),
1097
+ name: string()
1098
+ });
1099
+ /**
1100
+ * Parameters for a `completion/complete` request.
1101
+ */
1102
+ const CompleteRequestParamsSchema = BaseRequestParamsSchema.extend({
1103
+ ref: union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
1104
+ argument: object({
1105
+ name: string(),
1106
+ value: string()
1107
+ }),
1108
+ context: object({ arguments: record(string(), string()).optional() }).optional()
1109
+ });
1110
+ /**
1111
+ * A request from the client to the server, to ask for completion options.
1112
+ */
1113
+ const CompleteRequestSchema = RequestSchema.extend({
1114
+ method: literal("completion/complete"),
1115
+ params: CompleteRequestParamsSchema
1116
+ });
1117
+ function assertCompleteRequestPrompt(request) {
1118
+ if (request.params.ref.type !== "ref/prompt") throw new TypeError(`Expected CompleteRequestPrompt, but got ${request.params.ref.type}`);
1119
+ }
1120
+ function assertCompleteRequestResourceTemplate(request) {
1121
+ if (request.params.ref.type !== "ref/resource") throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${request.params.ref.type}`);
1122
+ }
1123
+ /**
1124
+ * The server's response to a completion/complete request
1125
+ */
1126
+ const CompleteResultSchema = ResultSchema.extend({ completion: looseObject({
1127
+ values: array(string()).max(100),
1128
+ total: optional(number().int()),
1129
+ hasMore: optional(boolean())
1130
+ }) });
1131
+ /**
1132
+ * Represents a root directory or file that the server can operate on.
1133
+ */
1134
+ const RootSchema = object({
1135
+ uri: string().startsWith("file://"),
1136
+ name: string().optional(),
1137
+ _meta: record(string(), unknown()).optional()
1138
+ });
1139
+ /**
1140
+ * Sent from the server to request a list of root URIs from the client.
1141
+ */
1142
+ const ListRootsRequestSchema = RequestSchema.extend({
1143
+ method: literal("roots/list"),
1144
+ params: BaseRequestParamsSchema.optional()
1145
+ });
1146
+ /**
1147
+ * The client's response to a roots/list request from the server.
1148
+ */
1149
+ const ListRootsResultSchema = ResultSchema.extend({ roots: array(RootSchema) });
1150
+ /**
1151
+ * A notification from the client to the server, informing it that the list of roots has changed.
1152
+ */
1153
+ const RootsListChangedNotificationSchema = NotificationSchema.extend({
1154
+ method: literal("notifications/roots/list_changed"),
1155
+ params: NotificationsParamsSchema.optional()
1156
+ });
1157
+ const ClientRequestSchema = union([
1158
+ PingRequestSchema,
1159
+ InitializeRequestSchema,
1160
+ CompleteRequestSchema,
1161
+ SetLevelRequestSchema,
1162
+ GetPromptRequestSchema,
1163
+ ListPromptsRequestSchema,
1164
+ ListResourcesRequestSchema,
1165
+ ListResourceTemplatesRequestSchema,
1166
+ ReadResourceRequestSchema,
1167
+ SubscribeRequestSchema,
1168
+ UnsubscribeRequestSchema,
1169
+ CallToolRequestSchema,
1170
+ ListToolsRequestSchema,
1171
+ GetTaskRequestSchema,
1172
+ GetTaskPayloadRequestSchema,
1173
+ ListTasksRequestSchema,
1174
+ CancelTaskRequestSchema
1175
+ ]);
1176
+ const ClientNotificationSchema = union([
1177
+ CancelledNotificationSchema,
1178
+ ProgressNotificationSchema,
1179
+ InitializedNotificationSchema,
1180
+ RootsListChangedNotificationSchema,
1181
+ TaskStatusNotificationSchema
1182
+ ]);
1183
+ const ClientResultSchema = union([
1184
+ EmptyResultSchema,
1185
+ CreateMessageResultSchema,
1186
+ CreateMessageResultWithToolsSchema,
1187
+ ElicitResultSchema,
1188
+ ListRootsResultSchema,
1189
+ GetTaskResultSchema,
1190
+ ListTasksResultSchema,
1191
+ CreateTaskResultSchema
1192
+ ]);
1193
+ const ServerRequestSchema = union([
1194
+ PingRequestSchema,
1195
+ CreateMessageRequestSchema,
1196
+ ElicitRequestSchema,
1197
+ ListRootsRequestSchema,
1198
+ GetTaskRequestSchema,
1199
+ GetTaskPayloadRequestSchema,
1200
+ ListTasksRequestSchema,
1201
+ CancelTaskRequestSchema
1202
+ ]);
1203
+ const ServerNotificationSchema = union([
1204
+ CancelledNotificationSchema,
1205
+ ProgressNotificationSchema,
1206
+ LoggingMessageNotificationSchema,
1207
+ ResourceUpdatedNotificationSchema,
1208
+ ResourceListChangedNotificationSchema,
1209
+ ToolListChangedNotificationSchema,
1210
+ PromptListChangedNotificationSchema,
1211
+ TaskStatusNotificationSchema,
1212
+ ElicitationCompleteNotificationSchema
1213
+ ]);
1214
+ const ServerResultSchema = union([
1215
+ EmptyResultSchema,
1216
+ InitializeResultSchema,
1217
+ CompleteResultSchema,
1218
+ GetPromptResultSchema,
1219
+ ListPromptsResultSchema,
1220
+ ListResourcesResultSchema,
1221
+ ListResourceTemplatesResultSchema,
1222
+ ReadResourceResultSchema,
1223
+ CallToolResultSchema,
1224
+ ListToolsResultSchema,
1225
+ GetTaskResultSchema,
1226
+ ListTasksResultSchema,
1227
+ CreateTaskResultSchema
1228
+ ]);
1229
+ var McpError = class McpError extends Error {
1230
+ constructor(code, message, data) {
1231
+ super(`MCP error ${code}: ${message}`);
1232
+ this.code = code;
1233
+ this.data = data;
1234
+ this.name = "McpError";
1235
+ }
1236
+ /**
1237
+ * Factory method to create the appropriate error type based on the error code and data
1238
+ */
1239
+ static fromError(code, message, data) {
1240
+ if (code === ErrorCode.UrlElicitationRequired && data) {
1241
+ const errorData = data;
1242
+ if (errorData.elicitations) return new UrlElicitationRequiredError(errorData.elicitations, message);
1243
+ }
1244
+ return new McpError(code, message, data);
1245
+ }
1246
+ };
1247
+ /**
1248
+ * Specialized error type when a tool requires a URL mode elicitation.
1249
+ * This makes it nicer for the client to handle since there is specific data to work with instead of just a code to check against.
1250
+ */
1251
+ var UrlElicitationRequiredError = class extends McpError {
1252
+ constructor(elicitations, message = `URL elicitation${elicitations.length > 1 ? "s" : ""} required`) {
1253
+ super(ErrorCode.UrlElicitationRequired, message, { elicitations });
1254
+ }
1255
+ get elicitations() {
1256
+ return this.data?.elicitations ?? [];
1257
+ }
1258
+ };
1259
+
1260
+ //#endregion
1261
+ export { CallToolRequestSchema, CallToolResultSchema, CancelTaskRequestSchema, CancelTaskResultSchema, CancelledNotificationSchema, CompleteRequestSchema, CreateMessageResultSchema, CreateMessageResultWithToolsSchema, CreateTaskResultSchema, ElicitResultSchema, EmptyResultSchema, ErrorCode, GetPromptRequestSchema, GetTaskPayloadRequestSchema, GetTaskRequestSchema, GetTaskResultSchema, InitializeRequestSchema, InitializedNotificationSchema, JSONRPCMessageSchema, LATEST_PROTOCOL_VERSION, ListPromptsRequestSchema, ListResourceTemplatesRequestSchema, ListResourcesRequestSchema, ListRootsResultSchema, ListTasksRequestSchema, ListTasksResultSchema, ListToolsRequestSchema, LoggingLevelSchema, McpError, PingRequestSchema, ProgressNotificationSchema, RELATED_TASK_META_KEY, ReadResourceRequestSchema, SUPPORTED_PROTOCOL_VERSIONS, SetLevelRequestSchema, TaskStatusNotificationSchema, assertCompleteRequestPrompt, assertCompleteRequestResourceTemplate, isJSONRPCErrorResponse, isJSONRPCNotification, isJSONRPCRequest, isJSONRPCResultResponse, isTaskAugmentedRequestParams };
1262
+ //# sourceMappingURL=types.js.map