@mastra/client-js 1.47.0-alpha.1 → 1.47.0-alpha.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.
@@ -1,5 +1,5 @@
1
- import { processDataStream } from '../_types/@ai-sdk_ui-utils/dist/index.d.ts';
2
- import type { JSONValue } from '../_types/@ai-sdk_ui-utils/dist/index.d.ts';
1
+ import { processDataStream } from '../_types/@ai-sdk_ui-utils/dist/index.js';
2
+ import type { JSONValue } from '../_types/@ai-sdk_ui-utils/dist/index.js';
3
3
  import type { MessageListInput } from '@mastra/core/agent/message-list';
4
4
  import type { GenerateReturn } from '@mastra/core/llm';
5
5
  import type { RequestContext } from '@mastra/core/request-context';
@@ -1,5 +1,5 @@
1
1
  import type { RequestContext } from '@mastra/core/request-context';
2
- import type { ClientOptions, McpToolInfo } from '../types.js';
2
+ import type { ClientOptions, McpToolExecuteResponse, McpToolInfo } from '../types.js';
3
3
  import { BaseResource } from './base.js';
4
4
  /**
5
5
  * Represents a specific tool available on a specific MCP server.
@@ -18,11 +18,16 @@ export declare class MCPTool extends BaseResource {
18
18
  /**
19
19
  * Executes this specific tool on the MCP server.
20
20
  * @param params - Parameters for tool execution, including data/args and optional requestContext.
21
- * @returns Promise containing the result of the tool execution.
21
+ * On a 2026-07-28 server a tool can answer `{ status: 'suspended', suspendPayload, resumeSchema }`;
22
+ * call again with the same `data` plus `resumeData` (matching `resumeSchema`) and the echoed
23
+ * `suspendPayload` to continue it.
24
+ * @returns Promise containing `{ result }`, or the suspended shape described above.
22
25
  */
23
26
  execute(params: {
24
27
  data?: any;
25
28
  requestContext?: RequestContext;
26
- }): Promise<any>;
29
+ resumeData?: unknown;
30
+ suspendPayload?: unknown;
31
+ }): Promise<McpToolExecuteResponse>;
27
32
  }
28
33
  //# sourceMappingURL=mcp-tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-tool.d.ts","sourceRoot":"","sources":["../../src/resources/mcp-tool.ts"],"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GAAG,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAInF;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,MAAM,EAAE;QACd,IAAI,CAAC,EAAE,GAAG,CAAC;QACX,cAAc,CAAC,EAAE,cAAc,CAAC;QAChC,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAgBlC;CACF"}
@@ -101,7 +101,7 @@ type Shared_Auxiliary_647 = {
101
101
  none: Shared_Auxiliary_595;
102
102
  };
103
103
  };
