@lovable.dev/mcp-js 2.3.0 → 3.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.internal.md +1 -1
  2. package/README.md +2 -0
  3. package/dist/{authorize-BmYO5_-I.d.cts → authorize-BS_In2AW.d.cts} +1 -1
  4. package/dist/{authorize-d9-8n9u3.d.ts → authorize-Dt7ll7Ur.d.ts} +1 -1
  5. package/dist/{base-BFfwU5co.d.ts → base-Bohn3qri.d.ts} +1 -1
  6. package/dist/{base-DaJKVZG_.d.cts → base-CZiROmNS.d.cts} +1 -1
  7. package/dist/cli/extract-manifest.cjs +1 -1
  8. package/dist/cli/extract-manifest.js +1 -1
  9. package/dist/{cors-C22c-wNM.cjs → cors-DBFcTDwu.cjs} +1 -1
  10. package/dist/{cors-CHdtyxhN.js → cors-F5UnGwvm.js} +1 -1
  11. package/dist/{errors-CpTdzogX.cjs → errors-CWxgUZH3.cjs} +7 -5
  12. package/dist/{errors-DGcJ8jPK.js → errors-ZmYYVYKN.js} +7 -5
  13. package/dist/index.cjs +1 -1
  14. package/dist/index.d.cts +1 -1
  15. package/dist/index.d.ts +1 -1
  16. package/dist/index.js +1 -1
  17. package/dist/{io-PkOqwIl4.cjs → io-BF1pNDrh.cjs} +6 -6
  18. package/dist/{io-Dd_a48VG.js → io-BjwGn1nq.js} +6 -6
  19. package/dist/{io-CL1GeE3D.d.cts → io-Bn0ErYbG.d.cts} +1 -1
  20. package/dist/{io-7U860POB.d.ts → io-BvogiiQ1.d.ts} +1 -1
  21. package/dist/{mcp-DE9Z7jdd.js → mcp-BsCOgpj8.js} +13 -11
  22. package/dist/{mcp-BTljTvVS.cjs → mcp-CGwgxdgG.cjs} +13 -11
  23. package/dist/{package-Bcqm56CX.js → package-DEoDAOX3.js} +1 -1
  24. package/dist/{package-dPRjYl-z.cjs → package-Rtjy-fWl.cjs} +1 -1
  25. package/dist/protocols/mcp/index.cjs +1 -1
  26. package/dist/protocols/mcp/index.d.cts +3 -3
  27. package/dist/protocols/mcp/index.d.ts +3 -3
  28. package/dist/protocols/mcp/index.js +1 -1
  29. package/dist/protocols/oauth-metadata.cjs +1 -1
  30. package/dist/protocols/oauth-metadata.d.cts +3 -3
  31. package/dist/protocols/oauth-metadata.d.ts +3 -3
  32. package/dist/protocols/oauth-metadata.js +1 -1
  33. package/dist/{schema-D3vClxb7.cjs → schema-DNMsvJwE.cjs} +39 -4
  34. package/dist/{schema-CW1jKvio.js → schema-JK_1KkOa.js} +16 -5
  35. package/dist/stacks/supabase/index.cjs +2 -2
  36. package/dist/stacks/supabase/index.d.cts +1 -1
  37. package/dist/stacks/supabase/index.d.ts +1 -1
  38. package/dist/stacks/supabase/index.js +2 -2
  39. package/dist/stacks/supabase/vite.cjs +1 -1
  40. package/dist/stacks/supabase/vite.d.cts +1 -1
  41. package/dist/stacks/supabase/vite.d.ts +1 -1
  42. package/dist/stacks/supabase/vite.js +1 -1
  43. package/dist/stacks/tanstack/index.cjs +2 -2
  44. package/dist/stacks/tanstack/index.d.cts +2 -2
  45. package/dist/stacks/tanstack/index.d.ts +2 -2
  46. package/dist/stacks/tanstack/index.js +2 -2
  47. package/dist/stacks/tanstack/vite.d.cts +1 -1
  48. package/dist/stacks/tanstack/vite.d.ts +1 -1
  49. package/dist/{types-BCKyT2wb.d.cts → types-BX8RawmT.d.cts} +3 -0
  50. package/dist/{types-BCKyT2wb.d.ts → types-BX8RawmT.d.ts} +3 -0
  51. package/package.json +2 -2
@@ -79,7 +79,7 @@ The published `.d.ts` files import only from `zod` and `vite`. Three SDK concern
79
79
  - **`ZodRawShape`, `ZodType`, `infer`** — sourced directly from `zod` (a peer dep). zod v3 and v4 both export all three at the top level; `ZodType` is non-deprecated in both versions with safe generic defaults. We re-export them from `core/types.ts` as `ZodRawShape` / `ZodSchema` / `ShapeOutput` (`ZodSchema` is a no-generic alias for `ZodType`). No dependency on `@modelcontextprotocol/sdk/server/zod-compat.js` types.
80
80
  - **`ContentBlock` union** — `TextContent | ImageContent | AudioContent | EmbeddedResource | ResourceLink`, structurally matching MCP's wire format. Consumers can type custom content (`return { content: [<ImageContent>, <TextContent>] }`) without referencing the SDK.
81
81
 
82
- The **runtime** still hands off to the MCP SDKs — `createMcpHandler` + `McpServer` come from `@modelcontextprotocol/server` (v2), and `objectFromShape` + `safeParseAsync` + `toJsonSchemaCompat` come from `@modelcontextprotocol/sdk`'s zod-compat modules for input validation and JSON-Schema serialization. Those are runtime dependencies, not type-surface dependencies.
82
+ The **runtime** still hands off to the MCP SDKs — `createMcpHandler` + `McpServer` come from `@modelcontextprotocol/server` (v2), and `safeParseAsync` + `toJsonSchemaCompat` come from `@modelcontextprotocol/sdk`'s zod-compat modules for input validation and JSON-Schema serialization. Those are runtime dependencies, not type-surface dependencies. Input shapes are wrapped by our own `strictObjectFromShape` (`src/core/schema.ts`), a strict twin of the SDK's `objectFromShape`, because the SDK only offers strip-mode objects; `strict: false` tools and output schemas still use the SDK's wrapper.
83
83
 
84
84
  ### 8. Stale-route cleanup on every regen
85
85
 
package/README.md CHANGED
@@ -40,6 +40,8 @@ export default defineConfig({ plugins: [mcpPlugin()] });
40
40
 
41
41
  That's the whole authoring surface. No imperative server construction, no route handlers, no JSON-RPC envelope, no transport instantiation — all wrapped.
42
42
 
43
+ `inputSchema` is closed: a `tools/call` carrying an argument key the schema does not declare fails in-band (`isError: true`, naming the key) instead of silently dropping it, and `tools/list` advertises `additionalProperties: false`. Set `strict: false` on a tool to accept and drop unknown keys instead.
44
+
43
45
  ## What the plugin emits
