@mastra/memory 1.16.0-alpha.3 → 1.16.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.
@@ -8019,10 +8019,12 @@ ${grouped}` : grouped;
8019
8019
  async getOtherThreadsContext(resourceId, currentThreadId) {
8020
8020
  const { threads: allThreads } = await this.storage.listThreads({ filter: { resourceId } });
8021
8021
  const messagesByThread = /* @__PURE__ */ new Map();
8022
+ const record = await this.getRecord(currentThreadId, resourceId);
8023
+ const recordLastObservedAt = record?.lastObservedAt;
8022
8024
  for (const thread of allThreads) {
8023
8025
  if (thread.id === currentThreadId) continue;
8024
8026
  const omMetadata = getThreadOMMetadata(thread.metadata);
8025
- const threadLastObservedAt = omMetadata?.lastObservedAt;
8027
+ const threadLastObservedAt = omMetadata?.lastObservedAt ?? recordLastObservedAt;
8026
8028
  const startDate = threadLastObservedAt ? new Date(new Date(threadLastObservedAt).getTime() + 1) : void 0;
8027
8029
  const result = await this.storage.listMessages({
8028
8030
  threadId: thread.id,
@@ -9074,5 +9076,5 @@ function getObservationsAsOf(activeObservations, asOf) {
9074
9076
  }
9075
9077
 
9076
9078
  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 };
9077
- //# sourceMappingURL=chunk-25XLVCFF.js.map
9078
- //# sourceMappingURL=chunk-25XLVCFF.js.map
9079
+ //# sourceMappingURL=chunk-OOA4C7IX.js.map
9080
+ //# sourceMappingURL=chunk-OOA4C7IX.js.map