@mastra/client-js 0.17.0-alpha.1 → 0.17.0-alpha.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 0.17.0-alpha.2
4
+
5
+ ### Patch Changes
6
+
7
+ - The client-js package had its own simpler zodToJsonSchema implementation that was missing critical features from schema-compat. This could cause issues when users pass Zod schemas with `z.record()` or `z.date()` through the MastraClient. ([#10925](https://github.com/mastra-ai/mastra/pull/10925))
8
+
9
+ Now the client uses the same implementation as the rest of the codebase, which includes the Zod v4 `z.record()` bug fix, date-time format conversion for `z.date()`, and proper handling of unrepresentable types.
10
+
11
+ Also removes the now-unused `zod-to-json-schema` dependency from client-js.
12
+
13
+ - Updated dependencies [[`b685c9c`](https://github.com/mastra-ai/mastra/commit/b685c9c0b89f49e0d4542c4ac72569682db69794)]:
14
+ - @mastra/core@0.24.7-alpha.2
15
+
3
16
  ## 0.17.0-alpha.1
4
17
 
5
18
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -5,12 +5,7 @@ var uuid = require('@lukeed/uuid');
5
5
  var error = require('@mastra/core/error');
6
6
  var runtimeContext = require('@mastra/core/runtime-context');
7
7
  var isVercelTool = require('@mastra/core/tools/is-vercel-tool');
8
- var zod = require('zod');
9
- var originalZodToJsonSchema = require('zod-to-json-schema');
10
-
11
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
12
-
13
- var originalZodToJsonSchema__default = /*#__PURE__*/_interopDefault(originalZodToJsonSchema);
8
+ var zodToJson = require('@mastra/schema-compat/zod-to-json');
14
9
 
15
10
  // src/resources/agent.ts
16
11
  function parseClientRuntimeContext(runtimeContext$1) {
@@ -43,11 +38,7 @@ function zodToJsonSchema(zodSchema) {
43
38
  if (!isZodType(zodSchema)) {
44
39
  return zodSchema;
45
40
  }
46
- if ("toJSONSchema" in zod.z) {
47
- const fn = "toJSONSchema";
48
- return zod.z[fn].call(zod.z, zodSchema);
49
- }
50
- return originalZodToJsonSchema__default.default(zodSchema, { $refStrategy: "relative" });
41
+ return zodToJson.zodToJsonSchema(zodSchema);
51
42
  }
52
43
 
53
44
  // src/utils/process-client-tools.ts