@mastra/playground-ui 6.2.2 → 6.2.3-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.
Files changed (33) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/index.cjs.js +1370 -2120
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.es.js +1275 -2019
  5. package/dist/index.es.js.map +1 -1
  6. package/dist/src/components/assistant-ui/messages/assistant-message.d.ts +2 -1
  7. package/dist/src/components/assistant-ui/thread.d.ts +2 -1
  8. package/dist/src/components/ui/button.d.ts +1 -1
  9. package/dist/src/components/ui/command.d.ts +2 -2
  10. package/dist/src/components/ui/resizable.d.ts +1 -1
  11. package/dist/src/domains/agents/components/agent-chat.d.ts +1 -1
  12. package/dist/src/domains/agents/components/agent-metadata/agent-metadata-model-list.d.ts +17 -0
  13. package/dist/src/domains/agents/components/agent-metadata/agent-metadata.d.ts +4 -1
  14. package/dist/src/domains/agents/components/agent-table/types.d.ts +2 -1
  15. package/dist/src/domains/agents/components/provider-map-icon.d.ts +1 -0
  16. package/dist/src/domains/workflows/components/workflow-table/types.d.ts +0 -1
  17. package/dist/src/domains/workflows/components/workflow-table/workflow-table.d.ts +2 -3
  18. package/dist/src/domains/workflows/context/workflow-run-context.d.ts +0 -3
  19. package/dist/src/domains/workflows/index.d.ts +0 -2
  20. package/dist/src/domains/workflows/workflow/utils.d.ts +0 -10
  21. package/dist/src/hooks/use-workflows.d.ts +1 -45
  22. package/dist/src/index.d.ts +1 -1
  23. package/dist/src/services/stream-chunk-message.d.ts +9 -18
  24. package/dist/src/types.d.ts +9 -1
  25. package/package.json +9 -7
  26. package/dist/src/contexts/mastra-client-context.d.ts +0 -8
  27. package/dist/src/domains/workflows/context/legacy-workflow-nested-graph-context.d.ts +0 -13
  28. package/dist/src/domains/workflows/workflow/legacy-workflow-graph-inner.d.ts +0 -4
  29. package/dist/src/domains/workflows/workflow/legacy-workflow-graph.d.ts +0 -3
  30. package/dist/src/domains/workflows/workflow/legacy-workflow-nested-graph.d.ts +0 -5
  31. package/dist/src/domains/workflows/workflow/legacy-workflow-nested-node.d.ts +0 -11
  32. package/dist/src/domains/workflows/workflow/legacy-workflow-status.d.ts +0 -6
  33. package/dist/src/domains/workflows/workflow/legacy-workflow-trigger.d.ts +0 -4
@@ -1,5 +1,6 @@
1
1
  import { ToolCallMessagePartComponent } from '@assistant-ui/react';
2
2
  export interface AssistantMessageProps {
3
3
  ToolFallback?: ToolCallMessagePartComponent;
4
+ hasModelList?: boolean;
4
5
  }
