@mastra/playground-ui 6.5.0-alpha.0 → 6.5.0-alpha.2

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.
Files changed (57) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/index.cjs.js +1266 -880
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.es.js +1249 -869
  5. package/dist/index.es.js.map +1 -1
  6. package/dist/src/components/assistant-ui/tools/badges/badge-wrapper.d.ts +2 -1
  7. package/dist/src/components/ui/containers/buttons-group.d.ts +6 -0
  8. package/dist/src/components/ui/containers/index.d.ts +2 -0
  9. package/dist/src/components/ui/containers/sections.d.ts +6 -0
  10. package/dist/src/components/ui/elements/index.d.ts +3 -0
  11. package/dist/src/components/ui/elements/main-sidebar/index.d.ts +1 -0
  12. package/dist/src/components/ui/elements/main-sidebar/main-sidebar-bottom.d.ts +6 -0
  13. package/dist/src/components/ui/elements/main-sidebar/main-sidebar-context.d.ts +12 -0
  14. package/dist/src/components/ui/elements/main-sidebar/main-sidebar-nav-header.d.ts +8 -0
  15. package/dist/src/components/ui/elements/main-sidebar/main-sidebar-nav-link.d.ts +17 -0
  16. package/dist/src/components/ui/elements/main-sidebar/main-sidebar-nav-list.d.ts +12 -0
  17. package/dist/src/components/ui/elements/main-sidebar/main-sidebar-nav-section.d.ts +13 -0
  18. package/dist/src/components/ui/elements/main-sidebar/main-sidebar-nav-separator.d.ts +5 -0
  19. package/dist/src/components/ui/elements/main-sidebar/main-sidebar-nav.d.ts +6 -0
  20. package/dist/src/components/ui/elements/main-sidebar/main-sidebar-root.d.ts +6 -0
  21. package/dist/src/components/ui/elements/main-sidebar/main-sidebar.d.ts +21 -0
  22. package/dist/src/components/ui/elements/notification/index.d.ts +1 -0
  23. package/dist/src/components/ui/elements/notification/notification.d.ts +9 -0
  24. package/dist/src/components/ui/elements/section/index.d.ts +1 -0
  25. package/dist/src/components/ui/elements/section/section-header.d.ts +7 -0
  26. package/dist/src/components/ui/elements/section/section-heading.d.ts +8 -0
  27. package/dist/src/components/ui/elements/section/section-root.d.ts +5 -0
  28. package/dist/src/components/ui/elements/section/section.d.ts +8 -0
  29. package/dist/src/components/ui/elements/side-dialog/index.d.ts +0 -6
  30. package/dist/src/components/ui/elements/side-dialog/side-dialog-code-section.d.ts +3 -1
  31. package/dist/src/components/ui/elements/side-dialog/side-dialog-content.d.ts +1 -14
  32. package/dist/src/components/ui/elements/side-dialog/side-dialog-nav.d.ts +6 -0
  33. package/dist/src/components/ui/elements/side-dialog/side-dialog-root.d.ts +11 -0
  34. package/dist/src/components/ui/elements/side-dialog/side-dialog-top.d.ts +2 -4
  35. package/dist/src/components/ui/elements/side-dialog/side-dialog.d.ts +16 -12
  36. package/dist/src/components/ui/elements/tabs/tabs-content.d.ts +7 -0
  37. package/dist/src/components/ui/elements/tabs/tabs-list.d.ts +7 -0
  38. package/dist/src/components/ui/elements/tabs/tabs-root.d.ts +9 -0
  39. package/dist/src/components/ui/elements/tabs/tabs-tab.d.ts +8 -0
  40. package/dist/src/components/ui/elements/tabs/tabs.d.ts +20 -36
  41. package/dist/src/domains/agents/utils/__tests__/extractPrompt.test.d.ts +1 -0
  42. package/dist/src/domains/observability/components/index.d.ts +3 -0
  43. package/dist/src/domains/observability/components/span-details.d.ts +1 -2
  44. package/dist/src/domains/observability/components/span-dialog.d.ts +8 -2
  45. package/dist/src/domains/observability/components/span-score-list.d.ts +17 -0
  46. package/dist/src/domains/observability/components/span-scoring.d.ts +6 -0
  47. package/dist/src/domains/observability/components/span-tabs.d.ts +16 -0
  48. package/dist/src/domains/observability/components/trace-dialog.d.ts +4 -2
  49. package/dist/src/domains/observability/components/trace-timeline.d.ts +1 -4
  50. package/dist/src/domains/observability/components/traces-list.d.ts +5 -1
  51. package/dist/src/domains/scores/components/score-dialog.d.ts +5 -3
  52. package/dist/src/domains/scores/hooks/use-trace-span-scores.d.ts +7 -0
  53. package/dist/src/domains/scores/hooks/use-trigger-scorer.d.ts +1 -1
  54. package/dist/src/domains/scores/index.d.ts +1 -0
  55. package/dist/src/index.d.ts +1 -0
  56. package/package.json +9 -7
  57. package/dist/src/domains/scores/components/scorers-dropdown.d.ts +0 -8