104
- type Shared_Auxiliary_1168 = {
104
+ type Shared_Auxiliary_1169 = {
105
105
  op: 'eq' | 'ne' | 'lt' | 'lte' | 'gt' | 'gte';
106
106
  left: {
107
107
  path: string;
@@ -133,17 +133,17 @@ type Shared_Auxiliary_1168 = {
133
133
  };
134
134
  } | {
135
135
  op: 'and' | 'or';
136
- args: Shared_Auxiliary_1168[];
136
+ args: Shared_Auxiliary_1169[];
137
137
  } | {
138
138
  op: 'not';
139
- arg: Shared_Auxiliary_1168;
139
+ arg: Shared_Auxiliary_1169;
140
140
  };
141
- type Shared_Auxiliary_1308 = {
141
+ type Shared_Auxiliary_1309 = {
142
142
  id?: string | undefined;
143
143
  name: string;
144
144
  type: 'file' | 'folder';
145
145
  content?: string | undefined;
146
- children?: Shared_Auxiliary_1308[] | undefined;
146
+ children?: Shared_Auxiliary_1309[] | undefined;
147
147
  };
148
148
  type Shared_Type_0 = {
149
149
  id: string;
@@ -1956,7 +1956,7 @@ type Shared_Type_111 = {
1956
1956
  [key: string]: unknown;
1957
1957
  } | undefined;
1958
1958
  steps: Shared_Type_106;
1959
- predicates: Shared_Auxiliary_1168[];
1959
+ predicates: Shared_Auxiliary_1169[];
1960
1960
  };
1961
1961
  type Shared_Type_112 = {
1962
1962
  type: 'loop';
@@ -1972,7 +1972,7 @@ type Shared_Type_112 = {
1972
1972
  description?: string | undefined;
1973
1973
  };
1974
1974
  loopType: 'dowhile' | 'dountil';
1975
- predicate: Shared_Auxiliary_1168;
1975
+ predicate: Shared_Auxiliary_1169;
1976
1976
  };
1977
1977
  type Shared_Type_113 = Shared_Type_103 | Shared_Type_104 | Shared_Type_105 | {
1978
1978
  type: 'workflow';
@@ -2251,7 +2251,7 @@ type Shared_Type_126 = {
2251
2251
  /** List of asset file paths */
2252
2252
  assets?: string[] | undefined;
2253
2253
  /** Full file tree structure for the skill */
2254
- files?: Shared_Auxiliary_1308[] | undefined;
2254
+ files?: Shared_Auxiliary_1309[] | undefined;
2255
2255
  /** Additional metadata for the skill */
2256
2256
  metadata?: {
2257
2257
  [key: string]: unknown;
@@ -10166,9 +10166,20 @@ export interface GetMcpServerIdToolsToolId_RouteContract {
10166
10166
  export type PostMcpServerIdToolsToolIdExecute_PathParams = GetMcpServerIdToolsToolId_PathParams;
10167
10167
  export type PostMcpServerIdToolsToolIdExecute_Body = {
10168
10168
  data?: unknown | undefined;
10169
+ /** Answer for a tool that reported `status: "suspended"`; 2026-07-28 servers only */
10170
+ resumeData?: unknown | undefined;
10171
+ /** The `suspendPayload` from the suspended response, echoed back with `resumeData` */
10172
+ suspendPayload?: unknown | undefined;
10169
10173
  };
10170
10174
  export type PostMcpServerIdToolsToolIdExecute_Response = {
10171
10175
  result: unknown;
10176
+ } | {
10177
+ /** The tool paused and asked for input; it did not complete */
10178
+ status: 'suspended';
10179
+ /** What the tool suspended with */
10180
+ suspendPayload: unknown;
10181
+ /** JSON Schema of the input the tool needs to resume */
10182
+ resumeSchema?: unknown | undefined;
10172
10183
  };
10173
10184
  export type PostMcpServerIdToolsToolIdExecute_Request = Simplify<(PostMcpServerIdToolsToolIdExecute_PathParams extends never ? {} : {
10174
10185
  params: PostMcpServerIdToolsToolIdExecute_PathParams;
@@ -13288,7 +13299,7 @@ export type PostStoredSkills_Body = {
13288
13299
  /** List of asset file paths */
13289
13300
  assets?: string[] | undefined;
13290
13301
  /** Full file tree structure for the skill */
13291
- files?: Shared_Auxiliary_1308[] | undefined;
13302
+ files?: Shared_Auxiliary_1309[] | undefined;
13292
13303
  /** Additional metadata for the skill */
13293
13304
  metadata?: {
13294
13305
  [key: string]: unknown;
@@ -13338,7 +13349,7 @@ export type PatchStoredSkillsStoredSkillId_Body = {
13338
13349
  /** List of asset file paths */
13339
13350
  assets?: (string[] | undefined) | undefined;
13340
13351
  /** Full file tree structure for the skill */
13341
- files?: (Shared_Auxiliary_1308[] | undefined) | undefined;
13352
+ files?: (Shared_Auxiliary_1309[] | undefined) | undefined;
13342
13353
  /** Additional metadata for the skill */
13343
13354
  metadata?: ({
13344
13355
  [key: string]: unknown;