@mastra/server 2.0.2-alpha.5 → 2.0.2
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 +2 -2
- package/dist/_tsup-dts-rollup.d.ts +2 -2
- package/dist/{chunk-FOXHTOQZ.cjs → chunk-M2RXDCPV.cjs} +8 -8
- package/dist/{chunk-IQTNZSFP.js → chunk-OWNA6I2H.js} +8 -8
- package/dist/server/handlers/vNextWorkflows.cjs +12 -12
- package/dist/server/handlers/vNextWorkflows.d.cts +1 -1
- package/dist/server/handlers/vNextWorkflows.d.ts +1 -1
- package/dist/server/handlers/vNextWorkflows.js +1 -1
- package/dist/server/handlers.cjs +2 -2
- package/dist/server/handlers.js +1 -1
- package/package.json +5 -5
|
@@ -247,7 +247,7 @@ export declare function getVNextWorkflowByIdHandler({ mastra, workflowId }: VNex
|
|
|
247
247
|
outputSchema: string | undefined;
|
|
248
248
|
}>;
|
|
249
249
|
|
|
250
|
-
export declare function
|
|
250
|
+
export declare function getVNextWorkflowRunByIdHandler({ mastra, workflowId, runId, }: Pick<VNextWorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReturnType<NewWorkflow['getWorkflowRunById']>>;
|
|
251
251
|
|
|
252
252
|
export declare function getVNextWorkflowRunsHandler({ mastra, workflowId, fromDate, toDate, limit, offset, resourceId, }: VNextWorkflowContext & {
|
|
253
253
|
fromDate?: Date;
|
|
@@ -618,7 +618,7 @@ export declare namespace vNextWorkflows {
|
|
|
618
618
|
export {
|
|
619
619
|
getVNextWorkflowsHandler,
|
|
620
620
|
getVNextWorkflowByIdHandler,
|
|
621
|
-
|
|
621
|
+
getVNextWorkflowRunByIdHandler,
|
|
622
622
|
createVNextWorkflowRunHandler,
|
|
623
623
|
startAsyncVNextWorkflowHandler,
|
|
624
624
|
startVNextWorkflowRunHandler,
|
|
@@ -247,7 +247,7 @@ export declare function getVNextWorkflowByIdHandler({ mastra, workflowId }: VNex
|
|
|
247
247
|
outputSchema: string | undefined;
|
|
248
248
|
}>;
|
|
249
249
|
|
|
250
|
-
export declare function
|
|
250
|
+
export declare function getVNextWorkflowRunByIdHandler({ mastra, workflowId, runId, }: Pick<VNextWorkflowContext, 'mastra' | 'workflowId' | 'runId'>): Promise<ReturnType<NewWorkflow['getWorkflowRunById']>>;
|
|
251
251
|
|
|
252
252
|
export declare function getVNextWorkflowRunsHandler({ mastra, workflowId, fromDate, toDate, limit, offset, resourceId, }: VNextWorkflowContext & {
|
|
253
253
|
fromDate?: Date;
|
|
@@ -618,7 +618,7 @@ export declare namespace vNextWorkflows {
|
|
|
618
618
|
export {
|
|
619
619
|
getVNextWorkflowsHandler,
|
|
620
620
|
getVNextWorkflowByIdHandler,
|
|
621
|
-
|
|
621
|
+
getVNextWorkflowRunByIdHandler,
|
|
622
622
|
createVNextWorkflowRunHandler,
|
|
623
623
|
startAsyncVNextWorkflowHandler,
|
|
624
624
|
startVNextWorkflowRunHandler,
|
|
@@ -10,7 +10,7 @@ var vNextWorkflows_exports = {};
|
|
|
10
10
|
chunkFV45V6WC_cjs.__export(vNextWorkflows_exports, {
|
|
11
11
|
createVNextWorkflowRunHandler: () => createVNextWorkflowRunHandler,
|
|
12
12
|
getVNextWorkflowByIdHandler: () => getVNextWorkflowByIdHandler,
|
|
13
|
-
|
|
13
|
+
getVNextWorkflowRunByIdHandler: () => getVNextWorkflowRunByIdHandler,
|
|
14
14
|
getVNextWorkflowRunsHandler: () => getVNextWorkflowRunsHandler,
|
|
15
15
|
getVNextWorkflowsHandler: () => getVNextWorkflowsHandler,
|
|
16
16
|
resumeAsyncVNextWorkflowHandler: () => resumeAsyncVNextWorkflowHandler,
|
|
@@ -77,7 +77,7 @@ async function getVNextWorkflowByIdHandler({ mastra, workflowId }) {
|
|
|
77
77
|
throw new chunkFV45V6WC_cjs.HTTPException(500, { message: error?.message || "Error getting workflow" });
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
async function
|
|
80
|
+
async function getVNextWorkflowRunByIdHandler({
|
|
81
81
|
mastra,
|
|
82
82
|
workflowId,
|
|
83
83
|
runId
|
|
@@ -93,7 +93,7 @@ async function getVNextWorkflowRunHandler({
|
|
|
93
93
|
if (!workflow) {
|
|
94
94
|
throw new chunkFV45V6WC_cjs.HTTPException(404, { message: "Workflow not found" });
|
|
95
95
|
}
|
|
96
|
-
const run = await workflow.
|
|
96
|
+
const run = await workflow.getWorkflowRunById(runId);
|
|
97
97
|
if (!run) {
|
|
98
98
|
throw new chunkFV45V6WC_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
99
99
|
}
|
|
@@ -161,7 +161,7 @@ async function startVNextWorkflowRunHandler({
|
|
|
161
161
|
throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "runId required to start run" });
|
|
162
162
|
}
|
|
163
163
|
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
164
|
-
const run = await workflow.
|
|
164
|
+
const run = await workflow.getWorkflowRunById(runId);
|
|
165
165
|
if (!run) {
|
|
166
166
|
throw new chunkFV45V6WC_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
167
167
|
}
|
|
@@ -188,7 +188,7 @@ async function watchVNextWorkflowHandler({
|
|
|
188
188
|
throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "runId required to watch workflow" });
|
|
189
189
|
}
|
|
190
190
|
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
191
|
-
const run = await workflow.
|
|
191
|
+
const run = await workflow.getWorkflowRunById(runId);
|
|
192
192
|
if (!run) {
|
|
193
193
|
throw new chunkFV45V6WC_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
194
194
|
}
|
|
@@ -239,7 +239,7 @@ async function resumeAsyncVNextWorkflowHandler({
|
|
|
239
239
|
throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "step required to resume workflow" });
|
|
240
240
|
}
|
|
241
241
|
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
242
|
-
const run = await workflow.
|
|
242
|
+
const run = await workflow.getWorkflowRunById(runId);
|
|
243
243
|
if (!run) {
|
|
244
244
|
throw new chunkFV45V6WC_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
245
245
|
}
|
|
@@ -272,7 +272,7 @@ async function resumeVNextWorkflowHandler({
|
|
|
272
272
|
throw new chunkFV45V6WC_cjs.HTTPException(400, { message: "step required to resume workflow" });
|
|
273
273
|
}
|
|
274
274
|
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
275
|
-
const run = await workflow.
|
|
275
|
+
const run = await workflow.getWorkflowRunById(runId);
|
|
276
276
|
if (!run) {
|
|
277
277
|
throw new chunkFV45V6WC_cjs.HTTPException(404, { message: "Workflow run not found" });
|
|
278
278
|
}
|
|
@@ -313,7 +313,7 @@ async function getVNextWorkflowRunsHandler({
|
|
|
313
313
|
|
|
314
314
|
exports.createVNextWorkflowRunHandler = createVNextWorkflowRunHandler;
|
|
315
315
|
exports.getVNextWorkflowByIdHandler = getVNextWorkflowByIdHandler;
|
|
316
|
-
exports.
|
|
316
|
+
exports.getVNextWorkflowRunByIdHandler = getVNextWorkflowRunByIdHandler;
|
|
317
317
|
exports.getVNextWorkflowRunsHandler = getVNextWorkflowRunsHandler;
|
|
318
318
|
exports.getVNextWorkflowsHandler = getVNextWorkflowsHandler;
|
|
319
319
|
exports.resumeAsyncVNextWorkflowHandler = resumeAsyncVNextWorkflowHandler;
|
|
@@ -8,7 +8,7 @@ var vNextWorkflows_exports = {};
|
|
|
8
8
|
__export(vNextWorkflows_exports, {
|
|
9
9
|
createVNextWorkflowRunHandler: () => createVNextWorkflowRunHandler,
|
|
10
10
|
getVNextWorkflowByIdHandler: () => getVNextWorkflowByIdHandler,
|
|
11
|
-
|
|
11
|
+
getVNextWorkflowRunByIdHandler: () => getVNextWorkflowRunByIdHandler,
|
|
12
12
|
getVNextWorkflowRunsHandler: () => getVNextWorkflowRunsHandler,
|
|
13
13
|
getVNextWorkflowsHandler: () => getVNextWorkflowsHandler,
|
|
14
14
|
resumeAsyncVNextWorkflowHandler: () => resumeAsyncVNextWorkflowHandler,
|
|
@@ -75,7 +75,7 @@ async function getVNextWorkflowByIdHandler({ mastra, workflowId }) {
|
|
|
75
75
|
throw new HTTPException(500, { message: error?.message || "Error getting workflow" });
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
async function
|
|
78
|
+
async function getVNextWorkflowRunByIdHandler({
|
|
79
79
|
mastra,
|
|
80
80
|
workflowId,
|
|
81
81
|
runId
|
|
@@ -91,7 +91,7 @@ async function getVNextWorkflowRunHandler({
|
|
|
91
91
|
if (!workflow) {
|
|
92
92
|
throw new HTTPException(404, { message: "Workflow not found" });
|
|
93
93
|
}
|
|
94
|
-
const run = await workflow.
|
|
94
|
+
const run = await workflow.getWorkflowRunById(runId);
|
|
95
95
|
if (!run) {
|
|
96
96
|
throw new HTTPException(404, { message: "Workflow run not found" });
|
|
97
97
|
}
|
|
@@ -159,7 +159,7 @@ async function startVNextWorkflowRunHandler({
|
|
|
159
159
|
throw new HTTPException(400, { message: "runId required to start run" });
|
|
160
160
|
}
|
|
161
161
|
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
162
|
-
const run = await workflow.
|
|
162
|
+
const run = await workflow.getWorkflowRunById(runId);
|
|
163
163
|
if (!run) {
|
|
164
164
|
throw new HTTPException(404, { message: "Workflow run not found" });
|
|
165
165
|
}
|
|
@@ -186,7 +186,7 @@ async function watchVNextWorkflowHandler({
|
|
|
186
186
|
throw new HTTPException(400, { message: "runId required to watch workflow" });
|
|
187
187
|
}
|
|
188
188
|
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
189
|
-
const run = await workflow.
|
|
189
|
+
const run = await workflow.getWorkflowRunById(runId);
|
|
190
190
|
if (!run) {
|
|
191
191
|
throw new HTTPException(404, { message: "Workflow run not found" });
|
|
192
192
|
}
|
|
@@ -237,7 +237,7 @@ async function resumeAsyncVNextWorkflowHandler({
|
|
|
237
237
|
throw new HTTPException(400, { message: "step required to resume workflow" });
|
|
238
238
|
}
|
|
239
239
|
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
240
|
-
const run = await workflow.
|
|
240
|
+
const run = await workflow.getWorkflowRunById(runId);
|
|
241
241
|
if (!run) {
|
|
242
242
|
throw new HTTPException(404, { message: "Workflow run not found" });
|
|
243
243
|
}
|
|
@@ -270,7 +270,7 @@ async function resumeVNextWorkflowHandler({
|
|
|
270
270
|
throw new HTTPException(400, { message: "step required to resume workflow" });
|
|
271
271
|
}
|
|
272
272
|
const workflow = mastra.vnext_getWorkflow(workflowId);
|
|
273
|
-
const run = await workflow.
|
|
273
|
+
const run = await workflow.getWorkflowRunById(runId);
|
|
274
274
|
if (!run) {
|
|
275
275
|
throw new HTTPException(404, { message: "Workflow run not found" });
|
|
276
276
|
}
|
|
@@ -309,4 +309,4 @@ async function getVNextWorkflowRunsHandler({
|
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
-
export { createVNextWorkflowRunHandler, getVNextWorkflowByIdHandler,
|
|
312
|
+
export { createVNextWorkflowRunHandler, getVNextWorkflowByIdHandler, getVNextWorkflowRunByIdHandler, getVNextWorkflowRunsHandler, getVNextWorkflowsHandler, resumeAsyncVNextWorkflowHandler, resumeVNextWorkflowHandler, startAsyncVNextWorkflowHandler, startVNextWorkflowRunHandler, vNextWorkflows_exports, watchVNextWorkflowHandler };
|
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkM2RXDCPV_cjs = require('../../chunk-M2RXDCPV.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "createVNextWorkflowRunHandler", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkM2RXDCPV_cjs.createVNextWorkflowRunHandler; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "getVNextWorkflowByIdHandler", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkM2RXDCPV_cjs.getVNextWorkflowByIdHandler; }
|
|
14
14
|
});
|
|
15
|
-
Object.defineProperty(exports, "
|
|
15
|
+
Object.defineProperty(exports, "getVNextWorkflowRunByIdHandler", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkM2RXDCPV_cjs.getVNextWorkflowRunByIdHandler; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "getVNextWorkflowRunsHandler", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkM2RXDCPV_cjs.getVNextWorkflowRunsHandler; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "getVNextWorkflowsHandler", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkM2RXDCPV_cjs.getVNextWorkflowsHandler; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "resumeAsyncVNextWorkflowHandler", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkM2RXDCPV_cjs.resumeAsyncVNextWorkflowHandler; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "resumeVNextWorkflowHandler", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkM2RXDCPV_cjs.resumeVNextWorkflowHandler; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "startAsyncVNextWorkflowHandler", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkM2RXDCPV_cjs.startAsyncVNextWorkflowHandler; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "startVNextWorkflowRunHandler", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkM2RXDCPV_cjs.startVNextWorkflowRunHandler; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "watchVNextWorkflowHandler", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkM2RXDCPV_cjs.watchVNextWorkflowHandler; }
|
|
46
46
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { getVNextWorkflowsHandler } from '../../_tsup-dts-rollup.cjs';
|
|
2
2
|
export { getVNextWorkflowByIdHandler } from '../../_tsup-dts-rollup.cjs';
|
|
3
|
-
export {
|
|
3
|
+
export { getVNextWorkflowRunByIdHandler } from '../../_tsup-dts-rollup.cjs';
|
|
4
4
|
export { createVNextWorkflowRunHandler } from '../../_tsup-dts-rollup.cjs';
|
|
5
5
|
export { startAsyncVNextWorkflowHandler } from '../../_tsup-dts-rollup.cjs';
|
|
6
6
|
export { startVNextWorkflowRunHandler } from '../../_tsup-dts-rollup.cjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { getVNextWorkflowsHandler } from '../../_tsup-dts-rollup.js';
|
|
2
2
|
export { getVNextWorkflowByIdHandler } from '../../_tsup-dts-rollup.js';
|
|
3
|
-
export {
|
|
3
|
+
export { getVNextWorkflowRunByIdHandler } from '../../_tsup-dts-rollup.js';
|
|
4
4
|
export { createVNextWorkflowRunHandler } from '../../_tsup-dts-rollup.js';
|
|
5
5
|
export { startAsyncVNextWorkflowHandler } from '../../_tsup-dts-rollup.js';
|
|
6
6
|
export { startVNextWorkflowRunHandler } from '../../_tsup-dts-rollup.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createVNextWorkflowRunHandler, getVNextWorkflowByIdHandler,
|
|
1
|
+
export { createVNextWorkflowRunHandler, getVNextWorkflowByIdHandler, getVNextWorkflowRunByIdHandler, getVNextWorkflowRunsHandler, getVNextWorkflowsHandler, resumeAsyncVNextWorkflowHandler, resumeVNextWorkflowHandler, startAsyncVNextWorkflowHandler, startVNextWorkflowRunHandler, watchVNextWorkflowHandler } from '../../chunk-OWNA6I2H.js';
|
package/dist/server/handlers.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkD3G23FP3_cjs = require('../chunk-D3G23FP3.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkM2RXDCPV_cjs = require('../chunk-M2RXDCPV.cjs');
|
|
5
5
|
var chunkM56ECCHK_cjs = require('../chunk-M56ECCHK.cjs');
|
|
6
6
|
var chunk55HTWX4C_cjs = require('../chunk-55HTWX4C.cjs');
|
|
7
7
|
var chunkCHFORQ7J_cjs = require('../chunk-CHFORQ7J.cjs');
|
|
@@ -19,7 +19,7 @@ Object.defineProperty(exports, "tools", {
|
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "vNextWorkflows", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkM2RXDCPV_cjs.vNextWorkflows_exports; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "vector", {
|
|
25
25
|
enumerable: true,
|
package/dist/server/handlers.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { tools_exports as tools } from '../chunk-5JNVY6DU.js';
|
|
2
|
-
export { vNextWorkflows_exports as vNextWorkflows } from '../chunk-
|
|
2
|
+
export { vNextWorkflows_exports as vNextWorkflows } from '../chunk-OWNA6I2H.js';
|
|
3
3
|
export { vector_exports as vector } from '../chunk-4JINXASC.js';
|
|
4
4
|
export { voice_exports as voice } from '../chunk-Q6SHQECN.js';
|
|
5
5
|
export { workflows_exports as workflows } from '../chunk-3XTEV33Q.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/server",
|
|
3
|
-
"version": "2.0.2
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"license": "Elastic-2.0",
|
|
47
47
|
"dependencies": {},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@mastra/core": "^0.9.2
|
|
49
|
+
"@mastra/core": "^0.9.2"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@ai-sdk/openai": "^1.3.2",
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"tsup": "^8.4.0",
|
|
58
58
|
"typescript": "^5.8.2",
|
|
59
59
|
"vitest": "^2.1.9",
|
|
60
|
-
"zod-to-json-schema": "^3.24.
|
|
61
|
-
"@internal/lint": "0.0.
|
|
62
|
-
"@mastra/core": "0.9.2
|
|
60
|
+
"zod-to-json-schema": "^3.24.5",
|
|
61
|
+
"@internal/lint": "0.0.3",
|
|
62
|
+
"@mastra/core": "0.9.2"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
65
|
"build": "tsup src/index.ts src/server/handlers.ts src/server/handlers/*.ts !src/server/handlers/*.test.ts --format esm,cjs --clean --experimental-dts --treeshake=smallest --splitting",
|