@mastra/memory 1.13.1-alpha.0 → 1.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/CHANGELOG.md +18 -0
- package/dist/{chunk-HNVSYZRA.cjs → chunk-4FMHSWZD.cjs} +23 -19
- package/dist/chunk-4FMHSWZD.cjs.map +1 -0
- package/dist/{chunk-SWCWXIDJ.js → chunk-C7PARRAD.js} +23 -19
- package/dist/chunk-C7PARRAD.js.map +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +39 -39
- package/dist/index.cjs +12 -12
- package/dist/index.js +4 -4
- package/dist/{observational-memory-4VT6QEB7.cjs → observational-memory-5YDQLKHE.cjs} +26 -26
- package/dist/{observational-memory-4VT6QEB7.cjs.map → observational-memory-5YDQLKHE.cjs.map} +1 -1
- package/dist/{observational-memory-74TRS2R6.js → observational-memory-B7AUSTEY.js} +3 -3
- package/dist/{observational-memory-74TRS2R6.js.map → observational-memory-B7AUSTEY.js.map} +1 -1
- package/dist/processors/index.cjs +24 -24
- package/dist/processors/index.js +1 -1
- package/dist/processors/observational-memory/observation-turn/step.d.ts.map +1 -1
- package/package.json +7 -7
- package/dist/chunk-HNVSYZRA.cjs.map +0 -1
- package/dist/chunk-SWCWXIDJ.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @mastra/memory
|
|
2
2
|
|
|
3
|
+
## 1.13.2-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fixed observational memory buffering so sealed assistant chunks stay split instead of being merged back into one persisted message during long tool runs. ([#14995](https://github.com/mastra-ai/mastra/pull/14995))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`ed425d7`](https://github.com/mastra-ai/mastra/commit/ed425d78e7c66cbda8209fee910856f98c6c6b82), [`ba6f7e9`](https://github.com/mastra-ai/mastra/commit/ba6f7e9086d8281393f2acae60fda61de3bff1f9), [`7eb2596`](https://github.com/mastra-ai/mastra/commit/7eb25960d607e07468c9a10c5437abd2deaf1e9a)]:
|
|
10
|
+
- @mastra/core@1.23.0-alpha.0
|
|
11
|
+
|
|
12
|
+
## 1.13.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Fixed thread titles not persisting when generated during async buffered observation. Titles now update immediately when the observer produces them, rather than being lost until activation. ([#14992](https://github.com/mastra-ai/mastra/pull/14992))
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`cb15509`](https://github.com/mastra-ai/mastra/commit/cb15509b58f6a83e11b765c945082afc027db972), [`81e4259`](https://github.com/mastra-ai/mastra/commit/81e425939b4ceeb4f586e9b6d89c3b1c1f2d2fe7), [`951b8a1`](https://github.com/mastra-ai/mastra/commit/951b8a1b5ef7e1474c59dc4f2b9fc1a8b1e508b6), [`80c5668`](https://github.com/mastra-ai/mastra/commit/80c5668e365470d3a96d3e953868fd7a643ff67c), [`3d478c1`](https://github.com/mastra-ai/mastra/commit/3d478c1e13f17b80f330ac49d7aa42ef929b93ff), [`2b4ea10`](https://github.com/mastra-ai/mastra/commit/2b4ea10b053e4ea1ab232d536933a4a3c4cba999), [`a0544f0`](https://github.com/mastra-ai/mastra/commit/a0544f0a1e6bd52ac12676228967c1938e43648d), [`6039f17`](https://github.com/mastra-ai/mastra/commit/6039f176f9c457304825ff1df8c83b8e457376c0), [`06b928d`](https://github.com/mastra-ai/mastra/commit/06b928dfc2f5630d023467476cc5919dfa858d0a), [`6a8d984`](https://github.com/mastra-ai/mastra/commit/6a8d9841f2933456ee1598099f488d742b600054), [`c8c86aa`](https://github.com/mastra-ai/mastra/commit/c8c86aa1458017fbd1c0776fdc0c520d129df8a6)]:
|
|
19
|
+
- @mastra/core@1.22.0
|
|
20
|
+
|
|
3
21
|
## 1.13.1-alpha.0
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -2030,6 +2030,26 @@ var ObservationStep = class {
|
|
|
2030
2030
|
if (statusSnapshot.shouldBuffer && !hasIncompleteToolCalls) {
|
|
2031
2031
|
const allMessages = messageList.get.all.db();
|
|
2032
2032
|
const unobservedMessages = om.getUnobservedMessages(allMessages, statusSnapshot.record);
|
|
2033
|
+
const candidates = om.getUnobservedMessages(unobservedMessages, statusSnapshot.record, {
|
|
2034
|
+
excludeBuffered: true
|
|
2035
|
+
});
|
|
2036
|
+
if (candidates.length > 0) {
|
|
2037
|
+
om.sealMessagesForBuffering(candidates);
|
|
2038
|
+
try {
|
|
2039
|
+
await this.turn.hooks?.onBufferChunkSealed?.();
|
|
2040
|
+
} catch (error) {
|
|
2041
|
+
omDebug(
|
|
2042
|
+
`[OM:buffer] onBufferChunkSealed hook failed: ${error instanceof Error ? error.message : String(error)}`
|
|
2043
|
+
);
|
|
2044
|
+
}
|
|
2045
|
+
if (this.turn.memory) {
|
|
2046
|
+
await this.turn.memory.persistMessages(candidates);
|
|
2047
|
+
}
|
|
2048
|
+
messageList.removeByIds(candidates.map((msg) => msg.id));
|
|
2049
|
+
for (const msg of candidates) {
|
|
2050
|
+
messageList.add(msg, "memory");
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2033
2053
|
void om.buffer({
|
|
2034
2054
|
threadId,
|
|
2035
2055
|
resourceId,
|
|
@@ -2038,23 +2058,7 @@ var ObservationStep = class {
|
|
|
2038
2058
|
record: statusSnapshot.record,
|
|
2039
2059
|
writer: this.turn.writer,
|
|
2040
2060
|
requestContext: this.turn.requestContext,
|
|
2041
|
-
observabilityContext: this.turn.observabilityContext
|
|
2042
|
-
beforeBuffer: async (candidates) => {
|
|
2043
|
-
if (candidates.length === 0) {
|
|
2044
|
-
return;
|
|
2045
|
-
}
|
|
2046
|
-
om.sealMessagesForBuffering(candidates);
|
|
2047
|
-
try {
|
|
2048
|
-
await this.turn.hooks?.onBufferChunkSealed?.();
|
|
2049
|
-
} catch (error) {
|
|
2050
|
-
omDebug(
|
|
2051
|
-
`[OM:buffer] onBufferChunkSealed hook failed: ${error instanceof Error ? error.message : String(error)}`
|
|
2052
|
-
);
|
|
2053
|
-
}
|
|
2054
|
-
if (this.turn.memory) {
|
|
2055
|
-
await this.turn.memory.persistMessages(candidates);
|
|
2056
|
-
}
|
|
2057
|
-
}
|
|
2061
|
+
observabilityContext: this.turn.observabilityContext
|
|
2058
2062
|
}).catch((err) => {
|
|
2059
2063
|
omDebug(`[OM:buffer] fire-and-forget buffer failed: ${err?.message}`);
|
|
2060
2064
|
});
|
|
@@ -8591,5 +8595,5 @@ exports.stripEphemeralAnchorIds = stripEphemeralAnchorIds;
|
|
|
8591
8595
|
exports.stripObservationGroups = stripObservationGroups;
|
|
8592
8596
|
exports.truncateStringByTokens = truncateStringByTokens;
|
|
8593
8597
|
exports.wrapInObservationGroup = wrapInObservationGroup;
|
|
8594
|
-
//# sourceMappingURL=chunk-
|
|
8595
|
-
//# sourceMappingURL=chunk-
|
|
8598
|
+
//# sourceMappingURL=chunk-4FMHSWZD.cjs.map
|
|
8599
|
+
//# sourceMappingURL=chunk-4FMHSWZD.cjs.map
|