@mastra/client-js 0.0.0-afterToolExecute-20250415041527 → 0.0.0-bundle-dynamic-imports-20250424001248
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 +122 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1 -1
- package/package.json +6 -3
- package/src/client.ts +0 -8
- package/src/resources/agent.ts +1 -1
- package/src/resources/memory-thread.ts +1 -8
- package/src/types.ts +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,138 @@
|
|
|
1
1
|
# @mastra/client-js
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-bundle-dynamic-imports-20250424001248
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [81fb7f6]
|
|
8
|
+
- Updated dependencies [7d1892c]
|
|
9
|
+
- Updated dependencies [a90a082]
|
|
10
|
+
- Updated dependencies [35955b0]
|
|
11
|
+
- Updated dependencies [2d4001d]
|
|
12
|
+
- @mastra/core@0.0.0-bundle-dynamic-imports-20250424001248
|
|
13
|
+
|
|
14
|
+
## 0.1.19-alpha.0
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [81fb7f6]
|
|
19
|
+
- @mastra/core@0.9.1-alpha.0
|
|
20
|
+
|
|
21
|
+
## 0.1.18
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- 2538066: Fix memory thread creation from client SDK
|
|
26
|
+
- Updated dependencies [000a6d4]
|
|
27
|
+
- Updated dependencies [08bb78e]
|
|
28
|
+
- Updated dependencies [ed2f549]
|
|
29
|
+
- Updated dependencies [7e92011]
|
|
30
|
+
- Updated dependencies [9ee4293]
|
|
31
|
+
- Updated dependencies [03f3cd0]
|
|
32
|
+
- Updated dependencies [c0f22b4]
|
|
33
|
+
- Updated dependencies [71d9444]
|
|
34
|
+
- Updated dependencies [157c741]
|
|
35
|
+
- Updated dependencies [8a8a73b]
|
|
36
|
+
- Updated dependencies [0a033fa]
|
|
37
|
+
- Updated dependencies [fe3ae4d]
|
|
38
|
+
- Updated dependencies [9c26508]
|
|
39
|
+
- Updated dependencies [0f4eae3]
|
|
40
|
+
- Updated dependencies [16a8648]
|
|
41
|
+
- Updated dependencies [6f92295]
|
|
42
|
+
- @mastra/core@0.9.0
|
|
43
|
+
|
|
44
|
+
## 0.1.18-alpha.8
|
|
45
|
+
|
|
46
|
+
### Patch Changes
|
|
47
|
+
|
|
48
|
+
- 2538066: Fix memory thread creation from client SDK
|
|
49
|
+
- Updated dependencies [000a6d4]
|
|
50
|
+
- Updated dependencies [ed2f549]
|
|
51
|
+
- Updated dependencies [c0f22b4]
|
|
52
|
+
- Updated dependencies [0a033fa]
|
|
53
|
+
- Updated dependencies [9c26508]
|
|
54
|
+
- Updated dependencies [0f4eae3]
|
|
55
|
+
- Updated dependencies [16a8648]
|
|
56
|
+
- @mastra/core@0.9.0-alpha.8
|
|
57
|
+
|
|
58
|
+
## 0.1.18-alpha.7
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- Updated dependencies [71d9444]
|
|
63
|
+
- @mastra/core@0.9.0-alpha.7
|
|
64
|
+
|
|
65
|
+
## 0.1.18-alpha.6
|
|
66
|
+
|
|
67
|
+
### Patch Changes
|
|
68
|
+
|
|
69
|
+
- Updated dependencies [157c741]
|
|
70
|
+
- @mastra/core@0.9.0-alpha.6
|
|
71
|
+
|
|
72
|
+
## 0.1.18-alpha.5
|
|
73
|
+
|
|
74
|
+
### Patch Changes
|
|
75
|
+
|
|
76
|
+
- Updated dependencies [08bb78e]
|
|
77
|
+
- @mastra/core@0.9.0-alpha.5
|
|
78
|
+
|
|
79
|
+
## 0.1.18-alpha.4
|
|
80
|
+
|
|
81
|
+
### Patch Changes
|
|
82
|
+
|
|
83
|
+
- Updated dependencies [7e92011]
|
|
84
|
+
- @mastra/core@0.9.0-alpha.4
|
|
85
|
+
|
|
86
|
+
## 0.1.18-alpha.3
|
|
87
|
+
|
|
88
|
+
### Patch Changes
|
|
89
|
+
|
|
90
|
+
- Updated dependencies [fe3ae4d]
|
|
91
|
+
- @mastra/core@0.9.0-alpha.3
|
|
92
|
+
|
|
93
|
+
## 0.1.18-alpha.2
|
|
94
|
+
|
|
95
|
+
### Patch Changes
|
|
96
|
+
|
|
97
|
+
- Updated dependencies [9ee4293]
|
|
98
|
+
- @mastra/core@0.8.4-alpha.2
|
|
99
|
+
|
|
100
|
+
## 0.1.18-alpha.1
|
|
101
|
+
|
|
102
|
+
### Patch Changes
|
|
103
|
+
|
|
104
|
+
- Updated dependencies [8a8a73b]
|
|
105
|
+
- Updated dependencies [6f92295]
|
|
106
|
+
- @mastra/core@0.8.4-alpha.1
|
|
107
|
+
|
|
108
|
+
## 0.1.18-alpha.0
|
|
109
|
+
|
|
110
|
+
### Patch Changes
|
|
111
|
+
|
|
112
|
+
- Updated dependencies [03f3cd0]
|
|
113
|
+
- @mastra/core@0.8.4-alpha.0
|
|
114
|
+
|
|
115
|
+
## 0.1.17
|
|
4
116
|
|
|
5
117
|
### Patch Changes
|
|
6
118
|
|
|
7
119
|
- 37bb612: Add Elastic-2.0 licensing for packages
|
|
8
120
|
- bc4acb3: updated traces to not be wrapped in traces object
|
|
121
|
+
- Updated dependencies [d72318f]
|
|
9
122
|
- Updated dependencies [0bcc862]
|
|
10
123
|
- Updated dependencies [10a8caf]
|
|
11
124
|
- Updated dependencies [359b089]
|
|
12
125
|
- Updated dependencies [32e7b71]
|
|
13
126
|
- Updated dependencies [37bb612]
|
|
14
127
|
- Updated dependencies [7f1b291]
|
|
15
|
-
- @mastra/core@0.
|
|
128
|
+
- @mastra/core@0.8.3
|
|
129
|
+
|
|
130
|
+
## 0.1.17-alpha.5
|
|
131
|
+
|
|
132
|
+
### Patch Changes
|
|
133
|
+
|
|
134
|
+
- Updated dependencies [d72318f]
|
|
135
|
+
- @mastra/core@0.8.3-alpha.5
|
|
16
136
|
|
|
17
137
|
## 0.1.17-alpha.4
|
|
18
138
|
|
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { processDataStream } from '@ai-sdk/ui-utils';
|
|
2
1
|
import { CoreMessage, AiMessageType, StorageThreadType, MessageType, StepAction, StepGraph, WorkflowRunResult as WorkflowRunResult$1, QueryResult, BaseLogMessage, GenerateReturn } from '@mastra/core';
|
|
3
2
|
import { JSONSchema7 } from 'json-schema';
|
|
4
3
|
import { ZodSchema } from 'zod';
|
|
4
|
+
import { processDataStream } from '@ai-sdk/ui-utils';
|
|
5
5
|
import { AgentGenerateOptions, AgentStreamOptions } from '@mastra/core/agent';
|
|
6
6
|
|
|
7
7
|
interface ClientOptions {
|
|
@@ -32,10 +32,10 @@ interface GetAgentResponse {
|
|
|
32
32
|
}
|
|
33
33
|
type GenerateParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> = {
|
|
34
34
|
messages: string | string[] | CoreMessage[] | AiMessageType[];
|
|
35
|
-
} & Partial<
|
|
35
|
+
} & Partial<AgentGenerateOptions<T>>;
|
|
36
36
|
type StreamParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> = {
|
|
37
37
|
messages: string | string[] | CoreMessage[] | AiMessageType[];
|
|
38
|
-
} & Omit<AgentStreamOptions<T>, 'onFinish' | 'onStepFinish' | 'telemetry'
|
|
38
|
+
} & Omit<AgentStreamOptions<T>, 'onFinish' | 'onStepFinish' | 'telemetry'>;
|
|
39
39
|
interface GetEvalsByAgentIdResponse extends GetAgentResponse {
|
|
40
40
|
evals: any[];
|
|
41
41
|
}
|
|
@@ -97,7 +97,7 @@ type SaveMessageToMemoryResponse = MessageType[];
|
|
|
97
97
|
interface CreateMemoryThreadParams {
|
|
98
98
|
title: string;
|
|
99
99
|
metadata: Record<string, any>;
|
|
100
|
-
|
|
100
|
+
resourceId: string;
|
|
101
101
|
threadId: string;
|
|
102
102
|
agentId: string;
|
|
103
103
|
}
|
|
@@ -110,7 +110,7 @@ type GetMemoryThreadResponse = StorageThreadType[];
|
|
|
110
110
|
interface UpdateMemoryThreadParams {
|
|
111
111
|
title: string;
|
|
112
112
|
metadata: Record<string, any>;
|
|
113
|
-
|
|
113
|
+
resourceId: string;
|
|
114
114
|
}
|
|
115
115
|
interface GetMemoryThreadMessagesResponse {
|
|
116
116
|
messages: CoreMessage[];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { processDataStream } from '@ai-sdk/ui-utils';
|
|
2
1
|
import { CoreMessage, AiMessageType, StorageThreadType, MessageType, StepAction, StepGraph, WorkflowRunResult as WorkflowRunResult$1, QueryResult, BaseLogMessage, GenerateReturn } from '@mastra/core';
|
|
3
2
|
import { JSONSchema7 } from 'json-schema';
|
|
4
3
|
import { ZodSchema } from 'zod';
|
|
4
|
+
import { processDataStream } from '@ai-sdk/ui-utils';
|
|
5
5
|
import { AgentGenerateOptions, AgentStreamOptions } from '@mastra/core/agent';
|
|
6
6
|
|
|
7
7
|
interface ClientOptions {
|
|
@@ -32,10 +32,10 @@ interface GetAgentResponse {
|
|
|
32
32
|
}
|
|
33
33
|
type GenerateParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> = {
|
|
34
34
|
messages: string | string[] | CoreMessage[] | AiMessageType[];
|
|
35
|
-
} & Partial<
|
|
35
|
+
} & Partial<AgentGenerateOptions<T>>;
|
|
36
36
|
type StreamParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> = {
|
|
37
37
|
messages: string | string[] | CoreMessage[] | AiMessageType[];
|
|
38
|
-
} & Omit<AgentStreamOptions<T>, 'onFinish' | 'onStepFinish' | 'telemetry'
|
|
38
|
+
} & Omit<AgentStreamOptions<T>, 'onFinish' | 'onStepFinish' | 'telemetry'>;
|
|
39
39
|
interface GetEvalsByAgentIdResponse extends GetAgentResponse {
|
|
40
40
|
evals: any[];
|
|
41
41
|
}
|
|
@@ -97,7 +97,7 @@ type SaveMessageToMemoryResponse = MessageType[];
|
|
|
97
97
|
interface CreateMemoryThreadParams {
|
|
98
98
|
title: string;
|
|
99
99
|
metadata: Record<string, any>;
|
|
100
|
-
|
|
100
|
+
resourceId: string;
|
|
101
101
|
threadId: string;
|
|
102
102
|
agentId: string;
|
|
103
103
|
}
|
|
@@ -110,7 +110,7 @@ type GetMemoryThreadResponse = StorageThreadType[];
|
|
|
110
110
|
interface UpdateMemoryThreadParams {
|
|
111
111
|
title: string;
|
|
112
112
|
metadata: Record<string, any>;
|
|
113
|
-
|
|
113
|
+
resourceId: string;
|
|
114
114
|
}
|
|
115
115
|
interface GetMemoryThreadMessagesResponse {
|
|
116
116
|
messages: CoreMessage[];
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/client-js",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-bundle-dynamic-imports-20250424001248",
|
|
4
4
|
"description": "The official TypeScript library for the Mastra Client API",
|
|
5
5
|
"author": "",
|
|
6
6
|
"type": "module",
|
|
@@ -26,7 +26,10 @@
|
|
|
26
26
|
"json-schema": "^0.4.0",
|
|
27
27
|
"zod": "^3.24.2",
|
|
28
28
|
"zod-to-json-schema": "^3.24.3",
|
|
29
|
-
"@mastra/core": "0.0.0-
|
|
29
|
+
"@mastra/core": "0.0.0-bundle-dynamic-imports-20250424001248"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"zod": "^3.24.2"
|
|
30
33
|
},
|
|
31
34
|
"devDependencies": {
|
|
32
35
|
"@babel/preset-env": "^7.26.9",
|
|
@@ -37,7 +40,7 @@
|
|
|
37
40
|
"tsup": "^8.4.0",
|
|
38
41
|
"typescript": "^5.8.2",
|
|
39
42
|
"vitest": "^3.0.9",
|
|
40
|
-
"@internal/lint": "0.0.
|
|
43
|
+
"@internal/lint": "0.0.2"
|
|
41
44
|
},
|
|
42
45
|
"scripts": {
|
|
43
46
|
"build": "tsup src/index.ts --format esm,cjs --dts --clean --treeshake=smallest --splitting",
|
package/src/client.ts
CHANGED
|
@@ -165,14 +165,6 @@ export class MastraClient extends BaseResource {
|
|
|
165
165
|
const { name, scope, page, perPage, attribute } = params || {};
|
|
166
166
|
const _attribute = attribute ? Object.entries(attribute).map(([key, value]) => `${key}:${value}`) : [];
|
|
167
167
|
|
|
168
|
-
const queryObj = {
|
|
169
|
-
...(name ? { name } : {}),
|
|
170
|
-
...(scope ? { scope } : {}),
|
|
171
|
-
...(page ? { page: String(page) } : {}),
|
|
172
|
-
...(perPage ? { perPage: String(perPage) } : {}),
|
|
173
|
-
...(_attribute?.length ? { attribute: _attribute } : {}),
|
|
174
|
-
} as const;
|
|
175
|
-
|
|
176
168
|
const searchParams = new URLSearchParams();
|
|
177
169
|
if (name) {
|
|
178
170
|
searchParams.set('name', name);
|
package/src/resources/agent.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { processDataStream } from '@ai-sdk/ui-utils';
|
|
2
1
|
import type { GenerateReturn } from '@mastra/core';
|
|
3
2
|
import type { JSONSchema7 } from 'json-schema';
|
|
4
3
|
import { ZodSchema } from 'zod';
|
|
5
4
|
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
5
|
+
import { processDataStream } from '@ai-sdk/ui-utils';
|
|
6
6
|
|
|
7
7
|
import type {
|
|
8
8
|
GenerateParams,
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import type { StorageThreadType } from '@mastra/core';
|
|
2
2
|
|
|
3
|
-
import type {
|
|
4
|
-
CreateMemoryThreadParams,
|
|
5
|
-
GetMemoryThreadMessagesResponse,
|
|
6
|
-
GetMemoryThreadResponse,
|
|
7
|
-
ClientOptions,
|
|
8
|
-
SaveMessageToMemoryParams,
|
|
9
|
-
UpdateMemoryThreadParams,
|
|
10
|
-
} from '../types';
|
|
3
|
+
import type { GetMemoryThreadMessagesResponse, ClientOptions, UpdateMemoryThreadParams } from '../types';
|
|
11
4
|
|
|
12
5
|
import { BaseResource } from './base';
|
|
13
6
|
|
package/src/types.ts
CHANGED
|
@@ -46,11 +46,11 @@ export interface GetAgentResponse {
|
|
|
46
46
|
|
|
47
47
|
export type GenerateParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> = {
|
|
48
48
|
messages: string | string[] | CoreMessage[] | AiMessageType[];
|
|
49
|
-
} & Partial<
|
|
49
|
+
} & Partial<AgentGenerateOptions<T>>;
|
|
50
50
|
|
|
51
51
|
export type StreamParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> = {
|
|
52
52
|
messages: string | string[] | CoreMessage[] | AiMessageType[];
|
|
53
|
-
} & Omit<AgentStreamOptions<T>, 'onFinish' | 'onStepFinish' | 'telemetry'
|
|
53
|
+
} & Omit<AgentStreamOptions<T>, 'onFinish' | 'onStepFinish' | 'telemetry'>;
|
|
54
54
|
|
|
55
55
|
export interface GetEvalsByAgentIdResponse extends GetAgentResponse {
|
|
56
56
|
evals: any[];
|
|
@@ -118,7 +118,7 @@ export type SaveMessageToMemoryResponse = MessageType[];
|
|
|
118
118
|
export interface CreateMemoryThreadParams {
|
|
119
119
|
title: string;
|
|
120
120
|
metadata: Record<string, any>;
|
|
121
|
-
|
|
121
|
+
resourceId: string;
|
|
122
122
|
threadId: string;
|
|
123
123
|
agentId: string;
|
|
124
124
|
}
|
|
@@ -135,7 +135,7 @@ export type GetMemoryThreadResponse = StorageThreadType[];
|
|
|
135
135
|
export interface UpdateMemoryThreadParams {
|
|
136
136
|
title: string;
|
|
137
137
|
metadata: Record<string, any>;
|
|
138
|
-
|
|
138
|
+
resourceId: string;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
export interface GetMemoryThreadMessagesResponse {
|