@mastra/memory 0.3.4-alpha.4 → 0.3.5-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 +6 -6
- package/CHANGELOG.md +34 -0
- package/dist/index.cjs +4 -4
- package/dist/index.js +4 -4
- package/package.json +3 -3
- package/src/index.ts +9 -5
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/memory@0.3.
|
|
2
|
+
> @mastra/memory@0.3.5-alpha.0 build /home/runner/work/mastra/mastra/packages/memory
|
|
3
3
|
> pnpm run check && tsup src/index.ts src/processors/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @mastra/memory@0.3.
|
|
6
|
+
> @mastra/memory@0.3.5-alpha.0 check /home/runner/work/mastra/mastra/packages/memory
|
|
7
7
|
> tsc --noEmit
|
|
8
8
|
|
|
9
9
|
[34mCLI[39m Building entry: src/index.ts, src/processors/index.ts
|
|
10
10
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
11
11
|
[34mCLI[39m tsup v8.4.0
|
|
12
12
|
[34mTSC[39m Build start
|
|
13
|
-
[32mTSC[39m ⚡️ Build success in
|
|
13
|
+
[32mTSC[39m ⚡️ Build success in 9856ms
|
|
14
14
|
[34mDTS[39m Build start
|
|
15
15
|
[34mCLI[39m Target: es2022
|
|
16
16
|
Analysis will use the bundled TypeScript version 5.8.3
|
|
17
17
|
[36mWriting package typings: /home/runner/work/mastra/mastra/packages/memory/dist/_tsup-dts-rollup.d.ts[39m
|
|
18
18
|
Analysis will use the bundled TypeScript version 5.8.3
|
|
19
19
|
[36mWriting package typings: /home/runner/work/mastra/mastra/packages/memory/dist/_tsup-dts-rollup.d.cts[39m
|
|
20
|
-
[32mDTS[39m ⚡️ Build success in
|
|
20
|
+
[32mDTS[39m ⚡️ Build success in 11835ms
|
|
21
21
|
[34mCLI[39m Cleaning output folder
|
|
22
22
|
[34mESM[39m Build start
|
|
23
23
|
[34mCJS[39m Build start
|
|
24
24
|
[32mCJS[39m [1mdist/index.cjs [22m[32m18.85 KB[39m
|
|
25
25
|
[32mCJS[39m [1mdist/processors/index.cjs [22m[32m5.59 KB[39m
|
|
26
|
-
[32mCJS[39m ⚡️ Build success in
|
|
26
|
+
[32mCJS[39m ⚡️ Build success in 740ms
|
|
27
27
|
[32mESM[39m [1mdist/index.js [22m[32m18.68 KB[39m
|
|
28
28
|
[32mESM[39m [1mdist/processors/index.js [22m[32m5.38 KB[39m
|
|
29
|
-
[32mESM[39m ⚡️ Build success in
|
|
29
|
+
[32mESM[39m ⚡️ Build success in 740ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @mastra/memory
|
|
2
2
|
|
|
3
|
+
## 0.3.5-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3cd7aee: [MASTRA-3439] Working Memory tool call fix: Updated saveMessages to filter out workingmemory content from messages, rather than skip message completely
|
|
8
|
+
- Updated dependencies [f53a6ac]
|
|
9
|
+
- Updated dependencies [eabdcd9]
|
|
10
|
+
- Updated dependencies [90be034]
|
|
11
|
+
- Updated dependencies [99f050a]
|
|
12
|
+
- Updated dependencies [d0ee3c6]
|
|
13
|
+
- Updated dependencies [23f258c]
|
|
14
|
+
- Updated dependencies [2672a05]
|
|
15
|
+
- @mastra/core@0.9.5-alpha.0
|
|
16
|
+
|
|
17
|
+
## 0.3.4
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies [396be50]
|
|
22
|
+
- Updated dependencies [ab80e7e]
|
|
23
|
+
- Updated dependencies [c3bd795]
|
|
24
|
+
- Updated dependencies [da082f8]
|
|
25
|
+
- Updated dependencies [a5810ce]
|
|
26
|
+
- Updated dependencies [3e9c131]
|
|
27
|
+
- Updated dependencies [3171b5b]
|
|
28
|
+
- Updated dependencies [973e5ac]
|
|
29
|
+
- Updated dependencies [daf942f]
|
|
30
|
+
- Updated dependencies [0b8b868]
|
|
31
|
+
- Updated dependencies [9e1eff5]
|
|
32
|
+
- Updated dependencies [6fa1ad1]
|
|
33
|
+
- Updated dependencies [c28d7a0]
|
|
34
|
+
- Updated dependencies [edf1e88]
|
|
35
|
+
- @mastra/core@0.9.4
|
|
36
|
+
|
|
3
37
|
## 0.3.4-alpha.4
|
|
4
38
|
|
|
5
39
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -342,13 +342,13 @@ var Memory = class extends memory.MastraMemory {
|
|
|
342
342
|
content: message.content.replace(workingMemoryRegex, ``).trim()
|
|
343
343
|
});
|
|
344
344
|
} else if (Array.isArray(message?.content)) {
|
|
345
|
-
const
|
|
346
|
-
(content) => (content.type ===
|
|
345
|
+
const filteredContent = message.content.filter(
|
|
346
|
+
(content) => !((content.type === "tool-call" || content.type === "tool-result") && content.toolName === "updateWorkingMemory")
|
|
347
347
|
);
|
|
348
|
-
if (
|
|
348
|
+
if (filteredContent.length === 0) {
|
|
349
349
|
continue;
|
|
350
350
|
}
|
|
351
|
-
const newContent =
|
|
351
|
+
const newContent = filteredContent.map((content) => {
|
|
352
352
|
if (content.type === "text") {
|
|
353
353
|
return {
|
|
354
354
|
...content,
|
package/dist/index.js
CHANGED
|
@@ -336,13 +336,13 @@ var Memory = class extends MastraMemory {
|
|
|
336
336
|
content: message.content.replace(workingMemoryRegex, ``).trim()
|
|
337
337
|
});
|
|
338
338
|
} else if (Array.isArray(message?.content)) {
|
|
339
|
-
const
|
|
340
|
-
(content) => (content.type ===
|
|
339
|
+
const filteredContent = message.content.filter(
|
|
340
|
+
(content) => !((content.type === "tool-call" || content.type === "tool-result") && content.toolName === "updateWorkingMemory")
|
|
341
341
|
);
|
|
342
|
-
if (
|
|
342
|
+
if (filteredContent.length === 0) {
|
|
343
343
|
continue;
|
|
344
344
|
}
|
|
345
|
-
const newContent =
|
|
345
|
+
const newContent = filteredContent.map((content) => {
|
|
346
346
|
if (content.type === "text") {
|
|
347
347
|
return {
|
|
348
348
|
...content,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/memory",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5-alpha.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"redis": "^4.7.0",
|
|
42
42
|
"xxhash-wasm": "^1.1.0",
|
|
43
43
|
"zod": "^3.24.3",
|
|
44
|
-
"@mastra/core": "^0.9.
|
|
44
|
+
"@mastra/core": "^0.9.5-alpha.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@ai-sdk/openai": "^1.3.3",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"typescript": "^5.8.2",
|
|
54
54
|
"typescript-eslint": "^8.26.1",
|
|
55
55
|
"vitest": "^3.1.2",
|
|
56
|
-
"@internal/lint": "0.0.
|
|
56
|
+
"@internal/lint": "0.0.5"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"check": "tsc --noEmit",
|
package/src/index.ts
CHANGED
|
@@ -394,15 +394,19 @@ export class Memory extends MastraMemory {
|
|
|
394
394
|
content: message.content.replace(workingMemoryRegex, ``).trim(),
|
|
395
395
|
});
|
|
396
396
|
} else if (Array.isArray(message?.content)) {
|
|
397
|
-
|
|
397
|
+
// Filter out updateWorkingMemory tool-call/result content items
|
|
398
|
+
const filteredContent = message.content.filter(
|
|
398
399
|
content =>
|
|
399
|
-
(
|
|
400
|
-
|
|
400
|
+
!(
|
|
401
|
+
(content.type === 'tool-call' || content.type === 'tool-result') &&
|
|
402
|
+
content.toolName === 'updateWorkingMemory'
|
|
403
|
+
),
|
|
401
404
|
);
|
|
402
|
-
if (
|
|
405
|
+
if (filteredContent.length === 0) {
|
|
406
|
+
// If nothing left, skip this message
|
|
403
407
|
continue;
|
|
404
408
|
}
|
|
405
|
-
const newContent =
|
|
409
|
+
const newContent = filteredContent.map(content => {
|
|
406
410
|
if (content.type === 'text') {
|
|
407
411
|
return {
|
|
408
412
|
...content,
|