@mastra/server 1.86.0-alpha.7 → 1.86.0-alpha.8
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/{a2a-WPGF38fX.js → a2a-BfWMjFe2.js} +1 -1
- package/dist/{a2a-vSZkdSRE.cjs → a2a-DQIwTZyo.cjs} +1 -1
- package/dist/{agent-builder-C4AIqOxt.js → agent-builder-DpuK5-6A.js} +2 -2
- package/dist/{agent-builder-dZlRNj1k.cjs → agent-builder-NSemjs4B.cjs} +2 -2
- package/dist/{agent-controller-BHJDvCaS.cjs → agent-controller-BP-CFfsg.cjs} +9 -9
- package/dist/{agent-controller-NRR6SK66.js → agent-controller-CzKnfKkw.js} +9 -9
- package/dist/{agent-versions-CwWhEoU5.cjs → agent-versions-0q4KKmLv.cjs} +12 -12
- package/dist/{agent-versions-DfcKpYNW.js → agent-versions-Pml6WNbA.js} +12 -12
- package/dist/{agents-mjQZV5tv.cjs → agents-BO1mcMDf.cjs} +14 -3
- package/dist/{agents-272TP94y.js → agents-YvaBPFiS.js} +14 -3
- package/dist/{api-schema-manifest-DVkepK_s.cjs → api-schema-manifest-016lHJO2.cjs} +1 -1
- package/dist/{api-schema-manifest-BjhiTdNv.js → api-schema-manifest-CAZsA5Lk.js} +1 -1
- package/dist/{catalogue-BTE9b_mr.cjs → catalogue-Cf7Zz7zb.cjs} +11 -11
- package/dist/{catalogue-DH64Duv-.js → catalogue-DN4dvU88.js} +11 -11
- package/dist/{conversations-CXyaNjLR.js → conversations-4ZO0Pjvk.js} +1 -1
- package/dist/{conversations-BWA_---j.cjs → conversations-BaYtooZZ.cjs} +1 -1
- package/dist/{datasets-C1XJLHN8.js → datasets-CYdtUF8e.js} +4 -1
- package/dist/{datasets-hqDd4IUN.cjs → datasets-CZRqni0N.cjs} +4 -1
- package/dist/dist-Bz6gINFc.js +1 -0
- package/dist/{dist-DGwsCtT4.cjs → dist-DaRCrkAU.cjs} +228 -217
- package/dist/{dist-CSffo32A.cjs → dist-uiPbWl5E.cjs} +1 -1
- package/dist/{dist-Bp1bObAq.js → dist-yny1avqv.js} +228 -217
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/reference-observability-tracing-advanced-queries.md +20 -0
- package/dist/{dynamic-workflows-DPgV6qtS.cjs → dynamic-workflows-CEKdGcSr.cjs} +4 -4
- package/dist/{dynamic-workflows-DmkCJ4Lp.js → dynamic-workflows-DF9X_oDG.js} +4 -4
- package/dist/{editor-builder-BS2xogE_.cjs → editor-builder-ChYG8YTs.cjs} +1 -1
- package/dist/{editor-builder-BayzCprJ.js → editor-builder-CwsIbd0F.js} +1 -1
- package/dist/{observability-zr7LDCQG.js → observability-URaJnI_U.js} +1 -1
- package/dist/{observability-Cn4P60P4.cjs → observability-zNA_CVaz.cjs} +1 -1
- package/dist/{plans-xGwuiZUd.js → plans-CbR8EDiT.js} +1 -1
- package/dist/{plans-Bes_LVgv.cjs → plans-k3UN9Nd1.cjs} +1 -1
- package/dist/probe-image-size-DZvSdjzK.js +13297 -0
- package/dist/probe-image-size-z8zXmjaH.cjs +13304 -0
- package/dist/{responses-BH567IZf.cjs → responses-B-BKx236.cjs} +1 -1
- package/dist/{responses-CwQO5y2X.js → responses-Blzxy0XP.js} +1 -1
- package/dist/{routes-CrBCJmjc.js → routes-D-I2voQe.js} +16 -16
- package/dist/{routes-6p-xrUIq.cjs → routes-jiZyt9kU.cjs} +16 -16
- package/dist/{schedules-0ceTSdBB.cjs → schedules-CwL28Eca.cjs} +4 -4
- package/dist/{schedules-D_VfFdAH.js → schedules-RWgPeypN.js} +4 -4
- package/dist/{scorer-versions-Bhdvt-cX.cjs → scorer-versions-DK-PGj7-.cjs} +1 -1
- package/dist/{scorer-versions-DhT7Lj33.js → scorer-versions-oJoK2Exw.js} +1 -1
- package/dist/{scores-CXNkN7Bn.cjs → scores-BikU9phm.cjs} +1 -1
- package/dist/{scores-ksmJiJnJ.js → scores-DAv6Uisq.js} +1 -1
- package/dist/server/handlers/a2a.cjs +1 -1
- package/dist/server/handlers/a2a.js +1 -1
- package/dist/server/handlers/agent-builder.cjs +1 -1
- package/dist/server/handlers/agent-builder.js +1 -1
- package/dist/server/handlers/agent-controller.cjs +1 -1
- package/dist/server/handlers/agent-controller.js +1 -1
- package/dist/server/handlers/agent-versions.cjs +1 -1
- package/dist/server/handlers/agent-versions.js +1 -1
- package/dist/server/handlers/agents.cjs +1 -1
- package/dist/server/handlers/agents.js +1 -1
- package/dist/server/handlers/auth.cjs +1 -1
- package/dist/server/handlers/auth.js +1 -1
- package/dist/server/handlers/conversations.cjs +1 -1
- package/dist/server/handlers/conversations.js +1 -1
- package/dist/server/handlers/datasets.cjs +16 -11
- package/dist/server/handlers/datasets.d.ts +6 -0
- package/dist/server/handlers/datasets.js +16 -11
- package/dist/server/handlers/dynamic-workflows.cjs +1 -1
- package/dist/server/handlers/dynamic-workflows.js +1 -1
- package/dist/server/handlers/editor-builder.cjs +1 -1
- package/dist/server/handlers/editor-builder.js +1 -1
- package/dist/server/handlers/favorites-enrichment.cjs +1 -1
- package/dist/server/handlers/favorites-enrichment.js +1 -1
- package/dist/server/handlers/observability.cjs +1 -1
- package/dist/server/handlers/observability.js +1 -1
- package/dist/server/handlers/plans.cjs +1 -1
- package/dist/server/handlers/plans.js +1 -1
- package/dist/server/handlers/responses.cjs +1 -1
- package/dist/server/handlers/responses.js +1 -1
- package/dist/server/handlers/schedules.cjs +1 -1
- package/dist/server/handlers/schedules.js +1 -1
- package/dist/server/handlers/scorer-versions.cjs +1 -1
- package/dist/server/handlers/scorer-versions.js +1 -1
- package/dist/server/handlers/scores.cjs +1 -1
- package/dist/server/handlers/scores.js +1 -1
- package/dist/server/handlers/stored-agent-favorites.cjs +3 -3
- package/dist/server/handlers/stored-agent-favorites.js +3 -3
- package/dist/server/handlers/stored-agents.cjs +2 -2
- package/dist/server/handlers/stored-agents.js +2 -2
- package/dist/server/handlers/stored-scorers.cjs +1 -1
- package/dist/server/handlers/stored-scorers.js +1 -1
- package/dist/server/handlers/stored-skill-favorites.cjs +2 -2
- package/dist/server/handlers/stored-skill-favorites.js +2 -2
- package/dist/server/handlers/stored-skills.cjs +1 -1
- package/dist/server/handlers/stored-skills.js +1 -1
- package/dist/server/handlers/system.cjs +1 -1
- package/dist/server/handlers/system.js +1 -1
- package/dist/server/handlers/tool-providers.cjs +2 -2
- package/dist/server/handlers/tool-providers.js +2 -2
- package/dist/server/handlers/tools.cjs +1 -1
- package/dist/server/handlers/tools.js +1 -1
- package/dist/server/handlers/voice.cjs +1 -1
- package/dist/server/handlers/voice.js +1 -1
- package/dist/server/handlers/workflows.cjs +1 -1
- package/dist/server/handlers/workflows.js +1 -1
- package/dist/server/handlers.cjs +12 -12
- package/dist/server/handlers.js +12 -12
- package/dist/server/schemas/datasets.d.ts +3 -0
- package/dist/server/schemas/index.cjs +6 -6
- package/dist/server/schemas/index.js +6 -6
- package/dist/server/server-adapter/index.cjs +3 -3
- package/dist/server/server-adapter/index.js +3 -3
- package/dist/server/server-adapter/routes/conversations.d.ts +3 -3
- package/dist/server/server-adapter/routes/datasets.d.ts +6 -0
- package/dist/{server-adapter-Ceag3til.cjs → server-adapter-BB2Lw2Ig.cjs} +4 -4
- package/dist/{server-adapter-BGOi-s7x.js → server-adapter-CMJcvkpD.js} +4 -4
- package/dist/{stored-agents-m0Knvv29.cjs → stored-agents-BS4_LGSs.cjs} +32 -32
- package/dist/{stored-agents-DmN_pIIl.js → stored-agents-DcyDMKP2.js} +32 -32
- package/dist/{stored-scorers-2F2k6XSx.js → stored-scorers-Bdz_5k57.js} +1 -1
- package/dist/{stored-scorers-iM2Qq9Nh.cjs → stored-scorers-D8YYszOj.cjs} +1 -1
- package/dist/{tool-providers-Cq3vFqgE.js → tool-providers-BN2Ni06Z.js} +2 -2
- package/dist/{tool-providers-BVwRJTtB.cjs → tool-providers-BeiSkVHu.cjs} +2 -2
- package/dist/{tools-DLZ7go-n.cjs → tools-CoamSJif.cjs} +1 -1
- package/dist/{tools-CY44YtDW.js → tools-DsSk01Ti.js} +1 -1
- package/dist/{voice-DTjrAgqg.js → voice-BFh2Zx5m.js} +1 -1
- package/dist/{voice-NaerSeVQ.cjs → voice-CquR7YyA.cjs} +1 -1
- package/dist/{workflows-gIKukZ1O.cjs → workflows-CHKSHV4f.cjs} +33 -0
- package/dist/{workflows-D3QrUMfm.js → workflows-D5bfbang.js} +33 -0
- package/package.json +3 -3
- package/dist/dist-Bn0zFASI.js +0 -1
- package/dist/probe-image-size-BR5MlnnJ.cjs +0 -13304
- package/dist/probe-image-size-DBCcUUw_.js +0 -13297
|
@@ -7,7 +7,7 @@ import { D as listToolsResponseSchema, J as serializedToolSchema, S as executeTo
|
|
|
7
7
|
import { o as optionalRunIdSchema } from "./common-J-yUnHk9.js";
|
|
8
8
|
import { n as createRoute } from "./route-builder-Dz18c3qm.js";
|
|
9
9
|
import { listAgentsVisibleTo } from "./server/handlers/agent-access.js";
|
|
10
|
-
import { G as getAgentFromSystem } from "./agents-
|
|
10
|
+
import { G as getAgentFromSystem } from "./agents-YvaBPFiS.js";
|
|
11
11
|
import { handleError } from "./server/handlers/error.js";
|
|
12
12
|
import { stripInjectedToolOverrideFields } from "./server/handlers/tool-schema-overrides.js";
|
|
13
13
|
import { isProviderDefinedTool, isVercelTool } from "@mastra/core/tools";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as __exportAll } from "./rolldown-runtime-CQI-hT2b.js";
|
|
2
2
|
import { at as GET_LISTENER_ROUTE$1, ct as TRANSCRIBE_SPEECH_DEPRECATED_ROUTE$1, it as GENERATE_SPEECH_ROUTE$1, lt as TRANSCRIBE_SPEECH_ROUTE$1, ot as GET_SPEAKERS_DEPRECATED_ROUTE$1, rt as GENERATE_SPEECH_DEPRECATED_ROUTE$1, st as GET_SPEAKERS_ROUTE$1 } from "./agents-B0OpLdbp.js";
|
|
3
|
-
import { G as getAgentFromSystem } from "./agents-
|
|
3
|
+
import { G as getAgentFromSystem } from "./agents-YvaBPFiS.js";
|
|
4
4
|
// src/server/handlers/voice.ts
|
|
5
5
|
var voice_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
GENERATE_SPEECH_DEPRECATED_ROUTE: () => GENERATE_SPEECH_DEPRECATED_ROUTE,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-10nMEhjP.cjs");
|
|
2
2
|
const require_agents = require("./agents-CH_G37hG.cjs");
|
|
3
|
-
const require_agents$1 = require("./agents-
|
|
3
|
+
const require_agents$1 = require("./agents-BO1mcMDf.cjs");
|
|
4
4
|
// src/server/handlers/voice.ts
|
|
5
5
|
var voice_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
6
6
|
GENERATE_SPEECH_DEPRECATED_ROUTE: () => GENERATE_SPEECH_DEPRECATED_ROUTE,
|
|
@@ -8,6 +8,7 @@ const require_route_builder = require("./route-builder-DjTBxSZN.cjs");
|
|
|
8
8
|
const require_utils$1 = require("./utils-DQJOBnMo.cjs");
|
|
9
9
|
const require_server_handlers_error = require("./server/handlers/error.cjs");
|
|
10
10
|
let zod_v4 = require("zod/v4");
|
|
11
|
+
let util = require("util");
|
|
11
12
|
let _mastra_core_stream = require("@mastra/core/stream");
|
|
12
13
|
// src/server/handlers/workflows.ts
|
|
13
14
|
var workflows_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
@@ -1259,6 +1260,37 @@ const workflowEventSchema = zod_v4.z.object({
|
|
|
1259
1260
|
index: zod_v4.z.number().optional(),
|
|
1260
1261
|
deliveryAttempt: zod_v4.z.number().optional()
|
|
1261
1262
|
});
|
|
1263
|
+
/** Core's internal durable-experiment workflow (`EXPERIMENT_WORKFLOW_ID`, not exported from `@mastra/core`). */
|
|
1264
|
+
const EXPERIMENT_WORKFLOW_ID = "__mastra-experiment";
|
|
1265
|
+
/** The only events a durable experiment run sends. It never suspends, resumes or time travels. */
|
|
1266
|
+
const EXPERIMENT_EVENT_TYPES = /* @__PURE__ */ new Set([
|
|
1267
|
+
"workflow.start",
|
|
1268
|
+
"workflow.step.run",
|
|
1269
|
+
"workflow.step.end",
|
|
1270
|
+
"workflow.end",
|
|
1271
|
+
"workflow.fail",
|
|
1272
|
+
"workflow.cancel"
|
|
1273
|
+
]);
|
|
1274
|
+
/**
|
|
1275
|
+
* The experiment workflow's steps read the dataset, experiment and request context from the run
|
|
1276
|
+
* input, so a pushed event must belong to a run Mastra started, be an event such a run sends, and
|
|
1277
|
+
* carry that run's stored input wherever it carries one. Starting a durable experiment saves the
|
|
1278
|
+
* run before publishing its start event.
|
|
1279
|
+
*/
|
|
1280
|
+
function assertExperimentEventMatchesRun(event, run) {
|
|
1281
|
+
if (!run) throw new require_http_exception.HTTPException(404, { message: "Workflow run not found" });
|
|
1282
|
+
const data = event.data;
|
|
1283
|
+
const storedInput = asJson((typeof run.snapshot === "string" ? JSON.parse(run.snapshot) : run.snapshot).context?.input);
|
|
1284
|
+
const carriedInputs = [
|
|
1285
|
+
...event.type === "workflow.start" ? [data.prevResult?.output] : [],
|
|
1286
|
+
...data.stepResults && "input" in data.stepResults ? [data.stepResults.input] : [],
|
|
1287
|
+
...data.restart?.stepResults && "input" in data.restart.stepResults ? [data.restart.stepResults.input] : []
|
|
1288
|
+
];
|
|
1289
|
+
if (!EXPERIMENT_EVENT_TYPES.has(event.type) || data.timeTravel !== void 0 || data.runId !== event.runId || carriedInputs.some((input) => !(0, util.isDeepStrictEqual)(asJson(input), storedInput))) throw new require_http_exception.HTTPException(400, { message: "Workflow event does not match its run" });
|
|
1290
|
+
}
|
|
1291
|
+
function asJson(value) {
|
|
1292
|
+
return value === void 0 ? void 0 : JSON.parse(JSON.stringify(value));
|
|
1293
|
+
}
|
|
1262
1294
|
const receiveWorkflowEventBodySchema = zod_v4.z.object({ event: workflowEventSchema.passthrough() });
|
|
1263
1295
|
const receiveWorkflowEventResponseSchema = zod_v4.z.object({
|
|
1264
1296
|
ok: zod_v4.z.boolean(),
|
|
@@ -1298,6 +1330,7 @@ const RECEIVE_WORKFLOW_EVENT_ROUTE = require_route_builder.createRoute({
|
|
|
1298
1330
|
runId: event.runId,
|
|
1299
1331
|
...typeof workflowName === "string" ? { workflowName } : {}
|
|
1300
1332
|
});
|
|
1333
|
+
if (workflowName === EXPERIMENT_WORKFLOW_ID) assertExperimentEventMatchesRun(event, existingRun);
|
|
1301
1334
|
await require_utils.validateRunOwnership(existingRun, require_utils.getEffectiveResourceId(requestContext, void 0), mastra, requestContext);
|
|
1302
1335
|
const rawCreatedAt = event.createdAt;
|
|
1303
1336
|
const createdAt = rawCreatedAt instanceof Date ? rawCreatedAt : new Date(rawCreatedAt);
|
|
@@ -8,6 +8,7 @@ import { n as createRoute } from "./route-builder-Dz18c3qm.js";
|
|
|
8
8
|
import { a as getWorkflowInfo, t as WorkflowRegistry } from "./utils-C2VRtQjI.js";
|
|
9
9
|
import { handleError } from "./server/handlers/error.js";
|
|
10
10
|
import { z } from "zod/v4";
|
|
11
|
+
import { isDeepStrictEqual } from "util";
|
|
11
12
|
import { createReplayStream } from "@mastra/core/stream";
|
|
12
13
|
// src/server/handlers/workflows.ts
|
|
13
14
|
var workflows_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1259,6 +1260,37 @@ const workflowEventSchema = z.object({
|
|
|
1259
1260
|
index: z.number().optional(),
|
|
1260
1261
|
deliveryAttempt: z.number().optional()
|
|
1261
1262
|
});
|
|
1263
|
+
/** Core's internal durable-experiment workflow (`EXPERIMENT_WORKFLOW_ID`, not exported from `@mastra/core`). */
|
|
1264
|
+
const EXPERIMENT_WORKFLOW_ID = "__mastra-experiment";
|
|
1265
|
+
/** The only events a durable experiment run sends. It never suspends, resumes or time travels. */
|
|
1266
|
+
const EXPERIMENT_EVENT_TYPES = /* @__PURE__ */ new Set([
|
|
1267
|
+
"workflow.start",
|
|
1268
|
+
"workflow.step.run",
|
|
1269
|
+
"workflow.step.end",
|
|
1270
|
+
"workflow.end",
|
|
1271
|
+
"workflow.fail",
|
|
1272
|
+
"workflow.cancel"
|
|
1273
|
+
]);
|
|
1274
|
+
/**
|
|
1275
|
+
* The experiment workflow's steps read the dataset, experiment and request context from the run
|
|
1276
|
+
* input, so a pushed event must belong to a run Mastra started, be an event such a run sends, and
|
|
1277
|
+
* carry that run's stored input wherever it carries one. Starting a durable experiment saves the
|
|
1278
|
+
* run before publishing its start event.
|
|
1279
|
+
*/
|
|
1280
|
+
function assertExperimentEventMatchesRun(event, run) {
|
|
1281
|
+
if (!run) throw new HTTPException(404, { message: "Workflow run not found" });
|
|
1282
|
+
const data = event.data;
|
|
1283
|
+
const storedInput = asJson((typeof run.snapshot === "string" ? JSON.parse(run.snapshot) : run.snapshot).context?.input);
|
|
1284
|
+
const carriedInputs = [
|
|
1285
|
+
...event.type === "workflow.start" ? [data.prevResult?.output] : [],
|
|
1286
|
+
...data.stepResults && "input" in data.stepResults ? [data.stepResults.input] : [],
|
|
1287
|
+
...data.restart?.stepResults && "input" in data.restart.stepResults ? [data.restart.stepResults.input] : []
|
|
1288
|
+
];
|
|
1289
|
+
if (!EXPERIMENT_EVENT_TYPES.has(event.type) || data.timeTravel !== void 0 || data.runId !== event.runId || carriedInputs.some((input) => !isDeepStrictEqual(asJson(input), storedInput))) throw new HTTPException(400, { message: "Workflow event does not match its run" });
|
|
1290
|
+
}
|
|
1291
|
+
function asJson(value) {
|
|
1292
|
+
return value === void 0 ? void 0 : JSON.parse(JSON.stringify(value));
|
|
1293
|
+
}
|
|
1262
1294
|
const receiveWorkflowEventBodySchema = z.object({ event: workflowEventSchema.passthrough() });
|
|
1263
1295
|
const receiveWorkflowEventResponseSchema = z.object({
|
|
1264
1296
|
ok: z.boolean(),
|
|
@@ -1298,6 +1330,7 @@ const RECEIVE_WORKFLOW_EVENT_ROUTE = createRoute({
|
|
|
1298
1330
|
runId: event.runId,
|
|
1299
1331
|
...typeof workflowName === "string" ? { workflowName } : {}
|
|
1300
1332
|
});
|
|
1333
|
+
if (workflowName === EXPERIMENT_WORKFLOW_ID) assertExperimentEventMatchesRun(event, existingRun);
|
|
1301
1334
|
await validateRunOwnership(existingRun, getEffectiveResourceId(requestContext, void 0), mastra, requestContext);
|
|
1302
1335
|
const rawCreatedAt = event.createdAt;
|
|
1303
1336
|
const createdAt = rawCreatedAt instanceof Date ? rawCreatedAt : new Date(rawCreatedAt);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/server",
|
|
3
|
-
"version": "1.86.0-alpha.
|
|
3
|
+
"version": "1.86.0-alpha.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -132,8 +132,8 @@
|
|
|
132
132
|
"@internal/test-utils": "0.0.87",
|
|
133
133
|
"@internal/types-builder": "0.0.126",
|
|
134
134
|
"@internal/voice": "0.0.47",
|
|
135
|
-
"@mastra/agent-builder": "1.2.3-alpha.
|
|
136
|
-
"@mastra/core": "1.86.0-alpha.
|
|
135
|
+
"@mastra/agent-builder": "1.2.3-alpha.4",
|
|
136
|
+
"@mastra/core": "1.86.0-alpha.8",
|
|
137
137
|
"@mastra/mcp": "^2.11.0-alpha.1",
|
|
138
138
|
"@mastra/schema-compat": "1.4.1-alpha.0"
|
|
139
139
|
},
|
package/dist/dist-Bn0zFASI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { n as openai } from "./dist-Bp1bObAq.js";
|