@mastra/deployer 0.10.10-alpha.0 → 0.10.10-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.
|
@@ -737,6 +737,8 @@ export declare function rootHandler(c: Context): Promise<Response & TypedRespons
|
|
|
737
737
|
|
|
738
738
|
export declare function saveMessagesHandler(c: Context): Promise<Response>;
|
|
739
739
|
|
|
740
|
+
export declare function sendWorkflowRunEventHandler(c: Context): Promise<Response>;
|
|
741
|
+
|
|
740
742
|
declare type ServerBundleOptions = {
|
|
741
743
|
playground?: boolean;
|
|
742
744
|
isDev?: boolean;
|
|
@@ -737,6 +737,8 @@ export declare function rootHandler(c: Context): Promise<Response & TypedRespons
|
|
|
737
737
|
|
|
738
738
|
export declare function saveMessagesHandler(c: Context): Promise<Response>;
|
|
739
739
|
|
|
740
|
+
export declare function sendWorkflowRunEventHandler(c: Context): Promise<Response>;
|
|
741
|
+
|
|
740
742
|
declare type ServerBundleOptions = {
|
|
741
743
|
playground?: boolean;
|
|
742
744
|
isDev?: boolean;
|
package/dist/server/index.cjs
CHANGED
|
@@ -4572,6 +4572,24 @@ async function cancelWorkflowRunHandler(c2) {
|
|
|
4572
4572
|
return handleError(error, "Error canceling workflow run");
|
|
4573
4573
|
}
|
|
4574
4574
|
}
|
|
4575
|
+
async function sendWorkflowRunEventHandler(c2) {
|
|
4576
|
+
try {
|
|
4577
|
+
const mastra = c2.get("mastra");
|
|
4578
|
+
const workflowId = c2.req.param("workflowId");
|
|
4579
|
+
const runId = c2.req.param("runId");
|
|
4580
|
+
const { event, data } = await c2.req.json();
|
|
4581
|
+
const result = await workflows.sendWorkflowRunEventHandler({
|
|
4582
|
+
mastra,
|
|
4583
|
+
workflowId,
|
|
4584
|
+
runId,
|
|
4585
|
+
event,
|
|
4586
|
+
data
|
|
4587
|
+
});
|
|
4588
|
+
return c2.json(result);
|
|
4589
|
+
} catch (error) {
|
|
4590
|
+
return handleError(error, "Error sending workflow run event");
|
|
4591
|
+
}
|
|
4592
|
+
}
|
|
4575
4593
|
|
|
4576
4594
|
// src/server/welcome.ts
|
|
4577
4595
|
var html2 = `
|
|
@@ -7737,6 +7755,41 @@ ${err.stack.split("\n").slice(1).join("\n")}
|
|
|
7737
7755
|
}),
|
|
7738
7756
|
cancelWorkflowRunHandler
|
|
7739
7757
|
);
|
|
7758
|
+
app.post(
|
|
7759
|
+
"/api/workflows/:workflowId/runs/:runId/send-event",
|
|
7760
|
+
w({
|
|
7761
|
+
description: "Send an event to a workflow run",
|
|
7762
|
+
parameters: [
|
|
7763
|
+
{
|
|
7764
|
+
name: "workflowId",
|
|
7765
|
+
in: "path",
|
|
7766
|
+
required: true,
|
|
7767
|
+
schema: { type: "string" }
|
|
7768
|
+
},
|
|
7769
|
+
{
|
|
7770
|
+
name: "runId",
|
|
7771
|
+
in: "path",
|
|
7772
|
+
required: true,
|
|
7773
|
+
schema: { type: "string" }
|
|
7774
|
+
}
|
|
7775
|
+
],
|
|
7776
|
+
requestBody: {
|
|
7777
|
+
required: true,
|
|
7778
|
+
content: {
|
|
7779
|
+
"application/json": {
|
|
7780
|
+
schema: { type: "object", properties: { event: { type: "string" }, data: { type: "object" } } }
|
|
7781
|
+
}
|
|
7782
|
+
}
|
|
7783
|
+
},
|
|
7784
|
+
tags: ["workflows"],
|
|
7785
|
+
responses: {
|
|
7786
|
+
200: {
|
|
7787
|
+
description: "workflow run event sent"
|
|
7788
|
+
}
|
|
7789
|
+
}
|
|
7790
|
+
}),
|
|
7791
|
+
sendWorkflowRunEventHandler
|
|
7792
|
+
);
|
|
7740
7793
|
app.get(
|
|
7741
7794
|
"/api/logs",
|
|
7742
7795
|
w({
|
package/dist/server/index.js
CHANGED
|
@@ -32,7 +32,7 @@ import { executeAgentToolHandler as executeAgentToolHandler$1, getToolsHandler a
|
|
|
32
32
|
import { upsertVectors as upsertVectors$1, createIndex as createIndex$1, queryVectors as queryVectors$1, listIndexes as listIndexes$1, describeIndex as describeIndex$1, deleteIndex as deleteIndex$1 } from '@mastra/server/handlers/vector';
|
|
33
33
|
import { getVNextNetworksHandler as getVNextNetworksHandler$1, getVNextNetworkByIdHandler as getVNextNetworkByIdHandler$1, generateVNextNetworkHandler as generateVNextNetworkHandler$1, loopVNextNetworkHandler as loopVNextNetworkHandler$1, loopStreamVNextNetworkHandler as loopStreamVNextNetworkHandler$1, streamGenerateVNextNetworkHandler as streamGenerateVNextNetworkHandler$1 } from '@mastra/server/handlers/vNextNetwork';
|
|
34
34
|
import { getSpeakersHandler as getSpeakersHandler$1, generateSpeechHandler, getListenerHandler as getListenerHandler$1, transcribeSpeechHandler } from '@mastra/server/handlers/voice';
|
|
35
|
-
import { getWorkflowsHandler as getWorkflowsHandler$1, getWorkflowByIdHandler as getWorkflowByIdHandler$1, getWorkflowRunsHandler as getWorkflowRunsHandler$1, getWorkflowRunExecutionResultHandler as getWorkflowRunExecutionResultHandler$1, getWorkflowRunByIdHandler as getWorkflowRunByIdHandler$1, resumeWorkflowHandler as resumeWorkflowHandler$1, resumeAsyncWorkflowHandler as resumeAsyncWorkflowHandler$1, streamWorkflowHandler as streamWorkflowHandler$1, createWorkflowRunHandler as createWorkflowRunHandler$1, startAsyncWorkflowHandler as startAsyncWorkflowHandler$1, startWorkflowRunHandler as startWorkflowRunHandler$1, watchWorkflowHandler as watchWorkflowHandler$1, cancelWorkflowRunHandler as cancelWorkflowRunHandler$1 } from '@mastra/server/handlers/workflows';
|
|
35
|
+
import { getWorkflowsHandler as getWorkflowsHandler$1, getWorkflowByIdHandler as getWorkflowByIdHandler$1, getWorkflowRunsHandler as getWorkflowRunsHandler$1, getWorkflowRunExecutionResultHandler as getWorkflowRunExecutionResultHandler$1, getWorkflowRunByIdHandler as getWorkflowRunByIdHandler$1, resumeWorkflowHandler as resumeWorkflowHandler$1, resumeAsyncWorkflowHandler as resumeAsyncWorkflowHandler$1, streamWorkflowHandler as streamWorkflowHandler$1, createWorkflowRunHandler as createWorkflowRunHandler$1, startAsyncWorkflowHandler as startAsyncWorkflowHandler$1, startWorkflowRunHandler as startWorkflowRunHandler$1, watchWorkflowHandler as watchWorkflowHandler$1, cancelWorkflowRunHandler as cancelWorkflowRunHandler$1, sendWorkflowRunEventHandler as sendWorkflowRunEventHandler$1 } from '@mastra/server/handlers/workflows';
|
|
36
36
|
|
|
37
37
|
// src/server/index.ts
|
|
38
38
|
var RequestError = class extends Error {
|
|
@@ -4565,6 +4565,24 @@ async function cancelWorkflowRunHandler(c2) {
|
|
|
4565
4565
|
return handleError(error, "Error canceling workflow run");
|
|
4566
4566
|
}
|
|
4567
4567
|
}
|
|
4568
|
+
async function sendWorkflowRunEventHandler(c2) {
|
|
4569
|
+
try {
|
|
4570
|
+
const mastra = c2.get("mastra");
|
|
4571
|
+
const workflowId = c2.req.param("workflowId");
|
|
4572
|
+
const runId = c2.req.param("runId");
|
|
4573
|
+
const { event, data } = await c2.req.json();
|
|
4574
|
+
const result = await sendWorkflowRunEventHandler$1({
|
|
4575
|
+
mastra,
|
|
4576
|
+
workflowId,
|
|
4577
|
+
runId,
|
|
4578
|
+
event,
|
|
4579
|
+
data
|
|
4580
|
+
});
|
|
4581
|
+
return c2.json(result);
|
|
4582
|
+
} catch (error) {
|
|
4583
|
+
return handleError(error, "Error sending workflow run event");
|
|
4584
|
+
}
|
|
4585
|
+
}
|
|
4568
4586
|
|
|
4569
4587
|
// src/server/welcome.ts
|
|
4570
4588
|
var html2 = `
|
|
@@ -7730,6 +7748,41 @@ ${err.stack.split("\n").slice(1).join("\n")}
|
|
|
7730
7748
|
}),
|
|
7731
7749
|
cancelWorkflowRunHandler
|
|
7732
7750
|
);
|
|
7751
|
+
app.post(
|
|
7752
|
+
"/api/workflows/:workflowId/runs/:runId/send-event",
|
|
7753
|
+
w({
|
|
7754
|
+
description: "Send an event to a workflow run",
|
|
7755
|
+
parameters: [
|
|
7756
|
+
{
|
|
7757
|
+
name: "workflowId",
|
|
7758
|
+
in: "path",
|
|
7759
|
+
required: true,
|
|
7760
|
+
schema: { type: "string" }
|
|
7761
|
+
},
|
|
7762
|
+
{
|
|
7763
|
+
name: "runId",
|
|
7764
|
+
in: "path",
|
|
7765
|
+
required: true,
|
|
7766
|
+
schema: { type: "string" }
|
|
7767
|
+
}
|
|
7768
|
+
],
|
|
7769
|
+
requestBody: {
|
|
7770
|
+
required: true,
|
|
7771
|
+
content: {
|
|
7772
|
+
"application/json": {
|
|
7773
|
+
schema: { type: "object", properties: { event: { type: "string" }, data: { type: "object" } } }
|
|
7774
|
+
}
|
|
7775
|
+
}
|
|
7776
|
+
},
|
|
7777
|
+
tags: ["workflows"],
|
|
7778
|
+
responses: {
|
|
7779
|
+
200: {
|
|
7780
|
+
description: "workflow run event sent"
|
|
7781
|
+
}
|
|
7782
|
+
}
|
|
7783
|
+
}),
|
|
7784
|
+
sendWorkflowRunEventHandler
|
|
7785
|
+
);
|
|
7733
7786
|
app.get(
|
|
7734
7787
|
"/api/logs",
|
|
7735
7788
|
w({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/deployer",
|
|
3
|
-
"version": "0.10.10-alpha.
|
|
3
|
+
"version": "0.10.10-alpha.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"rollup-plugin-node-externals": "^8.0.1",
|
|
109
109
|
"typescript-paths": "^1.5.1",
|
|
110
110
|
"zod": "^3.25.67",
|
|
111
|
-
"@mastra/server": "^0.10.10-alpha.
|
|
111
|
+
"@mastra/server": "^0.10.10-alpha.1"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@hono/node-server": "^1.14.4",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"typescript": "^5.8.3",
|
|
129
129
|
"vitest": "^3.2.4",
|
|
130
130
|
"@internal/lint": "0.0.16",
|
|
131
|
-
"@mastra/core": "0.10.10-alpha.
|
|
131
|
+
"@mastra/core": "0.10.10-alpha.1",
|
|
132
132
|
"@mastra/mcp": "^0.10.5"
|
|
133
133
|
},
|
|
134
134
|
"peerDependencies": {
|