@mastra/client-js 0.0.0-fix-persist-session-cache-option-mcp-server-20251031182703 → 0.0.0-fix-9244-clickhouse-metadata-20251104213434
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 +168 -3
- package/README.md +1 -3
- package/dist/client.d.ts +10 -14
- package/dist/client.d.ts.map +1 -1
- package/dist/index.cjs +85 -226
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +85 -226
- package/dist/index.js.map +1 -1
- package/dist/resources/agent-builder.d.ts +3 -25
- package/dist/resources/agent-builder.d.ts.map +1 -1
- package/dist/resources/agent.d.ts +0 -18
- package/dist/resources/agent.d.ts.map +1 -1
- package/dist/resources/memory-thread.d.ts +7 -7
- package/dist/resources/memory-thread.d.ts.map +1 -1
- package/dist/resources/observability.d.ts +2 -2
- package/dist/resources/observability.d.ts.map +1 -1
- package/dist/resources/workflow.d.ts +3 -56
- package/dist/resources/workflow.d.ts.map +1 -1
- package/dist/types.d.ts +26 -29
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,138 @@
|
|
|
1
1
|
# @mastra/client-js
|
|
2
2
|
|
|
3
|
-
## 0.0.0-fix-
|
|
3
|
+
## 0.0.0-fix-9244-clickhouse-metadata-20251104213434
|
|
4
4
|
|
|
5
5
|
### Major Changes
|
|
6
6
|
|
|
7
|
+
- Moving scorers under the eval domain, api method consistency, prebuilt evals, scorers require ids. ([#9589](https://github.com/mastra-ai/mastra/pull/9589))
|
|
8
|
+
|
|
7
9
|
- Update handlers to use `listWorkflowRuns` instead of `getWorkflowRuns`. Fix type names from `StoragelistThreadsByResourceIdInput/Output` to `StorageListThreadsByResourceIdInput/Output`. ([#9507](https://github.com/mastra-ai/mastra/pull/9507))
|
|
8
10
|
|
|
11
|
+
- **BREAKING:** Remove `getMessagesPaginated()` and add `perPage: false` support ([#9670](https://github.com/mastra-ai/mastra/pull/9670))
|
|
12
|
+
|
|
13
|
+
Removes deprecated `getMessagesPaginated()` method. The `listMessages()` API and score handlers now support `perPage: false` to fetch all records without pagination limits.
|
|
14
|
+
|
|
15
|
+
**Storage changes:**
|
|
16
|
+
- `StoragePagination.perPage` type changed from `number` to `number | false`
|
|
17
|
+
- All storage implementations support `perPage: false`:
|
|
18
|
+
- Memory: `listMessages()`
|
|
19
|
+
- Scores: `listScoresBySpan()`, `listScoresByRunId()`, `listScoresByExecutionId()`
|
|
20
|
+
- HTTP query parser accepts `"false"` string (e.g., `?perPage=false`)
|
|
21
|
+
|
|
22
|
+
**Memory changes:**
|
|
23
|
+
- `memory.query()` parameter type changed from `StorageGetMessagesArg` to `StorageListMessagesInput`
|
|
24
|
+
- Uses flat parameters (`page`, `perPage`, `include`, `filter`, `vectorSearchString`) instead of `selectBy` object
|
|
25
|
+
|
|
26
|
+
**Stricter validation:**
|
|
27
|
+
- `listMessages()` requires non-empty, non-whitespace `threadId` (throws error instead of returning empty results)
|
|
28
|
+
|
|
29
|
+
**Migration:**
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
// Storage/Memory: Replace getMessagesPaginated with listMessages
|
|
33
|
+
- storage.getMessagesPaginated({ threadId, selectBy: { pagination: { page: 0, perPage: 20 } } })
|
|
34
|
+
+ storage.listMessages({ threadId, page: 0, perPage: 20 })
|
|
35
|
+
+ storage.listMessages({ threadId, page: 0, perPage: false }) // Fetch all
|
|
36
|
+
|
|
37
|
+
// Memory: Replace selectBy with flat parameters
|
|
38
|
+
- memory.query({ threadId, selectBy: { last: 20, include: [...] } })
|
|
39
|
+
+ memory.query({ threadId, perPage: 20, include: [...] })
|
|
40
|
+
|
|
41
|
+
// Client SDK
|
|
42
|
+
- thread.getMessagesPaginated({ selectBy: { pagination: { page: 0 } } })
|
|
43
|
+
+ thread.listMessages({ page: 0, perPage: 20 })
|
|
44
|
+
```
|
|
45
|
+
|
|
9
46
|
- Replace `getThreadsByResourceIdPaginated` with `listThreadsByResourceId` across memory handlers. Update client SDK to use `listThreads()` with `offset`/`limit` parameters instead of deprecated `getMemoryThreads()`. Consolidate `/api/memory/threads` routes to single paginated endpoint. ([#9508](https://github.com/mastra-ai/mastra/pull/9508))
|
|
10
47
|
|
|
11
48
|
- Rename RuntimeContext to RequestContext ([#9511](https://github.com/mastra-ai/mastra/pull/9511))
|
|
12
49
|
|
|
50
|
+
- Rename `defaultVNextStreamOptions` to `defaultOptions`. Add "Legacy" suffix to v1 option properties and methods (`defaultGenerateOptions` → `defaultGenerateOptionsLegacy`, `defaultStreamOptions` → `defaultStreamOptionsLegacy`). ([#9535](https://github.com/mastra-ai/mastra/pull/9535))
|
|
51
|
+
|
|
13
52
|
- Remove deprecated methods from client-js ([#9480](https://github.com/mastra-ai/mastra/pull/9480))
|
|
14
53
|
|
|
54
|
+
- **Breaking Change**: Remove legacy v1 watch events and consolidate on v2 implementation. ([#9252](https://github.com/mastra-ai/mastra/pull/9252))
|
|
55
|
+
|
|
56
|
+
This change simplifies the workflow watching API by removing the legacy v1 event system and promoting v2 as the standard (renamed to just `watch`).
|
|
57
|
+
|
|
58
|
+
### What's Changed
|
|
59
|
+
- Removed legacy v1 watch event handlers and types
|
|
60
|
+
- Renamed `watch-v2` to `watch` throughout the codebase
|
|
61
|
+
- Removed `.watch()` method from client-js SDK (`Workflow` and `AgentBuilder` classes)
|
|
62
|
+
- Removed `/watch` HTTP endpoints from server and deployer
|
|
63
|
+
- Removed `WorkflowWatchResult` and v1 `WatchEvent` types
|
|
64
|
+
|
|
65
|
+
- **BREAKING CHANGE**: Pagination APIs now use `page`/`perPage` instead of `offset`/`limit` ([#9592](https://github.com/mastra-ai/mastra/pull/9592))
|
|
66
|
+
|
|
67
|
+
All storage and memory pagination APIs have been updated to use `page` (0-indexed) and `perPage` instead of `offset` and `limit`, aligning with standard REST API patterns.
|
|
68
|
+
|
|
69
|
+
**Affected APIs:**
|
|
70
|
+
- `Memory.listThreadsByResourceId()`
|
|
71
|
+
- `Memory.listMessages()`
|
|
72
|
+
- `Storage.listWorkflowRuns()`
|
|
73
|
+
|
|
74
|
+
**Migration:**
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
// Before
|
|
78
|
+
await memory.listThreadsByResourceId({
|
|
79
|
+
resourceId: 'user-123',
|
|
80
|
+
offset: 20,
|
|
81
|
+
limit: 10,
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
// After
|
|
85
|
+
await memory.listThreadsByResourceId({
|
|
86
|
+
resourceId: 'user-123',
|
|
87
|
+
page: 2, // page = Math.floor(offset / limit)
|
|
88
|
+
perPage: 10,
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
// Before
|
|
92
|
+
await memory.listMessages({
|
|
93
|
+
threadId: 'thread-456',
|
|
94
|
+
offset: 20,
|
|
95
|
+
limit: 10,
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// After
|
|
99
|
+
await memory.listMessages({
|
|
100
|
+
threadId: 'thread-456',
|
|
101
|
+
page: 2,
|
|
102
|
+
perPage: 10,
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
// Before
|
|
106
|
+
await storage.listWorkflowRuns({
|
|
107
|
+
workflowName: 'my-workflow',
|
|
108
|
+
offset: 20,
|
|
109
|
+
limit: 10,
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
// After
|
|
113
|
+
await storage.listWorkflowRuns({
|
|
114
|
+
workflowName: 'my-workflow',
|
|
115
|
+
page: 2,
|
|
116
|
+
perPage: 10,
|
|
117
|
+
});
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Additional improvements:**
|
|
121
|
+
- Added validation for negative `page` values in all storage implementations
|
|
122
|
+
- Improved `perPage` validation to handle edge cases (negative values, `0`, `false`)
|
|
123
|
+
- Added reusable query parser utilities for consistent validation in handlers
|
|
124
|
+
|
|
15
125
|
- Changing getAgents -> listAgents, getTools -> listTools, getWorkflows -> listWorkflows ([#9495](https://github.com/mastra-ai/mastra/pull/9495))
|
|
16
126
|
|
|
17
127
|
- Removed old tracing code based on OpenTelemetry ([#9237](https://github.com/mastra-ai/mastra/pull/9237))
|
|
18
128
|
|
|
129
|
+
- Mark as stable ([`83d5942`](https://github.com/mastra-ai/mastra/commit/83d5942669ce7bba4a6ca4fd4da697a10eb5ebdc))
|
|
130
|
+
|
|
131
|
+
- Renamed `MastraMessageV2` to `MastraDBMessage` ([#9255](https://github.com/mastra-ai/mastra/pull/9255))
|
|
132
|
+
Made the return format of all methods that return db messages consistent. It's always `{ messages: MastraDBMessage[] }` now, and messages can be converted after that using `@mastra/ai-sdk/ui`'s `toAISdkV4/5Messages()` function
|
|
133
|
+
|
|
134
|
+
- moved ai-tracing code into @mastra/observability ([#9661](https://github.com/mastra-ai/mastra/pull/9661))
|
|
135
|
+
|
|
19
136
|
- Remove legacy evals from Mastra ([#9491](https://github.com/mastra-ai/mastra/pull/9491))
|
|
20
137
|
|
|
21
138
|
### Minor Changes
|
|
@@ -30,6 +147,52 @@
|
|
|
30
147
|
|
|
31
148
|
- Make step optional in all resume APIs ([#9454](https://github.com/mastra-ai/mastra/pull/9454))
|
|
32
149
|
|
|
150
|
+
- Update tool execution signature ([#9587](https://github.com/mastra-ai/mastra/pull/9587))
|
|
151
|
+
|
|
152
|
+
Consolidated the 3 different execution contexts to one
|
|
153
|
+
|
|
154
|
+
```typescript
|
|
155
|
+
// before depending on the context the tool was executed in
|
|
156
|
+
tool.execute({ context: data });
|
|
157
|
+
tool.execute({ context: { inputData: data } });
|
|
158
|
+
tool.execute(data);
|
|
159
|
+
|
|
160
|
+
// now, for all contexts
|
|
161
|
+
tool.execute(data, context);
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**Before:**
|
|
165
|
+
|
|
166
|
+
```typescript
|
|
167
|
+
inputSchema: z.object({ something: z.string() }),
|
|
168
|
+
execute: async ({ context, tracingContext, runId, ... }) => {
|
|
169
|
+
return doSomething(context.string);
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**After:**
|
|
174
|
+
|
|
175
|
+
```typescript
|
|
176
|
+
inputSchema: z.object({ something: z.string() }),
|
|
177
|
+
execute: async (inputData, context) => {
|
|
178
|
+
const { agent, mcp, workflow, ...sharedContext } = context
|
|
179
|
+
|
|
180
|
+
// context that only an agent would get like toolCallId, messages, suspend, resume, etc
|
|
181
|
+
if (agent) {
|
|
182
|
+
doSomething(inputData.something, agent)
|
|
183
|
+
// context that only a workflow would get like runId, state, suspend, resume, etc
|
|
184
|
+
} else if (workflow) {
|
|
185
|
+
doSomething(inputData.something, workflow)
|
|
186
|
+
// context that only a workflow would get like "extra", "elicitation"
|
|
187
|
+
} else if (mcp) {
|
|
188
|
+
doSomething(inputData.something, mcp)
|
|
189
|
+
} else {
|
|
190
|
+
// Running a tool in no execution context
|
|
191
|
+
return doSomething(inputData.something);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
```
|
|
195
|
+
|
|
33
196
|
- Add search memory in client-js ([#9326](https://github.com/mastra-ai/mastra/pull/9326))
|
|
34
197
|
|
|
35
198
|
- Add tool call approval ([#8649](https://github.com/mastra-ai/mastra/pull/8649))
|
|
@@ -40,14 +203,16 @@
|
|
|
40
203
|
|
|
41
204
|
- Move the enhance instruction fetch call to client-js ([#9302](https://github.com/mastra-ai/mastra/pull/9302))
|
|
42
205
|
|
|
206
|
+
- Remove unused /model-providers API ([#9533](https://github.com/mastra-ai/mastra/pull/9533))
|
|
207
|
+
|
|
43
208
|
- add client-js function to fetch model providers ([#9376](https://github.com/mastra-ai/mastra/pull/9376))
|
|
44
209
|
|
|
45
210
|
- Fix undefined runtimeContext using memory from playground ([#9328](https://github.com/mastra-ai/mastra/pull/9328))
|
|
46
211
|
|
|
47
212
|
- Make step optional in resumeStreamVNext API ([#9453](https://github.com/mastra-ai/mastra/pull/9453))
|
|
48
213
|
|
|
49
|
-
- Updated dependencies [[`f743dbb`](https://github.com/mastra-ai/mastra/commit/f743dbb8b40d1627b5c10c0e6fc154f4ebb6e394), [`0e8ed46`](https://github.com/mastra-ai/mastra/commit/0e8ed467c54d6901a6a365f270ec15d6faadb36c), [`6c049d9`](https://github.com/mastra-ai/mastra/commit/6c049d94063fdcbd5b81c4912a2bf82a92c9cc0b), [`3443770`](https://github.com/mastra-ai/mastra/commit/3443770662df8eb24c9df3589b2792d78cfcb811), [`9e1911d`](https://github.com/mastra-ai/mastra/commit/9e1911db2b4db85e0e768c3f15e0d61e319869f6), [`ebac155`](https://github.com/mastra-ai/mastra/commit/ebac15564a590117db7078233f927a7e28a85106), [`5948e6a`](https://github.com/mastra-ai/mastra/commit/5948e6a5146c83666ba3f294b2be576c82a513fb), [`8940859`](https://github.com/mastra-ai/mastra/commit/89408593658199b4ad67f7b65e888f344e64a442), [`e629310`](https://github.com/mastra-ai/mastra/commit/e629310f1a73fa236d49ec7a1d1cceb6229dc7cc), [`4c6b492`](https://github.com/mastra-ai/mastra/commit/4c6b492c4dd591c6a592520c1f6855d6e936d71f), [`9d819d5`](https://github.com/mastra-ai/mastra/commit/9d819d54b61481639f4008e4694791bddf187edd), [`71c8d6c`](https://github.com/mastra-ai/mastra/commit/71c8d6c161253207b2b9588bdadb7eed604f7253), [`6179a9b`](https://github.com/mastra-ai/mastra/commit/6179a9ba36ffac326de3cc3c43cdc8028d37c251), [`7051bf3`](https://github.com/mastra-ai/mastra/commit/7051bf38b3b122a069008f861f7bfc004a6d9f6e), [`5df9cce`](https://github.com/mastra-ai/mastra/commit/5df9cce1a753438413f64c11eeef8f845745c2a8), [`c576fc0`](https://github.com/mastra-ai/mastra/commit/c576fc0b100b2085afded91a37c97a0ea0ec09c7), [`9f4a683`](https://github.com/mastra-ai/mastra/commit/9f4a6833e88b52574665c028fd5508ad5c2f6004), [`57d157f`](https://github.com/mastra-ai/mastra/commit/57d157f0b163a95c3e6c9eae31bdb11d1bfc64f9), [`2a90c55`](https://github.com/mastra-ai/mastra/commit/2a90c55a86a9210697d5adaab5ee94584b079adc), [`d78b38d`](https://github.com/mastra-ai/mastra/commit/d78b38d898fce285260d3bbb4befade54331617f), [`c710c16`](https://github.com/mastra-ai/mastra/commit/c710c1652dccfdc4111c8412bca7a6bb1d48b441), [`cfae733`](https://github.com/mastra-ai/mastra/commit/cfae73394f4920635e6c919c8e95ff9a0788e2e5), [`e3dfda7`](https://github.com/mastra-ai/mastra/commit/e3dfda7b11bf3b8c4bb55637028befb5f387fc74), [`844ea5d`](https://github.com/mastra-ai/mastra/commit/844ea5dc0c248961e7bf73629ae7dcff503e853c), [`f0f8f12`](https://github.com/mastra-ai/mastra/commit/f0f8f125c308f2d0fd36942ef652fd852df7522f), [`7b763e5`](https://github.com/mastra-ai/mastra/commit/7b763e52fc3eaf699c2a99f2adf418dd46e4e9a5), [`d36cfbb`](https://github.com/mastra-ai/mastra/commit/d36cfbbb6565ba5f827883cc9bb648eb14befdc1), [`3697853`](https://github.com/mastra-ai/mastra/commit/3697853deeb72017d90e0f38a93c1e29221aeca0), [`a534e95`](https://github.com/mastra-ai/mastra/commit/a534e9591f83b3cc1ebff99c67edf4cda7bf81d3), [`9d0e7fe`](https://github.com/mastra-ai/mastra/commit/9d0e7feca8ed98de959f53476ee1456073673348), [`53d927c`](https://github.com/mastra-ai/mastra/commit/53d927cc6f03bff33655b7e2b788da445a08731d), [`22f64bc`](https://github.com/mastra-ai/mastra/commit/22f64bc1d37149480b58bf2fefe35b79a1e3e7d5), [`bda6370`](https://github.com/mastra-ai/mastra/commit/bda637009360649aaf579919e7873e33553c273e), [`c7f1f7d`](https://github.com/mastra-ai/mastra/commit/c7f1f7d24f61f247f018cc2d1f33bf63212959a7), [`735d8c1`](https://github.com/mastra-ai/mastra/commit/735d8c1c0d19fbc09e6f8b66cf41bc7655993838), [`c218bd3`](https://github.com/mastra-ai/mastra/commit/c218bd3759e32423735b04843a09404572631014), [`2c4438b`](https://github.com/mastra-ai/mastra/commit/2c4438b87817ab7eed818c7990fef010475af1a3), [`2b8893c`](https://github.com/mastra-ai/mastra/commit/2b8893cb108ef9acb72ee7835cd625610d2c1a4a), [`8e5c75b`](https://github.com/mastra-ai/mastra/commit/8e5c75bdb1d08a42d45309a4c72def4b6890230f), [`fa8409b`](https://github.com/mastra-ai/mastra/commit/fa8409bc39cfd8ba6643b9db5269b90b22e2a2f7), [`173c535`](https://github.com/mastra-ai/mastra/commit/173c535c0645b0da404fe09f003778f0b0d4e019)]:
|
|
50
|
-
- @mastra/core@0.0.0-fix-
|
|
214
|
+
- Updated dependencies [[`f743dbb`](https://github.com/mastra-ai/mastra/commit/f743dbb8b40d1627b5c10c0e6fc154f4ebb6e394), [`fec5129`](https://github.com/mastra-ai/mastra/commit/fec5129de7fc64423ea03661a56cef31dc747a0d), [`0e8ed46`](https://github.com/mastra-ai/mastra/commit/0e8ed467c54d6901a6a365f270ec15d6faadb36c), [`6c049d9`](https://github.com/mastra-ai/mastra/commit/6c049d94063fdcbd5b81c4912a2bf82a92c9cc0b), [`3443770`](https://github.com/mastra-ai/mastra/commit/3443770662df8eb24c9df3589b2792d78cfcb811), [`f0a07e0`](https://github.com/mastra-ai/mastra/commit/f0a07e0111b3307c5fabfa4094c5c2cfb734fbe6), [`1521d71`](https://github.com/mastra-ai/mastra/commit/1521d716e5daedc74690c983fbd961123c56756b), [`9e1911d`](https://github.com/mastra-ai/mastra/commit/9e1911db2b4db85e0e768c3f15e0d61e319869f6), [`ebac155`](https://github.com/mastra-ai/mastra/commit/ebac15564a590117db7078233f927a7e28a85106), [`5948e6a`](https://github.com/mastra-ai/mastra/commit/5948e6a5146c83666ba3f294b2be576c82a513fb), [`8940859`](https://github.com/mastra-ai/mastra/commit/89408593658199b4ad67f7b65e888f344e64a442), [`e629310`](https://github.com/mastra-ai/mastra/commit/e629310f1a73fa236d49ec7a1d1cceb6229dc7cc), [`4c6b492`](https://github.com/mastra-ai/mastra/commit/4c6b492c4dd591c6a592520c1f6855d6e936d71f), [`dff01d8`](https://github.com/mastra-ai/mastra/commit/dff01d81ce1f4e4087cfac20fa868e6db138dd14), [`9d819d5`](https://github.com/mastra-ai/mastra/commit/9d819d54b61481639f4008e4694791bddf187edd), [`71c8d6c`](https://github.com/mastra-ai/mastra/commit/71c8d6c161253207b2b9588bdadb7eed604f7253), [`6179a9b`](https://github.com/mastra-ai/mastra/commit/6179a9ba36ffac326de3cc3c43cdc8028d37c251), [`00f4921`](https://github.com/mastra-ai/mastra/commit/00f4921dd2c91a1e5446799599ef7116a8214a1a), [`7051bf3`](https://github.com/mastra-ai/mastra/commit/7051bf38b3b122a069008f861f7bfc004a6d9f6e), [`a8f1494`](https://github.com/mastra-ai/mastra/commit/a8f1494f4bbdc2770bcf327d4c7d869e332183f1), [`0793497`](https://github.com/mastra-ai/mastra/commit/079349753620c40246ffd673e3f9d7d9820beff3), [`5df9cce`](https://github.com/mastra-ai/mastra/commit/5df9cce1a753438413f64c11eeef8f845745c2a8), [`a854ede`](https://github.com/mastra-ai/mastra/commit/a854ede62bf5ac0945a624ac48913dd69c73aabf), [`c576fc0`](https://github.com/mastra-ai/mastra/commit/c576fc0b100b2085afded91a37c97a0ea0ec09c7), [`3defc80`](https://github.com/mastra-ai/mastra/commit/3defc80cf2b88a1b7fc1cc4ddcb91e982a614609), [`16153fe`](https://github.com/mastra-ai/mastra/commit/16153fe7eb13c99401f48e6ca32707c965ee28b9), [`9f4a683`](https://github.com/mastra-ai/mastra/commit/9f4a6833e88b52574665c028fd5508ad5c2f6004), [`bc94344`](https://github.com/mastra-ai/mastra/commit/bc943444a1342d8a662151b7bce1df7dae32f59c), [`57d157f`](https://github.com/mastra-ai/mastra/commit/57d157f0b163a95c3e6c9eae31bdb11d1bfc64f9), [`2a90c55`](https://github.com/mastra-ai/mastra/commit/2a90c55a86a9210697d5adaab5ee94584b079adc), [`96d35f6`](https://github.com/mastra-ai/mastra/commit/96d35f61376bc2b1bf148648a2c1985bd51bef55), [`5cbe88a`](https://github.com/mastra-ai/mastra/commit/5cbe88aefbd9f933bca669fd371ea36bf939ac6d), [`a1bd7b8`](https://github.com/mastra-ai/mastra/commit/a1bd7b8571db16b94eb01588f451a74758c96d65), [`d78b38d`](https://github.com/mastra-ai/mastra/commit/d78b38d898fce285260d3bbb4befade54331617f), [`0633100`](https://github.com/mastra-ai/mastra/commit/0633100a911ad22f5256471bdf753da21c104742), [`c710c16`](https://github.com/mastra-ai/mastra/commit/c710c1652dccfdc4111c8412bca7a6bb1d48b441), [`cfae733`](https://github.com/mastra-ai/mastra/commit/cfae73394f4920635e6c919c8e95ff9a0788e2e5), [`e3dfda7`](https://github.com/mastra-ai/mastra/commit/e3dfda7b11bf3b8c4bb55637028befb5f387fc74), [`844ea5d`](https://github.com/mastra-ai/mastra/commit/844ea5dc0c248961e7bf73629ae7dcff503e853c), [`f0f8f12`](https://github.com/mastra-ai/mastra/commit/f0f8f125c308f2d0fd36942ef652fd852df7522f), [`0d7618b`](https://github.com/mastra-ai/mastra/commit/0d7618bc650bf2800934b243eca5648f4aeed9c2), [`7b763e5`](https://github.com/mastra-ai/mastra/commit/7b763e52fc3eaf699c2a99f2adf418dd46e4e9a5), [`d36cfbb`](https://github.com/mastra-ai/mastra/commit/d36cfbbb6565ba5f827883cc9bb648eb14befdc1), [`3697853`](https://github.com/mastra-ai/mastra/commit/3697853deeb72017d90e0f38a93c1e29221aeca0), [`a534e95`](https://github.com/mastra-ai/mastra/commit/a534e9591f83b3cc1ebff99c67edf4cda7bf81d3), [`9d0e7fe`](https://github.com/mastra-ai/mastra/commit/9d0e7feca8ed98de959f53476ee1456073673348), [`53d927c`](https://github.com/mastra-ai/mastra/commit/53d927cc6f03bff33655b7e2b788da445a08731d), [`22f64bc`](https://github.com/mastra-ai/mastra/commit/22f64bc1d37149480b58bf2fefe35b79a1e3e7d5), [`83d5942`](https://github.com/mastra-ai/mastra/commit/83d5942669ce7bba4a6ca4fd4da697a10eb5ebdc), [`bda6370`](https://github.com/mastra-ai/mastra/commit/bda637009360649aaf579919e7873e33553c273e), [`d7acd8e`](https://github.com/mastra-ai/mastra/commit/d7acd8e987b5d7eff4fd98b0906c17c06a2e83d5), [`c7f1f7d`](https://github.com/mastra-ai/mastra/commit/c7f1f7d24f61f247f018cc2d1f33bf63212959a7), [`0bddc6d`](https://github.com/mastra-ai/mastra/commit/0bddc6d8dbd6f6008c0cba2e4960a2da75a55af1), [`735d8c1`](https://github.com/mastra-ai/mastra/commit/735d8c1c0d19fbc09e6f8b66cf41bc7655993838), [`acf322e`](https://github.com/mastra-ai/mastra/commit/acf322e0f1fd0189684cf529d91c694bea918a45), [`c942802`](https://github.com/mastra-ai/mastra/commit/c942802a477a925b01859a7b8688d4355715caaa), [`a0c8c1b`](https://github.com/mastra-ai/mastra/commit/a0c8c1b87d4fee252aebda73e8637fbe01d761c9), [`cc34739`](https://github.com/mastra-ai/mastra/commit/cc34739c34b6266a91bea561119240a7acf47887), [`c218bd3`](https://github.com/mastra-ai/mastra/commit/c218bd3759e32423735b04843a09404572631014), [`2c4438b`](https://github.com/mastra-ai/mastra/commit/2c4438b87817ab7eed818c7990fef010475af1a3), [`2b8893c`](https://github.com/mastra-ai/mastra/commit/2b8893cb108ef9acb72ee7835cd625610d2c1a4a), [`8e5c75b`](https://github.com/mastra-ai/mastra/commit/8e5c75bdb1d08a42d45309a4c72def4b6890230f), [`fa8409b`](https://github.com/mastra-ai/mastra/commit/fa8409bc39cfd8ba6643b9db5269b90b22e2a2f7), [`173c535`](https://github.com/mastra-ai/mastra/commit/173c535c0645b0da404fe09f003778f0b0d4e019)]:
|
|
215
|
+
- @mastra/core@0.0.0-fix-9244-clickhouse-metadata-20251104213434
|
|
51
216
|
|
|
52
217
|
## 0.16.4
|
|
53
218
|
|
package/README.md
CHANGED
|
@@ -81,11 +81,9 @@ const client = new MastraClient({
|
|
|
81
81
|
- `listWorkflows()`: Get all workflows
|
|
82
82
|
- `getWorkflow(workflowId)`: Get a workflow instance
|
|
83
83
|
- `workflow.details()`: Get workflow details
|
|
84
|
-
- `workflow.
|
|
85
|
-
- `workflow.createRun()`: Deprecated - use createRunAsync() instead
|
|
84
|
+
- `workflow.createRun()`: Create workflow run
|
|
86
85
|
- `workflow.startAsync(params)`: Execute the workflow and wait for execution results
|
|
87
86
|
- `workflow.resumeAsync(params)`: Resume suspended workflow step async
|
|
88
|
-
- `workflow.watch({runId},(record)=>{})`: Watch the step transitions of the workflow run
|
|
89
87
|
- `workflow.start({runId, triggerData})`: Start a workflow run sync
|
|
90
88
|
- `workflow.resume(params)`: Resume the workflow run sync
|
|
91
89
|
|
package/dist/client.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { AITraceRecord, AITracesPaginatedArg, WorkflowInfo } from '@mastra/core';
|
|
2
1
|
import type { ServerDetailInfo } from '@mastra/core/mcp';
|
|
3
2
|
import type { RequestContext } from '@mastra/core/request-context';
|
|
3
|
+
import type { AITraceRecord, AITracesPaginatedArg } from '@mastra/core/storage';
|
|
4
|
+
import type { WorkflowInfo } from '@mastra/core/workflows';
|
|
4
5
|
import { Agent, MemoryThread, Tool, Workflow, Vector, BaseResource, A2A, MCPTool, AgentBuilder } from './resources/index.js';
|
|
5
|
-
import type { ClientOptions, CreateMemoryThreadParams, CreateMemoryThreadResponse, GetAgentResponse, GetLogParams, GetLogsParams, GetLogsResponse, GetToolResponse, GetWorkflowResponse, SaveMessageToMemoryParams, SaveMessageToMemoryResponse, McpServerListResponse, McpServerToolListResponse, GetScorerResponse,
|
|
6
|
+
import type { ClientOptions, CreateMemoryThreadParams, CreateMemoryThreadResponse, GetAgentResponse, GetLogParams, GetLogsParams, GetLogsResponse, GetToolResponse, GetWorkflowResponse, SaveMessageToMemoryParams, SaveMessageToMemoryResponse, McpServerListResponse, McpServerToolListResponse, GetScorerResponse, ListScoresByScorerIdParams, ListScoresResponse, ListScoresByRunIdParams, ListScoresByEntityIdParams, ListScoresBySpanParams, SaveScoreParams, SaveScoreResponse, GetAITracesResponse, GetMemoryConfigParams, GetMemoryConfigResponse, GetMemoryThreadMessagesResponse, MemorySearchResponse, ListAgentsModelProvidersResponse, ListMemoryThreadsParams, ListMemoryThreadsResponse } from './types.js';
|
|
6
7
|
export declare class MastraClient extends BaseResource {
|
|
7
8
|
private observability;
|
|
8
9
|
constructor(options: ClientOptions);
|
|
@@ -135,12 +136,12 @@ export declare class MastraClient extends BaseResource {
|
|
|
135
136
|
}>;
|
|
136
137
|
/**
|
|
137
138
|
* Retrieves a list of available MCP servers.
|
|
138
|
-
* @param params - Optional parameters for pagination (
|
|
139
|
+
* @param params - Optional parameters for pagination (perPage, page).
|
|
139
140
|
* @returns Promise containing the list of MCP servers and pagination info.
|
|
140
141
|
*/
|
|
141
142
|
getMcpServers(params?: {
|
|
142
|
-
|
|
143
|
-
|
|
143
|
+
perPage?: number;
|
|
144
|
+
page?: number;
|
|
144
145
|
}): Promise<McpServerListResponse>;
|
|
145
146
|
/**
|
|
146
147
|
* Retrieves detailed information for a specific MCP server.
|
|
@@ -217,33 +218,28 @@ export declare class MastraClient extends BaseResource {
|
|
|
217
218
|
* @returns Promise containing the scorer
|
|
218
219
|
*/
|
|
219
220
|
getScorer(scorerId: string): Promise<GetScorerResponse>;
|
|
220
|
-
|
|
221
|
+
listScoresByScorerId(params: ListScoresByScorerIdParams): Promise<ListScoresResponse>;
|
|
221
222
|
/**
|
|
222
223
|
* Retrieves scores by run ID
|
|
223
224
|
* @param params - Parameters containing run ID and pagination options
|
|
224
225
|
* @returns Promise containing scores and pagination info
|
|
225
226
|
*/
|
|
226
|
-
|
|
227
|
+
listScoresByRunId(params: ListScoresByRunIdParams): Promise<ListScoresResponse>;
|
|
227
228
|
/**
|
|
228
229
|
* Retrieves scores by entity ID and type
|
|
229
230
|
* @param params - Parameters containing entity ID, type, and pagination options
|
|
230
231
|
* @returns Promise containing scores and pagination info
|
|
231
232
|
*/
|
|
232
|
-
|
|
233
|
+
listScoresByEntityId(params: ListScoresByEntityIdParams): Promise<ListScoresResponse>;
|
|
233
234
|
/**
|
|
234
235
|
* Saves a score
|
|
235
236
|
* @param params - Parameters containing the score data to save
|
|
236
237
|
* @returns Promise containing the saved score
|
|
237
238
|
*/
|
|
238
239
|
saveScore(params: SaveScoreParams): Promise<SaveScoreResponse>;
|
|
239
|
-
/**
|
|
240
|
-
* Retrieves model providers with available keys
|
|
241
|
-
* @returns Promise containing model providers with available keys
|
|
242
|
-
*/
|
|
243
|
-
getModelProviders(): Promise<string[]>;
|
|
244
240
|
getAITrace(traceId: string): Promise<AITraceRecord>;
|
|
245
241
|
getAITraces(params: AITracesPaginatedArg): Promise<GetAITracesResponse>;
|
|
246
|
-
|
|
242
|
+
listScoresBySpan(params: ListScoresBySpanParams): Promise<ListScoresResponse>;
|
|
247
243
|
score(params: {
|
|
248
244
|
scorerName: string;
|
|
249
245
|
targets: Array<{
|
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,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EACL,KAAK,EACL,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,GAAG,EACH,OAAO,EACP,YAAY,EAEb,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACxB,0BAA0B,EAC1B,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EACzB,2BAA2B,EAC3B,qBAAqB,EACrB,yBAAyB,EACz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