44
46
 
45
47
  | URL | File | Purpose |
@@ -1,4 +1,4 @@
1
- import "./types-BCKyT2wb.cjs";
1
+ import "./types-BX8RawmT.cjs";
2
2
  //#region src/metrics/recorder.d.ts
3
3
  type ScheduleBackground = (task: Promise<unknown>) => void;
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- import "./types-BCKyT2wb.js";
1
+ import "./types-BX8RawmT.js";
2
2
  //#region src/metrics/recorder.d.ts
3
3
  type ScheduleBackground = (task: Promise<unknown>) => void;
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- import { j as McpProtocolEra } from "./types-BCKyT2wb.js";
1
+ import { j as McpProtocolEra } from "./types-BX8RawmT.js";
2
2
  //#region src/metrics/impl/base.d.ts
3
3
  type InvocationOutcome = "ok" | "tool_error" | "handler_error" | "transport_error" | "app_context_error" | "auth_challenge" | "origin_rejected" | "auth_discovery_config_error" | "auth_discovery_unreachable" | "auth_jwks_config_error" | "auth_jwks_unreachable";
4
4
  /** One recorded MCP call. Carries no arguments or response payloads — only the
@@ -1,4 +1,4 @@
1
- import { j as McpProtocolEra } from "./types-BCKyT2wb.cjs";
1
+ import { j as McpProtocolEra } from "./types-BX8RawmT.cjs";
2
2
  //#region src/metrics/impl/base.d.ts
3
3
  type InvocationOutcome = "ok" | "tool_error" | "handler_error" | "transport_error" | "app_context_error" | "auth_challenge" | "origin_rejected" | "auth_discovery_config_error" | "auth_discovery_unreachable" | "auth_jwks_config_error" | "auth_jwks_unreachable";
4
4
  /** One recorded MCP call. Carries no arguments or response payloads — only the
@@ -4,7 +4,7 @@ const projectRoot = process.argv[2] ?? process.cwd();
4
4
  import("zod/v3").catch((err) => {
5
5
  const message = err instanceof Error ? err.message : String(err);
6
6
  throw new Error(`@lovable.dev/mcp-js requires zod ^3.25 or ^4.0 to extract MCP schemas. Verify the project's zod dependency and package resolution, then try again. Underlying error: ${message}`);
7
- }).then(() => Promise.resolve().then(() => require("../io-PkOqwIl4.cjs"))).then(({ runExtract }) => runExtract(projectRoot)).catch((err) => {
7
+ }).then(() => Promise.resolve().then(() => require("../io-BF1pNDrh.cjs"))).then(({ runExtract }) => runExtract(projectRoot)).catch((err) => {
8
8
  console.error(err instanceof Error ? err.message : String(err));
9
9
  process.exit(1);
10
10
  });
@@ -4,7 +4,7 @@ const projectRoot = process.argv[2] ?? process.cwd();
4
4
  import("zod/v3").catch((err) => {
5
5
  const message = err instanceof Error ? err.message : String(err);
6
6
  throw new Error(`@lovable.dev/mcp-js requires zod ^3.25 or ^4.0 to extract MCP schemas. Verify the project's zod dependency and package resolution, then try again. Underlying error: ${message}`);
7
- }).then(() => import("../io-Dd_a48VG.js")).then(({ runExtract }) => runExtract(projectRoot)).catch((err) => {
7
+ }).then(() => import("../io-BjwGn1nq.js")).then(({ runExtract }) => runExtract(projectRoot)).catch((err) => {
8
8
  console.error(err instanceof Error ? err.message : String(err));
9
9
  process.exit(1);
10
10
  });
@@ -1,5 +1,5 @@
1
1
  const require_logger = require("./logger-C-Hdu57K.cjs");
2
- const require_package = require("./package-dPRjYl-z.cjs");
2
+ const require_package = require("./package-Rtjy-fWl.cjs");
3
3
  require("./metadata-path-zd7NSNoa.cjs");
4
4
  let jose = require("jose");
5
5
  //#region src/core/http.ts
@@ -1,5 +1,5 @@
1
1
  import { i as log, n as applyLogLevelFromEnv, o as parseSafeUrl, r as describeError, s as trimTrailingSlash, t as LOG_LEVEL_ENV_VAR, u as resolveMetricsConfig } from "./logger-CpLgYbCG.js";
2
- import { t as version } from "./package-Bcqm56CX.js";
2
+ import { t as version } from "./package-DEoDAOX3.js";
3
3
  import "./metadata-path-CAkNcfyY.js";
4
4
  import { createLocalJWKSet, decodeProtectedHeader, errors, jwtVerify } from "jose";
5
5
  //#region src/core/http.ts
@@ -1,5 +1,5 @@
1
+ const require_schema = require("./schema-DNMsvJwE.cjs");
1
2
  const require_logger = require("./logger-C-Hdu57K.cjs");
2
- const require_schema = require("./schema-D3vClxb7.cjs");
3
3
  //#region src/core/define.ts
4
4
  function toolRequiresAppContext(tool) {
5
5
  return "requiresAppContext" in tool && tool.requiresAppContext === true;
@@ -100,18 +100,20 @@ function assertAllowedOrigins(allowedOrigins) {
100
100
  }
101
101
  }
102
102
  function assertToolSchemas(mcp) {
103
- for (const tool of mcp.tools) for (const [name, definition, strategy] of [[
103
+ for (const tool of mcp.tools) for (const [name, definition, strategy, strict] of [[
104
104
  "inputSchema",
105
105
  tool.inputSchema,
106
- "input"
106
+ "input",
107
+ tool.strict !== false
107
108
  ], [
108
109
  "outputSchema",
109
110
  tool.outputSchema,
110
- "output"
111
+ "output",
112
+ false
111
113
  ]]) {
112
114
  if (!definition) continue;
113
115
  try {
114
- require_schema.jsonSchemaFromDefinition(definition, strategy);
116
+ require_schema.jsonSchemaFromDefinition(definition, strategy, strict);
115
117
  } catch (error) {
116
118
  const detail = error instanceof Error ? `: ${error.message}` : "";
117
119
  throw new Error(`@lovable.dev/mcp-js: tool "${tool.name}" ${name} cannot be represented as JSON Schema${detail}`);
@@ -1,5 +1,5 @@
1
1
  import { o as parseSafeUrl, s as trimTrailingSlash, u as resolveMetricsConfig } from "./logger-CpLgYbCG.js";
2
- import { t as jsonSchemaFromDefinition } from "./schema-CW1jKvio.js";
2
+ import { t as jsonSchemaFromDefinition } from "./schema-JK_1KkOa.js";
3
3
  //#region src/core/define.ts
4
4
  function toolRequiresAppContext(tool) {
5
5
  return "requiresAppContext" in tool && tool.requiresAppContext === true;
@@ -100,18 +100,20 @@ function assertAllowedOrigins(allowedOrigins) {
100
100
  }
101
101
  }
102
102
  function assertToolSchemas(mcp) {
103
- for (const tool of mcp.tools) for (const [name, definition, strategy] of [[
103
+ for (const tool of mcp.tools) for (const [name, definition, strategy, strict] of [[
104
104
  "inputSchema",
105
105
  tool.inputSchema,
106
- "input"
106
+ "input",
107
+ tool.strict !== false
107
108
  ], [
108
109
  "outputSchema",
109
110
  tool.outputSchema,
110
- "output"
111
+ "output",
112
+ false
111
113
  ]]) {
112
114
  if (!definition) continue;
113
115
  try {
114
- jsonSchemaFromDefinition(definition, strategy);
116
+ jsonSchemaFromDefinition(definition, strategy, strict);
115
117
  } catch (error) {
116
118
  const detail = error instanceof Error ? `: ${error.message}` : "";
117
119
  throw new Error(`@lovable.dev/mcp-js: tool "${tool.name}" ${name} cannot be represented as JSON Schema${detail}`);
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_logger = require("./logger-C-Hdu57K.cjs");
3
- const require_errors = require("./errors-CpTdzogX.cjs");
3
+ const require_errors = require("./errors-CWxgUZH3.cjs");
4
4
  //#region src/auth/config.ts
5
5
  function frozenArray(value) {
6
6
  return value === void 0 ? void 0 : Object.freeze([...value]);
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as McpClientInfo, C as ToolVisibilityContext, D as MetricsConfig, E as ZodSchema, F as McpAuthConfig, M as ProgressUpdate, N as ToolContext, O as MetricsOptions, P as JwtClaims, S as ToolHandlerResult, T as ZodRawShape, _ as ResourceLinkIcon, a as ContentBlock, b as ToolContent, c as EmbeddedResource, d as JsonValue, f as JsonValueInput, g as ResourceLink, h as McpDefinitionInput, i as ContentAnnotations, j as McpProtocolEra, k as AuthContext, l as EmbeddedTextResource, m as McpDefinition, n as AppContextToolDefinitionInput, o as CreateAppContextInput, p as McpAllowedOrigins, r as AudioContent, s as EmbeddedBlobResource, t as AppContextToolDefinition, u as ImageContent, v as TextContent, w as ZodOutputSchema, x as ToolDefinition, y as ToolAnnotations } from "./types-BCKyT2wb.cjs";
1
+ import { A as McpClientInfo, C as ToolVisibilityContext, D as MetricsConfig, E as ZodSchema, F as McpAuthConfig, M as ProgressUpdate, N as ToolContext, O as MetricsOptions, P as JwtClaims, S as ToolHandlerResult, T as ZodRawShape, _ as ResourceLinkIcon, a as ContentBlock, b as ToolContent, c as EmbeddedResource, d as JsonValue, f as JsonValueInput, g as ResourceLink, h as McpDefinitionInput, i as ContentAnnotations, j as McpProtocolEra, k as AuthContext, l as EmbeddedTextResource, m as McpDefinition, n as AppContextToolDefinitionInput, o as CreateAppContextInput, p as McpAllowedOrigins, r as AudioContent, s as EmbeddedBlobResource, t as AppContextToolDefinition, u as ImageContent, v as TextContent, w as ZodOutputSchema, x as ToolDefinition, y as ToolAnnotations } from "./types-BX8RawmT.cjs";
2
2
  //#region src/core/define.d.ts
3
3
  /**
4
4
  * Declare a single MCP tool. Import the result into your MCP definition's
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as McpClientInfo, C as ToolVisibilityContext, D as MetricsConfig, E as ZodSchema, F as McpAuthConfig, M as ProgressUpdate, N as ToolContext, O as MetricsOptions, P as JwtClaims, S as ToolHandlerResult, T as ZodRawShape, _ as ResourceLinkIcon, a as ContentBlock, b as ToolContent, c as EmbeddedResource, d as JsonValue, f as JsonValueInput, g as ResourceLink, h as McpDefinitionInput, i as ContentAnnotations, j as McpProtocolEra, k as AuthContext, l as EmbeddedTextResource, m as McpDefinition, n as AppContextToolDefinitionInput, o as CreateAppContextInput, p as McpAllowedOrigins, r as AudioContent, s as EmbeddedBlobResource, t as AppContextToolDefinition, u as ImageContent, v as TextContent, w as ZodOutputSchema, x as ToolDefinition, y as ToolAnnotations } from "./types-BCKyT2wb.js";
1
+ import { A as McpClientInfo, C as ToolVisibilityContext, D as MetricsConfig, E as ZodSchema, F as McpAuthConfig, M as ProgressUpdate, N as ToolContext, O as MetricsOptions, P as JwtClaims, S as ToolHandlerResult, T as ZodRawShape, _ as ResourceLinkIcon, a as ContentBlock, b as ToolContent, c as EmbeddedResource, d as JsonValue, f as JsonValueInput, g as ResourceLink, h as McpDefinitionInput, i as ContentAnnotations, j as McpProtocolEra, k as AuthContext, l as EmbeddedTextResource, m as McpDefinition, n as AppContextToolDefinitionInput, o as CreateAppContextInput, p as McpAllowedOrigins, r as AudioContent, s as EmbeddedBlobResource, t as AppContextToolDefinition, u as ImageContent, v as TextContent, w as ZodOutputSchema, x as ToolDefinition, y as ToolAnnotations } from "./types-BX8RawmT.js";
2
2
  //#region src/core/define.d.ts
3
3
  /**
4
4
  * Declare a single MCP tool. Import the result into your MCP definition's
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as setLogLevel } from "./logger-CpLgYbCG.js";
2
- import { a as ToolContext, i as AuthContext, o as defineMcp, s as defineTool, t as ToolError } from "./errors-DGcJ8jPK.js";
2
+ import { a as ToolContext, i as AuthContext, o as defineMcp, s as defineTool, t as ToolError } from "./errors-ZmYYVYKN.js";
3
3
  //#region src/auth/config.ts
4
4
  function frozenArray(value) {
5
5
  return value === void 0 ? void 0 : Object.freeze([...value]);
@@ -1,14 +1,14 @@
1
- const require_schema = require("./schema-D3vClxb7.cjs");
2
- const require_package = require("./package-dPRjYl-z.cjs");
1
+ const require_schema = require("./schema-DNMsvJwE.cjs");
2
+ const require_package = require("./package-Rtjy-fWl.cjs");
3
3
  const require_fs_errors = require("./fs-errors-CWNzOV75.cjs");
4
4
  let node_fs = require("node:fs");
5
5
  let node_path = require("node:path");
6
6
  let vite = require("vite");
7
7
  let node_crypto = require("node:crypto");
8
8
  //#region src/manifest/listing.ts
9
- function schemaToJsonSchema(definition, pipeStrategy) {
9
+ function schemaToJsonSchema(definition, pipeStrategy, strict) {
10
10
  if (!definition) return null;
11
- return require_schema.jsonSchemaFromDefinition(definition, pipeStrategy);
11
+ return require_schema.jsonSchemaFromDefinition(definition, pipeStrategy, strict);
12
12
  }
13
13
  function buildMcpListing(mcp) {
14
14
  return {
@@ -22,8 +22,8 @@ function buildMcpListing(mcp) {
22
22
  title: tool.title,
23
23
  description: tool.description,
24
24
  annotations: tool.annotations,
25
- inputSchema: schemaToJsonSchema(tool.inputSchema, "input"),
26
- outputSchema: schemaToJsonSchema(tool.outputSchema, "output"),
25
+ inputSchema: schemaToJsonSchema(tool.inputSchema, "input", tool.strict !== false),
26
+ outputSchema: schemaToJsonSchema(tool.outputSchema, "output", false),
27
27
  ...tool.enabled ? { conditional: true } : {}
28
28
  }))
29
29
  };
@@ -1,14 +1,14 @@
1
- import { t as jsonSchemaFromDefinition } from "./schema-CW1jKvio.js";
2
- import { t as version } from "./package-Bcqm56CX.js";
1
+ import { t as jsonSchemaFromDefinition } from "./schema-JK_1KkOa.js";
2
+ import { t as version } from "./package-DEoDAOX3.js";
3
3
  import { t as isFileMissing } from "./fs-errors-PA2t1TIp.js";
4
4
  import { lstatSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
5
5
  import { dirname, resolve } from "node:path";
6
6
  import { createServer, resolveConfig } from "vite";
7
7
  import { randomUUID } from "node:crypto";
8
8
  //#region src/manifest/listing.ts
9
- function schemaToJsonSchema(definition, pipeStrategy) {
9
+ function schemaToJsonSchema(definition, pipeStrategy, strict) {
10
10
  if (!definition) return null;
11
- return jsonSchemaFromDefinition(definition, pipeStrategy);
11
+ return jsonSchemaFromDefinition(definition, pipeStrategy, strict);
12
12
  }
13
13
  function buildMcpListing(mcp) {
14
14
  return {
@@ -22,8 +22,8 @@ function buildMcpListing(mcp) {
22
22
  title: tool.title,
23
23
  description: tool.description,
24
24
  annotations: tool.annotations,
25
- inputSchema: schemaToJsonSchema(tool.inputSchema, "input"),
26
- outputSchema: schemaToJsonSchema(tool.outputSchema, "output"),
25
+ inputSchema: schemaToJsonSchema(tool.inputSchema, "input", tool.strict !== false),
26
+ outputSchema: schemaToJsonSchema(tool.outputSchema, "output", false),
27
27
  ...tool.enabled ? { conditional: true } : {}
28
28
  }))
29
29
  };
@@ -1,4 +1,4 @@
1
- import "./types-BCKyT2wb.cjs";
1
+ import "./types-BX8RawmT.cjs";
2
2
  //#region src/manifest/io.d.ts
3
3
  /**
4
4
  * Shape every MCP Vite plugin exposes on its `api` so `runExtract` can read
@@ -1,4 +1,4 @@
1
- import "./types-BCKyT2wb.js";
1
+ import "./types-BX8RawmT.js";
2
2
  //#region src/manifest/io.d.ts
3
3
  /**
4
4
  * Shape every MCP Vite plugin exposes on its `api` so `runExtract` can read
@@ -1,7 +1,7 @@
1
1
  import { i as log, r as describeError } from "./logger-CpLgYbCG.js";
2
- import { n as schemaFromDefinition, t as jsonSchemaFromDefinition } from "./schema-CW1jKvio.js";
3
- import { a as ToolContext, c as toolRequiresAppContext, i as AuthContext, n as errorSummary, r as resolveToolErrorMessage } from "./errors-DGcJ8jPK.js";
4
- import { d as nowMs, i as normalizeHttpMethod, l as emitBeforeResponse, n as createRequestAuthorizer, p as finalizeWireResponse, t as evaluateCors, u as createNoopRecorder } from "./cors-CHdtyxhN.js";
2
+ import { n as schemaFromDefinition, t as jsonSchemaFromDefinition } from "./schema-JK_1KkOa.js";
3
+ import { a as ToolContext, c as toolRequiresAppContext, i as AuthContext, n as errorSummary, r as resolveToolErrorMessage } from "./errors-ZmYYVYKN.js";
4
+ import { d as nowMs, i as normalizeHttpMethod, l as emitBeforeResponse, n as createRequestAuthorizer, p as finalizeWireResponse, t as evaluateCors, u as createNoopRecorder } from "./cors-F5UnGwvm.js";
5
5
  import { getParseErrorMessage, safeParseAsync } from "@modelcontextprotocol/sdk/server/zod-compat.js";
6
6
  import { CLIENT_CAPABILITIES_META_KEY, CLIENT_INFO_META_KEY, McpServer, createMcpHandler } from "@modelcontextprotocol/server";
7
7
  //#region src/core/content.ts
@@ -60,7 +60,7 @@ async function finalizeToolResult(tool, result) {
60
60
  if (tool.outputSchema && !result.isError) {
61
61
  if (structuredContent === void 0) return outputValidationError(`Output validation error: Tool ${tool.name} has an output schema but no structured content was provided`);
62
62
  try {
63
- const parsed = await safeParseAsync(schemaFromDefinition(tool.outputSchema), structuredContent);
63
+ const parsed = await safeParseAsync(schemaFromDefinition(tool.outputSchema, false), structuredContent);
64
64
  if (!parsed.success) return outputValidationError(`Output validation error: Invalid structured content for tool ${tool.name}: ${getParseErrorMessage(parsed.error)}`);
65
65
  structuredContent = parsed.data;
66
66
  } catch {
@@ -181,14 +181,16 @@ function zodIssues(error) {
181
181
  if (!Array.isArray(issues)) return [{ message: String(error) }];
182
182
  return issues.map((issue) => {
183
183
  const value = issue;
184
+ let message = typeof value.message === "string" ? value.message : String(value.message);
185
+ if (Array.isArray(value.keys) && value.keys.length > 0) message = `Unrecognized key(s): ${value.keys.map((key) => JSON.stringify(key)).join(", ")}`;
184
186
  return {
185
- message: typeof value.message === "string" ? value.message : String(value.message),
187
+ message,
186
188
  ...Array.isArray(value.path) ? { path: value.path } : {}
187
189
  };
188
190
  });
189
191
  }
190
- function standardSchemaFromDefinition(definition) {
191
- const schema = schemaFromDefinition(definition);
192
+ function standardSchemaFromDefinition(definition, strict) {
193
+ const schema = schemaFromDefinition(definition, strict);
192
194
  return { "~standard": {
193
195
  version: 1,
194
196
  vendor: "zod",
@@ -197,8 +199,8 @@ function standardSchemaFromDefinition(definition) {
197
199
  return parsed.success ? { value: parsed.data } : { issues: zodIssues(parsed.error) };
198
200
  },
199
201
  jsonSchema: {
200
- input: () => jsonSchemaFromDefinition(definition, "input"),
201
- output: () => jsonSchemaFromDefinition(definition, "output")
202
+ input: () => jsonSchemaFromDefinition(definition, "input", strict),
203
+ output: () => jsonSchemaFromDefinition(definition, "output", strict)
202
204
  }
203
205
  } };
204
206
  }
@@ -358,12 +360,12 @@ async function buildServer(mcp, auth, recorder, era, signal, operations) {
358
360
  title: tool.title,
359
361
  description: tool.description,
360
362
  annotations: tool.annotations,
361
- ...tool.outputSchema ? { outputSchema: standardSchemaFromDefinition(tool.outputSchema) } : {}
363
+ ...tool.outputSchema ? { outputSchema: standardSchemaFromDefinition(tool.outputSchema, false) } : {}
362
364
  };
363
365
  const callback = adaptToolCallback(tool, auth, recorder, era === "legacy" ? "legacy" : MODERN_PROTOCOL_VERSION, appContext);
364
366
  if (tool.inputSchema) server.registerTool(tool.name, {
365
367
  ...config,
366
- inputSchema: standardSchemaFromDefinition(tool.inputSchema)
368
+ inputSchema: standardSchemaFromDefinition(tool.inputSchema, tool.strict !== false)
367
369
  }, callback);
368
370
  else server.registerTool(tool.name, config, callback);
369
371
  }
@@ -1,7 +1,7 @@
1
+ const require_schema = require("./schema-DNMsvJwE.cjs");
1
2
  const require_logger = require("./logger-C-Hdu57K.cjs");
2
- const require_schema = require("./schema-D3vClxb7.cjs");
3
- const require_errors = require("./errors-CpTdzogX.cjs");
4
- const require_cors = require("./cors-C22c-wNM.cjs");
3
+ const require_errors = require("./errors-CWxgUZH3.cjs");
4
+ const require_cors = require("./cors-DBFcTDwu.cjs");
5
5
  let _modelcontextprotocol_sdk_server_zod_compat_js = require("@modelcontextprotocol/sdk/server/zod-compat.js");
6
6
  let _modelcontextprotocol_server = require("@modelcontextprotocol/server");
7
7
  //#region src/core/content.ts
@@ -60,7 +60,7 @@ async function finalizeToolResult(tool, result) {
60
60
  if (tool.outputSchema && !result.isError) {
61
61
  if (structuredContent === void 0) return outputValidationError(`Output validation error: Tool ${tool.name} has an output schema but no structured content was provided`);
62
62
  try {
63
- const parsed = await (0, _modelcontextprotocol_sdk_server_zod_compat_js.safeParseAsync)(require_schema.schemaFromDefinition(tool.outputSchema), structuredContent);
63
+ const parsed = await (0, _modelcontextprotocol_sdk_server_zod_compat_js.safeParseAsync)(require_schema.schemaFromDefinition(tool.outputSchema, false), structuredContent);
64
64
  if (!parsed.success) return outputValidationError(`Output validation error: Invalid structured content for tool ${tool.name}: ${(0, _modelcontextprotocol_sdk_server_zod_compat_js.getParseErrorMessage)(parsed.error)}`);
65
65
  structuredContent = parsed.data;
66
66
  } catch {
@@ -181,14 +181,16 @@ function zodIssues(error) {
181
181
  if (!Array.isArray(issues)) return [{ message: String(error) }];
182
182
  return issues.map((issue) => {
183
183
  const value = issue;
184
+ let message = typeof value.message === "string" ? value.message : String(value.message);
185
+ if (Array.isArray(value.keys) && value.keys.length > 0) message = `Unrecognized key(s): ${value.keys.map((key) => JSON.stringify(key)).join(", ")}`;
184
186
  return {
185
- message: typeof value.message === "string" ? value.message : String(value.message),
187
+ message,
186
188
  ...Array.isArray(value.path) ? { path: value.path } : {}
187
189
  };
188
190
  });
189
191
  }
190
- function standardSchemaFromDefinition(definition) {
191
- const schema = require_schema.schemaFromDefinition(definition);
192
+ function standardSchemaFromDefinition(definition, strict) {
193
+ const schema = require_schema.schemaFromDefinition(definition, strict);
192
194
  return { "~standard": {
193
195
  version: 1,
194
196
  vendor: "zod",
@@ -197,8 +199,8 @@ function standardSchemaFromDefinition(definition) {
197
199
  return parsed.success ? { value: parsed.data } : { issues: zodIssues(parsed.error) };
198
200
  },
199
201
  jsonSchema: {
200
- input: () => require_schema.jsonSchemaFromDefinition(definition, "input"),
201
- output: () => require_schema.jsonSchemaFromDefinition(definition, "output")
202
+ input: () => require_schema.jsonSchemaFromDefinition(definition, "input", strict),
203
+ output: () => require_schema.jsonSchemaFromDefinition(definition, "output", strict)
202
204
  }
203
205
  } };
204
206
  }
@@ -358,12 +360,12 @@ async function buildServer(mcp, auth, recorder, era, signal, operations) {
358
360
  title: tool.title,
359
361
  description: tool.description,
360
362
  annotations: tool.annotations,
361
- ...tool.outputSchema ? { outputSchema: standardSchemaFromDefinition(tool.outputSchema) } : {}
363
+ ...tool.outputSchema ? { outputSchema: standardSchemaFromDefinition(tool.outputSchema, false) } : {}
362
364
  };
363
365
  const callback = adaptToolCallback(tool, auth, recorder, era === "legacy" ? "legacy" : MODERN_PROTOCOL_VERSION, appContext);
364
366
  if (tool.inputSchema) server.registerTool(tool.name, {
365
367
  ...config,
366
- inputSchema: standardSchemaFromDefinition(tool.inputSchema)
368
+ inputSchema: standardSchemaFromDefinition(tool.inputSchema, tool.strict !== false)
367
369
  }, callback);
368
370
  else server.registerTool(tool.name, config, callback);
369
371
  }
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "2.3.0";
2
+ var version = "3.0.0-rc.0";
3
3
  //#endregion
4
4
  export { version as t };
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "2.3.0";
2
+ var version = "3.0.0-rc.0";
3
3
  //#endregion
4
4
  Object.defineProperty(exports, "version", {
5
5
  enumerable: true,
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_mcp = require("../../mcp-BTljTvVS.cjs");
2
+ const require_mcp = require("../../mcp-CGwgxdgG.cjs");
3
3
  exports.createMcpProtocolHandler = require_mcp.createMcpProtocolHandler;
@@ -1,6 +1,6 @@
1
- import { m as McpDefinition } from "../../types-BCKyT2wb.cjs";
2
- import { t as MetricsRecorder } from "../../base-DaJKVZG_.cjs";
3
- import { n as ScheduleBackground, t as McpRuntimeOptions } from "../../authorize-BmYO5_-I.cjs";
1
+ import { m as McpDefinition } from "../../types-BX8RawmT.cjs";
2
+ import { t as MetricsRecorder } from "../../base-CZiROmNS.cjs";
3
+ import { n as ScheduleBackground, t as McpRuntimeOptions } from "../../authorize-BS_In2AW.cjs";
4
4
  //#region src/protocols/mcp/protocol.d.ts
5
5
  type McpProtocolHandler = (request: Request, recorder?: MetricsRecorder, scheduleBackground?: ScheduleBackground) => Promise<Response>;
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { m as McpDefinition } from "../../types-BCKyT2wb.js";
2
- import { t as MetricsRecorder } from "../../base-BFfwU5co.js";
3
- import { n as ScheduleBackground, t as McpRuntimeOptions } from "../../authorize-d9-8n9u3.js";
1
+ import { m as McpDefinition } from "../../types-BX8RawmT.js";
2
+ import { t as MetricsRecorder } from "../../base-Bohn3qri.js";
3
+ import { n as ScheduleBackground, t as McpRuntimeOptions } from "../../authorize-Dt7ll7Ur.js";
4
4
  //#region src/protocols/mcp/protocol.d.ts
5
5
  type McpProtocolHandler = (request: Request, recorder?: MetricsRecorder, scheduleBackground?: ScheduleBackground) => Promise<Response>;
6
6
  /**
@@ -1,2 +1,2 @@
1
- import { t as createMcpProtocolHandler } from "../../mcp-DE9Z7jdd.js";
1
+ import { t as createMcpProtocolHandler } from "../../mcp-BsCOgpj8.js";
2
2
  export { createMcpProtocolHandler };
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_logger = require("../logger-C-Hdu57K.cjs");
3
- const require_cors = require("../cors-C22c-wNM.cjs");
3
+ const require_cors = require("../cors-DBFcTDwu.cjs");
4
4
  //#region src/protocols/oauth-metadata.ts
5
5
  function notFound() {
6
6
  return new Response(JSON.stringify({ error: "not found" }), {
@@ -1,6 +1,6 @@
1
- import { m as McpDefinition } from "../types-BCKyT2wb.cjs";
2
- import { t as MetricsRecorder } from "../base-DaJKVZG_.cjs";
3
- import { n as ScheduleBackground, t as McpRuntimeOptions } from "../authorize-BmYO5_-I.cjs";
1
+ import { m as McpDefinition } from "../types-BX8RawmT.cjs";
2
+ import { t as MetricsRecorder } from "../base-CZiROmNS.cjs";
3
+ import { n as ScheduleBackground, t as McpRuntimeOptions } from "../authorize-BS_In2AW.cjs";
4
4
  //#region src/protocols/oauth-metadata.d.ts
5
5
  type OAuthProtectedResourceMetadataHandler = (request: Request, recorder?: MetricsRecorder, scheduleBackground?: ScheduleBackground) => Promise<Response>;
6
6
  declare function createOAuthProtectedResourceMetadataHandler(mcp: McpDefinition, options?: McpRuntimeOptions): OAuthProtectedResourceMetadataHandler;
@@ -1,6 +1,6 @@
1
- import { m as McpDefinition } from "../types-BCKyT2wb.js";
2
- import { t as MetricsRecorder } from "../base-BFfwU5co.js";
3
- import { n as ScheduleBackground, t as McpRuntimeOptions } from "../authorize-d9-8n9u3.js";
1
+ import { m as McpDefinition } from "../types-BX8RawmT.js";
2
+ import { t as MetricsRecorder } from "../base-Bohn3qri.js";
3
+ import { n as ScheduleBackground, t as McpRuntimeOptions } from "../authorize-Dt7ll7Ur.js";
4
4
  //#region src/protocols/oauth-metadata.d.ts
5
5
  type OAuthProtectedResourceMetadataHandler = (request: Request, recorder?: MetricsRecorder, scheduleBackground?: ScheduleBackground) => Promise<Response>;
6
6
  declare function createOAuthProtectedResourceMetadataHandler(mcp: McpDefinition, options?: McpRuntimeOptions): OAuthProtectedResourceMetadataHandler;
@@ -1,5 +1,5 @@
1
1
  import { i as log, r as describeError } from "../logger-CpLgYbCG.js";
2
- import { a as oauthConfigurationErrorResponse, f as JSON_HEADERS, i as normalizeHttpMethod, l as emitBeforeResponse, m as methodNotAllowed, p as finalizeWireResponse, r as getOAuthRuntime, s as resolveProtectedResource, t as evaluateCors, u as createNoopRecorder } from "../cors-CHdtyxhN.js";
2
+ import { a as oauthConfigurationErrorResponse, f as JSON_HEADERS, i as normalizeHttpMethod, l as emitBeforeResponse, m as methodNotAllowed, p as finalizeWireResponse, r as getOAuthRuntime, s as resolveProtectedResource, t as evaluateCors, u as createNoopRecorder } from "../cors-F5UnGwvm.js";
3
3
  //#region src/protocols/oauth-metadata.ts
4
4
  function notFound() {
5
5
  return new Response(JSON.stringify({ error: "not found" }), {
@@ -1,11 +1,46 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
15
+ }
16
+ return to;
17
+ };
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
+ value: mod,
20
+ enumerable: true
21
+ }) : target, mod));
22
+ //#endregion
1
23
  let _modelcontextprotocol_sdk_server_zod_compat_js = require("@modelcontextprotocol/sdk/server/zod-compat.js");
2
24
  let _modelcontextprotocol_sdk_server_zod_json_schema_compat_js = require("@modelcontextprotocol/sdk/server/zod-json-schema-compat.js");
25
+ let zod_v3 = require("zod/v3");
26
+ zod_v3 = __toESM(zod_v3, 1);
27
+ let zod_v4_mini = require("zod/v4-mini");
28
+ zod_v4_mini = __toESM(zod_v4_mini, 1);
3
29
  //#region src/core/schema.ts
4
30
  function isZodSchema(definition) {
5
31
  return (typeof definition === "object" || typeof definition === "function") && definition !== null && typeof definition.safeParse === "function";
6
32
  }
7
- function schemaFromDefinition(definition) {
8
- return isZodSchema(definition) ? definition : (0, _modelcontextprotocol_sdk_server_zod_compat_js.objectFromShape)(definition);
33
+ function strictObjectFromShape(shape) {
34
+ const values = Object.values(shape);
35
+ if (values.length === 0) return zod_v4_mini.strictObject({});
36
+ const v4Count = values.filter((value) => (0, _modelcontextprotocol_sdk_server_zod_compat_js.isZ4Schema)(value)).length;
37
+ if (v4Count === values.length) return zod_v4_mini.strictObject(shape);
38
+ if (v4Count === 0) return zod_v3.object(shape).strict();
39
+ throw new Error("Mixed Zod versions detected in object shape.");
40
+ }
41
+ function schemaFromDefinition(definition, strict) {
42
+ if (isZodSchema(definition)) return definition;
43
+ return strict ? strictObjectFromShape(definition) : (0, _modelcontextprotocol_sdk_server_zod_compat_js.objectFromShape)(definition);
9
44
  }
10
45
  const NON_JSON_ZOD3_OUTPUTS = /* @__PURE__ */ new Set([
11
46
  "ZodBigInt",
@@ -50,8 +85,8 @@ function unsupportedZod3Output(schema, seen = /* @__PURE__ */ new Set()) {
50
85
  if (issue) return issue;
51
86
  }
52
87
  }
53
- function jsonSchemaFromDefinition(definition, pipeStrategy) {
54
- const schema = schemaFromDefinition(definition);
88
+ function jsonSchemaFromDefinition(definition, pipeStrategy, strict) {
89
+ const schema = schemaFromDefinition(definition, strict);
55
90
  if (pipeStrategy === "output") {
56
91
  const issue = unsupportedZod3Output(schema);
57
92
  if (issue) throw new Error(issue);
@@ -1,11 +1,22 @@
1
- import { objectFromShape } from "@modelcontextprotocol/sdk/server/zod-compat.js";
1
+ import { isZ4Schema, objectFromShape } from "@modelcontextprotocol/sdk/server/zod-compat.js";
2
2
  import { toJsonSchemaCompat } from "@modelcontextprotocol/sdk/server/zod-json-schema-compat.js";
3
+ import * as z3 from "zod/v3";
4
+ import * as z4mini from "zod/v4-mini";
3
5
  //#region src/core/schema.ts
4
6
  function isZodSchema(definition) {
5
7
  return (typeof definition === "object" || typeof definition === "function") && definition !== null && typeof definition.safeParse === "function";
6
8
  }
7
- function schemaFromDefinition(definition) {
8
- return isZodSchema(definition) ? definition : objectFromShape(definition);
9
+ function strictObjectFromShape(shape) {
10
+ const values = Object.values(shape);
11
+ if (values.length === 0) return z4mini.strictObject({});
12
+ const v4Count = values.filter((value) => isZ4Schema(value)).length;
13
+ if (v4Count === values.length) return z4mini.strictObject(shape);
14
+ if (v4Count === 0) return z3.object(shape).strict();
15
+ throw new Error("Mixed Zod versions detected in object shape.");
16
+ }
17
+ function schemaFromDefinition(definition, strict) {
18
+ if (isZodSchema(definition)) return definition;
19
+ return strict ? strictObjectFromShape(definition) : objectFromShape(definition);
9
20
  }
10
21
  const NON_JSON_ZOD3_OUTPUTS = /* @__PURE__ */ new Set([
11
22
  "ZodBigInt",
@@ -50,8 +61,8 @@ function unsupportedZod3Output(schema, seen = /* @__PURE__ */ new Set()) {
50
61
  if (issue) return issue;
51
62
  }
52
63
  }
53
- function jsonSchemaFromDefinition(definition, pipeStrategy) {
54
- const schema = schemaFromDefinition(definition);
64
+ function jsonSchemaFromDefinition(definition, pipeStrategy, strict) {
65
+ const schema = schemaFromDefinition(definition, strict);
55
66
  if (pipeStrategy === "output") {
56
67
  const issue = unsupportedZod3Output(schema);
57
68
  if (issue) throw new Error(issue);
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_logger = require("../../logger-C-Hdu57K.cjs");
3
- const require_cors = require("../../cors-C22c-wNM.cjs");
3
+ const require_cors = require("../../cors-DBFcTDwu.cjs");
4
4
  const require_metadata_path = require("../../metadata-path-zd7NSNoa.cjs");
5
- const require_mcp = require("../../mcp-BTljTvVS.cjs");
5
+ const require_mcp = require("../../mcp-CGwgxdgG.cjs");
6
6
  const require_protocols_oauth_metadata = require("../../protocols/oauth-metadata.cjs");
7
7
  const require_forwarded = require("../../forwarded-B37IdmMX.cjs");
8
8
  const require_paths = require("../../paths-OP318a6c.cjs");
@@ -1,4 +1,4 @@
1
- import { m as McpDefinition } from "../../types-BCKyT2wb.cjs";
1
+ import { m as McpDefinition } from "../../types-BX8RawmT.cjs";
2
2
  //#region src/stacks/supabase/handler.d.ts
3
3
  type SupabaseHandler = (request: Request) => Promise<Response>;
4
4
  interface SupabaseHandlerOptions {
@@ -1,4 +1,4 @@
1
- import { m as McpDefinition } from "../../types-BCKyT2wb.js";
1
+ import { m as McpDefinition } from "../../types-BX8RawmT.js";
2
2
  //#region src/stacks/supabase/handler.d.ts
3
3
  type SupabaseHandler = (request: Request) => Promise<Response>;
4
4
  interface SupabaseHandlerOptions {
@@ -1,7 +1,7 @@
1
1
  import { s as trimTrailingSlash } from "../../logger-CpLgYbCG.js";
2
- import { c as createRecorderForRuntime, o as assertResourcePathShape } from "../../cors-CHdtyxhN.js";
2
+ import { c as createRecorderForRuntime, o as assertResourcePathShape } from "../../cors-F5UnGwvm.js";
3
3
  import { t as OAUTH_PROTECTED_RESOURCE_METADATA_PATH } from "../../metadata-path-CAkNcfyY.js";
4
- import { t as createMcpProtocolHandler } from "../../mcp-DE9Z7jdd.js";
4
+ import { t as createMcpProtocolHandler } from "../../mcp-BsCOgpj8.js";
5
5
  import { createOAuthProtectedResourceMetadataHandler } from "../../protocols/oauth-metadata.js";
6
6
  import { t as applyForwardedOrigin } from "../../forwarded-BBXvFeh6.js";
7
7
  import { n as assertFunctionName, t as FUNCTIONS_MOUNT_PREFIX } from "../../paths-IS65L6TA.js";
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_package = require("../../package-dPRjYl-z.cjs");
5
+ const require_package = require("../../package-Rtjy-fWl.cjs");
6
6
  const require_fs_errors = require("../../fs-errors-CWNzOV75.cjs");
7
7
  const require_supabase_config = require("../../supabase-config-Dz7dnUv0.cjs");
8
8
  const require_paths = require("../../paths-OP318a6c.cjs");
@@ -1,4 +1,4 @@
1
- import { t as McpPluginApi } from "../../io-CL1GeE3D.cjs";
1
+ import { t as McpPluginApi } from "../../io-Bn0ErYbG.cjs";
2
2
  import { Plugin } from "vite";
3
3
  //#region src/stacks/supabase/vite.d.ts
4
4
  interface McpPluginOptions {
@@ -1,4 +1,4 @@
1
- import { t as McpPluginApi } from "../../io-7U860POB.js";
1
+ import { t as McpPluginApi } from "../../io-BvogiiQ1.js";
2
2
  import { Plugin } from "vite";
3
3
  //#region src/stacks/supabase/vite.d.ts
4
4
  interface McpPluginOptions {
@@ -1,4 +1,4 @@
1
- import { t as version } from "../../package-Bcqm56CX.js";
1
+ import { t as version } from "../../package-DEoDAOX3.js";
2
2
  import { t as isFileMissing } from "../../fs-errors-PA2t1TIp.js";
3
3
  import { t as readSupabaseProjectRef } from "../../supabase-config-CakTU8YF.js";
4
4
  import { n as assertFunctionName, t as FUNCTIONS_MOUNT_PREFIX } from "../../paths-IS65L6TA.js";
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_cors = require("../../cors-C22c-wNM.cjs");
3
- const require_mcp = require("../../mcp-BTljTvVS.cjs");
2
+ const require_cors = require("../../cors-DBFcTDwu.cjs");
3
+ const require_mcp = require("../../mcp-CGwgxdgG.cjs");
4
4
  const require_protocols_oauth_metadata = require("../../protocols/oauth-metadata.cjs");
5
5
  const require_forwarded = require("../../forwarded-B37IdmMX.cjs");
6
6
  //#region src/stacks/tanstack/handlers.ts
@@ -1,5 +1,5 @@
1
- import { m as McpDefinition } from "../../types-BCKyT2wb.cjs";
2
- import { n as ScheduleBackground, t as McpRuntimeOptions } from "../../authorize-BmYO5_-I.cjs";
1
+ import { m as McpDefinition } from "../../types-BX8RawmT.cjs";
2
+ import { n as ScheduleBackground, t as McpRuntimeOptions } from "../../authorize-BS_In2AW.cjs";
3
3
  //#region src/stacks/tanstack/handlers.d.ts
4
4
  interface TanStackRequest extends Request {
5
5
  waitUntil?: ScheduleBackground;
@@ -1,5 +1,5 @@
1
- import { m as McpDefinition } from "../../types-BCKyT2wb.js";
2
- import { n as ScheduleBackground, t as McpRuntimeOptions } from "../../authorize-d9-8n9u3.js";
1
+ import { m as McpDefinition } from "../../types-BX8RawmT.js";
2
+ import { n as ScheduleBackground, t as McpRuntimeOptions } from "../../authorize-Dt7ll7Ur.js";
3
3
  //#region src/stacks/tanstack/handlers.d.ts
4
4
  interface TanStackRequest extends Request {
5
5
  waitUntil?: ScheduleBackground;
@@ -1,5 +1,5 @@
1
- import { c as createRecorderForRuntime } from "../../cors-CHdtyxhN.js";
2
- import { t as createMcpProtocolHandler } from "../../mcp-DE9Z7jdd.js";
1
+ import { c as createRecorderForRuntime } from "../../cors-F5UnGwvm.js";
2
+ import { t as createMcpProtocolHandler } from "../../mcp-BsCOgpj8.js";
3
3
  import { createOAuthProtectedResourceMetadataHandler } from "../../protocols/oauth-metadata.js";
4
4
  import { t as applyForwardedOrigin } from "../../forwarded-BBXvFeh6.js";
5
5
  //#region src/stacks/tanstack/handlers.ts
@@ -1,4 +1,4 @@
1
- import { t as McpPluginApi } from "../../io-CL1GeE3D.cjs";
1
+ import { t as McpPluginApi } from "../../io-Bn0ErYbG.cjs";
2
2
  import { Plugin } from "vite";
3
3
  //#region src/stacks/tanstack/vite.d.ts
4
4
  interface McpPluginOptions {
@@ -1,4 +1,4 @@
1
- import { t as McpPluginApi } from "../../io-7U860POB.js";
1
+ import { t as McpPluginApi } from "../../io-BvogiiQ1.js";
2
2
  import { Plugin } from "vite";
3
3
  //#region src/stacks/tanstack/vite.d.ts
4
4
  interface McpPluginOptions {
@@ -330,6 +330,8 @@ interface ToolDefinitionBase<TInput extends ZodRawShape$1 | undefined = ZodRawSh
330
330
  /** Prose read by the LLM to decide whether to call this tool. Required. */
331
331
  readonly description: string;
332
332
  readonly inputSchema?: TInput;
333
+ /** Set to `false` to drop, rather than reject, argument keys `inputSchema` does not declare. */
334
+ readonly strict?: boolean;
333
335
  readonly outputSchema?: TOutput;
334
336
  readonly annotations?: ToolAnnotations;
335
337
  }
@@ -354,6 +356,7 @@ interface AnyToolDefinition<TAppContext = never> {
354
356
  readonly title: string;
355
357
  readonly description: string;
356
358
  readonly inputSchema?: ZodRawShape$1 | undefined;
359
+ readonly strict?: boolean;
357
360
  readonly outputSchema?: ZodOutputSchema | undefined;
358
361
  readonly annotations?: ToolAnnotations;
359
362
  readonly enabled?: (ctx: ToolVisibilityContext<TAppContext>) => boolean;
@@ -330,6 +330,8 @@ interface ToolDefinitionBase<TInput extends ZodRawShape$1 | undefined = ZodRawSh
330
330
  /** Prose read by the LLM to decide whether to call this tool. Required. */
331
331
  readonly description: string;
332
332
  readonly inputSchema?: TInput;
333
+ /** Set to `false` to drop, rather than reject, argument keys `inputSchema` does not declare. */
334
+ readonly strict?: boolean;
333
335
  readonly outputSchema?: TOutput;
334
336
  readonly annotations?: ToolAnnotations;
335
337
  }
@@ -354,6 +356,7 @@ interface AnyToolDefinition<TAppContext = never> {
354
356
  readonly title: string;
355
357
  readonly description: string;
356
358
  readonly inputSchema?: ZodRawShape$1 | undefined;
359
+ readonly strict?: boolean;
357
360
  readonly outputSchema?: ZodOutputSchema | undefined;
358
361
  readonly annotations?: ToolAnnotations;
359
362
  readonly enabled?: (ctx: ToolVisibilityContext<TAppContext>) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovable.dev/mcp-js",
3
- "version": "2.3.0",
3
+ "version": "3.0.0-rc.0",
4
4
  "engines": {
5
5
  "node": ">=20"
6
6
  },
@@ -108,8 +108,8 @@
108
108
  ],
109
109
  "license": "MIT",
110
110
  "dependencies": {
111
- "@modelcontextprotocol/server": "2.0.0",
112
111
  "@modelcontextprotocol/sdk": "1.28.0",
112
+ "@modelcontextprotocol/server": "2.0.0",
113
113
  "esbuild": "^0.27.0",
114
114
  "jose": "^6.2.2"
115
115
  },