@mastra/client-js 0.0.0-ai-v5-20250801192614 → 0.0.0-ai-v5-20250813235735

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,4 +1,18 @@
1
1
 
2
- > @mastra/client-js@0.10.18 build /home/runner/work/mastra/mastra/client-sdks/client-js
3
- > tsup --silent --config tsup.config.ts
2
+ > @mastra/client-js@0.10.22-alpha.0 build /home/runner/work/mastra/mastra/client-sdks/client-js
3
+ > tsup --config tsup.config.ts
4
4
 
5
+ CLI Building entry: src/index.ts
6
+ CLI Using tsconfig: tsconfig.json
7
+ CLI tsup v8.5.0
8
+ CLI Using tsup config: /home/runner/work/mastra/mastra/client-sdks/client-js/tsup.config.ts
9
+ CLI Target: es2022
10
+ CLI Cleaning output folder
11
+ ESM Build start
12
+ CJS Build start
13
+ ESM dist/index.js 76.67 KB
14
+ ESM dist/index.js.map 164.37 KB
15
+ ESM ⚡️ Build success in 2116ms
16
+ CJS dist/index.cjs 76.97 KB
17
+ CJS dist/index.cjs.map 164.54 KB
18
+ CJS ⚡️ Build success in 2117ms
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @mastra/client-js
2
2
 
3
- ## 0.0.0-ai-v5-20250801192614
3
+ ## 0.0.0-ai-v5-20250813235735
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -9,10 +9,151 @@
9
9
  ### Patch Changes
10
10
 
11
11
  - Updated dependencies [66858d4]
12
+ - Updated dependencies [c30bca8]
13
+ - @mastra/core@0.0.0-ai-v5-20250813235735
14
+
15
+ ## 0.10.22-alpha.0
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [c30bca8]
20
+ - @mastra/core@0.13.3-alpha.0
21
+
22
+ ## 0.10.21
23
+
24
+ ### Patch Changes
25
+
26
+ - a239d41: Updated A2A syntax to v0.3.0
27
+ - 96169cc: Create handler that returns providers user has keys for in their env
28
+ - ce04175: Add update agent model handler
29
+ - Updated dependencies [d5330bf]
30
+ - Updated dependencies [2e74797]
31
+ - Updated dependencies [8388649]
32
+ - Updated dependencies [a239d41]
33
+ - Updated dependencies [dd94a26]
34
+ - Updated dependencies [3ba6772]
35
+ - Updated dependencies [b5cf2a3]
36
+ - Updated dependencies [2fff911]
37
+ - Updated dependencies [b32c50d]
38
+ - Updated dependencies [63449d0]
39
+ - Updated dependencies [121a3f8]
40
+ - Updated dependencies [ec510e7]
41
+ - @mastra/core@0.13.2
42
+
43
+ ## 0.10.21-alpha.3
44
+
45
+ ### Patch Changes
46
+
47
+ - Updated dependencies [b5cf2a3]
48
+ - @mastra/core@0.13.2-alpha.3
49
+
50
+ ## 0.10.21-alpha.2
51
+
52
+ ### Patch Changes
53
+
54
+ - a239d41: Updated A2A syntax to v0.3.0
55
+ - 96169cc: Create handler that returns providers user has keys for in their env
56
+ - ce04175: Add update agent model handler
57
+ - Updated dependencies [d5330bf]
58
+ - Updated dependencies [a239d41]
59
+ - Updated dependencies [b32c50d]
60
+ - Updated dependencies [121a3f8]
61
+ - Updated dependencies [ec510e7]
62
+ - @mastra/core@0.13.2-alpha.2
63
+
64
+ ## 0.10.21-alpha.1
65
+
66
+ ### Patch Changes
67
+
68
+ - Updated dependencies [2e74797]
69
+ - Updated dependencies [63449d0]
70
+ - @mastra/core@0.13.2-alpha.1
71
+
72
+ ## 0.10.21-alpha.0
73
+
74
+ ### Patch Changes
75
+
76
+ - Updated dependencies [8388649]
77
+ - Updated dependencies [dd94a26]
78
+ - Updated dependencies [3ba6772]
79
+ - Updated dependencies [2fff911]
80
+ - @mastra/core@0.13.2-alpha.0
81
+
82
+ ## 0.10.20
83
+
84
+ ### Patch Changes
85
+
86
+ - Updated dependencies [cd0042e]
87
+ - @mastra/core@0.13.1
88
+
89
+ ## 0.10.20-alpha.0
90
+
91
+ ### Patch Changes
92
+
93
+ - Updated dependencies [cd0042e]
94
+ - @mastra/core@0.13.1-alpha.0
95
+
96
+ ## 0.10.19
97
+
98
+ ### Patch Changes
99
+
100
+ - 42dfc48: Fix tool messages structure in agui adapter
101
+ - 4a406ec: fixes TypeScript declaration file imports to ensure proper ESM compatibility
102
+ - Updated dependencies [cb36de0]
103
+ - Updated dependencies [d0496e6]
104
+ - Updated dependencies [a82b851]
105
+ - Updated dependencies [ea0c5f2]
106
+ - Updated dependencies [41a0a0e]
107
+ - Updated dependencies [2871020]
108
+ - Updated dependencies [94f4812]
109
+ - Updated dependencies [e202b82]
110
+ - Updated dependencies [e00f6a0]
111
+ - Updated dependencies [4a406ec]
112
+ - Updated dependencies [b0e43c1]
113
+ - Updated dependencies [5d377e5]
114
+ - Updated dependencies [1fb812e]
115
+ - Updated dependencies [35c5798]
116
+ - @mastra/core@0.13.0
117
+
118
+ ## 0.10.19-alpha.3
119
+
120
+ ### Patch Changes
121
+
122
+ - Updated dependencies [d0496e6]
123
+ - @mastra/core@0.13.0-alpha.3
124
+
125
+ ## 0.10.19-alpha.2
126
+
127
+ ### Patch Changes
128
+
129
+ - 42dfc48: Fix tool messages structure in agui adapter
130
+ - 4a406ec: fixes TypeScript declaration file imports to ensure proper ESM compatibility
131
+ - Updated dependencies [cb36de0]
132
+ - Updated dependencies [a82b851]
133
+ - Updated dependencies [41a0a0e]
134
+ - Updated dependencies [2871020]
135
+ - Updated dependencies [4a406ec]
136
+ - Updated dependencies [5d377e5]
137
+ - @mastra/core@0.13.0-alpha.2
138
+
139
+ ## 0.10.19-alpha.1
140
+
141
+ ### Patch Changes
142
+
143
+ - Updated dependencies [ea0c5f2]
144
+ - Updated dependencies [b0e43c1]
145
+ - Updated dependencies [1fb812e]
146
+ - Updated dependencies [35c5798]
147
+ - @mastra/core@0.13.0-alpha.1
148
+
149
+ ## 0.10.19-alpha.0
150
+
151
+ ### Patch Changes
152
+
12
153
  - Updated dependencies [94f4812]
