@mastra/client-js 0.0.0-declaration-maps-20250730185206 → 0.0.0-experimental-agent-builder-20250815195917
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/.turbo/turbo-build.log +16 -2
- package/CHANGELOG.md +184 -2
- package/dist/adapters/agui.d.ts +1 -1
- package/dist/adapters/agui.d.ts.map +1 -1
- package/dist/client.d.ts +9 -4
- package/dist/client.d.ts.map +1 -1
- package/dist/index.cjs +64 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +64 -31
- package/dist/index.js.map +1 -1
- package/dist/resources/a2a.d.ts +15 -18
- package/dist/resources/a2a.d.ts.map +1 -1
- package/dist/resources/agent.d.ts +13 -2
- package/dist/resources/agent.d.ts.map +1 -1
- package/dist/resources/base.d.ts +1 -1
- package/dist/resources/index.d.ts +10 -10
- package/dist/resources/legacy-workflow.d.ts +2 -2
- package/dist/resources/mcp-tool.d.ts +2 -2
- package/dist/resources/memory-thread.d.ts +2 -2
- package/dist/resources/network-memory-thread.d.ts +2 -2
- package/dist/resources/network.d.ts +2 -2
- package/dist/resources/tool.d.ts +2 -2
- package/dist/resources/vNextNetwork.d.ts +2 -2
- package/dist/resources/vector.d.ts +2 -2
- package/dist/resources/workflow.d.ts +2 -2
- package/package.json +7 -5
- package/src/adapters/agui.ts +29 -11
- package/src/client.ts +8 -0
- package/src/resources/a2a.ts +35 -25
- package/src/resources/agent.ts +13 -1
- package/tsup.config.ts +2 -7
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/client-js@0.10.
|
|
3
|
-
> tsup --
|
|
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
|
+
[34mCLI[39m Building entry: src/index.ts
|
|
6
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
|
+
[34mCLI[39m tsup v8.5.0
|
|
8
|
+
[34mCLI[39m Using tsup config: /home/runner/work/mastra/mastra/client-sdks/client-js/tsup.config.ts
|
|
9
|
+
[34mCLI[39m Target: es2022
|
|
10
|
+
[34mCLI[39m Cleaning output folder
|
|
11
|
+
[34mESM[39m Build start
|
|
12
|
+
[34mCJS[39m Build start
|
|
13
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m76.75 KB[39m
|
|
14
|
+
[32mCJS[39m [1mdist/index.cjs.map [22m[32m164.21 KB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 2022ms
|
|
16
|
+
[32mESM[39m [1mdist/index.js [22m[32m76.44 KB[39m
|
|
17
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m164.02 KB[39m
|
|
18
|
+
[32mESM[39m ⚡️ Build success in 2023ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,187 @@
|
|
|
1
1
|
# @mastra/client-js
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-experimental-agent-builder-20250815195917
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [8e59433]
|
|
8
|
+
- Updated dependencies [49281f5]
|
|
9
|
+
- Updated dependencies [6faaee5]
|
|
10
|
+
- Updated dependencies [4232b14]
|
|
11
|
+
- Updated dependencies [6720c51]
|
|
12
|
+
- Updated dependencies [2256977]
|
|
13
|
+
- Updated dependencies [c597dc5]
|
|
14
|
+
- Updated dependencies [a722c0b]
|
|
15
|
+
- Updated dependencies [c30bca8]
|
|
16
|
+
- Updated dependencies [7444737]
|
|
17
|
+
- Updated dependencies [83d180b]
|
|
18
|
+
- Updated dependencies [3b5fec7]
|
|
19
|
+
- @mastra/core@0.0.0-experimental-agent-builder-20250815195917
|
|
20
|
+
|
|
21
|
+
## 0.10.22-alpha.0
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [c30bca8]
|
|
26
|
+
- @mastra/core@0.13.3-alpha.0
|
|
27
|
+
|
|
28
|
+
## 0.10.21
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- a239d41: Updated A2A syntax to v0.3.0
|
|
33
|
+
- 96169cc: Create handler that returns providers user has keys for in their env
|
|
34
|
+
- ce04175: Add update agent model handler
|
|
35
|
+
- Updated dependencies [d5330bf]
|
|
36
|
+
- Updated dependencies [2e74797]
|
|
37
|
+
- Updated dependencies [8388649]
|
|
38
|
+
- Updated dependencies [a239d41]
|
|
39
|
+
- Updated dependencies [dd94a26]
|
|
40
|
+
- Updated dependencies [3ba6772]
|
|
41
|
+
- Updated dependencies [b5cf2a3]
|
|
42
|
+
- Updated dependencies [2fff911]
|
|
43
|
+
- Updated dependencies [b32c50d]
|
|
44
|
+
- Updated dependencies [63449d0]
|
|
45
|
+
- Updated dependencies [121a3f8]
|
|
46
|
+
- Updated dependencies [ec510e7]
|
|
47
|
+
- @mastra/core@0.13.2
|
|
48
|
+
|
|
49
|
+
## 0.10.21-alpha.3
|
|
50
|
+
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- Updated dependencies [b5cf2a3]
|
|
54
|
+
- @mastra/core@0.13.2-alpha.3
|
|
55
|
+
|
|
56
|
+
## 0.10.21-alpha.2
|
|
57
|
+
|
|
58
|
+
### Patch Changes
|
|
59
|
+
|
|
60
|
+
- a239d41: Updated A2A syntax to v0.3.0
|
|
61
|
+
- 96169cc: Create handler that returns providers user has keys for in their env
|
|
62
|
+
- ce04175: Add update agent model handler
|
|
63
|
+
- Updated dependencies [d5330bf]
|
|
64
|
+
- Updated dependencies [a239d41]
|
|
65
|
+
- Updated dependencies [b32c50d]
|
|
66
|
+
- Updated dependencies [121a3f8]
|
|
67
|
+
- Updated dependencies [ec510e7]
|
|
68
|
+
- @mastra/core@0.13.2-alpha.2
|
|
69
|
+
|
|
70
|
+
## 0.10.21-alpha.1
|
|
71
|
+
|
|
72
|
+
### Patch Changes
|
|
73
|
+
|
|
74
|
+
- Updated dependencies [2e74797]
|
|
75
|
+
- Updated dependencies [63449d0]
|
|
76
|
+
- @mastra/core@0.13.2-alpha.1
|
|
77
|
+
|
|
78
|
+
## 0.10.21-alpha.0
|
|
79
|
+
|
|
80
|
+
### Patch Changes
|
|
81
|
+
|
|
82
|
+
- Updated dependencies [8388649]
|
|
83
|
+
- Updated dependencies [dd94a26]
|
|
84
|
+
- Updated dependencies [3ba6772]
|
|
85
|
+
- Updated dependencies [2fff911]
|
|
86
|
+
- @mastra/core@0.13.2-alpha.0
|
|
87
|
+
|
|
88
|
+
## 0.10.20
|
|
89
|
+
|
|
90
|
+
### Patch Changes
|
|
91
|
+
|
|
92
|
+
- Updated dependencies [cd0042e]
|
|
93
|
+
- @mastra/core@0.13.1
|
|
94
|
+
|
|
95
|
+
## 0.10.20-alpha.0
|
|
96
|
+
|
|
97
|
+
### Patch Changes
|
|
98
|
+
|
|
99
|
+
- Updated dependencies [cd0042e]
|
|
100
|
+
- @mastra/core@0.13.1-alpha.0
|
|
101
|
+
|
|
102
|
+
## 0.10.19
|
|
103
|
+
|
|
104
|
+
### Patch Changes
|
|
105
|
+
|
|
106
|
+
- 42dfc48: Fix tool messages structure in agui adapter
|
|
107
|
+
- 4a406ec: fixes TypeScript declaration file imports to ensure proper ESM compatibility
|
|
108
|
+
- Updated dependencies [cb36de0]
|
|
109
|
+
- Updated dependencies [d0496e6]
|
|
110
|
+
- Updated dependencies [a82b851]
|
|
111
|
+
- Updated dependencies [ea0c5f2]
|
|
112
|
+
- Updated dependencies [41a0a0e]
|
|
113
|
+
- Updated dependencies [2871020]
|
|
114
|
+
- Updated dependencies [94f4812]
|
|
115
|
+
- Updated dependencies [e202b82]
|
|
116
|
+
- Updated dependencies [e00f6a0]
|
|
117
|
+
- Updated dependencies [4a406ec]
|
|
118
|
+
- Updated dependencies [b0e43c1]
|
|
119
|
+
- Updated dependencies [5d377e5]
|
|
120
|
+
- Updated dependencies [1fb812e]
|
|
121
|
+
- Updated dependencies [35c5798]
|
|
122
|
+
- @mastra/core@0.13.0
|
|
123
|
+
|
|
124
|
+
## 0.10.19-alpha.3
|
|
125
|
+
|
|
126
|
+
### Patch Changes
|
|
127
|
+
|
|
128
|
+
- Updated dependencies [d0496e6]
|
|
129
|
+
- @mastra/core@0.13.0-alpha.3
|
|
130
|
+
|
|
131
|
+
## 0.10.19-alpha.2
|
|
132
|
+
|
|
133
|
+
### Patch Changes
|
|
134
|
+
|
|
135
|
+
- 42dfc48: Fix tool messages structure in agui adapter
|
|
136
|
+
- 4a406ec: fixes TypeScript declaration file imports to ensure proper ESM compatibility
|
|
137
|
+
- Updated dependencies [cb36de0]
|
|
138
|
+
- Updated dependencies [a82b851]
|
|
139
|
+
- Updated dependencies [41a0a0e]
|
|
140
|
+
- Updated dependencies [2871020]
|
|
141
|
+
- Updated dependencies [4a406ec]
|
|
142
|
+
- Updated dependencies [5d377e5]
|
|
143
|
+
- @mastra/core@0.13.0-alpha.2
|
|
144
|
+
|
|
145
|
+
## 0.10.19-alpha.1
|
|
146
|
+
|
|
147
|
+
### Patch Changes
|
|
148
|
+
|
|
149
|
+
- Updated dependencies [ea0c5f2]
|
|
150
|
+
- Updated dependencies [b0e43c1]
|
|
151
|
+
- Updated dependencies [1fb812e]
|
|
152
|
+
- Updated dependencies [35c5798]
|
|
153
|
+
- @mastra/core@0.13.0-alpha.1
|
|
154
|
+
|
|
155
|
+
## 0.10.19-alpha.0
|
|
156
|
+
|
|
157
|
+
### Patch Changes
|
|
158
|
+
|
|
159
|
+
- Updated dependencies [94f4812]
|
|
160
|
+
- Updated dependencies [e202b82]
|
|
161
|
+
- Updated dependencies [e00f6a0]
|
|
162
|
+
- @mastra/core@0.12.2-alpha.0
|
|
163
|
+
|
|
164
|
+
## 0.10.18
|
|
165
|
+
|
|
166
|
+
### Patch Changes
|
|
167
|
+
|
|
168
|
+
- 6690a16: dependencies updates:
|
|
169
|
+
- Updated dependency [`@ag-ui/client@^0.0.35` ↗︎](https://www.npmjs.com/package/@ag-ui/client/v/0.0.35) (from `^0.0.27`, in `dependencies`)
|
|
170
|
+
- Updated dependencies [33dcb07]
|
|
171
|
+
- Updated dependencies [d0d9500]
|
|
172
|
+
- Updated dependencies [d30b1a0]
|
|
173
|
+
- Updated dependencies [bff87f7]
|
|
174
|
+
- Updated dependencies [b4a8df0]
|
|
175
|
+
- @mastra/core@0.12.1
|
|
176
|
+
|
|
177
|
+
## 0.10.18-alpha.1
|
|
178
|
+
|
|
179
|
+
### Patch Changes
|
|
180
|
+
|
|
181
|
+
- Updated dependencies [d0d9500]
|
|
182
|
+
- @mastra/core@0.12.1-alpha.1
|
|
183
|
+
|
|
184
|
+
## 0.10.18-alpha.0
|
|
4
185
|
|
|
5
186
|
### Patch Changes
|
|
6
187
|
|
|
@@ -9,7 +190,8 @@
|
|
|
9
190
|
- Updated dependencies [33dcb07]
|
|
10
191
|
- Updated dependencies [d30b1a0]
|
|
11
192
|
- Updated dependencies [bff87f7]
|
|
12
|
-
|
|
193
|
+
- Updated dependencies [b4a8df0]
|
|
194
|
+
- @mastra/core@0.12.1-alpha.0
|
|
13
195
|
|
|
14
196
|
## 0.10.17
|
|
15
197
|
|
package/dist/adapters/agui.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { AgentConfig, BaseEvent, Message, RunAgentInput } from '@ag-ui/clie
|
|
|
2
2
|
import { AbstractAgent } from '@ag-ui/client';
|
|
3
3
|
import type { CoreMessage } from '@mastra/core';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
|
-
import type { Agent } from '../resources/agent';
|
|
5
|
+
import type { Agent } from '../resources/agent.js';
|
|
6
6
|
interface MastraAgentConfig extends AgentConfig {
|
|
7
7
|
agent: Agent;
|
|
8
8
|
agentId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agui.d.ts","sourceRoot":"","sources":["../../src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kB,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,WAAW,EAAE,CAoElF"}
|
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
|
package/dist/client.d.ts.map
CHANGED
|
@@ -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;AACnD,OAAO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b,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 parts = message.content ? [{ type: "text", text: message.content }] : [];
|
|
@@ -167,15 +173,22 @@ function convertMessagesToMastraMessages(messages) {
|
|
|
167
173
|
content: parts
|
|
168
174
|
});
|
|
169
175
|
if (message.toolCalls?.length) {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
176
|
+
for (const toolCall of message.toolCalls) {
|
|
177
|
+
if (!toolCallsWithResults.has(toolCall.id)) {
|
|
178
|
+
result.push({
|
|
179
|
+
role: "tool",
|
|
180
|
+
content: [
|
|
181
|
+
{
|
|
182
|
+
type: "tool-result",
|
|
183
|
+
toolCallId: toolCall.id,
|
|
184
|
+
toolName: toolCall.function.name,
|
|
185
|
+
result: JSON.parse(toolCall.function.arguments)
|
|
186
|
+
// This is still wrong but matches test expectations
|
|
187
|
+
}
|
|
188
|
+
]
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
179
192
|
}
|
|
180
193
|
} else if (message.role === "user") {
|
|
181
194
|
result.push({
|
|
@@ -188,8 +201,9 @@ function convertMessagesToMastraMessages(messages) {
|
|
|
188
201
|
content: [
|
|
189
202
|
{
|
|
190
203
|
type: "tool-result",
|
|
191
|
-
toolCallId: message.toolCallId,
|
|
204
|
+
toolCallId: message.toolCallId || "unknown",
|
|
192
205
|
toolName: "unknown",
|
|
206
|
+
// toolName is not available in tool messages from CopilotKit
|
|
193
207
|
result: message.content
|
|
194
208
|
}
|
|
195
209
|
]
|
|
@@ -867,6 +881,17 @@ var Agent = class extends BaseResource {
|
|
|
867
881
|
liveEvals() {
|
|
868
882
|
return this.request(`/api/agents/${this.agentId}/evals/live`);
|
|
869
883
|
}
|
|
884
|
+
/**
|
|
885
|
+
* Updates the model for the agent
|
|
886
|
+
* @param params - Parameters for updating the model
|
|
887
|
+
* @returns Promise containing the updated model
|
|
888
|
+
*/
|
|
889
|
+
updateModel(params) {
|
|
890
|
+
return this.request(`/api/agents/${this.agentId}/model`, {
|
|
891
|
+
method: "POST",
|
|
892
|
+
body: params
|
|
893
|
+
});
|
|
894
|
+
}
|
|
870
895
|
};
|
|
871
896
|
var Network = class extends BaseResource {
|
|
872
897
|
constructor(options, networkId) {
|
|
@@ -1606,22 +1631,38 @@ var A2A = class extends BaseResource {
|
|
|
1606
1631
|
* @returns Promise containing the agent card information
|
|
1607
1632
|
*/
|
|
1608
1633
|
async getCard() {
|
|
1609
|
-
return this.request(`/.well-known/${this.agentId}/agent.json`);
|
|
1634
|
+
return this.request(`/.well-known/${this.agentId}/agent-card.json`);
|
|
1610
1635
|
}
|
|
1611
1636
|
/**
|
|
1612
|
-
* Send a message to the agent and
|
|
1637
|
+
* Send a message to the agent and gets a message or task response
|
|
1613
1638
|
* @param params - Parameters for the task
|
|
1614
|
-
* @returns Promise containing the
|
|
1639
|
+
* @returns Promise containing the response
|
|
1615
1640
|
*/
|
|
1616
1641
|
async sendMessage(params) {
|
|
1617
1642
|
const response = await this.request(`/a2a/${this.agentId}`, {
|
|
1618
1643
|
method: "POST",
|
|
1619
1644
|
body: {
|
|
1620
|
-
method: "
|
|
1645
|
+
method: "message/send",
|
|
1621
1646
|
params
|
|
1622
1647
|
}
|
|
1623
1648
|
});
|
|
1624
|
-
return
|
|
1649
|
+
return response;
|
|
1650
|
+
}
|
|
1651
|
+
/**
|
|
1652
|
+
* Sends a message to an agent to initiate/continue a task and subscribes
|
|
1653
|
+
* the client to real-time updates for that task via Server-Sent Events (SSE).
|
|
1654
|
+
* @param params - Parameters for the task
|
|
1655
|
+
* @returns A stream of Server-Sent Events. Each SSE `data` field contains a `SendStreamingMessageResponse`
|
|
1656
|
+
*/
|
|
1657
|
+
async sendStreamingMessage(params) {
|
|
1658
|
+
const response = await this.request(`/a2a/${this.agentId}`, {
|
|
1659
|
+
method: "POST",
|
|
1660
|
+
body: {
|
|
1661
|
+
method: "message/stream",
|
|
1662
|
+
params
|
|
1663
|
+
}
|
|
1664
|
+
});
|
|
1665
|
+
return response;
|
|
1625
1666
|
}
|
|
1626
1667
|
/**
|
|
1627
1668
|
* Get the status and result of a task
|
|
@@ -1636,7 +1677,7 @@ var A2A = class extends BaseResource {
|
|
|
1636
1677
|
params
|
|
1637
1678
|
}
|
|
1638
1679
|
});
|
|
1639
|
-
return response
|
|
1680
|
+
return response;
|
|
1640
1681
|
}
|
|
1641
1682
|
/**
|
|
1642
1683
|
* Cancel a running task
|
|
@@ -1652,21 +1693,6 @@ var A2A = class extends BaseResource {
|
|
|
1652
1693
|
}
|
|
1653
1694
|
});
|
|
1654
1695
|
}
|
|
1655
|
-
/**
|
|
1656
|
-
* Send a message and subscribe to streaming updates (not fully implemented)
|
|
1657
|
-
* @param params - Parameters for the task
|
|
1658
|
-
* @returns Promise containing the task response
|
|
1659
|
-
*/
|
|
1660
|
-
async sendAndSubscribe(params) {
|
|
1661
|
-
return this.request(`/a2a/${this.agentId}`, {
|
|
1662
|
-
method: "POST",
|
|
1663
|
-
body: {
|
|
1664
|
-
method: "tasks/sendSubscribe",
|
|
1665
|
-
params
|
|
1666
|
-
},
|
|
1667
|
-
stream: true
|
|
1668
|
-
});
|
|
1669
|
-
}
|
|
1670
1696
|
};
|
|
1671
1697
|
|
|
1672
1698
|
// src/resources/mcp-tool.ts
|
|
@@ -2411,6 +2437,13 @@ var MastraClient = class extends BaseResource {
|
|
|
2411
2437
|
body: params
|
|
2412
2438
|
});
|
|
2413
2439
|
}
|
|
2440
|
+
/**
|
|
2441
|
+
* Retrieves model providers with available keys
|
|
2442
|
+
* @returns Promise containing model providers with available keys
|
|
2443
|
+
*/
|
|
2444
|
+
getModelProviders() {
|
|
2445
|
+
return this.request(`/api/model-providers`);
|
|
2446
|
+
}
|
|
2414
2447
|
};
|
|
2415
2448
|
|
|
2416
2449
|
exports.MastraClient = MastraClient;
|