@mastra/playground-ui 6.6.1 → 6.6.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.
@@ -0,0 +1,12 @@
1
+ import { ReorderModelListParams, UpdateModelInModelListParams, UpdateModelParams } from '@mastra/client-js';
2
+ export declare const useAgents: () => import('@tanstack/react-query').UseQueryResult<Record<string, import('@mastra/client-js').GetAgentResponse>, Error>;
3
+ export declare const useModelProviders: () => import('@tanstack/react-query').UseQueryResult<string[], Error>;
4
+ export declare const useUpdateAgentModel: (agentId: string) => import('@tanstack/react-query').UseMutationResult<{
5
+ message: string;
6
+ }, Error, UpdateModelParams, unknown>;
7
+ export declare const useReorderModelList: (agentId: string) => import('@tanstack/react-query').UseMutationResult<{
8
+ message: string;
9
+ }, Error, ReorderModelListParams, unknown>;
10
+ export declare const useUpdateModelInModelList: (agentId: string) => import('@tanstack/react-query').UseMutationResult<{
11
+ message: string;
12
+ }, Error, UpdateModelInModelListParams, unknown>;
@@ -0,0 +1,7 @@
1
+ export interface ExecuteToolInput {
2
+ agentId: string;
3
+ toolId: string;
4
+ input: any;
5
+ playgroundRuntimeContext?: Record<string, any>;
6
+ }
7
+ export declare const useExecuteAgentTool: () => import('@tanstack/react-query').UseMutationResult<any, Error, ExecuteToolInput, unknown>;
@@ -9,3 +9,6 @@ export * from './components/agent-metadata';
9
9
  export * from './components/agent-entity-header';
10
10
  export * from './components/chat-threads';
11
11
  export * from './utils/extractPrompt';
12
+ export * from './hooks/use-agents';
13
+ export * from './hooks/use-agent';
14
+ export * from './hooks/use-execute-agent-tool';
@@ -0,0 +1 @@
1
+ export * from './use-evals-by-agent-id';
@@ -0,0 +1,14 @@
1
+ import { TestInfo, MetricResult } from '@mastra/core/eval';
2
+ export type Evals = {
3
+ input: string;
4
+ output: string;
5
+ result: MetricResult;
6
+ agentName: string;
7
+ createdAt: string;
8
+ metricName: string;
9
+ instructions: string;
10
+ runId: string;
11
+ globalRunId: string;
12
+ testInfo?: TestInfo;
13
+ };
14
+ export declare const useEvalsByAgentId: (agentId: string, type: "ci" | "live") => import('@tanstack/react-query').UseQueryResult<import('@mastra/client-js').GetEvalsByAgentIdResponse, Error>;
@@ -0,0 +1 @@
1
+ export * from './hooks';
@@ -0,0 +1 @@
1
+ export * from './use-memory';
@@ -0,0 +1,25 @@
1
+ import { MemorySearchResponse, MemorySearchParams } from '../../../types/memory';
2
+ export declare const useMemory: (agentId?: string) => import('@tanstack/react-query').UseQueryResult<{
3
+ result: boolean;
4
+ } | null, Error>;
5
+ export declare const useMemoryConfig: (agentId?: string) => import('@tanstack/react-query').UseQueryResult<import('@mastra/client-js').GetMemoryConfigResponse | null, Error>;
6
+ export declare const useThreads: ({ resourceId, agentId, isMemoryEnabled, }: {
7
+ resourceId: string;
8
+ agentId: string;
9
+ isMemoryEnabled: boolean;
10
+ }) => import('@tanstack/react-query').UseQueryResult<import('@mastra/client-js').GetMemoryThreadResponse | null, Error>;
11
+ export declare const useDeleteThread: () => import('@tanstack/react-query').UseMutationResult<{
12
+ success: boolean;
13
+ message: string;
14
+ }, Error, {
15
+ threadId: string;
16
+ agentId?: string;
17
+ networkId?: string;
18
+ }, unknown>;
19
+ export declare const useMemorySearch: ({ agentId, resourceId, threadId, }: {
20
+ agentId: string;
21
+ resourceId: string;
22
+ threadId?: string;
23
+ }) => {
24
+ searchMemory: (searchQuery: string, memoryConfig?: MemorySearchParams) => Promise<MemorySearchResponse>;
25
+ };
@@ -0,0 +1 @@
1
+ export * from './use-execute-tool';
@@ -0,0 +1,5 @@
1
+ export declare const useExecuteTool: () => import('@tanstack/react-query').UseMutationResult<any, Error, {
2
+ toolId: string;
3
+ input: any;
4
+ runtimeContext?: Record<string, any>;
5
+ }, unknown>;
@@ -1 +1,2 @@
1
1
  export * from './components/tool-table/tool-table';
