@mastra/memory 0.13.1-alpha.0 → 0.13.2-alpha.0
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 +2 -2
- package/CHANGELOG.md +22 -0
- package/integration-tests-v5/CHANGELOG.md +18 -0
- package/integration-tests-v5/package.json +1 -1
- package/integration-tests-v5/src/agent-memory.test.ts +2 -2
- package/integration-tests-v5/src/processors.test.ts +15 -12
- package/package.json +4 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/memory@0.13.
|
|
2
|
+
> @mastra/memory@0.13.2-alpha.0 build /home/runner/work/mastra/mastra/packages/memory
|
|
3
3
|
> pnpm run check && tsup --silent --config tsup.config.ts
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @mastra/memory@0.13.
|
|
6
|
+
> @mastra/memory@0.13.2-alpha.0 check /home/runner/work/mastra/mastra/packages/memory
|
|
7
7
|
> tsc --noEmit
|
|
8
8
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @mastra/memory
|
|
2
2
|
|
|
3
|
+
## 0.13.2-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#6933](https://github.com/mastra-ai/mastra/pull/6933) [`bf504a8`](https://github.com/mastra-ai/mastra/commit/bf504a833051f6f321d832cc7d631f3cb86d657b) Thanks [@NikAiyer](https://github.com/NikAiyer)! - Add util functions for workflow server handlers and made processor process function async
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`0778757`](https://github.com/mastra-ai/mastra/commit/07787570e4addbd501522037bd2542c3d9e26822), [`bf504a8`](https://github.com/mastra-ai/mastra/commit/bf504a833051f6f321d832cc7d631f3cb86d657b), [`e6f5046`](https://github.com/mastra-ai/mastra/commit/e6f50467aff317e67e8bd74c485c3fbe2a5a6db1), [`9613558`](https://github.com/mastra-ai/mastra/commit/9613558e6475f4710e05d1be7553a32ee7bddc20)]:
|
|
10
|
+
- @mastra/core@0.14.2-alpha.0
|
|
11
|
+
|
|
12
|
+
## 0.13.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#6919](https://github.com/mastra-ai/mastra/pull/6919) [`6e7e120`](https://github.com/mastra-ai/mastra/commit/6e7e1207d6e8d8b838f9024f90bd10df1181ba27) Thanks [@dane-ai-mastra](https://github.com/apps/dane-ai-mastra)! - dependencies updates:
|
|
17
|
+
- Updated dependency [`ai@^4.3.19` ↗︎](https://www.npmjs.com/package/ai/v/4.3.19) (from `^4.3.16`, in `dependencies`)
|
|
18
|
+
- Updated dependency [`ai-v5@npm:ai@5.0.15` ↗︎](https://www.npmjs.com/package/ai-v5/v/5.0.15) (from `npm:ai@5.0.0`, in `dependencies`)
|
|
19
|
+
|
|
20
|
+
- [#6921](https://github.com/mastra-ai/mastra/pull/6921) [`c4f2605`](https://github.com/mastra-ai/mastra/commit/c4f2605fa00e796a26c6f5fc3cf8f5552f77d617) Thanks [@dane-ai-mastra](https://github.com/apps/dane-ai-mastra)! - dependencies updates:
|
|
21
|
+
- Updated dependency [`redis@^5.8.2` ↗︎](https://www.npmjs.com/package/redis/v/5.8.2) (from `^5.8.1`, in `dependencies`)
|
|
22
|
+
- Updated dependencies [[`6e7e120`](https://github.com/mastra-ai/mastra/commit/6e7e1207d6e8d8b838f9024f90bd10df1181ba27), [`0f00e17`](https://github.com/mastra-ai/mastra/commit/0f00e172953ccdccadb35ed3d70f5e4d89115869), [`217cd7a`](https://github.com/mastra-ai/mastra/commit/217cd7a4ce171e9a575c41bb8c83300f4db03236), [`a5a23d9`](https://github.com/mastra-ai/mastra/commit/a5a23d981920d458dc6078919992a5338931ef02)]:
|
|
23
|
+
- @mastra/core@0.14.1
|
|
24
|
+
|
|
3
25
|
## 0.13.1-alpha.0
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @mastra/memory-integration-tests-v5
|
|
2
2
|
|
|
3
|
+
## 0.1.3-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`0778757`](https://github.com/mastra-ai/mastra/commit/07787570e4addbd501522037bd2542c3d9e26822), [`bf504a8`](https://github.com/mastra-ai/mastra/commit/bf504a833051f6f321d832cc7d631f3cb86d657b), [`e6f5046`](https://github.com/mastra-ai/mastra/commit/e6f50467aff317e67e8bd74c485c3fbe2a5a6db1), [`9613558`](https://github.com/mastra-ai/mastra/commit/9613558e6475f4710e05d1be7553a32ee7bddc20)]:
|
|
8
|
+
- @mastra/core@0.14.2-alpha.0
|
|
9
|
+
- @mastra/memory@0.13.2-alpha.0
|
|
10
|
+
|
|
11
|
+
## 0.1.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [[`6e7e120`](https://github.com/mastra-ai/mastra/commit/6e7e1207d6e8d8b838f9024f90bd10df1181ba27), [`6e7e120`](https://github.com/mastra-ai/mastra/commit/6e7e1207d6e8d8b838f9024f90bd10df1181ba27), [`64ad21f`](https://github.com/mastra-ai/mastra/commit/64ad21ff4f58ce8b344d163d800d9e4f84d82f6f), [`6e7e120`](https://github.com/mastra-ai/mastra/commit/6e7e1207d6e8d8b838f9024f90bd10df1181ba27), [`c4f2605`](https://github.com/mastra-ai/mastra/commit/c4f2605fa00e796a26c6f5fc3cf8f5552f77d617), [`0f00e17`](https://github.com/mastra-ai/mastra/commit/0f00e172953ccdccadb35ed3d70f5e4d89115869), [`217cd7a`](https://github.com/mastra-ai/mastra/commit/217cd7a4ce171e9a575c41bb8c83300f4db03236), [`a5a23d9`](https://github.com/mastra-ai/mastra/commit/a5a23d981920d458dc6078919992a5338931ef02)]:
|
|
16
|
+
- @mastra/core@0.14.1
|
|
17
|
+
- @mastra/fastembed@0.10.3
|
|
18
|
+
- @mastra/libsql@0.13.4
|
|
19
|
+
- @mastra/memory@0.13.1
|
|
20
|
+
|
|
3
21
|
## 0.1.2-alpha.0
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/memory-integration-tests-v5",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.3-alpha.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "pnpm test:streaming && pnpm test:working-memory && pnpm test:agent-memory && pnpm test:processors",
|
|
7
7
|
"test:agent-memory": "vitest run ./src/agent-memory.test.ts",
|
|
@@ -230,11 +230,11 @@ describe('Agent Memory Tests', () => {
|
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
expect(flattenAssistantMessages(assistantMessages)).toEqual(
|
|
233
|
-
expect.arrayContaining([expect.
|
|
233
|
+
expect.arrayContaining([expect.stringMatching(/2\s*\+\s*2/), expect.stringContaining('"result"')]),
|
|
234
234
|
);
|
|
235
235
|
|
|
236
236
|
expect(flattenAssistantMessages(assistantUiMessages)).toEqual(
|
|
237
|
-
expect.arrayContaining([expect.
|
|
237
|
+
expect.arrayContaining([expect.stringMatching(/2\s*\+\s*2/), expect.stringContaining('"result"')]),
|
|
238
238
|
);
|
|
239
239
|
});
|
|
240
240
|
|
|
@@ -81,7 +81,7 @@ describe('Memory with Processors', () => {
|
|
|
81
81
|
threadId: thread.id,
|
|
82
82
|
selectBy: { last: 20 },
|
|
83
83
|
});
|
|
84
|
-
const result = memory.processMessages({
|
|
84
|
+
const result = await memory.processMessages({
|
|
85
85
|
messages: new MessageList({ threadId: thread.id, resourceId })
|
|
86
86
|
.add(queryResult.uiMessages, 'memory')
|
|
87
87
|
.get.all.core(),
|
|
@@ -111,7 +111,7 @@ describe('Memory with Processors', () => {
|
|
|
111
111
|
});
|
|
112
112
|
expect(allMessagesQuery.messages.length).toBe(20);
|
|
113
113
|
|
|
114
|
-
const allMessagesResult = memory.processMessages({
|
|
114
|
+
const allMessagesResult = await memory.processMessages({
|
|
115
115
|
messages: new MessageList({ threadId: thread.id, resourceId })
|
|
116
116
|
.add(allMessagesQuery.uiMessages, 'memory')
|
|
117
117
|
.get.all.core(),
|
|
@@ -155,7 +155,7 @@ describe('Memory with Processors', () => {
|
|
|
155
155
|
threadId: thread.id,
|
|
156
156
|
selectBy: { last: 20 },
|
|
157
157
|
});
|
|
158
|
-
const result = memory.processMessages({
|
|
158
|
+
const result = await memory.processMessages({
|
|
159
159
|
messages: v2ToCoreMessages(queryResult.uiMessages),
|
|
160
160
|
processors: [new ToolCallFilter({ exclude: ['weather'] })],
|
|
161
161
|
});
|
|
@@ -171,7 +171,10 @@ describe('Memory with Processors', () => {
|
|
|
171
171
|
threadId: thread.id,
|
|
172
172
|
selectBy: { last: 20 },
|
|
173
173
|
});
|
|
174
|
-
const result2 = memory.processMessages({
|
|
174
|
+
const result2 = await memory.processMessages({
|
|
175
|
+
messages: v2ToCoreMessages(queryResult2.uiMessages),
|
|
176
|
+
processors: [],
|
|
177
|
+
});
|
|
175
178
|
const messages2 = new MessageList({ threadId: thread.id, resourceId }).add(result2, 'response').get.all.v2();
|
|
176
179
|
expect(new MessageList().add(messages2, 'memory').get.all.v2()).toHaveLength(messagesV2.length);
|
|
177
180
|
expect(filterToolCallsByName(result2, 'weather')).toHaveLength(1);
|
|
@@ -184,7 +187,7 @@ describe('Memory with Processors', () => {
|
|
|
184
187
|
threadId: thread.id,
|
|
185
188
|
selectBy: { last: 20 },
|
|
186
189
|
});
|
|
187
|
-
const result3 = memory.processMessages({
|
|
190
|
+
const result3 = await memory.processMessages({
|
|
188
191
|
messages: v2ToCoreMessages(queryResult3.uiMessages),
|
|
189
192
|
processors: [new ToolCallFilter({ exclude: ['weather', 'calculator'] })],
|
|
190
193
|
});
|
|
@@ -199,7 +202,7 @@ describe('Memory with Processors', () => {
|
|
|
199
202
|
threadId: thread.id,
|
|
200
203
|
selectBy: { last: 20 },
|
|
201
204
|
});
|
|
202
|
-
const result4 = memory.processMessages({
|
|
205
|
+
const result4 = await memory.processMessages({
|
|
203
206
|
messages: v2ToCoreMessages(queryResult4.uiMessages),
|
|
204
207
|
processors: [new ToolCallFilter()],
|
|
205
208
|
});
|
|
@@ -234,7 +237,7 @@ describe('Memory with Processors', () => {
|
|
|
234
237
|
threadId: thread.id,
|
|
235
238
|
selectBy: { last: 20 },
|
|
236
239
|
});
|
|
237
|
-
const result = memory.processMessages({
|
|
240
|
+
const result = await memory.processMessages({
|
|
238
241
|
messages: v2ToCoreMessages(queryResult.uiMessages),
|
|
239
242
|
processors: [new ToolCallFilter({ exclude: ['weather'] }), new TokenLimiter(250)],
|
|
240
243
|
});
|
|
@@ -420,7 +423,7 @@ describe('Memory with Processors', () => {
|
|
|
420
423
|
|
|
421
424
|
const list = new MessageList({ threadId }).add(queryResult.messagesV2, 'memory');
|
|
422
425
|
|
|
423
|
-
const baselineResult = memory.processMessages({
|
|
426
|
+
const baselineResult = await memory.processMessages({
|
|
424
427
|
messages: list.get.remembered.core(),
|
|
425
428
|
newMessages: list.get.input.core(),
|
|
426
429
|
processors: [],
|
|
@@ -441,7 +444,7 @@ describe('Memory with Processors', () => {
|
|
|
441
444
|
selectBy: { last: 20 },
|
|
442
445
|
});
|
|
443
446
|
const list2 = new MessageList({ threadId }).add(weatherQueryResult.messagesV2, 'memory');
|
|
444
|
-
const weatherFilteredResult = memory.processMessages({
|
|
447
|
+
const weatherFilteredResult = await memory.processMessages({
|
|
445
448
|
messages: list2.get.all.core(),
|
|
446
449
|
processors: [new ToolCallFilter({ exclude: ['get_weather'] })],
|
|
447
450
|
});
|
|
@@ -462,7 +465,7 @@ describe('Memory with Processors', () => {
|
|
|
462
465
|
selectBy: { last: 20 },
|
|
463
466
|
});
|
|
464
467
|
const list3 = new MessageList({ threadId }).add(tokenLimitQuery.messages, 'memory');
|
|
465
|
-
const tokenLimitedResult = memory.processMessages({
|
|
468
|
+
const tokenLimitedResult = await memory.processMessages({
|
|
466
469
|
messages: list3.get.all.core(),
|
|
467
470
|
processors: [new TokenLimiter(100)], // Small limit to only get a subset
|
|
468
471
|
});
|
|
@@ -476,7 +479,7 @@ describe('Memory with Processors', () => {
|
|
|
476
479
|
selectBy: { last: 20 },
|
|
477
480
|
});
|
|
478
481
|
const list4 = new MessageList({ threadId }).add(combinedQuery.messages, 'memory');
|
|
479
|
-
const combinedResult = memory.processMessages({
|
|
482
|
+
const combinedResult = await memory.processMessages({
|
|
480
483
|
messages: list4.get.all.core(),
|
|
481
484
|
processors: [new ToolCallFilter({ exclude: ['get_weather', 'calculator'] }), new TokenLimiter(500)],
|
|
482
485
|
});
|
|
@@ -529,7 +532,7 @@ describe('Memory with Processors', () => {
|
|
|
529
532
|
});
|
|
530
533
|
|
|
531
534
|
// Retrieve the message (no TokenLimiter, just get the message back)
|
|
532
|
-
const result = memory.processMessages({
|
|
535
|
+
const result = await memory.processMessages({
|
|
533
536
|
messages: v2ToCoreMessages(queryResult.uiMessages),
|
|
534
537
|
});
|
|
535
538
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/memory",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.2-alpha.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
59
|
"typescript-eslint": "^8.38.0",
|
|
60
60
|
"vitest": "^3.2.4",
|
|
61
|
-
"@internal/
|
|
62
|
-
"@internal/
|
|
63
|
-
"@mastra/core": "0.14.
|
|
61
|
+
"@internal/types-builder": "0.0.6",
|
|
62
|
+
"@internal/lint": "0.0.31",
|
|
63
|
+
"@mastra/core": "0.14.2-alpha.0"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"@mastra/core": ">=0.14.0-0 <0.15.0-0"
|