@mastra/memory 1.13.0-alpha.0 → 1.13.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,25 @@
|
|
|
1
1
|
# @mastra/memory
|
|
2
2
|
|
|
3
|
+
## 1.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Added `loadUnobservedMessages({ threadId, resourceId? })` as a public method on `ObservationalMemory`. ([#14921](https://github.com/mastra-ai/mastra/pull/14921))
|
|
8
|
+
|
|
9
|
+
This lets external consumers (e.g. the Mastra gateway proxy) load previously-stored messages that haven't been observed yet, without having to reimplement the internal storage query and part-level filtering logic. The method fetches the OM record, queries storage for messages after the `lastObservedAt` cursor, and applies part-level filtering so partially-observed messages only return their unobserved parts.
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
const unobserved = await om.loadUnobservedMessages({
|
|
13
|
+
threadId: 'thread-123',
|
|
14
|
+
resourceId: 'user-456',
|
|
15
|
+
});
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [[`9a43b47`](https://github.com/mastra-ai/mastra/commit/9a43b476465e86c9aca381c2831066b5c33c999a), [`ec5c319`](https://github.com/mastra-ai/mastra/commit/ec5c3197a50d034cb8e9cc494eebfddc684b5d81), [`6517789`](https://github.com/mastra-ai/mastra/commit/65177895b74b5471fe2245c7292f0176d9b3385d), [`13f4327`](https://github.com/mastra-ai/mastra/commit/13f4327f052faebe199cefbe906d33bf90238767), [`9ad6aa6`](https://github.com/mastra-ai/mastra/commit/9ad6aa6dfe858afc6955d1df5f3f78c40bb96b9c), [`2862127`](https://github.com/mastra-ai/mastra/commit/2862127d0a7cbd28523120ad64fea067a95838e6), [`3d16814`](https://github.com/mastra-ai/mastra/commit/3d16814c395931373543728994ff45ac98093074), [`7f498d0`](https://github.com/mastra-ai/mastra/commit/7f498d099eacef64fd43ee412e3bd6f87965a8a6), [`8cf8a67`](https://github.com/mastra-ai/mastra/commit/8cf8a67b061b737cb06d501fb8c1967a98bbf3cb), [`d7827e3`](https://github.com/mastra-ai/mastra/commit/d7827e393937c6cb0c7a744dde4d31538cb542b7)]:
|
|
21
|
+
- @mastra/core@1.21.0
|
|
22
|
+
|
|
3
23
|
## 1.13.0-alpha.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -30,6 +30,8 @@ const processor = new TokenLimiterProcessor({
|
|
|
30
30
|
|
|
31
31
|
**options.countMode** (`'cumulative' | 'part'`): Whether to count tokens from the beginning of the stream or just the current part: 'cumulative' counts all tokens from start, 'part' only counts tokens in current part
|
|
32
32
|
|
|
33
|
+
**options.trimMode** (`'best-fit' | 'contiguous'`): Controls how messages are trimmed when exceeding the token limit: 'best-fit' keeps as many messages as possible (may create gaps), 'contiguous' stops at the first message that does not fit, ensuring a continuous suffix of conversation history
|
|
34
|
+
|
|
33
35
|
## Returns
|
|
34
36
|
|
|
35
37
|
**id** (`string`): Processor identifier set to 'token-limiter'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/memory",
|
|
3
|
-
"version": "1.13.0
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -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-v4": "0.0.
|
|
63
|
-
"@internal/ai-
|
|
64
|
-
"@internal/ai-
|
|
65
|
-
"@internal/
|
|
66
|
-
"@
|
|
67
|
-
"@
|
|
62
|
+
"@internal/ai-sdk-v4": "0.0.25",
|
|
63
|
+
"@internal/ai-v6": "0.0.25",
|
|
64
|
+
"@internal/ai-sdk-v5": "0.0.25",
|
|
65
|
+
"@internal/types-builder": "0.0.53",
|
|
66
|
+
"@internal/lint": "0.0.78",
|
|
67
|
+
"@mastra/core": "1.21.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"@mastra/core": ">=1.4.1-0 <2.0.0-0",
|