@mastra/server 1.26.0-alpha.11 → 1.26.0-alpha.12

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @mastra/server
2
2
 
3
+ ## 1.26.0-alpha.12
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`a371ac5`](https://github.com/mastra-ai/mastra/commit/a371ac534aa1bb368a1acf9d8b313378dfdc787e), [`47cee3e`](https://github.com/mastra-ai/mastra/commit/47cee3e137fe39109cf7fffd2a8cf47b76dc702e), [`c80dc16`](https://github.com/mastra-ai/mastra/commit/c80dc16e113e6cc159f510ffde501ad4711b2189), [`47cee3e`](https://github.com/mastra-ai/mastra/commit/47cee3e137fe39109cf7fffd2a8cf47b76dc702e)]:
8
+ - @mastra/core@1.26.0-alpha.12
9
+
3
10
  ## 1.26.0-alpha.11
4
11
 
5
12
  ### Minor Changes
@@ -1040,7 +1040,7 @@ function imageSize(input) {
1040
1040
  throw new TypeError(`unsupported file type: ${type}`);
1041
1041
  }
1042
1042
 
1043
- // ../memory/dist/chunk-25XLVCFF.js
1043
+ // ../memory/dist/chunk-OOA4C7IX.js
1044
1044
  var OM_DEBUG_LOG = process.env.OM_DEBUG ? join(process.cwd(), "om-debug.log") : null;
1045
1045
  function omDebug(msg) {
1046
1046
  if (!OM_DEBUG_LOG) return;
@@ -9012,10 +9012,12 @@ ${grouped}` : grouped;
9012
9012
  async getOtherThreadsContext(resourceId, currentThreadId) {
9013
9013
  const { threads: allThreads } = await this.storage.listThreads({ filter: { resourceId } });
9014
9014
  const messagesByThread = /* @__PURE__ */ new Map();
9015
+ const record = await this.getRecord(currentThreadId, resourceId);
9016
+ const recordLastObservedAt = record?.lastObservedAt;
9015
9017
  for (const thread of allThreads) {
9016
9018
  if (thread.id === currentThreadId) continue;
9017
9019
  const omMetadata = getThreadOMMetadata(thread.metadata);
9018
- const threadLastObservedAt = omMetadata?.lastObservedAt;
9020
+ const threadLastObservedAt = omMetadata?.lastObservedAt ?? recordLastObservedAt;
9019
9021
  const startDate = threadLastObservedAt ? new Date(new Date(threadLastObservedAt).getTime() + 1) : void 0;
9020
9022
  const result = await this.storage.listMessages({
9021
9023
  threadId: thread.id,
@@ -10065,5 +10067,5 @@ function getObservationsAsOf(activeObservations, asOf) {
10065
10067
  }
10066
10068
 
10067
10069
  export { ModelByInputTokens, OBSERVER_SYSTEM_PROMPT, ObservationalMemory, ObservationalMemoryProcessor, TokenCounter, buildObserverPrompt, buildObserverSystemPrompt, combineObservationGroupRanges, deriveObservationGroupProvenance, e, estimateTokenCount, extractCurrentTask, formatMessagesForObserver, formatToolResultForObserver, getObservationsAsOf, hasCurrentTaskSection, injectAnchorIds, optimizeObservationsForContext, parseAnchorId, parseObservationGroups, parseObserverOutput, reconcileObservationGroupsFromReflection, renderObservationGroupsForReflection, resolveToolResultValue, stripEphemeralAnchorIds, stripObservationGroups, truncateStringByTokens, wrapInObservationGroup };
10068
- //# sourceMappingURL=chunk-RDUHVLT4.js.map
10069
- //# sourceMappingURL=chunk-RDUHVLT4.js.map
10070
+ //# sourceMappingURL=chunk-2Q5WIJZV.js.map
10071
+ //# sourceMappingURL=chunk-2Q5WIJZV.js.map