@mastra/server 0.23.1 → 0.23.2-alpha.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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @mastra/server
2
2
 
3
+ ## 0.23.2-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`f57a81e`](https://github.com/mastra-ai/mastra/commit/f57a81e6ce644e45bf1c9618778cc54c50a84ad4), [`fc79af3`](https://github.com/mastra-ai/mastra/commit/fc79af3915d1c456729cbd753673b0c0564340d8), [`60bd45d`](https://github.com/mastra-ai/mastra/commit/60bd45de021f0dfbe6583928f6da5169cb5585ba), [`a30093d`](https://github.com/mastra-ai/mastra/commit/a30093de98c1836dcd5dfddf09649010712b8c95), [`e40d4d0`](https://github.com/mastra-ai/mastra/commit/e40d4d0a0971b4505e7c9de73c656066c7565653), [`ff16f9b`](https://github.com/mastra-ai/mastra/commit/ff16f9b9dbc701b26b6c4e9872f759f3880f9327), [`35e6cf7`](https://github.com/mastra-ai/mastra/commit/35e6cf722fef16ea0301eb9cf5a32fe9ccb12d22), [`30a2e36`](https://github.com/mastra-ai/mastra/commit/30a2e369485e0e59c4faa1d83c5635c2260b304c)]:
8
+ - @mastra/core@0.23.2-alpha.1
9
+
10
+ ## 0.23.2-alpha.0
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`2afd345`](https://github.com/mastra-ai/mastra/commit/2afd3450825b76e41f7973baddf13867ea042e40), [`eefc89e`](https://github.com/mastra-ai/mastra/commit/eefc89ee69f05bb71661473a807fc7dc03d56f17), [`0fe7adb`](https://github.com/mastra-ai/mastra/commit/0fe7adb0f20f59a6bb41f235d01f8b7a880ea6e7), [`a42e496`](https://github.com/mastra-ai/mastra/commit/a42e49686a7486e2e9e9397fa98e5ff7a71dc1b0), [`3670db7`](https://github.com/mastra-ai/mastra/commit/3670db7e8e798f9d65fac5bfb732134a1f26ba7b), [`fc843ff`](https://github.com/mastra-ai/mastra/commit/fc843ff4d1d149317b6324553ce5ad7972062a78)]:
15
+ - @mastra/core@0.23.2-alpha.0
16
+
3
17
  ## 0.23.1
4
18
 
5
19
  ### Patch Changes
@@ -2026,15 +2026,64 @@ var zodToJsonSchema = (schema, options) => {
2026
2026
  // ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/index.js
2027
2027
  var esm_default = zodToJsonSchema;
2028
2028
 
2029
- // ../schema-compat/dist/chunk-GWTUXMDD.js
2029
+ // ../schema-compat/dist/chunk-U2HXWNAF.js
2030
+ var PATCHED = Symbol("__mastra_patched__");
2031
+ function patchRecordSchemas(schema) {
2032
+ if (!schema || typeof schema !== "object") return schema;
2033
+ if (schema[PATCHED]) return schema;
2034
+ schema[PATCHED] = true;
2035
+ const def = schema._zod?.def;
2036
+ if (def?.type === "record" && def.keyType && !def.valueType) {
2037
+ def.valueType = def.keyType;
2038
+ def.keyType = zod.z.string();
2039
+ }
2040
+ if (!def) return schema;
2041
+ if (def.type === "object" && def.shape) {
2042
+ const shape = typeof def.shape === "function" ? def.shape() : def.shape;
2043
+ for (const key of Object.keys(shape)) {
2044
+ patchRecordSchemas(shape[key]);
2045
+ }
2046
+ }
2047
+ if (def.type === "array" && def.element) {
2048
+ patchRecordSchemas(def.element);
2049
+ }
2050
+ if (def.type === "union" && def.options) {
2051
+ def.options.forEach(patchRecordSchemas);
2052
+ }
2053
+ if (def.type === "record") {
2054
+ if (def.keyType) patchRecordSchemas(def.keyType);
2055
+ if (def.valueType) patchRecordSchemas(def.valueType);
2056
+ }
2057
+ if (def.type === "intersection") {
2058
+ if (def.left) patchRecordSchemas(def.left);
2059
+ if (def.right) patchRecordSchemas(def.right);
2060
+ }
2061
+ if (def.type === "lazy") {
2062
+ if (def.getter && typeof def.getter === "function") {
2063
+ const originalGetter = def.getter;
2064
+ def.getter = function() {
2065
+ const innerSchema = originalGetter();
2066
+ if (innerSchema) {
2067
+ patchRecordSchemas(innerSchema);
2068
+ }
2069
+ return innerSchema;
2070
+ };
2071
+ }
2072
+ }
2073
+ if (def.innerType) {
2074
+ patchRecordSchemas(def.innerType);
2075
+ }
2076
+ return schema;
2077
+ }
2030
2078
  function zodToJsonSchema2(zodSchema4, target = "jsonSchema7", strategy = "relative") {
2031
2079
  const fn = "toJSONSchema";
2032
2080
  if (fn in zod.z) {
2081
+ patchRecordSchemas(zodSchema4);
2033
2082
  return zod.z[fn](zodSchema4, {
2034
2083
  unrepresentable: "any",
2035
2084
  override: (ctx) => {
2036
- const def = ctx.zodSchema?._zod?.def;
2037
- if (def && def.type === "date") {
2085
+ const def = ctx.zodSchema?._def || ctx.zodSchema?._zod?.def;
2086
+ if (def && (def.typeName === "ZodDate" || def.type === "date")) {
2038
2087
  ctx.jsonSchema.type = "string";
2039
2088
  ctx.jsonSchema.format = "date-time";
2040
2089
  }
@@ -19512,5 +19561,5 @@ exports.startAsyncAgentBuilderActionHandler = startAsyncAgentBuilderActionHandle
19512
19561
  exports.streamAgentBuilderActionHandler = streamAgentBuilderActionHandler;
19513
19562
  exports.streamVNextAgentBuilderActionHandler = streamVNextAgentBuilderActionHandler;
19514
19563
  exports.watchAgentBuilderActionHandler = watchAgentBuilderActionHandler;
19515
- //# sourceMappingURL=chunk-YKENCZQ2.cjs.map
19516
- //# sourceMappingURL=chunk-YKENCZQ2.cjs.map
19564
+ //# sourceMappingURL=chunk-XB4SIEOA.cjs.map
19565
+ //# sourceMappingURL=chunk-XB4SIEOA.cjs.map