@mastra/server 0.0.0-trigger-playground-ui-package-20250506151043 → 0.0.0-vector-sources-20250516175436
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/README.md +48 -135
- package/dist/_tsup-dts-rollup.d.cts +161 -13
- package/dist/_tsup-dts-rollup.d.ts +161 -13
- package/dist/{chunk-4JINXASC.js → chunk-55DOQLP6.js} +5 -4
- package/dist/{chunk-QN4KF3BH.cjs → chunk-57CJTIPW.cjs} +2 -2
- package/dist/chunk-5SN4U5AC.cjs +508 -0
- package/dist/{chunk-ZLBRQFDD.cjs → chunk-64U3UDTH.cjs} +2 -2
- package/dist/chunk-75ZPJI57.cjs +9 -0
- package/dist/{chunk-M56ECCHK.cjs → chunk-BNEY4P4P.cjs} +20 -19
- package/dist/{chunk-QJ3AHN64.js → chunk-C7564HUT.js} +4 -3
- package/dist/{chunk-4BIX6GMY.cjs → chunk-D4IRYCUI.cjs} +72 -26
- package/dist/{chunk-RBQASTUP.js → chunk-DJJIUEL2.js} +13 -5
- package/dist/{chunk-3XTEV33Q.js → chunk-EJO45KYT.js} +19 -16
- package/dist/{chunk-L7XE5QTW.js → chunk-H5PTF3Y4.js} +1 -1
- package/dist/{chunk-Q6SHQECN.js → chunk-HFWCEP5S.js} +4 -3
- package/dist/{chunk-3EJZQ6TQ.js → chunk-HWZVAG3H.js} +3 -3
- package/dist/{chunk-CHFORQ7J.cjs → chunk-I2B73Y4I.cjs} +60 -57
- package/dist/chunk-LIVAK2DM.js +2001 -0
- package/dist/{chunk-3AHQ5RGN.js → chunk-M5ABIP7D.js} +1 -1
- package/dist/{chunk-AMVOS7YB.cjs → chunk-MHKNLNAN.cjs} +9 -8
- package/dist/{chunk-OWNA6I2H.js → chunk-MIQYDLLM.js} +28 -11
- package/dist/chunk-MLKGABMK.js +7 -0
- package/dist/{chunk-TRDNDNGQ.js → chunk-NYN7KFXL.js} +1 -7
- package/dist/{chunk-FV45V6WC.cjs → chunk-OCWPVYNI.cjs} +0 -7
- package/dist/{chunk-SKBVVI24.cjs → chunk-OGCNNUHF.cjs} +9 -9
- package/dist/{chunk-BPL2CBLV.js → chunk-OR3CIE2H.js} +3 -2
- package/dist/chunk-P6SCPDYW.js +500 -0
- package/dist/{chunk-5JNVY6DU.js → chunk-TJKLBTFB.js} +20 -8
- package/dist/{chunk-M2RXDCPV.cjs → chunk-UCTEMO2Q.cjs} +76 -59
- package/dist/{chunk-5YGDYMRB.cjs → chunk-VPNDC2DI.cjs} +14 -13
- package/dist/{chunk-Y3SV5XK4.js → chunk-WUC6LSTW.js} +54 -8
- package/dist/{chunk-2FJURXCL.cjs → chunk-Y7UWRW5X.cjs} +43 -35
- package/dist/{chunk-55HTWX4C.cjs → chunk-YBVOQN4M.cjs} +20 -19
- package/dist/chunk-YWLUOY3D.cjs +2004 -0
- package/dist/{chunk-D3G23FP3.cjs → chunk-ZE5AAC4I.cjs} +37 -25
- package/dist/server/handlers/a2a.cjs +30 -0
- package/dist/server/handlers/a2a.d.cts +6 -0
- package/dist/server/handlers/a2a.d.ts +6 -0
- package/dist/server/handlers/a2a.js +1 -0
- package/dist/server/handlers/agents.cjs +7 -7
- package/dist/server/handlers/agents.js +1 -1
- package/dist/server/handlers/error.cjs +2 -2
- package/dist/server/handlers/error.js +1 -1
- package/dist/server/handlers/logs.cjs +4 -4
- package/dist/server/handlers/logs.js +1 -1
- package/dist/server/handlers/memory.cjs +9 -9
- package/dist/server/handlers/memory.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/utils.cjs +2 -2
- package/dist/server/handlers/utils.js +1 -1
- package/dist/server/handlers/vNextWorkflows.cjs +11 -11
- package/dist/server/handlers/vNextWorkflows.js +1 -1
- package/dist/server/handlers/vector.cjs +7 -7
- package/dist/server/handlers/vector.js +1 -1
- 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 +28 -23
- package/dist/server/handlers.d.cts +1 -0
- package/dist/server/handlers.d.ts +1 -0
- package/dist/server/handlers.js +11 -10
- package/package.json +7 -5
- package/dist/chunk-5SWCVTNL.cjs +0 -5579
- package/dist/chunk-OMN3UI6X.js +0 -5576
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
3
|
+
var chunkYWLUOY3D_cjs = require('./chunk-YWLUOY3D.cjs');
|
|
4
|
+
var chunk57CJTIPW_cjs = require('./chunk-57CJTIPW.cjs');
|
|
5
|
+
var chunk64U3UDTH_cjs = require('./chunk-64U3UDTH.cjs');
|
|
6
|
+
var chunkOCWPVYNI_cjs = require('./chunk-OCWPVYNI.cjs');
|
|
7
|
+
var chunk75ZPJI57_cjs = require('./chunk-75ZPJI57.cjs');
|
|
8
|
+
var runtimeContext = require('@mastra/core/runtime-context');
|
|
7
9
|
|
|
8
10
|
// src/server/handlers/agents.ts
|
|
9
11
|
var agents_exports = {};
|
|
10
|
-
|
|
12
|
+
chunk75ZPJI57_cjs.__export(agents_exports, {
|
|
11
13
|
generateHandler: () => generateHandler,
|
|
12
14
|
getAgentByIdHandler: () => getAgentByIdHandler,
|
|
13
15
|
getAgentsHandler: () => getAgentsHandler,
|
|
@@ -27,16 +29,34 @@ async function getAgentsHandler({ mastra, runtimeContext }) {
|
|
|
27
29
|
const _tool = tool;
|
|
28
30
|
acc[key] = {
|
|
29
31
|
..._tool,
|
|
30
|
-
inputSchema: _tool.inputSchema ?
|
|
31
|
-
outputSchema: _tool.outputSchema ?
|
|
32
|
+
inputSchema: _tool.inputSchema ? chunkYWLUOY3D_cjs.stringify(chunkYWLUOY3D_cjs.esm_default(_tool.inputSchema)) : void 0,
|
|
33
|
+
outputSchema: _tool.outputSchema ? chunkYWLUOY3D_cjs.stringify(chunkYWLUOY3D_cjs.esm_default(_tool.outputSchema)) : void 0
|
|
32
34
|
};
|
|
33
35
|
return acc;
|
|
34
36
|
}, {});
|
|
37
|
+
let serializedAgentWorkflows = {};
|
|
38
|
+
if ("getWorkflows" in agent) {
|
|
39
|
+
const logger = mastra.getLogger();
|
|
40
|
+
try {
|
|
41
|
+
const workflows = await agent.getWorkflows({ runtimeContext });
|
|
42
|
+
serializedAgentWorkflows = Object.entries(workflows || {}).reduce((acc, [key, workflow]) => {
|
|
43
|
+
return {
|
|
44
|
+
...acc,
|
|
45
|
+
[key]: {
|
|
46
|
+
name: workflow.name
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
}, {});
|
|
50
|
+
} catch (error) {
|
|
51
|
+
logger.error("Error getting workflows for agent", { agentName: agent.name, error });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
35
54
|
return {
|
|
36
55
|
id,
|
|
37
56
|
name: agent.name,
|
|
38
57
|
instructions,
|
|
39
58
|
tools: serializedAgentTools,
|
|
59
|
+
workflows: serializedAgentWorkflows,
|
|
40
60
|
provider: llm?.getProvider(),
|
|
41
61
|
modelId: llm?.getModelId()
|
|
42
62
|
};
|
|
@@ -48,7 +68,7 @@ async function getAgentsHandler({ mastra, runtimeContext }) {
|
|
|
48
68
|
}, {});
|
|
49
69
|
return serializedAgents;
|
|
50
70
|
} catch (error) {
|
|
51
|
-
return
|
|
71
|
+
return chunk64U3UDTH_cjs.handleError(error, "Error getting agents");
|
|
52
72
|
}
|
|
53
73
|
}
|
|
54
74
|
async function getAgentByIdHandler({
|
|
@@ -59,29 +79,47 @@ async function getAgentByIdHandler({
|
|
|
59
79
|
try {
|
|
60
80
|
const agent = mastra.getAgent(agentId);
|
|
61
81
|
if (!agent) {
|
|
62
|
-
throw new
|
|
82
|
+
throw new chunkOCWPVYNI_cjs.HTTPException(404, { message: "Agent not found" });
|
|
63
83
|
}
|
|
64
84
|
const tools = await agent.getTools({ runtimeContext });
|
|
65
85
|
const serializedAgentTools = Object.entries(tools || {}).reduce((acc, [key, tool]) => {
|
|
66
86
|
const _tool = tool;
|
|
67
87
|
acc[key] = {
|
|
68
88
|
..._tool,
|
|
69
|
-
inputSchema: _tool.inputSchema ?
|
|
70
|
-
outputSchema: _tool.outputSchema ?
|
|
89
|
+
inputSchema: _tool.inputSchema ? chunkYWLUOY3D_cjs.stringify(chunkYWLUOY3D_cjs.esm_default(_tool.inputSchema)) : void 0,
|
|
90
|
+
outputSchema: _tool.outputSchema ? chunkYWLUOY3D_cjs.stringify(chunkYWLUOY3D_cjs.esm_default(_tool.outputSchema)) : void 0
|
|
71
91
|
};
|
|
72
92
|
return acc;
|
|
73
93
|
}, {});
|
|
94
|
+
let serializedAgentWorkflows = {};
|
|
95
|
+
if ("getWorkflows" in agent) {
|
|
96
|
+
const logger = mastra.getLogger();
|
|
97
|
+
try {
|
|
98
|
+
const workflows = await agent.getWorkflows({ runtimeContext });
|
|
99
|
+
serializedAgentWorkflows = Object.entries(workflows || {}).reduce((acc, [key, workflow]) => {
|
|
100
|
+
return {
|
|
101
|
+
...acc,
|
|
102
|
+
[key]: {
|
|
103
|
+
name: workflow.name
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
}, {});
|
|
107
|
+
} catch (error) {
|
|
108
|
+
logger.error("Error getting workflows for agent", { agentName: agent.name, error });
|
|
109
|
+
}
|
|
110
|
+
}
|
|
74
111
|
const instructions = await agent.getInstructions({ runtimeContext });
|
|
75
112
|
const llm = await agent.getLLM({ runtimeContext });
|
|
76
113
|
return {
|
|
77
114
|
name: agent.name,
|
|
78
115
|
instructions,
|
|
79
116
|
tools: serializedAgentTools,
|
|
117
|
+
workflows: serializedAgentWorkflows,
|
|
80
118
|
provider: llm?.getProvider(),
|
|
81
119
|
modelId: llm?.getModelId()
|
|
82
120
|
};
|
|
83
121
|
} catch (error) {
|
|
84
|
-
return
|
|
122
|
+
return chunk64U3UDTH_cjs.handleError(error, "Error getting agent");
|
|
85
123
|
}
|
|
86
124
|
}
|
|
87
125
|
async function getEvalsByAgentIdHandler({
|
|
@@ -100,7 +138,7 @@ async function getEvalsByAgentIdHandler({
|
|
|
100
138
|
evals
|
|
101
139
|
};
|
|
102
140
|
} catch (error) {
|
|
103
|
-
return
|
|
141
|
+
return chunk64U3UDTH_cjs.handleError(error, "Error getting test evals");
|
|
104
142
|
}
|
|
105
143
|
}
|
|
106
144
|
async function getLiveEvalsByAgentIdHandler({
|
|
@@ -119,53 +157,61 @@ async function getLiveEvalsByAgentIdHandler({
|
|
|
119
157
|
evals
|
|
120
158
|
};
|
|
121
159
|
} catch (error) {
|
|
122
|
-
return
|
|
160
|
+
return chunk64U3UDTH_cjs.handleError(error, "Error getting live evals");
|
|
123
161
|
}
|
|
124
162
|
}
|
|
125
163
|
async function generateHandler({
|
|
126
164
|
mastra,
|
|
127
|
-
runtimeContext,
|
|
165
|
+
runtimeContext: runtimeContext$1,
|
|
128
166
|
agentId,
|
|
129
167
|
body
|
|
130
168
|
}) {
|
|
131
169
|
try {
|
|
132
170
|
const agent = mastra.getAgent(agentId);
|
|
133
171
|
if (!agent) {
|
|
134
|
-
throw new
|
|
172
|
+
throw new chunkOCWPVYNI_cjs.HTTPException(404, { message: "Agent not found" });
|
|
135
173
|
}
|
|
136
|
-
const { messages, resourceId, resourceid, ...rest } = body;
|
|
174
|
+
const { messages, resourceId, resourceid, runtimeContext: agentRuntimeContext, ...rest } = body;
|
|
137
175
|
const finalResourceId = resourceId ?? resourceid;
|
|
138
|
-
|
|
176
|
+
const finalRuntimeContext = new runtimeContext.RuntimeContext([
|
|
177
|
+
...Array.from(runtimeContext$1.entries()),
|
|
178
|
+
...Array.from(Object.entries(agentRuntimeContext ?? {}))
|
|
179
|
+
]);
|
|
180
|
+
chunk57CJTIPW_cjs.validateBody({ messages });
|
|
139
181
|
const result = await agent.generate(messages, {
|
|
140
182
|
...rest,
|
|
141
183
|
// @ts-expect-error TODO fix types
|
|
142
184
|
resourceId: finalResourceId,
|
|
143
|
-
runtimeContext
|
|
185
|
+
runtimeContext: finalRuntimeContext
|
|
144
186
|
});
|
|
145
187
|
return result;
|
|
146
188
|
} catch (error) {
|
|
147
|
-
return
|
|
189
|
+
return chunk64U3UDTH_cjs.handleError(error, "Error generating from agent");
|
|
148
190
|
}
|
|
149
191
|
}
|
|
150
192
|
async function streamGenerateHandler({
|
|
151
193
|
mastra,
|
|
152
|
-
runtimeContext,
|
|
194
|
+
runtimeContext: runtimeContext$1,
|
|
153
195
|
agentId,
|
|
154
196
|
body
|
|
155
197
|
}) {
|
|
156
198
|
try {
|
|
157
199
|
const agent = mastra.getAgent(agentId);
|
|
158
200
|
if (!agent) {
|
|
159
|
-
throw new
|
|
201
|
+
throw new chunkOCWPVYNI_cjs.HTTPException(404, { message: "Agent not found" });
|
|
160
202
|
}
|
|
161
|
-
const { messages, resourceId, resourceid, ...rest } = body;
|
|
203
|
+
const { messages, resourceId, resourceid, runtimeContext: agentRuntimeContext, ...rest } = body;
|
|
162
204
|
const finalResourceId = resourceId ?? resourceid;
|
|
163
|
-
|
|
205
|
+
const finalRuntimeContext = new runtimeContext.RuntimeContext([
|
|
206
|
+
...Array.from(runtimeContext$1.entries()),
|
|
207
|
+
...Array.from(Object.entries(agentRuntimeContext ?? {}))
|
|
208
|
+
]);
|
|
209
|
+
chunk57CJTIPW_cjs.validateBody({ messages });
|
|
164
210
|
const streamResult = await agent.stream(messages, {
|
|
165
211
|
...rest,
|
|
166
212
|
// @ts-expect-error TODO fix types
|
|
167
213
|
resourceId: finalResourceId,
|
|
168
|
-
runtimeContext
|
|
214
|
+
runtimeContext: finalRuntimeContext
|
|
169
215
|
});
|
|
170
216
|
const streamResponse = rest.output ? streamResult.toTextStreamResponse() : streamResult.toDataStreamResponse({
|
|
171
217
|
sendUsage: true,
|
|
@@ -176,7 +222,7 @@ async function streamGenerateHandler({
|
|
|
176
222
|
});
|
|
177
223
|
return streamResponse;
|
|
178
224
|
} catch (error) {
|
|
179
|
-
throw new
|
|
225
|
+
throw new chunkOCWPVYNI_cjs.HTTPException(error?.status ?? 500, { message: error?.message ?? "Error streaming from agent" });
|
|
180
226
|
}
|
|
181
227
|
}
|
|
182
228
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { validateBody } from './chunk-
|
|
2
|
-
import { handleError } from './chunk-
|
|
3
|
-
import {
|
|
1
|
+
import { validateBody } from './chunk-H5PTF3Y4.js';
|
|
2
|
+
import { handleError } from './chunk-M5ABIP7D.js';
|
|
3
|
+
import { HTTPException } from './chunk-NYN7KFXL.js';
|
|
4
|
+
import { __export } from './chunk-MLKGABMK.js';
|
|
4
5
|
|
|
5
6
|
// src/server/handlers/memory.ts
|
|
6
7
|
var memory_exports = {};
|
|
@@ -181,8 +182,12 @@ async function deleteThreadHandler({
|
|
|
181
182
|
async function getMessagesHandler({
|
|
182
183
|
mastra,
|
|
183
184
|
agentId,
|
|
184
|
-
threadId
|
|
185
|
+
threadId,
|
|
186
|
+
limit
|
|
185
187
|
}) {
|
|
188
|
+
if (limit !== void 0 && (!Number.isInteger(limit) || limit <= 0)) {
|
|
189
|
+
throw new HTTPException(400, { message: "Invalid limit: must be a positive integer" });
|
|
190
|
+
}
|
|
186
191
|
try {
|
|
187
192
|
validateBody({ threadId });
|
|
188
193
|
const memory = getMemoryFromContext({ mastra, agentId });
|
|
@@ -193,7 +198,10 @@ async function getMessagesHandler({
|
|
|
193
198
|
if (!thread) {
|
|
194
199
|
throw new HTTPException(404, { message: "Thread not found" });
|
|
195
200
|
}
|
|
196
|
-
const result = await memory.query({
|
|
201
|
+
const result = await memory.query({
|
|
202
|
+
threadId,
|
|
203
|
+
...limit && { selectBy: { last: limit } }
|
|
204
|
+
});
|
|
197
205
|
return result;
|
|
198
206
|
} catch (error) {
|
|
199
207
|
return handleError(error, "Error getting messages");
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { stringify, esm_default } from './chunk-
|
|
2
|
-
import { handleError } from './chunk-
|
|
3
|
-
import {
|
|
1
|
+
import { stringify, esm_default } from './chunk-LIVAK2DM.js';
|
|
2
|
+
import { handleError } from './chunk-M5ABIP7D.js';
|
|
3
|
+
import { HTTPException } from './chunk-NYN7KFXL.js';
|
|
4
|
+
import { __export } from './chunk-MLKGABMK.js';
|
|
4
5
|
import { ReadableStream } from 'node:stream/web';
|
|
5
6
|
|
|
6
7
|
// src/server/handlers/workflows.ts
|
|
@@ -96,14 +97,14 @@ async function startAsyncWorkflowHandler({
|
|
|
96
97
|
throw new HTTPException(404, { message: "Workflow not found" });
|
|
97
98
|
}
|
|
98
99
|
if (!runId) {
|
|
99
|
-
const
|
|
100
|
-
const result2 = await start({
|
|
100
|
+
const newRun = workflow.createRun();
|
|
101
|
+
const result2 = await newRun.start({
|
|
101
102
|
triggerData,
|
|
102
103
|
runtimeContext
|
|
103
104
|
});
|
|
104
105
|
return result2;
|
|
105
106
|
}
|
|
106
|
-
const run = workflow.
|
|
107
|
+
const run = workflow.getMemoryRun(runId);
|
|
107
108
|
if (!run) {
|
|
108
109
|
throw new HTTPException(404, { message: "Workflow run not found" });
|
|
109
110
|
}
|
|
@@ -132,7 +133,7 @@ async function getWorkflowRunHandler({
|
|
|
132
133
|
if (!workflow) {
|
|
133
134
|
throw new HTTPException(404, { message: "Workflow not found" });
|
|
134
135
|
}
|
|
135
|
-
const run = workflow.getRun(runId);
|
|
136
|
+
const run = await workflow.getRun(runId);
|
|
136
137
|
if (!run) {
|
|
137
138
|
throw new HTTPException(404, { message: "Workflow run not found" });
|
|
138
139
|
}
|
|
@@ -154,8 +155,8 @@ async function createRunHandler({
|
|
|
154
155
|
if (!workflow) {
|
|
155
156
|
throw new HTTPException(404, { message: "Workflow not found" });
|
|
156
157
|
}
|
|
157
|
-
const
|
|
158
|
-
return { runId };
|
|
158
|
+
const newRun = workflow.createRun({ runId: prevRunId });
|
|
159
|
+
return { runId: newRun.runId };
|
|
159
160
|
} catch (error) {
|
|
160
161
|
throw new HTTPException(500, { message: error?.message || "Error creating workflow run" });
|
|
161
162
|
}
|
|
@@ -175,11 +176,11 @@ async function startWorkflowRunHandler({
|
|
|
175
176
|
throw new HTTPException(400, { message: "runId required to start run" });
|
|
176
177
|
}
|
|
177
178
|
const workflow = mastra.getWorkflow(workflowId);
|
|
178
|
-
const run = workflow.
|
|
179
|
+
const run = workflow.getMemoryRun(runId);
|
|
179
180
|
if (!run) {
|
|
180
181
|
throw new HTTPException(404, { message: "Workflow run not found" });
|
|
181
182
|
}
|
|
182
|
-
|
|
183
|
+
void run.start({
|
|
183
184
|
triggerData,
|
|
184
185
|
runtimeContext
|
|
185
186
|
});
|
|
@@ -201,7 +202,7 @@ async function watchWorkflowHandler({
|
|
|
201
202
|
throw new HTTPException(400, { message: "runId required to watch workflow" });
|
|
202
203
|
}
|
|
203
204
|
const workflow = mastra.getWorkflow(workflowId);
|
|
204
|
-
const run = workflow.
|
|
205
|
+
const run = workflow.getMemoryRun(runId);
|
|
205
206
|
if (!run) {
|
|
206
207
|
throw new HTTPException(404, { message: "Workflow run not found" });
|
|
207
208
|
}
|
|
@@ -217,8 +218,10 @@ async function watchWorkflowHandler({
|
|
|
217
218
|
asyncRef = null;
|
|
218
219
|
}
|
|
219
220
|
asyncRef = setImmediate(() => {
|
|
220
|
-
|
|
221
|
+
const runDone = Object.values(activePathsObj).every((value) => value.status !== "executing");
|
|
222
|
+
if (runDone) {
|
|
221
223
|
controller.close();
|
|
224
|
+
unwatch?.();
|
|
222
225
|
}
|
|
223
226
|
});
|
|
224
227
|
});
|
|
@@ -247,7 +250,7 @@ async function resumeAsyncWorkflowHandler({
|
|
|
247
250
|
throw new HTTPException(400, { message: "runId required to resume workflow" });
|
|
248
251
|
}
|
|
249
252
|
const workflow = mastra.getWorkflow(workflowId);
|
|
250
|
-
const run = workflow.
|
|
253
|
+
const run = workflow.getMemoryRun(runId);
|
|
251
254
|
if (!run) {
|
|
252
255
|
throw new HTTPException(404, { message: "Workflow run not found" });
|
|
253
256
|
}
|
|
@@ -276,11 +279,11 @@ async function resumeWorkflowHandler({
|
|
|
276
279
|
throw new HTTPException(400, { message: "runId required to resume workflow" });
|
|
277
280
|
}
|
|
278
281
|
const workflow = mastra.getWorkflow(workflowId);
|
|
279
|
-
const run = workflow.
|
|
282
|
+
const run = workflow.getMemoryRun(runId);
|
|
280
283
|
if (!run) {
|
|
281
284
|
throw new HTTPException(404, { message: "Workflow run not found" });
|
|
282
285
|
}
|
|
283
|
-
|
|
286
|
+
void run.resume({
|
|
284
287
|
stepId: body.stepId,
|
|
285
288
|
context: body.context,
|
|
286
289
|
runtimeContext
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { validateBody } from './chunk-
|
|
2
|
-
import { handleError } from './chunk-
|
|
3
|
-
import {
|
|
1
|
+
import { validateBody } from './chunk-H5PTF3Y4.js';
|
|
2
|
+
import { handleError } from './chunk-M5ABIP7D.js';
|
|
3
|
+
import { HTTPException } from './chunk-NYN7KFXL.js';
|
|
4
|
+
import { __export } from './chunk-MLKGABMK.js';
|
|
4
5
|
import { Readable } from 'stream';
|
|
5
6
|
|
|
6
7
|
// src/server/handlers/voice.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { validateBody } from './chunk-
|
|
2
|
-
import { handleError } from './chunk-
|
|
3
|
-
import { __export } from './chunk-
|
|
1
|
+
import { validateBody } from './chunk-H5PTF3Y4.js';
|
|
2
|
+
import { handleError } from './chunk-M5ABIP7D.js';
|
|
3
|
+
import { __export } from './chunk-MLKGABMK.js';
|
|
4
4
|
|
|
5
5
|
// src/server/handlers/logs.ts
|
|
6
6
|
var logs_exports = {};
|