@mastra/memory 1.9.0-alpha.2 → 1.9.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,46 @@
1
1
  # @mastra/memory
2
2
 
3
+ ## 1.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Added experimental retrieval-mode recall tooling for observational memory. ([#14437](https://github.com/mastra-ai/mastra/pull/14437))
8
+
9
+ When `observationalMemory.retrieval` is enabled with `scope: 'thread'`, observation groups store colon-delimited message ranges (`startId:endId`) pointing back to the raw messages they were derived from. A `recall` tool is registered that lets agents retrieve those source messages via cursor-based pagination.
10
+
11
+ The recall tool supports:
12
+ - **Detail levels**: `detail: 'low'` (default) returns truncated text with part indices; `detail: 'high'` returns full content clamped to one part per call with continuation hints
13
+ - **Part-level fetch**: `partIndex` targets a single message part at full detail
14
+ - **Pagination flags**: `hasNextPage` and `hasPrevPage` in results
15
+ - **Token limiting**: results are capped at a token budget with `truncated` and `tokenOffset` reporting
16
+ - **Smart range detection**: passing a range as a cursor returns a helpful hint explaining how to extract individual IDs
17
+
18
+ - Added opt-in Observational Memory thread titles. ([#14436](https://github.com/mastra-ai/mastra/pull/14436))
19
+
20
+ When enabled, the Observer suggests a short thread title and updates it as the conversation topic changes. Harness consumers can detect these updates via the new `om_thread_title_updated` event.
21
+
22
+ **Example**
23
+
24
+ ```ts
25
+ const memory = new Memory({
26
+ options: {
27
+ observationalMemory: {
28
+ observation: {
29
+ threadTitle: true,
30
+ },
31
+ },
32
+ },
33
+ });
34
+ ```
35
+
36
+ ### Patch Changes
37
+
38
+ - Improved observational memory so completed tasks and answered questions are explicitly tracked and retained, reducing repeated follow-up on resolved topics. ([#14419](https://github.com/mastra-ai/mastra/pull/14419))
39
+
40
+ - Updated dependencies [[`cb611a1`](https://github.com/mastra-ai/mastra/commit/cb611a1e89a4f4cf74c97b57e0c27bb56f2eceb5), [`da93115`](https://github.com/mastra-ai/mastra/commit/da931155c1a9bc63d455d3d86b4ec984db5991fe), [`b71bce1`](https://github.com/mastra-ai/mastra/commit/b71bce144912ed33f76c52a94e594988a649c3e1), [`62d1d3c`](https://github.com/mastra-ai/mastra/commit/62d1d3cc08fe8182e7080237fd975de862ec8c91), [`9e1a3ed`](https://github.com/mastra-ai/mastra/commit/9e1a3ed07cfafb5e8e19a796ce0bee817002d7c0), [`8681ecb`](https://github.com/mastra-ai/mastra/commit/8681ecb86184d5907267000e4576cc442a9a83fc), [`28d0249`](https://github.com/mastra-ai/mastra/commit/28d0249295782277040ad1e0d243e695b7ab1ce4), [`cd7b568`](https://github.com/mastra-ai/mastra/commit/cd7b568fe427b1b4838abe744fa5367a47539db3), [`681ee1c`](https://github.com/mastra-ai/mastra/commit/681ee1c811359efd1b8bebc4bce35b9bb7b14bec), [`bb0f09d`](https://github.com/mastra-ai/mastra/commit/bb0f09dbac58401b36069f483acf5673202db5b5), [`a579f7a`](https://github.com/mastra-ai/mastra/commit/a579f7a31e582674862b5679bc79af7ccf7429b8), [`5f7e9d0`](https://github.com/mastra-ai/mastra/commit/5f7e9d0db664020e1f3d97d7d18c6b0b9d4843d0), [`d7f14c3`](https://github.com/mastra-ai/mastra/commit/d7f14c3285cd253ecdd5f58139b7b6cbdf3678b5), [`0efe12a`](https://github.com/mastra-ai/mastra/commit/0efe12a5f008a939a1aac71699486ba40138054e)]:
41
+ - @mastra/core@1.15.0
42
+ - @mastra/schema-compat@1.2.6
43
+
3
44
  ## 1.9.0-alpha.2
4
45
 
5
46
  ### Minor 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.9.0-alpha.2"
6
+ version: "1.9.0"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.9.0-alpha.2",
2
+ "version": "1.9.0",
3
3
  "package": "@mastra/memory",
4
4
  "exports": {
5
5
  "OBSERVATIONAL_MEMORY_DEFAULTS": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/memory",
3
- "version": "1.9.0-alpha.2",
3
+ "version": "1.9.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -43,7 +43,7 @@
43
43
  "probe-image-size": "^7.2.3",
44
44
  "tokenx": "^1.3.0",
45
45
  "xxhash-wasm": "^1.1.0",
46
- "@mastra/schema-compat": "1.2.6-alpha.1"
46
+ "@mastra/schema-compat": "1.2.6"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@ai-sdk/openai": "^1.3.24",
@@ -59,12 +59,12 @@
59
59
  "typescript-eslint": "^8.57.0",
60
60
  "vitest": "4.0.18",
61
61
  "zod": "^4.3.6",
62
- "@internal/ai-sdk-v5": "0.0.19",
63
- "@internal/ai-v6": "0.0.19",
64
- "@internal/lint": "0.0.72",
65
- "@internal/ai-sdk-v4": "0.0.19",
66
- "@internal/types-builder": "0.0.47",
67
- "@mastra/core": "1.15.0-alpha.4"
62
+ "@internal/ai-sdk-v4": "0.0.20",
63
+ "@internal/ai-sdk-v5": "0.0.20",
64
+ "@internal/ai-v6": "0.0.20",
65
+ "@internal/types-builder": "0.0.48",
66
+ "@internal/lint": "0.0.73",
67
+ "@mastra/core": "1.15.0"
68
68
  },
69
69
  "peerDependencies": {
70
70
  "@mastra/core": ">=1.4.1-0 <2.0.0-0",