@mastra/server 1.79.0-alpha.2 → 1.79.0-alpha.3

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.
@@ -4637,7 +4637,7 @@ function splitLines(text) {
4637
4637
  return result;
4638
4638
  }
4639
4639
  //#endregion
4640
- //#region ../memory/dist/src-D9Uu93Xu.js
4640
+ //#region ../memory/dist/src-YPRno9w9.js
4641
4641
  var __defProp$3 = Object.defineProperty;
4642
4642
  var __exportAll = (all, no_symbols) => {
4643
4643
  let target = {};
@@ -38505,14 +38505,15 @@ var ObservationalMemoryProcessor = class {
38505
38505
  state.__omObservabilityContext = getOmObservabilityContext(args);
38506
38506
  return this.engine.getTokenCounter().runWithModelContext(state.__omActorModelContext, async () => {
38507
38507
  if (parseMemoryRequestContext(requestContext)?.memoryConfig?.readOnly) return messageList;
38508
+ const persistenceMessageList = messageList.cloneForPersistence();
38508
38509
  const turn = asLiveTurn(state.__omTurn) ?? this.turn;
38509
38510
  const liveTurn = turn && !turn.ended ? turn : void 0;
38510
- if (liveTurn) await liveTurn.end(messageList);
38511
+ if (liveTurn) await liveTurn.end(persistenceMessageList);
38511
38512
  this.turn = void 0;
38512
38513
  state.__omTurn = void 0;
38513
38514
  if (!liveTurn) {
38514
- const newOutput = messageList.get.response.db();
38515
- const messagesToSave = [...messageList.get.input.db(), ...newOutput];
38515
+ const newOutput = persistenceMessageList.get.response.db();
38516
+ const messagesToSave = [...persistenceMessageList.get.input.db(), ...newOutput];
38516
38517
  if (messagesToSave.length > 0 && context.threadId) await this.engine.persistMessages(messagesToSave, context.threadId, context.resourceId);
38517
38518
  }
38518
38519
  return messageList;
@@ -51907,4 +51908,4 @@ const agentBuilderWorkflows = {
51907
51908
  //#endregion
51908
51909
  export { agentBuilderWorkflows };
51909
51910
 
51910
- //# sourceMappingURL=dist-hfFDNas-.js.map
51911
+ //# sourceMappingURL=dist-B07TBQpE.js.map