@mastra/server 1.77.0-alpha.1 → 1.77.0-alpha.2

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-DjDnBIS0.js
4640
+ //#region ../memory/dist/src-CYkACM_1.js
4641
4641
  var __defProp$3 = Object.defineProperty;
4642
4642
  var __exportAll = (all, no_symbols) => {
4643
4643
  let target = {};
@@ -28881,10 +28881,10 @@ function filterObservedMessages(opts) {
28881
28881
  const msg = allMessages[i];
28882
28882
  if (msg?.id && msg.id !== "om-continuation" && !preserveMessageIds.has(msg.id) && !hasPendingToolResultPair(msg, pendingToolResultIds)) messagesToRemove.push(msg.id);
28883
28883
  }
28884
- if (messagesToRemove.length > 0) messageList.removeByIds(messagesToRemove);
28884
+ if (messagesToRemove.length > 0) messageList.removeByIds(messagesToRemove, { pruned: true });
28885
28885
  const unobserved = getUnobservedPartsPreservingToolCallPairs(markerMessage);
28886
28886
  if (unobserved.length === 0) {
28887
- if (markerMessage.id) messageList.removeByIds([markerMessage.id]);
28887
+ if (markerMessage.id) messageList.removeByIds([markerMessage.id], { pruned: true });
28888
28888
  } else if (unobserved.length < (markerMessage.content?.parts?.length ?? 0)) markerMessage.content.parts = unobserved;
28889
28889
  } else if (record) {
28890
28890
  const pendingToolResultIds = collectPendingToolResultIds(allMessages, observedIds);
@@ -28911,7 +28911,7 @@ function filterObservedMessages(opts) {
28911
28911
  }
28912
28912
  }
28913
28913
  }
28914
- if (messagesToRemove.length > 0) messageList.removeByIds(messagesToRemove);
28914
+ if (messagesToRemove.length > 0) messageList.removeByIds(messagesToRemove, { pruned: true });
28915
28915
  }
28916
28916
  }
28917
28917
  function getBufferedChunks(record) {
@@ -33287,7 +33287,7 @@ var ObservationStep = class {
33287
33287
  this.turn.setRecord(activation.record);
33288
33288
  if (activation.activated) {
33289
33289
  activated = true;
33290
- if (activation.activatedMessageIds?.length) messageList.removeByIds(activation.activatedMessageIds);
33290
+ if (activation.activatedMessageIds?.length) messageList.removeByIds(activation.activatedMessageIds, { pruned: true });
33291
33291
  await om.resetBufferingState({
33292
33292
  threadId,
33293
33293
  resourceId,
@@ -36872,7 +36872,7 @@ ${formattedMessages}
36872
36872
  preserveMessageIds
36873
36873
  });
36874
36874
  if (messageList) {
36875
- if (idsToRemoveList.length > 0) messageList.removeByIds(idsToRemoveList);
36875
+ if (idsToRemoveList.length > 0) messageList.removeByIds(idsToRemoveList, { pruned: true });
36876
36876
  return messageList.get.all.db();
36877
36877
  }
36878
36878
  this.removeIdsFromArray(allMsgs, idsToRemoveList);
@@ -36897,7 +36897,7 @@ ${formattedMessages}
36897
36897
  } else if (unobservedParts.length < (markerMsg.content?.parts?.length ?? 0)) markerMsg.content.parts = unobservedParts;
36898
36898
  }
36899
36899
  if (messageList) {
36900
- if (idsToRemove.length > 0) messageList.removeByIds(idsToRemove);
36900
+ if (idsToRemove.length > 0) messageList.removeByIds(idsToRemove, { pruned: true });
36901
36901
  if (messagesToSave.length > 0) await this.persistMessages(messagesToSave, threadId, resourceId);
36902
36902
  omDebug(`[OM:cleanupMarker] removed ${idsToRemove.length} messages, saved ${messagesToSave.length}`);
36903
36903
  return messageList.get.all.db();
@@ -51755,4 +51755,4 @@ const agentBuilderWorkflows = {
51755
51755
  //#endregion
51756
51756
  export { agentBuilderWorkflows };
51757
51757
 
51758
- //# sourceMappingURL=dist-B6B4Cxda.js.map
51758
+ //# sourceMappingURL=dist-C6Y74AMV.js.map