@@ -5,5 +5,6 @@ export interface BadgeWrapperProps {
5
5
  icon?: React.ReactNode;
6
6
  collapsible?: boolean;
7
7
  extraInfo?: React.ReactNode;
8
+ 'data-testid'?: string;
8
9
  }
9
- export declare const BadgeWrapper: ({ children, initialCollapsed, icon, title, collapsible, extraInfo, }: BadgeWrapperProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const BadgeWrapper: ({ children, initialCollapsed, icon, title, collapsible, extraInfo, "data-testid": dataTestId, }: BadgeWrapperProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ type ButtonsGroupProps = {
2
+ children: React.ReactNode;
3
+ className?: string;
4
+ };
5
+ export declare function ButtonsGroup({ children, className }: ButtonsGroupProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1 +1,3 @@
1
1
  export * from './MainContent';
2
+ export * from './buttons-group';
3
+ export * from './sections';
@@ -0,0 +1,6 @@
1
+ type SectionsProps = {
2
+ children: React.ReactNode;
3
+ className?: string;
4
+ };
5
+ export declare function Sections({ children, className }: SectionsProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -5,3 +5,6 @@ export * from './side-dialog';
5
5
  export * from './headers';
6
6
  export * from './date-time-picker';
7
7
  export * from './text';
8
+ export * from './notification';
9
+ export * from './section';
10
+ export * from './main-sidebar';
@@ -0,0 +1 @@
1
+ export * from './main-sidebar';
@@ -0,0 +1,6 @@
1
+ type MainSidebarBottomProps = {
2
+ children: React.ReactNode;
3
+ className?: string;
4
+ };
5
+ export declare function MainSidebarBottom({ children, className }: MainSidebarBottomProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,12 @@
1
+ import { default as React } from '../../../../../node_modules/@types/react';
2
+ export type SidebarState = 'default' | 'collapsed';
3
+ type MainSidebarContext = {
4
+ state: SidebarState;
5
+ toggleSidebar: () => void;
6
+ };
7
+ declare const MainSidebarContext: React.Context<MainSidebarContext | null>;
8
+ export declare function useMainSidebar(): MainSidebarContext;
9
+ export declare function MainSidebarProvider({ children }: {
10
+ children: React.ReactNode;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,8 @@
1
+ import { SidebarState } from './main-sidebar-context';
2
+ type MainSidebarNavHeaderProps = {
3
+ children?: React.ReactNode;
4
+ className?: string;
5
+ state?: SidebarState;
6
+ };
7
+ export declare function MainSidebarNavHeader({ children, className, state }: MainSidebarNavHeaderProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,17 @@
1
+ import { SidebarState } from './main-sidebar-context';
2
+ export type NavLink = {
3
+ name: string;
4
+ url: string;
5
+ icon?: React.ReactNode;
6
+ isActive?: boolean;
7
+ variant?: 'default' | 'featured';
8
+ };
9
+ type MainSidebarNavLinkProps = {
10
+ link?: NavLink;
11
+ isActive?: boolean;
12
+ state?: SidebarState;
13
+ children?: React.ReactNode;
14
+ className?: string;
15
+ };
16
+ export declare function MainSidebarNavLink({ link, state, children, isActive, className, }: MainSidebarNavLinkProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,12 @@
1
+ import { NavLink } from './main-sidebar-nav-link';
2
+ export type NavSection = {
3
+ key: string;
4
+ title?: string;
5
+ links: NavLink[];
6
+ };
7
+ type MainSidebarNavListProps = {
8
+ children: React.ReactNode;
9
+ className?: string;
10
+ };
11
+ export declare function MainSidebarNavList({ children, className }: MainSidebarNavListProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,13 @@
1
+ import { NavLink } from './main-sidebar-nav-link';
2
+ export type NavSection = {
3
+ key: string;
4
+ title?: string;
5
+ links: NavLink[];
6
+ separator?: boolean;
7
+ };
8
+ type MainSidebarNavSectionProps = {
9
+ children: React.ReactNode;
10
+ className?: string;
11
+ };
12
+ export declare function MainSidebarNavSection({ children, className }: MainSidebarNavSectionProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,5 @@
1
+ type MainSidebarNavSeparatorProps = {
2
+ className?: string;
3
+ };
4
+ export declare function MainSidebarNavSeparator({ className }: MainSidebarNavSeparatorProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,6 @@
1
+ type MainSidebarNavProps = {
2
+ children: React.ReactNode;
3
+ className?: string;
4
+ };
5
+ export declare function MainSidebarNav({ children, className }: MainSidebarNavProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ type MainSidebarRootProps = {
2
+ children: React.ReactNode;
3
+ className?: string;
4
+ };
5
+ export declare function MainSidebarRoot({ children, className }: MainSidebarRootProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,21 @@
1
+ import { MainSidebarRoot } from './main-sidebar-root';
2
+ import { MainSidebarBottom } from './main-sidebar-bottom';
3
+ import { MainSidebarNav } from './main-sidebar-nav';
4
+ import { MainSidebarNavSection } from './main-sidebar-nav-section';
5
+ import { MainSidebarNavLink } from './main-sidebar-nav-link';
6
+ import { MainSidebarNavHeader } from './main-sidebar-nav-header';
7
+ import { MainSidebarNavList } from './main-sidebar-nav-list';
8
+ import { MainSidebarNavSeparator } from './main-sidebar-nav-separator';
9
+ export { MainSidebarProvider } from './main-sidebar-context';
10
+ export { useMainSidebar } from './main-sidebar-context';
11
+ export { type NavLink } from './main-sidebar-nav-link';
12
+ export { type NavSection } from './main-sidebar-nav-section';
13
+ export declare const MainSidebar: typeof MainSidebarRoot & {
14
+ Bottom: typeof MainSidebarBottom;
15
+ Nav: typeof MainSidebarNav;
16
+ NavSection: typeof MainSidebarNavSection;
17
+ NavLink: typeof MainSidebarNavLink;
18
+ NavHeader: typeof MainSidebarNavHeader;
19
+ NavList: typeof MainSidebarNavList;
20
+ NavSeparator: typeof MainSidebarNavSeparator;
21
+ };
@@ -0,0 +1 @@
1
+ export * from './notification';
@@ -0,0 +1,9 @@
1
+ type Notification = {
2
+ children: React.ReactNode;
3
+ className?: string;
4
+ isVisible?: boolean;
5
+ autoDismiss?: boolean;
6
+ dismissTime?: number;
7
+ };
8
+ export declare function Notification({ children, className, isVisible, autoDismiss, dismissTime }: Notification): import("react/jsx-runtime").JSX.Element | null;
9
+ export {};
@@ -0,0 +1 @@
1
+ export * from './section';
@@ -0,0 +1,7 @@
1
+ import { default as React } from '../../../../../node_modules/@types/react';
2
+ type SectionHeaderProps = {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ };
6
+ export declare function SectionHeader({ children, className }: SectionHeaderProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ import { default as React } from '../../../../../node_modules/@types/react';
2
+ type SectionHeadingProps = {
3
+ headingLevel?: 'h2' | 'h3' | 'h4';
4
+ children: React.ReactNode;
5
+ className?: string;
6
+ };
7
+ export declare function SectionHeading({ headingLevel, children, className }: SectionHeadingProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,5 @@
1
+ export type SectionRootProps = {
2
+ children: React.ReactNode;
3
+ className?: string;
4
+ };
5
+ export declare function SectionRoot({ children, className }: SectionRootProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { SectionRoot } from './section-root';
2
+ import { SectionHeader } from './section-header';
3
+ import { SectionHeading } from './section-heading';
4
+ export { type SectionRootProps as SectionProps } from './section-root';
5
+ export declare const Section: typeof SectionRoot & {
6
+ Header: typeof SectionHeader;
7
+ Heading: typeof SectionHeading;
8
+ };
@@ -1,7 +1 @@
1
1
  export * from './side-dialog';
2
- export * from './side-dialog-header';
3
- export * from './side-dialog-footer';
4
- export * from './side-dialog-content';
5
- export * from './side-dialog-top';
6
- export * from './side-dialog-code-section';
7
- export * from './side-dialog-heading';
@@ -1,6 +1,8 @@
1
1
  export type SideDialogCodeSectionProps = {
2
2
  title: string;
3
+ icon?: React.ReactNode;
3
4
  codeStr?: string;
4
5
  simplified?: boolean;
5
6
  };
6
- export declare function SideDialogCodeSection({ codeStr, title, simplified }: SideDialogCodeSectionProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function SideDialogCodeSection({ codeStr, title, icon, simplified }: SideDialogCodeSectionProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function containsInnerNewline(obj: unknown): boolean;
@@ -5,17 +5,4 @@ export type SideDialogContentProps = {
5
5
  isFullHeight?: boolean;
6
6
  variant?: 'default' | 'confirmation';
7
7
  };
8
- export declare function SideDialogContent({ children, className, isCentered, isFullHeight, variant }: SideDialogContentProps): import("react/jsx-runtime").JSX.Element;
9
- export type SideDialogSectionProps = {
10
- children?: React.ReactNode;
11
- };
12
- export declare function SideDialogSection({ children }: SideDialogSectionProps): import("react/jsx-runtime").JSX.Element;
13
- type SideDialogKeyValueListProps = {
14
- items: {
15
- key: string;
16
- value: React.ReactNode;
17
- }[];
18
- className?: string;
19
- };
20
- export declare function SideDialogKeyValueList({ items, className }: SideDialogKeyValueListProps): import("react/jsx-runtime").JSX.Element;
21
- export {};
8
+ export declare function SideDialogContent({ children, className }: SideDialogContentProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ export type SideDialogNavProps = {
2
+ onNext?: (() => void) | null;
3
+ onPrevious?: (() => void) | null;
4
+ className?: string;
5
+ };
6
+ export declare function SideDialogNav({ onNext, onPrevious, className }: SideDialogNavProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ export type SideDialogRootProps = {
2
+ variant?: 'default' | 'confirmation';
3
+ dialogTitle: string;
4
+ dialogDescription: string;
5
+ isOpen: boolean;
6
+ onClose?: () => void;
7
+ children?: React.ReactNode;
8
+ className?: string;
9
+ level?: 1 | 2 | 3;
10
+ };
11
+ export declare function SideDialogRoot({ dialogTitle, dialogDescription, isOpen, onClose, children, variant, level, className, }: SideDialogRootProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,6 @@
1
1
  export type SideDialogTopProps = {
2
2
  children?: React.ReactNode;
3
- onNext?: (() => void) | null;
4
- onPrevious?: (() => void) | null;
5
- showInnerNav?: boolean;
3
+ withTopSeparator?: boolean;
6
4
  className?: string;
7
5
  };
8
- export declare function SideDialogTop({ children, onNext, onPrevious, showInnerNav, className }: SideDialogTopProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function SideDialogTop({ children, withTopSeparator, className }: SideDialogTopProps): import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,16 @@
1
- export declare function SideDialog({ dialogTitle, dialogDescription, isOpen, onClose, children, variant, hasCloseButton, className, }: {
2
- variant?: 'default' | 'confirmation';
3
- dialogTitle: string;
4
- dialogDescription: string;
5
- isOpen: boolean;
6
- onClose?: () => void;
7
- onNext?: (() => void) | null;
8
- onPrevious?: (() => void) | null;
9
- children?: React.ReactNode;
10
- hasCloseButton?: boolean;
11
- className?: string;
12
- }): import("react/jsx-runtime").JSX.Element;
1
+ import { SideDialogRoot } from './side-dialog-root';
2
+ import { SideDialogCodeSection } from './side-dialog-code-section';
3
+ import { SideDialogHeading } from './side-dialog-heading';
4
+ import { SideDialogContent } from './side-dialog-content';
5
+ import { SideDialogHeader } from './side-dialog-header';
6
+ import { SideDialogTop } from './side-dialog-top';
7
+ import { SideDialogNav } from './side-dialog-nav';
8
+ export { type SideDialogRootProps } from './side-dialog-root';
9
+ export declare const SideDialog: typeof SideDialogRoot & {
10
+ Top: typeof SideDialogTop;
11
+ Header: typeof SideDialogHeader;
12
+ Heading: typeof SideDialogHeading;
13
+ Content: typeof SideDialogContent;
14
+ CodeSection: typeof SideDialogCodeSection;
15
+ Nav: typeof SideDialogNav;
16
+ };
@@ -0,0 +1,7 @@
1
+ type TabContentProps = {
2
+ children: React.ReactNode;
3
+ value: string;
4
+ className?: string;
5
+ };
6
+ export declare const TabContent: ({ children, value, className }: TabContentProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ type TabListProps = {
2
+ children: React.ReactNode;
3
+ className?: string;
4
+ variant?: 'default' | 'buttons';
5
+ };
6
+ export declare const TabList: ({ children, variant, className }: TabListProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -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 {};
@@ -0,0 +1,8 @@
1
+ type TabProps = {
2
+ children: React.ReactNode;
3
+ value: string;
4
+ onClick?: () => void;
5
+ className?: string;
6
+ };
7
+ export declare const Tab: ({ children, value, onClick, className }: TabProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -1,40 +1,24 @@
1
- type TabsProps<T extends string> = {
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 };
@@ -5,3 +5,6 @@ export * from './shared';
5
5
  export * from './trace-dialog';
6
6
  export * from './traces-tools';
7
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, onScorerTriggered }: SpanDetailsProps): import("react/jsx-runtime").JSX.Element | null;
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
- onScorerTriggered: (scorerName: string, traceId: string, spanId?: string) => void;
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, onScorerTriggered, }: SpanDialogProps): import("react/jsx-runtime").JSX.Element;
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,6 @@
1
+ export interface SpanScoringProps {
2
+ traceId?: string;
3
+ spanId?: string;
4
+ entityType?: string;
5
+ }
6
+ export declare const SpanScoring: ({ traceId, spanId, entityType }: SpanScoringProps) => import("react/jsx-runtime").JSX.Element;
@@ -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
- onScorerTriggered: (scorerName: string, traceId: string, spanId?: string) => void;
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, onScorerTriggered, initialSpanId, }: TraceDialogProps): import("react/jsx-runtime").JSX.Element;
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({ spans, hierarchicalSpans, onSpanClick, selectedSpanId, isLoading, className, }: TraceTimelineProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function TraceTimeline({ hierarchicalSpans, onSpanClick, selectedSpanId, isLoading }: TraceTimelineProps): import("react/jsx-runtime").JSX.Element;
12
9
  export {};
@@ -4,10 +4,14 @@ export declare const tracesListColumns: {
4
4
  label: string;
5
5
  size: string;
6
6
  }[];
7
+ type AITrace = Pick<AISpanRecord, 'traceId' | 'name'> & {
8
+ attributes?: Record<string, any> | null;
9
+ createdAt: Date | string;
10
+ };
7
11
  type TracesListProps = {
8
12
  selectedTraceId?: string;
9
13
  onTraceClick?: (id: string) => void;
10
- traces?: AISpanRecord[];
14
+ traces?: AITrace[];
11
15
  errorMsg?: string;
12
16
  setEndOfListElement?: (element: HTMLDivElement | null) => void;
13
17
  filtersApplied?: boolean;
@@ -1,13 +1,15 @@
1
- import { MastraScorer } from '@mastra/core/scores';
1
+ import { SideDialogRootProps } from '../../../components/ui/elements';
2
2
  import { ClientScoreRowData } from '@mastra/client-js';
3
3
  type ScoreDialogProps = {
4
4
  score?: ClientScoreRowData;
5
- scorer?: MastraScorer;
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({ scorer, score, isOpen, onClose, onNext, onPrevious, computeTraceLink, }: ScoreDialogProps): import("react/jsx-runtime").JSX.Element;
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,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: (onScorerTriggered: (scorerName: string, traceId: string, spanId?: string) => void) => import('@tanstack/react-query').UseMutationResult<{
6
+ export declare const useTriggerScorer: () => import('@tanstack/react-query').UseMutationResult<{
7
7
  status: string;
8
8
  message: string;
9
9
  }, Error, TriggerScoreArgs, unknown>;
@@ -3,3 +3,4 @@ export * from './components/score-dialog';
3
3
  export * from './components/scores-tools';
4
4
  export * from './hooks/use-scorers';
5
5
  export * from './components/scorers-table/scorers-table';
6
+ export * from './hooks/use-trace-span-scores';
@@ -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';