@mastra/memory 1.15.0-alpha.3 → 1.15.1-alpha.0

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,35 @@
1
1
  # @mastra/memory
2
2
 
3
+ ## 1.15.1-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed gateway model detection to use duck typing instead of instanceof check, preventing potential failures from cross-package module resolution issues. Propagates `gatewayId` through the AISDKV5LanguageModel wrapper so duck-type detection works even when models are re-wrapped. ([#15168](https://github.com/mastra-ai/mastra/pull/15168))
8
+
9
+ - Updated dependencies [[`87df955`](https://github.com/mastra-ai/mastra/commit/87df955c028660c075873fd5d74af28233ce32eb), [`075e91a`](https://github.com/mastra-ai/mastra/commit/075e91a4549baf46ad7a42a6a8ac8dfa78cc09e6)]:
10
+ - @mastra/core@1.24.2-alpha.0
11
+
12
+ ## 1.15.0
13
+
14
+ ### Minor Changes
15
+
16
+ - Updated the recall tool to support more precise message browsing for agents. ([#15116](https://github.com/mastra-ai/mastra/pull/15116))
17
+
18
+ Agents using `recall` can now pass `partType` and `toolName` to narrow message results to specific parts, such as tool calls or tool results for one tool. This change also adds `threadId: "current"` support across recall modes and `anchor: "start" | "end"` for no-cursor message paging, making it easier to inspect recent thread activity and past tool usage.
19
+
20
+ ### Patch Changes
21
+
22
+ - Fixed reflection threshold not respecting per-record overrides set via the PATCH API. Previously, lowering the reflection threshold for a specific record had no effect on the actual reflection trigger — only the default 40k threshold was used. Now per-record overrides are correctly applied in both sync and async reflection paths. ([#15170](https://github.com/mastra-ai/mastra/pull/15170))
23
+
24
+ - Improved observational memory formatting to use part timestamps when rendering dates and times. ([#15121](https://github.com/mastra-ai/mastra/pull/15121))
25
+
26
+ Observer history now follows part-level timing more closely, so the rendered memory context is more accurate when messages contain parts created at different times.
27
+
28
+ - Fixed message history doubling when using Observational Memory with the Mastra gateway. The local ObservationalMemoryProcessor now detects when the agent's model is routed through the Mastra gateway and skips its input/output processing, since the gateway handles OM server-side. ([#15161](https://github.com/mastra-ai/mastra/pull/15161))
29
+
30
+ - Updated dependencies [[`8db7663`](https://github.com/mastra-ai/mastra/commit/8db7663c9a9c735828094c359d2e327fd4f8fba3), [`153e864`](https://github.com/mastra-ai/mastra/commit/153e86476b425db7cd0dc8490050096e92964a38), [`715710d`](https://github.com/mastra-ai/mastra/commit/715710d12fa47cf88e09d41f13843eddc29327b0), [`378c6c4`](https://github.com/mastra-ai/mastra/commit/378c6c4755726e8d8cf83a14809b350b90d46c62), [`9f91fd5`](https://github.com/mastra-ai/mastra/commit/9f91fd538ab2a44f8cc740bcad8e51205f74fbea), [`ba6fa9c`](https://github.com/mastra-ai/mastra/commit/ba6fa9cc0f3e1912c49fd70d4c3bb8c44903ddaa)]:
31
+ - @mastra/core@1.24.0
32
+
3
33
  ## 1.15.0-alpha.3
4
34
 
5
35
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  import { OBSERVATIONAL_MEMORY_DEFAULTS, OBSERVATION_CONTEXT_PROMPT, OBSERVATION_CONTEXT_INSTRUCTIONS, OBSERVATION_RETRIEVAL_INSTRUCTIONS, OBSERVATION_CONTINUATION_HINT } from './chunk-LSJJAJAF.js';
2
2
  import { coreFeatures } from '@mastra/core/features';
3
- import { resolveModelConfig, ModelRouterLanguageModel } from '@mastra/core/llm';
3
+ import { resolveModelConfig } from '@mastra/core/llm';
4
4
  import { getThreadOMMetadata, setThreadOMMetadata, parseMemoryRequestContext } from '@mastra/core/memory';
5
5
  import { MessageHistory } from '@mastra/core/processors';
6
6
  import xxhash from 'xxhash-wasm';
@@ -8624,7 +8624,7 @@ function getOmObservabilityContext(args) {
8624
8624
  }
8625
8625
  var GATEWAY_STATE_KEY = "__isGatewayModel";
8626
8626
  function isMastraGatewayModel(model) {
8627
- return model instanceof ModelRouterLanguageModel && model.gatewayId === "mastra";
8627
+ return typeof model === "object" && model !== null && "gatewayId" in model && model.gatewayId === "mastra";
8628
8628
  }
8629
8629
  var ObservationalMemoryProcessor = class {
8630
8630
  id = "observational-memory";
@@ -8834,5 +8834,5 @@ function getObservationsAsOf(activeObservations, asOf) {
8834
8834
  }
8835
8835
 
8836
8836
  export { ModelByInputTokens, OBSERVER_SYSTEM_PROMPT, ObservationalMemory, ObservationalMemoryProcessor, TokenCounter, buildObserverPrompt, buildObserverSystemPrompt, combineObservationGroupRanges, deriveObservationGroupProvenance, extractCurrentTask, formatMessagesForObserver, formatToolResultForObserver, getObservationsAsOf, hasCurrentTaskSection, injectAnchorIds, optimizeObservationsForContext, parseAnchorId, parseObservationGroups, parseObserverOutput, reconcileObservationGroupsFromReflection, renderObservationGroupsForReflection, resolveToolResultValue, stripEphemeralAnchorIds, stripObservationGroups, truncateStringByTokens, wrapInObservationGroup };
8837
- //# sourceMappingURL=chunk-42AZEBIK.js.map
8838
- //# sourceMappingURL=chunk-42AZEBIK.js.map
8837
+ //# sourceMappingURL=chunk-HAEQMUD4.js.map
8838
+ //# sourceMappingURL=chunk-HAEQMUD4.js.map