@mastra/memory 1.20.2-alpha.0 → 1.20.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @mastra/memory
2
2
 
3
+ ## 1.20.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Improved agent message, stream, and observational-memory type handling across the client SDKs and playground UI. ([#17208](https://github.com/mastra-ai/mastra/pull/17208))
8
+
9
+ - Added experimental `workingMemory.useStateSignals` opt-in. When set to `true`, working memory is delivered to the model as a `state` signal (via the new state-signals API) instead of being folded into the system message. `Memory` auto-attaches a `WorkingMemoryStateProcessor` that emits a signal with `stateId: 'working-memory'` and dedups via `cacheKey`. Subsequent turns emit unified-diff deltas against the prior snapshot when the diff is smaller than the snapshot (markdown mode only); schema mode and the fallback path always emit a full snapshot. The working-memory tool is registered as `setWorkingMemory` instead of `updateWorkingMemory` under this opt-in so legacy persistence/prompt strip filters naturally bypass it. The default (`false`) preserves the existing system-message behavior. `useStateSignals` is not supported with template working memory `version: 'vnext'`. ([#17497](https://github.com/mastra-ai/mastra/pull/17497))
10
+
11
+ ```ts
12
+ import { Memory } from '@mastra/memory';
13
+
14
+ const memory = new Memory({
15
+ options: {
16
+ workingMemory: {
17
+ enabled: true,
18
+ useStateSignals: true,
19
+ },
20
+ },
21
+ });
22
+ ```
23
+
24
+ - Updated dependencies [[`c973db4`](https://github.com/mastra-ai/mastra/commit/c973db428df1b564ff0c35d4b2a90e8f4f1e13fd), [`552285e`](https://github.com/mastra-ai/mastra/commit/552285e5af43cfc680a0972032cab8de8776c6a0), [`77e686c`](https://github.com/mastra-ai/mastra/commit/77e686c264e493e99ae5024e4dfe3ea5d5a09718), [`ece8dba`](https://github.com/mastra-ai/mastra/commit/ece8dba7ec1a5089eee8c33167cd762bfa91e509), [`e751af2`](https://github.com/mastra-ai/mastra/commit/e751af219433fbf4c7035b2d771b4c9ec8813b05), [`e2a8380`](https://github.com/mastra-ai/mastra/commit/e2a838017a7657850404c1e94c70d79ffdc6f14a), [`be3f1cd`](https://github.com/mastra-ai/mastra/commit/be3f1cd81f0e2a649e8eac15a024d542d814aef8), [`a34d9db`](https://github.com/mastra-ai/mastra/commit/a34d9dbc39fedb722f271318e9355ecee70489ab)]:
25
+ - @mastra/core@1.39.0
26
+
3
27
  ## 1.20.2-alpha.0
4
28
 
5
29
  ### Patch Changes
@@ -3,7 +3,7 @@ name: mastra-memory
3
3
  description: Documentation for @mastra/memory. Use when working with @mastra/memory APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/memory"
6
- version: "1.20.2-alpha.0"
6
+ version: "1.20.2"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.20.2-alpha.0",
2
+ "version": "1.20.2",
3
3
  "package": "@mastra/memory",
4
4
  "exports": {
5
5
  "ModelByInputTokens": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/memory",
3
- "version": "1.20.2-alpha.0",
3
+ "version": "1.20.2",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -60,12 +60,12 @@
60
60
  "typescript-eslint": "^8.57.0",
61
61
  "vitest": "4.1.5",
62
62
  "zod": "^4.4.3",
63
- "@internal/ai-sdk-v4": "0.0.47",
64
- "@internal/ai-sdk-v5": "0.0.47",
65
- "@internal/ai-v6": "0.0.47",
66
- "@internal/lint": "0.0.100",
67
- "@internal/types-builder": "0.0.75",
68
- "@mastra/core": "1.39.0-alpha.0"
63
+ "@internal/ai-sdk-v4": "0.0.48",
64
+ "@internal/ai-v6": "0.0.48",
65
+ "@internal/ai-sdk-v5": "0.0.48",
66
+ "@internal/lint": "0.0.101",
67
+ "@mastra/core": "1.39.0",
68
+ "@internal/types-builder": "0.0.76"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "@mastra/core": ">=1.4.1-0 <2.0.0-0"