@mastra/playground-ui 7.0.0-beta.3 → 7.0.0-beta.5
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 +47 -0
- package/dist/index.cjs.js +3193 -2686
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +3310 -2803
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/dynamic-form/index.d.ts +2 -1
- package/dist/src/components/ui/autoform/CustomAutoForm.d.ts +2 -0
- package/dist/src/components/ui/input.d.ts +1 -1
- package/dist/src/domains/workflows/context/workflow-run-context.d.ts +26 -6
- package/dist/src/domains/workflows/hooks/use-workflows-actions.d.ts +5 -0
- package/dist/src/domains/workflows/workflow/workflow-input-data.d.ts +2 -1
- package/dist/src/domains/workflows/workflow/workflow-step-action-bar.d.ts +2 -1
- package/dist/src/domains/workflows/workflow/workflow-time-travel-form.d.ts +5 -0
- package/dist/src/hooks/use-workflow-runs.d.ts +1 -1
- package/dist/src/types.d.ts +2 -2
- package/package.json +12 -11
|
@@ -7,6 +7,7 @@ interface DynamicFormProps<T extends z.ZodSchema> {
|
|
|
7
7
|
submitButtonLabel?: string;
|
|
8
8
|
className?: string;
|
|
9
9
|
readOnly?: boolean;
|
|
10
|
+
children?: React.ReactNode;
|
|
10
11
|
}
|
|
11
|
-
export declare function DynamicForm<T extends z.ZodSchema>({ schema, onSubmit, defaultValues, isSubmitLoading, submitButtonLabel, className, readOnly, }: DynamicFormProps<T>): import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
export declare function DynamicForm<T extends z.ZodSchema>({ schema, onSubmit, defaultValues, isSubmitLoading, submitButtonLabel, className, readOnly, children, }: DynamicFormProps<T>): import("react/jsx-runtime").JSX.Element | null;
|
|
12
13
|
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { AutoFormProps } from '@autoform/react';
|
|
2
|
+
export declare function CustomAutoForm<T extends Record<string, any>>({ schema, onSubmit, defaultValues, values, children, uiComponents, formComponents, withSubmit, onFormInit, formProps, }: AutoFormProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const inputVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "
|
|
4
|
+
variant?: "default" | "unstyled" | "filled" | null | undefined;
|
|
5
5
|
customSize?: "default" | "sm" | "lg" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>, VariantProps<typeof inputVariants> {
|
|
@@ -1,18 +1,38 @@
|
|
|
1
1
|
import { WorkflowRunState, WorkflowStreamResult } from '@mastra/core/workflows';
|
|
2
|
+
import { Dispatch, SetStateAction, ReactNode } from '../../../../node_modules/@types/react';
|
|
3
|
+
import { WorkflowTriggerProps } from '../workflow/workflow-trigger';
|
|
4
|
+
import { TimeTravelParams } from '@mastra/client-js';
|
|
2
5
|
export type WorkflowRunStreamResult = WorkflowStreamResult<any, any, any, any>;
|
|
3
6
|
type WorkflowRunContextType = {
|
|
4
7
|
result: WorkflowRunStreamResult | null;
|
|
5
|
-
setResult:
|
|
8
|
+
setResult: Dispatch<SetStateAction<WorkflowRunStreamResult | null>>;
|
|
6
9
|
payload: any;
|
|
7
|
-
setPayload:
|
|
10
|
+
setPayload: Dispatch<SetStateAction<any>>;
|
|
8
11
|
clearData: () => void;
|
|
9
12
|
snapshot?: WorkflowRunState;
|
|
10
13
|
runId?: string;
|
|
11
|
-
setRunId:
|
|
12
|
-
|
|
14
|
+
setRunId: Dispatch<SetStateAction<string>>;
|
|
15
|
+
workflowError: Error | null;
|
|
16
|
+
observeWorkflowStream?: ({ workflowId, runId, storeRunResult, }: {
|
|
17
|
+
workflowId: string;
|
|
18
|
+
runId: string;
|
|
19
|
+
storeRunResult: WorkflowRunStreamResult | null;
|
|
20
|
+
}) => void;
|
|
21
|
+
closeStreamsAndReset: () => void;
|
|
22
|
+
timeTravelWorkflowStream: (params: {
|
|
23
|
+
workflowId: string;
|
|
24
|
+
requestContext: Record<string, unknown>;
|
|
25
|
+
} & Omit<TimeTravelParams, 'requestContext'>) => Promise<void>;
|
|
26
|
+
runSnapshot?: WorkflowRunState;
|
|
27
|
+
isLoadingRunExecutionResult?: boolean;
|
|
28
|
+
withoutTimeTravel?: boolean;
|
|
29
|
+
} & Omit<WorkflowTriggerProps, 'paramsRunId' | 'setRunId' | 'observeWorkflowStream'>;
|
|
13
30
|
export declare const WorkflowRunContext: import('../../../../node_modules/@types/react').Context<WorkflowRunContextType>;
|
|
14
|
-
export declare function WorkflowRunProvider({ children, snapshot, }: {
|
|
15
|
-
children:
|
|
31
|
+
export declare function WorkflowRunProvider({ children, snapshot, workflowId, initialRunId, withoutTimeTravel, }: {
|
|
32
|
+
children: ReactNode;
|
|
16
33
|
snapshot?: WorkflowRunState;
|
|
34
|
+
workflowId: string;
|
|
35
|
+
initialRunId?: string;
|
|
36
|
+
withoutTimeTravel?: boolean;
|
|
17
37
|
}): import("react/jsx-runtime").JSX.Element;
|
|
18
38
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TimeTravelParams } from '@mastra/client-js';
|
|
1
2
|
import { WorkflowStreamResult as CoreWorkflowStreamResult } from '@mastra/core/workflows';
|
|
2
3
|
export declare const useExecuteWorkflow: () => {
|
|
3
4
|
startWorkflowRun: import('@tanstack/react-query').UseMutationResult<void, Error, {
|
|
@@ -42,6 +43,10 @@ export declare const useStreamWorkflow: () => {
|
|
|
42
43
|
resumeData: Record<string, unknown>;
|
|
43
44
|
requestContext: Record<string, unknown>;
|
|
44
45
|
}, unknown>;
|
|
46
|
+
timeTravelWorkflowStream: import('@tanstack/react-query').UseMutationResult<void, Error, {
|
|
47
|
+
workflowId: string;
|
|
48
|
+
requestContext: Record<string, unknown>;
|
|
49
|
+
} & Omit<TimeTravelParams, "requestContext">, unknown>;
|
|
45
50
|
};
|
|
46
51
|
export declare const useCancelWorkflowRun: () => import('@tanstack/react-query').UseMutationResult<{
|
|
47
52
|
message: string;
|
|
@@ -6,5 +6,6 @@ export interface WorkflowInputDataProps {
|
|
|
6
6
|
submitButtonLabel: string;
|
|
7
7
|
onSubmit: (data: any) => void;
|
|
8
8
|
withoutSubmit?: boolean;
|
|
9
|
+
children?: React.ReactNode;
|
|
9
10
|
}
|
|
10
|
-
export declare const WorkflowInputData: ({ schema, defaultValues, withoutSubmit, isSubmitLoading, submitButtonLabel, onSubmit, }: WorkflowInputDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const WorkflowInputData: ({ schema, defaultValues, withoutSubmit, isSubmitLoading, submitButtonLabel, onSubmit, children, }: WorkflowInputDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,5 +9,6 @@ export interface WorkflowStepActionBarProps {
|
|
|
9
9
|
mapConfig?: string;
|
|
10
10
|
onShowNestedGraph?: () => void;
|
|
11
11
|
status?: 'running' | 'success' | 'failed' | 'suspended' | 'waiting';
|
|
12
|
+
stepKey?: string;
|
|
12
13
|
}
|
|
13
|
-
export declare const WorkflowStepActionBar: ({ input, output, resumeData, suspendOutput, error, mapConfig, stepName, stepId, onShowNestedGraph, status, }: WorkflowStepActionBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const WorkflowStepActionBar: ({ input, output, resumeData, suspendOutput, error, mapConfig, stepName, stepId, onShowNestedGraph, status, stepKey, }: WorkflowStepActionBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const useWorkflowRuns: (workflowId: string, { enabled }?: {
|
|
2
2
|
enabled?: boolean;
|
|
3
3
|
}) => import('@tanstack/react-query').UseQueryResult<import('@mastra/core/storage').WorkflowRuns, Error>;
|
|
4
|
-
export declare const useWorkflowRunExecutionResult: (workflowId: string, runId: string) => import('@tanstack/react-query').UseQueryResult<import('@mastra/core/workflows').WorkflowState, Error>;
|
|
4
|
+
export declare const useWorkflowRunExecutionResult: (workflowId: string, runId: string, refetchInterval?: number) => import('@tanstack/react-query').UseQueryResult<import('@mastra/core/workflows').WorkflowState, Error>;
|
package/dist/src/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GetAgentResponse } from '@mastra/client-js';
|
|
1
|
+
import { GetAgentResponse, UIMessageWithMetadata } from '@mastra/client-js';
|
|
2
2
|
import { AiMessageType } from '@mastra/core/memory';
|
|
3
3
|
import { LLMStepResult } from '@mastra/core/agent';
|
|
4
4
|
import { MastraUIMessage } from '@mastra/react';
|
|
@@ -49,7 +49,7 @@ export interface ChatProps {
|
|
|
49
49
|
modelVersion?: string;
|
|
50
50
|
threadId?: string;
|
|
51
51
|
initialMessages?: MastraUIMessage[];
|
|
52
|
-
initialLegacyMessages?:
|
|
52
|
+
initialLegacyMessages?: UIMessageWithMetadata[];
|
|
53
53
|
memory?: boolean;
|
|
54
54
|
refreshThreadList?: () => void;
|
|
55
55
|
settings?: AgentSettingsType;
|
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.5",
|
|
5
5
|
"description": "Mastra Playground components",
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
@@ -103,8 +103,7 @@
|
|
|
103
103
|
"unified": "^11.0.5",
|
|
104
104
|
"use-debounce": "^10.0.6",
|
|
105
105
|
"zod": "^4.1.12",
|
|
106
|
-
"zustand": "^5.0.8"
|
|
107
|
-
"@mastra/ai-sdk": "^1.0.0-beta.2"
|
|
106
|
+
"zustand": "^5.0.8"
|
|
108
107
|
},
|
|
109
108
|
"peerDependencies": {
|
|
110
109
|
"@mastra/core": ">=1.0.0-0 <2.0.0-0",
|
|
@@ -113,8 +112,9 @@
|
|
|
113
112
|
"react": ">=19.0.0",
|
|
114
113
|
"react-dom": ">=19.0.0",
|
|
115
114
|
"tailwindcss": "^3.0.0",
|
|
116
|
-
"@mastra/client-js": "^1.0.0-beta.
|
|
117
|
-
"@mastra/
|
|
115
|
+
"@mastra/client-js": "^1.0.0-beta.5",
|
|
116
|
+
"@mastra/ai-sdk": "^1.0.0-beta.4",
|
|
117
|
+
"@mastra/react": "0.1.0-beta.5"
|
|
118
118
|
},
|
|
119
119
|
"devDependencies": {
|
|
120
120
|
"@storybook/addon-docs": "^9.1.16",
|
|
@@ -124,8 +124,8 @@
|
|
|
124
124
|
"@types/react": "^19.1.9",
|
|
125
125
|
"@types/react-dom": "^19.1.7",
|
|
126
126
|
"@vitejs/plugin-react": "^5.0.4",
|
|
127
|
-
"@vitest/coverage-v8": "4.0.
|
|
128
|
-
"@vitest/ui": "4.0.
|
|
127
|
+
"@vitest/coverage-v8": "4.0.12",
|
|
128
|
+
"@vitest/ui": "4.0.12",
|
|
129
129
|
"autoprefixer": "^10.4.22",
|
|
130
130
|
"class-variance-authority": "^0.7.1",
|
|
131
131
|
"clsx": "^2.1.1",
|
|
@@ -138,10 +138,11 @@
|
|
|
138
138
|
"vite": "^7.1.9",
|
|
139
139
|
"vite-plugin-dts": "^4.5.4",
|
|
140
140
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
141
|
-
"vitest": "
|
|
142
|
-
"@mastra/
|
|
143
|
-
"@mastra/react": "0.1.0-beta.
|
|
144
|
-
"@mastra/
|
|
141
|
+
"vitest": "4.0.12",
|
|
142
|
+
"@mastra/ai-sdk": "^1.0.0-beta.4",
|
|
143
|
+
"@mastra/react": "0.1.0-beta.5",
|
|
144
|
+
"@mastra/core": "1.0.0-beta.5",
|
|
145
|
+
"@mastra/client-js": "^1.0.0-beta.5"
|
|
145
146
|
},
|
|
146
147
|
"homepage": "https://mastra.ai",
|
|
147
148
|
"repository": {
|