mcp-use 2.0.0-beta.8 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -179
- package/dist/branding.d.ts +81 -0
- package/dist/buffered-response.d.ts +27 -0
- package/dist/chunk-273ZVKJJ.js +2 -0
- package/dist/{chunk-FCGJJVL2.js → chunk-GX6PGIEO.js} +33 -142
- package/dist/chunk-IS7FKXFR.js +1 -0
- package/dist/chunk-KGTOBJW2.js +1 -0
- package/dist/chunk-MIZQEWZS.js +1 -0
- package/dist/chunk-OJF6B5EU.js +1 -0
- package/dist/chunk-PSKSL567.js +1 -0
- package/dist/chunk-XYHHP43G.js +1 -0
- package/dist/chunk-Y26DNVWA.js +3 -0
- package/dist/chunk-ZMU5USAZ.js +1 -0
- package/dist/completable.d.ts +0 -1
- package/dist/config.d.ts +88 -80
- package/dist/context.d.ts +154 -60
- package/dist/fetch-app.d.ts +3 -28
- package/dist/index-node.js +781 -0
- package/dist/index.d.ts +34 -14
- package/dist/index.js +41 -2229
- package/dist/internal/node-http-unavailable.js +1 -0
- package/dist/internal/node-http.js +1 -0
- package/dist/internal/resource-completion.js +1 -7
- package/dist/internal/usage.js +1 -0
- package/dist/landing-handler-TG6LVQBI.js +1 -0
- package/dist/landing-handler.d.ts +3 -2
- package/dist/landing.d.ts +19 -5
- package/dist/landing.js +1 -7
- 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 +0 -1
- package/dist/middleware/mcp-middleware.d.ts +178 -104
- package/dist/mount-mcp.d.ts +0 -1
- package/dist/next/config.d.ts +67 -0
- package/dist/next/handler.d.ts +32 -0
- package/dist/next/index.d.ts +9 -0
- package/dist/next/index.js +1 -0
- package/dist/node-bridge.d.ts +33 -4
- package/dist/node-bridge.js +1 -151
- package/dist/node-http-unavailable.d.ts +9 -0
- package/dist/node-http.d.ts +2 -0
- package/dist/oauth/adapters.d.ts +0 -1
- package/dist/oauth/auth0.d.ts +24 -1
- package/dist/oauth/auth0.js +1 -61
- package/dist/oauth/better-auth.d.ts +23 -1
- package/dist/oauth/better-auth.js +1 -76
- package/dist/oauth/clerk.d.ts +30 -3
- package/dist/oauth/clerk.js +1 -70
- package/dist/oauth/errors.d.ts +3 -0
- package/dist/oauth/guards.d.ts +0 -1
- package/dist/oauth/index.d.ts +0 -1
- package/dist/oauth/index.js +1 -28
- package/dist/oauth/internal.d.ts +0 -1
- package/dist/oauth/jwt.d.ts +10 -4
- package/dist/oauth/keycloak.d.ts +28 -1
- package/dist/oauth/keycloak.js +1 -94
- package/dist/oauth/provider.d.ts +17 -2
- package/dist/oauth/supabase.d.ts +38 -2
- package/dist/oauth/supabase.js +1 -101
- package/dist/oauth/workos.d.ts +27 -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 +3 -1
- package/dist/react/components/image.d.ts +0 -1
- package/dist/react/components/model-context.d.ts +8 -57
- package/dist/react/components/theme-provider.d.ts +7 -4
- 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 +0 -1
- 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 +3 -4
- package/dist/react/index.d.ts +9 -9
- package/dist/react/index.js +286 -131
- package/dist/react/public-assets.d.ts +21 -6
- package/dist/react/runtime/bootstrap-view.d.ts +3 -4
- 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 +4 -6
- package/dist/react/types/file-types.d.ts +2 -1
- package/dist/react/types/host-types.d.ts +2 -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 +0 -1
- package/dist/resources.d.ts +14 -6
- package/dist/response-conversion.d.ts +25 -0
- package/dist/response-helpers.d.ts +231 -0
- package/dist/server.d.ts +134 -50
- package/dist/tools.d.ts +14 -14
- package/dist/usage.d.ts +14 -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 +5 -4
- package/dist/views/register.d.ts +1 -2
- package/dist/views/routes.d.ts +4 -3
- package/dist/views/types.d.ts +21 -17
- package/dist/views/wire.d.ts +7 -7
- package/dist/vite-client.d.ts +1 -0
- package/package.json +41 -21
- 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-DPL7OEXC.js +0 -518
- package/dist/chunk-DPL7OEXC.js.map +0 -1
- package/dist/chunk-DQ7LE4ZA.js +0 -237
- package/dist/chunk-DQ7LE4ZA.js.map +0 -1
- package/dist/chunk-FC2Z2VFO.js +0 -99
- package/dist/chunk-FC2Z2VFO.js.map +0 -1
- package/dist/chunk-FCGJJVL2.js.map +0 -1
- package/dist/chunk-IG2BCCMU.js +0 -98
- package/dist/chunk-IG2BCCMU.js.map +0 -1
- package/dist/chunk-KIZ72TIK.js +0 -38
- package/dist/chunk-KIZ72TIK.js.map +0 -1
- package/dist/chunk-QUUANIE4.js +0 -125
- package/dist/chunk-QUUANIE4.js.map +0 -1
- package/dist/chunk-RQRT27Q3.js +0 -454
- package/dist/chunk-RQRT27Q3.js.map +0 -1
- package/dist/chunk-STCR3P5O.js +0 -95
- package/dist/chunk-STCR3P5O.js.map +0 -1
- package/dist/chunk-XUD22N3Y.js +0 -156
- package/dist/chunk-XUD22N3Y.js.map +0 -1
- package/dist/chunk-Z326HADF.js +0 -82
- package/dist/chunk-Z326HADF.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/tools-declaration.d.ts +0 -22
- package/dist/cli/tools-declaration.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 -370
- 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 -656
- 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 -87
- package/dist/inspector-shell.d.ts.map +0 -1
- package/dist/internal/resource-completion.js.map +0 -1
- package/dist/landing-handler-VQRYCQOV.js +0 -31
- package/dist/landing-handler-VQRYCQOV.js.map +0 -1
- package/dist/landing-handler.d.ts.map +0 -1
- package/dist/landing.d.ts.map +0 -1
- package/dist/landing.js.map +0 -1
- package/dist/logging.d.ts.map +0 -1
- package/dist/middleware/cors.d.ts.map +0 -1
- package/dist/middleware/mcp-middleware.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/better-auth.d.ts.map +0 -1
- package/dist/oauth/better-auth.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-26FUVRO5.js +0 -62
- package/dist/public-route-26FUVRO5.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-files.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/file-types.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/resource-completion.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,67 @@
|
|
|
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
|
+
/** Next.js response-header callback augmented with MCP CORS headers. */
|
|
14
|
+
headers?: () => NextHeaderRule[] | Promise<NextHeaderRule[]>;
|
|
15
|
+
/** Next.js output tracing globs augmented with compiled MCP view assets. */
|
|
16
|
+
outputFileTracingIncludes?: Record<string, string[]>;
|
|
17
|
+
}
|
|
18
|
+
/** Options for {@link withMcpUse}. */
|
|
19
|
+
export interface WithMcpUseOptions {
|
|
20
|
+
/**
|
|
21
|
+
* Authored MCP server entry, relative to `projectRoot`.
|
|
22
|
+
*
|
|
23
|
+
* @defaultValue `"mcp/server.ts"`
|
|
24
|
+
*/
|
|
25
|
+
entry?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Conventional MCP source directory containing the entry and `views/`.
|
|
28
|
+
*
|
|
29
|
+
* @defaultValue `"mcp"`
|
|
30
|
+
*/
|
|
31
|
+
mcpDir?: string;
|
|
32
|
+
/** Explicit views directory, relative to `projectRoot`. */
|
|
33
|
+
viewsDir?: string;
|
|
34
|
+
/**
|
|
35
|
+
* MCP route mounted by the application.
|
|
36
|
+
*
|
|
37
|
+
* @defaultValue `"/api/mcp"`
|
|
38
|
+
*/
|
|
39
|
+
basePath?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Next.js project root.
|
|
42
|
+
*
|
|
43
|
+
* @defaultValue `process.cwd()`
|
|
44
|
+
*/
|
|
45
|
+
projectRoot?: string;
|
|
46
|
+
}
|
|
47
|
+
/** @internal Exported for focused composition tests, not from `mcp-use/next`. */
|
|
48
|
+
export declare function composeNextConfig<T extends NextConfigLike>(nextConfig: T, basePath: string): T & NextConfigLike;
|
|
49
|
+
/**
|
|
50
|
+
* Add mcp-use build, CORS, and serverless tracing to a Next.js config.
|
|
51
|
+
*
|
|
52
|
+
* The MCP build runs when Next evaluates `next.config`, for both development
|
|
53
|
+
* and production builds. This removes the need for a separate prebuild script.
|
|
54
|
+
*
|
|
55
|
+
* @param nextConfig - Existing Next.js configuration to augment.
|
|
56
|
+
* @param options - MCP source, route, and project-root settings.
|
|
57
|
+
* @returns The augmented configuration after the MCP project is built.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* import { withMcpUse } from "mcp-use/next";
|
|
62
|
+
*
|
|
63
|
+
* export default withMcpUse();
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
export declare function withMcpUse<T extends NextConfigLike = NextConfigLike>(nextConfig?: T, options?: WithMcpUseOptions): Promise<T & NextConfigLike>;
|
|
67
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { MCPServer } from "../server.js";
|
|
2
|
+
/** Route Handler exports returned by {@link createNextHandler}. */
|
|
3
|
+
export interface NextMcpHandlers {
|
|
4
|
+
/** Handles MCP GET requests. */
|
|
5
|
+
GET(request: Request): Promise<Response>;
|
|
6
|
+
/** Handles MCP POST requests. */
|
|
7
|
+
POST(request: Request): Promise<Response>;
|
|
8
|
+
/** Handles MCP DELETE requests. */
|
|
9
|
+
DELETE(request: Request): Promise<Response>;
|
|
10
|
+
/** Handles CORS preflight requests. */
|
|
11
|
+
OPTIONS(request: Request): Promise<Response>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Create App Router method exports for an authored MCP server.
|
|
15
|
+
*
|
|
16
|
+
* The generated artifact contains only view registration data; application
|
|
17
|
+
* source continues to import its own server module. Initialization is lazy so
|
|
18
|
+
* importing a route during `next build` does not perform filesystem I/O.
|
|
19
|
+
*
|
|
20
|
+
* @typeParam TUser - Authenticated application user type.
|
|
21
|
+
* @param server - MCP server mounted by the route.
|
|
22
|
+
* @returns App Router method exports for the MCP endpoint.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* import { server } from "@/mcp/server";
|
|
27
|
+
* import { createNextHandler } from "mcp-use/next";
|
|
28
|
+
*
|
|
29
|
+
* export const { GET, POST, DELETE, OPTIONS } = createNextHandler(server);
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare function createNextHandler<TUser>(server: MCPServer<TUser>): NextMcpHandlers;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Integrate an MCP server and its compiled views with Next.js App Router.
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
export { createNextHandler } from "./handler.js";
|
|
7
|
+
export type { NextMcpHandlers } from "./handler.js";
|
|
8
|
+
export { withMcpUse } from "./config.js";
|
|
9
|
+
export type { NextConfigLike, WithMcpUseOptions } from "./config.js";
|
|
@@ -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)}.`);let end=raw.length;for(;end>0&&raw.charCodeAt(end-1)===47;)end--;return raw.slice(0,end)}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
|
@@ -1,33 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* ponytail: track upstream SSE/backpressure fixes when bumping `@modelcontextprotocol/server`.
|
|
2
|
+
* Adapt Web-standard MCP handlers to Node.js HTTP request and response objects.
|
|
4
3
|
*
|
|
5
|
-
* @
|
|
4
|
+
* @packageDocumentation
|
|
6
5
|
*/
|
|
7
6
|
import type { AuthInfo, McpHandlerRequestOptions } from "@modelcontextprotocol/server";
|
|
8
7
|
/** Minimal duck-typed shape of a Node.js `IncomingMessage`. */
|
|
9
8
|
export interface NodeIncomingMessageLike extends AsyncIterable<Uint8Array | string> {
|
|
9
|
+
/** HTTP method. Defaults to `GET` when omitted. */
|
|
10
10
|
method?: string | undefined;
|
|
11
|
+
/** Request target. Defaults to `/` when omitted. */
|
|
11
12
|
url?: string | undefined;
|
|
13
|
+
/** Incoming HTTP headers, including `host` or `:authority` when available. */
|
|
12
14
|
headers: Record<string, string | string[] | undefined>;
|
|
15
|
+
/** Verified authentication information forwarded to the Fetch handler. */
|
|
13
16
|
auth?: AuthInfo;
|
|
14
17
|
}
|
|
15
18
|
/** Minimal duck-typed shape of a Node.js `ServerResponse`. */
|
|
16
19
|
export interface NodeServerResponseLike {
|
|
20
|
+
/** Writes the HTTP status and response headers. */
|
|
17
21
|
writeHead(statusCode: number, headers?: Record<string, string>): unknown;
|
|
22
|
+
/** Writes a response-body chunk and returns `false` when backpressure applies. */
|
|
18
23
|
write(chunk: string | Uint8Array): unknown;
|
|
24
|
+
/** Completes the response, optionally with a final body chunk. */
|
|
19
25
|
end(chunk?: string | Uint8Array): unknown;
|
|
26
|
+
/** Subscribes to response lifecycle events such as `close` and `drain`. */
|
|
20
27
|
on(event: string, listener: (...args: unknown[]) => void): unknown;
|
|
28
|
+
/** Whether the underlying response stream has already been destroyed. */
|
|
21
29
|
destroyed?: boolean;
|
|
22
30
|
}
|
|
23
31
|
/** Web-standard fetch face accepted by {@link toNodeHandler}. */
|
|
24
32
|
export interface FetchLikeHandler {
|
|
33
|
+
/** Handles a converted Web-standard request. */
|
|
25
34
|
fetch: (request: Request, options?: McpHandlerRequestOptions) => Promise<Response>;
|
|
26
35
|
}
|
|
27
36
|
/** Node `(req, res, parsedBody?)` handler produced by {@link toNodeHandler}. */
|
|
28
37
|
export type NodeRequestHandler = (req: NodeIncomingMessageLike, res: NodeServerResponseLike, parsedBody?: unknown) => Promise<void>;
|
|
29
38
|
/** Options for {@link toNodeHandler}. */
|
|
30
39
|
export interface ToNodeHandlerOptions {
|
|
40
|
+
/** Observes conversion or handler errors before a JSON-RPC error is returned. */
|
|
31
41
|
onerror?: (error: Error) => void;
|
|
32
42
|
}
|
|
33
43
|
/**
|
|
@@ -35,10 +45,22 @@ export interface ToNodeHandlerOptions {
|
|
|
35
45
|
*
|
|
36
46
|
* @param handler - Handler whose `fetch` receives converted `Request` objects.
|
|
37
47
|
* @param opts - Optional adapter error observer.
|
|
48
|
+
* @returns A Node-compatible asynchronous request handler.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* import { createServer } from "node:http";
|
|
53
|
+
* import { MCPServer } from "mcp-use";
|
|
54
|
+
* import { toNodeHandler } from "mcp-use/node";
|
|
55
|
+
*
|
|
56
|
+
* const server = new MCPServer({ name: "example", version: "1.0.0" });
|
|
57
|
+
* createServer(toNodeHandler(server)).listen(3000);
|
|
58
|
+
* ```
|
|
38
59
|
*/
|
|
39
60
|
export declare function toNodeHandler(handler: FetchLikeHandler, opts?: ToNodeHandlerOptions): NodeRequestHandler;
|
|
40
61
|
/** Options for {@link toWebRequest}. */
|
|
41
62
|
export interface ToWebRequestOptions {
|
|
63
|
+
/** Signal that aborts the constructed request. */
|
|
42
64
|
signal?: AbortSignal;
|
|
43
65
|
}
|
|
44
66
|
/**
|
|
@@ -47,6 +69,13 @@ export interface ToWebRequestOptions {
|
|
|
47
69
|
* @param req - Node `IncomingMessage` (or Express `req`).
|
|
48
70
|
* @param parsedBody - Optional pre-parsed JSON body.
|
|
49
71
|
* @param options - Optional abort signal for the constructed request.
|
|
72
|
+
* @returns A Web-standard request with the Node headers and body.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```ts
|
|
76
|
+
* import { toWebRequest } from "mcp-use/node";
|
|
77
|
+
*
|
|
78
|
+
* const request = await toWebRequest(incomingMessage);
|
|
79
|
+
* ```
|
|
50
80
|
*/
|
|
51
81
|
export declare function toWebRequest(req: NodeIncomingMessageLike, parsedBody?: unknown, options?: ToWebRequestOptions): Promise<Request>;
|
|
52
|
-
//# sourceMappingURL=node-bridge.d.ts.map
|
package/dist/node-bridge.js
CHANGED
|
@@ -1,151 +1 @@
|
|
|
1
|
-
|
|
2
|
-
function toNodeHandler(handler, opts) {
|
|
3
|
-
return async (req, res, parsedBody) => {
|
|
4
|
-
if (typeof parsedBody === "function") {
|
|
5
|
-
parsedBody = void 0;
|
|
6
|
-
}
|
|
7
|
-
let finished = false;
|
|
8
|
-
const abort = new AbortController();
|
|
9
|
-
res.on("close", () => {
|
|
10
|
-
if (!finished) {
|
|
11
|
-
abort.abort();
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
if (res.destroyed === true) {
|
|
15
|
-
abort.abort();
|
|
16
|
-
}
|
|
17
|
-
let response;
|
|
18
|
-
try {
|
|
19
|
-
const request = await toWebRequest(req, parsedBody, {
|
|
20
|
-
signal: abort.signal
|
|
21
|
-
});
|
|
22
|
-
response = await handler.fetch(request, {
|
|
23
|
-
...req.auth !== void 0 && { authInfo: req.auth },
|
|
24
|
-
...parsedBody !== void 0 && { parsedBody }
|
|
25
|
-
});
|
|
26
|
-
} catch (error) {
|
|
27
|
-
try {
|
|
28
|
-
opts?.onerror?.(
|
|
29
|
-
error instanceof Error ? error : new Error(String(error))
|
|
30
|
-
);
|
|
31
|
-
} catch {
|
|
32
|
-
}
|
|
33
|
-
response = internalServerErrorResponse(echoableRequestId(parsedBody));
|
|
34
|
-
}
|
|
35
|
-
const headers = {};
|
|
36
|
-
for (const [name, value] of response.headers) {
|
|
37
|
-
headers[name] = value;
|
|
38
|
-
}
|
|
39
|
-
res.writeHead(response.status, headers);
|
|
40
|
-
if (response.body === null) {
|
|
41
|
-
finished = true;
|
|
42
|
-
res.end();
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
let drainResolve;
|
|
46
|
-
const releaseDrainWait = () => {
|
|
47
|
-
drainResolve?.();
|
|
48
|
-
drainResolve = void 0;
|
|
49
|
-
};
|
|
50
|
-
const waitForDrain = () => new Promise((resolve) => {
|
|
51
|
-
drainResolve = resolve;
|
|
52
|
-
});
|
|
53
|
-
res.on("drain", releaseDrainWait);
|
|
54
|
-
const closed = new Promise((resolve) => {
|
|
55
|
-
abort.signal.addEventListener("abort", () => resolve(), { once: true });
|
|
56
|
-
});
|
|
57
|
-
try {
|
|
58
|
-
for await (const chunk of response.body) {
|
|
59
|
-
if (abort.signal.aborted) {
|
|
60
|
-
break;
|
|
61
|
-
}
|
|
62
|
-
const bytes = chunk instanceof Uint8Array ? chunk : new Uint8Array(chunk);
|
|
63
|
-
if (res.write(bytes) === false) {
|
|
64
|
-
await Promise.race([waitForDrain(), closed]);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
} catch {
|
|
68
|
-
}
|
|
69
|
-
finished = true;
|
|
70
|
-
res.end();
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
async function toWebRequest(req, parsedBody, options) {
|
|
74
|
-
const method = (req.method ?? "GET").toUpperCase();
|
|
75
|
-
const host = singleHeaderValue(req.headers["host"]) ?? singleHeaderValue(req.headers[":authority"]) ?? "localhost";
|
|
76
|
-
const url = `http://${host}${req.url ?? "/"}`;
|
|
77
|
-
const headers = new Headers();
|
|
78
|
-
for (const [name, value] of Object.entries(req.headers)) {
|
|
79
|
-
if (value === void 0 || name.startsWith(":")) {
|
|
80
|
-
continue;
|
|
81
|
-
}
|
|
82
|
-
if (Array.isArray(value)) {
|
|
83
|
-
for (const item of value) {
|
|
84
|
-
headers.append(name, item);
|
|
85
|
-
}
|
|
86
|
-
} else {
|
|
87
|
-
headers.set(name, value);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
let body;
|
|
91
|
-
if (method !== "GET" && method !== "HEAD") {
|
|
92
|
-
if (parsedBody === void 0) {
|
|
93
|
-
const decoder = new TextDecoder();
|
|
94
|
-
let collected = "";
|
|
95
|
-
for await (const chunk of req) {
|
|
96
|
-
collected += typeof chunk === "string" ? chunk : decoder.decode(chunk, { stream: true });
|
|
97
|
-
}
|
|
98
|
-
collected += decoder.decode();
|
|
99
|
-
if (collected.length > 0) {
|
|
100
|
-
body = collected;
|
|
101
|
-
}
|
|
102
|
-
} else {
|
|
103
|
-
const serialized = JSON.stringify(parsedBody);
|
|
104
|
-
headers.delete("content-encoding");
|
|
105
|
-
headers.delete("transfer-encoding");
|
|
106
|
-
if (serialized === void 0) {
|
|
107
|
-
headers.delete("content-length");
|
|
108
|
-
} else {
|
|
109
|
-
body = serialized;
|
|
110
|
-
headers.set(
|
|
111
|
-
"content-length",
|
|
112
|
-
String(new TextEncoder().encode(serialized).byteLength)
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return new Request(url, {
|
|
118
|
-
method,
|
|
119
|
-
headers,
|
|
120
|
-
...options?.signal !== void 0 && { signal: options.signal },
|
|
121
|
-
...body !== void 0 && { body }
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
function singleHeaderValue(value) {
|
|
125
|
-
return Array.isArray(value) ? value[0] : value;
|
|
126
|
-
}
|
|
127
|
-
function echoableRequestId(body) {
|
|
128
|
-
if (body === null || typeof body !== "object" || Array.isArray(body)) {
|
|
129
|
-
return null;
|
|
130
|
-
}
|
|
131
|
-
const { method, id } = body;
|
|
132
|
-
if (typeof method !== "string") {
|
|
133
|
-
return null;
|
|
134
|
-
}
|
|
135
|
-
return typeof id === "string" || typeof id === "number" ? id : null;
|
|
136
|
-
}
|
|
137
|
-
function internalServerErrorResponse(id) {
|
|
138
|
-
return Response.json(
|
|
139
|
-
{
|
|
140
|
-
jsonrpc: "2.0",
|
|
141
|
-
error: { code: -32603, message: "Internal server error" },
|
|
142
|
-
id
|
|
143
|
-
},
|
|
144
|
-
{ status: 500 }
|
|
145
|
-
);
|
|
146
|
-
}
|
|
147
|
-
export {
|
|
148
|
-
toNodeHandler,
|
|
149
|
-
toWebRequest
|
|
150
|
-
};
|
|
151
|
-
//# sourceMappingURL=node-bridge.js.map
|
|
1
|
+
import{toNodeHandler,toWebRequest}from"./chunk-XYHHP43G.js";export{toNodeHandler,toWebRequest};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { createServer as NodeCreateServer } from "node:http";
|
|
2
|
+
/**
|
|
3
|
+
* Non-Node target for the internal conditional Node HTTP import.
|
|
4
|
+
*
|
|
5
|
+
* Fetch-based runtimes never call `listen()`. Keeping this as a runtime error
|
|
6
|
+
* preserves a Node-free package graph for Workers and browser-oriented
|
|
7
|
+
* bundlers while Node resolves the same internal specifier to `node:http`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const createServer: typeof NodeCreateServer;
|
package/dist/oauth/adapters.d.ts
CHANGED
|
@@ -23,4 +23,3 @@ export declare function oauthMetadata<TUser>(provider: OAuthProvider<TUser>, res
|
|
|
23
23
|
* @param request - Request that passed through bearer auth middleware.
|
|
24
24
|
*/
|
|
25
25
|
export declare function authInfoFromRequest(request: Request): AuthInfo | undefined;
|
|
26
|
-
//# sourceMappingURL=adapters.d.ts.map
|
package/dist/oauth/auth0.d.ts
CHANGED
|
@@ -1,17 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verify Auth0 access tokens for an mcp-use resource server.
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
1
6
|
import { type OAuthProvider, type OAuthResourceOptions } from "./provider.js";
|
|
2
7
|
/** Verified Auth0 user claims exposed to authenticated MCP callbacks. */
|
|
3
8
|
export interface Auth0OAuthUser {
|
|
9
|
+
/** Auth0 subject identifier. */
|
|
4
10
|
id: string;
|
|
11
|
+
/** Primary email address, when included in the access token. */
|
|
5
12
|
email?: string;
|
|
13
|
+
/** Display name, when included in the access token. */
|
|
6
14
|
name?: string;
|
|
15
|
+
/** Auth0 nickname, when included in the access token. */
|
|
7
16
|
nickname?: string;
|
|
17
|
+
/** Profile image URL, when included in the access token. */
|
|
8
18
|
picture?: string;
|
|
19
|
+
/** Whether Auth0 has verified {@link Auth0OAuthUser.email}. */
|
|
9
20
|
emailVerified?: boolean;
|
|
21
|
+
/** ISO timestamp for the most recent profile update. */
|
|
10
22
|
updatedAt?: string;
|
|
23
|
+
/** Roles from the access token's `roles` claim. */
|
|
11
24
|
roles: string[];
|
|
12
25
|
}
|
|
13
26
|
/** Configures Auth0 JWT verification and protected-resource metadata. */
|
|
14
27
|
export interface Auth0OAuthProviderOptions extends OAuthResourceOptions {
|
|
28
|
+
/** Auth0 tenant domain or issuer URL. */
|
|
15
29
|
domain: URL | string;
|
|
16
30
|
}
|
|
17
31
|
/**
|
|
@@ -19,6 +33,15 @@ export interface Auth0OAuthProviderOptions extends OAuthResourceOptions {
|
|
|
19
33
|
*
|
|
20
34
|
* @param options - Auth0 domain and resource-server settings.
|
|
21
35
|
* @returns A provider that rejects tokens not issued for the resolved MCP resource.
|
|
36
|
+
* @throws A `TypeError` if `domain` is not a valid HTTP or HTTPS URL.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* import { oauthAuth0Provider } from "mcp-use/oauth/auth0";
|
|
41
|
+
*
|
|
42
|
+
* const oauth = oauthAuth0Provider({
|
|
43
|
+
* domain: "https://example.us.auth0.com",
|
|
44
|
+
* });
|
|
45
|
+
* ```
|
|
22
46
|
*/
|
|
23
47
|
export declare function oauthAuth0Provider(options: Auth0OAuthProviderOptions): OAuthProvider<Auth0OAuthUser>;
|
|
24
|
-
//# sourceMappingURL=auth0.d.ts.map
|
package/dist/oauth/auth0.js
CHANGED
|
@@ -1,61 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
booleanValue,
|
|
3
|
-
createJwtVerifier,
|
|
4
|
-
invalidToken,
|
|
5
|
-
normalizedProviderUrl,
|
|
6
|
-
normalizedStrings,
|
|
7
|
-
oauthCustomProvider,
|
|
8
|
-
payloadFromAuthInfo,
|
|
9
|
-
providerEndpoint,
|
|
10
|
-
requiredString,
|
|
11
|
-
stringValue
|
|
12
|
-
} from "../chunk-DPL7OEXC.js";
|
|
13
|
-
|
|
14
|
-
// src/oauth/auth0.ts
|
|
15
|
-
function oauthAuth0Provider(options) {
|
|
16
|
-
const issuer = normalizedProviderUrl(options.domain, "Auth0 domain").href;
|
|
17
|
-
return oauthCustomProvider({
|
|
18
|
-
...options,
|
|
19
|
-
createTokenVerifier: (resource) => createJwtVerifier({
|
|
20
|
-
issuer,
|
|
21
|
-
jwksUrl: new URL(providerEndpoint(issuer, ".well-known/jwks.json")),
|
|
22
|
-
resource
|
|
23
|
-
}),
|
|
24
|
-
oauthMetadata: {
|
|
25
|
-
issuer,
|
|
26
|
-
authorization_endpoint: providerEndpoint(issuer, "authorize"),
|
|
27
|
-
token_endpoint: providerEndpoint(issuer, "oauth/token"),
|
|
28
|
-
registration_endpoint: providerEndpoint(issuer, "oidc/register"),
|
|
29
|
-
response_types_supported: ["code"],
|
|
30
|
-
grant_types_supported: ["authorization_code", "refresh_token"],
|
|
31
|
-
code_challenge_methods_supported: ["S256"]
|
|
32
|
-
},
|
|
33
|
-
mapAuthInfo: mapUser
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
function mapUser(authInfo) {
|
|
37
|
-
const payload = payloadFromAuthInfo(authInfo);
|
|
38
|
-
const id = requiredString(payload, "sub");
|
|
39
|
-
if (id === void 0) throw invalidToken("Missing Auth0 subject");
|
|
40
|
-
return {
|
|
41
|
-
user: {
|
|
42
|
-
id,
|
|
43
|
-
...optional("email", stringValue(payload, "email")),
|
|
44
|
-
...optional("name", stringValue(payload, "name")),
|
|
45
|
-
...optional("nickname", stringValue(payload, "nickname")),
|
|
46
|
-
...optional("picture", stringValue(payload, "picture")),
|
|
47
|
-
...optional("emailVerified", booleanValue(payload, "email_verified")),
|
|
48
|
-
...optional("updatedAt", stringValue(payload, "updated_at")),
|
|
49
|
-
roles: normalizedStrings(payload["roles"])
|
|
50
|
-
},
|
|
51
|
-
payload,
|
|
52
|
-
permissions: normalizedStrings(payload["permissions"])
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
function optional(key, value) {
|
|
56
|
-
return value === void 0 ? {} : { [key]: value };
|
|
57
|
-
}
|
|
58
|
-
export {
|
|
59
|
-
oauthAuth0Provider
|
|
60
|
-
};
|
|
61
|
-
//# sourceMappingURL=auth0.js.map
|
|
1
|
+
import{booleanValue,createJwtVerifier,normalizedProviderUrl,normalizedStrings,payloadFromAuthInfo,providerEndpoint,requiredString,stringValue}from"../chunk-KGTOBJW2.js";import{invalidToken,oauthCustomProvider}from"../chunk-IS7FKXFR.js";function oauthAuth0Provider(options){let issuer=normalizedProviderUrl(options.domain,"Auth0 domain").href;return oauthCustomProvider({...options,createTokenVerifier:resource=>createJwtVerifier({issuer,jwksUrl:new URL(providerEndpoint(issuer,".well-known/jwks.json")),resource}),oauthMetadata:{issuer,authorization_endpoint:providerEndpoint(issuer,"authorize"),token_endpoint:providerEndpoint(issuer,"oauth/token"),registration_endpoint:providerEndpoint(issuer,"oidc/register"),response_types_supported:["code"],grant_types_supported:["authorization_code","refresh_token"],code_challenge_methods_supported:["S256"]},mapAuthInfo:mapUser})}function mapUser(authInfo){let payload=payloadFromAuthInfo(authInfo),id=requiredString(payload,"sub");if(id===void 0)throw invalidToken("Missing Auth0 subject");return{user:{id,...optional("email",stringValue(payload,"email")),...optional("name",stringValue(payload,"name")),...optional("nickname",stringValue(payload,"nickname")),...optional("picture",stringValue(payload,"picture")),...optional("emailVerified",booleanValue(payload,"email_verified")),...optional("updatedAt",stringValue(payload,"updated_at")),roles:normalizedStrings(payload.roles)},payload,permissions:normalizedStrings(payload.permissions)}}function optional(key,value){return value===void 0?{}:{[key]:value}}export{oauthAuth0Provider};
|
|
@@ -1,13 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verify access tokens from the Better Auth OAuth 2.1 Provider plugin.
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
1
6
|
import { type OAuthProvider, type OAuthResourceOptions } from "./provider.js";
|
|
2
7
|
/** Verified Better Auth claims exposed to authenticated MCP callbacks. */
|
|
3
8
|
export interface BetterAuthOAuthUser {
|
|
9
|
+
/** Better Auth subject identifier. */
|
|
4
10
|
id: string;
|
|
11
|
+
/** Primary email address, when included in the access token. */
|
|
5
12
|
email?: string;
|
|
13
|
+
/** Display name, when included in the access token. */
|
|
6
14
|
name?: string;
|
|
15
|
+
/** Profile image URL, when included in the access token. */
|
|
7
16
|
picture?: string;
|
|
17
|
+
/** Whether Better Auth has verified {@link BetterAuthOAuthUser.email}. */
|
|
8
18
|
emailVerified?: boolean;
|
|
19
|
+
/** Better Auth session identifier. */
|
|
9
20
|
sessionId?: string;
|
|
21
|
+
/** Whether the session belongs to an anonymous user. */
|
|
10
22
|
isAnonymous?: boolean;
|
|
23
|
+
/** Roles from the access token's `roles` claim. */
|
|
11
24
|
roles: string[];
|
|
12
25
|
}
|
|
13
26
|
/** Configures Better Auth JWT verification and protected-resource metadata. */
|
|
@@ -24,6 +37,15 @@ export interface BetterAuthOAuthProviderOptions extends OAuthResourceOptions {
|
|
|
24
37
|
*
|
|
25
38
|
* @param options - Better Auth issuer URL and resource-server settings.
|
|
26
39
|
* @returns A provider that rejects tokens not issued for the resolved MCP resource.
|
|
40
|
+
* @throws A `TypeError` if `authURL` is not a valid HTTP or HTTPS URL.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* import { oauthBetterAuthProvider } from "mcp-use/oauth/better-auth";
|
|
45
|
+
*
|
|
46
|
+
* const oauth = oauthBetterAuthProvider({
|
|
47
|
+
* authURL: "https://auth.example.com/api/auth",
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
27
50
|
*/
|
|
28
51
|
export declare function oauthBetterAuthProvider(options: BetterAuthOAuthProviderOptions): OAuthProvider<BetterAuthOAuthUser>;
|
|
29
|
-
//# sourceMappingURL=better-auth.d.ts.map
|
|
@@ -1,76 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
booleanValue,
|
|
3
|
-
createJwtVerifier,
|
|
4
|
-
invalidToken,
|
|
5
|
-
normalizedProviderUrl,
|
|
6
|
-
normalizedStrings,
|
|
7
|
-
oauthCustomProvider,
|
|
8
|
-
payloadFromAuthInfo,
|
|
9
|
-
providerEndpoint,
|
|
10
|
-
requiredString,
|
|
11
|
-
stringValue
|
|
12
|
-
} from "../chunk-DPL7OEXC.js";
|
|
13
|
-
|
|
14
|
-
// src/oauth/better-auth.ts
|
|
15
|
-
function oauthBetterAuthProvider(options) {
|
|
16
|
-
const issuer = normalizedProviderUrl(
|
|
17
|
-
options.authURL,
|
|
18
|
-
"Better Auth authURL"
|
|
19
|
-
).href.replace(/\/$/, "");
|
|
20
|
-
return oauthCustomProvider({
|
|
21
|
-
...options,
|
|
22
|
-
createTokenVerifier: (resource) => createJwtVerifier({
|
|
23
|
-
issuer,
|
|
24
|
-
jwksUrl: new URL(providerEndpoint(issuer, "jwks")),
|
|
25
|
-
resource
|
|
26
|
-
}),
|
|
27
|
-
oauthMetadata: metadata(issuer, options.scopesSupported),
|
|
28
|
-
mapAuthInfo: mapUser
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
function metadata(issuer, scopesSupported) {
|
|
32
|
-
return {
|
|
33
|
-
issuer,
|
|
34
|
-
authorization_endpoint: providerEndpoint(issuer, "oauth2/authorize"),
|
|
35
|
-
token_endpoint: providerEndpoint(issuer, "oauth2/token"),
|
|
36
|
-
registration_endpoint: providerEndpoint(issuer, "oauth2/register"),
|
|
37
|
-
jwks_uri: providerEndpoint(issuer, "jwks"),
|
|
38
|
-
response_types_supported: ["code"],
|
|
39
|
-
grant_types_supported: [
|
|
40
|
-
"authorization_code",
|
|
41
|
-
"client_credentials",
|
|
42
|
-
"refresh_token"
|
|
43
|
-
],
|
|
44
|
-
code_challenge_methods_supported: ["S256"],
|
|
45
|
-
scopes_supported: scopesSupported === void 0 ? ["openid", "profile", "email", "offline_access"] : [...scopesSupported]
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
function mapUser(authInfo) {
|
|
49
|
-
const payload = payloadFromAuthInfo(authInfo);
|
|
50
|
-
const id = requiredString(payload, "sub");
|
|
51
|
-
if (id === void 0) throw invalidToken("Missing Better Auth subject");
|
|
52
|
-
return {
|
|
53
|
-
user: {
|
|
54
|
-
id,
|
|
55
|
-
...optional("email", stringValue(payload, "email")),
|
|
56
|
-
...optional("name", stringValue(payload, "name")),
|
|
57
|
-
...optional("picture", stringValue(payload, "picture")),
|
|
58
|
-
...optional("emailVerified", booleanValue(payload, "email_verified")),
|
|
59
|
-
...optional("sessionId", stringValue(payload, "sid")),
|
|
60
|
-
...optional(
|
|
61
|
-
"isAnonymous",
|
|
62
|
-
booleanValue(payload, "is_anonymous") ?? booleanValue(payload, "isAnonymous")
|
|
63
|
-
),
|
|
64
|
-
roles: normalizedStrings(payload["roles"])
|
|
65
|
-
},
|
|
66
|
-
payload,
|
|
67
|
-
permissions: normalizedStrings(payload["permissions"])
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
function optional(key, value) {
|
|
71
|
-
return value === void 0 ? {} : { [key]: value };
|
|
72
|
-
}
|
|
73
|
-
export {
|
|
74
|
-
oauthBetterAuthProvider
|
|
75
|
-
};
|
|
76
|
-
//# sourceMappingURL=better-auth.js.map
|
|
1
|
+
import{booleanValue,createJwtVerifier,normalizedProviderUrl,normalizedStrings,payloadFromAuthInfo,providerEndpoint,requiredString,stringValue}from"../chunk-KGTOBJW2.js";import{invalidToken,oauthCustomProvider}from"../chunk-IS7FKXFR.js";function oauthBetterAuthProvider(options){let issuer=normalizedProviderUrl(options.authURL,"Better Auth authURL").href.replace(/\/$/,"");return oauthCustomProvider({...options,createTokenVerifier:resource=>createJwtVerifier({issuer,jwksUrl:new URL(providerEndpoint(issuer,"jwks")),resource}),oauthMetadata:metadata(issuer,options.scopesSupported),mapAuthInfo:mapUser})}function metadata(issuer,scopesSupported){return{issuer,authorization_endpoint:providerEndpoint(issuer,"oauth2/authorize"),token_endpoint:providerEndpoint(issuer,"oauth2/token"),registration_endpoint:providerEndpoint(issuer,"oauth2/register"),jwks_uri:providerEndpoint(issuer,"jwks"),response_types_supported:["code"],grant_types_supported:["authorization_code","client_credentials","refresh_token"],code_challenge_methods_supported:["S256"],scopes_supported:scopesSupported===void 0?["openid","profile","email","offline_access"]:[...scopesSupported]}}function mapUser(authInfo){let payload=payloadFromAuthInfo(authInfo),id=requiredString(payload,"sub");if(id===void 0)throw invalidToken("Missing Better Auth subject");return{user:{id,...optional("email",stringValue(payload,"email")),...optional("name",stringValue(payload,"name")),...optional("picture",stringValue(payload,"picture")),...optional("emailVerified",booleanValue(payload,"email_verified")),...optional("sessionId",stringValue(payload,"sid")),...optional("isAnonymous",booleanValue(payload,"is_anonymous")??booleanValue(payload,"isAnonymous")),roles:normalizedStrings(payload.roles)},payload,permissions:normalizedStrings(payload.permissions)}}function optional(key,value){return value===void 0?{}:{[key]:value}}export{oauthBetterAuthProvider};
|