@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.
@@ -1696,8 +1696,9 @@ var ResourceScopedObservationStrategy = class extends ObservationStrategy {
1696
1696
  orderBy: { field: "createdAt", direction: "ASC" },
1697
1697
  filter: startDate ? { dateRange: { start: startDate } } : void 0
1698
1698
  });
1699
- if (result.messages.length > 0) {
1700
- this.messagesByThread.set(thread.id, result.messages);
1699
+ const messages = result.messages.filter((msg) => msg.role !== "system");
1700
+ if (messages.length > 0) {
1701
+ this.messagesByThread.set(thread.id, messages);
1701
1702
  }
1702
1703
  }
1703
1704
  if (currentThreadMessages.length > 0) {
@@ -7426,6 +7427,9 @@ Async buffering is enabled by default \u2014 this opt-out is only needed when us
7426
7427
  }
7427
7428
  const result = [];
7428
7429
  for (const msg of allMessages) {
7430
+ if (msg.role === "system") {
7431
+ continue;
7432
+ }
7429
7433
  if (observedMessageIds?.has(msg.id)) {
7430
7434
  continue;
7431
7435
  }
@@ -7736,7 +7740,7 @@ ${suggestedResponse}
7736
7740
  } : void 0
7737
7741
  });
7738
7742
  }
7739
- return result.messages;
7743
+ return result.messages.filter((msg) => msg.role !== "system");
7740
7744
  }
7741
7745
  /**
7742
7746
  * Format unobserved messages from other threads as <unobserved-context> blocks.
@@ -9473,5 +9477,5 @@ exports.stripEphemeralAnchorIds = stripEphemeralAnchorIds;
9473
9477
  exports.stripObservationGroups = stripObservationGroups;
9474
9478
  exports.truncateStringByTokens = truncateStringByTokens;
9475
9479
  exports.wrapInObservationGroup = wrapInObservationGroup;
9476
- //# sourceMappingURL=chunk-ZUUSLGY6.cjs.map
9477
- //# sourceMappingURL=chunk-ZUUSLGY6.cjs.map
9480
+ //# sourceMappingURL=chunk-WNLFJKTX.cjs.map
9481
+ //# sourceMappingURL=chunk-WNLFJKTX.cjs.map