@mastra/playground-ui 6.5.0 → 6.5.1-alpha.0
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 +11 -0
- package/dist/index.cjs.js +70 -52
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +70 -52
- package/dist/index.es.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/package.json +8 -6
package/dist/index.es.js
CHANGED
|
@@ -5411,6 +5411,9 @@ function WorkflowConditionNode({ data }) {
|
|
|
5411
5411
|
/* @__PURE__ */ jsxs(
|
|
5412
5412
|
"div",
|
|
5413
5413
|
{
|
|
5414
|
+
"data-workflow-node": true,
|
|
5415
|
+
"data-workflow-step-status": previousStep?.status,
|
|
5416
|
+
"data-testid": "workflow-condition-node",
|
|
5414
5417
|
className: cn(
|
|
5415
5418
|
"bg-surface3 rounded-lg w-[300px] border-sm border-border1",
|
|
5416
5419
|
previousStep?.status === "success" && nextStep && "bg-accent1Darker",
|
|
@@ -5548,6 +5551,9 @@ function WorkflowDefaultNode({
|
|
|
5548
5551
|
/* @__PURE__ */ jsxs(
|
|
5549
5552
|
"div",
|
|
5550
5553
|
{
|
|
5554
|
+
"data-workflow-node": true,
|
|
5555
|
+
"data-workflow-step-status": step?.status ?? "idle",
|
|
5556
|
+
"data-testid": "workflow-default-node",
|
|
5551
5557
|
className: cn(
|
|
5552
5558
|
"bg-surface3 rounded-lg w-[274px] border-sm border-border1 pt-2",
|
|
5553
5559
|
step?.status === "success" && "bg-accent1Darker",
|
|
@@ -5653,14 +5659,23 @@ function WorkflowAfterNode({ data }) {
|
|
|
5653
5659
|
|
|
5654
5660
|
function WorkflowLoopResultNode({ data }) {
|
|
5655
5661
|
const { result } = data;
|
|
5656
|
-
return /* @__PURE__ */ jsxs(
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5662
|
+
return /* @__PURE__ */ jsxs(
|
|
5663
|
+
"div",
|
|
5664
|
+
{
|
|
5665
|
+
"data-testid": "workflow-loop-result-node",
|
|
5666
|
+
"data-workflow-step-status": result ? "success" : "failed",
|
|
5667
|
+
className: cn("bg-mastra-bg-8 rounded-md w-[274px]"),
|
|
5668
|
+
"data-workflow-node": true,
|
|
5669
|
+
children: [
|
|
5670
|
+
/* @__PURE__ */ jsx(Handle, { type: "target", position: Position.Top, style: { visibility: "hidden" } }),
|
|
5671
|
+
/* @__PURE__ */ jsx("div", { className: "p-2", children: /* @__PURE__ */ jsxs("div", { className: "text-sm bg-mastra-bg-9 flex items-center gap-[6px] rounded-sm p-2", children: [
|
|
5672
|
+
result ? /* @__PURE__ */ jsx(CircleCheck, { className: "text-current w-4 h-4" }) : /* @__PURE__ */ jsx(CircleX, { className: "text-current w-4 h-4" }),
|
|
5673
|
+
/* @__PURE__ */ jsx(Text, { size: "xs", weight: "medium", className: "text-mastra-el-6 capitalize", children: String(result) })
|
|
5674
|
+
] }) }),
|
|
5675
|
+
/* @__PURE__ */ jsx(Handle, { type: "source", position: Position.Bottom, style: { visibility: "hidden" } })
|
|
5676
|
+
]
|
|
5677
|
+
}
|
|
5678
|
+
);
|
|
5664
5679
|
}
|
|
5665
5680
|
|
|
5666
5681
|
function Spinner({ color = "#fff", className }) {
|
|
@@ -5884,6 +5899,9 @@ function WorkflowNestedNode({
|
|
|
5884
5899
|
/* @__PURE__ */ jsxs(
|
|
5885
5900
|
"div",
|
|
5886
5901
|
{
|
|
5902
|
+
"data-testid": "workflow-nested-node",
|
|
5903
|
+
"data-workflow-node": true,
|
|
5904
|
+
"data-workflow-step-status": step?.status,
|
|
5887
5905
|
className: cn(
|
|
5888
5906
|
"bg-surface3 rounded-lg w-[274px] border-sm border-border1 pt-2",
|
|
5889
5907
|
step?.status === "success" && "bg-accent1Darker",
|
|
@@ -7166,7 +7184,7 @@ function WorkflowTrigger({
|
|
|
7166
7184
|
const stepSchema = stepDefinition?.resumeSchema ? resolveSerializedZodOutput(jsonSchemaToZod(parse(stepDefinition.resumeSchema))) : z.record(z.string(), z.any());
|
|
7167
7185
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col px-4", children: [
|
|
7168
7186
|
/* @__PURE__ */ jsx(Text, { variant: "secondary", className: "text-mastra-el-3", size: "xs", children: step.stepId }),
|
|
7169
|
-
step.suspendPayload && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
7187
|
+
step.suspendPayload && /* @__PURE__ */ jsx("div", { "data-testid": "suspended-payload", children: /* @__PURE__ */ jsx(
|
|
7170
7188
|
CodeBlockDemo,
|
|
7171
7189
|
{
|
|
7172
7190
|
className: "w-full overflow-x-auto p-2",
|
|
@@ -7179,7 +7197,7 @@ function WorkflowTrigger({
|
|
|
7179
7197
|
{
|
|
7180
7198
|
schema: stepSchema,
|
|
7181
7199
|
isSubmitLoading: isStreamingWorkflow,
|
|
7182
|
-
submitButtonLabel: "Resume",
|
|
7200
|
+
submitButtonLabel: "Resume workflow",
|
|
7183
7201
|
onSubmit: (data) => {
|
|
7184
7202
|
const stepIds = step.stepId?.split(".");
|
|
7185
7203
|
handleResumeWorkflow({
|
|
@@ -17594,6 +17612,48 @@ const parseError = (error) => {
|
|
|
17594
17612
|
}
|
|
17595
17613
|
};
|
|
17596
17614
|
|
|
17615
|
+
const WorkflowRunList = ({ workflowId, runId }) => {
|
|
17616
|
+
const { Link, paths } = useLinkComponent();
|
|
17617
|
+
const { isLoading, data: runs } = useWorkflowRuns(workflowId);
|
|
17618
|
+
const actualRuns = runs?.runs || [];
|
|
17619
|
+
if (isLoading) {
|
|
17620
|
+
return /* @__PURE__ */ jsx("div", { className: "p-4", children: /* @__PURE__ */ jsx(Skeleton, { className: "h-[600px]" }) });
|
|
17621
|
+
}
|
|
17622
|
+
return /* @__PURE__ */ jsx("div", { className: "overflow-y-auto h-full w-full", children: /* @__PURE__ */ jsx(Threads, { children: /* @__PURE__ */ jsxs(ThreadList, { children: [
|
|
17623
|
+
/* @__PURE__ */ jsx(ThreadItem, { children: /* @__PURE__ */ jsx(ThreadLink, { as: Link, to: paths.workflowLink(workflowId), children: /* @__PURE__ */ jsxs("span", { className: "text-accent1 flex items-center gap-4", children: [
|
|
17624
|
+
/* @__PURE__ */ jsx(Icon, { className: "bg-surface4 rounded-lg", size: "lg", children: /* @__PURE__ */ jsx(Plus, {}) }),
|
|
17625
|
+
"New workflow run"
|
|
17626
|
+
] }) }) }),
|
|
17627
|
+
actualRuns.length === 0 && /* @__PURE__ */ jsx(Txt, { variant: "ui-md", className: "text-icon3 py-3 px-5", children: "Your run history will appear here once you run the workflow" }),
|
|
17628
|
+
actualRuns.map((run) => /* @__PURE__ */ jsx(ThreadItem, { isActive: run.runId === runId, className: "h-auto", children: /* @__PURE__ */ jsxs(ThreadLink, { as: Link, to: paths.workflowRunLink(workflowId, run.runId), children: [
|
|
17629
|
+
typeof run?.snapshot === "object" && /* @__PURE__ */ jsx("div", { className: "pb-1", children: /* @__PURE__ */ jsx(WorkflowRunStatusBadge, { status: run.snapshot.status }) }),
|
|
17630
|
+
/* @__PURE__ */ jsx("span", { className: "truncate max-w-[14rem] text-muted-foreground", children: run.runId }),
|
|
17631
|
+
/* @__PURE__ */ jsx("span", { children: typeof run?.snapshot === "string" ? "" : run?.snapshot?.timestamp ? formatDate(run?.snapshot?.timestamp, "MMM d, yyyy h:mm a") : "" })
|
|
17632
|
+
] }) }, run.runId))
|
|
17633
|
+
] }) }) });
|
|
17634
|
+
};
|
|
17635
|
+
const WorkflowRunStatusBadge = ({ status }) => {
|
|
17636
|
+
if (status === "running") {
|
|
17637
|
+
return /* @__PURE__ */ jsx(Badge$1, { variant: "default", icon: /* @__PURE__ */ jsx(Spinner, {}), children: status });
|
|
17638
|
+
}
|
|
17639
|
+
if (status === "failed") {
|
|
17640
|
+
return /* @__PURE__ */ jsx(Badge$1, { variant: "default", icon: /* @__PURE__ */ jsx(X, { className: "text-accent2" }), children: status });
|
|
17641
|
+
}
|
|
17642
|
+
if (status === "canceled") {
|
|
17643
|
+
return /* @__PURE__ */ jsx(Badge$1, { variant: "default", icon: /* @__PURE__ */ jsx(CircleSlash, { className: "text-icon3" }), children: status });
|
|
17644
|
+
}
|
|
17645
|
+
if (status === "pending" || status === "waiting") {
|
|
17646
|
+
return /* @__PURE__ */ jsx(Badge$1, { variant: "default", icon: /* @__PURE__ */ jsx(Clock$1, { className: "text-icon3" }), children: status });
|
|
17647
|
+
}
|
|
17648
|
+
if (status === "suspended") {
|
|
17649
|
+
return /* @__PURE__ */ jsx(Badge$1, { variant: "default", icon: /* @__PURE__ */ jsx(CirclePause, { className: "text-accent3" }), children: status });
|
|
17650
|
+
}
|
|
17651
|
+
if (status === "success") {
|
|
17652
|
+
return /* @__PURE__ */ jsx(Badge$1, { variant: "default", icon: /* @__PURE__ */ jsx(Check, { className: "text-accent1" }), children: status });
|
|
17653
|
+
}
|
|
17654
|
+
return /* @__PURE__ */ jsx(Badge$1, { variant: "default", children: status });
|
|
17655
|
+
};
|
|
17656
|
+
|
|
17597
17657
|
const useMCPServerTools = (selectedServer) => {
|
|
17598
17658
|
const client = useMastraClient();
|
|
17599
17659
|
return useQuery({
|
|
@@ -17722,47 +17782,5 @@ const EmptyMCPTable = () => /* @__PURE__ */ jsx("div", { className: "flex h-full
|
|
|
17722
17782
|
}
|
|
17723
17783
|
) });
|
|
17724
17784
|
|
|
17725
|
-
const WorkflowRunList = ({ workflowId, runId }) => {
|
|
17726
|
-
const { Link, paths } = useLinkComponent();
|
|
17727
|
-
const { isLoading, data: runs } = useWorkflowRuns(workflowId);
|
|
17728
|
-
const actualRuns = runs?.runs || [];
|
|
17729
|
-
if (isLoading) {
|
|
17730
|
-
return /* @__PURE__ */ jsx("div", { className: "p-4", children: /* @__PURE__ */ jsx(Skeleton, { className: "h-[600px]" }) });
|
|
17731
|
-
}
|
|
17732
|
-
return /* @__PURE__ */ jsx("div", { className: "overflow-y-auto h-full w-full", children: /* @__PURE__ */ jsx(Threads, { children: /* @__PURE__ */ jsxs(ThreadList, { children: [
|
|
17733
|
-
/* @__PURE__ */ jsx(ThreadItem, { children: /* @__PURE__ */ jsx(ThreadLink, { as: Link, to: paths.workflowLink(workflowId), children: /* @__PURE__ */ jsxs("span", { className: "text-accent1 flex items-center gap-4", children: [
|
|
17734
|
-
/* @__PURE__ */ jsx(Icon, { className: "bg-surface4 rounded-lg", size: "lg", children: /* @__PURE__ */ jsx(Plus, {}) }),
|
|
17735
|
-
"New workflow run"
|
|
17736
|
-
] }) }) }),
|
|
17737
|
-
actualRuns.length === 0 && /* @__PURE__ */ jsx(Txt, { variant: "ui-md", className: "text-icon3 py-3 px-5", children: "Your run history will appear here once you run the workflow" }),
|
|
17738
|
-
actualRuns.map((run) => /* @__PURE__ */ jsx(ThreadItem, { isActive: run.runId === runId, className: "h-auto", children: /* @__PURE__ */ jsxs(ThreadLink, { as: Link, to: paths.workflowRunLink(workflowId, run.runId), children: [
|
|
17739
|
-
typeof run?.snapshot === "object" && /* @__PURE__ */ jsx("div", { className: "pb-1", children: /* @__PURE__ */ jsx(WorkflowRunStatusBadge, { status: run.snapshot.status }) }),
|
|
17740
|
-
/* @__PURE__ */ jsx("span", { className: "truncate max-w-[14rem] text-muted-foreground", children: run.runId }),
|
|
17741
|
-
/* @__PURE__ */ jsx("span", { children: typeof run?.snapshot === "string" ? "" : run?.snapshot?.timestamp ? formatDate(run?.snapshot?.timestamp, "MMM d, yyyy h:mm a") : "" })
|
|
17742
|
-
] }) }, run.runId))
|
|
17743
|
-
] }) }) });
|
|
17744
|
-
};
|
|
17745
|
-
const WorkflowRunStatusBadge = ({ status }) => {
|
|
17746
|
-
if (status === "running") {
|
|
17747
|
-
return /* @__PURE__ */ jsx(Badge$1, { variant: "default", icon: /* @__PURE__ */ jsx(Spinner, {}), children: status });
|
|
17748
|
-
}
|
|
17749
|
-
if (status === "failed") {
|
|
17750
|
-
return /* @__PURE__ */ jsx(Badge$1, { variant: "default", icon: /* @__PURE__ */ jsx(X, { className: "text-accent2" }), children: status });
|
|
17751
|
-
}
|
|
17752
|
-
if (status === "canceled") {
|
|
17753
|
-
return /* @__PURE__ */ jsx(Badge$1, { variant: "default", icon: /* @__PURE__ */ jsx(CircleSlash, { className: "text-icon3" }), children: status });
|
|
17754
|
-
}
|
|
17755
|
-
if (status === "pending" || status === "waiting") {
|
|
17756
|
-
return /* @__PURE__ */ jsx(Badge$1, { variant: "default", icon: /* @__PURE__ */ jsx(Clock$1, { className: "text-icon3" }), children: status });
|
|
17757
|
-
}
|
|
17758
|
-
if (status === "suspended") {
|
|
17759
|
-
return /* @__PURE__ */ jsx(Badge$1, { variant: "default", icon: /* @__PURE__ */ jsx(CirclePause, { className: "text-accent3" }), children: status });
|
|
17760
|
-
}
|
|
17761
|
-
if (status === "success") {
|
|
17762
|
-
return /* @__PURE__ */ jsx(Badge$1, { variant: "default", icon: /* @__PURE__ */ jsx(Check, { className: "text-accent1" }), children: status });
|
|
17763
|
-
}
|
|
17764
|
-
return /* @__PURE__ */ jsx(Badge$1, { variant: "default", children: status });
|
|
17765
|
-
};
|
|
17766
|
-
|
|
17767
17785
|
export { AgentChat, AgentCoinIcon, AgentEntityHeader, AgentEvals, AgentIcon, AgentMetadata, AgentMetadataList, AgentMetadataListEmpty, AgentMetadataListItem, AgentMetadataNetworkList, AgentMetadataPrompt, AgentMetadataScorerList, AgentMetadataSection, AgentMetadataToolList, AgentMetadataWorkflowList, AgentMetadataWrapper, AgentNetworkCoinIcon, AgentSettings, AgentSettingsContext, AgentSettingsProvider, AgentsTable, AiIcon, Alert$1 as Alert, AlertDescription$1 as AlertDescription, AlertDialog, AlertTitle$1 as AlertTitle, ApiIcon, Badge$1 as Badge, BranchIcon, Breadcrumb, Button$1 as Button, ButtonsGroup, Cell, ChatThreads, CheckIcon, ChevronIcon, Collapsible, CollapsibleContent, CollapsibleTrigger, CommitIcon, CrossIcon, Crumb, DarkLogo, DateTimeCell, DateTimePicker, DateTimePickerContent, DbIcon, DebugIcon, DefaultTrigger, DeploymentIcon, DividerIcon, DocsIcon, DynamicForm, EmptyState, Entity, EntityContent, EntityDescription, EntityHeader, EntityIcon, EntityMainHeader, EntityName, Entry, EntryCell, EntryList, EntryListSkeleton, EnvIcon, EvaluatorCoinIcon, FiltersIcon, FolderIcon, FormActions, GithubCoinIcon, GithubIcon, GoogleIcon, Header, HeaderAction, HeaderGroup, HeaderTitle, HomeIcon, Icon, InfoIcon, InputField, JudgeIcon, Kbd, KeyValueList, LatencyIcon, LinkComponentProvider, LogsIcon, MCPTable, MainContentContent, MainContentLayout, MainSidebar, MainSidebarProvider, MastraResizablePanel, McpCoinIcon, McpServerIcon, MemoryIcon, MemorySearch, ModelResetProvider, Notification, OpenAIIcon, PageHeader, PlaygroundQueryClient, PlaygroundTabs, PromptIcon, RadioGroup, RadioGroupField, RadioGroupItem, RepoIcon, Row, RuntimeContext, RuntimeContextWrapper, ScoreDialog, ScoreIcon, ScorersTable, ScoresList, ScoresTools, SearchField, Searchbar, SearchbarWrapper, Section, Sections, SelectField, SettingsIcon, SideDialog, SlashIcon, SliderField, SpanScoreList, SpanScoring, SpanTabs, Tab$1 as Tab, TabContent$1 as TabContent, TabList$1 as TabList, Table$1 as Table, Tbody, TemplateFailure, TemplateForm, TemplateInfo, TemplateInstallation, TemplateSuccess, TemplatesList, TemplatesTools, TextAndIcon, TextareaField, Th, Thead, ThreadDeleteButton, ThreadInputProvider, ThreadItem, ThreadLink, ThreadList, Threads, ToolCoinIcon, ToolFallback, ToolTable, ToolsIcon, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TraceDialog, TraceIcon, TraceTimeline, TraceTimelineLegend, TraceTimelineSpan, TracesList, TracesTools, TracesView, TracesViewSkeleton, TsIcon, Txt, TxtCell, UnitCell, VariablesIcon, WorkflowCoinIcon, WorkflowGraph, WorkflowIcon, WorkflowRunContext, WorkflowRunDetail, WorkflowRunList, WorkflowRunProvider, WorkflowTable, WorkflowTrigger, WorkingMemoryContext, WorkingMemoryProvider, allowedAiSpanAttributes, cleanString, convertWorkflowRunStateToStreamResult, extractPrompt, formatDuration, formatHierarchicalSpans, formatOtelTimestamp, formatOtelTimestamp2, getColumnTemplate, getShortId, getSpanTypeUi, getToNextEntryFn, getToPreviousEntryFn, parseError, providerMapToIcon, scoresListColumns, spanTypePrefixes, traceScoresListColumns, tracesListColumns, transformKey, useAgentSettings, useCurrentRun, useInView, useLinkComponent, useMCPServerTools, useMainSidebar, useModelReset, usePlaygroundStore, usePolling, useScorer, useScorers, useScoresByEntityId, useScoresByScorerId, useSpeechRecognition, useThreadInput, useTraceSpanScores, useWorkflow, useWorkflowRuns, useWorkingMemory };
|
|
17768
17786
|
//# sourceMappingURL=index.es.js.map
|