@voltagent/core 1.1.6 → 1.1.7-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -12264,7 +12264,9 @@ var import_stdio = require("@modelcontextprotocol/sdk/client/stdio.js");
12264
12264
  var import_streamableHttp = require("@modelcontextprotocol/sdk/client/streamableHttp.js");
12265
12265
  var import_protocol = require("@modelcontextprotocol/sdk/shared/protocol.js");
12266
12266
  var import_types6 = require("@modelcontextprotocol/sdk/types.js");
12267
+ var import_zod7 = require("zod");
12267
12268
  var import_zod_from_json_schema = require("zod-from-json-schema");
12269
+ var import_zod_from_json_schema_v3 = require("zod-from-json-schema-v3");
12268
12270
  var MCPClient = class extends import_node_events5.EventEmitter {
12269
12271
  static {
12270
12272
  __name(this, "MCPClient");
@@ -12503,7 +12505,7 @@ var MCPClient = class extends import_node_events5.EventEmitter {
12503
12505
  const executableTools = {};
12504
12506
  for (const toolDef of Object.values(definitions)) {
12505
12507
  try {
12506
- const zodSchema = (0, import_zod_from_json_schema.convertJsonSchemaToZod)(
12508
+ const zodSchema = ("toJSONSchema" in import_zod7.z ? import_zod_from_json_schema.convertJsonSchemaToZod : import_zod_from_json_schema_v3.convertJsonSchemaToZod)(
12507
12509
  toolDef.inputSchema
12508
12510
  );
12509
12511
  const namespacedToolName = `${this.clientInfo.name}_${toolDef.name}`;