2
+ export * from './hooks';
@@ -0,0 +1,2 @@
1
+ export * from './use-workflows';
2
+ export * from './use-workflows-actions';
@@ -0,0 +1,67 @@
1
+ import { WorkflowWatchResult } from '@mastra/client-js';
2
+ import { WorkflowStreamResult as CoreWorkflowStreamResult } from '@mastra/core/workflows';
3
+ export type ExtendedWorkflowWatchResult = WorkflowWatchResult & {
4
+ sanitizedOutput?: string | null;
5
+ sanitizedError?: {
6
+ message: string;
7
+ stack?: string;
8
+ } | null;
9
+ };
10
+ export declare const useExecuteWorkflow: () => {
11
+ startWorkflowRun: import('@tanstack/react-query').UseMutationResult<void, Error, {
12
+ workflowId: string;
13
+ runId: string;
14
+ input: Record<string, unknown>;
15
+ runtimeContext: Record<string, unknown>;
16
+ }, unknown>;
17
+ createWorkflowRun: import('@tanstack/react-query').UseMutationResult<{
18
+ runId: string;
19
+ }, Error, {
20
+ workflowId: string;
21
+ prevRunId?: string;
22
+ }, unknown>;
23
+ startAsyncWorkflowRun: import('@tanstack/react-query').UseMutationResult<import('@mastra/client-js').WorkflowRunResult, Error, {
24
+ workflowId: string;
25
+ runId?: string;
26
+ input: Record<string, unknown>;
27
+ runtimeContext: Record<string, unknown>;
28
+ }, unknown>;
29
+ };
30
+ type WorkflowStreamResult = CoreWorkflowStreamResult<any, any, any, any>;
31
+ export declare const useStreamWorkflow: () => {
32
+ streamWorkflow: import('@tanstack/react-query').UseMutationResult<void, Error, {
33
+ workflowId: string;
34
+ runId: string;
35
+ inputData: Record<string, unknown>;
36
+ runtimeContext: Record<string, unknown>;
37
+ }, unknown>;
38
+ streamResult: WorkflowStreamResult;
39
+ isStreaming: boolean;
40
+ observeWorkflowStream: import('@tanstack/react-query').UseMutationResult<void, Error, {
41
+ workflowId: string;
42
+ runId: string;
43
+ storeRunResult: WorkflowStreamResult | null;
44
+ }, unknown>;
45
+ closeStreamsAndReset: () => void;
46
+ resumeWorkflowStream: import('@tanstack/react-query').UseMutationResult<void, Error, {
47
+ workflowId: string;
48
+ step: string | string[];
49
+ runId: string;
50
+ resumeData: Record<string, unknown>;
51
+ runtimeContext: Record<string, unknown>;
52
+ }, unknown>;
53
+ };
54
+ export declare const useCancelWorkflowRun: () => import('@tanstack/react-query').UseMutationResult<{
55
+ message: string;
56
+ }, Error, {
57
+ workflowId: string;
58
+ runId: string;
59
+ }, unknown>;
60
+ export declare const useSendWorkflowRunEvent: (workflowId: string) => import('@tanstack/react-query').UseMutationResult<{
61
+ message: string;
62
+ }, Error, {
63
+ runId: string;
64
+ event: string;
65
+ data: unknown;
66
+ }, unknown>;
67
+ export {};
@@ -0,0 +1 @@
1
+ export declare const useWorkflows: () => import('@tanstack/react-query').UseQueryResult<Record<string, import('@mastra/client-js').GetWorkflowResponse>, Error>;
@@ -5,3 +5,4 @@ export * from './context/use-current-run';
5
5
  export * from './runs/workflow-run-details';
