@mastra/playground-ui 5.1.12-alpha.0 → 5.1.13-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1024 -56
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1018 -58
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/assistant-ui/messages/reasoning.d.ts +3 -0
- package/dist/src/components/scrollable-container.d.ts +9 -0
- package/dist/src/domains/agents/components/agent-table/agent-table.d.ts +10 -0
- package/dist/src/domains/agents/components/agent-table/columns.d.ts +22 -0
- package/dist/src/domains/agents/components/agent-table/types.d.ts +12 -0
- package/dist/src/domains/agents/context/agent-working-memory-context.d.ts +21 -0
- package/dist/src/domains/agents/context/index.d.ts +2 -0
- package/dist/src/domains/agents/hooks/use-agent-working-memory.d.ts +10 -0
- package/dist/src/domains/agents/index.d.ts +2 -1
- package/dist/src/ds/components/Button/Button.d.ts +1 -0
- package/dist/src/ds/icons/AmazonIcon.d.ts +3 -0
- package/dist/src/ds/icons/AnthropicChatIcon.d.ts +3 -0
- package/dist/src/ds/icons/AnthropicMessagesIcon.d.ts +3 -0
- package/dist/src/ds/icons/AzureIcon.d.ts +3 -0
- package/dist/src/ds/icons/CohereIcon.d.ts +3 -0
- package/dist/src/ds/icons/GroqIcon.d.ts +3 -0
- package/dist/src/ds/icons/MistralIcon.d.ts +3 -0
- package/dist/src/ds/icons/OpenaiChatIcon.d.ts +3 -0
- package/dist/src/ds/icons/XGroqIcon.d.ts +3 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/lib/framework.d.ts +12 -0
- package/dist/src/services/vnext-network-runtime-provider.d.ts +1 -1
- package/dist/src/types.d.ts +12 -2
- package/package.json +6 -5
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from '../../node_modules/@types/react';
|
|
2
|
+
|
|
3
|
+
export type ScrollableContainerProps = {
|
|
4
|
+
className?: string;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
scrollSpeed?: number;
|
|
7
|
+
scrollIntervalTime?: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const ScrollableContainer: ({ className, children, scrollSpeed, scrollIntervalTime, }: ScrollableContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { GetAgentResponse } from '@mastra/client-js';
|
|
2
|
+
|
|
3
|
+
export interface AgentsTableProps {
|
|
4
|
+
agents?: Record<string, GetAgentResponse>;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
onClickRow: (agentId: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function AgentsTable({ agents, isLoading, onClickRow }: AgentsTableProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const AgentsTableSkeleton: () => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const EmptyAgentsTable: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ColumnDef } from '@tanstack/react-table';
|
|
2
|
+
import { AgentTableData } from './types';
|
|
3
|
+
|
|
4
|
+
export declare const providerMapToIcon: {
|
|
5
|
+
'openai.chat': import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
'anthropic.chat': import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
'anthropic.messages': import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
AZURE: import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
AMAZON: import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
GOOGLE: import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
COHERE: import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
GROQ: import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
X_GROK: import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
MISTRAL: import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
};
|
|
16
|
+
export type AgentTableColumn = {
|
|
17
|
+
repoUrl: string;
|
|
18
|
+
executedAt: Date | null;
|
|
19
|
+
modelId: string;
|
|
20
|
+
link: string;
|
|
21
|
+
} & AgentTableData;
|
|
22
|
+
export declare const columns: ColumnDef<AgentTableColumn>[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GetToolResponse } from '@mastra/client-js';
|
|
2
|
+
|
|
3
|
+
export type AgentTableData = {
|
|
4
|
+
branch?: string;
|
|
5
|
+
executedAt?: Date;
|
|
6
|
+
modelId: string;
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
provider: string;
|
|
10
|
+
instructions: string;
|
|
11
|
+
tools?: Record<string, GetToolResponse>;
|
|
12
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactNode } from '../../../../node_modules/@types/react';
|
|
2
|
+
|
|
3
|
+
type AgentWorkingMemoryContextType = {
|
|
4
|
+
threadExists: boolean;
|
|
5
|
+
workingMemoryData: string | null;
|
|
6
|
+
workingMemorySource: 'thread' | 'resource';
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
isUpdating: boolean;
|
|
9
|
+
updateWorkingMemory: (newMemory: string) => Promise<void>;
|
|
10
|
+
refetch: () => Promise<void>;
|
|
11
|
+
};
|
|
12
|
+
export declare const WorkingMemoryContext: import('../../../../node_modules/@types/react').Context<AgentWorkingMemoryContextType>;
|
|
13
|
+
export interface AgentWorkingMemoryProviderProps {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
agentId: string;
|
|
16
|
+
threadId: string;
|
|
17
|
+
resourceId: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function WorkingMemoryProvider({ agentId, threadId, resourceId, children }: AgentWorkingMemoryProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function useWorkingMemory(): AgentWorkingMemoryContextType;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function useAgentWorkingMemory(agentId: string, threadId: string, resourceId: string): {
|
|
2
|
+
threadExists: boolean;
|
|
3
|
+
workingMemoryData: string | null;
|
|
4
|
+
workingMemorySource: "resource" | "thread";
|
|
5
|
+
workingMemoryFormat: "json" | "markdown";
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
isUpdating: boolean;
|
|
8
|
+
refetch: () => Promise<void>;
|
|
9
|
+
updateWorkingMemory: (newMemory: string) => Promise<void>;
|
|
10
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './components/agent-chat';
|
|
2
2
|
export * from './components/agent-evals';
|
|
3
3
|
export * from './components/agent-traces';
|
|
4
|
-
export * from './context
|
|
4
|
+
export * from './context';
|
|
5
5
|
export * from './components/agent-settings';
|
|
6
|
+
export * from './components/agent-table/agent-table';
|
|
@@ -9,5 +9,6 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
9
9
|
children: React.ReactNode;
|
|
10
10
|
size?: 'md' | 'lg';
|
|
11
11
|
variant?: 'default' | 'light';
|
|
12
|
+
target?: string;
|
|
12
13
|
}
|
|
13
14
|
export declare const Button: ({ className, as, size, variant, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes, ForwardRefExoticComponent, RefAttributes } from '../../node_modules/@types/react';
|
|
2
|
+
|
|
3
|
+
export type LinkComponentProps = AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
4
|
+
export type LinkComponent = ForwardRefExoticComponent<LinkComponentProps & RefAttributes<HTMLAnchorElement>>;
|
|
5
|
+
export interface LinkComponentProviderProps {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
Link: LinkComponent;
|
|
8
|
+
}
|
|
9
|
+
export declare const LinkComponentProvider: ({ children, Link }: LinkComponentProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const useLinkComponent: () => {
|
|
11
|
+
Link: LinkComponent;
|
|
12
|
+
};
|
|
@@ -4,7 +4,7 @@ import { ChatProps } from '../types';
|
|
|
4
4
|
type VNextMastraNetworkRuntimeProviderProps = Omit<ChatProps, 'agentId' | 'agentName' | 'modelSettings'> & {
|
|
5
5
|
networkId: string;
|
|
6
6
|
};
|
|
7
|
-
export declare function VNextMastraNetworkRuntimeProvider({ children, networkId, memory, threadId, refreshThreadList, initialMessages, }: Readonly<{
|
|
7
|
+
export declare function VNextMastraNetworkRuntimeProvider({ children, networkId, memory, threadId, refreshThreadList, initialMessages, runtimeContext, }: Readonly<{
|
|
8
8
|
children: ReactNode;
|
|
9
9
|
}> & VNextMastraNetworkRuntimeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
package/dist/src/types.d.ts
CHANGED
|
@@ -4,8 +4,17 @@ export interface Message {
|
|
|
4
4
|
content: any;
|
|
5
5
|
isError?: boolean;
|
|
6
6
|
parts?: Array<{
|
|
7
|
-
type: 'text'
|
|
8
|
-
text
|
|
7
|
+
type: 'text';
|
|
8
|
+
text: string;
|
|
9
|
+
} | {
|
|
10
|
+
type: 'step-start';
|
|
11
|
+
} | {
|
|
12
|
+
type: 'reasoning';
|
|
13
|
+
reasoning: string;
|
|
14
|
+
details: Array<{
|
|
15
|
+
type: 'text';
|
|
16
|
+
text: string;
|
|
17
|
+
}>;
|
|
9
18
|
}>;
|
|
10
19
|
}
|
|
11
20
|
export interface AssistantMessage {
|
|
@@ -35,6 +44,7 @@ export interface ModelSettings {
|
|
|
35
44
|
topK?: number;
|
|
36
45
|
topP?: number;
|
|
37
46
|
instructions?: string;
|
|
47
|
+
providerOptions?: Record<string, unknown>;
|
|
38
48
|
chatWithGenerate?: boolean;
|
|
39
49
|
}
|
|
40
50
|
export interface AgentSettingsType {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/playground-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.1.
|
|
4
|
+
"version": "5.1.13-alpha.0",
|
|
5
5
|
"description": "Mastra Playground components",
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
"@radix-ui/react-tabs": "^1.1.12",
|
|
64
64
|
"@radix-ui/react-toggle": "^1.1.9",
|
|
65
65
|
"@radix-ui/react-tooltip": "^1.2.7",
|
|
66
|
+
"@tanstack/react-query": "^5.81.5",
|
|
66
67
|
"@tanstack/react-table": "^8.21.3",
|
|
67
68
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
68
69
|
"@uiw/codemirror-theme-dracula": "^4.23.14",
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
"date-fns": "^4.1.0",
|
|
73
74
|
"json-schema-to-zod": "^2.6.1",
|
|
74
75
|
"motion": "^12.23.0",
|
|
75
|
-
"prettier": "^3.
|
|
76
|
+
"prettier": "^3.6.2",
|
|
76
77
|
"prism-react-renderer": "^2.4.1",
|
|
77
78
|
"react-code-block": "1.1.3",
|
|
78
79
|
"react-day-picker": "^8.10.1",
|
|
@@ -87,13 +88,13 @@
|
|
|
87
88
|
"shiki": "^1.29.2",
|
|
88
89
|
"sonner": "^2.0.5",
|
|
89
90
|
"superjson": "^2.2.2",
|
|
90
|
-
"swr": "^2.3.
|
|
91
|
+
"swr": "^2.3.4",
|
|
91
92
|
"tailwindcss-animate": "^1.0.7",
|
|
92
93
|
"unified": "^11.0.5",
|
|
93
94
|
"use-debounce": "^10.0.5",
|
|
94
95
|
"zod": "^3.25.67",
|
|
95
96
|
"zustand": "^5.0.5",
|
|
96
|
-
"@mastra/client-js": "^0.10.
|
|
97
|
+
"@mastra/client-js": "^0.10.14-alpha.0"
|
|
97
98
|
},
|
|
98
99
|
"peerDependencies": {
|
|
99
100
|
"@mastra/core": ">=0.10.11-0 <0.11.0-0",
|
|
@@ -118,7 +119,7 @@
|
|
|
118
119
|
"vite": "^6.3.5",
|
|
119
120
|
"vite-plugin-dts": "^3.9.1",
|
|
120
121
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
121
|
-
"@mastra/core": "0.10.
|
|
122
|
+
"@mastra/core": "0.10.15-alpha.0"
|
|
122
123
|
},
|
|
123
124
|
"scripts": {
|
|
124
125
|
"dev": "vite",
|