@mastra/playground-ui 5.1.2-alpha.0 → 5.1.2-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.
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
2
2
 
3
3
  import * as React from 'react';
4
4
  declare const buttonVariants: (props?: ({
5
- variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
5
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
6
6
  size?: "default" | "sm" | "lg" | "icon" | null | undefined;
7
7
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
8
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
@@ -20,7 +20,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
20
20
  ref?: React.Ref<HTMLInputElement>;
21
21
  } & {
22
22
  asChild?: boolean;
23
- }, "asChild" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
23
+ }, "asChild" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "value" | "type" | "onChange"> & {
24
24
  value?: string;
25
25
  onValueChange?: (search: string) => void;
26
26
  } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
@@ -64,7 +64,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
64
64
  ref?: React.Ref<HTMLDivElement>;
65
65
  } & {
66
66
  asChild?: boolean;
67
- }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "disabled" | "value" | "onSelect"> & {
67
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "disabled" | "onSelect"> & {
68
68
  disabled?: boolean;
69
69
  onSelect?: (value: string) => void;
70
70
  value?: string;
@@ -1,6 +1,6 @@
1
1
  import * as ResizablePrimitive from 'react-resizable-panels';
2
2
  declare const ResizablePanelGroup: ({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => import("react/jsx-runtime").JSX.Element;
3
- declare const ResizablePanel: import('../../../node_modules/@types/react').ForwardRefExoticComponent<Omit<import('../../../node_modules/@types/react').HTMLAttributes<HTMLButtonElement | HTMLElement | HTMLDivElement | HTMLObjectElement | HTMLLinkElement | HTMLFormElement | HTMLSlotElement | HTMLStyleElement | HTMLTitleElement | HTMLDialogElement | HTMLImageElement | HTMLOptionElement | HTMLTableElement | HTMLMapElement | HTMLAnchorElement | HTMLHeadingElement | HTMLInputElement | HTMLLabelElement | HTMLLIElement | HTMLOListElement | HTMLParagraphElement | HTMLSpanElement | HTMLUListElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLegendElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOutputElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
3
+ declare const ResizablePanel: import('../../../node_modules/@types/react').ForwardRefExoticComponent<Omit<import('../../../node_modules/@types/react').HTMLAttributes<HTMLButtonElement | HTMLElement | HTMLDivElement | HTMLObjectElement | HTMLLinkElement | HTMLMapElement | HTMLFormElement | HTMLSlotElement | HTMLStyleElement | HTMLTitleElement | HTMLDialogElement | HTMLImageElement | HTMLOptionElement | HTMLTableElement | HTMLAnchorElement | HTMLHeadingElement | HTMLInputElement | HTMLLabelElement | HTMLLIElement | HTMLOListElement | HTMLParagraphElement | HTMLSpanElement | HTMLUListElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLegendElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOutputElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
4
4
  className?: string | undefined;
5
5
  collapsedSize?: number | undefined;
6
6
  collapsible?: boolean | undefined;
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from '../../node_modules/@types/react';
2
+ import { MastraClient } from '@mastra/client-js';
3
+
4
+ export declare const MastraClientProvider: ({ children, baseUrl, headers, }: {
5
+ children: ReactNode;
6
+ baseUrl?: string;
7
+ headers?: Record<string, string>;
8
+ }) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const useMastraClient: () => MastraClient;
@@ -1,3 +1,3 @@
1
1
  import { ChatProps } from '../../../types';
2
2
 
3
- export declare const AgentChat: ({ agentId, agentName, threadId, initialMessages, memory, baseUrl, refreshThreadList, showFileSupport, }: ChatProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const AgentChat: ({ agentId, agentName, threadId, initialMessages, memory, refreshThreadList, showFileSupport, }: ChatProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,3 @@
1
- export declare function AgentEvals({ agentId, baseUrl }: {
1
+ export declare function AgentEvals({ agentId }: {
2
2
  agentId: string;
3
- baseUrl?: string;
4
3
  }): import("react/jsx-runtime").JSX.Element;
@@ -3,9 +3,8 @@ import { RefinedTrace } from '../../traces/types';
3
3
  export interface AgentTracesProps {
4
4
  className?: string;
5
5
  traces: RefinedTrace[];
6
- isLoading: boolean;
7
6
  error: {
8
7
  message: string;
9
8
  } | null;
10
9
  }
11
- export declare function AgentTraces({ className, traces, isLoading, error }: AgentTracesProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function AgentTraces({ className, traces, error }: AgentTracesProps): import("react/jsx-runtime").JSX.Element;
@@ -6,7 +6,6 @@ export type TraceContextType = {
6
6
  trace: Span[] | null;
7
7
  setTrace: React.Dispatch<React.SetStateAction<Span[] | null>>;
8
8
  traces: RefinedTrace[];
9
- setTraces: React.Dispatch<React.SetStateAction<RefinedTrace[]>>;
10
9
  currentTraceIndex: number;
11
10
  setCurrentTraceIndex: React.Dispatch<React.SetStateAction<number>>;
12
11
  nextTrace: () => void;
@@ -16,7 +15,7 @@ export type TraceContextType = {
16
15
  clearData: () => void;
17
16
  };
18
17
  export declare const TraceContext: import('../../../../node_modules/@types/react').Context<TraceContextType>;
19
- export declare function TraceProvider({ children, initialTraces, }: {
18
+ export declare function TraceProvider({ children, initialTraces: traces, }: {
20
19
  children: React.ReactNode;
21
20
  initialTraces?: RefinedTrace[];
22
21
  }): import("react/jsx-runtime").JSX.Element;
@@ -2,9 +2,8 @@ import { RefinedTrace } from './types';
2
2
 
3
3
  export interface TracesTableProps {
4
4
  traces: RefinedTrace[];
5
- isLoading: boolean;
6
5
  error: {
7
6
  message: string;
8
7
  } | null;
9
8
  }
10
- export declare const TracesTable: ({ traces, isLoading, error }: TracesTableProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const TracesTable: ({ traces, error }: TracesTableProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,4 @@
1
1
 
2
- export declare function LegacyWorkflowGraph({ workflowId, baseUrl }: {
2
+ export declare function LegacyWorkflowGraph({ workflowId }: {
3
3
  workflowId: string;
4
- baseUrl: string;
5
4
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,4 @@
1
- export declare function LegacyWorkflowTrigger({ workflowId, baseUrl, setRunId, }: {
1
+ export declare function LegacyWorkflowTrigger({ workflowId, setRunId, }: {
2
2
  workflowId: string;
3
- baseUrl: string;
4
3
  setRunId?: (runId: string) => void;
5
4
  }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,10 +1,9 @@
1
1
 
2
2
  export interface WorkflowGraphProps {
3
3
  workflowId: string;
4
- baseUrl: string;
5
4
  onShowTrace: ({ runId, stepName }: {
6
5
  runId: string;
7
6
  stepName: string;
8
7
  }) => void;
9
8
  }
10
- export declare function WorkflowGraph({ workflowId, baseUrl, onShowTrace }: WorkflowGraphProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function WorkflowGraph({ workflowId, onShowTrace }: WorkflowGraphProps): import("react/jsx-runtime").JSX.Element;
@@ -2,11 +2,10 @@ import { RefinedTrace } from '../../traces/types';
2
2
 
3
3
  export interface WorkflowTracesProps {
4
4
  traces: RefinedTrace[];
5
- isLoading: boolean;
6
5
  error: {
7
6
  message: string;
8
7
  } | null;
9
8
  runId?: string;
10
9
  stepName?: string;
11
10
  }
12
- export declare function WorkflowTraces({ traces, isLoading, error, runId, stepName }: WorkflowTracesProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function WorkflowTraces({ traces, error, runId, stepName }: WorkflowTracesProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,4 @@
1
- export declare function WorkflowTrigger({ workflowId, baseUrl, setRunId, }: {
1
+ export declare function WorkflowTrigger({ workflowId, setRunId }: {
2
2
  workflowId: string;
3
- baseUrl: string;
4
3
  setRunId?: (runId: string) => void;
5
4
  }): import("react/jsx-runtime").JSX.Element | null;
@@ -12,7 +12,7 @@ export type Evals = {
12
12
  globalRunId: string;
13
13
  testInfo?: TestInfo;
14
14
  };
15
- export declare const useEvalsByAgentId: (agentId: string, type: "ci" | "live", baseUrl?: string) => {
15
+ export declare const useEvalsByAgentId: (agentId: string, type: "ci" | "live") => {
16
16
  evals: Evals[];
17
17
  isLoading: boolean;
18
18
  refetchEvals: (_agentId?: string) => Promise<void>;
@@ -1,6 +1,6 @@
1
1
  import { RefinedTrace } from '../domains/traces/types';
2
2
 
3
- export declare const useTraces: (componentName: string, baseUrl: string, isWorkflow?: boolean) => {
3
+ export declare const useTraces: (componentName: string, isWorkflow?: boolean) => {
4
4
  traces: RefinedTrace[];
5
5
  firstCallLoading: boolean;
6
6
  error: {
@@ -15,15 +15,15 @@ export type ExtendedWorkflowWatchResult = WorkflowWatchResult & {
15
15
  stack?: string;
16
16
  } | null;
17
17
  };
18
- export declare const useLegacyWorkflow: (workflowId: string, baseUrl: string) => {
18
+ export declare const useLegacyWorkflow: (workflowId: string) => {
19
19
  legacyWorkflow: LegacyWorkflow<import('@mastra/core/workflows/legacy').LegacyStep<string, any, any, import('@mastra/core/workflows/legacy').StepExecutionContext<any, import('@mastra/core/workflows/legacy').WorkflowContext<any, import('@mastra/core/workflows/legacy').LegacyStep<string, any, any, any>[], Record<string, any>>>>[], string, any, any> | null;
20
20
  isLoading: boolean;
21
21
  };
22
- export declare const useWorkflow: (workflowId: string, baseUrl: string) => {
22
+ export declare const useWorkflow: (workflowId: string) => {
23
23
  workflow: GetWorkflowResponse | null;
24
24
  isLoading: boolean;
25
25
  };
26
- export declare const useExecuteWorkflow: (baseUrl: string) => {
26
+ export declare const useExecuteWorkflow: () => {
27
27
  startWorkflowRun: ({ workflowId, runId, input, runtimeContext: playgroundRuntimeContext, }: {
28
28
  workflowId: string;
29
29
  runId: string;
@@ -54,7 +54,7 @@ export declare const useExecuteWorkflow: (baseUrl: string) => {
54
54
  runtimeContext: Record<string, any>;
55
55
  }) => Promise<import('@mastra/client-js').WorkflowRunResult>;
56
56
  };
57
- export declare const useWatchWorkflow: (baseUrl: string) => {
57
+ export declare const useWatchWorkflow: () => {
58
58
  watchLegacyWorkflow: ({ workflowId, runId }: {
59
59
  workflowId: string;
60
60
  runId: string;
@@ -68,7 +68,7 @@ export declare const useWatchWorkflow: (baseUrl: string) => {
68
68
  isWatchingWorkflow: boolean;
69
69
  watchResult: ExtendedWorkflowWatchResult | null;
70
70
  };
71
- export declare const useResumeWorkflow: (baseUrl: string) => {
71
+ export declare const useResumeWorkflow: () => {
72
72
  resumeLegacyWorkflow: ({ workflowId, stepId, runId, context, }: {
73
73
  workflowId: string;
74
74
  stepId: string;
@@ -1,4 +1,5 @@
1
1
 
2
+ export * from './contexts/mastra-client-context';
2
3
  export * from './domains/agents/index';
3
4
  export * from './domains/networks/index';
4
5
  export * from './domains/workflows/index';
@@ -20,7 +21,6 @@ export * from './ds/icons/index';
20
21
  export * from './lib/polls';
21
22
  export * from './hooks/use-speech-recognition';
22
23
  export { useTraces } from './hooks/index';
23
- export { TraceContext, TraceProvider } from './domains/traces/context/trace-context';
24
24
  export type { TraceContextType } from './domains/traces/context/trace-context';
25
25
  export { refineTraces } from './domains/traces/utils';
26
26
  export * from './store/playground-store';
@@ -1,3 +1,3 @@
1
1
  import { MastraClient } from '@mastra/client-js';
2
2
 
3
- export declare const createMastraClient: (baseUrl?: string) => MastraClient;
3
+ export declare const createMastraClient: (baseUrl?: string, mastraClientHeaders?: Record<string, string>) => MastraClient;
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from '../../node_modules/@types/react';
2
2
  import { ChatProps } from '../types';
3
3
 
4
- export declare function MastraRuntimeProvider({ children, agentId, initialMessages, agentName, memory, threadId, baseUrl, refreshThreadList, modelSettings, chatWithGenerate, runtimeContext, }: Readonly<{
4
+ export declare function MastraRuntimeProvider({ children, agentId, initialMessages, agentName, memory, threadId, refreshThreadList, modelSettings, chatWithGenerate, runtimeContext, }: Readonly<{
5
5
  children: ReactNode;
6
6
  }> & ChatProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from '../../node_modules/@types/react';
2
2
  import { ChatProps } from '../types';
3
3
 
4
- export declare function MastraNetworkRuntimeProvider({ children, agentId, initialMessages, memory, threadId, baseUrl, refreshThreadList, modelSettings, }: Readonly<{
4
+ export declare function MastraNetworkRuntimeProvider({ children, agentId, initialMessages, memory, threadId, refreshThreadList, modelSettings, }: Readonly<{
5
5
  children: ReactNode;
6
6
  }> & ChatProps): import("react/jsx-runtime").JSX.Element;
@@ -21,7 +21,6 @@ export interface ChatProps {
21
21
  threadId?: string;
22
22
  initialMessages?: Message[];
23
23
  memory?: boolean;
24
- baseUrl?: string;
25
24
  refreshThreadList?: () => void;
26
25
  modelSettings?: ModelSettings;
27
26
  chatWithGenerate?: boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mastra/playground-ui",
3
3
  "type": "module",
4
- "version": "5.1.2-alpha.0",
4
+ "version": "5.1.2-alpha.2",
5
5
  "description": "Mastra Playground components",
6
6
  "main": "dist/index.umd.js",
7
7
  "module": "dist/index.es.js",
@@ -92,10 +92,10 @@
92
92
  "use-debounce": "^10.0.4",
93
93
  "zod": "^3.24.3",
94
94
  "zustand": "^5.0.3",
95
- "@mastra/client-js": "^0.10.2-alpha.0"
95
+ "@mastra/client-js": "^0.10.2-alpha.1"
96
96
  },
97
97
  "peerDependencies": {
98
- "@mastra/core": "^0.10.0",
98
+ "@mastra/core": "^0.10.0-alpha.0",
99
99
  "lucide-react": "^0.474.0",
100
100
  "react": ">=19.0.0",
101
101
  "react-dom": ">=19.0.0",
@@ -117,7 +117,7 @@
117
117
  "vite": "^6.0.0",
118
118
  "vite-plugin-dts": "^3.9.1",
119
119
  "vite-plugin-lib-inject-css": "^2.2.1",
120
- "@mastra/core": "0.10.2-alpha.0"
120
+ "@mastra/core": "0.10.2-alpha.3"
121
121
  },
122
122
  "scripts": {
123
123
  "dev": "vite",