@mastra/playground-ui 6.7.1 → 6.7.2-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 +26 -0
- package/dist/index.cjs.js +2758 -996
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +2754 -1004
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/ui/autoform/components/CustomArrayField.d.ts +6 -0
- package/dist/src/components/ui/autoform/components/CustomAutoFormField.d.ts +6 -0
- package/dist/src/components/ui/autoform/components/CustomObjectField.d.ts +6 -0
- package/dist/src/components/ui/autoform/components/DiscriminatedUnionField.d.ts +2 -0
- package/dist/src/components/ui/autoform/components/UnionField.d.ts +2 -0
- package/dist/src/components/ui/autoform/utils.d.ts +1 -0
- package/dist/src/components/ui/autoform/zodProvider/default-values.d.ts +3 -0
- package/dist/src/components/ui/autoform/zodProvider/index.d.ts +1 -0
- package/dist/src/components/ui/code-mirror-block.d.ts +2 -0
- package/dist/src/components/ui/copy-button.d.ts +4 -1
- package/dist/src/components/ui/elements/main-sidebar/main-sidebar-nav-link.d.ts +1 -0
- package/dist/src/domains/agents/components/AgentToolPanel.d.ts +5 -0
- package/dist/src/domains/agents/components/agent-information/agent-information.d.ts +5 -0
- package/dist/src/domains/agents/components/agent-information/agent-instructions-enhancer.d.ts +5 -0
- package/dist/src/domains/agents/components/agent-information/agent-memory-config.d.ts +5 -0
- package/dist/src/domains/agents/components/agent-information/agent-memory.d.ts +6 -0
- package/dist/src/domains/agents/components/agent-information/agent-working-memory.d.ts +5 -0
- package/dist/src/domains/agents/components/agent-information/code-display.d.ts +10 -0
- package/dist/src/domains/agents/components/agent-information/current-instructions.d.ts +15 -0
- package/dist/src/domains/agents/components/agent-information/version-actions.d.ts +8 -0
- package/dist/src/domains/agents/components/agent-information/version-history-dialog.d.ts +9 -0
- package/dist/src/domains/agents/components/agent-information/version-history.d.ts +10 -0
- package/dist/src/domains/agents/components/agent-information/version-item.d.ts +14 -0
- package/dist/src/domains/agents/hooks/use-prompt-enhancer.d.ts +19 -0
- package/dist/src/domains/agents/hooks/use-prompt-versions.d.ts +12 -0
- package/dist/src/domains/agents/index.d.ts +2 -0
- package/dist/src/domains/mcps/components/MCPDetail.d.ts +12 -0
- package/dist/src/domains/mcps/components/MCPToolPanel.d.ts +5 -0
- package/dist/src/domains/mcps/hooks/index.d.ts +3 -0
- package/dist/src/domains/mcps/hooks/use-mcp-server-tool.d.ts +2 -0
- package/dist/src/domains/mcps/hooks/use-mcp-servers.d.ts +1 -0
- package/dist/src/domains/mcps/index.d.ts +3 -1
- package/dist/src/domains/tools/components/ToolExecutor.d.ts +14 -0
- package/dist/src/domains/tools/components/ToolIcon.d.ts +5 -0
- package/dist/src/domains/tools/components/ToolInformation.d.ts +7 -0
- package/dist/src/domains/tools/components/ToolPanel.d.ts +4 -0
- package/dist/src/domains/tools/components/index.d.ts +4 -0
- package/dist/src/domains/tools/hooks/index.d.ts +1 -0
- package/dist/src/domains/tools/hooks/use-all-tools.d.ts +2 -0
- package/dist/src/domains/tools/index.d.ts +1 -0
- package/dist/src/lib/framework.d.ts +2 -1
- package/package.json +6 -6
|
@@ -5,6 +5,7 @@ export declare function parseSchema(schema: z.ZodObject): ParsedSchema;
|
|
|
5
5
|
export declare class CustomZodProvider<T extends z.ZodObject> extends ZodProvider<T> {
|
|
6
6
|
private _schema;
|
|
7
7
|
constructor(schema: T);
|
|
8
|
+
getDefaultValues(): z.core.output<T>;
|
|
8
9
|
validateSchema(values: z.core.output<T>): SchemaValidation;
|
|
9
10
|
parseSchema(): ParsedSchema;
|
|
10
11
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { IconProps } from '../../ds/icons';
|
|
1
2
|
type CopyButtonProps = {
|
|
2
3
|
content: string;
|
|
3
4
|
copyMessage?: string;
|
|
5
|
+
tooltip?: string;
|
|
4
6
|
className?: string;
|
|
7
|
+
iconSize?: IconProps['size'];
|
|
5
8
|
};
|
|
6
|
-
export declare function CopyButton({ content, copyMessage,
|
|
9
|
+
export declare function CopyButton({ content, copyMessage, tooltip, iconSize, }: CopyButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
7
10
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface CodeDisplayProps {
|
|
2
|
+
content: string;
|
|
3
|
+
height?: string;
|
|
4
|
+
isCopied?: boolean;
|
|
5
|
+
isDraft?: boolean;
|
|
6
|
+
onCopy?: () => void;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function CodeDisplay({ content, height, isCopied, isDraft, onCopy, className, }: CodeDisplayProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AgentInstructions } from '@mastra/core/agent';
|
|
2
|
+
interface CurrentInstructionsProps {
|
|
3
|
+
instructions?: AgentInstructions;
|
|
4
|
+
enhancedPrompt: string;
|
|
5
|
+
isEnhancing: boolean;
|
|
6
|
+
userComment: string;
|
|
7
|
+
onEnhance: () => void;
|
|
8
|
+
onCancel: () => void;
|
|
9
|
+
onSave: () => void;
|
|
10
|
+
onCommentChange: (comment: string) => void;
|
|
11
|
+
agentId: string;
|
|
12
|
+
onShowHistory: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function CurrentInstructions({ instructions, enhancedPrompt, isEnhancing, userComment, onEnhance, onCancel, onSave, onCommentChange, onShowHistory, }: CurrentInstructionsProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface VersionActionsProps {
|
|
2
|
+
version: any;
|
|
3
|
+
index: number;
|
|
4
|
+
isUpdating: boolean;
|
|
5
|
+
onSetActive: (version: any, index: number) => Promise<void>;
|
|
6
|
+
onDelete: (index: number) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function VersionActions({ version, index, isUpdating, onSetActive, onDelete }: VersionActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface VersionHistoryDialogProps {
|
|
2
|
+
versions: any[];
|
|
3
|
+
onDelete: (index: number) => void;
|
|
4
|
+
open: boolean;
|
|
5
|
+
onOpenChange: (open: boolean) => void;
|
|
6
|
+
onSetActive: (version: any, index: number) => Promise<void>;
|
|
7
|
+
isUpdating: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const VersionHistoryDialog: ({ open, onOpenChange, onDelete, onSetActive, versions, isUpdating, }: VersionHistoryDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface VersionHistoryProps {
|
|
2
|
+
versions: any[];
|
|
3
|
+
isUpdating: boolean;
|
|
4
|
+
copiedVersions: Record<string | number, boolean>;
|
|
5
|
+
onCopy: (content: string, key: string | number) => Promise<void>;
|
|
6
|
+
onSetActive: (version: any, index: number) => Promise<void>;
|
|
7
|
+
onDelete: (index: number) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function VersionHistory({ versions, isUpdating, copiedVersions, onCopy, onSetActive, onDelete, }: VersionHistoryProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface VersionItemProps {
|
|
2
|
+
version: any;
|
|
3
|
+
index: number;
|
|
4
|
+
isExpanded: boolean;
|
|
5
|
+
isUpdating: boolean;
|
|
6
|
+
copiedVersions: Record<string | number, boolean>;
|
|
7
|
+
onToggleExpand: () => void;
|
|
8
|
+
onToggleAnalysis: () => void;
|
|
9
|
+
onCopy: (content: string, key: string | number) => Promise<void>;
|
|
10
|
+
onSetActive: (version: any, index: number) => Promise<void>;
|
|
11
|
+
onDelete: (index: number) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function VersionItem({ version, index, isExpanded, isUpdating, onToggleExpand, onToggleAnalysis, onSetActive, onDelete, }: VersionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface UsePromptEnhancerProps {
|
|
2
|
+
agentId: string;
|
|
3
|
+
instructions?: string;
|
|
4
|
+
versions: any[];
|
|
5
|
+
onVersionCreate: (version: any) => void;
|
|
6
|
+
onVersionUpdate: (index: number, updates: Partial<any>) => void;
|
|
7
|
+
}
|
|
8
|
+
interface UsePromptEnhancerResult {
|
|
9
|
+
enhancedPrompt: string;
|
|
10
|
+
explanation: string;
|
|
11
|
+
isEnhancing: boolean;
|
|
12
|
+
userComment: string;
|
|
13
|
+
enhancePrompt: () => Promise<void>;
|
|
14
|
+
setUserComment: (comment: string) => void;
|
|
15
|
+
clearEnhancement: () => void;
|
|
16
|
+
applyChanges: () => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function usePromptEnhancer({ agentId, instructions, versions, onVersionCreate, onVersionUpdate, }: UsePromptEnhancerProps): UsePromptEnhancerResult;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function usePromptVersions(agentId: string, instructions?: string): {
|
|
2
|
+
versions: any[];
|
|
3
|
+
copiedVersions: Record<number, boolean>;
|
|
4
|
+
isUpdating: boolean;
|
|
5
|
+
versionToDelete: number | null;
|
|
6
|
+
setVersions: import('../../../../node_modules/@types/react').Dispatch<import('../../../../node_modules/@types/react').SetStateAction<any[]>>;
|
|
7
|
+
setVersionToDelete: import('../../../../node_modules/@types/react').Dispatch<import('../../../../node_modules/@types/react').SetStateAction<number | null>>;
|
|
8
|
+
copyToClipboard: (text: string, versionIndex: number) => Promise<() => void>;
|
|
9
|
+
setVersionActive: (version: any, index: number) => Promise<void>;
|
|
10
|
+
deleteVersion: (index: number) => void;
|
|
11
|
+
updateVersion: (index: number, updates: Partial<any>) => Promise<void>;
|
|
12
|
+
};
|
|
@@ -12,3 +12,5 @@ export * from './utils/extractPrompt';
|
|
|
12
12
|
export * from './hooks/use-agents';
|
|
13
13
|
export * from './hooks/use-agent';
|
|
14
14
|
export * from './hooks/use-execute-agent-tool';
|
|
15
|
+
export * from './components/AgentToolPanel';
|
|
16
|
+
export * from './components/agent-information/agent-information';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ServerInfo } from '@mastra/core/mcp';
|
|
2
|
+
export interface MCPDetailProps {
|
|
3
|
+
isLoading: boolean;
|
|
4
|
+
server?: ServerInfo;
|
|
5
|
+
}
|
|
6
|
+
declare global {
|
|
7
|
+
interface Window {
|
|
8
|
+
MASTRA_SERVER_HOST: string;
|
|
9
|
+
MASTRA_SERVER_PORT: string;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export declare const MCPDetail: ({ isLoading, server }: MCPDetailProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const useMCPServerTool: (serverId: string, toolId: string) => import('@tanstack/react-query').UseQueryResult<import('@mastra/client-js').McpToolInfo, Error>;
|
|
2
|
+
export declare const useExecuteMCPTool: (serverId: string, toolId: string) => import('@tanstack/react-query').UseMutationResult<any, Error, any, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useMCPServers: () => import('@tanstack/react-query').UseQueryResult<import('@mastra/core/mcp').ServerInfo[], Error>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ZodType } from 'zod';
|
|
2
|
+
import { MCPToolType } from '@mastra/core/mcp';
|
|
3
|
+
export interface ToolExecutorProps {
|
|
4
|
+
isExecutingTool: boolean;
|
|
5
|
+
zodInputSchema: ZodType;
|
|
6
|
+
handleExecuteTool: (data: any) => void;
|
|
7
|
+
executionResult: any;
|
|
8
|
+
errorString?: string;
|
|
9
|
+
toolDescription: string;
|
|
10
|
+
toolId: string;
|
|
11
|
+
toolType?: MCPToolType;
|
|
12
|
+
}
|
|
13
|
+
declare const ToolExecutor: ({ isExecutingTool, zodInputSchema, handleExecuteTool, executionResult: result, errorString, toolDescription, toolId, toolType, }: ToolExecutorProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default ToolExecutor;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const ToolIconMap: {
|
|
2
|
+
agent: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
workflow: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
tool: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MCPToolType } from '@mastra/core/mcp';
|
|
2
|
+
export interface ToolInformationProps {
|
|
3
|
+
toolDescription: string;
|
|
4
|
+
toolId: string;
|
|
5
|
+
toolType?: MCPToolType;
|
|
6
|
+
}
|
|
7
|
+
export declare const ToolInformation: ({ toolDescription, toolId, toolType }: ToolInformationProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const useTools: () => import('@tanstack/react-query').UseQueryResult<Record<string, import('@mastra/client-js').GetToolResponse>, Error>;
|
|
2
|
+
export declare const useTool: (toolId: string) => import('@tanstack/react-query').UseQueryResult<import('@mastra/client-js').GetToolResponse, Error>;
|
|
@@ -5,7 +5,7 @@ type LinkComponentPaths = {
|
|
|
5
5
|
agentLink: (agentId: string) => string;
|
|
6
6
|
agentsLink: () => string;
|
|
7
7
|
agentToolLink: (agentId: string, toolId: string) => string;
|
|
8
|
-
agentThreadLink: (agentId: string, threadId: string) => string;
|
|
8
|
+
agentThreadLink: (agentId: string, threadId: string, messageId?: string) => string;
|
|
9
9
|
agentNewThreadLink: (agentId: string) => string;
|
|
10
10
|
workflowsLink: () => string;
|
|
11
11
|
workflowLink: (workflowId: string) => string;
|
|
@@ -15,6 +15,7 @@ type LinkComponentPaths = {
|
|
|
15
15
|
scorerLink: (scorerId: string) => string;
|
|
16
16
|
toolLink: (toolId: string) => string;
|
|
17
17
|
mcpServerLink: (serverId: string) => string;
|
|
18
|
+
mcpServerToolLink: (serverId: string, toolId: string) => string;
|
|
18
19
|
workflowRunLink: (workflowId: string, runId: string) => string;
|
|
19
20
|
};
|
|
20
21
|
export interface LinkComponentProviderProps {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/playground-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.7.1",
|
|
4
|
+
"version": "6.7.2-alpha.1",
|
|
5
5
|
"description": "Mastra Playground components",
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
@@ -107,8 +107,8 @@
|
|
|
107
107
|
"react-dom": ">=19.0.0",
|
|
108
108
|
"tailwindcss": "^3.0.0",
|
|
109
109
|
"@tanstack/react-query": "^5.81.5",
|
|
110
|
-
"@mastra/
|
|
111
|
-
"@mastra/
|
|
110
|
+
"@mastra/client-js": "^0.16.7-alpha.1",
|
|
111
|
+
"@mastra/react": "0.0.13-alpha.1"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@storybook/addon-docs": "^9.1.10",
|
|
@@ -131,9 +131,9 @@
|
|
|
131
131
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
132
132
|
"vitest": "^3.2.4",
|
|
133
133
|
"@tanstack/react-query": "^5.81.5",
|
|
134
|
-
"@mastra/client-js": "^0.16.
|
|
135
|
-
"@mastra/
|
|
136
|
-
"@mastra/
|
|
134
|
+
"@mastra/client-js": "^0.16.7-alpha.1",
|
|
135
|
+
"@mastra/core": "0.23.2-alpha.1",
|
|
136
|
+
"@mastra/react": "0.0.13-alpha.1"
|
|
137
137
|
},
|
|
138
138
|
"homepage": "https://mastra.ai",
|
|
139
139
|
"repository": {
|