@mastra/playground-ui 6.4.1 → 6.5.0-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.
- package/CHANGELOG.md +57 -0
- package/dist/index.cjs.js +1869 -1918
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1844 -1902
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/assistant-ui/messages/assistant-message.d.ts +1 -3
- package/dist/src/components/assistant-ui/thread.d.ts +1 -3
- package/dist/src/components/assistant-ui/tools/badges/agent-badge.d.ts +5 -8
- package/dist/src/components/assistant-ui/tools/badges/badge-wrapper.d.ts +2 -1
- package/dist/src/components/assistant-ui/tools/badges/tool-badge.d.ts +3 -5
- package/dist/src/components/assistant-ui/tools/badges/workflow-badge.d.ts +3 -5
- package/dist/src/components/assistant-ui/tools/tool-fallback.d.ts +6 -2
- package/dist/src/components/ui/containers/buttons-group.d.ts +6 -0
- package/dist/src/components/ui/containers/index.d.ts +2 -0
- package/dist/src/components/ui/containers/sections.d.ts +6 -0
- package/dist/src/components/ui/elements/entry-list/entry-list-entries-skeleton.d.ts +6 -0
- package/dist/src/components/ui/elements/entry-list/entry-list-entries.d.ts +6 -0
- package/dist/src/components/ui/elements/entry-list/entry-list-entry-col.d.ts +7 -0
- package/dist/src/components/ui/elements/entry-list/entry-list-entry.d.ts +11 -0
- package/dist/src/components/ui/elements/entry-list/entry-list-header.d.ts +6 -0
- package/dist/src/components/ui/elements/entry-list/entry-list-message.d.ts +8 -0
- package/dist/src/components/ui/elements/entry-list/entry-list-next-page-loading.d.ts +9 -0
- package/dist/src/components/ui/elements/entry-list/entry-list-pagination.d.ts +8 -0
- package/dist/src/components/ui/elements/entry-list/entry-list-root.d.ts +6 -0
- package/dist/src/components/ui/elements/entry-list/entry-list-skeleton.d.ts +2 -0
- package/dist/src/components/ui/elements/entry-list/entry-list-trim.d.ts +6 -0
- package/dist/src/components/ui/elements/entry-list/entry-list.d.ts +20 -18
- package/dist/src/components/ui/elements/entry-list/helpers.d.ts +10 -0
- package/dist/src/components/ui/elements/entry-list/index.d.ts +3 -4
- package/dist/src/components/ui/elements/entry-list/shared.d.ts +1 -5
- package/dist/src/components/ui/elements/entry-list/types.d.ts +5 -0
- package/dist/src/components/ui/elements/headers/page-header.d.ts +2 -2
- package/dist/src/components/ui/elements/index.d.ts +3 -0
- package/dist/src/components/ui/elements/main-sidebar/index.d.ts +1 -0
- package/dist/src/components/ui/elements/main-sidebar/main-sidebar-bottom.d.ts +6 -0
- package/dist/src/components/ui/elements/main-sidebar/main-sidebar-context.d.ts +12 -0
- package/dist/src/components/ui/elements/main-sidebar/main-sidebar-nav-header.d.ts +8 -0
- package/dist/src/components/ui/elements/main-sidebar/main-sidebar-nav-link.d.ts +17 -0
- package/dist/src/components/ui/elements/main-sidebar/main-sidebar-nav-list.d.ts +12 -0
- package/dist/src/components/ui/elements/main-sidebar/main-sidebar-nav-section.d.ts +13 -0
- package/dist/src/components/ui/elements/main-sidebar/main-sidebar-nav-separator.d.ts +5 -0
- package/dist/src/components/ui/elements/main-sidebar/main-sidebar-nav.d.ts +6 -0
- package/dist/src/components/ui/elements/main-sidebar/main-sidebar-root.d.ts +6 -0
- package/dist/src/components/ui/elements/main-sidebar/main-sidebar.d.ts +21 -0
- package/dist/src/components/ui/elements/notification/index.d.ts +1 -0
- package/dist/src/components/ui/elements/notification/notification.d.ts +9 -0
- package/dist/src/components/ui/elements/section/index.d.ts +1 -0
- package/dist/src/components/ui/elements/section/section-header.d.ts +7 -0
- package/dist/src/components/ui/elements/section/section-heading.d.ts +8 -0
- package/dist/src/components/ui/elements/section/section-root.d.ts +5 -0
- package/dist/src/components/ui/elements/section/section.d.ts +8 -0
- package/dist/src/components/ui/elements/side-dialog/index.d.ts +0 -6
- package/dist/src/components/ui/elements/side-dialog/side-dialog-code-section.d.ts +3 -1
- package/dist/src/components/ui/elements/side-dialog/side-dialog-content.d.ts +1 -14
- package/dist/src/components/ui/elements/side-dialog/side-dialog-nav.d.ts +6 -0
- package/dist/src/components/ui/elements/side-dialog/side-dialog-root.d.ts +11 -0
- package/dist/src/components/ui/elements/side-dialog/side-dialog-top.d.ts +2 -4
- package/dist/src/components/ui/elements/side-dialog/side-dialog.d.ts +16 -12
- package/dist/src/components/ui/elements/tabs/tabs-content.d.ts +7 -0
- package/dist/src/components/ui/elements/tabs/tabs-list.d.ts +7 -0
- package/dist/src/components/ui/elements/tabs/tabs-root.d.ts +9 -0
- package/dist/src/components/ui/elements/tabs/tabs-tab.d.ts +8 -0
- package/dist/src/components/ui/elements/tabs/tabs.d.ts +20 -36
- package/dist/src/domains/agents/components/agent-chat.d.ts +1 -1
- package/dist/src/domains/agents/index.d.ts +1 -0
- package/dist/src/domains/agents/utils/__tests__/extractPrompt.test.d.ts +1 -0
- package/dist/src/domains/agents/utils/extractPrompt.d.ts +2 -0
- package/dist/src/domains/observability/components/index.d.ts +4 -0
- package/dist/src/domains/observability/components/span-details.d.ts +1 -2
- package/dist/src/domains/observability/components/span-dialog.d.ts +8 -2
- package/dist/src/domains/observability/components/span-score-list.d.ts +17 -0
- package/dist/src/domains/observability/components/span-scoring.d.ts +6 -0
- package/dist/src/domains/observability/components/span-tabs.d.ts +16 -0
- package/dist/src/domains/observability/components/trace-dialog.d.ts +4 -2
- package/dist/src/domains/observability/components/trace-timeline.d.ts +1 -4
- package/dist/src/domains/observability/components/traces-list.d.ts +22 -0
- package/dist/src/domains/scores/components/score-dialog.d.ts +5 -3
- package/dist/src/domains/scores/components/scores-list.d.ts +21 -0
- package/dist/src/domains/scores/hooks/use-trace-span-scores.d.ts +7 -0
- package/dist/src/domains/scores/hooks/use-trigger-scorer.d.ts +1 -1
- package/dist/src/domains/scores/index.d.ts +2 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/services/mastra-runtime-provider.d.ts +1 -1
- package/dist/src/types.d.ts +3 -1
- package/package.json +12 -10
- package/dist/src/components/ui/elements/entry-list/entry-list-cell.d.ts +0 -7
- package/dist/src/components/ui/elements/entry-list/entry-list-item.d.ts +0 -9
- package/dist/src/components/ui/elements/entry-list/entry-list-page-header.d.ts +0 -8
- package/dist/src/domains/scores/components/scorers-dropdown.d.ts +0 -8
- package/dist/src/services/agent-network-message.d.ts +0 -2
- package/dist/src/services/stream-chunk-message.d.ts +0 -32
- package/dist/src/services/vnext-message-provider.d.ts +0 -10
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type TabsRootProps<T extends string> = {
|
|
2
|
+
children: React.ReactNode;
|
|
3
|
+
defaultTab: T;
|
|
4
|
+
value?: T;
|
|
5
|
+
onValueChange?: (value: T) => void;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const TabsRoot: <T extends string>({ children, defaultTab, value, onValueChange, className, }: TabsRootProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1,40 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
export declare const Tabs: (<T extends string>({ children, defaultTab, value, onValueChange, className, }: {
|
|
2
2
|
children: React.ReactNode;
|
|
3
3
|
defaultTab: T;
|
|
4
|
-
value?: T;
|
|
5
|
-
onValueChange?: (value: T) => void;
|
|
4
|
+
value?: T | undefined;
|
|
5
|
+
onValueChange?: ((value: T) => void) | undefined;
|
|
6
6
|
className?: string;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element) & {
|
|
8
|
+
List: ({ children, variant, className }: {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
variant?: "default" | "buttons";
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
Tab: ({ children, value, onClick, className }: {
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
value: string;
|
|
16
|
+
onClick?: () => void;
|
|
17
|
+
className?: string;
|
|
18
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
Content: ({ children, value, className }: {
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
value: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
24
|
};
|
|
8
|
-
type TabListProps = {
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
className?: string;
|
|
11
|
-
variant?: 'default' | 'buttons';
|
|
12
|
-
};
|
|
13
|
-
type TabProps = {
|
|
14
|
-
children: React.ReactNode;
|
|
15
|
-
value: string;
|
|
16
|
-
onClick?: () => void;
|
|
17
|
-
className?: string;
|
|
18
|
-
};
|
|
19
|
-
type TabContentProps = {
|
|
20
|
-
children: React.ReactNode;
|
|
21
|
-
value: string;
|
|
22
|
-
className?: string;
|
|
23
|
-
};
|
|
24
|
-
declare const Tabs: {
|
|
25
|
-
<T extends string>({ children, defaultTab, value, onValueChange, className }: TabsProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
displayName: string;
|
|
27
|
-
Tab: {
|
|
28
|
-
({ children, value, onClick, className }: TabProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
displayName: string;
|
|
30
|
-
};
|
|
31
|
-
List: {
|
|
32
|
-
({ children, variant, className }: TabListProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
-
displayName: string;
|
|
34
|
-
};
|
|
35
|
-
Content: {
|
|
36
|
-
({ children, value, className }: TabContentProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
-
displayName: string;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
export { Tabs };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ChatProps } from '../../../types';
|
|
2
|
-
export declare const AgentChat: ({ agentId, agentName, threadId, initialMessages, memory, refreshThreadList, modelVersion, modelList, }: ChatProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const AgentChat: ({ agentId, agentName, threadId, initialMessages, initialLegacyMessages, memory, refreshThreadList, modelVersion, modelList, }: ChatProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,3 +4,7 @@ export * from './trace-timeline-span';
|
|
|
4
4
|
export * from './shared';
|
|
5
5
|
export * from './trace-dialog';
|
|
6
6
|
export * from './traces-tools';
|
|
7
|
+
export * from './traces-list';
|
|
8
|
+
export * from './span-score-list';
|
|
9
|
+
export * from './span-scoring';
|
|
10
|
+
export * from './span-tabs';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { AISpanRecord } from '@mastra/core';
|
|
2
2
|
interface SpanDetailsProps {
|
|
3
3
|
span?: AISpanRecord;
|
|
4
|
-
onScorerTriggered: (scorerName: string, traceId: string, spanId?: string) => void;
|
|
5
4
|
}
|
|
6
|
-
export declare function SpanDetails({ span
|
|
5
|
+
export declare function SpanDetails({ span }: SpanDetailsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
7
6
|
export {};
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import { KeyValueListItemData } from '../../../components/ui/elements';
|
|
2
2
|
import { AISpanRecord } from '@mastra/core';
|
|
3
|
+
import { GetScoresResponse } from '@mastra/client-js';
|
|
3
4
|
type SpanDialogProps = {
|
|
4
5
|
trace: AISpanRecord;
|
|
5
6
|
span?: AISpanRecord;
|
|
7
|
+
spanScoresData?: GetScoresResponse | null;
|
|
8
|
+
onSpanScoresPageChange?: (page: number) => void;
|
|
9
|
+
isLoadingSpanScoresData?: boolean;
|
|
6
10
|
spanInfo?: KeyValueListItemData[];
|
|
7
11
|
isOpen: boolean;
|
|
8
12
|
onClose?: () => void;
|
|
9
13
|
onNext?: () => void;
|
|
10
14
|
onPrevious?: () => void;
|
|
11
15
|
onViewToggle?: () => void;
|
|
12
|
-
|
|
16
|
+
defaultActiveTab?: string;
|
|
17
|
+
initialScoreId?: string;
|
|
18
|
+
computeTraceLink: (traceId: string, spanId?: string) => string;
|
|
13
19
|
};
|
|
14
|
-
export declare function SpanDialog({ trace, span, isOpen, onClose, onNext, onPrevious, onViewToggle, spanInfo,
|
|
20
|
+
export declare function SpanDialog({ trace, span, spanScoresData, onSpanScoresPageChange, isLoadingSpanScoresData, isOpen, onClose, onNext, onPrevious, onViewToggle, spanInfo, defaultActiveTab, initialScoreId, computeTraceLink, }: SpanDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
15
21
|
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GetScoresResponse } from '@mastra/client-js';
|
|
2
|
+
export declare const traceScoresListColumns: {
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
size: string;
|
|
6
|
+
}[];
|
|
7
|
+
type SpanScoreListProps = {
|
|
8
|
+
scoresData?: GetScoresResponse | null;
|
|
9
|
+
isLoadingScoresData?: boolean;
|
|
10
|
+
initialScoreId?: string;
|
|
11
|
+
traceId?: string;
|
|
12
|
+
spanId?: string;
|
|
13
|
+
onPageChange?: (page: number) => void;
|
|
14
|
+
computeTraceLink: (traceId: string, spanId?: string) => string;
|
|
15
|
+
};
|
|
16
|
+
export declare function SpanScoreList({ scoresData, isLoadingScoresData, traceId, spanId, initialScoreId, onPageChange, computeTraceLink, }: SpanScoreListProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { KeyValueListItemData } from '../../../index';
|
|
2
|
+
import { GetScoresResponse } from '@mastra/client-js';
|
|
3
|
+
import { AISpanRecord } from '@mastra/core';
|
|
4
|
+
type SpanTabsProps = {
|
|
5
|
+
trace?: AISpanRecord;
|
|
6
|
+
span?: AISpanRecord;
|
|
7
|
+
spanScoresData?: GetScoresResponse | null;
|
|
8
|
+
onSpanScoresPageChange?: (page: number) => void;
|
|
9
|
+
isLoadingSpanScoresData?: boolean;
|
|
10
|
+
spanInfo?: KeyValueListItemData[];
|
|
11
|
+
defaultActiveTab?: string;
|
|
12
|
+
initialScoreId?: string;
|
|
13
|
+
computeTraceLink: (traceId: string, spanId?: string) => string;
|
|
14
|
+
};
|
|
15
|
+
export declare function SpanTabs({ trace, span, spanScoresData, onSpanScoresPageChange, isLoadingSpanScoresData, spanInfo, defaultActiveTab, initialScoreId, computeTraceLink, }: SpanTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -10,8 +10,10 @@ type TraceDialogProps = {
|
|
|
10
10
|
isLoadingSpans?: boolean;
|
|
11
11
|
computeAgentsLink?: () => string;
|
|
12
12
|
computeWorkflowsLink?: () => string;
|
|
13
|
-
|
|
13
|
+
computeTraceLink: (traceId: string, spanId?: string, tab?: string) => string;
|
|
14
14
|
initialSpanId?: string;
|
|
15
|
+
initialSpanTab?: string;
|
|
16
|
+
initialScoreId?: string;
|
|
15
17
|
};
|
|
16
|
-
export declare function TraceDialog({ traceId, traceSpans, traceDetails, isOpen, onClose, onNext, onPrevious, isLoadingSpans, computeAgentsLink, computeWorkflowsLink,
|
|
18
|
+
export declare function TraceDialog({ traceId, traceSpans, traceDetails, isOpen, onClose, onNext, onPrevious, isLoadingSpans, computeAgentsLink, computeWorkflowsLink, computeTraceLink, initialSpanId, initialSpanTab, initialScoreId, }: TraceDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
17
19
|
export {};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { AISpanRecord } from '@mastra/core';
|
|
2
1
|
import { UISpan } from '../types';
|
|
3
2
|
type TraceTimelineProps = {
|
|
4
|
-
spans?: AISpanRecord[];
|
|
5
3
|
hierarchicalSpans: UISpan[];
|
|
6
4
|
onSpanClick: (id: string) => void;
|
|
7
5
|
selectedSpanId?: string;
|
|
8
6
|
isLoading?: boolean;
|
|
9
|
-
className?: string;
|
|
10
7
|
};
|
|
11
|
-
export declare function TraceTimeline({
|
|
8
|
+
export declare function TraceTimeline({ hierarchicalSpans, onSpanClick, selectedSpanId, isLoading }: TraceTimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
12
9
|
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AISpanRecord } from '@mastra/core';
|
|
2
|
+
export declare const tracesListColumns: {
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
size: string;
|
|
6
|
+
}[];
|
|
7
|
+
type AITrace = Pick<AISpanRecord, 'traceId' | 'name'> & {
|
|
8
|
+
attributes?: Record<string, any> | null;
|
|
9
|
+
createdAt: Date | string;
|
|
10
|
+
};
|
|
11
|
+
type TracesListProps = {
|
|
12
|
+
selectedTraceId?: string;
|
|
13
|
+
onTraceClick?: (id: string) => void;
|
|
14
|
+
traces?: AITrace[];
|
|
15
|
+
errorMsg?: string;
|
|
16
|
+
setEndOfListElement?: (element: HTMLDivElement | null) => void;
|
|
17
|
+
filtersApplied?: boolean;
|
|
18
|
+
isFetchingNextPage?: boolean;
|
|
19
|
+
hasNextPage?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare function TracesList({ traces, selectedTraceId, onTraceClick, errorMsg, setEndOfListElement, filtersApplied, isFetchingNextPage, hasNextPage, }: TracesListProps): import("react/jsx-runtime").JSX.Element | null;
|
|
22
|
+
export {};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SideDialogRootProps } from '../../../components/ui/elements';
|
|
2
2
|
import { ClientScoreRowData } from '@mastra/client-js';
|
|
3
3
|
type ScoreDialogProps = {
|
|
4
4
|
score?: ClientScoreRowData;
|
|
5
|
-
|
|
5
|
+
scorerName?: string;
|
|
6
6
|
isOpen: boolean;
|
|
7
7
|
onClose: () => void;
|
|
8
8
|
onNext?: () => void;
|
|
9
9
|
onPrevious?: () => void;
|
|
10
10
|
computeTraceLink: (traceId: string, spanId?: string) => string;
|
|
11
|
+
dialogLevel?: SideDialogRootProps['level'];
|
|
12
|
+
usageContext?: 'scorerPage' | 'aiSpanDialog';
|
|
11
13
|
};
|
|
12
|
-
export declare function ScoreDialog({
|
|
14
|
+
export declare function ScoreDialog({ score, scorerName, isOpen, onClose, onNext, onPrevious, computeTraceLink, dialogLevel, usageContext, }: ScoreDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ClientScoreRowData } from '@mastra/client-js';
|
|
2
|
+
export declare const scoresListColumns: {
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
size: string;
|
|
6
|
+
}[];
|
|
7
|
+
type ScoresListProps = {
|
|
8
|
+
selectedScoreId?: string;
|
|
9
|
+
onScoreClick?: (id: string) => void;
|
|
10
|
+
scores?: ClientScoreRowData[];
|
|
11
|
+
pagination?: {
|
|
12
|
+
total: number;
|
|
13
|
+
hasMore: boolean;
|
|
14
|
+
perPage: number;
|
|
15
|
+
page: number;
|
|
16
|
+
};
|
|
17
|
+
onPageChange?: (page: number) => void;
|
|
18
|
+
errorMsg?: string;
|
|
19
|
+
};
|
|
20
|
+
export declare function ScoresList({ scores, pagination, onScoreClick, onPageChange, errorMsg, selectedScoreId, }: ScoresListProps): import("react/jsx-runtime").JSX.Element | null;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type useTraceSpanScoresProps = {
|
|
2
|
+
traceId?: string;
|
|
3
|
+
spanId?: string;
|
|
4
|
+
page?: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const useTraceSpanScores: ({ traceId, spanId, page }: useTraceSpanScoresProps) => import('@tanstack/react-query').UseQueryResult<import('@mastra/client-js').GetScoresResponse, Error>;
|
|
7
|
+
export {};
|
|
@@ -3,7 +3,7 @@ interface TriggerScoreArgs {
|
|
|
3
3
|
traceId: string;
|
|
4
4
|
spanId?: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const useTriggerScorer: (
|
|
6
|
+
export declare const useTriggerScorer: () => import('@tanstack/react-query').UseMutationResult<{
|
|
7
7
|
status: string;
|
|
8
8
|
message: string;
|
|
9
9
|
}, Error, TriggerScoreArgs, unknown>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
export * from './components/scores-list';
|
|
1
2
|
export * from './components/score-dialog';
|
|
2
3
|
export * from './components/scores-tools';
|
|
3
4
|
export * from './hooks/use-scorers';
|
|
4
5
|
export * from './components/scorers-table/scorers-table';
|
|
6
|
+
export * from './hooks/use-trace-span-scores';
|
package/dist/src/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export * from './lib/framework';
|
|
|
37
37
|
export { MemorySearch } from './components/assistant-ui/memory-search';
|
|
38
38
|
export * from './components/ui/alert-dialog';
|
|
39
39
|
export * from './components/ui/searchbar';
|
|
40
|
+
export * from './components/ui/tooltip';
|
|
40
41
|
export * from './components/ui/kbd';
|
|
41
42
|
export * from './components/ui/collapsible';
|
|
42
43
|
export * from './domains/conversation/index';
|
|
@@ -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, memory, threadId, refreshThreadList, settings, runtimeContext, modelVersion, }: Readonly<{
|
|
3
|
+
export declare function MastraRuntimeProvider({ children, agentId, initialMessages, initialLegacyMessages, memory, threadId, refreshThreadList, settings, runtimeContext, modelVersion, }: Readonly<{
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
}> & ChatProps): import("react/jsx-runtime").JSX.Element | null;
|
package/dist/src/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GetAgentResponse } from '@mastra/client-js';
|
|
2
2
|
import { AiMessageType } from '@mastra/core/memory';
|
|
3
3
|
import { LLMStepResult } from '@mastra/core/agent';
|
|
4
|
+
import { MastraUIMessage } from '@mastra/react';
|
|
4
5
|
export type Message = AiMessageType;
|
|
5
6
|
export interface AssistantMessage {
|
|
6
7
|
id: string;
|
|
@@ -47,7 +48,8 @@ export interface ChatProps {
|
|
|
47
48
|
agentName?: string;
|
|
48
49
|
modelVersion?: string;
|
|
49
50
|
threadId?: string;
|
|
50
|
-
initialMessages?:
|
|
51
|
+
initialMessages?: MastraUIMessage[];
|
|
52
|
+
initialLegacyMessages?: Message[];
|
|
51
53
|
memory?: boolean;
|
|
52
54
|
refreshThreadList?: () => void;
|
|
53
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": "6.
|
|
4
|
+
"version": "6.5.0-alpha.1",
|
|
5
5
|
"description": "Mastra Playground components",
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
@@ -98,13 +98,13 @@
|
|
|
98
98
|
"tailwindcss-animate": "^1.0.7",
|
|
99
99
|
"unified": "^11.0.5",
|
|
100
100
|
"use-debounce": "^10.0.6",
|
|
101
|
-
"zod": "^4.1.
|
|
101
|
+
"zod": "^4.1.12",
|
|
102
102
|
"zustand": "^5.0.8",
|
|
103
|
-
"@mastra/react": "0.0.
|
|
104
|
-
"@mastra/client-js": "^0.
|
|
103
|
+
"@mastra/react": "0.0.6-alpha.1",
|
|
104
|
+
"@mastra/client-js": "^0.16.0-alpha.1"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|
|
107
|
-
"@mastra/core": ">=0.
|
|
107
|
+
"@mastra/core": ">=0.21.0-0 <0.22.0-0",
|
|
108
108
|
"lucide-react": "^0.474.0",
|
|
109
109
|
"react": ">=19.0.0",
|
|
110
110
|
"react-dom": ">=19.0.0",
|
|
@@ -116,20 +116,21 @@
|
|
|
116
116
|
"@types/node": "^20.19.0",
|
|
117
117
|
"@types/react": "^19.1.9",
|
|
118
118
|
"@types/react-dom": "^19.1.7",
|
|
119
|
-
"@vitejs/plugin-react": "^
|
|
119
|
+
"@vitejs/plugin-react": "^5.0.4",
|
|
120
120
|
"autoprefixer": "^10.4.21",
|
|
121
121
|
"class-variance-authority": "^0.7.1",
|
|
122
122
|
"clsx": "^2.1.1",
|
|
123
123
|
"postcss": "^8.5.6",
|
|
124
124
|
"rollup-plugin-node-externals": "^8.0.1",
|
|
125
|
-
"storybook": "^9.1.
|
|
125
|
+
"storybook": "^9.1.10",
|
|
126
126
|
"tailwind-merge": "^3.3.1",
|
|
127
|
-
"tailwindcss": "^3.4.
|
|
127
|
+
"tailwindcss": "^3.4.18",
|
|
128
128
|
"typescript": "^5.8.3",
|
|
129
|
-
"vite": "^
|
|
129
|
+
"vite": "^7.1.9",
|
|
130
130
|
"vite-plugin-dts": "^4.5.4",
|
|
131
131
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
132
|
-
"
|
|
132
|
+
"vitest": "^3.2.4",
|
|
133
|
+
"@mastra/core": "0.21.0-alpha.1"
|
|
133
134
|
},
|
|
134
135
|
"homepage": "https://mastra.ai",
|
|
135
136
|
"repository": {
|
|
@@ -143,6 +144,7 @@
|
|
|
143
144
|
"scripts": {
|
|
144
145
|
"build": "tsc && vite build",
|
|
145
146
|
"dev": "vite build --watch",
|
|
147
|
+
"test": "vitest",
|
|
146
148
|
"build:publish": "pnpm build && yalc push",
|
|
147
149
|
"preview": "vite preview",
|
|
148
150
|
"storybook": "storybook dev -p 6006 --no-open",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare function EntryListTextCell({ children, isLoading }: {
|
|
2
|
-
children: React.ReactNode;
|
|
3
|
-
isLoading?: boolean;
|
|
4
|
-
}): import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
-
export declare function EntryListStatusCell({ status }: {
|
|
6
|
-
status?: 'success' | 'failed';
|
|
7
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Column } from './shared';
|
|
2
|
-
export declare function EntryListItem({ item, selectedItemId, onClick, children, columns, isLoading, }: {
|
|
3
|
-
item: any;
|
|
4
|
-
selectedItemId?: string;
|
|
5
|
-
onClick?: (itemId: string) => void;
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
columns?: Column[];
|
|
8
|
-
isLoading?: boolean;
|
|
9
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
type EntryListPageHeaderProps = {
|
|
2
|
-
title: string;
|
|
3
|
-
description?: string;
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
icon?: React.ReactNode;
|
|
6
|
-
};
|
|
7
|
-
export declare function EntryListPageHeader({ title, description, icon, children }: EntryListPageHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { AISpanRecord } from '@mastra/core';
|
|
2
|
-
export interface ScorersDropdownProps {
|
|
3
|
-
trace: AISpanRecord;
|
|
4
|
-
spanId?: string;
|
|
5
|
-
onScorerTriggered: (scorerName: string, traceId: string, spanId?: string) => void;
|
|
6
|
-
entityType?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const ScorersDropdown: ({ trace, spanId, onScorerTriggered, entityType }: ScorersDropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ThreadMessageLike } from '@assistant-ui/react';
|
|
2
|
-
import { ChunkType } from '@mastra/core';
|
|
3
|
-
export interface HandleStreamChunkOptions {
|
|
4
|
-
conversation: ThreadMessageLike[];
|
|
5
|
-
chunk: ChunkType;
|
|
6
|
-
}
|
|
7
|
-
export declare const handleStreamChunk: ({ chunk, conversation }: HandleStreamChunkOptions) => ThreadMessageLike[];
|
|
8
|
-
interface HandleWorkflowChunkOptions {
|
|
9
|
-
workflowChunk: object;
|
|
10
|
-
conversation: ThreadMessageLike[];
|
|
11
|
-
entityName?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare const handleWorkflowChunk: ({ workflowChunk, conversation, entityName, }: HandleWorkflowChunkOptions) => ThreadMessageLike[];
|
|
14
|
-
interface HandleAgentChunkOptions {
|
|
15
|
-
agentChunk: any;
|
|
16
|
-
conversation: ThreadMessageLike[];
|
|
17
|
-
entityName: string;
|
|
18
|
-
}
|
|
19
|
-
export declare const handleAgentChunk: ({ agentChunk, conversation, entityName, }: HandleAgentChunkOptions) => ThreadMessageLike[];
|
|
20
|
-
interface CreateRootToolAssistantMessageOptions {
|
|
21
|
-
chunk: any;
|
|
22
|
-
entityName: string;
|
|
23
|
-
conversation: ThreadMessageLike[];
|
|
24
|
-
runId: string;
|
|
25
|
-
from: 'AGENT' | 'WORKFLOW';
|
|
26
|
-
networkMetadata: {
|
|
27
|
-
selectionReason?: string;
|
|
28
|
-
input?: string | Record<string, unknown>;
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
export declare const createRootToolAssistantMessage: ({ chunk, entityName, conversation, runId, from, networkMetadata, }: CreateRootToolAssistantMessageOptions) => ThreadMessageLike[];
|
|
32
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { default as React, ReactNode } from '../../node_modules/@types/react';
|
|
2
|
-
import { ThreadMessageLike } from '@assistant-ui/react';
|
|
3
|
-
export declare const MessagesProvider: ({ children }: {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export declare const useMessages: () => {
|
|
7
|
-
messages: ThreadMessageLike[];
|
|
8
|
-
setMessages: React.Dispatch<React.SetStateAction<ThreadMessageLike[]>>;
|
|
9
|
-
appendToLastMessage: (partial: string) => void;
|
|
10
|
-
};
|