@mastra/server 1.26.1-alpha.0 → 1.27.0-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 +13 -0
- package/dist/{chunk-PIF6BJCN.cjs → chunk-2FRRIWFC.cjs} +9 -9
- package/dist/{chunk-PIF6BJCN.cjs.map → chunk-2FRRIWFC.cjs.map} +1 -1
- package/dist/{chunk-TEE45LZB.js → chunk-2GVTUHUO.js} +4 -4
- package/dist/{chunk-TEE45LZB.js.map → chunk-2GVTUHUO.js.map} +1 -1
- package/dist/{chunk-YRTZGGKQ.cjs → chunk-2THJ6ADC.cjs} +49 -49
- package/dist/{chunk-YRTZGGKQ.cjs.map → chunk-2THJ6ADC.cjs.map} +1 -1
- package/dist/{chunk-VX2KJFOW.js → chunk-3AL5MHJ4.js} +4 -4
- package/dist/{chunk-VX2KJFOW.js.map → chunk-3AL5MHJ4.js.map} +1 -1
- package/dist/{chunk-3ACZ2AKY.js → chunk-3OZRSJHT.js} +6 -6
- package/dist/{chunk-3ACZ2AKY.js.map → chunk-3OZRSJHT.js.map} +1 -1
- package/dist/{chunk-H3SXVQYW.cjs → chunk-44HBA2O4.cjs} +3 -3
- package/dist/{chunk-H3SXVQYW.cjs.map → chunk-44HBA2O4.cjs.map} +1 -1
- package/dist/{chunk-XH2V4AVS.js → chunk-4B22X3FH.js} +5 -5
- package/dist/{chunk-XH2V4AVS.js.map → chunk-4B22X3FH.js.map} +1 -1
- package/dist/{chunk-UM72OD3E.cjs → chunk-4CB2E34E.cjs} +5 -5
- package/dist/{chunk-UM72OD3E.cjs.map → chunk-4CB2E34E.cjs.map} +1 -1
- package/dist/{chunk-KSARJEHH.cjs → chunk-4LVIBP3H.cjs} +4 -4
- package/dist/{chunk-KSARJEHH.cjs.map → chunk-4LVIBP3H.cjs.map} +1 -1
- package/dist/{chunk-D7P775NV.cjs → chunk-6CI3CSK4.cjs} +3 -3
- package/dist/{chunk-D7P775NV.cjs.map → chunk-6CI3CSK4.cjs.map} +1 -1
- package/dist/{chunk-FFSD7OV7.cjs → chunk-6CJWWTVS.cjs} +8 -8
- package/dist/{chunk-FFSD7OV7.cjs.map → chunk-6CJWWTVS.cjs.map} +1 -1
- package/dist/{chunk-WBHTWSW7.js → chunk-6P6HIITF.js} +4 -4
- package/dist/{chunk-WBHTWSW7.js.map → chunk-6P6HIITF.js.map} +1 -1
- package/dist/{chunk-BLYICPLO.cjs → chunk-75W2MUNS.cjs} +38 -38
- package/dist/{chunk-BLYICPLO.cjs.map → chunk-75W2MUNS.cjs.map} +1 -1
- package/dist/{chunk-PDEIYN7Y.cjs → chunk-7KKKNNRH.cjs} +3 -3
- package/dist/{chunk-PDEIYN7Y.cjs.map → chunk-7KKKNNRH.cjs.map} +1 -1
- package/dist/{chunk-TTZI2Z25.js → chunk-7LVLRIR6.js} +5 -5
- package/dist/{chunk-TTZI2Z25.js.map → chunk-7LVLRIR6.js.map} +1 -1
- package/dist/{chunk-V3HMHVKU.js → chunk-7UQ6VG3C.js} +3 -3
- package/dist/{chunk-V3HMHVKU.js.map → chunk-7UQ6VG3C.js.map} +1 -1
- package/dist/{chunk-24SW3KB3.js → chunk-B5VM3A53.js} +3 -3
- package/dist/{chunk-24SW3KB3.js.map → chunk-B5VM3A53.js.map} +1 -1
- package/dist/{chunk-O5XIJDN3.cjs → chunk-B65LZWBE.cjs} +3 -3
- package/dist/{chunk-O5XIJDN3.cjs.map → chunk-B65LZWBE.cjs.map} +1 -1
- package/dist/{chunk-2Q4IAQP6.cjs → chunk-B7SBAXEP.cjs} +7 -7
- package/dist/{chunk-2Q4IAQP6.cjs.map → chunk-B7SBAXEP.cjs.map} +1 -1
- package/dist/{chunk-GELMHP5G.js → chunk-BUDY5TFR.js} +3 -3
- package/dist/{chunk-GELMHP5G.js.map → chunk-BUDY5TFR.js.map} +1 -1
- package/dist/{chunk-2Q5WIJZV.js → chunk-BXJTD5TI.js} +201 -11
- package/dist/chunk-BXJTD5TI.js.map +1 -0
- package/dist/{chunk-KBJI2ZGO.js → chunk-C4NU6EHX.js} +3 -3
- package/dist/{chunk-KBJI2ZGO.js.map → chunk-C4NU6EHX.js.map} +1 -1
- package/dist/{chunk-O4TXCSGQ.cjs → chunk-CDSA5YUY.cjs} +4 -4
- package/dist/{chunk-O4TXCSGQ.cjs.map → chunk-CDSA5YUY.cjs.map} +1 -1
- package/dist/{chunk-2DNSABMG.cjs → chunk-DNY4PR4R.cjs} +3 -3
- package/dist/{chunk-2DNSABMG.cjs.map → chunk-DNY4PR4R.cjs.map} +1 -1
- package/dist/{chunk-LCGUC3UL.cjs → chunk-FTQRGT3E.cjs} +3 -3
- package/dist/{chunk-LCGUC3UL.cjs.map → chunk-FTQRGT3E.cjs.map} +1 -1
- package/dist/{chunk-7I34BNA3.js → chunk-H7HGHJU4.js} +5 -5
- package/dist/{chunk-7I34BNA3.js.map → chunk-H7HGHJU4.js.map} +1 -1
- package/dist/{chunk-ONL7ZWVI.cjs → chunk-HIK5MY74.cjs} +201 -11
- package/dist/chunk-HIK5MY74.cjs.map +1 -0
- package/dist/{chunk-TB5T5EIJ.cjs → chunk-IR7QQFOC.cjs} +7 -7
- package/dist/{chunk-TB5T5EIJ.cjs.map → chunk-IR7QQFOC.cjs.map} +1 -1
- package/dist/{chunk-IBK77L63.js → chunk-IT6MRNKH.js} +3 -3
- package/dist/{chunk-IBK77L63.js.map → chunk-IT6MRNKH.js.map} +1 -1
- package/dist/{chunk-MLJVCFJQ.js → chunk-KSWDXGTC.js} +11 -7
- package/dist/chunk-KSWDXGTC.js.map +1 -0
- package/dist/{chunk-TZF2SAX5.js → chunk-LQUP63RF.js} +6 -6
- package/dist/{chunk-TZF2SAX5.js.map → chunk-LQUP63RF.js.map} +1 -1
- package/dist/{chunk-4WDBN7FE.cjs → chunk-LWK57QIA.cjs} +3 -3
- package/dist/{chunk-4WDBN7FE.cjs.map → chunk-LWK57QIA.cjs.map} +1 -1
- package/dist/{chunk-7SPUHOHW.cjs → chunk-MPMM5D3U.cjs} +4 -4
- package/dist/{chunk-7SPUHOHW.cjs.map → chunk-MPMM5D3U.cjs.map} +1 -1
- package/dist/{chunk-DG6MQPBR.js → chunk-N32V7VSV.js} +4 -4
- package/dist/{chunk-DG6MQPBR.js.map → chunk-N32V7VSV.js.map} +1 -1
- package/dist/{chunk-M6GSAOAD.js → chunk-NVH5GGIR.js} +4 -4
- package/dist/{chunk-M6GSAOAD.js.map → chunk-NVH5GGIR.js.map} +1 -1
- package/dist/{chunk-ZCXN7QWI.js → chunk-OF6LR77W.js} +3 -3
- package/dist/{chunk-ZCXN7QWI.js.map → chunk-OF6LR77W.js.map} +1 -1
- package/dist/{chunk-5Y75OYZM.cjs → chunk-PYPOKT4J.cjs} +3 -3
- package/dist/{chunk-5Y75OYZM.cjs.map → chunk-PYPOKT4J.cjs.map} +1 -1
- package/dist/{chunk-SSJSTNMZ.cjs → chunk-RNDA7UHX.cjs} +18 -18
- package/dist/{chunk-SSJSTNMZ.cjs.map → chunk-RNDA7UHX.cjs.map} +1 -1
- package/dist/{chunk-JDC7A4YV.js → chunk-RQLXTIT5.js} +4 -4
- package/dist/{chunk-JDC7A4YV.js.map → chunk-RQLXTIT5.js.map} +1 -1
- package/dist/{chunk-KDIGKXA3.js → chunk-SIYOW7VK.js} +11 -9
- package/dist/chunk-SIYOW7VK.js.map +1 -0
- package/dist/{chunk-VQPGGT32.cjs → chunk-SYYT53RO.cjs} +41 -39
- package/dist/chunk-SYYT53RO.cjs.map +1 -0
- package/dist/{chunk-MWFVMI3T.js → chunk-TOPWYUTB.js} +6 -6
- package/dist/{chunk-MWFVMI3T.js.map → chunk-TOPWYUTB.js.map} +1 -1
- package/dist/{chunk-CT2AKZPZ.js → chunk-VLNRGJEM.js} +3 -3
- package/dist/{chunk-CT2AKZPZ.js.map → chunk-VLNRGJEM.js.map} +1 -1
- package/dist/{chunk-INGHVKDO.js → chunk-WC4RIS4D.js} +3 -3
- package/dist/{chunk-INGHVKDO.js.map → chunk-WC4RIS4D.js.map} +1 -1
- package/dist/{chunk-WKRZS674.cjs → chunk-WEUZO2Q3.cjs} +9 -9
- package/dist/{chunk-WKRZS674.cjs.map → chunk-WEUZO2Q3.cjs.map} +1 -1
- package/dist/{chunk-VO2PCVXW.cjs → chunk-WF6X4HFH.cjs} +5 -5
- package/dist/{chunk-VO2PCVXW.cjs.map → chunk-WF6X4HFH.cjs.map} +1 -1
- package/dist/{chunk-XQARPKHD.cjs → chunk-XDXODSOG.cjs} +12 -12
- package/dist/{chunk-XQARPKHD.cjs.map → chunk-XDXODSOG.cjs.map} +1 -1
- package/dist/{chunk-JV2ZLLVN.js → chunk-YF6GPVGV.js} +4 -4
- package/dist/{chunk-JV2ZLLVN.js.map → chunk-YF6GPVGV.js.map} +1 -1
- package/dist/{chunk-ZUUD6FN5.js → chunk-YV25CDYJ.js} +3 -3
- package/dist/{chunk-ZUUD6FN5.js.map → chunk-YV25CDYJ.js.map} +1 -1
- package/dist/{chunk-5BD65C6R.cjs → chunk-Z4UBBY2E.cjs} +39 -35
- package/dist/chunk-Z4UBBY2E.cjs.map +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/{observational-memory-CIGODMXV-RX4J6TAC.js → observational-memory-7YYZIIX4-CK67BQOD.js} +3 -3
- package/dist/{observational-memory-CIGODMXV-RX4J6TAC.js.map → observational-memory-7YYZIIX4-CK67BQOD.js.map} +1 -1
- package/dist/{observational-memory-CIGODMXV-5QVHS6GP.cjs → observational-memory-7YYZIIX4-IPHEIYJP.cjs} +26 -26
- package/dist/{observational-memory-CIGODMXV-5QVHS6GP.cjs.map → observational-memory-7YYZIIX4-IPHEIYJP.cjs.map} +1 -1
- package/dist/server/browser-stream/index.cjs +5 -0
- package/dist/server/browser-stream/index.cjs.map +1 -1
- package/dist/server/browser-stream/index.js +5 -0
- package/dist/server/browser-stream/index.js.map +1 -1
- package/dist/server/browser-stream/viewer-registry.d.ts.map +1 -1
- package/dist/server/handlers/a2a.cjs +9 -9
- package/dist/server/handlers/a2a.js +1 -1
- package/dist/server/handlers/agent-builder.cjs +16 -16
- package/dist/server/handlers/agent-builder.js +1 -1
- package/dist/server/handlers/agent-versions.cjs +8 -8
- package/dist/server/handlers/agent-versions.js +1 -1
- package/dist/server/handlers/agents.cjs +35 -35
- package/dist/server/handlers/agents.d.ts.map +1 -1
- package/dist/server/handlers/agents.js +1 -1
- package/dist/server/handlers/conversations.cjs +5 -5
- package/dist/server/handlers/conversations.js +1 -1
- package/dist/server/handlers/datasets.cjs +26 -26
- package/dist/server/handlers/datasets.js +1 -1
- package/dist/server/handlers/logs.cjs +4 -4
- package/dist/server/handlers/logs.js +1 -1
- package/dist/server/handlers/mcp-client-versions.cjs +8 -8
- package/dist/server/handlers/mcp-client-versions.js +1 -1
- package/dist/server/handlers/memory.cjs +27 -27
- package/dist/server/handlers/memory.js +1 -1
- package/dist/server/handlers/prompt-block-versions.cjs +8 -8
- package/dist/server/handlers/prompt-block-versions.js +1 -1
- package/dist/server/handlers/responses.cjs +4 -4
- package/dist/server/handlers/responses.js +1 -1
- package/dist/server/handlers/responses.storage.cjs +8 -8
- package/dist/server/handlers/responses.storage.js +1 -1
- package/dist/server/handlers/scorer-versions.cjs +8 -8
- package/dist/server/handlers/scorer-versions.js +1 -1
- package/dist/server/handlers/scores.cjs +7 -7
- package/dist/server/handlers/scores.js +1 -1
- package/dist/server/handlers/stored-agents.cjs +7 -7
- package/dist/server/handlers/stored-agents.js +1 -1
- package/dist/server/handlers/stored-mcp-clients.cjs +6 -6
- package/dist/server/handlers/stored-mcp-clients.js +1 -1
- package/dist/server/handlers/stored-prompt-blocks.cjs +6 -6
- package/dist/server/handlers/stored-prompt-blocks.js +1 -1
- package/dist/server/handlers/stored-scorers.cjs +6 -6
- package/dist/server/handlers/stored-scorers.js +1 -1
- package/dist/server/handlers/stored-workspaces.cjs +6 -6
- package/dist/server/handlers/stored-workspaces.js +1 -1
- package/dist/server/handlers/tools.cjs +6 -6
- package/dist/server/handlers/tools.js +1 -1
- package/dist/server/handlers/utils.cjs +9 -9
- package/dist/server/handlers/utils.js +1 -1
- package/dist/server/handlers/voice.cjs +8 -8
- package/dist/server/handlers/voice.js +1 -1
- package/dist/server/handlers/workflows.cjs +24 -24
- package/dist/server/handlers/workflows.js +1 -1
- package/dist/server/handlers/workspace.cjs +26 -26
- package/dist/server/handlers/workspace.js +1 -1
- package/dist/server/handlers.cjs +35 -35
- package/dist/server/handlers.js +12 -12
- package/dist/server/schemas/index.cjs +227 -227
- package/dist/server/schemas/index.js +9 -9
- package/dist/server/server-adapter/index.cjs +221 -221
- package/dist/server/server-adapter/index.js +24 -24
- package/package.json +4 -4
- package/dist/chunk-2Q5WIJZV.js.map +0 -1
- package/dist/chunk-5BD65C6R.cjs.map +0 -1
- package/dist/chunk-KDIGKXA3.js.map +0 -1
- package/dist/chunk-MLJVCFJQ.js.map +0 -1
- package/dist/chunk-ONL7ZWVI.cjs.map +0 -1
- package/dist/chunk-VQPGGT32.cjs.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkDIX6JWN4_cjs = require('./chunk-DIX6JWN4.cjs');
|
|
4
|
+
var chunk6NHGGSHC_cjs = require('./chunk-6NHGGSHC.cjs');
|
|
4
5
|
var chunkU4Y53V3G_cjs = require('./chunk-U4Y53V3G.cjs');
|
|
5
|
-
var
|
|
6
|
+
var chunkLWK57QIA_cjs = require('./chunk-LWK57QIA.cjs');
|
|
7
|
+
var chunkDIG2K5CV_cjs = require('./chunk-DIG2K5CV.cjs');
|
|
6
8
|
var chunkQ7GNNLCY_cjs = require('./chunk-Q7GNNLCY.cjs');
|
|
7
9
|
var chunkB34S64RC_cjs = require('./chunk-B34S64RC.cjs');
|
|
8
10
|
var chunk64ITUOXI_cjs = require('./chunk-64ITUOXI.cjs');
|
|
9
|
-
var chunk6NHGGSHC_cjs = require('./chunk-6NHGGSHC.cjs');
|
|
10
|
-
var chunkDIG2K5CV_cjs = require('./chunk-DIG2K5CV.cjs');
|
|
11
11
|
var chunkO7I5CWRX_cjs = require('./chunk-O7I5CWRX.cjs');
|
|
12
12
|
var web = require('stream/web');
|
|
13
13
|
var v4 = require('zod/v4');
|
|
@@ -148,7 +148,7 @@ var LIST_WORKFLOW_RUNS_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
148
148
|
requestContext
|
|
149
149
|
}) => {
|
|
150
150
|
try {
|
|
151
|
-
const effectiveResourceId =
|
|
151
|
+
const effectiveResourceId = chunkLWK57QIA_cjs.getEffectiveResourceId(requestContext, resourceId);
|
|
152
152
|
if (!workflowId) {
|
|
153
153
|
throw new chunk64ITUOXI_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
154
154
|
}
|
|
@@ -200,7 +200,7 @@ var GET_WORKFLOW_RUN_BY_ID_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
200
200
|
requiresAuth: true,
|
|
201
201
|
handler: async ({ mastra, workflowId, runId, fields, withNestedWorkflows, requestContext }) => {
|
|
202
202
|
try {
|
|
203
|
-
const effectiveResourceId =
|
|
203
|
+
const effectiveResourceId = chunkLWK57QIA_cjs.getEffectiveResourceId(requestContext, void 0);
|
|
204
204
|
if (!workflowId) {
|
|
205
205
|
throw new chunk64ITUOXI_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
206
206
|
}
|
|
@@ -220,7 +220,7 @@ var GET_WORKFLOW_RUN_BY_ID_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
220
220
|
if (!run) {
|
|
221
221
|
throw new chunk64ITUOXI_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
222
222
|
}
|
|
223
|
-
await
|
|
223
|
+
await chunkLWK57QIA_cjs.validateRunOwnership(run, effectiveResourceId);
|
|
224
224
|
return run;
|
|
225
225
|
} catch (error) {
|
|
226
226
|
return chunkB34S64RC_cjs.handleError(error, "Error getting workflow run");
|
|
@@ -239,7 +239,7 @@ var DELETE_WORKFLOW_RUN_BY_ID_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
239
239
|
requiresAuth: true,
|
|
240
240
|
handler: async ({ mastra, workflowId, runId, requestContext }) => {
|
|
241
241
|
try {
|
|
242
|
-
const effectiveResourceId =
|
|
242
|
+
const effectiveResourceId = chunkLWK57QIA_cjs.getEffectiveResourceId(requestContext, void 0);
|
|
243
243
|
if (!workflowId) {
|
|
244
244
|
throw new chunk64ITUOXI_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
245
245
|
}
|
|
@@ -254,7 +254,7 @@ var DELETE_WORKFLOW_RUN_BY_ID_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
254
254
|
if (!run) {
|
|
255
255
|
throw new chunk64ITUOXI_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
256
256
|
}
|
|
257
|
-
await
|
|
257
|
+
await chunkLWK57QIA_cjs.validateRunOwnership(run, effectiveResourceId);
|
|
258
258
|
await workflow.deleteWorkflowRunById(runId);
|
|
259
259
|
return { message: "Workflow run deleted" };
|
|
260
260
|
} catch (error) {
|
|
@@ -276,7 +276,7 @@ var CREATE_WORKFLOW_RUN_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
276
276
|
requiresAuth: true,
|
|
277
277
|
handler: async ({ mastra, workflowId, runId, resourceId, disableScorers, requestContext }) => {
|
|
278
278
|
try {
|
|
279
|
-
const effectiveResourceId =
|
|
279
|
+
const effectiveResourceId = chunkLWK57QIA_cjs.getEffectiveResourceId(requestContext, resourceId);
|
|
280
280
|
if (!workflowId) {
|
|
281
281
|
throw new chunk64ITUOXI_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
282
282
|
}
|
|
@@ -304,7 +304,7 @@ var STREAM_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
304
304
|
requiresAuth: true,
|
|
305
305
|
handler: async ({ mastra, workflowId, runId, resourceId, requestContext, ...params }) => {
|
|
306
306
|
try {
|
|
307
|
-
const effectiveResourceId =
|
|
307
|
+
const effectiveResourceId = chunkLWK57QIA_cjs.getEffectiveResourceId(requestContext, resourceId);
|
|
308
308
|
if (!workflowId) {
|
|
309
309
|
throw new chunk64ITUOXI_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
310
310
|
}
|
|
@@ -349,7 +349,7 @@ var RESUME_STREAM_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
349
349
|
requiresAuth: true,
|
|
350
350
|
handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {
|
|
351
351
|
try {
|
|
352
|
-
const effectiveResourceId =
|
|
352
|
+
const effectiveResourceId = chunkLWK57QIA_cjs.getEffectiveResourceId(requestContext, void 0);
|
|
353
353
|
if (!workflowId) {
|
|
354
354
|
throw new chunk64ITUOXI_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
355
355
|
}
|
|
@@ -364,7 +364,7 @@ var RESUME_STREAM_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
364
364
|
if (!run) {
|
|
365
365
|
throw new chunk64ITUOXI_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
366
366
|
}
|
|
367
|
-
await
|
|
367
|
+
await chunkLWK57QIA_cjs.validateRunOwnership(run, effectiveResourceId);
|
|
368
368
|
const _run = await workflow.createRun({ runId, resourceId: run.resourceId });
|
|
369
369
|
const serverCache = mastra.getServerCache();
|
|
370
370
|
const stream = _run.resumeStream({ ...params, requestContext }).fullStream.pipeThrough(
|
|
@@ -399,7 +399,7 @@ var START_ASYNC_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
399
399
|
requiresAuth: true,
|
|
400
400
|
handler: async ({ mastra, workflowId, runId, resourceId, requestContext, ...params }) => {
|
|
401
401
|
try {
|
|
402
|
-
const effectiveResourceId =
|
|
402
|
+
const effectiveResourceId = chunkLWK57QIA_cjs.getEffectiveResourceId(requestContext, resourceId);
|
|
403
403
|
if (!workflowId) {
|
|
404
404
|
throw new chunk64ITUOXI_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
405
405
|
}
|
|
@@ -429,7 +429,7 @@ var START_WORKFLOW_RUN_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
429
429
|
requiresAuth: true,
|
|
430
430
|
handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {
|
|
431
431
|
try {
|
|
432
|
-
const effectiveResourceId =
|
|
432
|
+
const effectiveResourceId = chunkLWK57QIA_cjs.getEffectiveResourceId(requestContext, void 0);
|
|
433
433
|
if (!workflowId) {
|
|
434
434
|
throw new chunk64ITUOXI_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
435
435
|
}
|
|
@@ -444,7 +444,7 @@ var START_WORKFLOW_RUN_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
444
444
|
if (!run) {
|
|
445
445
|
throw new chunk64ITUOXI_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
446
446
|
}
|
|
447
|
-
await
|
|
447
|
+
await chunkLWK57QIA_cjs.validateRunOwnership(run, effectiveResourceId);
|
|
448
448
|
const _run = await workflow.createRun({ runId, resourceId: run.resourceId });
|
|
449
449
|
void _run.start({
|
|
450
450
|
...params,
|
|
@@ -469,7 +469,7 @@ var OBSERVE_STREAM_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
469
469
|
requiresAuth: true,
|
|
470
470
|
handler: async ({ mastra, workflowId, runId, requestContext }) => {
|
|
471
471
|
try {
|
|
472
|
-
const effectiveResourceId =
|
|
472
|
+
const effectiveResourceId = chunkLWK57QIA_cjs.getEffectiveResourceId(requestContext, void 0);
|
|
473
473
|
if (!workflowId) {
|
|
474
474
|
throw new chunk64ITUOXI_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
475
475
|
}
|
|
@@ -484,7 +484,7 @@ var OBSERVE_STREAM_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
484
484
|
if (!run) {
|
|
485
485
|
throw new chunk64ITUOXI_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
486
486
|
}
|
|
487
|
-
await
|
|
487
|
+
await chunkLWK57QIA_cjs.validateRunOwnership(run, effectiveResourceId);
|
|
488
488
|
const _run = await workflow.createRun({ runId, resourceId: run.resourceId });
|
|
489
489
|
const serverCache = mastra.getServerCache();
|
|
490
490
|
if (!serverCache) {
|
|
@@ -543,7 +543,7 @@ var RESUME_ASYNC_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
543
543
|
requiresAuth: true,
|
|
544
544
|
handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {
|
|
545
545
|
try {
|
|
546
|
-
const effectiveResourceId =
|
|
546
|
+
const effectiveResourceId = chunkLWK57QIA_cjs.getEffectiveResourceId(requestContext, void 0);
|
|
547
547
|
if (!workflowId) {
|
|
548
548
|
throw new chunk64ITUOXI_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
549
549
|
}
|
|
@@ -558,7 +558,7 @@ var RESUME_ASYNC_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
558
558
|
if (!run) {
|
|
559
559
|
throw new chunk64ITUOXI_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
560
560
|
}
|
|
561
|
-
await
|
|
561
|
+
await chunkLWK57QIA_cjs.validateRunOwnership(run, effectiveResourceId);
|
|
562
562
|
const _run = await workflow.createRun({ runId, resourceId: run.resourceId });
|
|
563
563
|
const result = await _run.resume({ ...params, requestContext });
|
|
564
564
|
return result;
|
|
@@ -581,7 +581,7 @@ var RESUME_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
581
581
|
requiresAuth: true,
|
|
582
582
|
handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {
|
|
583
583
|
try {
|
|
584
|
-
const effectiveResourceId =
|
|
584
|
+
const effectiveResourceId = chunkLWK57QIA_cjs.getEffectiveResourceId(requestContext, void 0);
|
|
585
585
|
if (!workflowId) {
|
|
586
586
|
throw new chunk64ITUOXI_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
587
587
|
}
|
|
@@ -596,7 +596,7 @@ var RESUME_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
596
596
|
if (!run) {
|
|
597
597
|
throw new chunk64ITUOXI_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
598
598
|
}
|
|
599
|
-
await
|
|
599
|
+
await chunkLWK57QIA_cjs.validateRunOwnership(run, effectiveResourceId);
|
|
600
600
|
const _run = await workflow.createRun({ runId, resourceId: run.resourceId });
|
|
601
601
|
void _run.resume({ ...params, requestContext });
|
|
602
602
|
return { message: "Workflow run resumed" };
|
|
@@ -619,7 +619,7 @@ var RESTART_ASYNC_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
619
619
|
requiresAuth: true,
|
|
620
620
|
handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {
|
|
621
621
|
try {
|
|
622
|
-
const effectiveResourceId =
|
|
622
|
+
const effectiveResourceId = chunkLWK57QIA_cjs.getEffectiveResourceId(requestContext, void 0);
|
|
623
623
|
if (!workflowId) {
|
|
624
624
|
throw new chunk64ITUOXI_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
625
625
|
}
|
|
@@ -634,7 +634,7 @@ var RESTART_ASYNC_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
634
634
|
if (!run) {
|
|
635
635
|
throw new chunk64ITUOXI_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
636
636
|
}
|
|
637
|
-
await
|
|
637
|
+
await chunkLWK57QIA_cjs.validateRunOwnership(run, effectiveResourceId);
|
|
638
638
|
const _run = await workflow.createRun({ runId, resourceId: run.resourceId });
|
|
639
639
|
const result = await _run.restart({ ...params, requestContext });
|
|
640
640
|
return result;
|
|
@@ -657,7 +657,7 @@ var RESTART_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
657
657
|
requiresAuth: true,
|
|
658
658
|
handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {
|
|
659
659
|
try {
|
|
660
|
-
const effectiveResourceId =
|
|
660
|
+
const effectiveResourceId = chunkLWK57QIA_cjs.getEffectiveResourceId(requestContext, void 0);
|
|
661
661
|
if (!workflowId) {
|
|
662
662
|
throw new chunk64ITUOXI_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
663
663
|
}
|
|
@@ -672,7 +672,7 @@ var RESTART_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
672
672
|
if (!run) {
|
|
673
673
|
throw new chunk64ITUOXI_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
674
674
|
}
|
|
675
|
-
await
|
|
675
|
+
await chunkLWK57QIA_cjs.validateRunOwnership(run, effectiveResourceId);
|
|
676
676
|
const _run = await workflow.createRun({ runId, resourceId: run.resourceId });
|
|
677
677
|
void _run.restart({ ...params, requestContext });
|
|
678
678
|
return { message: "Workflow run restarted" };
|
|
@@ -747,7 +747,7 @@ var TIME_TRAVEL_ASYNC_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
747
747
|
requiresAuth: true,
|
|
748
748
|
handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {
|
|
749
749
|
try {
|
|
750
|
-
const effectiveResourceId =
|
|
750
|
+
const effectiveResourceId = chunkLWK57QIA_cjs.getEffectiveResourceId(requestContext, void 0);
|
|
751
751
|
if (!workflowId) {
|
|
752
752
|
throw new chunk64ITUOXI_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
753
753
|
}
|
|
@@ -762,7 +762,7 @@ var TIME_TRAVEL_ASYNC_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
762
762
|
if (!run) {
|
|
763
763
|
throw new chunk64ITUOXI_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
764
764
|
}
|
|
765
|
-
await
|
|
765
|
+
await chunkLWK57QIA_cjs.validateRunOwnership(run, effectiveResourceId);
|
|
766
766
|
const _run = await workflow.createRun({ runId, resourceId: run.resourceId });
|
|
767
767
|
const result = await _run.timeTravel({ ...params, requestContext });
|
|
768
768
|
return result;
|
|
@@ -785,7 +785,7 @@ var TIME_TRAVEL_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
785
785
|
requiresAuth: true,
|
|
786
786
|
handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {
|
|
787
787
|
try {
|
|
788
|
-
const effectiveResourceId =
|
|
788
|
+
const effectiveResourceId = chunkLWK57QIA_cjs.getEffectiveResourceId(requestContext, void 0);
|
|
789
789
|
if (!workflowId) {
|
|
790
790
|
throw new chunk64ITUOXI_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
791
791
|
}
|
|
@@ -800,7 +800,7 @@ var TIME_TRAVEL_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
800
800
|
if (!run) {
|
|
801
801
|
throw new chunk64ITUOXI_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
802
802
|
}
|
|
803
|
-
await
|
|
803
|
+
await chunkLWK57QIA_cjs.validateRunOwnership(run, effectiveResourceId);
|
|
804
804
|
const _run = await workflow.createRun({ runId, resourceId: run.resourceId });
|
|
805
805
|
void _run.timeTravel({ ...params, requestContext });
|
|
806
806
|
return { message: "Workflow run time travel started" };
|
|
@@ -822,7 +822,7 @@ var TIME_TRAVEL_STREAM_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
822
822
|
requiresAuth: true,
|
|
823
823
|
handler: async ({ mastra, workflowId, runId, requestContext, ...params }) => {
|
|
824
824
|
try {
|
|
825
|
-
const effectiveResourceId =
|
|
825
|
+
const effectiveResourceId = chunkLWK57QIA_cjs.getEffectiveResourceId(requestContext, void 0);
|
|
826
826
|
if (!workflowId) {
|
|
827
827
|
throw new chunk64ITUOXI_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
828
828
|
}
|
|
@@ -837,7 +837,7 @@ var TIME_TRAVEL_STREAM_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
837
837
|
if (!existingRun) {
|
|
838
838
|
throw new chunk64ITUOXI_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
839
839
|
}
|
|
840
|
-
await
|
|
840
|
+
await chunkLWK57QIA_cjs.validateRunOwnership(existingRun, effectiveResourceId);
|
|
841
841
|
const serverCache = mastra.getServerCache();
|
|
842
842
|
const run = await workflow.createRun({ runId, resourceId: existingRun.resourceId });
|
|
843
843
|
const result = run.timeTravelStream({ ...params, requestContext });
|
|
@@ -870,7 +870,7 @@ var CANCEL_WORKFLOW_RUN_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
870
870
|
requiresAuth: true,
|
|
871
871
|
handler: async ({ mastra, workflowId, runId, requestContext }) => {
|
|
872
872
|
try {
|
|
873
|
-
const effectiveResourceId =
|
|
873
|
+
const effectiveResourceId = chunkLWK57QIA_cjs.getEffectiveResourceId(requestContext, void 0);
|
|
874
874
|
if (!workflowId) {
|
|
875
875
|
throw new chunk64ITUOXI_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
876
876
|
}
|
|
@@ -885,7 +885,7 @@ var CANCEL_WORKFLOW_RUN_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
885
885
|
if (!run) {
|
|
886
886
|
throw new chunk64ITUOXI_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
887
887
|
}
|
|
888
|
-
await
|
|
888
|
+
await chunkLWK57QIA_cjs.validateRunOwnership(run, effectiveResourceId);
|
|
889
889
|
const _run = await workflow.createRun({ runId, resourceId: run.resourceId });
|
|
890
890
|
await _run.cancel();
|
|
891
891
|
return { message: "Workflow run cancelled" };
|
|
@@ -908,7 +908,7 @@ var STREAM_LEGACY_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
908
908
|
requiresAuth: true,
|
|
909
909
|
handler: async ({ mastra, workflowId, runId, resourceId, requestContext, ...params }) => {
|
|
910
910
|
try {
|
|
911
|
-
const effectiveResourceId =
|
|
911
|
+
const effectiveResourceId = chunkLWK57QIA_cjs.getEffectiveResourceId(requestContext, resourceId);
|
|
912
912
|
if (!workflowId) {
|
|
913
913
|
throw new chunk64ITUOXI_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
914
914
|
}
|
|
@@ -950,7 +950,7 @@ var OBSERVE_STREAM_LEGACY_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
950
950
|
requiresAuth: true,
|
|
951
951
|
handler: async ({ mastra, workflowId, runId, requestContext }) => {
|
|
952
952
|
try {
|
|
953
|
-
const effectiveResourceId =
|
|
953
|
+
const effectiveResourceId = chunkLWK57QIA_cjs.getEffectiveResourceId(requestContext, void 0);
|
|
954
954
|
if (!workflowId) {
|
|
955
955
|
throw new chunk64ITUOXI_cjs.HTTPException(400, { message: "Workflow ID is required" });
|
|
956
956
|
}
|
|
@@ -965,7 +965,7 @@ var OBSERVE_STREAM_LEGACY_WORKFLOW_ROUTE = chunkQ7GNNLCY_cjs.createRoute({
|
|
|
965
965
|
if (!run) {
|
|
966
966
|
throw new chunk64ITUOXI_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
967
967
|
}
|
|
968
|
-
await
|
|
968
|
+
await chunkLWK57QIA_cjs.validateRunOwnership(run, effectiveResourceId);
|
|
969
969
|
const _run = await workflow.createRun({ runId, resourceId: run.resourceId });
|
|
970
970
|
const serverCache = mastra.getServerCache();
|
|
971
971
|
if (!serverCache) {
|
|
@@ -1010,5 +1010,5 @@ exports.TIME_TRAVEL_ASYNC_WORKFLOW_ROUTE = TIME_TRAVEL_ASYNC_WORKFLOW_ROUTE;
|
|
|
1010
1010
|
exports.TIME_TRAVEL_STREAM_WORKFLOW_ROUTE = TIME_TRAVEL_STREAM_WORKFLOW_ROUTE;
|
|
1011
1011
|
exports.TIME_TRAVEL_WORKFLOW_ROUTE = TIME_TRAVEL_WORKFLOW_ROUTE;
|
|
1012
1012
|
exports.workflows_exports = workflows_exports;
|
|
1013
|
-
//# sourceMappingURL=chunk-
|
|
1014
|
-
//# sourceMappingURL=chunk-
|
|
1013
|
+
//# sourceMappingURL=chunk-75W2MUNS.cjs.map
|
|
1014
|
+
//# sourceMappingURL=chunk-75W2MUNS.cjs.map
|