@mastra/server 0.0.0-message-ordering-20250415215612 → 0.0.0-remove-cloud-span-transform-20250425214156
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/_tsup-dts-rollup.d.cts +99 -24
- package/dist/_tsup-dts-rollup.d.ts +99 -24
- package/dist/{chunk-A7DF4ETD.cjs → chunk-55HTWX4C.cjs} +2 -9
- package/dist/{chunk-UV4WTEH4.js → chunk-5JNVY6DU.js} +5 -5
- package/dist/{chunk-QH6XWSXP.cjs → chunk-5SWCVTNL.cjs} +38 -38
- package/dist/{chunk-CWSDZEZG.cjs → chunk-7IWQE76Z.cjs} +2 -2
- package/dist/chunk-B66WVPGJ.js +297 -0
- package/dist/{chunk-PDC4ZBQW.cjs → chunk-D3G23FP3.cjs} +9 -9
- package/dist/{chunk-JLDXUWK7.cjs → chunk-FPIWDH5Y.cjs} +4 -4
- package/dist/{chunk-Z46X3YCB.cjs → chunk-HCOPJZ4A.cjs} +11 -11
- package/dist/{chunk-OPP7H5TW.js → chunk-LFOBHRFO.js} +10 -10
- package/dist/{chunk-VK6FX47H.js → chunk-OMN3UI6X.js} +38 -38
- package/dist/{chunk-3RVHWGWO.js → chunk-Q6SHQECN.js} +2 -9
- package/dist/{chunk-67WTHYAV.js → chunk-R4J7XQYU.js} +7 -7
- package/dist/{chunk-YANVFOYA.js → chunk-RE6YL32K.js} +4 -4
- package/dist/{chunk-B64YROKU.cjs → chunk-TZK63M5N.cjs} +16 -16
- package/dist/{chunk-DVPP5S6I.js → chunk-WTHDCRMY.js} +2 -2
- package/dist/chunk-ZHNKYTNS.cjs +309 -0
- package/dist/server/handlers/agents.cjs +7 -7
- package/dist/server/handlers/agents.js +1 -1
- package/dist/server/handlers/network.cjs +5 -5
- package/dist/server/handlers/network.js +1 -1
- package/dist/server/handlers/telemetry.cjs +3 -3
- package/dist/server/handlers/telemetry.js +1 -1
- package/dist/server/handlers/tools.cjs +5 -5
- package/dist/server/handlers/tools.js +1 -1
- package/dist/server/handlers/vNextWorkflows.cjs +46 -0
- package/dist/server/handlers/vNextWorkflows.d.cts +10 -0
- package/dist/server/handlers/vNextWorkflows.d.ts +10 -0
- package/dist/server/handlers/vNextWorkflows.js +1 -0
- package/dist/server/handlers/voice.cjs +4 -4
- package/dist/server/handlers/voice.js +1 -1
- package/dist/server/handlers/workflows.cjs +11 -11
- package/dist/server/handlers/workflows.js +1 -1
- package/dist/server/handlers.cjs +17 -12
- package/dist/server/handlers.d.cts +1 -0
- package/dist/server/handlers.d.ts +1 -0
- package/dist/server/handlers.js +7 -6
- package/package.json +3 -3
|
@@ -764,7 +764,7 @@ SuperJSON.registerCustom = SuperJSON.defaultInstance.registerCustom.bind(SuperJS
|
|
|
764
764
|
SuperJSON.allowErrorProps = SuperJSON.defaultInstance.allowErrorProps.bind(SuperJSON.defaultInstance);
|
|
765
765
|
var stringify = SuperJSON.stringify;
|
|
766
766
|
|
|
767
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
767
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/Options.js
|
|
768
768
|
var ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
|
|
769
769
|
var defaultOptions = {
|
|
770
770
|
name: void 0,
|
|
@@ -797,7 +797,7 @@ var getDefaultOptions = (options) => typeof options === "string" ? {
|
|
|
797
797
|
...options
|
|
798
798
|
};
|
|
799
799
|
|
|
800
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
800
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/Refs.js
|
|
801
801
|
var getRefs = (options) => {
|
|
802
802
|
const _options = getDefaultOptions(options);
|
|
803
803
|
const currentPath = _options.name !== void 0 ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath;
|
|
@@ -817,7 +817,7 @@ var getRefs = (options) => {
|
|
|
817
817
|
};
|
|
818
818
|
};
|
|
819
819
|
|
|
820
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
820
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/errorMessages.js
|
|
821
821
|
function addErrorMessage(res, key, errorMessage, refs) {
|
|
822
822
|
if (!refs?.errorMessages)
|
|
823
823
|
return;
|
|
@@ -833,7 +833,7 @@ function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
|
|
|
833
833
|
addErrorMessage(res, key, errorMessage, refs);
|
|
834
834
|
}
|
|
835
835
|
|
|
836
|
-
// ../../node_modules/.pnpm/zod@3.24.
|
|
836
|
+
// ../../node_modules/.pnpm/zod@3.24.3/node_modules/zod/lib/index.mjs
|
|
837
837
|
var util;
|
|
838
838
|
(function(util2) {
|
|
839
839
|
util2.assertEqual = (val) => val;
|
|
@@ -4406,12 +4406,12 @@ var ZodFirstPartyTypeKind;
|
|
|
4406
4406
|
ZodFirstPartyTypeKind2["ZodReadonly"] = "ZodReadonly";
|
|
4407
4407
|
})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
4408
4408
|
|
|
4409
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
4409
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/any.js
|
|
4410
4410
|
function parseAnyDef() {
|
|
4411
4411
|
return {};
|
|
4412
4412
|
}
|
|
4413
4413
|
|
|
4414
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
4414
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/array.js
|
|
4415
4415
|
function parseArrayDef(def, refs) {
|
|
4416
4416
|
const res = {
|
|
4417
4417
|
type: "array"
|
|
@@ -4435,7 +4435,7 @@ function parseArrayDef(def, refs) {
|
|
|
4435
4435
|
return res;
|
|
4436
4436
|
}
|
|
4437
4437
|
|
|
4438
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
4438
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
|
|
4439
4439
|
function parseBigintDef(def, refs) {
|
|
4440
4440
|
const res = {
|
|
4441
4441
|
type: "integer",
|
|
@@ -4481,24 +4481,24 @@ function parseBigintDef(def, refs) {
|
|
|
4481
4481
|
return res;
|
|
4482
4482
|
}
|
|
4483
4483
|
|
|
4484
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
4484
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
|
|
4485
4485
|
function parseBooleanDef() {
|
|
4486
4486
|
return {
|
|
4487
4487
|
type: "boolean"
|
|
4488
4488
|
};
|
|
4489
4489
|
}
|
|
4490
4490
|
|
|
4491
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
4491
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
|
|
4492
4492
|
function parseBrandedDef(_def, refs) {
|
|
4493
4493
|
return parseDef(_def.type._def, refs);
|
|
4494
4494
|
}
|
|
4495
4495
|
|
|
4496
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
4496
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
|
|
4497
4497
|
var parseCatchDef = (def, refs) => {
|
|
4498
4498
|
return parseDef(def.innerType._def, refs);
|
|
4499
4499
|
};
|
|
4500
4500
|
|
|
4501
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
4501
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/date.js
|
|
4502
4502
|
function parseDateDef(def, refs, overrideDateStrategy) {
|
|
4503
4503
|
const strategy = overrideDateStrategy ?? refs.dateStrategy;
|
|
4504
4504
|
if (Array.isArray(strategy)) {
|
|
@@ -4557,7 +4557,7 @@ var integerDateParser = (def, refs) => {
|
|
|
4557
4557
|
return res;
|
|
4558
4558
|
};
|
|
4559
4559
|
|
|
4560
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
4560
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/default.js
|
|
4561
4561
|
function parseDefaultDef(_def, refs) {
|
|
4562
4562
|
return {
|
|
4563
4563
|
...parseDef(_def.innerType._def, refs),
|
|
@@ -4565,12 +4565,12 @@ function parseDefaultDef(_def, refs) {
|
|
|
4565
4565
|
};
|
|
4566
4566
|
}
|
|
4567
4567
|
|
|
4568
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
4568
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
|
|
4569
4569
|
function parseEffectsDef(_def, refs) {
|
|
4570
4570
|
return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : {};
|
|
4571
4571
|
}
|
|
4572
4572
|
|
|
4573
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
4573
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
|
|
4574
4574
|
function parseEnumDef(def) {
|
|
4575
4575
|
return {
|
|
4576
4576
|
type: "string",
|
|
@@ -4578,7 +4578,7 @@ function parseEnumDef(def) {
|
|
|
4578
4578
|
};
|
|
4579
4579
|
}
|
|
4580
4580
|
|
|
4581
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
4581
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
|
|
4582
4582
|
var isJsonSchema7AllOfType = (type) => {
|
|
4583
4583
|
if ("type" in type && type.type === "string")
|
|
4584
4584
|
return false;
|
|
@@ -4620,7 +4620,7 @@ function parseIntersectionDef(def, refs) {
|
|
|
4620
4620
|
} : void 0;
|
|
4621
4621
|
}
|
|
4622
4622
|
|
|
4623
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
4623
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
|
|
4624
4624
|
function parseLiteralDef(def, refs) {
|
|
4625
4625
|
const parsedType = typeof def.value;
|
|
4626
4626
|
if (parsedType !== "bigint" && parsedType !== "number" && parsedType !== "boolean" && parsedType !== "string") {
|
|
@@ -4640,7 +4640,7 @@ function parseLiteralDef(def, refs) {
|
|
|
4640
4640
|
};
|
|
4641
4641
|
}
|
|
4642
4642
|
|
|
4643
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
4643
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
|
|
4644
4644
|
var emojiRegex2 = void 0;
|
|
4645
4645
|
var zodPatterns = {
|
|
4646
4646
|
/**
|
|
@@ -4952,7 +4952,7 @@ function stringifyRegExpWithFlags(regex, refs) {
|
|
|
4952
4952
|
return pattern;
|
|
4953
4953
|
}
|
|
4954
4954
|
|
|
4955
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
4955
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/record.js
|
|
4956
4956
|
function parseRecordDef(def, refs) {
|
|
4957
4957
|
if (refs.target === "openAi") {
|
|
4958
4958
|
console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");
|
|
@@ -5004,7 +5004,7 @@ function parseRecordDef(def, refs) {
|
|
|
5004
5004
|
return schema;
|
|
5005
5005
|
}
|
|
5006
5006
|
|
|
5007
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
5007
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/map.js
|
|
5008
5008
|
function parseMapDef(def, refs) {
|
|
5009
5009
|
if (refs.mapStrategy === "record") {
|
|
5010
5010
|
return parseRecordDef(def, refs);
|
|
@@ -5029,7 +5029,7 @@ function parseMapDef(def, refs) {
|
|
|
5029
5029
|
};
|
|
5030
5030
|
}
|
|
5031
5031
|
|
|
5032
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
5032
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
|
|
5033
5033
|
function parseNativeEnumDef(def) {
|
|
5034
5034
|
const object = def.values;
|
|
5035
5035
|
const actualKeys = Object.keys(def.values).filter((key) => {
|
|
@@ -5043,14 +5043,14 @@ function parseNativeEnumDef(def) {
|
|
|
5043
5043
|
};
|
|
5044
5044
|
}
|
|
5045
5045
|
|
|
5046
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
5046
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/never.js
|
|
5047
5047
|
function parseNeverDef() {
|
|
5048
5048
|
return {
|
|
5049
5049
|
not: {}
|
|
5050
5050
|
};
|
|
5051
5051
|
}
|
|
5052
5052
|
|
|
5053
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
5053
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/null.js
|
|
5054
5054
|
function parseNullDef(refs) {
|
|
5055
5055
|
return refs.target === "openApi3" ? {
|
|
5056
5056
|
enum: ["null"],
|
|
@@ -5060,7 +5060,7 @@ function parseNullDef(refs) {
|
|
|
5060
5060
|
};
|
|
5061
5061
|
}
|
|
5062
5062
|
|
|
5063
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
5063
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/union.js
|
|
5064
5064
|
var primitiveMappings = {
|
|
5065
5065
|
ZodString: "string",
|
|
5066
5066
|
ZodNumber: "number",
|
|
@@ -5128,7 +5128,7 @@ var asAnyOf = (def, refs) => {
|
|
|
5128
5128
|
return anyOf.length ? { anyOf } : void 0;
|
|
5129
5129
|
};
|
|
5130
5130
|
|
|
5131
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
5131
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
|
|
5132
5132
|
function parseNullableDef(def, refs) {
|
|
5133
5133
|
if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) {
|
|
5134
5134
|
if (refs.target === "openApi3") {
|
|
@@ -5160,7 +5160,7 @@ function parseNullableDef(def, refs) {
|
|
|
5160
5160
|
return base && { anyOf: [base, { type: "null" }] };
|
|
5161
5161
|
}
|
|
5162
5162
|
|
|
5163
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
5163
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/number.js
|
|
5164
5164
|
function parseNumberDef(def, refs) {
|
|
5165
5165
|
const res = {
|
|
5166
5166
|
type: "number"
|
|
@@ -5209,7 +5209,7 @@ function parseNumberDef(def, refs) {
|
|
|
5209
5209
|
return res;
|
|
5210
5210
|
}
|
|
5211
5211
|
|
|
5212
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
5212
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/object.js
|
|
5213
5213
|
function parseObjectDef(def, refs) {
|
|
5214
5214
|
const forceOptionalIntoNullable = refs.target === "openAi";
|
|
5215
5215
|
const result = {
|
|
@@ -5279,7 +5279,7 @@ function safeIsOptional(schema) {
|
|
|
5279
5279
|
}
|
|
5280
5280
|
}
|
|
5281
5281
|
|
|
5282
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
5282
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
|
|
5283
5283
|
var parseOptionalDef = (def, refs) => {
|
|
5284
5284
|
if (refs.currentPath.toString() === refs.propertyPath?.toString()) {
|
|
5285
5285
|
return parseDef(def.innerType._def, refs);
|
|
@@ -5298,7 +5298,7 @@ var parseOptionalDef = (def, refs) => {
|
|
|
5298
5298
|
} : {};
|
|
5299
5299
|
};
|
|
5300
5300
|
|
|
5301
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
5301
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js
|
|
5302
5302
|
var parsePipelineDef = (def, refs) => {
|
|
5303
5303
|
if (refs.pipeStrategy === "input") {
|
|
5304
5304
|
return parseDef(def.in._def, refs);
|
|
@@ -5318,12 +5318,12 @@ var parsePipelineDef = (def, refs) => {
|
|
|
5318
5318
|
};
|
|
5319
5319
|
};
|
|
5320
5320
|
|
|
5321
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
5321
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
|
|
5322
5322
|
function parsePromiseDef(def, refs) {
|
|
5323
5323
|
return parseDef(def.type._def, refs);
|
|
5324
5324
|
}
|
|
5325
5325
|
|
|
5326
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
5326
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/set.js
|
|
5327
5327
|
function parseSetDef(def, refs) {
|
|
5328
5328
|
const items = parseDef(def.valueType._def, {
|
|
5329
5329
|
...refs,
|
|
@@ -5343,7 +5343,7 @@ function parseSetDef(def, refs) {
|
|
|
5343
5343
|
return schema;
|
|
5344
5344
|
}
|
|
5345
5345
|
|
|
5346
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
5346
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
|
|
5347
5347
|
function parseTupleDef(def, refs) {
|
|
5348
5348
|
if (def.rest) {
|
|
5349
5349
|
return {
|
|
@@ -5371,24 +5371,24 @@ function parseTupleDef(def, refs) {
|
|
|
5371
5371
|
}
|
|
5372
5372
|
}
|
|
5373
5373
|
|
|
5374
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
5374
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
|
|
5375
5375
|
function parseUndefinedDef() {
|
|
5376
5376
|
return {
|
|
5377
5377
|
not: {}
|
|
5378
5378
|
};
|
|
5379
5379
|
}
|
|
5380
5380
|
|
|
5381
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
5381
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
|
|
5382
5382
|
function parseUnknownDef() {
|
|
5383
5383
|
return {};
|
|
5384
5384
|
}
|
|
5385
5385
|
|
|
5386
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
5386
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
|
|
5387
5387
|
var parseReadonlyDef = (def, refs) => {
|
|
5388
5388
|
return parseDef(def.innerType._def, refs);
|
|
5389
5389
|
};
|
|
5390
5390
|
|
|
5391
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
5391
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/selectParser.js
|
|
5392
5392
|
var selectParser = (def, typeName, refs) => {
|
|
5393
5393
|
switch (typeName) {
|
|
5394
5394
|
case ZodFirstPartyTypeKind.ZodString:
|
|
@@ -5464,7 +5464,7 @@ var selectParser = (def, typeName, refs) => {
|
|
|
5464
5464
|
}
|
|
5465
5465
|
};
|
|
5466
5466
|
|
|
5467
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
5467
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/parseDef.js
|
|
5468
5468
|
function parseDef(def, refs, forceResolution = false) {
|
|
5469
5469
|
const seenItem = refs.seen.get(def);
|
|
5470
5470
|
if (refs.override) {
|
|
@@ -5528,7 +5528,7 @@ var addMeta = (def, refs, jsonSchema) => {
|
|
|
5528
5528
|
return jsonSchema;
|
|
5529
5529
|
};
|
|
5530
5530
|
|
|
5531
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
5531
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
|
|
5532
5532
|
var zodToJsonSchema = (schema, options) => {
|
|
5533
5533
|
const refs = getRefs(options);
|
|
5534
5534
|
const definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name2, schema2]) => ({
|
|
@@ -5572,7 +5572,7 @@ var zodToJsonSchema = (schema, options) => {
|
|
|
5572
5572
|
return combined;
|
|
5573
5573
|
};
|
|
5574
5574
|
|
|
5575
|
-
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.
|
|
5575
|
+
// ../../node_modules/.pnpm/zod-to-json-schema@3.24.5_zod@3.24.3/node_modules/zod-to-json-schema/dist/esm/index.js
|
|
5576
5576
|
var esm_default = zodToJsonSchema;
|
|
5577
5577
|
|
|
5578
5578
|
exports.esm_default = esm_default;
|
|
@@ -29,7 +29,7 @@ async function getTelemetryHandler({ mastra, body }) {
|
|
|
29
29
|
return [key, value];
|
|
30
30
|
})
|
|
31
31
|
) : void 0;
|
|
32
|
-
const traces = await storage.
|
|
32
|
+
const traces = await storage.getTraces({
|
|
33
33
|
name,
|
|
34
34
|
scope,
|
|
35
35
|
page: Number(page ?? 0),
|
|
@@ -107,7 +107,7 @@ async function storeTelemetryHandler({ mastra, body }) {
|
|
|
107
107
|
}
|
|
108
108
|
return acc;
|
|
109
109
|
}, []);
|
|
110
|
-
return storage.
|
|
110
|
+
return storage.batchTraceInsert({
|
|
111
111
|
records: allSpans
|
|
112
112
|
}).then(() => {
|
|
113
113
|
return {
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import { stringify, esm_default } from './chunk-OMN3UI6X.js';
|
|
2
|
+
import { handleError } from './chunk-3AHQ5RGN.js';
|
|
3
|
+
import { __export, HTTPException } from './chunk-TRDNDNGQ.js';
|
|
4
|
+
import { ReadableStream } from 'node:stream/web';
|
|
5
|
+
|
|
6
|
+
// src/server/handlers/vNextWorkflows.ts
|
|
7
|
+
var vNextWorkflows_exports = {};
|
|
8
|
+
__export(vNextWorkflows_exports, {
|
|
9
|
+
createVNextWorkflowRunHandler: () => createVNextWorkflowRunHandler,
|
|
10
|
+
getVNextWorkflowByIdHandler: () => getVNextWorkflowByIdHandler,
|
|
11
|
+
getVNextWorkflowRunHandler: () => getVNextWorkflowRunHandler,
|
|
12
|
+
getVNextWorkflowRunsHandler: () => getVNextWorkflowRunsHandler,
|
|
13
|
+
getVNextWorkflowsHandler: () => getVNextWorkflowsHandler,
|
|
14
|
+
resumeAsyncVNextWorkflowHandler: () => resumeAsyncVNextWorkflowHandler,
|
|
15
|
+
resumeVNextWorkflowHandler: () => resumeVNextWorkflowHandler,
|
|
16
|
+
startAsyncVNextWorkflowHandler: () => startAsyncVNextWorkflowHandler,
|
|
17
|
+
startVNextWorkflowRunHandler: () => startVNextWorkflowRunHandler,
|
|
18
|
+
watchVNextWorkflowHandler: () => watchVNextWorkflowHandler
|
|
19
|
+
});
|
|
20
|
+
async function getVNextWorkflowsHandler({ mastra }) {
|
|
21
|
+
try {
|
|
22
|
+
const workflows = mastra.vnext_getWorkflows({ serialized: false });
|
|
23
|
+
const _workflows = Object.entries(workflows).reduce((acc, [key, workflow]) => {
|
|
24
|
+
acc[key] = {
|
|
25
|
+
name: workflow.name,
|
|
26
|
+
steps: Object.entries(workflow.steps).reduce((acc2, [key2, step]) => {
|
|
27
|
+
acc2[key2] = {
|
|
28
|
+
...step,
|
|
29
|
+
inputSchema: step.inputSchema ? stringify(esm_default(step.inputSchema)) : void 0,
|
|
30
|
+
outputSchema: step.outputSchema ? stringify(esm_default(step.outputSchema)) : void 0
|
|
31
|
+
};
|
|
32
|
+
return acc2;
|
|
33
|
+
}, {}),
|
|
34
|
+
stepGraph: workflow.stepGraph,
|
|
35
|
+
inputSchema: workflow.inputSchema ? stringify(esm_default(workflow.inputSchema)) : void 0,
|
|
36
|
+
outputSchema: workflow.outputSchema ? stringify(esm_default(workflow.outputSchema)) : void 0
|
|
37
|
+
};
|
|
38
|
+
return acc;
|
|
39
|
+
}, {});
|
|
40
|
+
return _workflows;
|
|
41
|
+
} catch (error) {
|
|
42
|
+
throw new HTTPException(500, { message: error?.message || "Error getting workflows" });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
async function getVNextWorkflowByIdHandler({ mastra, workflowId }) {
|
|
46
|
+
try {
|
|
47
|
+
if (!workflowId) {
|
|
48
|
+
throw new HTTPException(400, { message: "Workflow ID is required" });
|
|
49
|
+
}
|
|
50
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
51
|
+
if (!workflow) {
|
|
52
|
+
throw new HTTPException(404, { message: "Workflow not found" });
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
steps: Object.entries(workflow.steps).reduce((acc, [key, step]) => {
|
|
56
|
+
acc[key] = {
|
|
57
|
+
...step,
|
|
58
|
+
inputSchema: step.inputSchema ? stringify(esm_default(step.inputSchema)) : void 0,
|
|
59
|
+
outputSchema: step.outputSchema ? stringify(esm_default(step.outputSchema)) : void 0
|
|
60
|
+
};
|
|
61
|
+
return acc;
|
|
62
|
+
}, {}),
|
|
63
|
+
name: workflow.name,
|
|
64
|
+
stepGraph: workflow.stepGraph,
|
|
65
|
+
inputSchema: workflow.inputSchema ? stringify(esm_default(workflow.inputSchema)) : void 0,
|
|
66
|
+
outputSchema: workflow.outputSchema ? stringify(esm_default(workflow.outputSchema)) : void 0
|
|
67
|
+
};
|
|
68
|
+
} catch (error) {
|
|
69
|
+
throw new HTTPException(500, { message: error?.message || "Error getting workflow" });
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
async function getVNextWorkflowRunHandler({
|
|
73
|
+
mastra,
|
|
74
|
+
workflowId,
|
|
75
|
+
runId
|
|
76
|
+
}) {
|
|
77
|
+
try {
|
|
78
|
+
if (!workflowId) {
|
|
79
|
+
throw new HTTPException(400, { message: "Workflow ID is required" });
|
|
80
|
+
}
|
|
81
|
+
if (!runId) {
|
|
82
|
+
throw new HTTPException(400, { message: "Run ID is required" });
|
|
83
|
+
}
|
|
84
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
85
|
+
if (!workflow) {
|
|
86
|
+
throw new HTTPException(404, { message: "Workflow not found" });
|
|
87
|
+
}
|
|
88
|
+
const run = await workflow.getWorkflowRun(runId);
|
|
89
|
+
if (!run) {
|
|
90
|
+
throw new HTTPException(404, { message: "Workflow run not found" });
|
|
91
|
+
}
|
|
92
|
+
return run;
|
|
93
|
+
} catch (error) {
|
|
94
|
+
throw new HTTPException(500, { message: error?.message || "Error getting workflow run" });
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
async function createVNextWorkflowRunHandler({
|
|
98
|
+
mastra,
|
|
99
|
+
workflowId,
|
|
100
|
+
runId: prevRunId
|
|
101
|
+
}) {
|
|
102
|
+
try {
|
|
103
|
+
if (!workflowId) {
|
|
104
|
+
throw new HTTPException(400, { message: "Workflow ID is required" });
|
|
105
|
+
}
|
|
106
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
107
|
+
if (!workflow) {
|
|
108
|
+
throw new HTTPException(404, { message: "Workflow not found" });
|
|
109
|
+
}
|
|
110
|
+
const run = workflow.createRun({ runId: prevRunId });
|
|
111
|
+
return { runId: run.runId };
|
|
112
|
+
} catch (error) {
|
|
113
|
+
throw new HTTPException(500, { message: error?.message || "Error creating workflow run" });
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
async function startAsyncVNextWorkflowHandler({
|
|
117
|
+
mastra,
|
|
118
|
+
runtimeContext,
|
|
119
|
+
workflowId,
|
|
120
|
+
runId,
|
|
121
|
+
inputData
|
|
122
|
+
}) {
|
|
123
|
+
try {
|
|
124
|
+
if (!workflowId) {
|
|
125
|
+
throw new HTTPException(400, { message: "Workflow ID is required" });
|
|
126
|
+
}
|
|
127
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
128
|
+
if (!workflow) {
|
|
129
|
+
throw new HTTPException(404, { message: "Workflow not found" });
|
|
130
|
+
}
|
|
131
|
+
const _run = workflow.createRun({ runId });
|
|
132
|
+
const result = await _run.start({
|
|
133
|
+
inputData,
|
|
134
|
+
runtimeContext
|
|
135
|
+
});
|
|
136
|
+
return result;
|
|
137
|
+
} catch (error) {
|
|
138
|
+
throw new HTTPException(500, { message: error?.message || "Error executing workflow" });
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
async function startVNextWorkflowRunHandler({
|
|
142
|
+
mastra,
|
|
143
|
+
runtimeContext,
|
|
144
|
+
workflowId,
|
|
145
|
+
runId,
|
|
146
|
+
inputData
|
|
147
|
+
}) {
|
|
148
|
+
try {
|
|
149
|
+
if (!workflowId) {
|
|
150
|
+
throw new HTTPException(400, { message: "Workflow ID is required" });
|
|
151
|
+
}
|
|
152
|
+
if (!runId) {
|
|
153
|
+
throw new HTTPException(400, { message: "runId required to start run" });
|
|
154
|
+
}
|
|
155
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
156
|
+
const run = await workflow.getWorkflowRun(runId);
|
|
157
|
+
if (!run) {
|
|
158
|
+
throw new HTTPException(404, { message: "Workflow run not found" });
|
|
159
|
+
}
|
|
160
|
+
const _run = workflow.createRun({ runId });
|
|
161
|
+
await _run.start({
|
|
162
|
+
inputData,
|
|
163
|
+
runtimeContext
|
|
164
|
+
});
|
|
165
|
+
return { message: "Workflow run started" };
|
|
166
|
+
} catch (e) {
|
|
167
|
+
return handleError(e, "Error starting workflow run");
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
async function watchVNextWorkflowHandler({
|
|
171
|
+
mastra,
|
|
172
|
+
workflowId,
|
|
173
|
+
runId
|
|
174
|
+
}) {
|
|
175
|
+
try {
|
|
176
|
+
if (!workflowId) {
|
|
177
|
+
throw new HTTPException(400, { message: "Workflow ID is required" });
|
|
178
|
+
}
|
|
179
|
+
if (!runId) {
|
|
180
|
+
throw new HTTPException(400, { message: "runId required to watch workflow" });
|
|
181
|
+
}
|
|
182
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
183
|
+
const run = await workflow.getWorkflowRun(runId);
|
|
184
|
+
if (!run) {
|
|
185
|
+
throw new HTTPException(404, { message: "Workflow run not found" });
|
|
186
|
+
}
|
|
187
|
+
const _run = workflow.createRun({ runId });
|
|
188
|
+
let unwatch;
|
|
189
|
+
let asyncRef = null;
|
|
190
|
+
const stream = new ReadableStream({
|
|
191
|
+
start(controller) {
|
|
192
|
+
unwatch = _run.watch(({ type, payload, eventTimestamp }) => {
|
|
193
|
+
controller.enqueue(JSON.stringify({ type, payload, eventTimestamp, runId }));
|
|
194
|
+
if (asyncRef) {
|
|
195
|
+
clearImmediate(asyncRef);
|
|
196
|
+
asyncRef = null;
|
|
197
|
+
}
|
|
198
|
+
asyncRef = setImmediate(async () => {
|
|
199
|
+
const runDone = payload.workflowState.status !== "running";
|
|
200
|
+
if (runDone) {
|
|
201
|
+
controller.close();
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
},
|
|
206
|
+
cancel() {
|
|
207
|
+
unwatch?.();
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
return stream;
|
|
211
|
+
} catch (error) {
|
|
212
|
+
return handleError(error, "Error watching workflow");
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
async function resumeAsyncVNextWorkflowHandler({
|
|
216
|
+
mastra,
|
|
217
|
+
workflowId,
|
|
218
|
+
runId,
|
|
219
|
+
body,
|
|
220
|
+
runtimeContext
|
|
221
|
+
}) {
|
|
222
|
+
try {
|
|
223
|
+
if (!workflowId) {
|
|
224
|
+
throw new HTTPException(400, { message: "Workflow ID is required" });
|
|
225
|
+
}
|
|
226
|
+
if (!runId) {
|
|
227
|
+
throw new HTTPException(400, { message: "runId required to resume workflow" });
|
|
228
|
+
}
|
|
229
|
+
if (!body.step) {
|
|
230
|
+
throw new HTTPException(400, { message: "step required to resume workflow" });
|
|
231
|
+
}
|
|
232
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
233
|
+
const run = await workflow.getWorkflowRun(runId);
|
|
234
|
+
if (!run) {
|
|
235
|
+
throw new HTTPException(404, { message: "Workflow run not found" });
|
|
236
|
+
}
|
|
237
|
+
const _run = workflow.createRun({ runId });
|
|
238
|
+
const result = await _run.resume({
|
|
239
|
+
step: body.step,
|
|
240
|
+
resumeData: body.resumeData,
|
|
241
|
+
runtimeContext
|
|
242
|
+
});
|
|
243
|
+
return result;
|
|
244
|
+
} catch (error) {
|
|
245
|
+
return handleError(error, "Error resuming workflow step");
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
async function resumeVNextWorkflowHandler({
|
|
249
|
+
mastra,
|
|
250
|
+
workflowId,
|
|
251
|
+
runId,
|
|
252
|
+
body,
|
|
253
|
+
runtimeContext
|
|
254
|
+
}) {
|
|
255
|
+
try {
|
|
256
|
+
if (!workflowId) {
|
|
257
|
+
throw new HTTPException(400, { message: "Workflow ID is required" });
|
|
258
|
+
}
|
|
259
|
+
if (!runId) {
|
|
260
|
+
throw new HTTPException(400, { message: "runId required to resume workflow" });
|
|
261
|
+
}
|
|
262
|
+
if (!body.step) {
|
|
263
|
+
throw new HTTPException(400, { message: "step required to resume workflow" });
|
|
264
|
+
}
|
|
265
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
266
|
+
const run = await workflow.getWorkflowRun(runId);
|
|
267
|
+
if (!run) {
|
|
268
|
+
throw new HTTPException(404, { message: "Workflow run not found" });
|
|
269
|
+
}
|
|
270
|
+
const _run = workflow.createRun({ runId });
|
|
271
|
+
await _run.resume({
|
|
272
|
+
step: body.step,
|
|
273
|
+
resumeData: body.resumeData,
|
|
274
|
+
runtimeContext
|
|
275
|
+
});
|
|
276
|
+
return { message: "Workflow run resumed" };
|
|
277
|
+
} catch (error) {
|
|
278
|
+
return handleError(error, "Error resuming workflow");
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
async function getVNextWorkflowRunsHandler({ mastra, workflowId }) {
|
|
282
|
+
try {
|
|
283
|
+
if (!workflowId) {
|
|
284
|
+
throw new HTTPException(400, { message: "Workflow ID is required" });
|
|
285
|
+
}
|
|
286
|
+
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
287
|
+
const workflowRuns = await workflow.getWorkflowRuns() || {
|
|
288
|
+
runs: [],
|
|
289
|
+
total: 0
|
|
290
|
+
};
|
|
291
|
+
return workflowRuns;
|
|
292
|
+
} catch (error) {
|
|
293
|
+
return handleError(error, "Error getting workflow runs");
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export { createVNextWorkflowRunHandler, getVNextWorkflowByIdHandler, getVNextWorkflowRunHandler, getVNextWorkflowRunsHandler, getVNextWorkflowsHandler, resumeAsyncVNextWorkflowHandler, resumeVNextWorkflowHandler, startAsyncVNextWorkflowHandler, startVNextWorkflowRunHandler, vNextWorkflows_exports, watchVNextWorkflowHandler };
|