@mastra/client-js 0.0.0-afterToolExecute-20250414225911 → 0.0.0-agui-20250501182100

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/src/types.ts CHANGED
@@ -8,9 +8,11 @@ import type {
8
8
  StorageThreadType,
9
9
  BaseLogMessage,
10
10
  WorkflowRunResult as CoreWorkflowRunResult,
11
+ WorkflowRuns,
11
12
  } from '@mastra/core';
12
13
 
13
14
  import type { AgentGenerateOptions, AgentStreamOptions } from '@mastra/core/agent';
15
+ import type { NewWorkflow, WatchEvent, WorkflowResult as VNextWorkflowResult } from '@mastra/core/workflows/vNext';
14
16
  import type { JSONSchema7 } from 'json-schema';
15
17
  import type { ZodSchema } from 'zod';
16
18
 
@@ -46,14 +48,17 @@ export interface GetAgentResponse {
46
48
 
47
49
  export type GenerateParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> = {
48
50
  messages: string | string[] | CoreMessage[] | AiMessageType[];
49
- } & Partial<Omit<AgentGenerateOptions<T>, 'onAfterToolExecute'>>;
51
+ } & Partial<AgentGenerateOptions<T>>;
50
52
 
51
53
  export type StreamParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> = {
52
54
  messages: string | string[] | CoreMessage[] | AiMessageType[];
53
- } & Omit<AgentStreamOptions<T>, 'onFinish' | 'onStepFinish' | 'telemetry' | 'onAfterToolExecute'>;
55
+ } & Omit<AgentStreamOptions<T>, 'onFinish' | 'onStepFinish' | 'telemetry'>;
54
56
 
55
57
  export interface GetEvalsByAgentIdResponse extends GetAgentResponse {
56
58
  evals: any[];
59
+ instructions: string;
60
+ name: string;
61
+ id: string;
57
62
  }
58
63
 
59
64
  export interface GetToolResponse {
@@ -72,12 +77,35 @@ export interface GetWorkflowResponse {
72
77
  workflowId?: string;
73
78
  }
74
79
 
80
+ export type GetWorkflowRunsResponse = WorkflowRuns;
81
+
75
82
  export type WorkflowRunResult = {
76
83
  activePaths: Record<string, { status: string; suspendPayload?: any; stepPath: string[] }>;
77
84
  results: CoreWorkflowRunResult<any, any, any>['results'];
78
85
  timestamp: number;
79
86
  runId: string;
80
87
  };
88
+
89
+ export interface GetVNextWorkflowResponse {
90
+ name: string;
91
+ steps: {
92
+ [key: string]: {
93
+ id: string;
94
+ description: string;
95
+ inputSchema: string;
96
+ outputSchema: string;
97
+ resumeSchema: string;
98
+ suspendSchema: string;
99
+ };
100
+ };
101
+ stepGraph: NewWorkflow['serializedStepGraph'];
102
+ inputSchema: string;
103
+ outputSchema: string;
104
+ }
105
+
106
+ export type VNextWorkflowWatchResult = WatchEvent & { runId: string };
107
+
108
+ export type VNextWorkflowRunResult = VNextWorkflowResult<any, any>;
81
109
  export interface UpsertVectorParams {
82
110
  indexName: string;
83
111
  vectors: number[][];
@@ -118,7 +146,7 @@ export type SaveMessageToMemoryResponse = MessageType[];
118
146
  export interface CreateMemoryThreadParams {
119
147
  title: string;
120
148
  metadata: Record<string, any>;
121
- resourceid: string;
149
+ resourceId: string;
122
150
  threadId: string;
123
151
  agentId: string;
124
152
  }
@@ -135,7 +163,7 @@ export type GetMemoryThreadResponse = StorageThreadType[];
135
163
  export interface UpdateMemoryThreadParams {
136
164
  title: string;
137
165
  metadata: Record<string, any>;
138
- resourceid: string;
166
+ resourceId: string;
139
167
  }
140
168
 
141
169
  export interface GetMemoryThreadMessagesResponse {