@mastra/server 0.0.0-fix-memory-search-fetch-20251027160505 → 0.0.0-fix-multi-modal-for-cloud-20251028082043
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 +3 -3
- package/dist/{chunk-ABCBHBR7.js → chunk-7HCPO76Z.js} +55 -13
- package/dist/chunk-7HCPO76Z.js.map +1 -0
- package/dist/{chunk-EGLGMBWW.cjs → chunk-KDUHLUK4.cjs} +55 -13
- package/dist/chunk-KDUHLUK4.cjs.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 +6 -6
- package/dist/chunk-ABCBHBR7.js.map +0 -1
- package/dist/chunk-EGLGMBWW.cjs.map +0 -1
|
@@ -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
|
}
|
|
@@ -19210,17 +19259,10 @@ ${workflowBuilderPrompts.validation.instructions}`
|
|
|
19210
19259
|
resumeData
|
|
19211
19260
|
});
|
|
19212
19261
|
const originalInstructions = await executionAgent.getInstructions({ runtimeContext });
|
|
19213
|
-
const additionalInstructions = executionAgent.instructions;
|
|
19214
|
-
let enhancedInstructions = originalInstructions;
|
|
19215
|
-
if (additionalInstructions) {
|
|
19216
|
-
enhancedInstructions = `${originalInstructions}
|
|
19217
|
-
|
|
19218
|
-
${additionalInstructions}`;
|
|
19219
|
-
}
|
|
19220
19262
|
const enhancedOptions = {
|
|
19221
19263
|
stopWhen: stepCountIs(100),
|
|
19222
19264
|
temperature: 0.3,
|
|
19223
|
-
instructions:
|
|
19265
|
+
instructions: originalInstructions
|
|
19224
19266
|
};
|
|
19225
19267
|
let finalResult = null;
|
|
19226
19268
|
let allTasksCompleted = false;
|
|
@@ -19538,5 +19580,5 @@ exports.startAsyncAgentBuilderActionHandler = startAsyncAgentBuilderActionHandle
|
|
|
19538
19580
|
exports.streamAgentBuilderActionHandler = streamAgentBuilderActionHandler;
|
|
19539
19581
|
exports.streamVNextAgentBuilderActionHandler = streamVNextAgentBuilderActionHandler;
|
|
19540
19582
|
exports.watchAgentBuilderActionHandler = watchAgentBuilderActionHandler;
|
|
19541
|
-
//# sourceMappingURL=chunk-
|
|
19542
|
-
//# sourceMappingURL=chunk-
|
|
19583
|
+
//# sourceMappingURL=chunk-KDUHLUK4.cjs.map
|
|
19584
|
+
//# sourceMappingURL=chunk-KDUHLUK4.cjs.map
|