mcp-use 2.0.0-beta.4 → 2.0.0-beta.41
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.
- package/dist/bin.js +1 -179
- package/dist/branding.d.ts +81 -0
- package/dist/chunk-GX6PGIEO.js +630 -0
- package/dist/chunk-JMDHTN6N.js +1 -0
- package/dist/chunk-OJF6B5EU.js +1 -0
- package/dist/chunk-PSKSL567.js +1 -0
- package/dist/chunk-WYBJYZJB.js +1 -0
- package/dist/chunk-Y26DNVWA.js +3 -0
- package/dist/chunk-YBGMCISI.js +2 -0
- package/dist/chunk-ZMU5USAZ.js +1 -0
- package/dist/completable.d.ts +9 -1
- package/dist/config.d.ts +134 -73
- package/dist/context.d.ts +147 -11
- package/dist/fetch-app.d.ts +26 -8
- package/dist/index.d.ts +39 -11
- package/dist/index.js +32 -1818
- package/dist/internal/resource-completion.js +1 -0
- package/dist/internal/usage.js +1 -0
- package/dist/landing-handler-TG6LVQBI.js +1 -0
- package/dist/landing-handler.d.ts +23 -0
- package/dist/landing.d.ts +66 -0
- package/dist/landing.js +1 -0
- package/dist/listen-address.d.ts +8 -0
- package/dist/logging.d.ts +0 -1
- package/dist/mcp-proxy-NETCUGUD.js +2 -0
- package/dist/mcp-proxy.d.ts +158 -0
- package/dist/middleware/cors.d.ts +10 -0
- package/dist/middleware/mcp-middleware.d.ts +183 -0
- package/dist/mount-mcp.d.ts +0 -5
- package/dist/next/config.d.ts +38 -0
- package/dist/next/handler.d.ts +16 -0
- package/dist/next/index.d.ts +4 -0
- package/dist/next/index.js +1 -0
- package/dist/node-bridge.d.ts +0 -1
- package/dist/node-bridge.js +1 -151
- package/dist/oauth/adapters.d.ts +0 -1
- package/dist/oauth/auth0.d.ts +0 -1
- package/dist/oauth/auth0.js +1 -61
- package/dist/oauth/better-auth.d.ts +28 -0
- package/dist/oauth/better-auth.js +1 -0
- package/dist/oauth/clerk.d.ts +0 -1
- package/dist/oauth/clerk.js +1 -70
- package/dist/oauth/guards.d.ts +0 -1
- package/dist/oauth/index.d.ts +0 -1
- package/dist/oauth/index.js +1 -27
- package/dist/oauth/internal.d.ts +0 -1
- package/dist/oauth/jwt.d.ts +0 -1
- package/dist/oauth/keycloak.d.ts +0 -1
- package/dist/oauth/keycloak.js +1 -94
- package/dist/oauth/provider.d.ts +0 -1
- package/dist/oauth/supabase.d.ts +0 -1
- package/dist/oauth/supabase.js +1 -101
- package/dist/oauth/workos.d.ts +0 -1
- package/dist/oauth/workos.js +1 -77
- package/dist/openapi/index.d.ts +0 -1
- package/dist/openapi/index.js +1 -7
- package/dist/openapi/types.d.ts +0 -1
- package/dist/prompts.d.ts +7 -4
- package/dist/public-route-DAQJGS6K.js +1 -0
- package/dist/react/components/error-boundary.d.ts +0 -1
- package/dist/react/components/image.d.ts +0 -1
- package/dist/react/components/model-context.d.ts +9 -15
- package/dist/react/components/theme-provider.d.ts +3 -1
- package/dist/react/components/view-controls.d.ts +0 -1
- package/dist/react/hooks/use-call-tool.d.ts +29 -12
- package/dist/react/hooks/use-display-mode.d.ts +0 -1
- package/dist/react/hooks/use-files.d.ts +24 -0
- package/dist/react/hooks/use-host-context.d.ts +5 -1
- package/dist/react/hooks/use-open-external.d.ts +0 -1
- package/dist/react/hooks/use-send-follow-up.d.ts +0 -1
- package/dist/react/hooks/use-send-size-changed.d.ts +0 -1
- package/dist/react/hooks/use-tool-context.d.ts +0 -1
- package/dist/react/hooks/use-view-state.d.ts +23 -0
- package/dist/react/hooks/use-view-theme.d.ts +0 -1
- package/dist/react/hooks/use-view-tool.d.ts +0 -1
- package/dist/react/index.d.ts +4 -2
- package/dist/react/index.js +346 -85
- package/dist/react/public-assets.d.ts +0 -1
- package/dist/react/runtime/bootstrap-view.d.ts +0 -1
- package/dist/react/runtime/model-context-store.d.ts +34 -69
- package/dist/react/runtime/view-config.d.ts +0 -1
- package/dist/react/runtime/view-runtime-context.d.ts +0 -1
- package/dist/react/runtime/view-runtime.d.ts +25 -3
- package/dist/react/types/file-types.d.ts +15 -0
- package/dist/react/types/host-types.d.ts +0 -1
- package/dist/react/types/register.d.ts +11 -4
- package/dist/react/types/result-types.d.ts +0 -1
- package/dist/resource-completion.d.ts +11 -0
- package/dist/resources.d.ts +72 -9
- package/dist/response-conversion.d.ts +25 -0
- package/dist/response-helpers.d.ts +223 -0
- package/dist/server.d.ts +166 -34
- package/dist/tools.d.ts +26 -15
- package/dist/usage.d.ts +11 -0
- package/dist/views/capabilities.d.ts +0 -1
- package/dist/views/constants.d.ts +1 -2
- package/dist/views/csp-env.d.ts +0 -1
- package/dist/views/document.d.ts +9 -11
- package/dist/views/index.d.ts +0 -1
- package/dist/views/origin.d.ts +0 -1
- package/dist/views/public-route.d.ts +10 -5
- package/dist/views/register.d.ts +1 -2
- package/dist/views/routes.d.ts +6 -3
- package/dist/views/types.d.ts +19 -15
- package/dist/views/wire.d.ts +14 -10
- package/package.json +34 -20
- package/dist/.tsbuildinfo +0 -1
- package/dist/bin/args.d.ts +0 -61
- package/dist/bin/args.d.ts.map +0 -1
- package/dist/bin/main.d.ts +0 -32
- package/dist/bin/main.d.ts.map +0 -1
- package/dist/bin/start.d.ts +0 -40
- package/dist/bin/start.d.ts.map +0 -1
- package/dist/bin.d.ts +0 -3
- package/dist/bin.d.ts.map +0 -1
- package/dist/bin.js.map +0 -1
- package/dist/chunk-AATFAERC.js +0 -384
- package/dist/chunk-AATFAERC.js.map +0 -1
- package/dist/chunk-AQ2ZZM2P.js +0 -193
- package/dist/chunk-AQ2ZZM2P.js.map +0 -1
- package/dist/chunk-DPL7OEXC.js +0 -518
- package/dist/chunk-DPL7OEXC.js.map +0 -1
- package/dist/chunk-IG2BCCMU.js +0 -98
- package/dist/chunk-IG2BCCMU.js.map +0 -1
- package/dist/chunk-RQRT27Q3.js +0 -454
- package/dist/chunk-RQRT27Q3.js.map +0 -1
- package/dist/chunk-SFI2T6TE.js +0 -171
- package/dist/chunk-SFI2T6TE.js.map +0 -1
- package/dist/chunk-VV2P4ZFZ.js +0 -187
- package/dist/chunk-VV2P4ZFZ.js.map +0 -1
- package/dist/chunk-XUD22N3Y.js +0 -156
- package/dist/chunk-XUD22N3Y.js.map +0 -1
- package/dist/chunk-ZMIKQPSO.js +0 -151
- package/dist/chunk-ZMIKQPSO.js.map +0 -1
- package/dist/cli/build.d.ts +0 -61
- package/dist/cli/build.d.ts.map +0 -1
- package/dist/cli/dev-api.d.ts +0 -49
- package/dist/cli/dev-api.d.ts.map +0 -1
- package/dist/cli/dev.d.ts +0 -101
- package/dist/cli/dev.d.ts.map +0 -1
- package/dist/cli/entry.d.ts +0 -31
- package/dist/cli/entry.d.ts.map +0 -1
- package/dist/cli/index.d.ts +0 -17
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/port.d.ts +0 -30
- package/dist/cli/port.d.ts.map +0 -1
- package/dist/cli/tunnel.d.ts +0 -46
- package/dist/cli/tunnel.d.ts.map +0 -1
- package/dist/cli/views-bindings.d.ts +0 -30
- package/dist/cli/views-bindings.d.ts.map +0 -1
- package/dist/cli/views-plugin.d.ts +0 -47
- package/dist/cli/views-plugin.d.ts.map +0 -1
- package/dist/cli/views.d.ts +0 -75
- package/dist/cli/views.d.ts.map +0 -1
- package/dist/cli/vite-config.d.ts +0 -21
- package/dist/cli/vite-config.d.ts.map +0 -1
- package/dist/cli/workspace.d.ts +0 -107
- package/dist/cli/workspace.d.ts.map +0 -1
- package/dist/commands/build.d.ts +0 -8
- package/dist/commands/build.d.ts.map +0 -1
- package/dist/commands/build.js +0 -363
- package/dist/commands/build.js.map +0 -1
- package/dist/commands/client.d.ts +0 -22
- package/dist/commands/client.d.ts.map +0 -1
- package/dist/commands/client.js +0 -14
- package/dist/commands/client.js.map +0 -1
- package/dist/commands/cloud-api.d.ts +0 -70
- package/dist/commands/cloud-api.d.ts.map +0 -1
- package/dist/commands/deploy.d.ts +0 -3
- package/dist/commands/deploy.d.ts.map +0 -1
- package/dist/commands/deploy.js +0 -242
- package/dist/commands/deploy.js.map +0 -1
- package/dist/commands/deployments.d.ts +0 -3
- package/dist/commands/deployments.d.ts.map +0 -1
- package/dist/commands/deployments.js +0 -213
- package/dist/commands/deployments.js.map +0 -1
- package/dist/commands/dev.d.ts +0 -8
- package/dist/commands/dev.d.ts.map +0 -1
- package/dist/commands/dev.js +0 -652
- package/dist/commands/dev.js.map +0 -1
- package/dist/commands/identity.d.ts +0 -3
- package/dist/commands/identity.d.ts.map +0 -1
- package/dist/commands/identity.js +0 -192
- package/dist/commands/identity.js.map +0 -1
- package/dist/commands/load-client.d.ts +0 -11
- package/dist/commands/load-client.d.ts.map +0 -1
- package/dist/commands/organizations.d.ts +0 -3
- package/dist/commands/organizations.d.ts.map +0 -1
- package/dist/commands/organizations.js +0 -97
- package/dist/commands/organizations.js.map +0 -1
- package/dist/commands/screenshot.d.ts +0 -3
- package/dist/commands/screenshot.d.ts.map +0 -1
- package/dist/commands/screenshot.js +0 -463
- package/dist/commands/screenshot.js.map +0 -1
- package/dist/commands/servers.d.ts +0 -3
- package/dist/commands/servers.d.ts.map +0 -1
- package/dist/commands/servers.js +0 -278
- package/dist/commands/servers.js.map +0 -1
- package/dist/commands/shared.d.ts +0 -44
- package/dist/commands/shared.d.ts.map +0 -1
- package/dist/commands/skills.d.ts +0 -3
- package/dist/commands/skills.d.ts.map +0 -1
- package/dist/commands/skills.js +0 -84
- package/dist/commands/skills.js.map +0 -1
- package/dist/commands/start.d.ts +0 -8
- package/dist/commands/start.d.ts.map +0 -1
- package/dist/commands/start.js +0 -72
- package/dist/commands/start.js.map +0 -1
- package/dist/completable.d.ts.map +0 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/context.d.ts.map +0 -1
- package/dist/fetch-app.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/inspector-shell.d.ts +0 -81
- package/dist/inspector-shell.d.ts.map +0 -1
- package/dist/logging.d.ts.map +0 -1
- package/dist/mount-mcp.d.ts.map +0 -1
- package/dist/node-bridge.d.ts.map +0 -1
- package/dist/node-bridge.js.map +0 -1
- package/dist/oauth/adapters.d.ts.map +0 -1
- package/dist/oauth/auth0.d.ts.map +0 -1
- package/dist/oauth/auth0.js.map +0 -1
- package/dist/oauth/clerk.d.ts.map +0 -1
- package/dist/oauth/clerk.js.map +0 -1
- package/dist/oauth/guards.d.ts.map +0 -1
- package/dist/oauth/index.d.ts.map +0 -1
- package/dist/oauth/index.js.map +0 -1
- package/dist/oauth/internal.d.ts.map +0 -1
- package/dist/oauth/jwt.d.ts.map +0 -1
- package/dist/oauth/keycloak.d.ts.map +0 -1
- package/dist/oauth/keycloak.js.map +0 -1
- package/dist/oauth/provider.d.ts.map +0 -1
- package/dist/oauth/supabase.d.ts.map +0 -1
- package/dist/oauth/supabase.js.map +0 -1
- package/dist/oauth/workos.d.ts.map +0 -1
- package/dist/oauth/workos.js.map +0 -1
- package/dist/openapi/index.d.ts.map +0 -1
- package/dist/openapi/index.js.map +0 -1
- package/dist/openapi/types.d.ts.map +0 -1
- package/dist/prompts.d.ts.map +0 -1
- package/dist/public-route-7IK5D7V7.js +0 -60
- package/dist/public-route-7IK5D7V7.js.map +0 -1
- package/dist/react/components/error-boundary.d.ts.map +0 -1
- package/dist/react/components/image.d.ts.map +0 -1
- package/dist/react/components/model-context.d.ts.map +0 -1
- package/dist/react/components/theme-provider.d.ts.map +0 -1
- package/dist/react/components/view-controls.d.ts.map +0 -1
- package/dist/react/hooks/use-call-tool.d.ts.map +0 -1
- package/dist/react/hooks/use-display-mode.d.ts.map +0 -1
- package/dist/react/hooks/use-host-context.d.ts.map +0 -1
- package/dist/react/hooks/use-open-external.d.ts.map +0 -1
- package/dist/react/hooks/use-send-follow-up.d.ts.map +0 -1
- package/dist/react/hooks/use-send-size-changed.d.ts.map +0 -1
- package/dist/react/hooks/use-tool-context.d.ts.map +0 -1
- package/dist/react/hooks/use-view-theme.d.ts.map +0 -1
- package/dist/react/hooks/use-view-tool.d.ts.map +0 -1
- package/dist/react/index.d.ts.map +0 -1
- package/dist/react/index.js.map +0 -1
- package/dist/react/public-assets.d.ts.map +0 -1
- package/dist/react/runtime/bootstrap-view.d.ts.map +0 -1
- package/dist/react/runtime/model-context-store.d.ts.map +0 -1
- package/dist/react/runtime/view-config.d.ts.map +0 -1
- package/dist/react/runtime/view-runtime-context.d.ts.map +0 -1
- package/dist/react/runtime/view-runtime.d.ts.map +0 -1
- package/dist/react/types/host-types.d.ts.map +0 -1
- package/dist/react/types/register.d.ts.map +0 -1
- package/dist/react/types/result-types.d.ts.map +0 -1
- package/dist/resources.d.ts.map +0 -1
- package/dist/server.d.ts.map +0 -1
- package/dist/tools.d.ts.map +0 -1
- package/dist/views/capabilities.d.ts.map +0 -1
- package/dist/views/constants.d.ts.map +0 -1
- package/dist/views/csp-env.d.ts.map +0 -1
- package/dist/views/document.d.ts.map +0 -1
- package/dist/views/index.d.ts.map +0 -1
- package/dist/views/origin.d.ts.map +0 -1
- package/dist/views/public-route.d.ts.map +0 -1
- package/dist/views/register.d.ts.map +0 -1
- package/dist/views/routes.d.ts.map +0 -1
- package/dist/views/types.d.ts.map +0 -1
- package/dist/views/wire.d.ts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/LICENSE +0 -216
- package/node_modules/@modelcontextprotocol/client/README.md +0 -26
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-Asx17_Co.mjs +0 -7069
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-Asx17_Co.mjs.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-B7GnTXYx.d.mts +0 -1054
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-B7GnTXYx.d.mts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-B_4czhCS.d.cts +0 -1054
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-B_4czhCS.d.cts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-DNzBrkxq.cjs +0 -7086
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-DNzBrkxq.cjs.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-D9GAttn8.d.cts +0 -59
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-D9GAttn8.d.cts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-DbU8BxXO.mjs +0 -970
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-DbU8BxXO.mjs.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-Djgwc46-.cjs +0 -976
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-Djgwc46-.cjs.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-Xtj52JOa.d.mts +0 -59
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-Xtj52JOa.d.mts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/chunk-Bnu9O96Y.cjs +0 -60
- package/node_modules/@modelcontextprotocol/client/dist/chunk-Br0eD_fh.mjs +0 -42
- package/node_modules/@modelcontextprotocol/client/dist/index-ZagFkUbt.d.mts +0 -2675
- package/node_modules/@modelcontextprotocol/client/dist/index-ZagFkUbt.d.mts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/index-gN3EXmil.d.cts +0 -2678
- package/node_modules/@modelcontextprotocol/client/dist/index-gN3EXmil.d.cts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/index.cjs +0 -5427
- package/node_modules/@modelcontextprotocol/client/dist/index.cjs.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/index.d.cts +0 -3196
- package/node_modules/@modelcontextprotocol/client/dist/index.d.cts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/index.d.mts +0 -3196
- package/node_modules/@modelcontextprotocol/client/dist/index.d.mts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/index.mjs +0 -5224
- package/node_modules/@modelcontextprotocol/client/dist/index.mjs.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.cjs +0 -14
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.cjs.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.cts +0 -13
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.cts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.mts +0 -13
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.mts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.mjs +0 -13
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.mjs.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.cjs +0 -14
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.cjs.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.cts +0 -13
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.cts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.mts +0 -13
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.mts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.mjs +0 -13
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.mjs.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.cjs +0 -21
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.cjs.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.cts +0 -13
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.cts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.mts +0 -13
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.mts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.mjs +0 -20
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.mjs.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/src-BzzZSQyL.cjs +0 -7331
- package/node_modules/@modelcontextprotocol/client/dist/src-BzzZSQyL.cjs.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/src-DGeA9On3.mjs +0 -6963
- package/node_modules/@modelcontextprotocol/client/dist/src-DGeA9On3.mjs.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/stdio.cjs +0 -181
- package/node_modules/@modelcontextprotocol/client/dist/stdio.cjs.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/stdio.d.cts +0 -87
- package/node_modules/@modelcontextprotocol/client/dist/stdio.d.cts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/stdio.d.mts +0 -87
- package/node_modules/@modelcontextprotocol/client/dist/stdio.d.mts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/stdio.mjs +0 -176
- package/node_modules/@modelcontextprotocol/client/dist/stdio.mjs.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/types-BDNQEPSs.d.mts +0 -1099
- package/node_modules/@modelcontextprotocol/client/dist/types-BDNQEPSs.d.mts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/types-DsbMXNFL.d.cts +0 -1099
- package/node_modules/@modelcontextprotocol/client/dist/types-DsbMXNFL.d.cts.map +0 -1
- package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.cjs +0 -5
- package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.d.cts +0 -2
- package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.d.mts +0 -2
- package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.mjs +0 -3
- package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.cjs +0 -3
- package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.d.cts +0 -2
- package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.d.mts +0 -2
- package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.mjs +0 -3
- package/node_modules/@modelcontextprotocol/client/package.json +0 -166
- package/node_modules/@modelcontextprotocol/core/LICENSE +0 -216
- package/node_modules/@modelcontextprotocol/core/README.md +0 -40
- package/node_modules/@modelcontextprotocol/core/dist/auth-BUWfrB3C.d.cts +0 -8198
- package/node_modules/@modelcontextprotocol/core/dist/auth-BUWfrB3C.d.cts.map +0 -1
- package/node_modules/@modelcontextprotocol/core/dist/auth-CEFpHq32.cjs +0 -2862
- package/node_modules/@modelcontextprotocol/core/dist/auth-CEFpHq32.cjs.map +0 -1
- package/node_modules/@modelcontextprotocol/core/dist/auth-CNbu4K4a.d.mts +0 -8198
- package/node_modules/@modelcontextprotocol/core/dist/auth-CNbu4K4a.d.mts.map +0 -1
- package/node_modules/@modelcontextprotocol/core/dist/auth-DFgbUATV.mjs +0 -1653
- package/node_modules/@modelcontextprotocol/core/dist/auth-DFgbUATV.mjs.map +0 -1
- package/node_modules/@modelcontextprotocol/core/dist/index.cjs +0 -174
- package/node_modules/@modelcontextprotocol/core/dist/index.d.cts +0 -2
- package/node_modules/@modelcontextprotocol/core/dist/index.d.mts +0 -2
- package/node_modules/@modelcontextprotocol/core/dist/index.mjs +0 -3
- package/node_modules/@modelcontextprotocol/core/dist/internal.cjs +0 -199
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts +0 -87
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts.map +0 -1
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts +0 -87
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts.map +0 -1
- package/node_modules/@modelcontextprotocol/core/dist/internal.mjs +0 -3
- package/node_modules/@modelcontextprotocol/core/package.json +0 -85
- package/node_modules/jose/LICENSE.md +0 -21
- package/node_modules/jose/README.md +0 -153
- package/node_modules/jose/dist/types/index.d.ts +0 -55
- package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +0 -31
- package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +0 -65
- package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +0 -31
- package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +0 -83
- package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +0 -31
- package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +0 -74
- package/node_modules/jose/dist/types/jwk/embedded.d.ts +0 -17
- package/node_modules/jose/dist/types/jwk/thumbprint.d.ts +0 -32
- package/node_modules/jose/dist/types/jwks/local.d.ts +0 -29
- package/node_modules/jose/dist/types/jwks/remote.d.ts +0 -237
- package/node_modules/jose/dist/types/jws/compact/sign.d.ts +0 -36
- package/node_modules/jose/dist/types/jws/compact/verify.d.ts +0 -33
- package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +0 -42
- package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +0 -33
- package/node_modules/jose/dist/types/jws/general/sign.d.ts +0 -53
- package/node_modules/jose/dist/types/jws/general/verify.d.ts +0 -33
- package/node_modules/jose/dist/types/jwt/decrypt.d.ts +0 -35
- package/node_modules/jose/dist/types/jwt/encrypt.d.ts +0 -91
- package/node_modules/jose/dist/types/jwt/sign.d.ts +0 -43
- package/node_modules/jose/dist/types/jwt/unsecured.d.ts +0 -43
- package/node_modules/jose/dist/types/jwt/verify.d.ts +0 -37
- package/node_modules/jose/dist/types/key/export.d.ts +0 -33
- package/node_modules/jose/dist/types/key/generate_key_pair.d.ts +0 -47
- package/node_modules/jose/dist/types/key/generate_secret.d.ts +0 -35
- package/node_modules/jose/dist/types/key/import.d.ts +0 -83
- package/node_modules/jose/dist/types/types.d.ts +0 -841
- package/node_modules/jose/dist/types/util/base64url.d.ts +0 -9
- package/node_modules/jose/dist/types/util/decode_jwt.d.ts +0 -18
- package/node_modules/jose/dist/types/util/decode_protected_header.d.ts +0 -17
- package/node_modules/jose/dist/types/util/errors.d.ts +0 -213
- package/node_modules/jose/dist/webapi/index.js +0 -32
- package/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +0 -27
- package/node_modules/jose/dist/webapi/jwe/compact/encrypt.js +0 -27
- package/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +0 -165
- package/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +0 -169
- package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +0 -31
- package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +0 -187
- package/node_modules/jose/dist/webapi/jwk/embedded.js +0 -17
- package/node_modules/jose/dist/webapi/jwk/thumbprint.js +0 -68
- package/node_modules/jose/dist/webapi/jwks/local.js +0 -119
- package/node_modules/jose/dist/webapi/jwks/remote.js +0 -179
- package/node_modules/jose/dist/webapi/jws/compact/sign.js +0 -18
- package/node_modules/jose/dist/webapi/jws/compact/verify.js +0 -21
- package/node_modules/jose/dist/webapi/jws/flattened/sign.js +0 -92
- package/node_modules/jose/dist/webapi/jws/flattened/verify.js +0 -120
- package/node_modules/jose/dist/webapi/jws/general/sign.js +0 -73
- package/node_modules/jose/dist/webapi/jws/general/verify.js +0 -24
- package/node_modules/jose/dist/webapi/jwt/decrypt.js +0 -23
- package/node_modules/jose/dist/webapi/jwt/encrypt.js +0 -108
- package/node_modules/jose/dist/webapi/jwt/sign.js +0 -52
- package/node_modules/jose/dist/webapi/jwt/unsecured.js +0 -63
- package/node_modules/jose/dist/webapi/jwt/verify.js +0 -15
- package/node_modules/jose/dist/webapi/key/export.js +0 -11
- package/node_modules/jose/dist/webapi/key/generate_key_pair.js +0 -97
- package/node_modules/jose/dist/webapi/key/generate_secret.js +0 -40
- package/node_modules/jose/dist/webapi/key/import.js +0 -57
- package/node_modules/jose/dist/webapi/lib/aesgcmkw.js +0 -16
- package/node_modules/jose/dist/webapi/lib/aeskw.js +0 -25
- package/node_modules/jose/dist/webapi/lib/asn1.js +0 -243
- package/node_modules/jose/dist/webapi/lib/base64.js +0 -22
- package/node_modules/jose/dist/webapi/lib/buffer_utils.js +0 -43
- package/node_modules/jose/dist/webapi/lib/cek.js +0 -19
- package/node_modules/jose/dist/webapi/lib/check_cek_length.js +0 -7
- package/node_modules/jose/dist/webapi/lib/check_iv_length.js +0 -7
- package/node_modules/jose/dist/webapi/lib/check_key_length.js +0 -8
- package/node_modules/jose/dist/webapi/lib/check_key_type.js +0 -122
- package/node_modules/jose/dist/webapi/lib/crypto_key.js +0 -143
- package/node_modules/jose/dist/webapi/lib/decrypt.js +0 -106
- package/node_modules/jose/dist/webapi/lib/decrypt_key_management.js +0 -127
- package/node_modules/jose/dist/webapi/lib/digest.js +0 -4
- package/node_modules/jose/dist/webapi/lib/ecdhes.js +0 -52
- package/node_modules/jose/dist/webapi/lib/encrypt.js +0 -74
- package/node_modules/jose/dist/webapi/lib/encrypt_key_management.js +0 -92
- package/node_modules/jose/dist/webapi/lib/get_sign_verify_key.js +0 -12
- package/node_modules/jose/dist/webapi/lib/invalid_key_input.js +0 -27
- package/node_modules/jose/dist/webapi/lib/is_disjoint.js +0 -21
- package/node_modules/jose/dist/webapi/lib/is_jwk.js +0 -6
- package/node_modules/jose/dist/webapi/lib/is_key_like.js +0 -17
- package/node_modules/jose/dist/webapi/lib/is_object.js +0 -14
- package/node_modules/jose/dist/webapi/lib/iv.js +0 -19
- package/node_modules/jose/dist/webapi/lib/jwk_to_key.js +0 -109
- package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +0 -238
- package/node_modules/jose/dist/webapi/lib/key_to_jwk.js +0 -31
- package/node_modules/jose/dist/webapi/lib/normalize_key.js +0 -176
- package/node_modules/jose/dist/webapi/lib/pbes2kw.js +0 -39
- package/node_modules/jose/dist/webapi/lib/private_symbols.js +0 -1
- package/node_modules/jose/dist/webapi/lib/rsaes.js +0 -24
- package/node_modules/jose/dist/webapi/lib/sign.js +0 -9
- package/node_modules/jose/dist/webapi/lib/subtle_dsa.js +0 -31
- package/node_modules/jose/dist/webapi/lib/validate_algorithms.js +0 -10
- package/node_modules/jose/dist/webapi/lib/validate_crit.js +0 -33
- package/node_modules/jose/dist/webapi/lib/verify.js +0 -14
- package/node_modules/jose/dist/webapi/util/base64url.js +0 -30
- package/node_modules/jose/dist/webapi/util/decode_jwt.js +0 -32
- package/node_modules/jose/dist/webapi/util/decode_protected_header.js +0 -34
- package/node_modules/jose/dist/webapi/util/errors.js +0 -99
- package/node_modules/jose/package.json +0 -200
- package/node_modules/zod/LICENSE +0 -21
- package/node_modules/zod/README.md +0 -191
- package/node_modules/zod/index.cjs +0 -33
- package/node_modules/zod/index.d.cts +0 -4
- package/node_modules/zod/index.d.ts +0 -4
- package/node_modules/zod/index.js +0 -4
- package/node_modules/zod/locales/index.cjs +0 -17
- package/node_modules/zod/locales/index.d.cts +0 -1
- package/node_modules/zod/locales/index.d.ts +0 -1
- package/node_modules/zod/locales/index.js +0 -1
- package/node_modules/zod/locales/package.json +0 -7
- package/node_modules/zod/mini/index.cjs +0 -32
- package/node_modules/zod/mini/index.d.cts +0 -3
- package/node_modules/zod/mini/index.d.ts +0 -3
- package/node_modules/zod/mini/index.js +0 -3
- package/node_modules/zod/mini/package.json +0 -7
- package/node_modules/zod/package.json +0 -135
- package/node_modules/zod/src/index.ts +0 -4
- package/node_modules/zod/src/locales/index.ts +0 -1
- package/node_modules/zod/src/mini/index.ts +0 -3
- package/node_modules/zod/src/v3/ZodError.ts +0 -330
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +0 -58
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -80
- package/node_modules/zod/src/v3/benchmarks/index.ts +0 -59
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +0 -57
- package/node_modules/zod/src/v3/benchmarks/object.ts +0 -69
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +0 -162
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +0 -63
- package/node_modules/zod/src/v3/benchmarks/string.ts +0 -55
- package/node_modules/zod/src/v3/benchmarks/union.ts +0 -80
- package/node_modules/zod/src/v3/errors.ts +0 -13
- package/node_modules/zod/src/v3/external.ts +0 -6
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +0 -17
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +0 -8
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +0 -176
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +0 -34
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +0 -2
- package/node_modules/zod/src/v3/helpers/util.ts +0 -224
- package/node_modules/zod/src/v3/index.ts +0 -4
- package/node_modules/zod/src/v3/locales/en.ts +0 -124
- package/node_modules/zod/src/v3/standard-schema.ts +0 -113
- package/node_modules/zod/src/v3/tests/Mocker.ts +0 -54
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +0 -157
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +0 -28
- package/node_modules/zod/src/v3/tests/array.test.ts +0 -71
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +0 -388
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +0 -46
- package/node_modules/zod/src/v3/tests/base.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/bigint.test.ts +0 -55
- package/node_modules/zod/src/v3/tests/branded.test.ts +0 -53
- package/node_modules/zod/src/v3/tests/catch.test.ts +0 -220
- package/node_modules/zod/src/v3/tests/coerce.test.ts +0 -133
- package/node_modules/zod/src/v3/tests/complex.test.ts +0 -70
- package/node_modules/zod/src/v3/tests/custom.test.ts +0 -31
- package/node_modules/zod/src/v3/tests/date.test.ts +0 -32
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +0 -186
- package/node_modules/zod/src/v3/tests/default.test.ts +0 -112
- package/node_modules/zod/src/v3/tests/description.test.ts +0 -33
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +0 -315
- package/node_modules/zod/src/v3/tests/enum.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/error.test.ts +0 -551
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +0 -87
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -21
- package/node_modules/zod/src/v3/tests/function.test.ts +0 -261
- package/node_modules/zod/src/v3/tests/generics.test.ts +0 -48
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +0 -37
- package/node_modules/zod/src/v3/tests/intersection.test.ts +0 -110
- package/node_modules/zod/src/v3/tests/language-server.source.ts +0 -76
- package/node_modules/zod/src/v3/tests/language-server.test.ts +0 -207
- package/node_modules/zod/src/v3/tests/literal.test.ts +0 -36
- package/node_modules/zod/src/v3/tests/map.test.ts +0 -110
- package/node_modules/zod/src/v3/tests/masking.test.ts +0 -4
- package/node_modules/zod/src/v3/tests/mocker.test.ts +0 -19
- package/node_modules/zod/src/v3/tests/nan.test.ts +0 -24
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +0 -87
- package/node_modules/zod/src/v3/tests/nullable.test.ts +0 -42
- package/node_modules/zod/src/v3/tests/number.test.ts +0 -176
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/object.test.ts +0 -434
- package/node_modules/zod/src/v3/tests/optional.test.ts +0 -42
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +0 -23
- package/node_modules/zod/src/v3/tests/parser.test.ts +0 -41
- package/node_modules/zod/src/v3/tests/partials.test.ts +0 -243
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +0 -111
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +0 -186
- package/node_modules/zod/src/v3/tests/primitive.test.ts +0 -440
- package/node_modules/zod/src/v3/tests/promise.test.ts +0 -90
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -194
- package/node_modules/zod/src/v3/tests/record.test.ts +0 -171
- package/node_modules/zod/src/v3/tests/recursive.test.ts +0 -197
- package/node_modules/zod/src/v3/tests/refine.test.ts +0 -313
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +0 -27
- package/node_modules/zod/src/v3/tests/set.test.ts +0 -142
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +0 -83
- package/node_modules/zod/src/v3/tests/string.test.ts +0 -916
- package/node_modules/zod/src/v3/tests/transformer.test.ts +0 -233
- package/node_modules/zod/src/v3/tests/tuple.test.ts +0 -90
- package/node_modules/zod/src/v3/tests/unions.test.ts +0 -57
- package/node_modules/zod/src/v3/tests/validations.test.ts +0 -133
- package/node_modules/zod/src/v3/tests/void.test.ts +0 -15
- package/node_modules/zod/src/v3/types.ts +0 -5138
- package/node_modules/zod/src/v4/classic/checks.ts +0 -32
- package/node_modules/zod/src/v4/classic/coerce.ts +0 -27
- package/node_modules/zod/src/v4/classic/compat.ts +0 -70
- package/node_modules/zod/src/v4/classic/errors.ts +0 -82
- package/node_modules/zod/src/v4/classic/external.ts +0 -52
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +0 -659
- package/node_modules/zod/src/v4/classic/index.ts +0 -5
- package/node_modules/zod/src/v4/classic/iso.ts +0 -90
- package/node_modules/zod/src/v4/classic/parse.ts +0 -82
- package/node_modules/zod/src/v4/classic/schemas.ts +0 -2672
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +0 -26
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +0 -59
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +0 -264
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +0 -216
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +0 -381
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +0 -7
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +0 -54
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +0 -106
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +0 -326
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +0 -20
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +0 -573
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +0 -703
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +0 -160
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -374
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +0 -40
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +0 -62
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -302
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +0 -409
- package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +0 -27
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +0 -32
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +0 -197
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -694
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +0 -285
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +0 -807
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +0 -711
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +0 -96
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -179
- package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +0 -26
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +0 -895
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +0 -360
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +0 -72
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +0 -39
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +0 -939
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -60
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -198
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +0 -46
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +0 -109
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +0 -227
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +0 -117
- package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +0 -29
- package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +0 -24
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +0 -330
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +0 -21
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +0 -168
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +0 -101
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +0 -22
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +0 -325
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +0 -717
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +0 -333
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +0 -450
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -211
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +0 -101
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +0 -74
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +0 -26
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +0 -351
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +0 -175
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +0 -23
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -252
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +0 -717
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -631
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +0 -633
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +0 -243
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +0 -181
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -134
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +0 -125
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +0 -1224
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +0 -106
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -771
- package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +0 -438
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -3125
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +0 -378
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -496
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +0 -273
- package/node_modules/zod/src/v4/classic/tests/url.test.ts +0 -13
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +0 -283
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +0 -12
- package/node_modules/zod/src/v4/core/api.ts +0 -1823
- package/node_modules/zod/src/v4/core/checks.ts +0 -1293
- package/node_modules/zod/src/v4/core/config.ts +0 -15
- package/node_modules/zod/src/v4/core/core.ts +0 -153
- package/node_modules/zod/src/v4/core/doc.ts +0 -44
- package/node_modules/zod/src/v4/core/errors.ts +0 -455
- package/node_modules/zod/src/v4/core/index.ts +0 -16
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +0 -126
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +0 -666
- package/node_modules/zod/src/v4/core/json-schema.ts +0 -147
- package/node_modules/zod/src/v4/core/parse.ts +0 -195
- package/node_modules/zod/src/v4/core/regexes.ts +0 -190
- package/node_modules/zod/src/v4/core/registries.ts +0 -105
- package/node_modules/zod/src/v4/core/schemas.ts +0 -4730
- package/node_modules/zod/src/v4/core/standard-schema.ts +0 -159
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +0 -59
- package/node_modules/zod/src/v4/core/tests/index.test.ts +0 -46
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +0 -124
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +0 -215
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +0 -181
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +0 -72
- package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +0 -379
- package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +0 -163
- package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +0 -46
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +0 -128
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +0 -105
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +0 -125
- package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +0 -45
- package/node_modules/zod/src/v4/core/to-json-schema.ts +0 -622
- package/node_modules/zod/src/v4/core/util.ts +0 -983
- package/node_modules/zod/src/v4/core/versions.ts +0 -5
- package/node_modules/zod/src/v4/core/zsf.ts +0 -323
- package/node_modules/zod/src/v4/index.ts +0 -4
- package/node_modules/zod/src/v4/locales/ar.ts +0 -115
- package/node_modules/zod/src/v4/locales/az.ts +0 -111
- package/node_modules/zod/src/v4/locales/be.ts +0 -176
- package/node_modules/zod/src/v4/locales/bg.ts +0 -128
- package/node_modules/zod/src/v4/locales/ca.ts +0 -116
- package/node_modules/zod/src/v4/locales/cs.ts +0 -118
- package/node_modules/zod/src/v4/locales/da.ts +0 -123
- package/node_modules/zod/src/v4/locales/de.ts +0 -116
- package/node_modules/zod/src/v4/locales/el.ts +0 -121
- package/node_modules/zod/src/v4/locales/en.ts +0 -123
- package/node_modules/zod/src/v4/locales/eo.ts +0 -118
- package/node_modules/zod/src/v4/locales/es.ts +0 -141
- package/node_modules/zod/src/v4/locales/fa.ts +0 -126
- package/node_modules/zod/src/v4/locales/fi.ts +0 -121
- package/node_modules/zod/src/v4/locales/fr-CA.ts +0 -116
- package/node_modules/zod/src/v4/locales/fr.ts +0 -132
- package/node_modules/zod/src/v4/locales/he.ts +0 -246
- package/node_modules/zod/src/v4/locales/hr.ts +0 -131
- package/node_modules/zod/src/v4/locales/hu.ts +0 -117
- package/node_modules/zod/src/v4/locales/hy.ts +0 -164
- package/node_modules/zod/src/v4/locales/id.ts +0 -115
- package/node_modules/zod/src/v4/locales/index.ts +0 -52
- package/node_modules/zod/src/v4/locales/is.ts +0 -119
- package/node_modules/zod/src/v4/locales/it.ts +0 -116
- package/node_modules/zod/src/v4/locales/ja.ts +0 -114
- package/node_modules/zod/src/v4/locales/ka.ts +0 -123
- package/node_modules/zod/src/v4/locales/kh.ts +0 -7
- package/node_modules/zod/src/v4/locales/km.ts +0 -119
- package/node_modules/zod/src/v4/locales/ko.ts +0 -121
- package/node_modules/zod/src/v4/locales/lt.ts +0 -239
- package/node_modules/zod/src/v4/locales/mk.ts +0 -118
- package/node_modules/zod/src/v4/locales/ms.ts +0 -115
- package/node_modules/zod/src/v4/locales/nl.ts +0 -121
- package/node_modules/zod/src/v4/locales/no.ts +0 -116
- package/node_modules/zod/src/v4/locales/ota.ts +0 -117
- package/node_modules/zod/src/v4/locales/pl.ts +0 -118
- package/node_modules/zod/src/v4/locales/ps.ts +0 -126
- package/node_modules/zod/src/v4/locales/pt.ts +0 -116
- package/node_modules/zod/src/v4/locales/ro.ts +0 -129
- package/node_modules/zod/src/v4/locales/ru.ts +0 -176
- package/node_modules/zod/src/v4/locales/sl.ts +0 -118
- package/node_modules/zod/src/v4/locales/sv.ts +0 -119
- package/node_modules/zod/src/v4/locales/ta.ts +0 -118
- package/node_modules/zod/src/v4/locales/th.ts +0 -119
- package/node_modules/zod/src/v4/locales/tr.ts +0 -111
- package/node_modules/zod/src/v4/locales/ua.ts +0 -7
- package/node_modules/zod/src/v4/locales/uk.ts +0 -117
- package/node_modules/zod/src/v4/locales/ur.ts +0 -119
- package/node_modules/zod/src/v4/locales/uz.ts +0 -117
- package/node_modules/zod/src/v4/locales/vi.ts +0 -117
- package/node_modules/zod/src/v4/locales/yo.ts +0 -124
- package/node_modules/zod/src/v4/locales/zh-CN.ts +0 -116
- package/node_modules/zod/src/v4/locales/zh-TW.ts +0 -115
- package/node_modules/zod/src/v4/mini/checks.ts +0 -32
- package/node_modules/zod/src/v4/mini/coerce.ts +0 -27
- package/node_modules/zod/src/v4/mini/external.ts +0 -41
- package/node_modules/zod/src/v4/mini/index.ts +0 -3
- package/node_modules/zod/src/v4/mini/iso.ts +0 -66
- package/node_modules/zod/src/v4/mini/parse.ts +0 -14
- package/node_modules/zod/src/v4/mini/schemas.ts +0 -1947
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +0 -24
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +0 -129
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +0 -94
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +0 -144
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +0 -548
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +0 -36
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +0 -22
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -5
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +0 -993
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +0 -95
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +0 -227
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +0 -43
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +0 -325
- package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +0 -50
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +0 -352
- package/node_modules/zod/src/v4-mini/index.ts +0 -3
- package/node_modules/zod/v3/ZodError.cjs +0 -138
- package/node_modules/zod/v3/ZodError.d.cts +0 -164
- package/node_modules/zod/v3/ZodError.d.ts +0 -164
- package/node_modules/zod/v3/ZodError.js +0 -133
- package/node_modules/zod/v3/errors.cjs +0 -17
- package/node_modules/zod/v3/errors.d.cts +0 -5
- package/node_modules/zod/v3/errors.d.ts +0 -5
- package/node_modules/zod/v3/errors.js +0 -9
- package/node_modules/zod/v3/external.cjs +0 -22
- package/node_modules/zod/v3/external.d.cts +0 -6
- package/node_modules/zod/v3/external.d.ts +0 -6
- package/node_modules/zod/v3/external.js +0 -6
- package/node_modules/zod/v3/helpers/enumUtil.cjs +0 -2
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +0 -8
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +0 -8
- package/node_modules/zod/v3/helpers/enumUtil.js +0 -1
- package/node_modules/zod/v3/helpers/errorUtil.cjs +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.js +0 -6
- package/node_modules/zod/v3/helpers/parseUtil.cjs +0 -124
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +0 -78
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +0 -78
- package/node_modules/zod/v3/helpers/parseUtil.js +0 -109
- package/node_modules/zod/v3/helpers/partialUtil.cjs +0 -2
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +0 -8
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +0 -8
- package/node_modules/zod/v3/helpers/partialUtil.js +0 -1
- package/node_modules/zod/v3/helpers/typeAliases.cjs +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.js +0 -1
- package/node_modules/zod/v3/helpers/util.cjs +0 -137
- package/node_modules/zod/v3/helpers/util.d.cts +0 -85
- package/node_modules/zod/v3/helpers/util.d.ts +0 -85
- package/node_modules/zod/v3/helpers/util.js +0 -133
- package/node_modules/zod/v3/index.cjs +0 -33
- package/node_modules/zod/v3/index.d.cts +0 -4
- package/node_modules/zod/v3/index.d.ts +0 -4
- package/node_modules/zod/v3/index.js +0 -4
- package/node_modules/zod/v3/locales/en.cjs +0 -112
- package/node_modules/zod/v3/locales/en.d.cts +0 -3
- package/node_modules/zod/v3/locales/en.d.ts +0 -3
- package/node_modules/zod/v3/locales/en.js +0 -109
- package/node_modules/zod/v3/package.json +0 -7
- package/node_modules/zod/v3/standard-schema.cjs +0 -2
- package/node_modules/zod/v3/standard-schema.d.cts +0 -102
- package/node_modules/zod/v3/standard-schema.d.ts +0 -102
- package/node_modules/zod/v3/standard-schema.js +0 -1
- package/node_modules/zod/v3/types.cjs +0 -3777
- package/node_modules/zod/v3/types.d.cts +0 -1034
- package/node_modules/zod/v3/types.d.ts +0 -1034
- package/node_modules/zod/v3/types.js +0 -3695
- package/node_modules/zod/v4/classic/checks.cjs +0 -33
- package/node_modules/zod/v4/classic/checks.d.cts +0 -1
- package/node_modules/zod/v4/classic/checks.d.ts +0 -1
- package/node_modules/zod/v4/classic/checks.js +0 -1
- package/node_modules/zod/v4/classic/coerce.cjs +0 -47
- package/node_modules/zod/v4/classic/coerce.d.cts +0 -17
- package/node_modules/zod/v4/classic/coerce.d.ts +0 -17
- package/node_modules/zod/v4/classic/coerce.js +0 -17
- package/node_modules/zod/v4/classic/compat.cjs +0 -61
- package/node_modules/zod/v4/classic/compat.d.cts +0 -50
- package/node_modules/zod/v4/classic/compat.d.ts +0 -50
- package/node_modules/zod/v4/classic/compat.js +0 -31
- package/node_modules/zod/v4/classic/errors.cjs +0 -74
- package/node_modules/zod/v4/classic/errors.d.cts +0 -30
- package/node_modules/zod/v4/classic/errors.d.ts +0 -30
- package/node_modules/zod/v4/classic/errors.js +0 -48
- package/node_modules/zod/v4/classic/external.cjs +0 -73
- package/node_modules/zod/v4/classic/external.d.cts +0 -16
- package/node_modules/zod/v4/classic/external.d.ts +0 -16
- package/node_modules/zod/v4/classic/external.js +0 -20
- package/node_modules/zod/v4/classic/from-json-schema.cjs +0 -625
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +0 -12
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +0 -12
- package/node_modules/zod/v4/classic/from-json-schema.js +0 -599
- package/node_modules/zod/v4/classic/index.cjs +0 -33
- package/node_modules/zod/v4/classic/index.d.cts +0 -4
- package/node_modules/zod/v4/classic/index.d.ts +0 -4
- package/node_modules/zod/v4/classic/index.js +0 -4
- package/node_modules/zod/v4/classic/iso.cjs +0 -60
- package/node_modules/zod/v4/classic/iso.d.cts +0 -22
- package/node_modules/zod/v4/classic/iso.d.ts +0 -22
- package/node_modules/zod/v4/classic/iso.js +0 -30
- package/node_modules/zod/v4/classic/package.json +0 -7
- package/node_modules/zod/v4/classic/parse.cjs +0 -41
- package/node_modules/zod/v4/classic/parse.d.cts +0 -31
- package/node_modules/zod/v4/classic/parse.d.ts +0 -31
- package/node_modules/zod/v4/classic/parse.js +0 -15
- package/node_modules/zod/v4/classic/schemas.cjs +0 -1511
- package/node_modules/zod/v4/classic/schemas.d.cts +0 -767
- package/node_modules/zod/v4/classic/schemas.d.ts +0 -767
- package/node_modules/zod/v4/classic/schemas.js +0 -1395
- package/node_modules/zod/v4/core/api.cjs +0 -1227
- package/node_modules/zod/v4/core/api.d.cts +0 -325
- package/node_modules/zod/v4/core/api.d.ts +0 -325
- package/node_modules/zod/v4/core/api.js +0 -1087
- package/node_modules/zod/v4/core/checks.cjs +0 -601
- package/node_modules/zod/v4/core/checks.d.cts +0 -278
- package/node_modules/zod/v4/core/checks.d.ts +0 -278
- package/node_modules/zod/v4/core/checks.js +0 -575
- package/node_modules/zod/v4/core/core.cjs +0 -85
- package/node_modules/zod/v4/core/core.d.cts +0 -70
- package/node_modules/zod/v4/core/core.d.ts +0 -70
- package/node_modules/zod/v4/core/core.js +0 -78
- package/node_modules/zod/v4/core/doc.cjs +0 -39
- package/node_modules/zod/v4/core/doc.d.cts +0 -14
- package/node_modules/zod/v4/core/doc.d.ts +0 -14
- package/node_modules/zod/v4/core/doc.js +0 -35
- package/node_modules/zod/v4/core/errors.cjs +0 -216
- package/node_modules/zod/v4/core/errors.d.cts +0 -221
- package/node_modules/zod/v4/core/errors.d.ts +0 -221
- package/node_modules/zod/v4/core/errors.js +0 -185
- package/node_modules/zod/v4/core/index.cjs +0 -47
- package/node_modules/zod/v4/core/index.d.cts +0 -16
- package/node_modules/zod/v4/core/index.d.ts +0 -16
- package/node_modules/zod/v4/core/index.js +0 -16
- package/node_modules/zod/v4/core/json-schema-generator.cjs +0 -99
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +0 -65
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +0 -65
- package/node_modules/zod/v4/core/json-schema-generator.js +0 -95
- package/node_modules/zod/v4/core/json-schema-processors.cjs +0 -644
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +0 -49
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +0 -49
- package/node_modules/zod/v4/core/json-schema-processors.js +0 -601
- package/node_modules/zod/v4/core/json-schema.cjs +0 -2
- package/node_modules/zod/v4/core/json-schema.d.cts +0 -88
- package/node_modules/zod/v4/core/json-schema.d.ts +0 -88
- package/node_modules/zod/v4/core/json-schema.js +0 -1
- package/node_modules/zod/v4/core/package.json +0 -7
- package/node_modules/zod/v4/core/parse.cjs +0 -131
- package/node_modules/zod/v4/core/parse.d.cts +0 -49
- package/node_modules/zod/v4/core/parse.d.ts +0 -49
- package/node_modules/zod/v4/core/parse.js +0 -93
- package/node_modules/zod/v4/core/regexes.cjs +0 -172
- package/node_modules/zod/v4/core/regexes.d.cts +0 -85
- package/node_modules/zod/v4/core/regexes.d.ts +0 -85
- package/node_modules/zod/v4/core/regexes.js +0 -139
- package/node_modules/zod/v4/core/registries.cjs +0 -56
- package/node_modules/zod/v4/core/registries.d.cts +0 -35
- package/node_modules/zod/v4/core/registries.d.ts +0 -35
- package/node_modules/zod/v4/core/registries.js +0 -51
- package/node_modules/zod/v4/core/schemas.cjs +0 -2270
- package/node_modules/zod/v4/core/schemas.d.cts +0 -1184
- package/node_modules/zod/v4/core/schemas.d.ts +0 -1184
- package/node_modules/zod/v4/core/schemas.js +0 -2239
- package/node_modules/zod/v4/core/standard-schema.cjs +0 -2
- package/node_modules/zod/v4/core/standard-schema.d.cts +0 -126
- package/node_modules/zod/v4/core/standard-schema.d.ts +0 -126
- package/node_modules/zod/v4/core/standard-schema.js +0 -1
- package/node_modules/zod/v4/core/to-json-schema.cjs +0 -457
- package/node_modules/zod/v4/core/to-json-schema.d.cts +0 -114
- package/node_modules/zod/v4/core/to-json-schema.d.ts +0 -114
- package/node_modules/zod/v4/core/to-json-schema.js +0 -448
- package/node_modules/zod/v4/core/util.cjs +0 -734
- package/node_modules/zod/v4/core/util.d.cts +0 -200
- package/node_modules/zod/v4/core/util.d.ts +0 -200
- package/node_modules/zod/v4/core/util.js +0 -674
- package/node_modules/zod/v4/core/versions.cjs +0 -8
- package/node_modules/zod/v4/core/versions.d.cts +0 -5
- package/node_modules/zod/v4/core/versions.d.ts +0 -5
- package/node_modules/zod/v4/core/versions.js +0 -5
- package/node_modules/zod/v4/index.cjs +0 -22
- package/node_modules/zod/v4/index.d.cts +0 -3
- package/node_modules/zod/v4/index.d.ts +0 -3
- package/node_modules/zod/v4/index.js +0 -3
- package/node_modules/zod/v4/locales/ar.cjs +0 -133
- package/node_modules/zod/v4/locales/ar.d.cts +0 -5
- package/node_modules/zod/v4/locales/ar.d.ts +0 -4
- package/node_modules/zod/v4/locales/ar.js +0 -106
- package/node_modules/zod/v4/locales/az.cjs +0 -132
- package/node_modules/zod/v4/locales/az.d.cts +0 -5
- package/node_modules/zod/v4/locales/az.d.ts +0 -4
- package/node_modules/zod/v4/locales/az.js +0 -105
- package/node_modules/zod/v4/locales/be.cjs +0 -183
- package/node_modules/zod/v4/locales/be.d.cts +0 -5
- package/node_modules/zod/v4/locales/be.d.ts +0 -4
- package/node_modules/zod/v4/locales/be.js +0 -156
- package/node_modules/zod/v4/locales/bg.cjs +0 -147
- package/node_modules/zod/v4/locales/bg.d.cts +0 -5
- package/node_modules/zod/v4/locales/bg.d.ts +0 -4
- package/node_modules/zod/v4/locales/bg.js +0 -120
- package/node_modules/zod/v4/locales/ca.cjs +0 -134
- package/node_modules/zod/v4/locales/ca.d.cts +0 -5
- package/node_modules/zod/v4/locales/ca.d.ts +0 -4
- package/node_modules/zod/v4/locales/ca.js +0 -107
- package/node_modules/zod/v4/locales/cs.cjs +0 -138
- package/node_modules/zod/v4/locales/cs.d.cts +0 -5
- package/node_modules/zod/v4/locales/cs.d.ts +0 -4
- package/node_modules/zod/v4/locales/cs.js +0 -111
- package/node_modules/zod/v4/locales/da.cjs +0 -142
- package/node_modules/zod/v4/locales/da.d.cts +0 -5
- package/node_modules/zod/v4/locales/da.d.ts +0 -4
- package/node_modules/zod/v4/locales/da.js +0 -115
- package/node_modules/zod/v4/locales/de.cjs +0 -135
- package/node_modules/zod/v4/locales/de.d.cts +0 -5
- package/node_modules/zod/v4/locales/de.d.ts +0 -4
- package/node_modules/zod/v4/locales/de.js +0 -108
- package/node_modules/zod/v4/locales/el.cjs +0 -136
- package/node_modules/zod/v4/locales/el.d.cts +0 -5
- package/node_modules/zod/v4/locales/el.d.ts +0 -4
- package/node_modules/zod/v4/locales/el.js +0 -109
- package/node_modules/zod/v4/locales/en.cjs +0 -140
- package/node_modules/zod/v4/locales/en.d.cts +0 -5
- package/node_modules/zod/v4/locales/en.d.ts +0 -4
- package/node_modules/zod/v4/locales/en.js +0 -113
- package/node_modules/zod/v4/locales/eo.cjs +0 -136
- package/node_modules/zod/v4/locales/eo.d.cts +0 -5
- package/node_modules/zod/v4/locales/eo.d.ts +0 -4
- package/node_modules/zod/v4/locales/eo.js +0 -109
- package/node_modules/zod/v4/locales/es.cjs +0 -159
- package/node_modules/zod/v4/locales/es.d.cts +0 -5
- package/node_modules/zod/v4/locales/es.d.ts +0 -4
- package/node_modules/zod/v4/locales/es.js +0 -132
- package/node_modules/zod/v4/locales/fa.cjs +0 -141
- package/node_modules/zod/v4/locales/fa.d.cts +0 -5
- package/node_modules/zod/v4/locales/fa.d.ts +0 -4
- package/node_modules/zod/v4/locales/fa.js +0 -114
- package/node_modules/zod/v4/locales/fi.cjs +0 -139
- package/node_modules/zod/v4/locales/fi.d.cts +0 -5
- package/node_modules/zod/v4/locales/fi.d.ts +0 -4
- package/node_modules/zod/v4/locales/fi.js +0 -112
- package/node_modules/zod/v4/locales/fr-CA.cjs +0 -134
- package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -5
- package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
- package/node_modules/zod/v4/locales/fr-CA.js +0 -107
- package/node_modules/zod/v4/locales/fr.cjs +0 -152
- package/node_modules/zod/v4/locales/fr.d.cts +0 -5
- package/node_modules/zod/v4/locales/fr.d.ts +0 -4
- package/node_modules/zod/v4/locales/fr.js +0 -125
- package/node_modules/zod/v4/locales/he.cjs +0 -241
- package/node_modules/zod/v4/locales/he.d.cts +0 -5
- package/node_modules/zod/v4/locales/he.d.ts +0 -4
- package/node_modules/zod/v4/locales/he.js +0 -214
- package/node_modules/zod/v4/locales/hr.cjs +0 -149
- package/node_modules/zod/v4/locales/hr.d.cts +0 -5
- package/node_modules/zod/v4/locales/hr.d.ts +0 -4
- package/node_modules/zod/v4/locales/hr.js +0 -122
- package/node_modules/zod/v4/locales/hu.cjs +0 -135
- package/node_modules/zod/v4/locales/hu.d.cts +0 -5
- package/node_modules/zod/v4/locales/hu.d.ts +0 -4
- package/node_modules/zod/v4/locales/hu.js +0 -108
- package/node_modules/zod/v4/locales/hy.cjs +0 -174
- package/node_modules/zod/v4/locales/hy.d.cts +0 -5
- package/node_modules/zod/v4/locales/hy.d.ts +0 -4
- package/node_modules/zod/v4/locales/hy.js +0 -147
- package/node_modules/zod/v4/locales/id.cjs +0 -133
- package/node_modules/zod/v4/locales/id.d.cts +0 -5
- package/node_modules/zod/v4/locales/id.d.ts +0 -4
- package/node_modules/zod/v4/locales/id.js +0 -106
- package/node_modules/zod/v4/locales/index.cjs +0 -111
- package/node_modules/zod/v4/locales/index.d.cts +0 -52
- package/node_modules/zod/v4/locales/index.d.ts +0 -52
- package/node_modules/zod/v4/locales/index.js +0 -52
- package/node_modules/zod/v4/locales/is.cjs +0 -136
- package/node_modules/zod/v4/locales/is.d.cts +0 -5
- package/node_modules/zod/v4/locales/is.d.ts +0 -4
- package/node_modules/zod/v4/locales/is.js +0 -109
- package/node_modules/zod/v4/locales/it.cjs +0 -135
- package/node_modules/zod/v4/locales/it.d.cts +0 -5
- package/node_modules/zod/v4/locales/it.d.ts +0 -4
- package/node_modules/zod/v4/locales/it.js +0 -108
- package/node_modules/zod/v4/locales/ja.cjs +0 -134
- package/node_modules/zod/v4/locales/ja.d.cts +0 -5
- package/node_modules/zod/v4/locales/ja.d.ts +0 -4
- package/node_modules/zod/v4/locales/ja.js +0 -107
- package/node_modules/zod/v4/locales/ka.cjs +0 -139
- package/node_modules/zod/v4/locales/ka.d.cts +0 -5
- package/node_modules/zod/v4/locales/ka.d.ts +0 -4
- package/node_modules/zod/v4/locales/ka.js +0 -112
- package/node_modules/zod/v4/locales/kh.cjs +0 -12
- package/node_modules/zod/v4/locales/kh.d.cts +0 -5
- package/node_modules/zod/v4/locales/kh.d.ts +0 -5
- package/node_modules/zod/v4/locales/kh.js +0 -5
- package/node_modules/zod/v4/locales/km.cjs +0 -137
- package/node_modules/zod/v4/locales/km.d.cts +0 -5
- package/node_modules/zod/v4/locales/km.d.ts +0 -4
- package/node_modules/zod/v4/locales/km.js +0 -110
- package/node_modules/zod/v4/locales/ko.cjs +0 -138
- package/node_modules/zod/v4/locales/ko.d.cts +0 -5
- package/node_modules/zod/v4/locales/ko.d.ts +0 -4
- package/node_modules/zod/v4/locales/ko.js +0 -111
- package/node_modules/zod/v4/locales/lt.cjs +0 -230
- package/node_modules/zod/v4/locales/lt.d.cts +0 -5
- package/node_modules/zod/v4/locales/lt.d.ts +0 -4
- package/node_modules/zod/v4/locales/lt.js +0 -203
- package/node_modules/zod/v4/locales/mk.cjs +0 -136
- package/node_modules/zod/v4/locales/mk.d.cts +0 -5
- package/node_modules/zod/v4/locales/mk.d.ts +0 -4
- package/node_modules/zod/v4/locales/mk.js +0 -109
- package/node_modules/zod/v4/locales/ms.cjs +0 -134
- package/node_modules/zod/v4/locales/ms.d.cts +0 -5
- package/node_modules/zod/v4/locales/ms.d.ts +0 -4
- package/node_modules/zod/v4/locales/ms.js +0 -107
- package/node_modules/zod/v4/locales/nl.cjs +0 -137
- package/node_modules/zod/v4/locales/nl.d.cts +0 -5
- package/node_modules/zod/v4/locales/nl.d.ts +0 -4
- package/node_modules/zod/v4/locales/nl.js +0 -110
- package/node_modules/zod/v4/locales/no.cjs +0 -135
- package/node_modules/zod/v4/locales/no.d.cts +0 -5
- package/node_modules/zod/v4/locales/no.d.ts +0 -4
- package/node_modules/zod/v4/locales/no.js +0 -108
- package/node_modules/zod/v4/locales/ota.cjs +0 -136
- package/node_modules/zod/v4/locales/ota.d.cts +0 -5
- package/node_modules/zod/v4/locales/ota.d.ts +0 -4
- package/node_modules/zod/v4/locales/ota.js +0 -109
- package/node_modules/zod/v4/locales/package.json +0 -7
- package/node_modules/zod/v4/locales/pl.cjs +0 -136
- package/node_modules/zod/v4/locales/pl.d.cts +0 -5
- package/node_modules/zod/v4/locales/pl.d.ts +0 -4
- package/node_modules/zod/v4/locales/pl.js +0 -109
- package/node_modules/zod/v4/locales/ps.cjs +0 -141
- package/node_modules/zod/v4/locales/ps.d.cts +0 -5
- package/node_modules/zod/v4/locales/ps.d.ts +0 -4
- package/node_modules/zod/v4/locales/ps.js +0 -114
- package/node_modules/zod/v4/locales/pt.cjs +0 -135
- package/node_modules/zod/v4/locales/pt.d.cts +0 -5
- package/node_modules/zod/v4/locales/pt.d.ts +0 -4
- package/node_modules/zod/v4/locales/pt.js +0 -108
- package/node_modules/zod/v4/locales/ro.cjs +0 -146
- package/node_modules/zod/v4/locales/ro.d.cts +0 -5
- package/node_modules/zod/v4/locales/ro.d.ts +0 -4
- package/node_modules/zod/v4/locales/ro.js +0 -119
- package/node_modules/zod/v4/locales/ru.cjs +0 -183
- package/node_modules/zod/v4/locales/ru.d.cts +0 -5
- package/node_modules/zod/v4/locales/ru.d.ts +0 -4
- package/node_modules/zod/v4/locales/ru.js +0 -156
- package/node_modules/zod/v4/locales/sl.cjs +0 -136
- package/node_modules/zod/v4/locales/sl.d.cts +0 -5
- package/node_modules/zod/v4/locales/sl.d.ts +0 -4
- package/node_modules/zod/v4/locales/sl.js +0 -109
- package/node_modules/zod/v4/locales/sv.cjs +0 -137
- package/node_modules/zod/v4/locales/sv.d.cts +0 -5
- package/node_modules/zod/v4/locales/sv.d.ts +0 -4
- package/node_modules/zod/v4/locales/sv.js +0 -110
- package/node_modules/zod/v4/locales/ta.cjs +0 -137
- package/node_modules/zod/v4/locales/ta.d.cts +0 -5
- package/node_modules/zod/v4/locales/ta.d.ts +0 -4
- package/node_modules/zod/v4/locales/ta.js +0 -110
- package/node_modules/zod/v4/locales/th.cjs +0 -137
- package/node_modules/zod/v4/locales/th.d.cts +0 -5
- package/node_modules/zod/v4/locales/th.d.ts +0 -4
- package/node_modules/zod/v4/locales/th.js +0 -110
- package/node_modules/zod/v4/locales/tr.cjs +0 -132
- package/node_modules/zod/v4/locales/tr.d.cts +0 -5
- package/node_modules/zod/v4/locales/tr.d.ts +0 -4
- package/node_modules/zod/v4/locales/tr.js +0 -105
- package/node_modules/zod/v4/locales/ua.cjs +0 -12
- package/node_modules/zod/v4/locales/ua.d.cts +0 -5
- package/node_modules/zod/v4/locales/ua.d.ts +0 -5
- package/node_modules/zod/v4/locales/ua.js +0 -5
- package/node_modules/zod/v4/locales/uk.cjs +0 -135
- package/node_modules/zod/v4/locales/uk.d.cts +0 -5
- package/node_modules/zod/v4/locales/uk.d.ts +0 -4
- package/node_modules/zod/v4/locales/uk.js +0 -108
- package/node_modules/zod/v4/locales/ur.cjs +0 -137
- package/node_modules/zod/v4/locales/ur.d.cts +0 -5
- package/node_modules/zod/v4/locales/ur.d.ts +0 -4
- package/node_modules/zod/v4/locales/ur.js +0 -110
- package/node_modules/zod/v4/locales/uz.cjs +0 -137
- package/node_modules/zod/v4/locales/uz.d.cts +0 -5
- package/node_modules/zod/v4/locales/uz.d.ts +0 -4
- package/node_modules/zod/v4/locales/uz.js +0 -110
- package/node_modules/zod/v4/locales/vi.cjs +0 -135
- package/node_modules/zod/v4/locales/vi.d.cts +0 -5
- package/node_modules/zod/v4/locales/vi.d.ts +0 -4
- package/node_modules/zod/v4/locales/vi.js +0 -108
- package/node_modules/zod/v4/locales/yo.cjs +0 -134
- package/node_modules/zod/v4/locales/yo.d.cts +0 -5
- package/node_modules/zod/v4/locales/yo.d.ts +0 -4
- package/node_modules/zod/v4/locales/yo.js +0 -107
- package/node_modules/zod/v4/locales/zh-CN.cjs +0 -136
- package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -5
- package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
- package/node_modules/zod/v4/locales/zh-CN.js +0 -109
- package/node_modules/zod/v4/locales/zh-TW.cjs +0 -134
- package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -5
- package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
- package/node_modules/zod/v4/locales/zh-TW.js +0 -107
- package/node_modules/zod/v4/mini/checks.cjs +0 -34
- package/node_modules/zod/v4/mini/checks.d.cts +0 -1
- package/node_modules/zod/v4/mini/checks.d.ts +0 -1
- package/node_modules/zod/v4/mini/checks.js +0 -1
- package/node_modules/zod/v4/mini/coerce.cjs +0 -52
- package/node_modules/zod/v4/mini/coerce.d.cts +0 -7
- package/node_modules/zod/v4/mini/coerce.d.ts +0 -7
- package/node_modules/zod/v4/mini/coerce.js +0 -22
- package/node_modules/zod/v4/mini/external.cjs +0 -63
- package/node_modules/zod/v4/mini/external.d.cts +0 -13
- package/node_modules/zod/v4/mini/external.d.ts +0 -13
- package/node_modules/zod/v4/mini/external.js +0 -14
- package/node_modules/zod/v4/mini/index.cjs +0 -32
- package/node_modules/zod/v4/mini/index.d.cts +0 -3
- package/node_modules/zod/v4/mini/index.d.ts +0 -3
- package/node_modules/zod/v4/mini/index.js +0 -3
- package/node_modules/zod/v4/mini/iso.cjs +0 -64
- package/node_modules/zod/v4/mini/iso.d.cts +0 -22
- package/node_modules/zod/v4/mini/iso.d.ts +0 -22
- package/node_modules/zod/v4/mini/iso.js +0 -34
- package/node_modules/zod/v4/mini/package.json +0 -7
- package/node_modules/zod/v4/mini/parse.cjs +0 -16
- package/node_modules/zod/v4/mini/parse.d.cts +0 -1
- package/node_modules/zod/v4/mini/parse.d.ts +0 -1
- package/node_modules/zod/v4/mini/parse.js +0 -1
- package/node_modules/zod/v4/mini/schemas.cjs +0 -1083
- package/node_modules/zod/v4/mini/schemas.d.cts +0 -445
- package/node_modules/zod/v4/mini/schemas.d.ts +0 -445
- package/node_modules/zod/v4/mini/schemas.js +0 -961
- package/node_modules/zod/v4/package.json +0 -7
- package/node_modules/zod/v4-mini/index.cjs +0 -32
- package/node_modules/zod/v4-mini/index.d.cts +0 -3
- package/node_modules/zod/v4-mini/index.d.ts +0 -3
- package/node_modules/zod/v4-mini/index.js +0 -3
- package/node_modules/zod/v4-mini/package.json +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{normalizeCompletions}from"../chunk-OJF6B5EU.js";export{normalizeCompletions};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{flushUsage,recordUsage}from"../chunk-YBGMCISI.js";export{flushUsage,recordUsage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{generateLandingPage}from"./chunk-GX6PGIEO.js";import{resolveServerOrigin}from"./chunk-PSKSL567.js";function createLandingPageResponse(request,basePath,config,branding,tools,prompts,resources){let origin=resolveServerOrigin(request),url=new URL(basePath,`${origin}/`).href,html=generateLandingPage({...config,url,...branding.favicon!==void 0&&{iconUrl:new URL("/favicon.ico",`${origin}/`).href,...branding.faviconMimeType!==void 0&&{iconType:branding.faviconMimeType}},tools:Array.from(tools,entry=>entry.definition),prompts:Array.from(prompts,entry=>entry.definition),resources:Array.from(resources,entry=>entry.definition)});return new Response(request.method==="HEAD"?null:html,{status:200,headers:{"cache-control":"no-store","content-type":"text/html; charset=utf-8","x-content-type-options":"nosniff"}})}export{createLandingPageResponse};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type LandingPageOptions, type LandingPagePrompt, type LandingPageResource, type LandingPageTool } from "./landing.js";
|
|
2
|
+
import type { ServerBranding } from "./branding.js";
|
|
3
|
+
/**
|
|
4
|
+
* Render a landing-page response without loading the renderer on MCP requests.
|
|
5
|
+
*
|
|
6
|
+
* @param request - Classified HTML GET or HEAD request.
|
|
7
|
+
* @param basePath - Exact MCP endpoint path.
|
|
8
|
+
* @param config - Server identity and description.
|
|
9
|
+
* @param branding - Normalized browser and MCP identity branding.
|
|
10
|
+
* @param tools - Frozen tool registry values.
|
|
11
|
+
* @param prompts - Frozen prompt registry values.
|
|
12
|
+
* @param resources - Frozen static-resource registry values.
|
|
13
|
+
* @returns HTML response, with an empty body for HEAD.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare function createLandingPageResponse(request: Request, basePath: string, config: Pick<LandingPageOptions, "name" | "title" | "version" | "description">, branding: Pick<ServerBranding, "favicon" | "faviconMimeType">, tools: Iterable<{
|
|
18
|
+
definition: LandingPageTool;
|
|
19
|
+
}>, prompts: Iterable<{
|
|
20
|
+
definition: LandingPagePrompt;
|
|
21
|
+
}>, resources: Iterable<{
|
|
22
|
+
definition: LandingPageResource;
|
|
23
|
+
}>): Response;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Landing page generator for MCP server endpoints
|
|
3
|
+
*
|
|
4
|
+
* Generates SEO-friendly HTML with connection instructions for MCP servers
|
|
5
|
+
* from Claude Code, Cursor, VS Code, ChatGPT, and Manufact Inspector (hosted).
|
|
6
|
+
*/
|
|
7
|
+
/** A tool shown in the landing page's primitives list. */
|
|
8
|
+
export interface LandingPageTool {
|
|
9
|
+
/** Protocol-facing tool name. */
|
|
10
|
+
name: string;
|
|
11
|
+
/** Optional human-readable tool title. */
|
|
12
|
+
title?: string;
|
|
13
|
+
/** Optional tool description. */
|
|
14
|
+
description?: string;
|
|
15
|
+
}
|
|
16
|
+
/** A prompt shown in the landing page's primitives list. */
|
|
17
|
+
export interface LandingPagePrompt {
|
|
18
|
+
/** Protocol-facing prompt name. */
|
|
19
|
+
name: string;
|
|
20
|
+
/** Optional human-readable prompt title. */
|
|
21
|
+
title?: string;
|
|
22
|
+
/** Optional prompt description. */
|
|
23
|
+
description?: string;
|
|
24
|
+
}
|
|
25
|
+
/** A static resource shown in the landing page's primitives list. */
|
|
26
|
+
export interface LandingPageResource {
|
|
27
|
+
/** Resource URI. */
|
|
28
|
+
uri: string;
|
|
29
|
+
/** Optional protocol-facing resource name. */
|
|
30
|
+
name?: string;
|
|
31
|
+
/** Optional human-readable resource title. */
|
|
32
|
+
title?: string;
|
|
33
|
+
/** Optional resource description. */
|
|
34
|
+
description?: string;
|
|
35
|
+
}
|
|
36
|
+
/** Inputs used to render the v1-compatible MCP server landing page. */
|
|
37
|
+
export interface LandingPageOptions {
|
|
38
|
+
/** Protocol-facing server name. */
|
|
39
|
+
name: string;
|
|
40
|
+
/** Optional human-readable server title used as the page heading. */
|
|
41
|
+
title?: string;
|
|
42
|
+
/** Server version shown beside the heading. */
|
|
43
|
+
version: string;
|
|
44
|
+
/** Absolute public URL of the MCP endpoint. */
|
|
45
|
+
url: string;
|
|
46
|
+
/** Optional server description. */
|
|
47
|
+
description?: string;
|
|
48
|
+
/** Optional tools shown in the primitives list. */
|
|
49
|
+
tools?: readonly LandingPageTool[];
|
|
50
|
+
/** Optional prompts shown in the primitives list. */
|
|
51
|
+
prompts?: readonly LandingPagePrompt[];
|
|
52
|
+
/** Optional static resources shown in the primitives list. */
|
|
53
|
+
resources?: readonly LandingPageResource[];
|
|
54
|
+
/** Optional absolute URL for the icon displayed above the server heading. */
|
|
55
|
+
iconUrl?: string;
|
|
56
|
+
/** MIME type for the favicon link tag when known. */
|
|
57
|
+
iconType?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Generates an HTML landing page with connection instructions
|
|
61
|
+
* for Claude Code, Cursor, VS Code, ChatGPT, and Manufact Inspector.
|
|
62
|
+
*
|
|
63
|
+
* @param options - Server identity, endpoint, icon, and primitive metadata.
|
|
64
|
+
* @returns HTML landing page with connection instructions
|
|
65
|
+
*/
|
|
66
|
+
export declare function generateLandingPage(options: LandingPageOptions): string;
|
package/dist/landing.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{generateLandingPage}from"./chunk-GX6PGIEO.js";export{generateLandingPage};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Default bind address for Node listeners. */
|
|
2
|
+
export declare const DEFAULT_LISTEN_HOST = "127.0.0.1";
|
|
3
|
+
/** Default TCP port for Node listeners. */
|
|
4
|
+
export declare const DEFAULT_LISTEN_PORT = 3000;
|
|
5
|
+
/** Resolve an explicit value, then `HOST`, then configured value, then default. */
|
|
6
|
+
export declare function resolveListenHost(explicitHost: string | undefined, configuredHost: string | undefined, env?: Readonly<Record<string, string | undefined>>): string;
|
|
7
|
+
/** Resolve an explicit value, then `PORT`, then configured value, then default. */
|
|
8
|
+
export declare function resolveListenPort(explicitPort: number | undefined, configuredPort: number | undefined, env?: Readonly<Record<string, string | undefined>>): number;
|
package/dist/logging.d.ts
CHANGED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var PROXY_CLIENT_INSTALL_HINT=["[mcp-use] server.proxy() requires the optional @mcp-use/client package.","Install it in your project:",""," npm install @mcp-use/client"].join(`
|
|
2
|
+
`);function passthroughJsonSchema(schema){return{"~standard":{version:1,vendor:"mcp-use-proxy",validate(value){return{value}},jsonSchema:{input:()=>schema,output:()=>schema}}}}function promptArgsToJsonSchema(args){let properties=Object.create(null),required=[];for(let arg of args??[])properties[arg.name]={type:"string",...arg.description!==void 0&&{description:arg.description}},arg.required===!0&&required.push(arg.name);return{type:"object",properties,...required.length>0&&{required}}}function prefixedName(namespace,name){return`${namespace}_${name}`}function proxiedResourceUri(namespace,uri){return`mcp-use-proxy:///${encodeURIComponent(namespace)}/${encodeURIComponent(uri)}`}function isConnection(value){if(value===null||typeof value!="object")return!1;let candidate=value;return typeof candidate.listTools=="function"&&typeof candidate.callTool=="function"&&typeof candidate.readResource=="function"&&typeof candidate.listPrompts=="function"&&typeof candidate.getPrompt=="function"}function isClientPackageMissing(error){if(!(error instanceof Error))return!1;let code=error.code;return(code==="ERR_MODULE_NOT_FOUND"||code==="MODULE_NOT_FOUND")&&error.message.includes("@mcp-use/client")}function proxyDiagnostic(message,error){if(error===void 0){console.error(`[mcp-use] ${message}`);return}let detail=error instanceof Error?error.message:String(error);console.error(`[mcp-use] ${message}: ${detail}`)}function proxyClientInstallError(error){return isClientPackageMissing(error)?new Error(PROXY_CLIENT_INSTALL_HINT,{cause:error}):void 0}async function loadProxyClient(importer=()=>import("@mcp-use/client")){try{return await importer()}catch(error){let installError=proxyClientInstallError(error);throw installError!==void 0?installError:error}}function supports(connection,capability){return connection.supports?.(capability)!==!1}async function introspect(namespace,connection){let tools=[];if(supports(connection,"tools"))try{tools=await connection.listTools()}catch(error){proxyDiagnostic(`Failed to introspect tools from upstream MCP server "${namespace}"`,error)}let resources=[];if(supports(connection,"resources"))try{connection.listAllResources!==void 0?resources=(await connection.listAllResources()).resources:connection.listResources!==void 0&&(resources=(await connection.listResources()).resources)}catch(error){proxyDiagnostic(`Failed to introspect resources from upstream MCP server "${namespace}"`,error)}let prompts=[];if(supports(connection,"prompts"))try{prompts=(await connection.listPrompts()).prompts}catch(error){proxyDiagnostic(`Failed to introspect prompts from upstream MCP server "${namespace}"`,error)}return{namespace,connection,tools,resources,prompts}}function mountPlan(host,plan){host.trackNamespace?.({tools:plan.tools.length,resources:plan.resources.length,prompts:plan.prompts.length});for(let tool of plan.tools){let name=prefixedName(plan.namespace,tool.name);if(host.hasTool(name)){proxyDiagnostic(`Skipping proxied tool "${name}" from upstream "${plan.namespace}" because that name is already registered`);continue}let definition={name,...tool.title!==void 0&&{title:tool.title},...tool.description!==void 0&&{description:tool.description},...tool.annotations!==void 0&&{annotations:tool.annotations},...tool.inputSchema!==void 0&&{inputSchema:passthroughJsonSchema(tool.inputSchema)},...tool.outputSchema!==void 0&&{outputSchema:passthroughJsonSchema(tool.outputSchema)}},upstreamName=tool.name,callback=async(params,ctx)=>{let progressForwarding=Promise.resolve();try{return await plan.connection.callTool(upstreamName,params,{signal:ctx.signal,onprogress:progress=>{progressForwarding=progressForwarding.then(async()=>{try{await ctx.reportProgress(progress.progress,progress.total,progress.message)}catch(error){proxyDiagnostic(`Failed to forward progress for proxied tool "${definition.name}"`,error)}})}})}finally{await progressForwarding}};host.registerTool(definition,callback)}for(let resource of plan.resources){let name=prefixedName(plan.namespace,resource.name);if(host.hasResource(name)){proxyDiagnostic(`Skipping proxied resource "${name}" from upstream "${plan.namespace}" because that name is already registered`);continue}let upstreamUri=resource.uri;host.registerResource({name,uri:proxiedResourceUri(plan.namespace,upstreamUri),...resource.title!==void 0&&{title:resource.title},...resource.description!==void 0&&{description:resource.description},...resource.mimeType!==void 0&&{mimeType:resource.mimeType}},async(_uri,ctx)=>plan.connection.readResource(upstreamUri,{signal:ctx.signal}))}for(let prompt of plan.prompts){let name=prefixedName(plan.namespace,prompt.name);if(host.hasPrompt(name)){proxyDiagnostic(`Skipping proxied prompt "${name}" from upstream "${plan.namespace}" because that name is already registered`);continue}let upstreamName=prompt.name;host.registerPrompt({name,...prompt.title!==void 0&&{title:prompt.title},...prompt.description!==void 0&&{description:prompt.description},schema:passthroughJsonSchema(promptArgsToJsonSchema(prompt.arguments))},async params=>plan.connection.getPrompt(upstreamName,params))}}async function mountProxyConnection(host,connection){if(host.isStarted())throw new Error("Cannot call proxy() after the server has started: register upstream servers before listen()/server.fetch.");let namespace=connection.info.server.name,plan=await introspect(namespace,connection);mountPlan(host,plan)}function toClientConfig(config){return{url:config.url,...config.headers!==void 0&&{headers:config.headers},...config.authToken!==void 0&&{authToken:config.authToken},...config.timeout!==void 0&&{timeout:config.timeout},...config.fetch!==void 0&&{fetch:config.fetch},...config.protocolNegotiation!==void 0&&{protocolNegotiation:config.protocolNegotiation},oauth:!1}}async function mountProxyServers(host,servers){if(host.isStarted())throw new Error("Cannot call proxy() after the server has started: register upstream servers before listen()/server.fetch.");let{MCPClient}=await loadProxyClient(),clientServers=Object.fromEntries(Object.entries(servers).map(([name,config])=>[name,toClientConfig(config)])),owner=new MCPClient({mcpServers:clientServers});try{let plans=[];for(let namespace of Object.keys(clientServers)){let connection;try{connection=await owner.connect(namespace)}catch(error){proxyDiagnostic(`Failed to connect to upstream MCP server "${namespace}"`,error);continue}plans.push(await introspect(namespace,connection))}for(let plan of plans)mountPlan(host,plan);host.trackOwner(owner)}catch(error){throw await owner.close().catch(()=>{}),error}}function isProxyConnection(value){return isConnection(value)}export{isProxyConnection,mountProxyConnection,mountProxyServers,proxyClientInstallError};
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import type { CallToolResult, GetPromptResult, InputRequiredResult, PromptArgument, ReadResourceResult, ToolAnnotations } from "@modelcontextprotocol/server";
|
|
2
|
+
import type { PromptCallback, PromptDefinition } from "./prompts.js";
|
|
3
|
+
import type { ResourceCallback, ResourceDefinition } from "./resources.js";
|
|
4
|
+
import type { ToolCallback, ToolDefinition } from "./tools.js";
|
|
5
|
+
/** HTTP connection settings accepted by {@link MCPServer.proxy}. */
|
|
6
|
+
export interface ProxyHttpConfig {
|
|
7
|
+
/** Upstream MCP endpoint URL. */
|
|
8
|
+
url: string;
|
|
9
|
+
/** Extra headers sent on every upstream request. */
|
|
10
|
+
headers?: Record<string, string>;
|
|
11
|
+
/** Bearer token sent to the upstream server. */
|
|
12
|
+
authToken?: string;
|
|
13
|
+
/** Connection timeout in milliseconds. */
|
|
14
|
+
timeout?: number;
|
|
15
|
+
/** Fetch implementation used for upstream HTTP requests. */
|
|
16
|
+
fetch?: typeof fetch;
|
|
17
|
+
/** Protocol negotiation mode forwarded to `@mcp-use/client`. */
|
|
18
|
+
protocolNegotiation?: "auto" | "legacy" | {
|
|
19
|
+
pin: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/** Connection settings for one upstream server. */
|
|
23
|
+
export type ProxyServerConfig = ProxyHttpConfig;
|
|
24
|
+
/** Progress payload received while a proxied tool is running. */
|
|
25
|
+
export interface ProxyProgress {
|
|
26
|
+
/** Completed work units. */
|
|
27
|
+
progress: number;
|
|
28
|
+
/** Total work units, when known. */
|
|
29
|
+
total?: number | undefined;
|
|
30
|
+
/** Human-readable progress detail. */
|
|
31
|
+
message?: string | undefined;
|
|
32
|
+
}
|
|
33
|
+
/** Request controls used when forwarding calls to an upstream connection. */
|
|
34
|
+
export interface ProxyRequestOptions {
|
|
35
|
+
/** Aborts the upstream request when the downstream request is cancelled. */
|
|
36
|
+
signal?: AbortSignal;
|
|
37
|
+
/** Receives upstream progress notifications. */
|
|
38
|
+
onprogress?: (progress: ProxyProgress) => void;
|
|
39
|
+
}
|
|
40
|
+
/** Structural connection contract accepted by the low-level proxy overload. */
|
|
41
|
+
export interface ProxyConnection {
|
|
42
|
+
/** Negotiated metadata used to derive the automatic capability namespace. */
|
|
43
|
+
readonly info: {
|
|
44
|
+
server: {
|
|
45
|
+
name: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
/** Whether the upstream advertised a named MCP capability. */
|
|
49
|
+
supports?(capability: string): boolean;
|
|
50
|
+
/** List upstream tools. */
|
|
51
|
+
listTools(): Promise<ProxyTool[]>;
|
|
52
|
+
/** Forward a tool call. */
|
|
53
|
+
callTool(name: string, args?: Record<string, unknown>, options?: ProxyRequestOptions): Promise<CallToolResult | InputRequiredResult>;
|
|
54
|
+
/** List upstream resources, including pagination when supported. */
|
|
55
|
+
listAllResources?(): Promise<{
|
|
56
|
+
resources: ProxyResource[];
|
|
57
|
+
}>;
|
|
58
|
+
/** List one page of upstream resources. */
|
|
59
|
+
listResources?(): Promise<{
|
|
60
|
+
resources: ProxyResource[];
|
|
61
|
+
}>;
|
|
62
|
+
/** Read an upstream resource. */
|
|
63
|
+
readResource(uri: string, options?: ProxyRequestOptions): Promise<ReadResourceResult>;
|
|
64
|
+
/** List upstream prompts. */
|
|
65
|
+
listPrompts(): Promise<{
|
|
66
|
+
prompts: ProxyPrompt[];
|
|
67
|
+
}>;
|
|
68
|
+
/** Render an upstream prompt. */
|
|
69
|
+
getPrompt(name: string, args: Record<string, unknown>): Promise<GetPromptResult>;
|
|
70
|
+
}
|
|
71
|
+
/** Tool metadata consumed while introspecting an upstream connection. */
|
|
72
|
+
export interface ProxyTool {
|
|
73
|
+
/** Upstream tool name. */
|
|
74
|
+
name: string;
|
|
75
|
+
/** Human-readable tool title. */
|
|
76
|
+
title?: string | undefined;
|
|
77
|
+
/** LLM-facing tool description. */
|
|
78
|
+
description?: string | undefined;
|
|
79
|
+
/** Upstream input JSON Schema. */
|
|
80
|
+
inputSchema?: Record<string, unknown> | undefined;
|
|
81
|
+
/** Upstream output JSON Schema. */
|
|
82
|
+
outputSchema?: Record<string, unknown> | undefined;
|
|
83
|
+
/** Upstream behavioral hints. */
|
|
84
|
+
annotations?: ToolAnnotations | undefined;
|
|
85
|
+
}
|
|
86
|
+
/** Resource metadata consumed while introspecting an upstream connection. */
|
|
87
|
+
export interface ProxyResource {
|
|
88
|
+
/** Upstream resource name. */
|
|
89
|
+
name: string;
|
|
90
|
+
/** Original upstream resource URI. */
|
|
91
|
+
uri: string;
|
|
92
|
+
/** Human-readable resource title. */
|
|
93
|
+
title?: string | undefined;
|
|
94
|
+
/** Human-readable resource description. */
|
|
95
|
+
description?: string | undefined;
|
|
96
|
+
/** Resource media type. */
|
|
97
|
+
mimeType?: string | undefined;
|
|
98
|
+
}
|
|
99
|
+
/** Prompt metadata consumed while introspecting an upstream connection. */
|
|
100
|
+
export interface ProxyPrompt {
|
|
101
|
+
/** Upstream prompt name. */
|
|
102
|
+
name: string;
|
|
103
|
+
/** Human-readable prompt title. */
|
|
104
|
+
title?: string | undefined;
|
|
105
|
+
/** Human-readable prompt description. */
|
|
106
|
+
description?: string | undefined;
|
|
107
|
+
/** String arguments accepted by the prompt. */
|
|
108
|
+
arguments?: PromptArgument[] | undefined;
|
|
109
|
+
}
|
|
110
|
+
/** Registration surface used while mounting proxied capabilities. @internal */
|
|
111
|
+
export interface ProxyMountHost {
|
|
112
|
+
/** Whether the parent server has mounted its handler. */
|
|
113
|
+
isStarted(): boolean;
|
|
114
|
+
/** Whether a tool name is already registered. */
|
|
115
|
+
hasTool(name: string): boolean;
|
|
116
|
+
/** Whether a resource name is already registered. */
|
|
117
|
+
hasResource(name: string): boolean;
|
|
118
|
+
/** Whether a prompt name is already registered. */
|
|
119
|
+
hasPrompt(name: string): boolean;
|
|
120
|
+
/** Register a proxied tool. */
|
|
121
|
+
registerTool(definition: ToolDefinition, callback: ToolCallback): void;
|
|
122
|
+
/** Register a proxied resource. */
|
|
123
|
+
registerResource(definition: ResourceDefinition, callback: ResourceCallback): void;
|
|
124
|
+
/** Register a proxied prompt. */
|
|
125
|
+
registerPrompt(definition: PromptDefinition, callback: PromptCallback): void;
|
|
126
|
+
/** Track a proxy client owned by the parent server. */
|
|
127
|
+
trackOwner(owner: {
|
|
128
|
+
close(): Promise<void>;
|
|
129
|
+
}): void;
|
|
130
|
+
/** Record one successfully introspected upstream namespace. */
|
|
131
|
+
trackNamespace?(counts: {
|
|
132
|
+
tools: number;
|
|
133
|
+
resources: number;
|
|
134
|
+
prompts: number;
|
|
135
|
+
}): void;
|
|
136
|
+
}
|
|
137
|
+
/** Convert a missing optional-client import into the proxy install error. @internal */
|
|
138
|
+
export declare function proxyClientInstallError(error: unknown): Error | undefined;
|
|
139
|
+
/**
|
|
140
|
+
* Mount one existing upstream connection on a parent server.
|
|
141
|
+
*
|
|
142
|
+
* @param host - Parent server registration surface.
|
|
143
|
+
* @param connection - Ready `@mcp-use/client` v2 connection.
|
|
144
|
+
* @internal
|
|
145
|
+
*/
|
|
146
|
+
export declare function mountProxyConnection(host: ProxyMountHost, connection: ProxyConnection): Promise<void>;
|
|
147
|
+
/**
|
|
148
|
+
* Connect and mount namespace-keyed upstream servers through
|
|
149
|
+
* `@mcp-use/client` v2.
|
|
150
|
+
*
|
|
151
|
+
* @param host - Parent server registration surface.
|
|
152
|
+
* @param servers - Namespace-keyed upstream client configuration.
|
|
153
|
+
*
|
|
154
|
+
* @internal
|
|
155
|
+
*/
|
|
156
|
+
export declare function mountProxyServers(host: ProxyMountHost, servers: Record<string, ProxyServerConfig>): Promise<void>;
|
|
157
|
+
/** Determine whether a proxy argument is an existing connection. @internal */
|
|
158
|
+
export declare function isProxyConnection(value: unknown): value is ProxyConnection;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CorsOptions } from "../config.js";
|
|
2
|
+
import type { FetchMiddleware } from "../fetch-app.js";
|
|
3
|
+
/**
|
|
4
|
+
* Fetch middleware that adds CORS headers to every response.
|
|
5
|
+
*
|
|
6
|
+
* @internal Wired from {@link MCPServer} when `ServerConfig.cors` is set.
|
|
7
|
+
*/
|
|
8
|
+
export declare function corsFetchMiddleware(options: CorsOptions): FetchMiddleware;
|
|
9
|
+
/** Whether global CORS middleware owns response headers for view assets. */
|
|
10
|
+
export declare function isGlobalCorsEnabled(cors: CorsOptions | undefined): boolean;
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import type { AuthInfo, HandlerResultTypeMap, RequestTypeMap, ResultTypeMap } from "@modelcontextprotocol/server";
|
|
2
|
+
import type { Context, Env, HonoRequest } from "hono";
|
|
3
|
+
declare const MCP_MIDDLEWARE_METHODS: readonly ["tools/call", "tools/list", "resources/read", "resources/list", "prompts/get", "prompts/list"];
|
|
4
|
+
/** MCP methods currently intercepted by {@link MCPServer.use}. */
|
|
5
|
+
export type McpMiddlewareMethod = (typeof MCP_MIDDLEWARE_METHODS)[number];
|
|
6
|
+
/** Params exposed by the SDK for a particular MCP request method. */
|
|
7
|
+
export type McpMiddlewareParams<M extends McpMiddlewareMethod> = RequestTypeMap[M] extends {
|
|
8
|
+
params?: infer P;
|
|
9
|
+
} ? NonNullable<P> : Record<string, never>;
|
|
10
|
+
/**
|
|
11
|
+
* Method-specific params and middleware result types.
|
|
12
|
+
*
|
|
13
|
+
* List middleware intentionally operates on item arrays rather than protocol
|
|
14
|
+
* result envelopes. The server wrapper preserves the envelope around the
|
|
15
|
+
* transformed array.
|
|
16
|
+
*/
|
|
17
|
+
export interface McpMiddlewareOperationMap {
|
|
18
|
+
"tools/call": {
|
|
19
|
+
params: McpMiddlewareParams<"tools/call">;
|
|
20
|
+
result: HandlerResultTypeMap["tools/call"];
|
|
21
|
+
};
|
|
22
|
+
"tools/list": {
|
|
23
|
+
params: McpMiddlewareParams<"tools/list">;
|
|
24
|
+
result: ResultTypeMap["tools/list"]["tools"];
|
|
25
|
+
};
|
|
26
|
+
"resources/read": {
|
|
27
|
+
params: McpMiddlewareParams<"resources/read">;
|
|
28
|
+
result: HandlerResultTypeMap["resources/read"];
|
|
29
|
+
};
|
|
30
|
+
"resources/list": {
|
|
31
|
+
params: McpMiddlewareParams<"resources/list">;
|
|
32
|
+
result: ResultTypeMap["resources/list"]["resources"];
|
|
33
|
+
};
|
|
34
|
+
"prompts/get": {
|
|
35
|
+
params: McpMiddlewareParams<"prompts/get">;
|
|
36
|
+
result: HandlerResultTypeMap["prompts/get"];
|
|
37
|
+
};
|
|
38
|
+
"prompts/list": {
|
|
39
|
+
params: McpMiddlewareParams<"prompts/list">;
|
|
40
|
+
result: ResultTypeMap["prompts/list"]["prompts"];
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/** Result exposed to middleware for a particular MCP method. */
|
|
44
|
+
export type McpMiddlewareResult<M extends McpMiddlewareMethod> = McpMiddlewareOperationMap[M]["result"];
|
|
45
|
+
/**
|
|
46
|
+
* Rebuild an SDK request with the params currently held by middleware.
|
|
47
|
+
*
|
|
48
|
+
* Middleware may replace `ctx.params`, so forwarding the request object that
|
|
49
|
+
* was captured before the chain ran would silently discard that replacement.
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
export declare function withMcpMiddlewareParams<M extends McpMiddlewareMethod>(request: unknown, params: McpMiddlewareOperationMap[M]["params"]): RequestTypeMap[M];
|
|
53
|
+
type MiddlewareContextCommon<TEnv extends Env = Env> = Omit<Context<TEnv>, "req"> & {
|
|
54
|
+
/** Hono request for the originating HTTP exchange. */
|
|
55
|
+
request?: HonoRequest;
|
|
56
|
+
/**
|
|
57
|
+
* Deprecated v1-compatible alias for {@link MiddlewareContext.request}.
|
|
58
|
+
*
|
|
59
|
+
* @deprecated Use `request` instead.
|
|
60
|
+
*/
|
|
61
|
+
req?: HonoRequest;
|
|
62
|
+
/** Session info when the underlying transport provides a session ID. */
|
|
63
|
+
session?: {
|
|
64
|
+
sessionId: string;
|
|
65
|
+
};
|
|
66
|
+
/** OAuth info extracted from the validated access token. */
|
|
67
|
+
auth?: AuthInfo;
|
|
68
|
+
/** Shared state for middleware participating in this request. */
|
|
69
|
+
state: Map<string, unknown>;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Context passed to MCP middleware.
|
|
73
|
+
*
|
|
74
|
+
* The conditional form preserves the correlation between `method` and
|
|
75
|
+
* `params` when more than one method is represented.
|
|
76
|
+
*/
|
|
77
|
+
export type MiddlewareContext<M extends McpMiddlewareMethod = McpMiddlewareMethod, TEnv extends Env = Env> = M extends McpMiddlewareMethod ? MiddlewareContextCommon<TEnv> & {
|
|
78
|
+
method: M;
|
|
79
|
+
params: McpMiddlewareOperationMap[M]["params"];
|
|
80
|
+
} : never;
|
|
81
|
+
/** Preferred explicit name for the method-correlated middleware context. */
|
|
82
|
+
export type McpMiddlewareContext<M extends McpMiddlewareMethod = McpMiddlewareMethod, TEnv extends Env = Env> = MiddlewareContext<M, TEnv>;
|
|
83
|
+
/** Context with narrowed params for `tools/call`. */
|
|
84
|
+
export type ToolsCallMiddlewareContext = MiddlewareContext<"tools/call">;
|
|
85
|
+
/** Context with narrowed params for `tools/list`. */
|
|
86
|
+
export type ToolsListMiddlewareContext = MiddlewareContext<"tools/list">;
|
|
87
|
+
/** Context with narrowed params for `resources/read`. */
|
|
88
|
+
export type ResourcesReadMiddlewareContext = MiddlewareContext<"resources/read">;
|
|
89
|
+
/** Context with narrowed params for `resources/list`. */
|
|
90
|
+
export type ResourcesListMiddlewareContext = MiddlewareContext<"resources/list">;
|
|
91
|
+
/** Context with narrowed params for `prompts/get`. */
|
|
92
|
+
export type PromptsGetMiddlewareContext = MiddlewareContext<"prompts/get">;
|
|
93
|
+
/** Context with narrowed params for `prompts/list`. */
|
|
94
|
+
export type PromptsListMiddlewareContext = MiddlewareContext<"prompts/list">;
|
|
95
|
+
/** Map retained for compatibility and convenient indexed lookup. */
|
|
96
|
+
export type McpMiddlewarePatternMap<TEnv extends Env = Env> = {
|
|
97
|
+
[M in McpMiddlewareMethod]: MiddlewareContext<M, TEnv>;
|
|
98
|
+
};
|
|
99
|
+
/** Continue the middleware chain with the result type for method `M`. */
|
|
100
|
+
export type McpMiddlewareNext<M extends McpMiddlewareMethod> = () => Promise<McpMiddlewareResult<M>>;
|
|
101
|
+
/** Middleware for one exact MCP method. */
|
|
102
|
+
export type McpExactMiddlewareFn<M extends McpMiddlewareMethod, TEnv extends Env = Env> = (ctx: MiddlewareContext<M, TEnv>, next: McpMiddlewareNext<M>) => Promise<McpMiddlewareResult<M>>;
|
|
103
|
+
/**
|
|
104
|
+
* Type-preserving middleware over every wrapped MCP method.
|
|
105
|
+
*
|
|
106
|
+
* The global wildcard cannot inspect or replace a method-specific result. Its `next`
|
|
107
|
+
* resolves after downstream middleware, and the composer propagates that
|
|
108
|
+
* downstream result unchanged. It must call `next()` or throw.
|
|
109
|
+
*/
|
|
110
|
+
export type McpMiddlewareFn<Methods extends McpMiddlewareMethod = McpMiddlewareMethod, TEnv extends Env = Env> = (ctx: MiddlewareContext<Methods, TEnv>, next: () => Promise<void>) => Promise<void>;
|
|
111
|
+
/** Exact MCP middleware methods plus the global pass-through wildcard. */
|
|
112
|
+
export type McpMiddlewarePatternBody = McpMiddlewareMethod | "*";
|
|
113
|
+
/** Canonical `mcp:` middleware patterns. */
|
|
114
|
+
export type McpMiddlewarePattern = `mcp:${McpMiddlewarePatternBody}`;
|
|
115
|
+
/** Observer patterns additionally support grouping related MCP methods. */
|
|
116
|
+
export type McpEventPatternBody = McpMiddlewarePatternBody | "tools/*" | "resources/*" | "prompts/*";
|
|
117
|
+
type McpEventBasePattern = `mcp:${McpEventPatternBody}`;
|
|
118
|
+
type StripMcpPrefix<P extends string> = P extends `mcp:${infer Body}` ? Body : P;
|
|
119
|
+
/** Methods selected by an MCP middleware or observer pattern. */
|
|
120
|
+
export type McpMiddlewareMethodsForPattern<P extends string> = StripMcpPrefix<P> extends infer Body ? Body extends McpMiddlewareMethod ? Body : Body extends "tools/*" ? Extract<McpMiddlewareMethod, `tools/${string}`> : Body extends "resources/*" ? Extract<McpMiddlewareMethod, `resources/${string}`> : Body extends "prompts/*" ? Extract<McpMiddlewareMethod, `prompts/${string}`> : Body extends "*" ? McpMiddlewareMethod : never : never;
|
|
121
|
+
/** Infer an exact or type-preserving wildcard handler from pattern `P`. */
|
|
122
|
+
export type McpMiddlewareFnFor<P extends McpMiddlewarePattern, TEnv extends Env = Env> = StripMcpPrefix<P> extends infer Body ? Body extends McpMiddlewareMethod ? McpExactMiddlewareFn<Body, TEnv> : McpMiddlewareFn<McpMiddlewareMethodsForPattern<P>, TEnv> : never;
|
|
123
|
+
/**
|
|
124
|
+
* Type-erased middleware adapter stored after registration.
|
|
125
|
+
*
|
|
126
|
+
* Exact handlers and the global wildcard are adapted to this common callable
|
|
127
|
+
* shape before insertion, following the SDK's request-handler storage model.
|
|
128
|
+
* @internal
|
|
129
|
+
*/
|
|
130
|
+
export interface McpMiddlewareEntry {
|
|
131
|
+
pattern: string;
|
|
132
|
+
handler: (ctx: MiddlewareContext, next: () => Promise<unknown>) => Promise<unknown>;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Adapt a public method-correlated handler for type-erased internal storage.
|
|
136
|
+
*
|
|
137
|
+
* The overload retains the public pattern/handler correlation. The broad
|
|
138
|
+
* implementation signature is the deliberate erasure boundary, like the
|
|
139
|
+
* official SDK's `setRequestHandler` implementation.
|
|
140
|
+
*/
|
|
141
|
+
export declare function createMcpMiddlewareEntry<P extends McpMiddlewarePattern, TEnv extends Env = Env>(pattern: P, handler: McpMiddlewareFnFor<P, TEnv>): McpMiddlewareEntry;
|
|
142
|
+
/** Phase for MCP observer event listeners registered via `server.on()`. */
|
|
143
|
+
export type McpEventPhase = "before" | "complete";
|
|
144
|
+
/** Read-only observer context correlated by MCP method. */
|
|
145
|
+
export type ReadonlyMiddlewareContext<M extends McpMiddlewareMethod = McpMiddlewareMethod, TEnv extends Env = Env> = M extends McpMiddlewareMethod ? Omit<MiddlewareContext<M, TEnv>, "params" | "state"> & {
|
|
146
|
+
readonly params: Readonly<McpMiddlewareOperationMap[M]["params"]>;
|
|
147
|
+
readonly state: ReadonlyMap<string, unknown>;
|
|
148
|
+
} : never;
|
|
149
|
+
/** Read-only observer invoked before an MCP handler runs. */
|
|
150
|
+
export type McpEventListenerFn<Methods extends McpMiddlewareMethod = McpMiddlewareMethod, TEnv extends Env = Env> = <M extends Methods>(ctx: ReadonlyMiddlewareContext<M, TEnv>) => void;
|
|
151
|
+
/** Read-only observer invoked after an MCP handler completes. */
|
|
152
|
+
export type McpCompleteEventListenerFn<Methods extends McpMiddlewareMethod = McpMiddlewareMethod, TEnv extends Env = Env> = <M extends Methods>(ctx: ReadonlyMiddlewareContext<M, TEnv>, result: McpMiddlewareResult<M>) => void;
|
|
153
|
+
type McpExactEventListenerFn<M extends McpMiddlewareMethod, TEnv extends Env = Env> = (ctx: ReadonlyMiddlewareContext<M, TEnv>) => void;
|
|
154
|
+
type McpExactCompleteEventListenerFn<M extends McpMiddlewareMethod, TEnv extends Env = Env> = (ctx: ReadonlyMiddlewareContext<M, TEnv>, result: McpMiddlewareResult<M>) => void;
|
|
155
|
+
/** MCP observer pattern, optionally targeting the completion phase. */
|
|
156
|
+
export type McpEventPattern = McpEventBasePattern | `${McpEventBasePattern}:complete`;
|
|
157
|
+
type StripCompleteSuffix<P extends string> = P extends `${infer Body}:complete` ? Body : P;
|
|
158
|
+
/** Infer a typed before/complete observer from event pattern `P`. */
|
|
159
|
+
export type McpEventListenerFnFor<P extends McpEventPattern, TEnv extends Env = Env> = StripCompleteSuffix<StripMcpPrefix<P>> extends infer Body ? Body extends McpMiddlewareMethod ? P extends `${string}:complete` ? McpExactCompleteEventListenerFn<Body, TEnv> : McpExactEventListenerFn<Body, TEnv> : P extends `${string}:complete` ? McpCompleteEventListenerFn<McpMiddlewareMethodsForPattern<StripCompleteSuffix<P>>, TEnv> : McpEventListenerFn<McpMiddlewareMethodsForPattern<StripCompleteSuffix<P>>, TEnv> : never;
|
|
160
|
+
/** Internal type-erased observer entry. @internal */
|
|
161
|
+
export interface McpEventListenerEntry {
|
|
162
|
+
pattern: string;
|
|
163
|
+
phase: McpEventPhase;
|
|
164
|
+
handler: (ctx: ReadonlyMiddlewareContext, result?: unknown) => void;
|
|
165
|
+
}
|
|
166
|
+
/** Adapt a public method-correlated observer for type-erased storage. */
|
|
167
|
+
export declare function createMcpEventListenerEntry<P extends McpEventPattern, TEnv extends Env = Env>(pattern: P, handler: McpEventListenerFnFor<P, TEnv>): McpEventListenerEntry;
|
|
168
|
+
/** Test whether a registered middleware or observer pattern matches a method. */
|
|
169
|
+
export declare function matchesPattern(pattern: string, method: string): boolean;
|
|
170
|
+
/** Compose matching middleware in FIFO registration order. */
|
|
171
|
+
export declare function composeMiddleware<M extends McpMiddlewareMethod, TEnv extends Env = Env>(entries: McpMiddlewareEntry[], method: M, innerFn: () => Promise<McpMiddlewareResult<M>>): (ctx: MiddlewareContext<M, TEnv>) => Promise<McpMiddlewareResult<M>>;
|
|
172
|
+
/** Build a read-only snapshot of middleware context for observer events. */
|
|
173
|
+
export declare function freezeMiddlewareContext<M extends McpMiddlewareMethod, TEnv extends Env = Env>(ctx: MiddlewareContext<M, TEnv>): ReadonlyMiddlewareContext<M, TEnv>;
|
|
174
|
+
/** Run before/complete observers around a method-correlated middleware chain. */
|
|
175
|
+
export declare function runMcpOperation<M extends McpMiddlewareMethod, TEnv extends Env = Env>(middlewares: McpMiddlewareEntry[], events: McpEventListenerEntry[], method: M, ctx: MiddlewareContext<M, TEnv>, innerFn: () => Promise<McpMiddlewareResult<M>>): Promise<McpMiddlewareResult<M>>;
|
|
176
|
+
/** Strip `mcp:` prefix and optional `:complete` suffix from event patterns. */
|
|
177
|
+
export declare function parseMcpPattern(raw: string): {
|
|
178
|
+
pattern: string;
|
|
179
|
+
phase: McpEventPhase;
|
|
180
|
+
};
|
|
181
|
+
/** Normalize middleware pattern strings by stripping the `mcp:` prefix. */
|
|
182
|
+
export declare function normalizeMcpMiddlewarePattern(raw: string): string;
|
|
183
|
+
export {};
|
package/dist/mount-mcp.d.ts
CHANGED
|
@@ -44,8 +44,3 @@ export interface McpMount {
|
|
|
44
44
|
* ```
|
|
45
45
|
*/
|
|
46
46
|
export declare function createMcpMount(factory: McpServerFactory, options?: MountMcpOptions): McpMount;
|
|
47
|
-
/**
|
|
48
|
-
* @deprecated Use {@link createMcpMount} — returns the same mount without Hono.
|
|
49
|
-
*/
|
|
50
|
-
export declare function mountMcp(factory: McpServerFactory, options?: MountMcpOptions): McpMount;
|
|
51
|
-
//# sourceMappingURL=mount-mcp.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
interface NextHeader {
|
|
2
|
+
key: string;
|
|
3
|
+
value: string;
|
|
4
|
+
}
|
|
5
|
+
interface NextHeaderRule {
|
|
6
|
+
source: string;
|
|
7
|
+
headers: NextHeader[];
|
|
8
|
+
}
|
|
9
|
+
/** Minimal structural Next.js config type, avoiding a runtime Next dependency. */
|
|
10
|
+
export interface NextConfigLike {
|
|
11
|
+
/** Preserve arbitrary Next.js settings while augmenting the fields we use. */
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
headers?: () => NextHeaderRule[] | Promise<NextHeaderRule[]>;
|
|
14
|
+
outputFileTracingIncludes?: Record<string, string[]>;
|
|
15
|
+
}
|
|
16
|
+
/** Options for {@link withMcpUse}. */
|
|
17
|
+
export interface WithMcpUseOptions {
|
|
18
|
+
/** Authored MCP server entry, relative to `projectRoot`. */
|
|
19
|
+
entry?: string;
|
|
20
|
+
/** Conventional MCP source directory containing the entry and `views/`. */
|
|
21
|
+
mcpDir?: string;
|
|
22
|
+
/** Explicit views directory, relative to `projectRoot`. */
|
|
23
|
+
viewsDir?: string;
|
|
24
|
+
/** MCP route mounted by the application. Defaults to `/api/mcp`. */
|
|
25
|
+
basePath?: string;
|
|
26
|
+
/** Next.js project root. Defaults to `process.cwd()`. */
|
|
27
|
+
projectRoot?: string;
|
|
28
|
+
}
|
|
29
|
+
/** @internal Exported for focused composition tests, not from `mcp-use/next`. */
|
|
30
|
+
export declare function composeNextConfig<T extends NextConfigLike>(nextConfig: T, basePath: string): T & NextConfigLike;
|
|
31
|
+
/**
|
|
32
|
+
* Add mcp-use build, CORS, and serverless tracing to a Next.js config.
|
|
33
|
+
*
|
|
34
|
+
* The MCP build runs when Next evaluates `next.config`, for both development
|
|
35
|
+
* and production builds. This removes the need for a separate prebuild script.
|
|
36
|
+
*/
|
|
37
|
+
export declare function withMcpUse<T extends NextConfigLike = NextConfigLike>(nextConfig?: T, options?: WithMcpUseOptions): Promise<T & NextConfigLike>;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { MCPServer } from "../server.js";
|
|
2
|
+
/** Route Handler exports returned by {@link createNextHandler}. */
|
|
3
|
+
export interface NextMcpHandlers {
|
|
4
|
+
GET(request: Request): Promise<Response>;
|
|
5
|
+
POST(request: Request): Promise<Response>;
|
|
6
|
+
DELETE(request: Request): Promise<Response>;
|
|
7
|
+
OPTIONS(request: Request): Promise<Response>;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Create App Router method exports for an authored MCP server.
|
|
11
|
+
*
|
|
12
|
+
* The generated artifact contains only view registration data; application
|
|
13
|
+
* source continues to import its own server module. Initialization is lazy so
|
|
14
|
+
* importing a route during `next build` does not perform filesystem I/O.
|
|
15
|
+
*/
|
|
16
|
+
export declare function createNextHandler<TUser>(server: MCPServer<TUser>): NextMcpHandlers;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{readFile}from"fs/promises";import{join}from"path";function isViewManifestEntry(value){return typeof value!="object"||value===null||!("kind"in value)?!1:value.kind==="inline"?"js"in value&&typeof value.js=="string"&&"css"in value&&typeof value.css=="string":value.kind==="external"&&"entry"in value&&typeof value.entry=="string"&&"css"in value&&Array.isArray(value.css)&&value.css.every(item=>typeof item=="string")&&(!("scripts"in value)||Array.isArray(value.scripts)&&value.scripts.every(item=>typeof item=="string"))}function parseBuildManifest(raw,manifestPath){let parsed;try{parsed=JSON.parse(raw)}catch(error){let reason=error instanceof Error?error.message:String(error);throw new Error(`Invalid mcp-use build manifest at ${manifestPath}: ${reason}`)}if(typeof parsed!="object"||parsed===null||Array.isArray(parsed)||!("views"in parsed)||typeof parsed.views!="object"||parsed.views===null||Array.isArray(parsed.views)||!Object.values(parsed.views).every(isViewManifestEntry))throw new Error(`Invalid mcp-use build manifest at ${manifestPath}.`);return parsed.views}function createNextHandler(server){let projectRoot=process.cwd(),manifestPath=join(process.cwd(),".mcp-use","build","manifest.json"),handlerPromise,initialize=async()=>{let raw;try{raw=await readFile(manifestPath,"utf8")}catch(error){throw(typeof error=="object"&&error!==null&&"code"in error?error.code:void 0)==="ENOENT"?new Error(`No mcp-use build found at ${manifestPath}. Wrap next.config with withMcpUse() before mounting this route.`):error}return server.__primeViews(parseBuildManifest(raw,manifestPath),{projectRoot}),async request=>server.fetch(request)},handle=async request=>(handlerPromise??=initialize(),(await handlerPromise)(request));return{GET:handle,POST:handle,DELETE:handle,OPTIONS:async()=>new Response(null,{status:204,headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, POST, DELETE, OPTIONS","Access-Control-Allow-Headers":"Authorization, Content-Type, Accept, Mcp-Protocol-Version, Mcp-Method, Mcp-Name, Mcp-Session-Id, Last-Event-ID","Access-Control-Expose-Headers":"Mcp-Session-Id"}})}}var DEFAULT_BASE_PATH="/api/mcp",BUILD_TRACE_GLOB="./.mcp-use/build/**/*",MCP_CORS_HEADERS=[{key:"Access-Control-Allow-Origin",value:"*"},{key:"Access-Control-Allow-Methods",value:"GET, POST, DELETE, OPTIONS"},{key:"Access-Control-Allow-Headers",value:"Authorization, Content-Type, Accept, Mcp-Protocol-Version, Mcp-Method, Mcp-Name, Mcp-Session-Id, Last-Event-ID"},{key:"Access-Control-Expose-Headers",value:"Mcp-Session-Id"}];function normalizeBasePath(value){let raw=value??DEFAULT_BASE_PATH;if(!raw.startsWith("/")||raw==="/"||raw.includes(":"))throw new Error(`withMcpUse basePath must be a concrete absolute path; received ${JSON.stringify(raw)}.`);return raw.replace(/\/+$/,"")}function mergeHeaders(existing,additions){let next=[...existing];for(let header of additions){let index=next.findIndex(candidate=>candidate.key.toLowerCase()===header.key.toLowerCase());index===-1?next.push(header):next[index]=header}return next}async function buildMcpProject(projectRoot,options){let{spawn}=process.getBuiltinModule("node:child_process"),{fileURLToPath}=process.getBuiltinModule("node:url"),args=[fileURLToPath(new URL("../bin.js",import.meta.url)),"build"];options.entry!==void 0&&args.push("--entry",options.entry),options.mcpDir!==void 0&&args.push("--mcp-dir",options.mcpDir),options.viewsDir!==void 0&&args.push("--views-dir",options.viewsDir),await new Promise((resolvePromise,reject)=>{let child=spawn(process.execPath,args,{cwd:projectRoot,env:process.env,stdio:"inherit"});child.once("error",reject),child.once("exit",(code,signal)=>{if(code===0){resolvePromise();return}reject(new Error(`mcp-use build failed${code===null?` with signal ${signal}`:` with exit code ${code}`}.`))})})}function composeNextConfig(nextConfig,basePath){let source=`${basePath}/:path*`,originalHeaders=nextConfig.headers?.bind(nextConfig),existingTrace=nextConfig.outputFileTracingIncludes??{},routeTrace=existingTrace[basePath]??[];return{...nextConfig,async headers(){let rules=originalHeaders===void 0?[]:await originalHeaders(),matchingIndex=rules.findIndex(rule=>rule.source===source);return matchingIndex===-1?[...rules,{source,headers:MCP_CORS_HEADERS}]:rules.map((rule,index)=>index===matchingIndex?{...rule,headers:mergeHeaders(rule.headers,MCP_CORS_HEADERS)}:rule)},outputFileTracingIncludes:{...existingTrace,[basePath]:[...new Set([...routeTrace,BUILD_TRACE_GLOB])]}}}async function withMcpUse(nextConfig={},options={}){let basePath=normalizeBasePath(options.basePath),projectRoot=options.projectRoot??process.cwd();return await buildMcpProject(projectRoot,options),composeNextConfig(nextConfig,basePath)}export{createNextHandler,withMcpUse};
|
package/dist/node-bridge.d.ts
CHANGED
|
@@ -49,4 +49,3 @@ export interface ToWebRequestOptions {
|
|
|
49
49
|
* @param options - Optional abort signal for the constructed request.
|
|
50
50
|
*/
|
|
51
51
|
export declare function toWebRequest(req: NodeIncomingMessageLike, parsedBody?: unknown, options?: ToWebRequestOptions): Promise<Request>;
|
|
52
|
-
//# sourceMappingURL=node-bridge.d.ts.map
|