@mastra/playground-ui 6.2.4 → 6.3.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 +102 -0
- package/dist/index.cjs.js +312 -1364
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +313 -1362
- package/dist/index.es.js.map +1 -1
- package/dist/src/domains/agents/components/agent-metadata/agent-metadata-model-switcher.d.ts +1 -1
- package/dist/src/domains/workflows/runs/workflow-runs.d.ts +4 -2
- package/dist/src/domains/workflows/workflow/workflow-input-data.d.ts +2 -1
- package/dist/src/domains/workflows/workflow/workflow-trigger.d.ts +8 -7
- package/dist/src/ds/components/Alert/Alert.d.ts +17 -0
- package/dist/src/ds/components/Alert/index.d.ts +1 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/types.d.ts +1 -2
- package/package.json +7 -7
- package/dist/src/components/assistant-ui/network-threads.d.ts +0 -10
- package/dist/src/domains/networks/components/network-table/columns.d.ts +0 -3
- package/dist/src/domains/networks/components/network-table/network-table.d.ts +0 -8
- package/dist/src/domains/networks/components/network-table/types.d.ts +0 -9
- package/dist/src/domains/networks/index.d.ts +0 -3
- package/dist/src/domains/networks/network-context.d.ts +0 -16
- package/dist/src/domains/networks/tool-fallback.d.ts +0 -2
- package/dist/src/domains/networks/v-next/network-chat.d.ts +0 -9
- package/dist/src/domains/networks/v-next/step-dropdown.d.ts +0 -1
- package/dist/src/domains/networks/v-next/tool-fallback.d.ts +0 -0
- package/dist/src/domains/networks/v-next/wrapped-assistant-message.d.ts +0 -5
- package/dist/src/services/vnext-network-chat-provider.d.ts +0 -17
- package/dist/src/services/vnext-network-runtime-provider.d.ts +0 -9
package/dist/src/domains/agents/components/agent-metadata/agent-metadata-model-switcher.d.ts
CHANGED
|
@@ -11,4 +11,4 @@ export interface AgentMetadataModelSwitcherProps {
|
|
|
11
11
|
autoSave?: boolean;
|
|
12
12
|
selectProviderPlaceholder?: string;
|
|
13
13
|
}
|
|
14
|
-
export declare const AgentMetadataModelSwitcher: ({ defaultProvider, defaultModel, updateModel, apiUrl,
|
|
14
|
+
export declare const AgentMetadataModelSwitcher: ({ defaultProvider, defaultModel, updateModel, apiUrl, }: AgentMetadataModelSwitcherProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { WorkflowTriggerProps } from '../workflow/workflow-trigger';
|
|
2
|
+
export interface WorkflowRunsProps extends Omit<WorkflowTriggerProps, 'paramsRunId' | 'workflowId'> {
|
|
2
3
|
workflowId: string;
|
|
3
4
|
runId?: string;
|
|
4
5
|
onPressRun: ({ workflowId, runId }: {
|
|
5
6
|
workflowId: string;
|
|
6
7
|
runId: string;
|
|
7
8
|
}) => void;
|
|
9
|
+
onPressBackToRuns: () => void;
|
|
8
10
|
}
|
|
9
|
-
export declare const WorkflowRuns: ({ workflowId, runId, onPressRun }: WorkflowRunsProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const WorkflowRuns: ({ workflowId, runId, onPressRun, onPressBackToRuns, observeWorkflowStream, ...triggerProps }: WorkflowRunsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,5 +5,6 @@ export interface WorkflowInputDataProps {
|
|
|
5
5
|
isSubmitLoading: boolean;
|
|
6
6
|
submitButtonLabel: string;
|
|
7
7
|
onSubmit: (data: any) => void;
|
|
8
|
+
withoutSubmit?: boolean;
|
|
8
9
|
}
|
|
9
|
-
export declare const WorkflowInputData: ({ schema, defaultValues, isSubmitLoading, submitButtonLabel, onSubmit, }: WorkflowInputDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const WorkflowInputData: ({ schema, defaultValues, withoutSubmit, isSubmitLoading, submitButtonLabel, onSubmit, }: WorkflowInputDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GetWorkflowResponse, WorkflowWatchResult } from '@mastra/client-js';
|
|
2
|
-
interface WorkflowTriggerProps {
|
|
2
|
+
export interface WorkflowTriggerProps {
|
|
3
3
|
workflowId: string;
|
|
4
|
+
paramsRunId?: string;
|
|
4
5
|
setRunId?: (runId: string) => void;
|
|
5
6
|
workflow?: GetWorkflowResponse;
|
|
6
7
|
isLoading?: boolean;
|
|
@@ -17,17 +18,18 @@ interface WorkflowTriggerProps {
|
|
|
17
18
|
inputData: Record<string, unknown>;
|
|
18
19
|
runtimeContext: Record<string, unknown>;
|
|
19
20
|
}) => Promise<void>;
|
|
21
|
+
observeWorkflowStream?: ({ workflowId, runId }: {
|
|
22
|
+
workflowId: string;
|
|
23
|
+
runId: string;
|
|
24
|
+
}) => void;
|
|
20
25
|
resumeWorkflow: ({ workflowId, step, runId, resumeData, runtimeContext, }: {
|
|
21
26
|
workflowId: string;
|
|
22
27
|
step: string | string[];
|
|
23
28
|
runId: string;
|
|
24
29
|
resumeData: Record<string, unknown>;
|
|
25
30
|
runtimeContext: Record<string, unknown>;
|
|
26
|
-
}) => Promise<
|
|
27
|
-
message: string;
|
|
28
|
-
}>;
|
|
31
|
+
}) => Promise<void>;
|
|
29
32
|
streamResult: WorkflowWatchResult | null;
|
|
30
|
-
isResumingWorkflow: boolean;
|
|
31
33
|
isCancellingWorkflowRun: boolean;
|
|
32
34
|
cancelWorkflowRun: ({ workflowId, runId }: {
|
|
33
35
|
workflowId: string;
|
|
@@ -36,5 +38,4 @@ interface WorkflowTriggerProps {
|
|
|
36
38
|
message: string;
|
|
37
39
|
}>;
|
|
38
40
|
}
|
|
39
|
-
export declare function WorkflowTrigger({ workflowId, setRunId, workflow, isLoading, createWorkflowRun, resumeWorkflow, streamWorkflow, isStreamingWorkflow, streamResult,
|
|
40
|
-
export {};
|
|
41
|
+
export declare function WorkflowTrigger({ workflowId, paramsRunId, setRunId, workflow, isLoading, createWorkflowRun, resumeWorkflow, streamWorkflow, observeWorkflowStream, isStreamingWorkflow, streamResult, isCancellingWorkflowRun, cancelWorkflowRun, }: WorkflowTriggerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from '../../../../node_modules/@types/react';
|
|
2
|
+
import { TxtProps } from '../Txt';
|
|
3
|
+
type AlertVariant = 'warning' | 'destructive';
|
|
4
|
+
export interface AlertProps {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
variant: AlertVariant;
|
|
7
|
+
}
|
|
8
|
+
export declare const Alert: ({ children, variant }: AlertProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const AlertTitle: ({ children, as: As }: {
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
as: TxtProps["as"];
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const AlertDescription: ({ children, as: As }: {
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
as: TxtProps["as"];
|
|
16
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Alert';
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from './domains/agents/index';
|
|
2
|
-
export * from './domains/networks/index';
|
|
3
2
|
export * from './domains/scores/index';
|
|
4
3
|
export * from './domains/tools/index';
|
|
5
4
|
export * from './domains/workflows/index';
|
|
@@ -25,6 +24,7 @@ export * from './ds/components/Txt/index';
|
|
|
25
24
|
export * from './ds/components/Entity/index';
|
|
26
25
|
export * from './ds/components/EmptyState/index';
|
|
27
26
|
export * from './ds/icons/index';
|
|
27
|
+
export * from './ds/components/Alert';
|
|
28
28
|
export * from './lib/polls';
|
|
29
29
|
export * from './domains/voice/hooks/use-speech-recognition';
|
|
30
30
|
export * from './components/ui/radio-group';
|
package/dist/src/types.d.ts
CHANGED
|
@@ -35,9 +35,8 @@ export interface ModelSettings {
|
|
|
35
35
|
topP?: number;
|
|
36
36
|
instructions?: string;
|
|
37
37
|
providerOptions?: LLMStepResult['providerMetadata'];
|
|
38
|
+
chatWithGenerateLegacy?: boolean;
|
|
38
39
|
chatWithGenerate?: boolean;
|
|
39
|
-
chatWithGenerateVNext?: boolean;
|
|
40
|
-
chatWithStreamVNext?: boolean;
|
|
41
40
|
chatWithNetwork?: boolean;
|
|
42
41
|
}
|
|
43
42
|
export interface AgentSettingsType {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/playground-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.
|
|
4
|
+
"version": "6.3.0",
|
|
5
5
|
"description": "Mastra Playground components",
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
@@ -75,11 +75,11 @@
|
|
|
75
75
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
76
76
|
"@uiw/codemirror-theme-dracula": "^4.23.14",
|
|
77
77
|
"@uiw/react-codemirror": "^4.23.14",
|
|
78
|
-
"@xyflow/react": "^12.8.
|
|
78
|
+
"@xyflow/react": "^12.8.6",
|
|
79
79
|
"cmdk": "^1.1.1",
|
|
80
80
|
"date-fns": "^4.1.0",
|
|
81
81
|
"json-schema-to-zod": "^2.6.1",
|
|
82
|
-
"motion": "^12.23.
|
|
82
|
+
"motion": "^12.23.22",
|
|
83
83
|
"prettier": "^3.6.2",
|
|
84
84
|
"prism-react-renderer": "^2.4.1",
|
|
85
85
|
"react-code-block": "1.1.3",
|
|
@@ -100,11 +100,11 @@
|
|
|
100
100
|
"use-debounce": "^10.0.6",
|
|
101
101
|
"zod": "^4.1.9",
|
|
102
102
|
"zustand": "^5.0.8",
|
|
103
|
-
"@mastra/react": "0.0.
|
|
104
|
-
"@mastra/client-js": "^0.
|
|
103
|
+
"@mastra/react": "0.0.3",
|
|
104
|
+
"@mastra/client-js": "^0.15.0"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|
|
107
|
-
"@mastra/core": ">=0.
|
|
107
|
+
"@mastra/core": ">=0.20.0-0 <0.21.0-0",
|
|
108
108
|
"lucide-react": "^0.474.0",
|
|
109
109
|
"react": ">=19.0.0",
|
|
110
110
|
"react-dom": ">=19.0.0",
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"vite": "^6.3.6",
|
|
130
130
|
"vite-plugin-dts": "^4.5.4",
|
|
131
131
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
132
|
-
"@mastra/core": "0.
|
|
132
|
+
"@mastra/core": "0.20.0"
|
|
133
133
|
},
|
|
134
134
|
"homepage": "https://mastra.ai",
|
|
135
135
|
"repository": {
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ToolCallMessagePartComponent } from '@assistant-ui/react';
|
|
2
|
-
export interface ThreadProps {
|
|
3
|
-
ToolFallback?: ToolCallMessagePartComponent;
|
|
4
|
-
networkName?: string;
|
|
5
|
-
hasMemory?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare const NetworkThread: ({ ToolFallback, networkName, hasMemory }: ThreadProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export interface ThreadWelcomeProps {
|
|
9
|
-
networkName?: string;
|
|
10
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { GetVNextNetworkResponse } from '@mastra/client-js';
|
|
2
|
-
export interface NetworkTableProps {
|
|
3
|
-
networks: GetVNextNetworkResponse[];
|
|
4
|
-
isLoading: boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare const NetworkTable: ({ networks, isLoading }: NetworkTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export declare const NetworkTableEmpty: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export declare const NetworkTableSkeleton: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from '../../../node_modules/@types/react';
|
|
2
|
-
import { ModelSettings } from '../../types';
|
|
3
|
-
type NetworkContextType = {
|
|
4
|
-
modelSettings: ModelSettings;
|
|
5
|
-
setModelSettings: React.Dispatch<React.SetStateAction<ModelSettings>>;
|
|
6
|
-
resetModelSettings: () => void;
|
|
7
|
-
chatWithLoop: boolean;
|
|
8
|
-
setChatWithLoop: React.Dispatch<React.SetStateAction<boolean>>;
|
|
9
|
-
maxIterations: number | undefined;
|
|
10
|
-
setMaxIterations: React.Dispatch<React.SetStateAction<number | undefined>>;
|
|
11
|
-
};
|
|
12
|
-
export declare const NetworkContext: import('../../../node_modules/@types/react').Context<NetworkContextType>;
|
|
13
|
-
export declare function NetworkProvider({ children }: {
|
|
14
|
-
children: ReactNode;
|
|
15
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Message } from '../../../types';
|
|
2
|
-
export declare const VNextNetworkChat: ({ networkId, networkName, threadId, initialMessages, memory, refreshThreadList, }: {
|
|
3
|
-
networkId: string;
|
|
4
|
-
networkName: string;
|
|
5
|
-
threadId: string;
|
|
6
|
-
initialMessages?: Message[];
|
|
7
|
-
memory?: boolean;
|
|
8
|
-
refreshThreadList?: () => void;
|
|
9
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const StepDropdown: () => import("react/jsx-runtime").JSX.Element;
|
|
File without changes
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { default as React, ReactNode } from '../../node_modules/@types/react';
|
|
2
|
-
type StateValue = {
|
|
3
|
-
executionSteps: Array<string>;
|
|
4
|
-
steps: Record<string, any>;
|
|
5
|
-
runId?: string;
|
|
6
|
-
};
|
|
7
|
-
type State = Record<string, StateValue>;
|
|
8
|
-
type VNextNetworkChatContextType = {
|
|
9
|
-
state: State;
|
|
10
|
-
handleStep: (uuid: string, record: Record<string, any>) => void;
|
|
11
|
-
setState: React.Dispatch<React.SetStateAction<State>>;
|
|
12
|
-
};
|
|
13
|
-
export declare const VNextNetworkChatProvider: ({ children }: {
|
|
14
|
-
children: ReactNode;
|
|
15
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export declare const useVNextNetworkChat: () => VNextNetworkChatContextType;
|
|
17
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from '../../node_modules/@types/react';
|
|
2
|
-
import { ChatProps } from '../types';
|
|
3
|
-
type VNextMastraNetworkRuntimeProviderProps = Omit<ChatProps, 'agentId' | 'agentName' | 'modelSettings'> & {
|
|
4
|
-
networkId: string;
|
|
5
|
-
};
|
|
6
|
-
export declare function VNextMastraNetworkRuntimeProvider({ children, networkId, memory, threadId, refreshThreadList, initialMessages, runtimeContext, }: Readonly<{
|
|
7
|
-
children: ReactNode;
|
|
8
|
-
}> & VNextMastraNetworkRuntimeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|