@mastra/server 0.23.1 → 0.23.2-alpha.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/CHANGELOG.md +7 -0
- package/dist/{chunk-YKENCZQ2.cjs → chunk-XB4SIEOA.cjs} +54 -5
- package/dist/chunk-XB4SIEOA.cjs.map +1 -0
- package/dist/{chunk-CVOGYUL7.js → chunk-XYQZ3T3K.js} +54 -5
- package/dist/chunk-XYQZ3T3K.js.map +1 -0
- package/dist/server/handlers/agent-builder.cjs +16 -16
- package/dist/server/handlers/agent-builder.js +1 -1
- package/dist/server/handlers.cjs +2 -2
- package/dist/server/handlers.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-CVOGYUL7.js.map +0 -1
- package/dist/chunk-YKENCZQ2.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @mastra/server
|
|
2
2
|
|
|
3
|
+
## 0.23.2-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 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)]:
|
|
8
|
+
- @mastra/core@0.23.2-alpha.0
|
|
9
|
+
|
|
3
10
|
## 0.23.1
|
|
4
11
|
|
|
5
12
|
### 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-
|
|
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-
|
|
19516
|
-
//# sourceMappingURL=chunk-
|
|
19564
|
+
//# sourceMappingURL=chunk-XB4SIEOA.cjs.map
|
|
19565
|
+
//# sourceMappingURL=chunk-XB4SIEOA.cjs.map
|