@mastra/playground-ui 7.0.0-beta.24 → 7.0.0-beta.26
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 +75 -0
- package/dist/index.cjs.js +545 -28
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +539 -30
- package/dist/index.es.js.map +1 -1
- package/dist/src/domains/agents/components/agent-metadata/agent-metadata.d.ts +11 -0
- package/dist/src/domains/processors/components/index.d.ts +2 -0
- package/dist/src/domains/processors/components/processor-panel.d.ts +8 -0
- package/dist/src/domains/processors/components/processor-table/columns.d.ts +12 -0
- package/dist/src/domains/processors/components/processor-table/index.d.ts +2 -0
- package/dist/src/domains/processors/components/processor-table/processor-table.d.ts +7 -0
- package/dist/src/domains/processors/hooks/index.d.ts +1 -0
- package/dist/src/domains/processors/hooks/use-processors.d.ts +50 -0
- package/dist/src/domains/processors/index.d.ts +2 -0
- package/dist/src/domains/workflows/hooks/use-workflows.d.ts +3 -1
- package/dist/src/domains/workflows/workflow/workflow-input-data.d.ts +2 -1
- package/dist/src/ds/icons/ProcessorIcon.d.ts +2 -0
- package/dist/src/ds/icons/index.d.ts +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/lib/ai-ui/tools/badges/tool-approval-buttons.d.ts +2 -1
- package/dist/src/lib/framework.d.ts +2 -0
- package/dist/src/services/tool-call-provider.d.ts +5 -1
- package/package.json +10 -10
|
@@ -26,4 +26,15 @@ interface AgentMetadataScorerListProps {
|
|
|
26
26
|
entityType: string;
|
|
27
27
|
}
|
|
28
28
|
export declare const AgentMetadataScorerList: ({ entityId, entityType }: AgentMetadataScorerListProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export interface AgentMetadataCombinedProcessorListProps {
|
|
30
|
+
inputProcessors: Array<{
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
}>;
|
|
34
|
+
outputProcessors: Array<{
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
}>;
|
|
38
|
+
}
|
|
39
|
+
export declare const AgentMetadataCombinedProcessorList: ({ inputProcessors, outputProcessors, }: AgentMetadataCombinedProcessorListProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
40
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ProcessorDetail } from '../hooks/use-processors';
|
|
2
|
+
export interface ProcessorPanelProps {
|
|
3
|
+
processorId: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ProcessorDetailPanelProps {
|
|
6
|
+
processor: ProcessorDetail;
|
|
7
|
+
}
|
|
8
|
+
export declare function ProcessorPanel({ processorId }: ProcessorPanelProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ColumnDef, Row } from '@tanstack/react-table';
|
|
2
|
+
import { ProcessorRow } from './processor-table';
|
|
3
|
+
export type NameCellProps = {
|
|
4
|
+
row: Row<ProcessorRow>;
|
|
5
|
+
};
|
|
6
|
+
export type PhasesCellProps = {
|
|
7
|
+
row: Row<ProcessorRow>;
|
|
8
|
+
};
|
|
9
|
+
export type AgentsCellProps = {
|
|
10
|
+
row: Row<ProcessorRow>;
|
|
11
|
+
};
|
|
12
|
+
export declare const columns: ColumnDef<ProcessorRow>[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ProcessorInfo } from '../../hooks/use-processors';
|
|
2
|
+
export interface ProcessorTableProps {
|
|
3
|
+
processors: Record<string, ProcessorInfo>;
|
|
4
|
+
isLoading: boolean;
|
|
5
|
+
}
|
|
6
|
+
export type ProcessorRow = ProcessorInfo;
|
|
7
|
+
export declare function ProcessorTable({ processors, isLoading }: ProcessorTableProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './use-processors';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { MastraDBMessage } from '@mastra/core/agent/message-list';
|
|
2
|
+
export type ProcessorPhase = 'input' | 'inputStep' | 'outputStream' | 'outputResult' | 'outputStep';
|
|
3
|
+
export interface ProcessorInfo {
|
|
4
|
+
id: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
phases: ProcessorPhase[];
|
|
8
|
+
agentIds: string[];
|
|
9
|
+
isWorkflow: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface ProcessorConfiguration {
|
|
12
|
+
agentId: string;
|
|
13
|
+
agentName: string;
|
|
14
|
+
type: 'input' | 'output';
|
|
15
|
+
}
|
|
16
|
+
export interface ProcessorDetail {
|
|
17
|
+
id: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
phases: ProcessorPhase[];
|
|
21
|
+
configurations: ProcessorConfiguration[];
|
|
22
|
+
isWorkflow: boolean;
|
|
23
|
+
}
|
|
24
|
+
export type { MastraDBMessage };
|
|
25
|
+
export interface ExecuteProcessorParams {
|
|
26
|
+
processorId: string;
|
|
27
|
+
phase: ProcessorPhase;
|
|
28
|
+
messages: MastraDBMessage[];
|
|
29
|
+
agentId?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface ProcessorTripwireResult {
|
|
32
|
+
triggered: boolean;
|
|
33
|
+
reason?: string;
|
|
34
|
+
metadata?: unknown;
|
|
35
|
+
}
|
|
36
|
+
export interface ExecuteProcessorResponse {
|
|
37
|
+
success: boolean;
|
|
38
|
+
phase: string;
|
|
39
|
+
messages?: MastraDBMessage[];
|
|
40
|
+
messageList?: {
|
|
41
|
+
messages: MastraDBMessage[];
|
|
42
|
+
};
|
|
43
|
+
tripwire?: ProcessorTripwireResult;
|
|
44
|
+
error?: string;
|
|
45
|
+
}
|
|
46
|
+
export declare const useProcessors: () => import('@tanstack/react-query').UseQueryResult<Record<string, import('@mastra/client-js').GetProcessorResponse>, Error>;
|
|
47
|
+
export declare const useProcessor: (processorId: string, options?: {
|
|
48
|
+
enabled?: boolean;
|
|
49
|
+
}) => import('@tanstack/react-query').UseQueryResult<import('@mastra/client-js').GetProcessorDetailResponse, Error>;
|
|
50
|
+
export declare const useExecuteProcessor: () => import('@tanstack/react-query').UseMutationResult<ExecuteProcessorResponse, Error, ExecuteProcessorParams, unknown>;
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
export declare const useWorkflows: () => import('@tanstack/react-query').UseQueryResult<
|
|
1
|
+
export declare const useWorkflows: () => import('@tanstack/react-query').UseQueryResult<{
|
|
2
|
+
[k: string]: import('@mastra/client-js').GetWorkflowResponse;
|
|
3
|
+
}, Error>;
|
|
@@ -7,5 +7,6 @@ export interface WorkflowInputDataProps {
|
|
|
7
7
|
onSubmit: (data: any) => void;
|
|
8
8
|
withoutSubmit?: boolean;
|
|
9
9
|
children?: React.ReactNode;
|
|
10
|
+
isProcessorWorkflow?: boolean;
|
|
10
11
|
}
|
|
11
|
-
export declare const WorkflowInputData: ({ schema, defaultValues, withoutSubmit, isSubmitLoading, submitButtonLabel, onSubmit, children, }: WorkflowInputDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const WorkflowInputData: ({ schema, defaultValues, withoutSubmit, isSubmitLoading, submitButtonLabel, onSubmit, children, isProcessorWorkflow, }: WorkflowInputDataProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -9,5 +9,6 @@ export interface ToolApprovalButtonsProps {
|
|
|
9
9
|
runId?: string;
|
|
10
10
|
} | undefined;
|
|
11
11
|
isNetwork: boolean;
|
|
12
|
+
isGenerateMode?: boolean;
|
|
12
13
|
}
|
|
13
|
-
export declare const ToolApprovalButtons: ({ toolCalled, toolCallId, toolApprovalMetadata, toolName, isNetwork, }: ToolApprovalButtonsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
+
export declare const ToolApprovalButtons: ({ toolCalled, toolCallId, toolApprovalMetadata, toolName, isNetwork, isGenerateMode, }: ToolApprovalButtonsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -14,6 +14,8 @@ type LinkComponentPaths = {
|
|
|
14
14
|
networkThreadLink: (networkId: string, threadId: string) => string;
|
|
15
15
|
scorerLink: (scorerId: string) => string;
|
|
16
16
|
toolLink: (toolId: string) => string;
|
|
17
|
+
processorsLink: () => string;
|
|
18
|
+
processorLink: (processorId: string) => string;
|
|
17
19
|
mcpServerLink: (serverId: string) => string;
|
|
18
20
|
mcpServerToolLink: (serverId: string, toolId: string) => string;
|
|
19
21
|
workflowRunLink: (workflowId: string, runId: string) => string;
|
|
@@ -2,6 +2,8 @@ import { ReactNode } from '../../node_modules/@types/react';
|
|
|
2
2
|
interface ToolCallContextValue {
|
|
3
3
|
approveToolcall: (toolCallId: string) => void;
|
|
4
4
|
declineToolcall: (toolCallId: string) => void;
|
|
5
|
+
approveToolcallGenerate: (toolCallId: string) => void;
|
|
6
|
+
declineToolcallGenerate: (toolCallId: string) => void;
|
|
5
7
|
approveNetworkToolcall: (toolName: string, runId?: string) => void;
|
|
6
8
|
declineNetworkToolcall: (toolName: string, runId?: string) => void;
|
|
7
9
|
isRunning: boolean;
|
|
@@ -20,6 +22,8 @@ interface ToolCallProviderProps {
|
|
|
20
22
|
children: ReactNode;
|
|
21
23
|
approveToolcall: (toolCallId: string) => void;
|
|
22
24
|
declineToolcall: (toolCallId: string) => void;
|
|
25
|
+
approveToolcallGenerate: (toolCallId: string) => void;
|
|
26
|
+
declineToolcallGenerate: (toolCallId: string) => void;
|
|
23
27
|
approveNetworkToolcall: (toolName: string, runId?: string) => void;
|
|
24
28
|
declineNetworkToolcall: (toolName: string, runId?: string) => void;
|
|
25
29
|
isRunning: boolean;
|
|
@@ -34,6 +38,6 @@ interface ToolCallProviderProps {
|
|
|
34
38
|
};
|
|
35
39
|
};
|
|
36
40
|
}
|
|
37
|
-
export declare function ToolCallProvider({ children, approveToolcall, declineToolcall, approveNetworkToolcall, declineNetworkToolcall, isRunning, toolCallApprovals, networkToolCallApprovals, }: ToolCallProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare function ToolCallProvider({ children, approveToolcall, declineToolcall, approveToolcallGenerate, declineToolcallGenerate, approveNetworkToolcall, declineNetworkToolcall, isRunning, toolCallApprovals, networkToolCallApprovals, }: ToolCallProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
38
42
|
export declare function useToolCall(): ToolCallContextValue;
|
|
39
43
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/playground-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.0.0-beta.
|
|
4
|
+
"version": "7.0.0-beta.26",
|
|
5
5
|
"description": "Mastra Playground components",
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
@@ -111,10 +111,10 @@
|
|
|
111
111
|
"react": ">=19.0.0",
|
|
112
112
|
"react-dom": ">=19.0.0",
|
|
113
113
|
"tailwindcss": "^3.0.0",
|
|
114
|
-
"@mastra/
|
|
115
|
-
"@mastra/
|
|
116
|
-
"@mastra/
|
|
117
|
-
"@mastra/
|
|
114
|
+
"@mastra/client-js": "^1.0.0-beta.26",
|
|
115
|
+
"@mastra/react": "0.1.0-beta.26",
|
|
116
|
+
"@mastra/schema-compat": "1.0.0-beta.8",
|
|
117
|
+
"@mastra/ai-sdk": "^1.0.0-beta.16"
|
|
118
118
|
},
|
|
119
119
|
"devDependencies": {
|
|
120
120
|
"@storybook/addon-docs": "^9.1.16",
|
|
@@ -140,11 +140,11 @@
|
|
|
140
140
|
"vite-plugin-dts": "^4.5.4",
|
|
141
141
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
142
142
|
"vitest": "4.0.16",
|
|
143
|
-
"@mastra/ai-sdk": "^1.0.0-beta.
|
|
144
|
-
"@mastra/
|
|
145
|
-
"@mastra/
|
|
146
|
-
"@mastra/react": "1.0
|
|
147
|
-
"@mastra/
|
|
143
|
+
"@mastra/ai-sdk": "^1.0.0-beta.16",
|
|
144
|
+
"@mastra/client-js": "^1.0.0-beta.26",
|
|
145
|
+
"@mastra/core": "1.0.0-beta.26",
|
|
146
|
+
"@mastra/react": "0.1.0-beta.26",
|
|
147
|
+
"@mastra/schema-compat": "1.0.0-beta.8"
|
|
148
148
|
},
|
|
149
149
|
"homepage": "https://mastra.ai",
|
|
150
150
|
"repository": {
|