@mastra/client-js 0.0.0-agui-20250501182100 → 0.0.0-agui-20250501191909
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 +2 -2
- package/dist/index.cjs +4 -3
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -3
- package/package.json +2 -2
- package/src/client.ts +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @mastra/client-js
|
|
2
2
|
|
|
3
|
-
## 0.0.0-agui-
|
|
3
|
+
## 0.0.0-agui-20250501191909
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
- Updated dependencies [26738f4]
|
|
14
14
|
- Updated dependencies [b804723]
|
|
15
15
|
- Updated dependencies [0097d50]
|
|
16
|
-
- @mastra/core@0.0.0-agui-
|
|
16
|
+
- @mastra/core@0.0.0-agui-20250501191909
|
|
17
17
|
|
|
18
18
|
## 0.1.20-alpha.2
|
|
19
19
|
|
package/dist/index.cjs
CHANGED
|
@@ -901,14 +901,15 @@ var MastraClient = class extends BaseResource {
|
|
|
901
901
|
getAgents() {
|
|
902
902
|
return this.request("/api/agents");
|
|
903
903
|
}
|
|
904
|
-
async getAGUI() {
|
|
905
|
-
const agents = await this.
|
|
904
|
+
async getAGUI({ resourceId }) {
|
|
905
|
+
const agents = await this.getAgents();
|
|
906
906
|
return Object.entries(agents).reduce(
|
|
907
907
|
(acc, [agentId]) => {
|
|
908
908
|
const agent = this.getAgent(agentId);
|
|
909
909
|
acc[agentId] = new AGUIAdapter({
|
|
910
910
|
agentId,
|
|
911
|
-
agent
|
|
911
|
+
agent,
|
|
912
|
+
resourceId
|
|
912
913
|
});
|
|
913
914
|
return acc;
|
|
914
915
|
},
|
package/dist/index.d.cts
CHANGED
|
@@ -612,7 +612,9 @@ declare class MastraClient extends BaseResource {
|
|
|
612
612
|
* @returns Promise containing map of agent IDs to agent details
|
|
613
613
|
*/
|
|
614
614
|
getAgents(): Promise<Record<string, GetAgentResponse>>;
|
|
615
|
-
getAGUI(
|
|
615
|
+
getAGUI({ resourceId }: {
|
|
616
|
+
resourceId: string;
|
|
617
|
+
}): Promise<Record<string, AGUIAdapter>>;
|
|
616
618
|
/**
|
|
617
619
|
* Gets an agent instance by ID
|
|
618
620
|
* @param agentId - ID of the agent to retrieve
|
package/dist/index.d.ts
CHANGED
|
@@ -612,7 +612,9 @@ declare class MastraClient extends BaseResource {
|
|
|
612
612
|
* @returns Promise containing map of agent IDs to agent details
|
|
613
613
|
*/
|
|
614
614
|
getAgents(): Promise<Record<string, GetAgentResponse>>;
|
|
615
|
-
getAGUI(
|
|
615
|
+
getAGUI({ resourceId }: {
|
|
616
|
+
resourceId: string;
|
|
617
|
+
}): Promise<Record<string, AGUIAdapter>>;
|
|
616
618
|
/**
|
|
617
619
|
* Gets an agent instance by ID
|
|
618
620
|
* @param agentId - ID of the agent to retrieve
|
package/dist/index.js
CHANGED
|
@@ -899,14 +899,15 @@ var MastraClient = class extends BaseResource {
|
|
|
899
899
|
getAgents() {
|
|
900
900
|
return this.request("/api/agents");
|
|
901
901
|
}
|
|
902
|
-
async getAGUI() {
|
|
903
|
-
const agents = await this.
|
|
902
|
+
async getAGUI({ resourceId }) {
|
|
903
|
+
const agents = await this.getAgents();
|
|
904
904
|
return Object.entries(agents).reduce(
|
|
905
905
|
(acc, [agentId]) => {
|
|
906
906
|
const agent = this.getAgent(agentId);
|
|
907
907
|
acc[agentId] = new AGUIAdapter({
|
|
908
908
|
agentId,
|
|
909
|
-
agent
|
|
909
|
+
agent,
|
|
910
|
+
resourceId
|
|
910
911
|
});
|
|
911
912
|
return acc;
|
|
912
913
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/client-js",
|
|
3
|
-
"version": "0.0.0-agui-
|
|
3
|
+
"version": "0.0.0-agui-20250501191909",
|
|
4
4
|
"description": "The official TypeScript library for the Mastra Client API",
|
|
5
5
|
"author": "",
|
|
6
6
|
"type": "module",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"rxjs": "7.8.1",
|
|
29
29
|
"zod": "^3.24.2",
|
|
30
30
|
"zod-to-json-schema": "^3.24.3",
|
|
31
|
-
"@mastra/core": "0.0.0-agui-
|
|
31
|
+
"@mastra/core": "0.0.0-agui-20250501191909"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"zod": "^3.24.2"
|
package/src/client.ts
CHANGED
|
@@ -33,15 +33,17 @@ export class MastraClient extends BaseResource {
|
|
|
33
33
|
return this.request('/api/agents');
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
public async getAGUI(): Promise<Record<string, AGUIAdapter>> {
|
|
37
|
-
const agents =
|
|
36
|
+
public async getAGUI({ resourceId }: { resourceId: string }): Promise<Record<string, AGUIAdapter>> {
|
|
37
|
+
const agents = await this.getAgents();
|
|
38
38
|
|
|
39
39
|
return Object.entries(agents).reduce(
|
|
40
40
|
(acc, [agentId]) => {
|
|
41
41
|
const agent = this.getAgent(agentId);
|
|
42
|
+
|
|
42
43
|
acc[agentId] = new AGUIAdapter({
|
|
43
44
|
agentId,
|
|
44
45
|
agent,
|
|
46
|
+
resourceId,
|
|
45
47
|
});
|
|
46
48
|
|
|
47
49
|
return acc;
|