13
154
  - Updated dependencies [e202b82]
14
155
  - Updated dependencies [e00f6a0]
15
- - @mastra/core@0.0.0-ai-v5-20250801192614
156
+ - @mastra/core@0.12.2-alpha.0
16
157
 
17
158
  ## 0.10.18
18
159
 
@@ -1,7 +1,7 @@
1
1
  import type { AgentConfig, BaseEvent, Message, RunAgentInput } from '@ag-ui/client';
2
2
  import { AbstractAgent } from '@ag-ui/client';
3
3
  import { Observable } from 'rxjs';
4
- import type { Agent } from '../resources/agent';
4
+ import type { Agent } from '../resources/agent.js';
5
5
  interface MastraAgentConfig extends AgentConfig {
6
6
  agent: Agent;
7
7
  agentId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"agui.d.ts","sourceRoot":"","sources":["../../src/adapters/agui.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,OAAO,EACP,aAAa,EASd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAa,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,UAAU,iBAAkB,SAAQ,WAAW;IAC7C,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,WAAY,SAAQ,aAAa;IAC5C,KAAK,EAAE,KAAK,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;gBACR,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,EAAE,iBAAiB;IAStE,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,aAAa,GAAG,UAAU,CAAC,SAAS,CAAC;CA+G3D;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAgCrC;AAED,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,GAAG,EAAE,CA+D1E"}
1
+ {"version":3,"file":"agui.d.ts","sourceRoot":"","sources":["../../src/adapters/agui.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,OAAO,EACP,aAAa,EASd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAa,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,UAAU,iBAAkB,SAAQ,WAAW;IAC7C,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,WAAY,SAAQ,aAAa;IAC5C,KAAK,EAAE,KAAK,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;gBACR,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,EAAE,iBAAiB;IAStE,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,aAAa,GAAG,UAAU,CAAC,SAAS,CAAC;CA+G3D;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAgCrC;AAED,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,GAAG,EAAE,CA2E1E"}
package/dist/client.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import type { AbstractAgent } from '@ag-ui/client';
2
2
  import type { ServerDetailInfo } from '@mastra/core/mcp';
3
- import { Agent, MemoryThread, Tool, Workflow, Vector, BaseResource, Network, A2A, MCPTool, LegacyWorkflow } from './resources';
4
- import { NetworkMemoryThread } from './resources/network-memory-thread';
5
- import { VNextNetwork } from './resources/vNextNetwork';
6
- import type { ClientOptions, CreateMemoryThreadParams, CreateMemoryThreadResponse, GetAgentResponse, GetLogParams, GetLogsParams, GetLogsResponse, GetMemoryThreadParams, GetMemoryThreadResponse, GetNetworkResponse, GetTelemetryParams, GetTelemetryResponse, GetToolResponse, GetWorkflowResponse, SaveMessageToMemoryParams, SaveMessageToMemoryResponse, McpServerListResponse, McpServerToolListResponse, GetLegacyWorkflowResponse, GetVNextNetworkResponse, GetNetworkMemoryThreadParams, CreateNetworkMemoryThreadParams, SaveNetworkMessageToMemoryParams, GetScorerResponse, GetScoresByScorerIdParams, GetScoresResponse, GetScoresByRunIdParams, GetScoresByEntityIdParams, SaveScoreParams, SaveScoreResponse } from './types';
3
+ import { Agent, MemoryThread, Tool, Workflow, Vector, BaseResource, Network, A2A, MCPTool, LegacyWorkflow } from './resources/index.js';
4
+ import { NetworkMemoryThread } from './resources/network-memory-thread.js';
5
+ import { VNextNetwork } from './resources/vNextNetwork.js';
6
+ import type { ClientOptions, CreateMemoryThreadParams, CreateMemoryThreadResponse, GetAgentResponse, GetLogParams, GetLogsParams, GetLogsResponse, GetMemoryThreadParams, GetMemoryThreadResponse, GetNetworkResponse, GetTelemetryParams, GetTelemetryResponse, GetToolResponse, GetWorkflowResponse, SaveMessageToMemoryParams, SaveMessageToMemoryResponse, McpServerListResponse, McpServerToolListResponse, GetLegacyWorkflowResponse, GetVNextNetworkResponse, GetNetworkMemoryThreadParams, CreateNetworkMemoryThreadParams, SaveNetworkMessageToMemoryParams, GetScorerResponse, GetScoresByScorerIdParams, GetScoresResponse, GetScoresByRunIdParams, GetScoresByEntityIdParams, SaveScoreParams, SaveScoreResponse } from './types.js';
7
7
  export declare class MastraClient extends BaseResource {
8
8
  constructor(options: ClientOptions);
9
9
  /**
@@ -261,5 +261,10 @@ export declare class MastraClient extends BaseResource {
261
261
  * @returns Promise containing the saved score
262
262
  */
263
263
  saveScore(params: SaveScoreParams): Promise<SaveScoreResponse>;
264
+ /**
265
+ * Retrieves model providers with available keys
266
+ * @returns Promise containing model providers with available keys
267
+ */
268
+ getModelProviders(): Promise<string[]>;
264
269
  }
265
270
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC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EACR,aAAa,EACb,UAAU,GACX,EAAE;QACD,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,EAAE,MAAM,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB;IAUD;;;OAGG;IACI,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IAI/D;;;;OAIG;IACI,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIvD,mBAAmB,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAqBzF;;;;OAIG;IACI,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAenF;;;;OAIG;IACI,mBAAmB,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAezF;;;;OAIG;IACI,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAOrE;;;OAGG;IACH,iBAAiB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAGvC"}
package/dist/index.cjs CHANGED
@@ -151,6 +151,12 @@ function generateUUID() {
151
151
  }
152
152
  function convertMessagesToMastraMessages(messages) {
153
153
  const result = [];
154
+ const toolCallsWithResults = /* @__PURE__ */ new Set();
155
+ for (const message of messages) {
156
+ if (message.role === "tool" && message.toolCallId) {
157
+ toolCallsWithResults.add(message.toolCallId);
158
+ }
159
+ }
154
160
  for (const message of messages) {
155
161
  if (message.role === "assistant") {
156
162
  const content = [];
@@ -171,17 +177,20 @@ function convertMessagesToMastraMessages(messages) {
171
177
  });
172
178
  if (message.toolCalls?.length) {
173
179
  for (const toolCall of message.toolCalls) {
174
- result.push({
175
- role: "tool",
176
- content: [
177
- {
178
- type: "tool-result",
179
- toolCallId: toolCall.id,
180
- toolName: toolCall.function.name,
181
- result: JSON.parse(toolCall.function.arguments)
182
- }
183
- ]
184
- });
180
+ if (!toolCallsWithResults.has(toolCall.id)) {
181
+ result.push({
182
+ role: "tool",
183
+ content: [
184
+ {
185
+ type: "tool-result",
186
+ toolCallId: toolCall.id,
187
+ toolName: toolCall.function.name,
188
+ result: JSON.parse(toolCall.function.arguments)
189
+ // This is still wrong but matches test expectations
190
+ }
191
+ ]
192
+ });
193
+ }
185
194
  }
186
195
  }
187
196
  } else if (message.role === "user") {
@@ -195,9 +204,10 @@ function convertMessagesToMastraMessages(messages) {
195
204
  content: [
196
205
  {
197
206
  type: "tool-result",
198
- toolCallId: message.toolCallId,
207
+ toolCallId: message.toolCallId || "unknown",
199
208
  toolName: "unknown",
200
- result: message.content || ""
209
+ // toolName is not available in tool messages from CopilotKit
210
+ result: message.content
201
211
  }
202
212
  ]
203
213
  });
@@ -880,6 +890,17 @@ var Agent = class extends BaseResource {
880
890
  liveEvals() {
881
891
  return this.request(`/api/agents/${this.agentId}/evals/live`);
882
892
  }
893
+ /**
894
+ * Updates the model for the agent
895
+ * @param params - Parameters for updating the model
896
+ * @returns Promise containing the updated model
897
+ */
898
+ updateModel(params) {
899
+ return this.request(`/api/agents/${this.agentId}/model`, {
900
+ method: "POST",
901
+ body: params
902
+ });
903
+ }
883
904
  };
884
905
  var Network = class extends BaseResource {
885
906
  constructor(options, networkId) {
@@ -1620,22 +1641,38 @@ var A2A = class extends BaseResource {
1620
1641
  * @returns Promise containing the agent card information
1621
1642
  */
1622
1643
  async getCard() {
1623
- return this.request(`/.well-known/${this.agentId}/agent.json`);
1644
+ return this.request(`/.well-known/${this.agentId}/agent-card.json`);
1624
1645
  }
1625
1646
  /**
1626
- * Send a message to the agent and get a response
1647
+ * Send a message to the agent and gets a message or task response
1627
1648
  * @param params - Parameters for the task
1628
- * @returns Promise containing the task response
1649
+ * @returns Promise containing the response
1629
1650
  */
1630
1651
  async sendMessage(params) {
1631
1652
  const response = await this.request(`/a2a/${this.agentId}`, {
1632
1653
  method: "POST",
1633
1654
  body: {
1634
- method: "tasks/send",
1655
+ method: "message/send",
1656
+ params
1657
+ }
1658
+ });
1659
+ return response;
1660
+ }
1661
+ /**
1662
+ * Sends a message to an agent to initiate/continue a task and subscribes
1663
+ * the client to real-time updates for that task via Server-Sent Events (SSE).
1664
+ * @param params - Parameters for the task
1665
+ * @returns A stream of Server-Sent Events. Each SSE `data` field contains a `SendStreamingMessageResponse`
1666
+ */
1667
+ async sendStreamingMessage(params) {
1668
+ const response = await this.request(`/a2a/${this.agentId}`, {
1669
+ method: "POST",
1670
+ body: {
1671
+ method: "message/stream",
1635
1672
  params
1636
1673
  }
1637
1674
  });
1638
- return { task: response.result };
1675
+ return response;
1639
1676
  }
1640
1677
  /**
1641
1678
  * Get the status and result of a task
@@ -1650,7 +1687,7 @@ var A2A = class extends BaseResource {
1650
1687
  params
1651
1688
  }
1652
1689
  });
1653
- return response.result;
1690
+ return response;
1654
1691
  }
1655
1692
  /**
1656
1693
  * Cancel a running task
@@ -1666,21 +1703,6 @@ var A2A = class extends BaseResource {
1666
1703
  }
1667
1704
  });
1668
1705
  }
1669
- /**
1670
- * Send a message and subscribe to streaming updates (not fully implemented)
1671
- * @param params - Parameters for the task
1672
- * @returns Promise containing the task response
1673
- */
1674
- async sendAndSubscribe(params) {
1675
- return this.request(`/a2a/${this.agentId}`, {
1676
- method: "POST",
1677
- body: {
1678
- method: "tasks/sendSubscribe",
1679
- params
1680
- },
1681
- stream: true
1682
- });
1683
- }
1684
1706
  };
1685
1707
 
1686
1708
  // src/resources/mcp-tool.ts
@@ -2425,6 +2447,13 @@ var MastraClient = class extends BaseResource {
2425
2447
  body: params
2426
2448
  });
2427
2449
  }
2450
+ /**
2451
+ * Retrieves model providers with available keys
2452
+ * @returns Promise containing model providers with available keys
2453
+ */
2454
+ getModelProviders() {
2455
+ return this.request(`/api/model-providers`);
2456
+ }
2428
2457
  };
2429
2458
 
2430
2459
  exports.MastraClient = MastraClient;