@mastra/playground-ui 7.0.0-beta.11 → 7.0.0-beta.14
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 +95 -0
- package/dist/index.cjs.js +707 -493
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +705 -494
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/assistant-ui/tools/badges/tool-badge.d.ts +2 -1
- package/dist/src/components/assistant-ui/tools/badges/workflow-badge.d.ts +2 -1
- package/dist/src/components/ui/playground-tabs.d.ts +2 -1
- package/dist/src/components/ui/searchbar.d.ts +2 -1
- package/dist/src/domains/agents/components/agent-metadata/agent-metadata-model-list.d.ts +1 -0
- package/dist/src/domains/observability/components/trace-span-usage.d.ts +3 -0
- package/dist/src/domains/workflows/components/workflow-step-detail.d.ts +4 -0
- package/dist/src/domains/workflows/context/workflow-run-context.d.ts +1 -0
- package/dist/src/domains/workflows/context/workflow-step-detail-context.d.ts +34 -0
- package/dist/src/domains/workflows/hooks/use-workflows-actions.d.ts +1 -0
- package/dist/src/domains/workflows/index.d.ts +1 -0
- package/dist/src/domains/workflows/workflow/workflow-code-dialog-content.d.ts +2 -1
- package/dist/src/hooks/use-workflow-runs.d.ts +1 -1
- package/dist/src/types.d.ts +1 -0
- package/package.json +11 -10
|
@@ -8,5 +8,6 @@ export interface ToolBadgeProps extends Omit<ToolApprovalButtonsProps, 'toolCall
|
|
|
8
8
|
toolOutput: Array<{
|
|
9
9
|
toolId: string;
|
|
10
10
|
}>;
|
|
11
|
+
suspendPayload?: any;
|
|
11
12
|
}
|
|
12
|
-
export declare const ToolBadge: ({ toolName, args, result, metadata, toolOutput, toolCallId, toolApprovalMetadata, }: ToolBadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const ToolBadge: ({ toolName, args, result, metadata, toolOutput, toolCallId, toolApprovalMetadata, suspendPayload, }: ToolBadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,6 +6,7 @@ export interface WorkflowBadgeProps extends Omit<ToolApprovalButtonsProps, 'tool
|
|
|
6
6
|
result?: any;
|
|
7
7
|
isStreaming?: boolean;
|
|
8
8
|
metadata?: MastraUIMessage['metadata'];
|
|
9
|
+
suspendPayload?: any;
|
|
9
10
|
}
|
|
10
|
-
export declare const WorkflowBadge: ({ result, workflowId, isStreaming, metadata, toolCallId, toolApprovalMetadata, }: WorkflowBadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const WorkflowBadge: ({ result, workflowId, isStreaming, metadata, toolCallId, toolApprovalMetadata, suspendPayload, }: WorkflowBadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export declare const useWorkflowStream: (workflowFullState?: WorkflowRunStreamResult) => void;
|
|
@@ -15,8 +15,9 @@ export interface TabProps {
|
|
|
15
15
|
children: React.ReactNode;
|
|
16
16
|
value: string;
|
|
17
17
|
onClick?: () => void;
|
|
18
|
+
onClose?: () => void;
|
|
18
19
|
}
|
|
19
|
-
export declare const Tab: ({ children, value, onClick }: TabProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const Tab: ({ children, value, onClick, onClose }: TabProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
21
|
export interface TabContentProps {
|
|
21
22
|
children: React.ReactNode;
|
|
22
23
|
value: string;
|
|
@@ -2,8 +2,9 @@ export interface SearchbarProps {
|
|
|
2
2
|
onSearch: (search: string) => void;
|
|
3
3
|
label: string;
|
|
4
4
|
placeholder: string;
|
|
5
|
+
debounceMs?: number;
|
|
5
6
|
}
|
|
6
|
-
export declare const Searchbar: ({ onSearch, label, placeholder }: SearchbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const Searchbar: ({ onSearch, label, placeholder, debounceMs }: SearchbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export declare const SearchbarWrapper: ({ children }: {
|
|
8
9
|
children: React.ReactNode;
|
|
9
10
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { InputTokenDetails, OutputTokenDetails } from '@mastra/core/observability';
|
|
1
2
|
import { SpanRecord } from '@mastra/core/storage';
|
|
2
3
|
type V5TokenUsage = {
|
|
3
4
|
inputTokens: number;
|
|
@@ -5,6 +6,8 @@ type V5TokenUsage = {
|
|
|
5
6
|
reasoningTokens?: number;
|
|
6
7
|
cachedInputTokens?: number;
|
|
7
8
|
totalTokens: number;
|
|
9
|
+
inputDetails?: InputTokenDetails;
|
|
10
|
+
outputDetails?: OutputTokenDetails;
|
|
8
11
|
};
|
|
9
12
|
type LegacyTokenUsage = {
|
|
10
13
|
promptTokens: number;
|
|
@@ -22,6 +22,7 @@ type WorkflowRunContextType = {
|
|
|
22
22
|
timeTravelWorkflowStream: (params: {
|
|
23
23
|
workflowId: string;
|
|
24
24
|
requestContext: Record<string, unknown>;
|
|
25
|
+
runId: string;
|
|
25
26
|
} & Omit<TimeTravelParams, 'requestContext'>) => Promise<void>;
|
|
26
27
|
runSnapshot?: WorkflowRunState;
|
|
27
28
|
isLoadingRunExecutionResult?: boolean;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SerializedStepFlowEntry } from '@mastra/core/workflows';
|
|
2
|
+
import { ReactNode } from '../../../../node_modules/@types/react';
|
|
3
|
+
export type StepDetailType = 'map-config' | 'nested-graph' | null;
|
|
4
|
+
export type StepDetailData = {
|
|
5
|
+
type: StepDetailType;
|
|
6
|
+
stepName: string;
|
|
7
|
+
stepId?: string;
|
|
8
|
+
mapConfig?: string;
|
|
9
|
+
nestedGraph?: {
|
|
10
|
+
label: string;
|
|
11
|
+
stepGraph: SerializedStepFlowEntry[];
|
|
12
|
+
fullStep: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
type WorkflowStepDetailContextType = {
|
|
16
|
+
stepDetail: StepDetailData | null;
|
|
17
|
+
showMapConfig: (params: {
|
|
18
|
+
stepName: string;
|
|
19
|
+
stepId?: string;
|
|
20
|
+
mapConfig: string;
|
|
21
|
+
}) => void;
|
|
22
|
+
showNestedGraph: (params: {
|
|
23
|
+
label: string;
|
|
24
|
+
stepGraph: SerializedStepFlowEntry[];
|
|
25
|
+
fullStep: string;
|
|
26
|
+
}) => void;
|
|
27
|
+
closeStepDetail: () => void;
|
|
28
|
+
};
|
|
29
|
+
export declare const WorkflowStepDetailContext: import('../../../../node_modules/@types/react').Context<WorkflowStepDetailContextType | null>;
|
|
30
|
+
export declare function useWorkflowStepDetail(): WorkflowStepDetailContextType;
|
|
31
|
+
export declare function WorkflowStepDetailProvider({ children }: {
|
|
32
|
+
children: ReactNode;
|
|
33
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export {};
|
|
@@ -44,6 +44,7 @@ export declare const useStreamWorkflow: () => {
|
|
|
44
44
|
requestContext: Record<string, unknown>;
|
|
45
45
|
}, unknown>;
|
|
46
46
|
timeTravelWorkflowStream: import('@tanstack/react-query').UseMutationResult<void, Error, {
|
|
47
|
+
runId: string;
|
|
47
48
|
workflowId: string;
|
|
48
49
|
requestContext: Record<string, unknown>;
|
|
49
50
|
} & Omit<TimeTravelParams, "requestContext">, unknown>;
|
|
@@ -217,7 +217,7 @@ export declare const useWorkflowRuns: (workflowId: string, { enabled }?: {
|
|
|
217
217
|
fetchStatus: import('@tanstack/react-query').FetchStatus;
|
|
218
218
|
promise: Promise<import('@mastra/core/storage').WorkflowRun[]>;
|
|
219
219
|
};
|
|
220
|
-
export declare const useWorkflowRunExecutionResult: (workflowId: string, runId: string, refetchInterval?: number) => import('@tanstack/react-query').UseQueryResult<import('@mastra/core/workflows').WorkflowState
|
|
220
|
+
export declare const useWorkflowRunExecutionResult: (workflowId: string, runId: string, refetchInterval?: number) => import('@tanstack/react-query').UseQueryResult<Partial<import('@mastra/core/workflows').WorkflowState>, Error>;
|
|
221
221
|
export declare const useDeleteWorkflowRun: (workflowId: string) => import('@tanstack/react-query').UseMutationResult<{
|
|
222
222
|
message: string;
|
|
223
223
|
}, Error, {
|
package/dist/src/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/playground-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.0.0-beta.
|
|
4
|
+
"version": "7.0.0-beta.14",
|
|
5
5
|
"description": "Mastra Playground components",
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"@autoform/core": "^3.0.0",
|
|
46
46
|
"@autoform/react": "^4.0.0",
|
|
47
47
|
"@autoform/zod": "^4.0.0",
|
|
48
|
+
"@codemirror/lang-javascript": "^6.2.2",
|
|
48
49
|
"@codemirror/lang-json": "^6.0.2",
|
|
49
50
|
"@codemirror/lang-markdown": "^6.5.0",
|
|
50
51
|
"@codemirror/language-data": "^6.5.2",
|
|
@@ -111,10 +112,10 @@
|
|
|
111
112
|
"react": ">=19.0.0",
|
|
112
113
|
"react-dom": ">=19.0.0",
|
|
113
114
|
"tailwindcss": "^3.0.0",
|
|
114
|
-
"@mastra/
|
|
115
|
-
"@mastra/react": "0.1.0-beta.
|
|
116
|
-
"@mastra/
|
|
117
|
-
"@mastra/schema-compat": "1.0.0-beta.
|
|
115
|
+
"@mastra/ai-sdk": "^1.0.0-beta.10",
|
|
116
|
+
"@mastra/react": "0.1.0-beta.14",
|
|
117
|
+
"@mastra/client-js": "^1.0.0-beta.14",
|
|
118
|
+
"@mastra/schema-compat": "1.0.0-beta.3"
|
|
118
119
|
},
|
|
119
120
|
"devDependencies": {
|
|
120
121
|
"@storybook/addon-docs": "^9.1.16",
|
|
@@ -139,11 +140,11 @@
|
|
|
139
140
|
"vite-plugin-dts": "^4.5.4",
|
|
140
141
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
141
142
|
"vitest": "4.0.12",
|
|
142
|
-
"@mastra/
|
|
143
|
-
"@mastra/
|
|
144
|
-
"@mastra/
|
|
145
|
-
"@mastra/schema-compat": "1.0.0-beta.
|
|
146
|
-
"@mastra/
|
|
143
|
+
"@mastra/ai-sdk": "^1.0.0-beta.10",
|
|
144
|
+
"@mastra/client-js": "^1.0.0-beta.14",
|
|
145
|
+
"@mastra/core": "1.0.0-beta.14",
|
|
146
|
+
"@mastra/schema-compat": "1.0.0-beta.3",
|
|
147
|
+
"@mastra/react": "0.1.0-beta.14"
|
|
147
148
|
},
|
|
148
149
|
"homepage": "https://mastra.ai",
|
|
149
150
|
"repository": {
|