6
6
  export * from './components/workflow-table/workflow-table';
7
7
  export * from './utils';
8
+ export * from './hooks';
@@ -1,9 +1 @@
1
- import { WorkflowWatchResult } from '@mastra/client-js';
2
- export type ExtendedWorkflowWatchResult = WorkflowWatchResult & {
3
- sanitizedOutput?: string | null;
4
- sanitizedError?: {
5
- message: string;
6
- stack?: string;
7
- } | null;
8
- };
9
1
  export declare const useWorkflow: (workflowId?: string) => import('@tanstack/react-query').UseQueryResult<import('@mastra/client-js').GetWorkflowResponse | null, Error>;
@@ -31,6 +31,7 @@ export * from './components/ui/radio-group';
31
31
  export * from './components/ui/entry';
32
32
  export * from './hooks';
33
33
  export * from './lib/tanstack-query';
34
+ export * from './domains/memory/hooks';
34
35
  export type { TraceContextType } from './domains/traces/context/trace-context';
35
36
  export * from './store/playground-store';
36
37
  export * from './lib/framework';
@@ -45,3 +46,4 @@ export * from './lib/errors';
45
46
  export * from './components/assistant-ui/tools/tool-fallback';
46
47
  export * from './domains/workflows/runs/workflow-run-list';
47
48
  export * from './domains/mcps/index';
49
+ export * from './domains/evals/index';
@@ -27,3 +27,6 @@ export interface MemorySearchResponse {
27
27
  searchType?: string;
28
28
  searchScope?: 'thread' | 'resource';
29
29
  }
30
+ export interface MemorySearchParams {
31
+ lastMessages?: number | false;
32
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mastra/playground-ui",
3
3
  "type": "module",
4
- "version": "6.6.1",
4
+ "version": "6.6.2",
5
5
  "description": "Mastra Playground components",
6
6
  "main": "dist/index.umd.js",
7
7
  "module": "dist/index.es.js",
@@ -70,7 +70,6 @@
70
70
  "@radix-ui/react-toggle": "^1.1.9",
71
71
  "@radix-ui/react-tooltip": "^1.2.7",
72
72
  "@radix-ui/react-visually-hidden": "^1.2.3",
73
- "@tanstack/react-query": "^5.81.5",
74
73
  "@tanstack/react-table": "^8.21.3",
75
74
  "@types/react-syntax-highlighter": "^15.5.13",
76
75
  "@uiw/codemirror-theme-dracula": "^4.23.14",
@@ -107,8 +106,9 @@
107
106
  "react": ">=19.0.0",
108
107
  "react-dom": ">=19.0.0",
109
108
  "tailwindcss": "^3.0.0",
110
- "@mastra/client-js": "^0.16.3",
111
- "@mastra/react": "0.0.9"
109
+ "@tanstack/react-query": "^5.81.5",
110
+ "@mastra/react": "0.0.10",
111
+ "@mastra/client-js": "^0.16.4"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@storybook/addon-docs": "^9.1.10",
@@ -130,9 +130,10 @@
130
130
  "vite-plugin-dts": "^4.5.4",
131
131
  "vite-plugin-lib-inject-css": "^2.2.2",
132
132
  "vitest": "^3.2.4",
133
- "@mastra/react": "0.0.9",
134
- "@mastra/core": "0.22.1",
135
- "@mastra/client-js": "^0.16.3"
133
+ "@tanstack/react-query": "^5.81.5",
134
+ "@mastra/client-js": "^0.16.4",
135
+ "@mastra/core": "0.22.2",
136
+ "@mastra/react": "0.0.10"
136
137
  },
137
138
  "homepage": "https://mastra.ai",
138
139
  "repository": {