@mastra/memory 1.17.6-alpha.0 → 1.17.6-alpha.1
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 +9 -0
- package/dist/{chunk-NUYSX3DD.js → chunk-QZGJY67D.js} +9 -5
- package/dist/chunk-QZGJY67D.js.map +1 -0
- package/dist/{chunk-ZUUSLGY6.cjs → chunk-WNLFJKTX.cjs} +9 -5
- package/dist/chunk-WNLFJKTX.cjs.map +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +39 -39
- package/dist/docs/references/docs-agents-background-tasks.md +62 -2
- package/dist/docs/references/docs-memory-observational-memory.md +7 -2
- package/dist/docs/references/docs-memory-overview.md +2 -1
- package/dist/index.cjs +298 -172
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +289 -163
- package/dist/index.js.map +1 -1
- package/dist/{observational-memory-BOXSRJOR.cjs → observational-memory-BJF72NKJ.cjs} +26 -26
- package/dist/{observational-memory-BOXSRJOR.cjs.map → observational-memory-BJF72NKJ.cjs.map} +1 -1
- package/dist/{observational-memory-KH7G7Y6B.js → observational-memory-HAJ3K5JJ.js} +3 -3
- package/dist/{observational-memory-KH7G7Y6B.js.map → observational-memory-HAJ3K5JJ.js.map} +1 -1
- package/dist/processors/index.cjs +24 -24
- package/dist/processors/index.js +1 -1
- package/dist/processors/observational-memory/observation-strategies/resource-scoped.d.ts.map +1 -1
- package/dist/processors/observational-memory/observational-memory.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-NUYSX3DD.js.map +0 -1
- package/dist/chunk-ZUUSLGY6.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/memory
|
|
2
2
|
|
|
3
|
+
## 1.17.6-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Added extra defensive checks to prevent edge cases where system messages may have already been stored in message history. ([#15787](https://github.com/mastra-ai/mastra/pull/15787))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`b560d6f`](https://github.com/mastra-ai/mastra/commit/b560d6f88b9b904b15c10f75c949eb145bc27684), [`36b3bbf`](https://github.com/mastra-ai/mastra/commit/36b3bbf5a8d59f7e23d47e29340e76c681b4929c), [`b275631`](https://github.com/mastra-ai/mastra/commit/b275631dc10541a482b2e2d4a3e3cfa843bd5fa1)]:
|
|
10
|
+
- @mastra/core@1.33.0-alpha.6
|
|
11
|
+
|
|
3
12
|
## 1.17.6-alpha.0
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -1689,8 +1689,9 @@ var ResourceScopedObservationStrategy = class extends ObservationStrategy {
|
|
|
1689
1689
|
orderBy: { field: "createdAt", direction: "ASC" },
|
|
1690
1690
|
filter: startDate ? { dateRange: { start: startDate } } : void 0
|
|
1691
1691
|
});
|
|
1692
|
-
|
|
1693
|
-
|
|
1692
|
+
const messages = result.messages.filter((msg) => msg.role !== "system");
|
|
1693
|
+
if (messages.length > 0) {
|
|
1694
|
+
this.messagesByThread.set(thread.id, messages);
|
|
1694
1695
|
}
|
|
1695
1696
|
}
|
|
1696
1697
|
if (currentThreadMessages.length > 0) {
|
|
@@ -7419,6 +7420,9 @@ Async buffering is enabled by default \u2014 this opt-out is only needed when us
|
|
|
7419
7420
|
}
|
|
7420
7421
|
const result = [];
|
|
7421
7422
|
for (const msg of allMessages) {
|
|
7423
|
+
if (msg.role === "system") {
|
|
7424
|
+
continue;
|
|
7425
|
+
}
|
|
7422
7426
|
if (observedMessageIds?.has(msg.id)) {
|
|
7423
7427
|
continue;
|
|
7424
7428
|
}
|
|
@@ -7729,7 +7733,7 @@ ${suggestedResponse}
|
|
|
7729
7733
|
} : void 0
|
|
7730
7734
|
});
|
|
7731
7735
|
}
|
|
7732
|
-
return result.messages;
|
|
7736
|
+
return result.messages.filter((msg) => msg.role !== "system");
|
|
7733
7737
|
}
|
|
7734
7738
|
/**
|
|
7735
7739
|
* Format unobserved messages from other threads as <unobserved-context> blocks.
|
|
@@ -9441,5 +9445,5 @@ function getObservationsAsOf(activeObservations, asOf) {
|
|
|
9441
9445
|
}
|
|
9442
9446
|
|
|
9443
9447
|
export { ModelByInputTokens, OBSERVER_SYSTEM_PROMPT, ObservationalMemory, ObservationalMemoryProcessor, TokenCounter, buildObserverPrompt, buildObserverSystemPrompt, combineObservationGroupRanges, deriveObservationGroupProvenance, extractCurrentTask, formatMessagesForObserver, formatToolResultForObserver, getObservationsAsOf, hasCurrentTaskSection, injectAnchorIds, optimizeObservationsForContext, parseAnchorId, parseObservationGroups, parseObserverOutput, reconcileObservationGroupsFromReflection, renderObservationGroupsForReflection, resolveToolResultValue, stripEphemeralAnchorIds, stripObservationGroups, truncateStringByTokens, wrapInObservationGroup };
|
|
9444
|
-
//# sourceMappingURL=chunk-
|
|
9445
|
-
//# sourceMappingURL=chunk-
|
|
9448
|
+
//# sourceMappingURL=chunk-QZGJY67D.js.map
|
|
9449
|
+
//# sourceMappingURL=chunk-QZGJY67D.js.map
|