@mastra/memory 1.16.0-alpha.3 → 1.16.0-alpha.4

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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # @mastra/memory
2
2
 
3
+ ## 1.16.0-alpha.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed other-thread context filtering falling back to the observational memory record timestamp when thread metadata is missing. ([#15269](https://github.com/mastra-ai/mastra/pull/15269))
8
+
9
+ - Updated dependencies [[`a371ac5`](https://github.com/mastra-ai/mastra/commit/a371ac534aa1bb368a1acf9d8b313378dfdc787e), [`47cee3e`](https://github.com/mastra-ai/mastra/commit/47cee3e137fe39109cf7fffd2a8cf47b76dc702e), [`c80dc16`](https://github.com/mastra-ai/mastra/commit/c80dc16e113e6cc159f510ffde501ad4711b2189), [`47cee3e`](https://github.com/mastra-ai/mastra/commit/47cee3e137fe39109cf7fffd2a8cf47b76dc702e)]:
10
+ - @mastra/core@1.26.0-alpha.12
11
+
3
12
  ## 1.16.0-alpha.3
4
13
 
5
14
  ### Patch Changes
@@ -8026,10 +8026,12 @@ ${grouped}` : grouped;
8026
8026
  async getOtherThreadsContext(resourceId, currentThreadId) {
8027
8027
  const { threads: allThreads } = await this.storage.listThreads({ filter: { resourceId } });
8028
8028
  const messagesByThread = /* @__PURE__ */ new Map();
8029
+ const record = await this.getRecord(currentThreadId, resourceId);
8030
+ const recordLastObservedAt = record?.lastObservedAt;
8029
8031
  for (const thread of allThreads) {
8030
8032
  if (thread.id === currentThreadId) continue;
8031
8033
  const omMetadata = memory.getThreadOMMetadata(thread.metadata);
8032
- const threadLastObservedAt = omMetadata?.lastObservedAt;
8034
+ const threadLastObservedAt = omMetadata?.lastObservedAt ?? recordLastObservedAt;
8033
8035
  const startDate = threadLastObservedAt ? new Date(new Date(threadLastObservedAt).getTime() + 1) : void 0;
8034
8036
  const result = await this.storage.listMessages({
8035
8037
  threadId: thread.id,
@@ -9106,5 +9108,5 @@ exports.stripEphemeralAnchorIds = stripEphemeralAnchorIds;
9106
9108
  exports.stripObservationGroups = stripObservationGroups;
9107
9109
  exports.truncateStringByTokens = truncateStringByTokens;
9108
9110
  exports.wrapInObservationGroup = wrapInObservationGroup;
9109
- //# sourceMappingURL=chunk-3MHY4GB4.cjs.map
9110
- //# sourceMappingURL=chunk-3MHY4GB4.cjs.map
9111
+ //# sourceMappingURL=chunk-HAUWGR76.cjs.map
9112
+ //# sourceMappingURL=chunk-HAUWGR76.cjs.map