@mastra/client-js 0.1.0-alpha.11 → 0.1.0-alpha.13

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/dist/index.d.mts CHANGED
@@ -267,7 +267,9 @@ declare class Tool extends BaseResource {
267
267
  * @param params - Parameters required for tool execution
268
268
  * @returns Promise containing the tool execution results
269
269
  */
270
- execute(params: Record<string, any>): Promise<Record<string, any>>;
270
+ execute(params: {
271
+ data: any;
272
+ }): Promise<any>;
271
273
  }
272
274
 
273
275
  declare class MastraClient extends BaseResource {
package/dist/index.mjs CHANGED
@@ -125,7 +125,7 @@ var Agent = class extends BaseResource {
125
125
  * @returns Promise containing live agent evaluations
126
126
  */
127
127
  liveEvals() {
128
- return this.request(`/api/agents/${this.agentId}/evals/live`);
128
+ return this.request(`/api/agents/${this.agentId}/evals/ci`);
129
129
  }
130
130
  };
131
131
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/client-js",
3
- "version": "0.1.0-alpha.11",
3
+ "version": "0.1.0-alpha.13",
4
4
  "description": "The official TypeScript library for the Mastra Client API",
5
5
  "author": "",
6
6
  "types": "dist/index.d.mts",
@@ -16,11 +16,6 @@
16
16
  },
17
17
  "repository": "github:mastra-ai/client-js",
18
18
  "license": "ISC",
19
- "scripts": {
20
- "build": "tsup-node src/index.ts --format esm --dts --clean --treeshake",
21
- "dev": "tsup-node src/index.ts --format esm --dts --clean --treeshake --watch",
22
- "test": "vitest run"
23
- },
24
19
  "dependencies": {
25
20
  "@mastra/core": "^0.2.0-alpha.83",
26
21
  "json-schema": "^0.4.0",
@@ -36,5 +31,10 @@
36
31
  "tsup": "^8.0.1",
37
32
  "typescript": "^5.7.3",
38
33
  "vitest": "^3.0.4"
34
+ },
35
+ "scripts": {
36
+ "build": "tsup-node src/index.ts --format esm --dts --clean --treeshake",
37
+ "dev": "tsup-node src/index.ts --format esm --dts --clean --treeshake --watch",
38
+ "test": "vitest run"
39
39
  }
40
- }
40
+ }
package/src/example.ts CHANGED
@@ -12,10 +12,6 @@ import { MastraClient } from "./client";
12
12
  messages: [{
13
13
  role: 'user',
14
14
  content: 'Hello, world!',
15
- id: '1',
16
- createdAt: new Date(),
17
- threadId: '1',
18
- type: 'text',
19
15
  }]
20
16
  })
21
17
 
@@ -29,7 +29,7 @@ export class AgentTool extends BaseResource {
29
29
  * @param params - Parameters required for tool execution
30
30
  * @returns Promise containing tool execution results
31
31
  */
32
- execute(params: Record<string, any>): Promise<Record<string, any>> {
32
+ execute(params: { data: any }): Promise<any> {
33
33
  return this.request(`/api/agents/${this.agentId}/tools/${this.toolId}/execute`, {
34
34
  method: 'POST',
35
35
  body: params,
@@ -110,6 +110,6 @@ export class Agent extends BaseResource {
110
110
  * @returns Promise containing live agent evaluations
111
111
  */
112
112
  liveEvals(): Promise<GetEvalsByAgentIdResponse> {
113
- return this.request(`/api/agents/${this.agentId}/evals/live`);
113
+ return this.request(`/api/agents/${this.agentId}/evals/ci`);
114
114
  }
115
115
  }
@@ -22,7 +22,7 @@ export class Tool extends BaseResource {
22
22
  * @param params - Parameters required for tool execution
23
23
  * @returns Promise containing the tool execution results
24
24
  */
25
- execute(params: Record<string, any>): Promise<Record<string, any>> {
25
+ execute(params: { data: any }): Promise<any> {
26
26
  return this.request(`/api/tools/${this.toolId}/execute`, {
27
27
  method: 'POST',
28
28
  body: params,