@mastra/server 1.76.0-alpha.1 → 1.76.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-C_ZgETf8.js
4640
+ //#region ../memory/dist/src-BaiJf9y9.js
4641
4641
  var __defProp$3 = Object.defineProperty;
4642
4642
  var __exportAll = (all, no_symbols) => {
4643
4643
  let target = {};
@@ -32953,17 +32953,17 @@ var ObservationTurn = class {
32953
32953
  * proactively while the agent is idle, rather than waiting for the next turn.
32954
32954
  * The returned record does not wait for that background buffering pass to finish.
32955
32955
  */
32956
- async end() {
32956
+ async end(messageList = this.messageList) {
32957
32957
  if (this._ended) throw new Error("Turn already ended");
32958
32958
  this._ended = true;
32959
- const unsavedInput = this.messageList.get.input.db();
32960
- const unsavedOutput = this.messageList.get.response.db();
32959
+ const unsavedInput = messageList.get.input.db();
32960
+ const unsavedOutput = messageList.get.response.db();
32961
32961
  const unsavedMessages = [...unsavedInput, ...unsavedOutput];
32962
32962
  if (unsavedMessages.length > 0) await this.om.persistMessages(unsavedMessages, this.threadId, this.resourceId);
32963
32963
  const asyncObservationEnabled = this.om.buffering.isAsyncObservationEnabled();
32964
32964
  const bufferOnIdle = this.om.getObservationConfig().bufferOnIdle;
32965
32965
  if (asyncObservationEnabled && bufferOnIdle) {
32966
- const allMessages = getObservableMessages(this.messageList);
32966
+ const allMessages = getObservableMessages(messageList);
32967
32967
  const record = this._record;
32968
32968
  const idleMessages = selectSafeBufferPrefix(this.om.getUnobservedMessages(allMessages, record));
32969
32969
  if (idleMessages.length > 0) this.om.trackBackgroundWork(this.om.buffer({
@@ -37350,7 +37350,7 @@ var ObservationalMemoryProcessor = class {
37350
37350
  if (parseMemoryRequestContext(requestContext)?.memoryConfig?.readOnly) return messageList;
37351
37351
  const turn = asLiveTurn(state.__omTurn) ?? this.turn;
37352
37352
  const liveTurn = turn && !turn.ended ? turn : void 0;
37353
- if (liveTurn) await liveTurn.end();
37353
+ if (liveTurn) await liveTurn.end(messageList);
37354
37354
  this.turn = void 0;
37355
37355
  state.__omTurn = void 0;
37356
37356
  if (!liveTurn) {
@@ -50663,4 +50663,4 @@ const agentBuilderWorkflows = {
50663
50663
  //#endregion
50664
50664
  export { agentBuilderWorkflows };
50665
50665
 
50666
- //# sourceMappingURL=dist-CtNeEn6M.js.map
50666
+ //# sourceMappingURL=dist-BPpBHntB.js.map