@mastra/playground-ui 7.0.0-beta.1 → 7.0.0-beta.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/CHANGELOG.md +14 -0
- package/dist/index.cjs.js +27 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +27 -8
- package/dist/index.es.js.map +1 -1
- package/dist/src/domains/workflows/context/use-current-run.d.ts +2 -0
- package/dist/src/domains/workflows/workflow/workflow-step-action-bar.d.ts +2 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @mastra/playground-ui
|
|
2
2
|
|
|
3
|
+
## 7.0.0-beta.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Make suspendPayload optional when calling `suspend()` ([#9926](https://github.com/mastra-ai/mastra/pull/9926))
|
|
8
|
+
Save value returned as `suspendOutput` if user returns data still after calling `suspend()`
|
|
9
|
+
Automatically call `commit()` on uncommitted workflows when registering in Mastra instance
|
|
10
|
+
Show actual suspendPayload on Studio in suspend/resume flow
|
|
11
|
+
- Updated dependencies [[`627067b`](https://github.com/mastra-ai/mastra/commit/627067b22eeb26601f65fee3646ba17fc0c91501), [`465ac05`](https://github.com/mastra-ai/mastra/commit/465ac0526a91d175542091c675181f1a96c98c46)]:
|
|
12
|
+
- @mastra/ai-sdk@1.0.0-beta.1
|
|
13
|
+
- @mastra/core@1.0.0-beta.2
|
|
14
|
+
- @mastra/client-js@1.0.0-beta.2
|
|
15
|
+
- @mastra/react@0.1.0-beta.2
|
|
16
|
+
|
|
3
17
|
## 7.0.0-beta.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.cjs.js
CHANGED
|
@@ -4682,6 +4682,8 @@ function convertWorkflowRunStateToStreamResult(runState) {
|
|
|
4682
4682
|
status: result.status,
|
|
4683
4683
|
output: "output" in result ? result.output : void 0,
|
|
4684
4684
|
payload: "payload" in result ? result.payload : void 0,
|
|
4685
|
+
suspendPayload: "suspendPayload" in result ? result.suspendPayload : void 0,
|
|
4686
|
+
suspendOutput: "suspendOutput" in result ? result.suspendOutput : void 0,
|
|
4685
4687
|
resumePayload: "resumePayload" in result ? result.resumePayload : void 0,
|
|
4686
4688
|
error: "error" in result ? result.error : void 0,
|
|
4687
4689
|
startedAt: "startedAt" in result ? result.startedAt : Date.now(),
|
|
@@ -5360,7 +5362,9 @@ const useCurrentRun = () => {
|
|
|
5360
5362
|
status: value.status,
|
|
5361
5363
|
output: "output" in value ? value.output : void 0,
|
|
5362
5364
|
input: value.payload,
|
|
5363
|
-
resumeData: "resumePayload" in value ? value.resumePayload : void 0
|
|
5365
|
+
resumeData: "resumePayload" in value ? value.resumePayload : void 0,
|
|
5366
|
+
suspendOutput: "suspendOutput" in value ? value.suspendOutput : void 0,
|
|
5367
|
+
suspendPayload: "suspendPayload" in value ? value.suspendPayload : void 0
|
|
5364
5368
|
}
|
|
5365
5369
|
};
|
|
5366
5370
|
}, {});
|
|
@@ -5426,6 +5430,7 @@ const WorkflowStepActionBar = ({
|
|
|
5426
5430
|
input,
|
|
5427
5431
|
output,
|
|
5428
5432
|
resumeData,
|
|
5433
|
+
suspendOutput,
|
|
5429
5434
|
error,
|
|
5430
5435
|
mapConfig,
|
|
5431
5436
|
stepName,
|
|
@@ -5486,14 +5491,14 @@ const WorkflowStepActionBar = ({
|
|
|
5486
5491
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(CodeDialogContent, { data: resumeData }) })
|
|
5487
5492
|
] }) })
|
|
5488
5493
|
] }),
|
|
5489
|
-
output && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5494
|
+
(output ?? suspendOutput) && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5490
5495
|
/* @__PURE__ */ jsxRuntime.jsx(Button$1, { onClick: () => setIsOutputOpen(true), children: "Output" }),
|
|
5491
5496
|
/* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: isOutputOpen, onOpenChange: setIsOutputOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: dialogContentClass, children: [
|
|
5492
5497
|
/* @__PURE__ */ jsxRuntime.jsxs(DialogTitle, { className: dialogTitleClass, children: [
|
|
5493
5498
|
stepName,
|
|
5494
5499
|
" output"
|
|
5495
5500
|
] }),
|
|
5496
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(CodeDialogContent, { data: output }) })
|
|
5501
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(CodeDialogContent, { data: output ?? suspendOutput }) })
|
|
5497
5502
|
] }) })
|
|
5498
5503
|
] }),
|
|
5499
5504
|
error && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -5673,7 +5678,7 @@ const Clock = ({ startedAt, endedAt }) => {
|
|
|
5673
5678
|
};
|
|
5674
5679
|
|
|
5675
5680
|
function WorkflowDefaultNode({ data, parentWorkflowName }) {
|
|
5676
|
-
const { steps
|
|
5681
|
+
const { steps } = useCurrentRun();
|
|
5677
5682
|
const {
|
|
5678
5683
|
label,
|
|
5679
5684
|
stepId,
|
|
@@ -5763,6 +5768,7 @@ function WorkflowDefaultNode({ data, parentWorkflowName }) {
|
|
|
5763
5768
|
input: step?.input,
|
|
5764
5769
|
resumeData: step?.resumeData,
|
|
5765
5770
|
output: step?.output,
|
|
5771
|
+
suspendOutput: step?.suspendOutput,
|
|
5766
5772
|
error: step?.error,
|
|
5767
5773
|
mapConfig,
|
|
5768
5774
|
status: step?.status
|
|
@@ -6072,6 +6078,7 @@ function WorkflowNestedNode({ data, parentWorkflowName }) {
|
|
|
6072
6078
|
input: step?.input,
|
|
6073
6079
|
resumeData: step?.resumeData,
|
|
6074
6080
|
output: step?.output,
|
|
6081
|
+
suspendOutput: step?.suspendOutput,
|
|
6075
6082
|
error: step?.error,
|
|
6076
6083
|
mapConfig,
|
|
6077
6084
|
onShowNestedGraph: () => showNestedGraph({ label, fullStep: fullLabel, stepGraph }),
|
|
@@ -7501,10 +7508,10 @@ function WorkflowTrigger({
|
|
|
7501
7508
|
setCancelResponse(response);
|
|
7502
7509
|
};
|
|
7503
7510
|
const streamResultToUse = result ?? streamResult;
|
|
7504
|
-
const suspendedSteps = Object.entries(streamResultToUse?.steps || {}).filter(([_, { status }]) => status === "suspended").map(([stepId, {
|
|
7511
|
+
const suspendedSteps = Object.entries(streamResultToUse?.steps || {}).filter(([_, { status }]) => status === "suspended").map(([stepId, { suspendPayload }]) => ({
|
|
7505
7512
|
stepId,
|
|
7506
7513
|
runId: innerRunId,
|
|
7507
|
-
suspendPayload
|
|
7514
|
+
suspendPayload,
|
|
7508
7515
|
isLoading: false
|
|
7509
7516
|
}));
|
|
7510
7517
|
React.useEffect(() => {
|
|
@@ -7615,11 +7622,23 @@ function WorkflowTrigger({
|
|
|
7615
7622
|
/* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "secondary", className: "px-4 text-mastra-el-3", size: "xs", children: "Status" }),
|
|
7616
7623
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 flex flex-col gap-4", children: Object.entries(workflowActivePaths).filter(([key, _]) => key !== "input" && !key.endsWith(".input")).map(([stepId, step]) => {
|
|
7617
7624
|
const { status } = step;
|
|
7618
|
-
let output =
|
|
7625
|
+
let output = void 0;
|
|
7626
|
+
let suspendOutput = void 0;
|
|
7627
|
+
if (step.status === "suspended") {
|
|
7628
|
+
suspendOutput = step.suspendOutput;
|
|
7629
|
+
}
|
|
7619
7630
|
if (step.status === "success") {
|
|
7620
7631
|
output = step.output;
|
|
7621
7632
|
}
|
|
7622
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7633
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7634
|
+
WorkflowStatus,
|
|
7635
|
+
{
|
|
7636
|
+
stepId,
|
|
7637
|
+
status,
|
|
7638
|
+
result: output ?? suspendOutput ?? {}
|
|
7639
|
+
},
|
|
7640
|
+
stepId
|
|
7641
|
+
);
|
|
7623
7642
|
}) })
|
|
7624
7643
|
] })
|
|
7625
7644
|
] })
|