@mastra/client-js 0.10.2-alpha.0 → 0.10.2-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.
- package/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +17 -0
- package/dist/index.cjs +7 -0
- package/dist/index.d.cts +10 -3
- package/dist/index.d.ts +10 -3
- package/dist/index.js +7 -0
- package/package.json +3 -3
- package/src/resources/agent.ts +8 -0
- package/src/types.ts +3 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/client-js@0.10.2-alpha.
|
|
2
|
+
> @mastra/client-js@0.10.2-alpha.2 build /home/runner/work/mastra/mastra/client-sdks/client-js
|
|
3
3
|
> tsup src/index.ts --format esm,cjs --dts --clean --treeshake=smallest --splitting
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
[34mCLI[39m Cleaning output folder
|
|
10
10
|
[34mESM[39m Build start
|
|
11
11
|
[34mCJS[39m Build start
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
12
|
+
[32mESM[39m [1mdist/index.js [22m[32m43.65 KB[39m
|
|
13
|
+
[32mESM[39m ⚡️ Build success in 1542ms
|
|
14
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m43.94 KB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 1549ms
|
|
16
16
|
[34mDTS[39m Build start
|
|
17
|
-
[32mDTS[39m ⚡️ Build success in
|
|
18
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m31.
|
|
19
|
-
[32mDTS[39m [1mdist/index.d.cts [22m[32m31.
|
|
17
|
+
[32mDTS[39m ⚡️ Build success in 14713ms
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m31.92 KB[39m
|
|
19
|
+
[32mDTS[39m [1mdist/index.d.cts [22m[32m31.92 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @mastra/client-js
|
|
2
2
|
|
|
3
|
+
## 0.10.2-alpha.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c5bf1ce: Add backwards compat code for new MessageList in storage
|
|
8
|
+
- Updated dependencies [c5bf1ce]
|
|
9
|
+
- Updated dependencies [12b7002]
|
|
10
|
+
- @mastra/core@0.10.2-alpha.4
|
|
11
|
+
|
|
12
|
+
## 0.10.2-alpha.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- f0d559f: Fix peerdeps for alpha channel
|
|
17
|
+
- Updated dependencies [1e8bb40]
|
|
18
|
+
- @mastra/core@0.10.2-alpha.2
|
|
19
|
+
|
|
3
20
|
## 0.10.2-alpha.0
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -318,6 +318,13 @@ var AgentVoice = class extends BaseResource {
|
|
|
318
318
|
getSpeakers() {
|
|
319
319
|
return this.request(`/api/agents/${this.agentId}/voice/speakers`);
|
|
320
320
|
}
|
|
321
|
+
/**
|
|
322
|
+
* Get the listener configuration for the agent's voice provider
|
|
323
|
+
* @returns Promise containing a check if the agent has listening capabilities
|
|
324
|
+
*/
|
|
325
|
+
getListener() {
|
|
326
|
+
return this.request(`/api/agents/${this.agentId}/voice/listener`);
|
|
327
|
+
}
|
|
321
328
|
};
|
|
322
329
|
var Agent = class extends BaseResource {
|
|
323
330
|
constructor(options, agentId) {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AbstractAgent } from '@ag-ui/client';
|
|
2
2
|
import { ServerInfo, MCPToolType, ServerDetailInfo } from '@mastra/core/mcp';
|
|
3
3
|
import { processDataStream } from '@ai-sdk/ui-utils';
|
|
4
|
-
import { CoreMessage, AiMessageType, StorageThreadType,
|
|
4
|
+
import { CoreMessage, AiMessageType, StorageThreadType, MastraMessageV1, LegacyWorkflowRuns, WorkflowRuns, QueryResult, GenerateReturn } from '@mastra/core';
|
|
5
5
|
import { JSONSchema7 } from 'json-schema';
|
|
6
6
|
import { ZodSchema } from 'zod';
|
|
7
7
|
import { AgentGenerateOptions, AgentStreamOptions } from '@mastra/core/agent';
|
|
@@ -145,10 +145,10 @@ interface GetVectorIndexResponse {
|
|
|
145
145
|
count: number;
|
|
146
146
|
}
|
|
147
147
|
interface SaveMessageToMemoryParams {
|
|
148
|
-
messages:
|
|
148
|
+
messages: MastraMessageV1[];
|
|
149
149
|
agentId: string;
|
|
150
150
|
}
|
|
151
|
-
type SaveMessageToMemoryResponse =
|
|
151
|
+
type SaveMessageToMemoryResponse = MastraMessageV1[];
|
|
152
152
|
interface CreateMemoryThreadParams {
|
|
153
153
|
title?: string;
|
|
154
154
|
metadata?: Record<string, any>;
|
|
@@ -307,6 +307,13 @@ declare class AgentVoice extends BaseResource {
|
|
|
307
307
|
voiceId: string;
|
|
308
308
|
[key: string]: any;
|
|
309
309
|
}>>;
|
|
310
|
+
/**
|
|
311
|
+
* Get the listener configuration for the agent's voice provider
|
|
312
|
+
* @returns Promise containing a check if the agent has listening capabilities
|
|
313
|
+
*/
|
|
314
|
+
getListener(): Promise<{
|
|
315
|
+
enabled: boolean;
|
|
316
|
+
}>;
|
|
310
317
|
}
|
|
311
318
|
declare class Agent extends BaseResource {
|
|
312
319
|
private agentId;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AbstractAgent } from '@ag-ui/client';
|
|
2
2
|
import { ServerInfo, MCPToolType, ServerDetailInfo } from '@mastra/core/mcp';
|
|
3
3
|
import { processDataStream } from '@ai-sdk/ui-utils';
|
|
4
|
-
import { CoreMessage, AiMessageType, StorageThreadType,
|
|
4
|
+
import { CoreMessage, AiMessageType, StorageThreadType, MastraMessageV1, LegacyWorkflowRuns, WorkflowRuns, QueryResult, GenerateReturn } from '@mastra/core';
|
|
5
5
|
import { JSONSchema7 } from 'json-schema';
|
|
6
6
|
import { ZodSchema } from 'zod';
|
|
7
7
|
import { AgentGenerateOptions, AgentStreamOptions } from '@mastra/core/agent';
|
|
@@ -145,10 +145,10 @@ interface GetVectorIndexResponse {
|
|
|
145
145
|
count: number;
|
|
146
146
|
}
|
|
147
147
|
interface SaveMessageToMemoryParams {
|
|
148
|
-
messages:
|
|
148
|
+
messages: MastraMessageV1[];
|
|
149
149
|
agentId: string;
|
|
150
150
|
}
|
|
151
|
-
type SaveMessageToMemoryResponse =
|
|
151
|
+
type SaveMessageToMemoryResponse = MastraMessageV1[];
|
|
152
152
|
interface CreateMemoryThreadParams {
|
|
153
153
|
title?: string;
|
|
154
154
|
metadata?: Record<string, any>;
|
|
@@ -307,6 +307,13 @@ declare class AgentVoice extends BaseResource {
|
|
|
307
307
|
voiceId: string;
|
|
308
308
|
[key: string]: any;
|
|
309
309
|
}>>;
|
|
310
|
+
/**
|
|
311
|
+
* Get the listener configuration for the agent's voice provider
|
|
312
|
+
* @returns Promise containing a check if the agent has listening capabilities
|
|
313
|
+
*/
|
|
314
|
+
getListener(): Promise<{
|
|
315
|
+
enabled: boolean;
|
|
316
|
+
}>;
|
|
310
317
|
}
|
|
311
318
|
declare class Agent extends BaseResource {
|
|
312
319
|
private agentId;
|
package/dist/index.js
CHANGED
|
@@ -312,6 +312,13 @@ var AgentVoice = class extends BaseResource {
|
|
|
312
312
|
getSpeakers() {
|
|
313
313
|
return this.request(`/api/agents/${this.agentId}/voice/speakers`);
|
|
314
314
|
}
|
|
315
|
+
/**
|
|
316
|
+
* Get the listener configuration for the agent's voice provider
|
|
317
|
+
* @returns Promise containing a check if the agent has listening capabilities
|
|
318
|
+
*/
|
|
319
|
+
getListener() {
|
|
320
|
+
return this.request(`/api/agents/${this.agentId}/voice/listener`);
|
|
321
|
+
}
|
|
315
322
|
};
|
|
316
323
|
var Agent = class extends BaseResource {
|
|
317
324
|
constructor(options, agentId) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/client-js",
|
|
3
|
-
"version": "0.10.2-alpha.
|
|
3
|
+
"version": "0.10.2-alpha.2",
|
|
4
4
|
"description": "The official TypeScript library for the Mastra Client API",
|
|
5
5
|
"author": "",
|
|
6
6
|
"type": "module",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"zod": "^3.0.0",
|
|
34
|
-
"@mastra/core": "^0.10.0"
|
|
34
|
+
"@mastra/core": "^0.10.0-alpha.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@babel/preset-env": "^7.26.9",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"typescript": "^5.8.2",
|
|
44
44
|
"vitest": "^3.1.2",
|
|
45
45
|
"@internal/lint": "0.0.7",
|
|
46
|
-
"@mastra/core": "0.10.2-alpha.
|
|
46
|
+
"@mastra/core": "0.10.2-alpha.4"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "tsup src/index.ts --format esm,cjs --dts --clean --treeshake=smallest --splitting",
|
package/src/resources/agent.ts
CHANGED
|
@@ -70,6 +70,14 @@ export class AgentVoice extends BaseResource {
|
|
|
70
70
|
getSpeakers(): Promise<Array<{ voiceId: string; [key: string]: any }>> {
|
|
71
71
|
return this.request(`/api/agents/${this.agentId}/voice/speakers`);
|
|
72
72
|
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Get the listener configuration for the agent's voice provider
|
|
76
|
+
* @returns Promise containing a check if the agent has listening capabilities
|
|
77
|
+
*/
|
|
78
|
+
getListener(): Promise<{ enabled: boolean }> {
|
|
79
|
+
return this.request(`/api/agents/${this.agentId}/voice/listener`);
|
|
80
|
+
}
|
|
73
81
|
}
|
|
74
82
|
|
|
75
83
|
export class Agent extends BaseResource {
|
package/src/types.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type {
|
|
2
|
-
|
|
2
|
+
MastraMessageV1,
|
|
3
3
|
AiMessageType,
|
|
4
4
|
CoreMessage,
|
|
5
5
|
QueryResult,
|
|
@@ -172,11 +172,11 @@ export interface GetVectorIndexResponse {
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
export interface SaveMessageToMemoryParams {
|
|
175
|
-
messages:
|
|
175
|
+
messages: MastraMessageV1[];
|
|
176
176
|
agentId: string;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
export type SaveMessageToMemoryResponse =
|
|
179
|
+
export type SaveMessageToMemoryResponse = MastraMessageV1[];
|
|
180
180
|
|
|
181
181
|
export interface CreateMemoryThreadParams {
|
|
182
182
|
title?: string;
|