@mastra/memory 1.17.4-alpha.0 → 1.17.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.
@@ -9177,6 +9177,15 @@ var ObservationalMemoryProcessor = class {
9177
9177
  if (readOnly) {
9178
9178
  return messageList;
9179
9179
  }
9180
+ const activeTurn = state.__omTurn ?? this.turn;
9181
+ if (activeTurn && activeTurn.messageList !== messageList) {
9182
+ await activeTurn.end().catch(() => {
9183
+ });
9184
+ if (this.turn === activeTurn) {
9185
+ this.turn = void 0;
9186
+ }
9187
+ state.__omTurn = void 0;
9188
+ }
9180
9189
  if (!this.turn || !state.__omTurn) {
9181
9190
  if (this.turn && !state.__omTurn) {
9182
9191
  await this.turn.end().catch(() => {
@@ -9366,5 +9375,5 @@ exports.stripEphemeralAnchorIds = stripEphemeralAnchorIds;
9366
9375
  exports.stripObservationGroups = stripObservationGroups;
9367
9376
  exports.truncateStringByTokens = truncateStringByTokens;
9368
9377
  exports.wrapInObservationGroup = wrapInObservationGroup;
9369
- //# sourceMappingURL=chunk-BGVQRC2E.cjs.map
9370
- //# sourceMappingURL=chunk-BGVQRC2E.cjs.map
9378
+ //# sourceMappingURL=chunk-M6QU3KKP.cjs.map
9379
+ //# sourceMappingURL=chunk-M6QU3KKP.cjs.map