@mastra/playground-ui 6.1.3 → 6.1.4-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.
@@ -1,7 +1,7 @@
1
1
  export declare function EntryListTextCell({ children, isLoading }: {
2
2
  children: React.ReactNode;
3
3
  isLoading?: boolean;
4
- }): import("react/jsx-runtime").JSX.Element;
4
+ }): import("react/jsx-runtime").JSX.Element | null;
5
5
  export declare function EntryListStatusCell({ status }: {
6
6
  status?: 'success' | 'failed';
7
7
  }): import("react/jsx-runtime").JSX.Element;
@@ -13,6 +13,6 @@ export declare function EntryList({ items: dataItems, selectedItemId, onItemClic
13
13
  perPage?: number;
14
14
  columns?: Column[];
15
15
  searchTerm?: string;
16
- setEndOfListElement: (element: HTMLDivElement | null) => void;
16
+ setEndOfListElement?: (element: HTMLDivElement | null) => void;
17
17
  errorMsg?: string;
18
18
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,6 @@
1
1
  export type SideDialogCodeSectionProps = {
2
2
  title: string;
3
3
  codeStr?: string;
4
+ simplified?: boolean;
4
5
  };
5
- export declare function SideDialogCodeSection({ codeStr, title }: SideDialogCodeSectionProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function SideDialogCodeSection({ codeStr, title, simplified }: SideDialogCodeSectionProps): import("react/jsx-runtime").JSX.Element;
@@ -31,9 +31,6 @@ export interface AgentMetadataToolListProps {
31
31
  computeToolLink: (tool: GetToolResponse) => string;
32
32
  }
33
33
  export declare const AgentMetadataToolList: ({ tools, computeToolLink }: AgentMetadataToolListProps) => import("react/jsx-runtime").JSX.Element;
34
- export declare const AgentMetadataScorerList: ({ entityId }: {
35
- entityId: string;
36
- }) => import("react/jsx-runtime").JSX.Element;
37
34
  export interface AgentMetadataWorkflowListProps {
38
35
  workflows: Array<{
39
36
  id: string;
@@ -1,5 +1,5 @@
1
1
  import { AISpanRecord } from '@mastra/core';
2
- export declare function getTraceInfo(trace: AISpanRecord | undefined): {
2
+ export declare function getTraceInfo(trace: AISpanRecord | undefined, computeAgentsLink?: () => string, computeWorkflowsLink?: () => string): {
3
3
  key: string;
4
4
  label: string;
5
5
  value: any;
@@ -8,6 +8,8 @@ type TraceDialogProps = {
8
8
  onNext?: () => void;
9
9
  onPrevious?: () => void;
10
10
  isLoadingSpans?: boolean;
11
+ computeAgentsLink?: () => string;
12
+ computeWorkflowsLink?: () => string;
11
13
  };
12
- export declare function TraceDialog({ traceId, traceSpans, traceDetails, isOpen, onClose, onNext, onPrevious, isLoadingSpans, }: TraceDialogProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function TraceDialog({ traceId, traceSpans, traceDetails, isOpen, onClose, onNext, onPrevious, isLoadingSpans, computeAgentsLink, computeWorkflowsLink, }: TraceDialogProps): import("react/jsx-runtime").JSX.Element;
13
15
  export {};
@@ -0,0 +1,12 @@
1
+ import { MastraScorer } from '@mastra/core/scores';
2
+ import { ClientScoreRowData } from '@mastra/client-js';
3
+ type ScoreDialogProps = {
4
+ score?: ClientScoreRowData;
5
+ scorer?: MastraScorer;
6
+ isOpen: boolean;
7
+ onClose: () => void;
8
+ onNext?: () => void;
9
+ onPrevious?: () => void;
10
+ };
11
+ export declare function ScoreDialog({ scorer, score, isOpen, onClose, onNext, onPrevious }: ScoreDialogProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -4,5 +4,4 @@ export interface ScorerListProps {
4
4
  entityType: ScoringEntityType;
5
5
  }
6
6
  export declare const ScorerList: ({ entityId, entityType }: ScorerListProps) => import("react/jsx-runtime").JSX.Element;
7
- export declare const EmptyScorerList: () => import("react/jsx-runtime").JSX.Element;
8
7
  export declare const ScorerSkeleton: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ export type ScoreEntityOption = {
2
+ value: string;
3
+ label: string;
4
+ type: 'AGENT' | 'WORKFLOW' | 'ALL';
5
+ };
6
+ type ScoresToolsProps = {
7
+ selectedEntity?: ScoreEntityOption;
8
+ entityOptions?: ScoreEntityOption[];
9
+ onEntityChange: (val: ScoreEntityOption) => void;
10
+ onReset?: () => void;
11
+ isLoading?: boolean;
12
+ };
13
+ export declare function ScoresTools({ onEntityChange, onReset, selectedEntity, entityOptions, isLoading }: ScoresToolsProps): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -1,2 +1,4 @@
1
1
  export * from './components/scorer-list';
2
+ export * from './components/score-dialog';
3
+ export * from './components/scores-tools';
2
4
  export * from './hooks/use-scorers';
@@ -1,12 +1,9 @@
1
- import { WorkflowRun } from '@mastra/core/storage';
2
1
  export interface WorkflowRunsProps {
3
2
  workflowId: string;
4
3
  runId?: string;
5
- isLoading: boolean;
6
- runs: WorkflowRun[];
7
4
  onPressRun: ({ workflowId, runId }: {
8
5
  workflowId: string;
9
6
  runId: string;
10
7
  }) => void;
11
8
  }
12
- export declare const WorkflowRuns: ({ workflowId, runId, isLoading, runs, onPressRun }: WorkflowRunsProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const WorkflowRuns: ({ workflowId, runId, onPressRun }: WorkflowRunsProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1,3 @@
1
1
  export * from './use-in-view';
2
+ export * from './use-workflows';
3
+ export * from './use-workflow-runs';
@@ -14,7 +14,7 @@ export type ExtendedWorkflowWatchResult = WorkflowWatchResult & {
14
14
  stack?: string;
15
15
  } | null;
16
16
  };
17
- export declare const useWorkflow: (workflowId: string) => import('@tanstack/react-query').UseQueryResult<GetWorkflowResponse, Error>;
17
+ export declare const useWorkflow: (workflowId: string, enabled?: boolean) => import('@tanstack/react-query').UseQueryResult<GetWorkflowResponse, Error>;
18
18
  export declare const useLegacyWorkflow: (workflowId: string) => {
19
19
  legacyWorkflow: LegacyWorkflow<import('@mastra/core/workflows/legacy').LegacyStep<string, any, any, import('@mastra/core/workflows/legacy').StepExecutionContext<any, import('@mastra/core/workflows/legacy').WorkflowContext<any, import('@mastra/core/workflows/legacy').LegacyStep<string, any, any, any>[], Record<string, any>>>>[], string, any, any> | null;
20
20
  isLoading: boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mastra/playground-ui",
3
3
  "type": "module",
4
- "version": "6.1.3",
4
+ "version": "6.1.4-alpha.1",
5
5
  "description": "Mastra Playground components",
6
6
  "main": "dist/index.umd.js",
7
7
  "module": "dist/index.es.js",
@@ -85,7 +85,7 @@
85
85
  "react-hook-form": "^7.59.0",
86
86
  "react-markdown": "^9.1.0",
87
87
  "react-resizable-panels": "^2.1.9",
88
- "react-syntax-highlighter": "^15.6.1",
88
+ "react-syntax-highlighter": "^15.6.6",
89
89
  "rehype-stringify": "^10.0.1",
90
90
  "remark-gfm": "^4.0.1",
91
91
  "remark-parse": "^11.0.0",
@@ -93,16 +93,16 @@
93
93
  "shiki": "^1.29.2",
94
94
  "sonner": "^2.0.5",
95
95
  "superjson": "^2.2.2",
96
- "swr": "^2.3.4",
96
+ "swr": "^2.3.6",
97
97
  "tailwindcss-animate": "^1.0.7",
98
98
  "unified": "^11.0.5",
99
99
  "use-debounce": "^10.0.5",
100
100
  "zod": "^4.1.5",
101
101
  "zustand": "^5.0.7",
102
- "@mastra/client-js": "^0.12.3"
102
+ "@mastra/client-js": "^0.12.4-alpha.3"
103
103
  },
104
104
  "peerDependencies": {
105
- "@mastra/core": ">=0.16.3-0 <0.17.0-0",
105
+ "@mastra/core": ">=0.17.0-0 <0.18.0-0",
106
106
  "lucide-react": "^0.474.0",
107
107
  "react": ">=19.0.0",
108
108
  "react-dom": ">=19.0.0",
@@ -110,7 +110,7 @@
110
110
  },
111
111
  "devDependencies": {
112
112
  "@storybook/addon-docs": "^9.1.5",
113
- "@storybook/react-vite": "^9.1.2",
113
+ "@storybook/react-vite": "^9.1.5",
114
114
  "@types/node": "^20.19.0",
115
115
  "@types/react": "^19.1.9",
116
116
  "@types/react-dom": "^19.1.7",
@@ -120,14 +120,14 @@
120
120
  "clsx": "^2.1.1",
121
121
  "postcss": "^8.5.6",
122
122
  "rollup-plugin-node-externals": "^8.0.1",
123
- "storybook": "^9.1.2",
123
+ "storybook": "^9.1.5",
124
124
  "tailwind-merge": "^3.3.1",
125
125
  "tailwindcss": "^3.4.17",
126
126
  "typescript": "^5.8.3",
127
127
  "vite": "^6.3.5",
128
128
  "vite-plugin-dts": "^4.5.4",
129
129
  "vite-plugin-lib-inject-css": "^2.2.2",
130
- "@mastra/core": "0.16.3"
130
+ "@mastra/core": "0.17.0-alpha.3"
131
131
  },
132
132
  "homepage": "https://mastra.ai",
133
133
  "repository": {