5
- export declare const AssistantMessage: ({ ToolFallback: ToolFallbackCustom }: AssistantMessageProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const AssistantMessage: ({ ToolFallback: ToolFallbackCustom, hasModelList }: AssistantMessageProps) => import("react/jsx-runtime").JSX.Element;
@@ -4,8 +4,9 @@ export interface ThreadProps {
4
4
  agentName?: string;
5
5
  agentId?: string;
6
6
  hasMemory?: boolean;
7
+ hasModelList?: boolean;
7
8
  }
8
- export declare const Thread: ({ ToolFallback, agentName, agentId, hasMemory }: ThreadProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const Thread: ({ ToolFallback, agentName, agentId, hasMemory, hasModelList }: ThreadProps) => import("react/jsx-runtime").JSX.Element;
9
10
  export interface ThreadWelcomeProps {
10
11
  agentName?: string;
11
12
  }
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from 'react';
3
3
  declare const buttonVariants: (props?: ({
4
- variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
4
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
5
5
  size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
7
  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>>, "value" | "type" | "onChange"> & {
23
+ }, "asChild" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "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>>, "value" | "disabled" | "onSelect"> & {
67
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "disabled" | "value" | "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 | HTMLMapElement | HTMLFormElement | HTMLSlotElement | HTMLStyleElement | HTMLTitleElement | HTMLDialogElement | HTMLImageElement | HTMLOptionElement | HTMLTableElement | HTMLAnchorElement | HTMLHeadingElement | HTMLInputElement | HTMLLabelElement | HTMLLIElement | HTMLOListElement | HTMLParagraphElement | HTMLSelectElement | 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 | 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 | HTMLFormElement | HTMLSlotElement | HTMLStyleElement | HTMLTitleElement | HTMLDialogElement | HTMLImageElement | HTMLOptionElement | HTMLTableElement | HTMLMapElement | HTMLAnchorElement | HTMLHeadingElement | HTMLInputElement | HTMLLabelElement | HTMLLIElement | HTMLOListElement | HTMLParagraphElement | HTMLSelectElement | 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 | 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;
@@ -1,2 +1,2 @@
1
1
  import { ChatProps } from '../../../types';
2
- export declare const AgentChat: ({ agentId, agentName, threadId, initialMessages, memory, refreshThreadList, modelVersion, }: ChatProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const AgentChat: ({ agentId, agentName, threadId, initialMessages, memory, refreshThreadList, modelVersion, modelList, }: ChatProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { GetAgentResponse, ReorderModelListParams, UpdateModelInModelListParams } from '@mastra/client-js';
2
+ type AgentMetadataModelListType = NonNullable<GetAgentResponse['modelList']>;
3
+ export interface AgentMetadataModelListProps {
4
+ modelList: AgentMetadataModelListType;
5
+ modelProviders: string[];
6
+ updateModelInModelList: AgentMetadataModelListItemProps['updateModelInModelList'];
7
+ reorderModelList: (params: ReorderModelListParams) => void;
8
+ }
9
+ export declare const AgentMetadataModelList: ({ modelList, modelProviders, updateModelInModelList, reorderModelList, }: AgentMetadataModelListProps) => import("react/jsx-runtime").JSX.Element;
10
+ interface AgentMetadataModelListItemProps {
11
+ modelConfig: AgentMetadataModelListType[number];
12
+ modelProviders: string[];
13
+ updateModelInModelList: (params: UpdateModelInModelListParams) => Promise<{
14
+ message: string;
15
+ }>;
16
+ }
17
+ export {};
@@ -1,6 +1,7 @@
1
1
  import { GetAgentResponse, GetToolResponse, GetWorkflowResponse } from '@mastra/client-js';
2
2
  import { ReactNode } from '../../../../../node_modules/@types/react';
3
3
  import { AgentMetadataModelSwitcherProps } from './agent-metadata-model-switcher';
4
+ import { AgentMetadataModelListProps } from './agent-metadata-model-list';
4
5
  export interface AgentMetadataProps {
5
6
  agentId: string;
6
7
  agent: GetAgentResponse;
@@ -8,6 +9,8 @@ export interface AgentMetadataProps {
8
9
  hasMemoryEnabled: boolean;
9
10
  modelProviders: string[];
10
11
  updateModel: AgentMetadataModelSwitcherProps['updateModel'];
12
+ updateModelInModelList: AgentMetadataModelListProps['updateModelInModelList'];
13
+ reorderModelList: AgentMetadataModelListProps['reorderModelList'];
11
14
  }
12
15
  export interface AgentMetadataNetworkListProps {
13
16
  agents: {
@@ -16,7 +19,7 @@ export interface AgentMetadataNetworkListProps {
16
19
  }[];
17
20
  }
18
21
  export declare const AgentMetadataNetworkList: ({ agents }: AgentMetadataNetworkListProps) => import("react/jsx-runtime").JSX.Element;
19
- export declare const AgentMetadata: ({ agentId, agent, promptSlot, hasMemoryEnabled, updateModel, modelProviders, }: AgentMetadataProps) => import("react/jsx-runtime").JSX.Element;
22
+ export declare const AgentMetadata: ({ agentId, agent, promptSlot, hasMemoryEnabled, updateModel, modelProviders, updateModelInModelList, reorderModelList, }: AgentMetadataProps) => import("react/jsx-runtime").JSX.Element;
20
23
  export interface AgentMetadataToolListProps {
21
24
  tools: GetToolResponse[];
22
25
  agentId: string;
@@ -1,4 +1,4 @@
1
- import { GetToolResponse } from '@mastra/client-js';
1
+ import { GetAgentResponse, GetToolResponse } from '@mastra/client-js';
2
2
  export type AgentTableData = {
3
3
  branch?: string;
4
4
  executedAt?: Date;
@@ -9,4 +9,5 @@ export type AgentTableData = {
9
9
  instructions: string;
10
10
  tools?: Record<string, GetToolResponse>;
11
11
  link: string;
12
+ modelList: GetAgentResponse['modelList'];
12
13
  };
@@ -1,5 +1,6 @@
1
1
  export declare const providerMapToIcon: {
2
2
  'openai.chat': import("react/jsx-runtime").JSX.Element;
3
+ 'openai.responses': import("react/jsx-runtime").JSX.Element;
3
4
  'anthropic.chat': import("react/jsx-runtime").JSX.Element;
4
5
  'anthropic.messages': import("react/jsx-runtime").JSX.Element;
5
6
  AZURE: import("react/jsx-runtime").JSX.Element;
@@ -2,6 +2,5 @@ export type WorkflowTableData = {
2
2
  id: string;
3
3
  name: string;
4
4
  stepsCount: number;
5
- isLegacy?: boolean;
6
5
  link: string;
7
6
  };
@@ -1,9 +1,8 @@
1
- import { GetLegacyWorkflowResponse, GetWorkflowResponse } from '@mastra/client-js';
1
+ import { GetWorkflowResponse } from '@mastra/client-js';
2
2
  export interface WorkflowTableProps {
3
3
  workflows?: Record<string, GetWorkflowResponse>;
4
- legacyWorkflows?: Record<string, GetLegacyWorkflowResponse>;
5
4
  isLoading: boolean;
6
5
  }
7
- export declare function WorkflowTable({ workflows, legacyWorkflows, isLoading }: WorkflowTableProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function WorkflowTable({ workflows, isLoading }: WorkflowTableProps): import("react/jsx-runtime").JSX.Element;
8
7
  export declare const WorkflowTableSkeleton: () => import("react/jsx-runtime").JSX.Element;
9
8
  export declare const EmptyWorkflowsTable: () => import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,6 @@
1
- import { ExtendedLegacyWorkflowRunResult } from '../../../hooks/use-workflows';
2
1
  import { WorkflowRunState } from '@mastra/core/workflows';
3
2
  import { WorkflowWatchResult } from '@mastra/client-js';
4
3
  type WorkflowRunContextType = {
5
- legacyResult: ExtendedLegacyWorkflowRunResult | null;
6
- setLegacyResult: React.Dispatch<React.SetStateAction<any>>;
7
4
  result: WorkflowWatchResult | null;
8
5
  setResult: React.Dispatch<React.SetStateAction<any>>;
9
6
  payload: any;
@@ -1,5 +1,3 @@
1
- export * from './workflow/legacy-workflow-graph';
2
- export * from './workflow/legacy-workflow-trigger';
3
1
  export * from './context/workflow-run-context';
4
2
  export * from './workflow/workflow-graph';
5
3
  export * from './workflow/workflow-trigger';
@@ -1,5 +1,4 @@
1
1
  import { Workflow } from '@mastra/core/workflows';
2
- import { StepCondition } from '@mastra/core/workflows/legacy';
3
2
  import { Node, Edge } from '@xyflow/react';
4
3
  export type ConditionConditionType = 'if' | 'else' | 'when' | 'until' | 'while' | 'dountil' | 'dowhile';
5
4
  export type Condition = {
@@ -21,7 +20,6 @@ export type Condition = {
21
20
  conj?: never;
22
21
  };
23
22
  export declare const pathAlphabet: string[];
24
- export declare function extractConditions(group: StepCondition<any, any>, type: ConditionConditionType): Condition[];
25
23
  export type WStep = {
26
24
  [key: string]: {
27
25
  id: string;
@@ -31,14 +29,6 @@ export type WStep = {
31
29
  stepSubscriberGraph?: any;
32
30
  };
33
31
  };
34
- export declare const contructLegacyNodesAndEdges: ({ stepGraph, stepSubscriberGraph, steps: mainSteps, }: {
35
- stepGraph: any;
36
- stepSubscriberGraph: any;
37
- steps?: WStep;
38
- }) => {
39
- nodes: Node[];
40
- edges: Edge[];
41
- };
42
32
  export declare const constructNodesAndEdges: ({ stepGraph, }: {
43
33
  stepGraph: Workflow["serializedStepGraph"];
44
34
  }) => {
@@ -1,12 +1,4 @@
1
- import { LegacyWorkflowRunResult, WorkflowWatchResult } from '@mastra/client-js';
2
- import { LegacyWorkflow } from '@mastra/core/workflows/legacy';
3
- export type ExtendedLegacyWorkflowRunResult = LegacyWorkflowRunResult & {
4
- sanitizedOutput?: string | null;
5
- sanitizedError?: {
6
- message: string;
7
- stack?: string;
8
- } | null;
9
- };
1
+ import { WorkflowWatchResult } from '@mastra/client-js';
10
2
  export type ExtendedWorkflowWatchResult = WorkflowWatchResult & {
11
3
  sanitizedOutput?: string | null;
12
4
  sanitizedError?: {
@@ -15,39 +7,3 @@ export type ExtendedWorkflowWatchResult = WorkflowWatchResult & {
15
7
  } | null;
16
8
  };
17
9
  export declare const useWorkflow: (workflowId?: string) => import('@tanstack/react-query').UseQueryResult<import('@mastra/client-js').GetWorkflowResponse | null, Error>;
18
- export declare const useLegacyWorkflow: (workflowId: string) => {
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
- isLoading: boolean;
21
- };
22
- export declare const useExecuteWorkflow: () => {
23
- startLegacyWorkflowRun: ({ workflowId, runId, input, }: {
24
- workflowId: string;
25
- runId: string;
26
- input: any;
27
- }) => Promise<void>;
28
- createLegacyWorkflowRun: ({ workflowId, prevRunId }: {
29
- workflowId: string;
30
- prevRunId?: string;
31
- }) => Promise<{
32
- runId: string;
33
- }>;
34
- };
35
- export declare const useWatchWorkflow: () => {
36
- watchLegacyWorkflow: ({ workflowId, runId }: {
37
- workflowId: string;
38
- runId: string;
39
- }) => Promise<void>;
40
- isWatchingLegacyWorkflow: boolean;
41
- legacyWatchResult: ExtendedLegacyWorkflowRunResult | null;
42
- };
43
- export declare const useResumeWorkflow: () => {
44
- resumeLegacyWorkflow: ({ workflowId, stepId, runId, context, }: {
45
- workflowId: string;
46
- stepId: string;
47
- runId: string;
48
- context: any;
49
- }) => Promise<{
50
- message: string;
51
- }>;
52
- isResumingLegacyWorkflow: boolean;
53
- };
@@ -1,4 +1,3 @@
1
- export * from './contexts/mastra-client-context';
2
1
  export * from './domains/agents/index';
3
2
  export * from './domains/networks/index';
4
3
  export * from './domains/scores/index';
@@ -42,3 +41,4 @@ export * from './components/ui/kbd';
42
41
  export * from './components/ui/collapsible';
43
42
  export * from './domains/conversation/index';
44
43
  export * from './lib/errors';
44
+ export * from './components/assistant-ui/tools/tool-fallback';
@@ -1,41 +1,32 @@
1
1
  import { ThreadMessageLike } from '@assistant-ui/react';
2
2
  import { ChunkType } from '@mastra/core';
3
3
  export interface HandleStreamChunkOptions {
4
- setMessages: React.Dispatch<React.SetStateAction<ThreadMessageLike[]>>;
4
+ conversation: ThreadMessageLike[];
5
5
  chunk: ChunkType;
6
- refreshWorkingMemory: () => Promise<void>;
7
- _sideEffects: {
8
- assistantMessageAdded: boolean;
9
- assistantToolCallAddedForUpdater: boolean;
10
- assistantToolCallAddedForContent: boolean;
11
- content: string;
12
- toolCallIdToName: React.RefObject<Record<string, string>>;
13
- };
14
6
  }
15
- export declare const handleStreamChunk: ({ chunk, setMessages, refreshWorkingMemory, _sideEffects, }: HandleStreamChunkOptions) => Promise<void>;
7
+ export declare const handleStreamChunk: ({ chunk, conversation }: HandleStreamChunkOptions) => ThreadMessageLike[];
16
8
  interface HandleWorkflowChunkOptions {
17
9
  workflowChunk: object;
18
- setMessages: React.Dispatch<React.SetStateAction<ThreadMessageLike[]>>;
19
- entityName: string;
10
+ conversation: ThreadMessageLike[];
11
+ entityName?: string;
20
12
  }
21
- export declare const handleWorkflowChunk: ({ workflowChunk, setMessages, entityName }: HandleWorkflowChunkOptions) => void;
13
+ export declare const handleWorkflowChunk: ({ workflowChunk, conversation, entityName, }: HandleWorkflowChunkOptions) => ThreadMessageLike[];
22
14
  interface HandleAgentChunkOptions {
23
15
  agentChunk: any;
24
- setMessages: React.Dispatch<React.SetStateAction<ThreadMessageLike[]>>;
16
+ conversation: ThreadMessageLike[];
25
17
  entityName: string;
26
18
  }
27
- export declare const handleAgentChunk: ({ agentChunk, setMessages, entityName }: HandleAgentChunkOptions) => void;
19
+ export declare const handleAgentChunk: ({ agentChunk, conversation, entityName, }: HandleAgentChunkOptions) => ThreadMessageLike[];
28
20
  interface CreateRootToolAssistantMessageOptions {
29
21
  chunk: any;
30
22
  entityName: string;
31
- setMessages: React.Dispatch<React.SetStateAction<ThreadMessageLike[]>>;
23
+ conversation: ThreadMessageLike[];
32
24
  runId: string;
33
- _sideEffects: HandleStreamChunkOptions['_sideEffects'];
34
25
  from: 'AGENT' | 'WORKFLOW';
35
26
  networkMetadata: {
36
27
  selectionReason?: string;
37
28
  input?: string | Record<string, unknown>;
38
29
  };
39
30
  }
40
- export declare const createRootToolAssistantMessage: ({ chunk, entityName, setMessages, runId, _sideEffects, from, networkMetadata, }: CreateRootToolAssistantMessageOptions) => void;
31
+ export declare const createRootToolAssistantMessage: ({ chunk, entityName, conversation, runId, from, networkMetadata, }: CreateRootToolAssistantMessageOptions) => ThreadMessageLike[];
41
32
  export {};
@@ -1,4 +1,6 @@
1
+ import { GetAgentResponse } from '@mastra/client-js';
1
2
  import { AiMessageType } from '@mastra/core/memory';
3
+ import { LLMStepResult } from '@mastra/core/agent';
2
4
  export type Message = AiMessageType;
3
5
  export interface AssistantMessage {
4
6
  id: string;
@@ -17,6 +19,11 @@ export interface AssistantMessage {
17
19
  completionReason: string;
18
20
  };
19
21
  }
22
+ export type ReadonlyJSONValue = null | string | number | boolean | ReadonlyJSONObject | ReadonlyJSONArray;
23
+ export type ReadonlyJSONObject = {
24
+ readonly [key: string]: ReadonlyJSONValue;
25
+ };
26
+ export type ReadonlyJSONArray = readonly ReadonlyJSONValue[];
20
27
  export interface ModelSettings {
21
28
  frequencyPenalty?: number;
22
29
  presencePenalty?: number;
@@ -27,7 +34,7 @@ export interface ModelSettings {
27
34
  topK?: number;
28
35
  topP?: number;
29
36
  instructions?: string;
30
- providerOptions?: Record<string, unknown>;
37
+ providerOptions?: LLMStepResult['providerMetadata'];
31
38
  chatWithGenerate?: boolean;
32
39
  chatWithGenerateVNext?: boolean;
33
40
  chatWithStreamVNext?: boolean;
@@ -47,6 +54,7 @@ export interface ChatProps {
47
54
  settings?: AgentSettingsType;
48
55
  runtimeContext?: Record<string, any>;
49
56
  onInputChange?: (value: string) => void;
57
+ modelList?: GetAgentResponse['modelList'];
50
58
  }
51
59
  export type SpanStatus = {
52
60
  code: number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mastra/playground-ui",
3
3
  "type": "module",
4
- "version": "6.2.2",
4
+ "version": "6.2.3-alpha.1",
5
5
  "description": "Mastra Playground components",
6
6
  "main": "dist/index.umd.js",
7
7
  "module": "dist/index.es.js",
@@ -47,6 +47,7 @@
47
47
  "@autoform/zod": "^4.0.0",
48
48
  "@codemirror/lang-json": "^6.0.2",
49
49
  "@dagrejs/dagre": "^1.1.5",
50
+ "@hello-pangea/dnd": "^18.0.1",
50
51
  "@hookform/resolvers": "^3.10.0",
51
52
  "@lezer/highlight": "^1.2.1",
52
53
  "@lukeed/uuid": "^2.0.1",
@@ -99,18 +100,19 @@
99
100
  "use-debounce": "^10.0.6",
100
101
  "zod": "^4.1.9",
101
102
  "zustand": "^5.0.8",
102
- "@mastra/client-js": "^0.13.2"
103
+ "@mastra/react": "0.0.1-alpha.1",
104
+ "@mastra/client-js": "^0.14.0-alpha.1"
103
105
  },
104
106
  "peerDependencies": {
105
- "@mastra/core": ">=0.18.0-0 <0.19.0-0",
107
+ "@mastra/core": ">=0.19.0-0 <0.20.0-0",
106
108
  "lucide-react": "^0.474.0",
107
109
  "react": ">=19.0.0",
108
110
  "react-dom": ">=19.0.0",
109
111
  "tailwindcss": "^3.0.0"
110
112
  },
111
113
  "devDependencies": {
112
- "@storybook/addon-docs": "^9.1.7",
113
- "@storybook/react-vite": "^9.1.6",
114
+ "@storybook/addon-docs": "^9.1.8",
115
+ "@storybook/react-vite": "^9.1.8",
114
116
  "@types/node": "^20.19.0",
115
117
  "@types/react": "^19.1.9",
116
118
  "@types/react-dom": "^19.1.7",
@@ -120,14 +122,14 @@
120
122
  "clsx": "^2.1.1",
121
123
  "postcss": "^8.5.6",
122
124
  "rollup-plugin-node-externals": "^8.0.1",
123
- "storybook": "^9.1.6",
125
+ "storybook": "^9.1.8",
124
126
  "tailwind-merge": "^3.3.1",
125
127
  "tailwindcss": "^3.4.17",
126
128
  "typescript": "^5.8.3",
127
129
  "vite": "^6.3.6",
128
130
  "vite-plugin-dts": "^4.5.4",
129
131
  "vite-plugin-lib-inject-css": "^2.2.2",
130
- "@mastra/core": "0.18.0"
132
+ "@mastra/core": "0.19.0-alpha.1"
131
133
  },
132
134
  "homepage": "https://mastra.ai",
133
135
  "repository": {
@@ -1,8 +0,0 @@
1
- import { ReactNode } from '../../node_modules/@types/react';
2
- import { MastraClient } from '@mastra/client-js';
3
- export declare const MastraClientProvider: ({ children, baseUrl, headers, }: {
4
- children: ReactNode;
5
- baseUrl?: string;
6
- headers?: Record<string, string>;
7
- }) => import("react/jsx-runtime").JSX.Element;
8
- export declare const useMastraClient: () => MastraClient;
@@ -1,13 +0,0 @@
1
- type LegacyWorkflowNestedGraphContextType = {
2
- showNestedGraph: ({ label, stepGraph, stepSubscriberGraph, }: {
3
- label: string;
4
- stepGraph: any;
5
- stepSubscriberGraph: any;
6
- }) => void;
7
- closeNestedGraph: () => void;
8
- };
9
- export declare const LegacyWorkflowNestedGraphContext: import('../../../../node_modules/@types/react').Context<LegacyWorkflowNestedGraphContextType>;
10
- export declare function LegacyWorkflowNestedGraphProvider({ children }: {
11
- children: React.ReactNode;
12
- }): import("react/jsx-runtime").JSX.Element;
13
- export {};
@@ -1,4 +0,0 @@
1
- import { LegacyWorkflow } from '@mastra/core/workflows/legacy';
2
- export declare function LegacyWorkflowGraphInner({ workflow }: {
3
- workflow: LegacyWorkflow;
4
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- export declare function LegacyWorkflowGraph({ workflowId }: {
2
- workflowId: string;
3
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- export declare function LegacyWorkflowNestedGraph({ stepGraph, stepSubscriberGraph, open, }: {
2
- stepGraph: any;
3
- stepSubscriberGraph: any;
4
- open: boolean;
5
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +0,0 @@
1
- import { NodeProps, Node } from '@xyflow/react';
2
- type LegacyWorkflowNestedNode = Node<{
3
- label: string;
4
- description?: string;
5
- withoutTopHandle?: boolean;
6
- withoutBottomHandle?: boolean;
7
- stepGraph: any;
8
- stepSubscriberGraph: any;
9
- }, 'nested-node'>;
10
- export declare function LegacyWorkflowNestedNode({ data }: NodeProps<LegacyWorkflowNestedNode>): import("react/jsx-runtime").JSX.Element;
11
- export {};
@@ -1,6 +0,0 @@
1
- export interface LegacyWorkflowStatusProps {
2
- stepId: string;
3
- pathStatus: string;
4
- path: string;
5
- }
6
- export declare const LegacyWorkflowStatus: ({ stepId, pathStatus, path }: LegacyWorkflowStatusProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +0,0 @@
1
- export declare function LegacyWorkflowTrigger({ workflowId, setRunId, }: {
2
- workflowId: string;
3
- setRunId?: (runId: string) => void;
4
- }): import("react/jsx-runtime").JSX.Element | null;