@mastra/playground-ui 6.9.0 → 7.0.0-beta.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 +260 -89
- package/dist/index.cjs.js +1746 -3032
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1580 -2862
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/assistant-ui/memory-search.d.ts +1 -1
- package/dist/src/components/assistant-ui/messages/user-messages.d.ts +0 -1
- package/dist/src/components/assistant-ui/tooltip-icon-button.d.ts +6 -1
- package/dist/src/components/ui/button.d.ts +8 -3
- package/dist/src/components/ui/combobox.d.ts +17 -0
- package/dist/src/components/ui/resizable.d.ts +1 -1
- package/dist/src/domains/agents/components/agent-combobox.d.ts +12 -0
- package/dist/src/domains/agents/components/agent-information/agent-instructions-enhancer.d.ts +2 -4
- package/dist/src/domains/agents/components/agent-metadata/agent-metadata-model-switcher.d.ts +1 -2
- package/dist/src/domains/agents/components/agent-metadata/agent-metadata.d.ts +1 -3
- package/dist/src/domains/agents/components/agent-metadata/index.d.ts +0 -1
- package/dist/src/domains/agents/components/{runtime-context.d.ts → request-context.d.ts} +2 -2
- package/dist/src/domains/agents/context/agent-context.d.ts +2 -1
- package/dist/src/domains/agents/context/agent-prompt-experiment-context.d.ts +15 -0
- package/dist/src/domains/agents/context/index.d.ts +1 -0
- package/dist/src/domains/agents/hooks/use-agent-settings-state.d.ts +2 -1
- package/dist/src/domains/agents/hooks/use-agents-model-providers.d.ts +1 -0
- package/dist/src/domains/agents/hooks/use-execute-agent-tool.d.ts +1 -1
- package/dist/src/domains/agents/hooks/use-prompt-enhancer.d.ts +5 -13
- package/dist/src/domains/agents/index.d.ts +2 -2
- package/dist/src/domains/mcps/components/mcp-server-combobox.d.ts +12 -0
- package/dist/src/domains/mcps/index.d.ts +1 -0
- package/dist/src/domains/memory/hooks/use-memory.d.ts +8 -9
- package/dist/src/domains/observability/components/helpers.d.ts +3 -3
- package/dist/src/domains/observability/components/span-details.d.ts +2 -2
- package/dist/src/domains/observability/components/span-dialog.d.ts +5 -5
- package/dist/src/domains/observability/components/span-score-list.d.ts +2 -2
- package/dist/src/domains/observability/components/span-tabs.d.ts +5 -5
- package/dist/src/domains/observability/components/trace-dialog.d.ts +3 -3
- package/dist/src/domains/observability/components/trace-span-usage.d.ts +2 -2
- package/dist/src/domains/observability/components/trace-timeline-legend.d.ts +2 -2
- package/dist/src/domains/observability/components/traces-list.d.ts +3 -3
- package/dist/src/domains/observability/utils/format-hierarchical-spans.d.ts +2 -2
- package/dist/src/domains/scores/components/score-dialog.d.ts +1 -1
- package/dist/src/domains/scores/components/scorer-combobox.d.ts +12 -0
- package/dist/src/domains/scores/hooks/use-scorers.d.ts +4 -3
- package/dist/src/domains/scores/hooks/use-trace-span-scores.d.ts +1 -1
- package/dist/src/domains/scores/index.d.ts +1 -0
- package/dist/src/domains/tools/components/index.d.ts +1 -0
- package/dist/src/domains/tools/components/tool-combobox.d.ts +12 -0
- package/dist/src/domains/tools/hooks/use-all-tools.d.ts +3 -1
- package/dist/src/domains/tools/hooks/use-execute-tool.d.ts +1 -1
- package/dist/src/domains/workflows/components/workflow-combobox.d.ts +12 -0
- package/dist/src/domains/workflows/components/workflow-information.d.ts +5 -0
- package/dist/src/domains/workflows/context/workflow-nested-graph-context.d.ts +1 -7
- package/dist/src/domains/workflows/hooks/use-workflows-actions.d.ts +4 -19
- package/dist/src/domains/workflows/index.d.ts +2 -0
- package/dist/src/domains/workflows/workflow/workflow-default-node.d.ts +1 -8
- package/dist/src/domains/workflows/workflow/workflow-graph-inner.d.ts +1 -7
- package/dist/src/domains/workflows/workflow/workflow-graph.d.ts +1 -7
- package/dist/src/domains/workflows/workflow/workflow-nested-graph.d.ts +1 -7
- package/dist/src/domains/workflows/workflow/workflow-nested-node.d.ts +1 -8
- package/dist/src/domains/workflows/workflow/workflow-step-action-bar.d.ts +1 -6
- package/dist/src/domains/workflows/workflow/workflow-trigger.d.ts +4 -4
- package/dist/src/ds/components/Alert/Alert.d.ts +1 -1
- package/dist/src/ds/components/Breadcrumb/Breadcrumb.d.ts +2 -1
- package/dist/src/ds/components/Logo/MastraLogo.d.ts +1 -1
- package/dist/src/ds/components/TraceTree/Span.d.ts +1 -3
- package/dist/src/ds/icons/index.d.ts +0 -2
- package/dist/src/hooks/use-agent-messages.d.ts +1 -1
- package/dist/src/hooks/use-workflow-runs.d.ts +2 -1
- package/dist/src/index.d.ts +1 -3
- package/dist/src/lib/pagination/types.d.ts +4 -4
- package/dist/src/services/mastra-runtime-provider.d.ts +1 -1
- package/dist/src/store/playground-store.d.ts +2 -2
- package/dist/src/types/memory.d.ts +0 -7
- package/dist/src/types.d.ts +1 -3
- package/package.json +17 -17
- package/dist/src/domains/agents/components/agent-evals.d.ts +0 -8
- package/dist/src/domains/agents/components/agent-information/current-instructions.d.ts +0 -15
- package/dist/src/domains/agents/components/agent-information/version-actions.d.ts +0 -8
- package/dist/src/domains/agents/components/agent-information/version-history-dialog.d.ts +0 -9
- package/dist/src/domains/agents/components/agent-information/version-history.d.ts +0 -10
- package/dist/src/domains/agents/components/agent-information/version-item.d.ts +0 -14
- package/dist/src/domains/agents/components/agent-metadata/agent-metadata-prompt.d.ts +0 -4
- package/dist/src/domains/agents/hooks/use-prompt-versions.d.ts +0 -12
- package/dist/src/domains/evals/hooks/index.d.ts +0 -1
- package/dist/src/domains/evals/hooks/use-evals-by-agent-id.d.ts +0 -14
- package/dist/src/domains/evals/index.d.ts +0 -1
- package/dist/src/domains/evals/types.d.ts +0 -23
- package/dist/src/domains/traces/components/traces-table.d.ts +0 -8
- package/dist/src/domains/traces/components/traces-view.d.ts +0 -12
- package/dist/src/domains/traces/context/trace-context.d.ts +0 -20
- package/dist/src/domains/traces/hooks/use-open-trace.d.ts +0 -4
- package/dist/src/domains/traces/index.d.ts +0 -2
- package/dist/src/domains/traces/mock-data.d.ts +0 -1356
- package/dist/src/domains/traces/trace-details.d.ts +0 -1
- package/dist/src/domains/traces/trace-span-details.d.ts +0 -1
- package/dist/src/domains/traces/trace-span-view.d.ts +0 -5
- package/dist/src/domains/traces/traces-sidebar.d.ts +0 -6
- package/dist/src/domains/traces/types.d.ts +0 -55
- package/dist/src/domains/traces/utils/createSpanTree.d.ts +0 -2
- package/dist/src/domains/traces/utils/getSpanVariant.d.ts +0 -3
- package/dist/src/domains/traces/utils.d.ts +0 -12
- package/dist/src/domains/workflows/workflow/workflow-run-event-form.d.ts +0 -12
- package/dist/src/ds/icons/EvaluatorCoinIcon.d.ts +0 -2
- package/dist/src/ds/icons/ScoreIcon.d.ts +0 -2
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
import { WorkflowWatchResult } from '@mastra/client-js';
|
|
2
1
|
import { WorkflowStreamResult as CoreWorkflowStreamResult } from '@mastra/core/workflows';
|
|
3
|
-
export type ExtendedWorkflowWatchResult = WorkflowWatchResult & {
|
|
4
|
-
sanitizedOutput?: string | null;
|
|
5
|
-
sanitizedError?: {
|
|
6
|
-
message: string;
|
|
7
|
-
stack?: string;
|
|
8
|
-
} | null;
|
|
9
|
-
};
|
|
10
2
|
export declare const useExecuteWorkflow: () => {
|
|
11
3
|
startWorkflowRun: import('@tanstack/react-query').UseMutationResult<void, Error, {
|
|
12
4
|
workflowId: string;
|
|
13
5
|
runId: string;
|
|
14
6
|
input: Record<string, unknown>;
|
|
15
|
-
|
|
7
|
+
requestContext: Record<string, unknown>;
|
|
16
8
|
}, unknown>;
|
|
17
9
|
createWorkflowRun: import('@tanstack/react-query').UseMutationResult<{
|
|
18
10
|
runId: string;
|
|
@@ -24,7 +16,7 @@ export declare const useExecuteWorkflow: () => {
|
|
|
24
16
|
workflowId: string;
|
|
25
17
|
runId?: string;
|
|
26
18
|
input: Record<string, unknown>;
|
|
27
|
-
|
|
19
|
+
requestContext: Record<string, unknown>;
|
|
28
20
|
}, unknown>;
|
|
29
21
|
};
|
|
30
22
|
type WorkflowStreamResult = CoreWorkflowStreamResult<any, any, any, any>;
|
|
@@ -33,7 +25,7 @@ export declare const useStreamWorkflow: () => {
|
|
|
33
25
|
workflowId: string;
|
|
34
26
|
runId: string;
|
|
35
27
|
inputData: Record<string, unknown>;
|
|
36
|
-
|
|
28
|
+
requestContext: Record<string, unknown>;
|
|
37
29
|
}, unknown>;
|
|
38
30
|
streamResult: WorkflowStreamResult;
|
|
39
31
|
isStreaming: boolean;
|
|
@@ -48,7 +40,7 @@ export declare const useStreamWorkflow: () => {
|
|
|
48
40
|
step: string | string[];
|
|
49
41
|
runId: string;
|
|
50
42
|
resumeData: Record<string, unknown>;
|
|
51
|
-
|
|
43
|
+
requestContext: Record<string, unknown>;
|
|
52
44
|
}, unknown>;
|
|
53
45
|
};
|
|
54
46
|
export declare const useCancelWorkflowRun: () => import('@tanstack/react-query').UseMutationResult<{
|
|
@@ -57,11 +49,4 @@ export declare const useCancelWorkflowRun: () => import('@tanstack/react-query')
|
|
|
57
49
|
workflowId: string;
|
|
58
50
|
runId: string;
|
|
59
51
|
}, unknown>;
|
|
60
|
-
export declare const useSendWorkflowRunEvent: (workflowId: string) => import('@tanstack/react-query').UseMutationResult<{
|
|
61
|
-
message: string;
|
|
62
|
-
}, Error, {
|
|
63
|
-
runId: string;
|
|
64
|
-
event: string;
|
|
65
|
-
data: unknown;
|
|
66
|
-
}, unknown>;
|
|
67
52
|
export {};
|
|
@@ -4,5 +4,7 @@ export * from './workflow/workflow-trigger';
|
|
|
4
4
|
export * from './context/use-current-run';
|
|
5
5
|
export * from './runs/workflow-run-details';
|
|
6
6
|
export * from './components/workflow-table/workflow-table';
|
|
7
|
+
export * from './components/workflow-information';
|
|
8
|
+
export * from './components/workflow-combobox';
|
|
7
9
|
export * from './utils';
|
|
8
10
|
export * from './hooks';
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
import { NodeProps, Node } from '@xyflow/react';
|
|
2
|
-
import { WorkflowSendEventFormProps } from './workflow-run-event-form';
|
|
3
2
|
export type DefaultNode = Node<{
|
|
4
3
|
label: string;
|
|
5
4
|
description?: string;
|
|
6
5
|
withoutTopHandle?: boolean;
|
|
7
6
|
withoutBottomHandle?: boolean;
|
|
8
7
|
mapConfig?: string;
|
|
9
|
-
event?: string;
|
|
10
8
|
duration?: number;
|
|
11
9
|
date?: Date;
|
|
12
10
|
}, 'default-node'>;
|
|
13
11
|
export interface WorkflowDefaultNodeProps {
|
|
14
|
-
onShowTrace?: ({ runId, stepName }: {
|
|
15
|
-
runId: string;
|
|
16
|
-
stepName: string;
|
|
17
|
-
}) => void;
|
|
18
|
-
onSendEvent?: WorkflowSendEventFormProps['onSendEvent'];
|
|
19
12
|
parentWorkflowName?: string;
|
|
20
13
|
}
|
|
21
|
-
export declare function WorkflowDefaultNode({ data,
|
|
14
|
+
export declare function WorkflowDefaultNode({ data, parentWorkflowName }: NodeProps<DefaultNode> & WorkflowDefaultNodeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { GetWorkflowResponse } from '@mastra/client-js';
|
|
2
|
-
import { WorkflowSendEventFormProps } from './workflow-run-event-form';
|
|
3
2
|
export interface WorkflowGraphInnerProps {
|
|
4
3
|
workflow: {
|
|
5
4
|
stepGraph: GetWorkflowResponse['stepGraph'];
|
|
6
5
|
};
|
|
7
|
-
onShowTrace?: ({ runId, stepName }: {
|
|
8
|
-
runId: string;
|
|
9
|
-
stepName: string;
|
|
10
|
-
}) => void;
|
|
11
|
-
onSendEvent?: WorkflowSendEventFormProps['onSendEvent'];
|
|
12
6
|
}
|
|
13
|
-
export declare function WorkflowGraphInner({ workflow
|
|
7
|
+
export declare function WorkflowGraphInner({ workflow }: WorkflowGraphInnerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { GetWorkflowResponse } from '@mastra/client-js';
|
|
2
|
-
import { WorkflowSendEventFormProps } from './workflow-run-event-form';
|
|
3
2
|
export interface WorkflowGraphProps {
|
|
4
3
|
workflowId: string;
|
|
5
4
|
isLoading?: boolean;
|
|
6
5
|
workflow?: GetWorkflowResponse;
|
|
7
|
-
onShowTrace?: ({ runId, stepName }: {
|
|
8
|
-
runId: string;
|
|
9
|
-
stepName: string;
|
|
10
|
-
}) => void;
|
|
11
|
-
onSendEvent?: WorkflowSendEventFormProps['onSendEvent'];
|
|
12
6
|
}
|
|
13
|
-
export declare function WorkflowGraph({ workflowId,
|
|
7
|
+
export declare function WorkflowGraph({ workflowId, workflow, isLoading }: WorkflowGraphProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { SerializedStepFlowEntry } from '@mastra/core/workflows';
|
|
2
|
-
import { WorkflowSendEventFormProps } from './workflow-run-event-form';
|
|
3
2
|
export interface WorkflowNestedGraphProps {
|
|
4
3
|
stepGraph: SerializedStepFlowEntry[];
|
|
5
4
|
open: boolean;
|
|
6
5
|
workflowName: string;
|
|
7
|
-
onShowTrace?: ({ runId, stepName }: {
|
|
8
|
-
runId: string;
|
|
9
|
-
stepName: string;
|
|
10
|
-
}) => void;
|
|
11
|
-
onSendEvent?: WorkflowSendEventFormProps['onSendEvent'];
|
|
12
6
|
}
|
|
13
|
-
export declare function WorkflowNestedGraph({ stepGraph, open, workflowName
|
|
7
|
+
export declare function WorkflowNestedGraph({ stepGraph, open, workflowName }: WorkflowNestedGraphProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { NodeProps, Node } from '@xyflow/react';
|
|
2
2
|
import { SerializedStepFlowEntry } from '@mastra/core/workflows';
|
|
3
|
-
import { WorkflowSendEventFormProps } from './workflow-run-event-form';
|
|
4
3
|
export type NestedNode = Node<{
|
|
5
4
|
label: string;
|
|
6
5
|
description?: string;
|
|
@@ -8,14 +7,8 @@ export type NestedNode = Node<{
|
|
|
8
7
|
withoutBottomHandle?: boolean;
|
|
9
8
|
stepGraph: SerializedStepFlowEntry[];
|
|
10
9
|
mapConfig?: string;
|
|
11
|
-
event?: string;
|
|
12
10
|
}, 'nested-node'>;
|
|
13
11
|
export interface WorkflowNestedNodeProps {
|
|
14
|
-
onShowTrace?: ({ runId, stepName }: {
|
|
15
|
-
runId: string;
|
|
16
|
-
stepName: string;
|
|
17
|
-
}) => void;
|
|
18
|
-
onSendEvent?: WorkflowSendEventFormProps['onSendEvent'];
|
|
19
12
|
parentWorkflowName?: string;
|
|
20
13
|
}
|
|
21
|
-
export declare function WorkflowNestedNode({ data, parentWorkflowName
|
|
14
|
+
export declare function WorkflowNestedNode({ data, parentWorkflowName }: NodeProps<NestedNode> & WorkflowNestedNodeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { WorkflowSendEventFormProps } from './workflow-run-event-form';
|
|
2
1
|
export interface WorkflowStepActionBarProps {
|
|
3
2
|
input?: any;
|
|
4
3
|
output?: any;
|
|
@@ -6,11 +5,7 @@ export interface WorkflowStepActionBarProps {
|
|
|
6
5
|
error?: any;
|
|
7
6
|
stepName: string;
|
|
8
7
|
mapConfig?: string;
|
|
9
|
-
event?: string;
|
|
10
|
-
onShowTrace?: () => void;
|
|
11
8
|
onShowNestedGraph?: () => void;
|
|
12
|
-
onSendEvent?: WorkflowSendEventFormProps['onSendEvent'];
|
|
13
|
-
runId?: string;
|
|
14
9
|
status?: 'running' | 'success' | 'failed' | 'suspended' | 'waiting';
|
|
15
10
|
}
|
|
16
|
-
export declare const WorkflowStepActionBar: ({ input, output, resumeData, error, mapConfig, stepName,
|
|
11
|
+
export declare const WorkflowStepActionBar: ({ input, output, resumeData, error, mapConfig, stepName, onShowNestedGraph, status, }: WorkflowStepActionBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,22 +13,22 @@ export interface WorkflowTriggerProps {
|
|
|
13
13
|
runId: string;
|
|
14
14
|
}>;
|
|
15
15
|
isStreamingWorkflow: boolean;
|
|
16
|
-
streamWorkflow: ({ workflowId, runId, inputData,
|
|
16
|
+
streamWorkflow: ({ workflowId, runId, inputData, requestContext, }: {
|
|
17
17
|
workflowId: string;
|
|
18
18
|
runId: string;
|
|
19
19
|
inputData: Record<string, unknown>;
|
|
20
|
-
|
|
20
|
+
requestContext: Record<string, unknown>;
|
|
21
21
|
}) => Promise<void>;
|
|
22
22
|
observeWorkflowStream?: ({ workflowId, runId }: {
|
|
23
23
|
workflowId: string;
|
|
24
24
|
runId: string;
|
|
25
25
|
}) => void;
|
|
26
|
-
resumeWorkflow: ({ workflowId, step, runId, resumeData,
|
|
26
|
+
resumeWorkflow: ({ workflowId, step, runId, resumeData, requestContext, }: {
|
|
27
27
|
workflowId: string;
|
|
28
28
|
step: string | string[];
|
|
29
29
|
runId: string;
|
|
30
30
|
resumeData: Record<string, unknown>;
|
|
31
|
-
|
|
31
|
+
requestContext: Record<string, unknown>;
|
|
32
32
|
}) => Promise<void>;
|
|
33
33
|
streamResult: WorkflowRunStreamResult | null;
|
|
34
34
|
isCancellingWorkflowRun: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from '../../../../node_modules/@types/react';
|
|
2
2
|
import { TxtProps } from '../Txt';
|
|
3
|
-
type AlertVariant = 'warning' | 'destructive';
|
|
3
|
+
type AlertVariant = 'warning' | 'destructive' | 'info';
|
|
4
4
|
export interface AlertProps {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
variant: AlertVariant;
|
|
@@ -11,5 +11,6 @@ export interface CrumbProps {
|
|
|
11
11
|
to: string;
|
|
12
12
|
prefetch?: boolean | null;
|
|
13
13
|
children: React.ReactNode;
|
|
14
|
+
action?: React.ReactNode;
|
|
14
15
|
}
|
|
15
|
-
export declare const Crumb: ({ className, as, isCurrent, ...props }: CrumbProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const Crumb: ({ className, as, isCurrent, action, ...props }: CrumbProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { default as React } from '../../../../node_modules/@types/react';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const LogoWithoutText: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { default as React } from '../../../../node_modules/@types/react';
|
|
|
2
2
|
export interface SpanProps {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
durationMs: number;
|
|
5
|
-
variant: 'tool' | 'agent' | 'workflow' | 'memory' | 'rag' | 'storage' | '
|
|
5
|
+
variant: 'tool' | 'agent' | 'workflow' | 'memory' | 'rag' | 'storage' | 'other';
|
|
6
6
|
tokenCount?: number;
|
|
7
7
|
spans?: React.ReactNode;
|
|
8
8
|
isRoot?: boolean;
|
|
@@ -18,7 +18,6 @@ export declare const spanIconMap: {
|
|
|
18
18
|
memory: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
rag: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
storage: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
eval: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
22
21
|
other: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
23
22
|
};
|
|
24
23
|
export declare const spanVariantClasses: {
|
|
@@ -28,7 +27,6 @@ export declare const spanVariantClasses: {
|
|
|
28
27
|
memory: string;
|
|
29
28
|
rag: string;
|
|
30
29
|
storage: string;
|
|
31
|
-
eval: string;
|
|
32
30
|
other: string;
|
|
33
31
|
};
|
|
34
32
|
export declare const Span: ({ children, durationMs, variant, tokenCount, spans, isRoot, onClick, isActive, offsetMs, totalDurationMs, }: SpanProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,7 +13,6 @@ export * from './DeploymentIcon';
|
|
|
13
13
|
export * from './DividerIcon';
|
|
14
14
|
export * from './DocsIcon';
|
|
15
15
|
export * from './EnvIcon';
|
|
16
|
-
export * from './EvaluatorCoinIcon';
|
|
17
16
|
export * from './FiltersIcon';
|
|
18
17
|
export * from './GithubCoinIcon';
|
|
19
18
|
export * from './GithubIcon';
|
|
@@ -27,7 +26,6 @@ export * from './LogsIcon';
|
|
|
27
26
|
export * from './MemoryIcon';
|
|
28
27
|
export * from './OpenAIIcon';
|
|
29
28
|
export * from './PromptIcon';
|
|
30
|
-
export * from './ScoreIcon';
|
|
31
29
|
export * from './SettingsIcon';
|
|
32
30
|
export * from './SlashIcon';
|
|
33
31
|
export * from './ToolsIcon';
|
|
@@ -2,4 +2,4 @@ export declare const useAgentMessages: ({ threadId, agentId, memory, }: {
|
|
|
2
2
|
threadId: string;
|
|
3
3
|
agentId: string;
|
|
4
4
|
memory: boolean;
|
|
5
|
-
}) => import('@tanstack/react-query').UseQueryResult<import('@mastra/client-js').
|
|
5
|
+
}) => import('@tanstack/react-query').UseQueryResult<import('@mastra/client-js').ListMemoryThreadMessagesResponse, Error>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const useWorkflowRuns: (workflowId: string, { enabled }?: {
|
|
2
2
|
enabled?: boolean;
|
|
3
|
-
}) => import('@tanstack/react-query').UseQueryResult<import('@mastra/core').WorkflowRuns, Error>;
|
|
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>;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ export * from './domains/scores/index';
|
|
|
3
3
|
export * from './domains/tools/index';
|
|
4
4
|
export * from './domains/workflows/index';
|
|
5
5
|
export * from './domains/templates/index';
|
|
6
|
-
export * from './domains/traces/index';
|
|
7
6
|
export * from './domains/observability/index';
|
|
8
7
|
export * from './domains/resizable-panel';
|
|
9
8
|
export * from './components/dynamic-form/index';
|
|
@@ -32,7 +31,6 @@ export * from './components/ui/entry';
|
|
|
32
31
|
export * from './hooks';
|
|
33
32
|
export * from './lib/tanstack-query';
|
|
34
33
|
export * from './domains/memory/hooks';
|
|
35
|
-
export type { TraceContextType } from './domains/traces/context/trace-context';
|
|
36
34
|
export * from './store/playground-store';
|
|
37
35
|
export * from './lib/framework';
|
|
38
36
|
export { MemorySearch } from './components/assistant-ui/memory-search';
|
|
@@ -41,10 +39,10 @@ export * from './components/ui/searchbar';
|
|
|
41
39
|
export * from './components/ui/tooltip';
|
|
42
40
|
export * from './components/ui/kbd';
|
|
43
41
|
export * from './components/ui/collapsible';
|
|
42
|
+
export * from './components/ui/combobox';
|
|
44
43
|
export * from './domains/conversation/index';
|
|
45
44
|
export * from './lib/errors';
|
|
46
45
|
export * from './components/assistant-ui/tools/tool-fallback';
|
|
47
46
|
export * from './domains/workflows/runs/workflow-run-list';
|
|
48
47
|
export * from './domains/mcps/index';
|
|
49
|
-
export * from './domains/evals/index';
|
|
50
48
|
export * from './lib/toast';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export type PaginationParams = {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
perPage?: number;
|
|
3
|
+
page?: number;
|
|
4
4
|
duration?: number;
|
|
5
5
|
};
|
|
6
6
|
export type PaginationResult = {
|
|
7
7
|
total: number;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
page: number;
|
|
9
|
+
perPage: number;
|
|
10
10
|
hasMore: boolean;
|
|
11
11
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from '../../node_modules/@types/react';
|
|
2
2
|
import { ChatProps } from '../types';
|
|
3
|
-
export declare function MastraRuntimeProvider({ children, agentId, initialMessages, initialLegacyMessages, memory, threadId, refreshThreadList, settings,
|
|
3
|
+
export declare function MastraRuntimeProvider({ children, agentId, initialMessages, initialLegacyMessages, memory, threadId, refreshThreadList, settings, requestContext, modelVersion, }: Readonly<{
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
}> & ChatProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface PlaygroundStore {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
requestContext: Record<string, any>;
|
|
3
|
+
setRequestContext: (requestContext: Record<string, any>) => void;
|
|
4
4
|
}
|
|
5
5
|
export declare const usePlaygroundStore: import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<PlaygroundStore>, "setState" | "persist"> & {
|
|
6
6
|
setState(partial: PlaygroundStore | Partial<PlaygroundStore> | ((state: PlaygroundStore) => PlaygroundStore | Partial<PlaygroundStore>), replace?: false | undefined): unknown;
|
|
@@ -20,13 +20,6 @@ export interface MemorySearchResult {
|
|
|
20
20
|
}>;
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
export interface MemorySearchResponse {
|
|
24
|
-
results: MemorySearchResult[];
|
|
25
|
-
count: number;
|
|
26
|
-
query: string;
|
|
27
|
-
searchType?: string;
|
|
28
|
-
searchScope?: 'thread' | 'resource';
|
|
29
|
-
}
|
|
30
23
|
export interface MemorySearchParams {
|
|
31
24
|
lastMessages?: number | false;
|
|
32
25
|
}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -34,7 +34,6 @@ export interface ModelSettings {
|
|
|
34
34
|
temperature?: number;
|
|
35
35
|
topK?: number;
|
|
36
36
|
topP?: number;
|
|
37
|
-
instructions?: string;
|
|
38
37
|
providerOptions?: LLMStepResult['providerMetadata'];
|
|
39
38
|
chatWithGenerateLegacy?: boolean;
|
|
40
39
|
chatWithGenerate?: boolean;
|
|
@@ -54,7 +53,7 @@ export interface ChatProps {
|
|
|
54
53
|
memory?: boolean;
|
|
55
54
|
refreshThreadList?: () => void;
|
|
56
55
|
settings?: AgentSettingsType;
|
|
57
|
-
|
|
56
|
+
requestContext?: Record<string, any>;
|
|
58
57
|
onInputChange?: (value: string) => void;
|
|
59
58
|
modelList?: GetAgentResponse['modelList'];
|
|
60
59
|
}
|
|
@@ -104,4 +103,3 @@ export type StreamChunk = {
|
|
|
104
103
|
runId: string;
|
|
105
104
|
from: 'AGENT' | 'WORKFLOW';
|
|
106
105
|
};
|
|
107
|
-
export * from './domains/traces/types';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/playground-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "7.0.0-beta.0",
|
|
5
5
|
"description": "Mastra Playground components",
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
@@ -46,10 +46,12 @@
|
|
|
46
46
|
"@autoform/react": "^4.0.0",
|
|
47
47
|
"@autoform/zod": "^4.0.0",
|
|
48
48
|
"@codemirror/lang-json": "^6.0.2",
|
|
49
|
+
"@codemirror/lang-markdown": "^6.5.0",
|
|
50
|
+
"@codemirror/language-data": "^6.5.2",
|
|
49
51
|
"@dagrejs/dagre": "^1.1.5",
|
|
50
52
|
"@hello-pangea/dnd": "^18.0.1",
|
|
51
53
|
"@hookform/resolvers": "^3.10.0",
|
|
52
|
-
"@lezer/highlight": "^1.2.
|
|
54
|
+
"@lezer/highlight": "^1.2.3",
|
|
53
55
|
"@lukeed/uuid": "^2.0.1",
|
|
54
56
|
"@radix-ui/react-alert-dialog": "^1.1.14",
|
|
55
57
|
"@radix-ui/react-avatar": "^1.1.10",
|
|
@@ -73,6 +75,7 @@
|
|
|
73
75
|
"@tanstack/react-table": "^8.21.3",
|
|
74
76
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
75
77
|
"@uiw/codemirror-theme-dracula": "^4.23.14",
|
|
78
|
+
"@uiw/codemirror-theme-github": "^4.25.2",
|
|
76
79
|
"@uiw/react-codemirror": "^4.23.14",
|
|
77
80
|
"@xyflow/react": "^12.8.6",
|
|
78
81
|
"cmdk": "^1.1.1",
|
|
@@ -98,21 +101,23 @@
|
|
|
98
101
|
"unified": "^11.0.5",
|
|
99
102
|
"use-debounce": "^10.0.6",
|
|
100
103
|
"zod": "^4.1.12",
|
|
101
|
-
"zustand": "^5.0.8"
|
|
104
|
+
"zustand": "^5.0.8",
|
|
105
|
+
"@mastra/ai-sdk": "^1.0.0-beta.0"
|
|
102
106
|
},
|
|
103
107
|
"peerDependencies": {
|
|
104
|
-
"@mastra/core": ">=0.
|
|
108
|
+
"@mastra/core": ">=1.0.0-0 <2.0.0-0",
|
|
109
|
+
"@tanstack/react-query": "^5.81.5",
|
|
105
110
|
"lucide-react": "^0.474.0",
|
|
106
111
|
"react": ">=19.0.0",
|
|
107
112
|
"react-dom": ">=19.0.0",
|
|
108
113
|
"tailwindcss": "^3.0.0",
|
|
109
|
-
"@
|
|
110
|
-
"@mastra/
|
|
111
|
-
"@mastra/react": "0.0.15"
|
|
114
|
+
"@mastra/client-js": "^1.0.0-beta.0",
|
|
115
|
+
"@mastra/react": "0.1.0-beta.0"
|
|
112
116
|
},
|
|
113
117
|
"devDependencies": {
|
|
114
118
|
"@storybook/addon-docs": "^9.1.10",
|
|
115
119
|
"@storybook/react-vite": "^9.1.10",
|
|
120
|
+
"@tanstack/react-query": "^5.81.5",
|
|
116
121
|
"@types/node": "^20.19.0",
|
|
117
122
|
"@types/react": "^19.1.9",
|
|
118
123
|
"@types/react-dom": "^19.1.7",
|
|
@@ -130,10 +135,9 @@
|
|
|
130
135
|
"vite-plugin-dts": "^4.5.4",
|
|
131
136
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
132
137
|
"vitest": "^3.2.4",
|
|
133
|
-
"@
|
|
134
|
-
"@mastra/
|
|
135
|
-
"@mastra/
|
|
136
|
-
"@mastra/react": "0.0.15"
|
|
138
|
+
"@mastra/client-js": "^1.0.0-beta.0",
|
|
139
|
+
"@mastra/core": "1.0.0-beta.0",
|
|
140
|
+
"@mastra/react": "0.1.0-beta.0"
|
|
137
141
|
},
|
|
138
142
|
"homepage": "https://mastra.ai",
|
|
139
143
|
"repository": {
|
|
@@ -144,12 +148,8 @@
|
|
|
144
148
|
"bugs": {
|
|
145
149
|
"url": "https://github.com/mastra-ai/mastra/issues"
|
|
146
150
|
},
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"publish-branch": [
|
|
150
|
-
"main",
|
|
151
|
-
"0.x"
|
|
152
|
-
]
|
|
151
|
+
"engines": {
|
|
152
|
+
"node": ">=22.13.0"
|
|
153
153
|
},
|
|
154
154
|
"scripts": {
|
|
155
155
|
"build": "tsc && vite build",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Evals } from '../../evals/types';
|
|
2
|
-
export interface AgentEvalsProps {
|
|
3
|
-
liveEvals: Array<Evals>;
|
|
4
|
-
ciEvals: Array<Evals>;
|
|
5
|
-
onRefetchLiveEvals: () => void;
|
|
6
|
-
onRefetchCiEvals: () => void;
|
|
7
|
-
}
|
|
8
|
-
export declare function AgentEvals({ liveEvals, ciEvals, onRefetchLiveEvals, onRefetchCiEvals }: AgentEvalsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { AgentInstructions } from '@mastra/core/agent';
|
|
2
|
-
interface CurrentInstructionsProps {
|
|
3
|
-
instructions?: AgentInstructions;
|
|
4
|
-
enhancedPrompt: string;
|
|
5
|
-
isEnhancing: boolean;
|
|
6
|
-
userComment: string;
|
|
7
|
-
onEnhance: () => void;
|
|
8
|
-
onCancel: () => void;
|
|
9
|
-
onSave: () => void;
|
|
10
|
-
onCommentChange: (comment: string) => void;
|
|
11
|
-
agentId: string;
|
|
12
|
-
onShowHistory: () => void;
|
|
13
|
-
}
|
|
14
|
-
export declare function CurrentInstructions({ instructions, enhancedPrompt, isEnhancing, userComment, onEnhance, onCancel, onSave, onCommentChange, onShowHistory, }: CurrentInstructionsProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface VersionActionsProps {
|
|
2
|
-
version: any;
|
|
3
|
-
index: number;
|
|
4
|
-
isUpdating: boolean;
|
|
5
|
-
onSetActive: (version: any, index: number) => Promise<void>;
|
|
6
|
-
onDelete: (index: number) => void;
|
|
7
|
-
}
|
|
8
|
-
export declare function VersionActions({ version, index, isUpdating, onSetActive, onDelete }: VersionActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export interface VersionHistoryDialogProps {
|
|
2
|
-
versions: any[];
|
|
3
|
-
onDelete: (index: number) => void;
|
|
4
|
-
open: boolean;
|
|
5
|
-
onOpenChange: (open: boolean) => void;
|
|
6
|
-
onSetActive: (version: any, index: number) => Promise<void>;
|
|
7
|
-
isUpdating: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare const VersionHistoryDialog: ({ open, onOpenChange, onDelete, onSetActive, versions, isUpdating, }: VersionHistoryDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
interface VersionHistoryProps {
|
|
2
|
-
versions: any[];
|
|
3
|
-
isUpdating: boolean;
|
|
4
|
-
copiedVersions: Record<string | number, boolean>;
|
|
5
|
-
onCopy: (content: string, key: string | number) => Promise<void>;
|
|
6
|
-
onSetActive: (version: any, index: number) => Promise<void>;
|
|
7
|
-
onDelete: (index: number) => void;
|
|
8
|
-
}
|
|
9
|
-
export declare function VersionHistory({ versions, isUpdating, copiedVersions, onCopy, onSetActive, onDelete, }: VersionHistoryProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
interface VersionItemProps {
|
|
2
|
-
version: any;
|
|
3
|
-
index: number;
|
|
4
|
-
isExpanded: boolean;
|
|
5
|
-
isUpdating: boolean;
|
|
6
|
-
copiedVersions: Record<string | number, boolean>;
|
|
7
|
-
onToggleExpand: () => void;
|
|
8
|
-
onToggleAnalysis: () => void;
|
|
9
|
-
onCopy: (content: string, key: string | number) => Promise<void>;
|
|
10
|
-
onSetActive: (version: any, index: number) => Promise<void>;
|
|
11
|
-
onDelete: (index: number) => void;
|
|
12
|
-
}
|
|
13
|
-
export declare function VersionItem({ version, index, isExpanded, isUpdating, onToggleExpand, onToggleAnalysis, onSetActive, onDelete, }: VersionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare function usePromptVersions(agentId: string, instructions?: string): {
|
|
2
|
-
versions: any[];
|
|
3
|
-
copiedVersions: Record<number, boolean>;
|
|
4
|
-
isUpdating: boolean;
|
|
5
|
-
versionToDelete: number | null;
|
|
6
|
-
setVersions: import('../../../../node_modules/@types/react').Dispatch<import('../../../../node_modules/@types/react').SetStateAction<any[]>>;
|
|
7
|
-
setVersionToDelete: import('../../../../node_modules/@types/react').Dispatch<import('../../../../node_modules/@types/react').SetStateAction<number | null>>;
|
|
8
|
-
copyToClipboard: (text: string, versionIndex: number) => Promise<() => void>;
|
|
9
|
-
setVersionActive: (version: any, index: number) => Promise<void>;
|
|
10
|
-
deleteVersion: (index: number) => void;
|
|
11
|
-
updateVersion: (index: number, updates: Partial<any>) => Promise<void>;
|
|
12
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './use-evals-by-agent-id';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { TestInfo, MetricResult } from '@mastra/core/eval';
|
|
2
|
-
export type Evals = {
|
|
3
|
-
input: string;
|
|
4
|
-
output: string;
|
|
5
|
-
result: MetricResult;
|
|
6
|
-
agentName: string;
|
|
7
|
-
createdAt: string;
|
|
8
|
-
metricName: string;
|
|
9
|
-
instructions: string;
|
|
10
|
-
runId: string;
|
|
11
|
-
globalRunId: string;
|
|
12
|
-
testInfo?: TestInfo;
|
|
13
|
-
};
|
|
14
|
-
export declare const useEvalsByAgentId: (agentId: string, type: "ci" | "live") => import('@tanstack/react-query').UseQueryResult<import('@mastra/client-js').GetEvalsByAgentIdResponse, Error>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './hooks';
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { TestInfo, MetricResult } from '@mastra/core/eval';
|
|
2
|
-
export type Evals = {
|
|
3
|
-
input: string;
|
|
4
|
-
output: string;
|
|
5
|
-
result: MetricResult;
|
|
6
|
-
agentName: string;
|
|
7
|
-
createdAt: string;
|
|
8
|
-
metricName: string;
|
|
9
|
-
instructions: string;
|
|
10
|
-
runId: string;
|
|
11
|
-
globalRunId: string;
|
|
12
|
-
testInfo?: TestInfo;
|
|
13
|
-
};
|
|
14
|
-
export type GroupedEvals = {
|
|
15
|
-
metricName: string;
|
|
16
|
-
averageScore: number;
|
|
17
|
-
evals: Evals[];
|
|
18
|
-
};
|
|
19
|
-
export type SortDirection = 'asc' | 'desc';
|
|
20
|
-
export type SortConfig = {
|
|
21
|
-
field: keyof GroupedEvals | 'timestamp' | 'score';
|
|
22
|
-
direction: SortDirection;
|
|
23
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { RefinedTrace } from '../types';
|
|
2
|
-
export interface TracesTableProps {
|
|
3
|
-
traces: RefinedTrace[];
|
|
4
|
-
error: {
|
|
5
|
-
message: string;
|
|
6
|
-
} | null;
|
|
7
|
-
}
|
|
8
|
-
export declare const TracesTable: ({ traces, error }: TracesTableProps) => import("react/jsx-runtime").JSX.Element;
|