@mastra/memory 1.22.1-alpha.1 → 1.22.2-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 +16 -0
- package/dist/{chunk-YWAAIUB6.cjs → chunk-3JX4RMDN.cjs} +14 -13
- package/dist/chunk-3JX4RMDN.cjs.map +1 -0
- package/dist/{chunk-2NSPHF6Q.js → chunk-TB6SV7QK.js} +14 -13
- package/dist/chunk-TB6SV7QK.js.map +1 -0
- package/dist/docs/SKILL.md +3 -3
- package/dist/docs/assets/SOURCE_MAP.json +44 -44
- package/dist/docs/references/docs-agents-agent-approval.md +25 -0
- package/dist/docs/references/docs-agents-supervisor-agents.md +3 -3
- package/dist/docs/references/{docs-agents-background-tasks.md → docs-long-running-agents-background-tasks.md} +2 -2
- package/dist/docs/references/{docs-agents-goals.md → docs-long-running-agents-goals.md} +1 -1
- package/dist/docs/references/docs-memory-working-memory.md +1 -1
- package/dist/docs/references/reference-memory-cloneThread.md +35 -4
- package/dist/docs/references/reference-memory-memory-class.md +5 -5
- package/dist/docs/references/reference-memory-observational-memory.md +43 -43
- package/dist/docs/references/reference-storage-dynamodb.md +1 -1
- package/dist/docs/references/reference-storage-libsql.md +1 -1
- package/dist/docs/references/reference-storage-postgresql.md +2 -2
- package/dist/docs/references/reference-storage-redis.md +2 -2
- package/dist/docs/references/reference-vectors-mongodb.md +1 -1
- package/dist/docs/references/reference-vectors-pg.md +1 -1
- package/dist/index.cjs +13 -13
- package/dist/index.js +1 -1
- package/dist/{observational-memory-QL6BKIQX.js → observational-memory-NNGAOKRQ.js} +3 -3
- package/dist/{observational-memory-QL6BKIQX.js.map → observational-memory-NNGAOKRQ.js.map} +1 -1
- package/dist/{observational-memory-CZ22AU3H.cjs → observational-memory-TEIGXE56.cjs} +28 -28
- package/dist/{observational-memory-CZ22AU3H.cjs.map → observational-memory-TEIGXE56.cjs.map} +1 -1
- package/dist/processors/index.cjs +26 -26
- package/dist/processors/index.js +1 -1
- package/dist/tools/om-tools.d.ts.map +1 -1
- package/package.json +11 -11
- package/dist/chunk-2NSPHF6Q.js.map +0 -1
- package/dist/chunk-YWAAIUB6.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @mastra/memory
|
|
2
2
|
|
|
3
|
+
## 1.22.2-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fixed the recall tool throwing "Either cursor or threadId is required" when browsing messages with thread-scoped retrieval. In thread scope, the tool now falls back to the current thread when no cursor is given, and error messages explain how to proceed when no thread context can be resolved. ([#19065](https://github.com/mastra-ai/mastra/pull/19065))
|
|
8
|
+
|
|
9
|
+
## 1.22.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Fixed observational memory token counting when recalled messages include a declined tool approval. Memory processing no longer errors on those messages. ([#18583](https://github.com/mastra-ai/mastra/pull/18583))
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [[`700619b`](https://github.com/mastra-ai/mastra/commit/700619b61d572e592cbaaf758121d168844ca4d2), [`0f69865`](https://github.com/mastra-ai/mastra/commit/0f69865aced225d98eac812e22699dc445ee18cb), [`9250acd`](https://github.com/mastra-ai/mastra/commit/9250acd1357f0f1f33d0dcca16f9655084c58eca), [`0c3d4bc`](https://github.com/mastra-ai/mastra/commit/0c3d4bcae13ea3699d379403e6f350d5cf4efe9f), [`cc440a3`](https://github.com/mastra-ai/mastra/commit/cc440a39400d8ce06655462b26c1666a1b3d4320), [`6a61846`](https://github.com/mastra-ai/mastra/commit/6a61846eeda29fb714549b70f1bee2bf6b141c44), [`215f9b0`](https://github.com/mastra-ai/mastra/commit/215f9b0f3f3f6fc165edad360582dd4d3d7ea748), [`17369b2`](https://github.com/mastra-ai/mastra/commit/17369b25250561e9ed994ae509be1d15bfb33bcb), [`c64c2a8`](https://github.com/mastra-ai/mastra/commit/c64c2a8503a50252f9ca6b8e8c54cadee31b92a2), [`bcae929`](https://github.com/mastra-ai/mastra/commit/bcae929945cbf265bd9f327cc715ecafa072b5b9), [`ea6327b`](https://github.com/mastra-ai/mastra/commit/ea6327ba2d63ca647804bc97b347e03a58617162), [`3439fa8`](https://github.com/mastra-ai/mastra/commit/3439fa836ecfcaa257b40c20b30ac2a8be22e9ea), [`85107f2`](https://github.com/mastra-ai/mastra/commit/85107f2758b527147fccbedff962961927c2d3b8), [`b33822e`](https://github.com/mastra-ai/mastra/commit/b33822e8d470884954b02f7b0745407ee4ef74b1), [`06e2680`](https://github.com/mastra-ai/mastra/commit/06e26806b51d2cbd858afdc66daa2b86ff3ba64a), [`1042cb4`](https://github.com/mastra-ai/mastra/commit/1042cb4da227c0a1315a6362262be3058866c5f8), [`06ff9e0`](https://github.com/mastra-ai/mastra/commit/06ff9e0befd1d642ab87ff749285ee4091205c7e), [`d5c11e3`](https://github.com/mastra-ai/mastra/commit/d5c11e3ba5045969caa7272a7bd1fd141c93ab6c), [`7f5e1ff`](https://github.com/mastra-ai/mastra/commit/7f5e1ff695a92f672bb3976363925d1e9136b54a), [`ff80671`](https://github.com/mastra-ai/mastra/commit/ff8067185e208b27198b4e5b71803013175c3643), [`b8375c1`](https://github.com/mastra-ai/mastra/commit/b8375c1f8fe905df8ae2ae9a893bb365f17aec4e), [`dab1257`](https://github.com/mastra-ai/mastra/commit/dab1257b64e4ed576dc5038bb7a3f7072338bc9f), [`1240f05`](https://github.com/mastra-ai/mastra/commit/1240f051c8e5371f1c014448bf37b1a1b9a05e47), [`705ff39`](https://github.com/mastra-ai/mastra/commit/705ff3969e57214ff2fdaf3815d751dd558886ed), [`e6fbd5b`](https://github.com/mastra-ai/mastra/commit/e6fbd5bfdc28e92c0c0433f29aa1bc152d3430f6), [`215f9b0`](https://github.com/mastra-ai/mastra/commit/215f9b0f3f3f6fc165edad360582dd4d3d7ea748), [`24c10d3`](https://github.com/mastra-ai/mastra/commit/24c10d333e6649ac06075903aeeee13a933db3b3), [`24c10d3`](https://github.com/mastra-ai/mastra/commit/24c10d333e6649ac06075903aeeee13a933db3b3), [`24c10d3`](https://github.com/mastra-ai/mastra/commit/24c10d333e6649ac06075903aeeee13a933db3b3), [`6f2026c`](https://github.com/mastra-ai/mastra/commit/6f2026cdf114ff1e21e49133ca774ec7d5085059), [`24c10d3`](https://github.com/mastra-ai/mastra/commit/24c10d333e6649ac06075903aeeee13a933db3b3), [`215f9b0`](https://github.com/mastra-ai/mastra/commit/215f9b0f3f3f6fc165edad360582dd4d3d7ea748), [`215f9b0`](https://github.com/mastra-ai/mastra/commit/215f9b0f3f3f6fc165edad360582dd4d3d7ea748), [`003f35d`](https://github.com/mastra-ai/mastra/commit/003f35d19e07b23b4bacc591c8bc0c59b42124ae), [`f890eda`](https://github.com/mastra-ai/mastra/commit/f890eda2c8a2ae83d9b30bc6d85842f93b6c266b), [`1340fb7`](https://github.com/mastra-ai/mastra/commit/1340fb76262a3ca062130aa71859f07257a0a5a4)]:
|
|
16
|
+
- @mastra/core@1.49.0
|
|
17
|
+
- @mastra/schema-compat@1.3.3
|
|
18
|
+
|
|
3
19
|
## 1.22.1-alpha.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -21667,23 +21667,24 @@ var recallTool = (_memoryConfig, options) => {
|
|
|
21667
21667
|
after
|
|
21668
21668
|
});
|
|
21669
21669
|
}
|
|
21670
|
-
const usedDefaultThreadId =
|
|
21671
|
-
const defaultThreadNote = usedDefaultThreadId ? `threadId wasn't passed so used default ${currentThreadId}.
|
|
21670
|
+
const usedDefaultThreadId = !explicitThreadId && !cursor && Boolean(currentThreadId);
|
|
21671
|
+
const defaultThreadNote = usedDefaultThreadId && isResourceScope ? `threadId wasn't passed so used default ${currentThreadId}.
|
|
21672
21672
|
|
|
21673
21673
|
` : "";
|
|
21674
|
-
const
|
|
21675
|
-
const
|
|
21676
|
-
const hasExplicitThreadId = typeof resolvedThreadId === "string" && resolvedThreadId.length > 0;
|
|
21674
|
+
const resolvedThreadId = resolvedExplicitThreadId || (usedDefaultThreadId ? currentThreadId : void 0);
|
|
21675
|
+
const hasResolvedThreadId = typeof resolvedThreadId === "string" && resolvedThreadId.length > 0;
|
|
21677
21676
|
const hasCursor = typeof cursor === "string" && cursor.length > 0;
|
|
21678
|
-
if (!
|
|
21679
|
-
throw new Error(
|
|
21677
|
+
if (!hasResolvedThreadId && !hasCursor) {
|
|
21678
|
+
throw new Error(
|
|
21679
|
+
isResourceScope ? 'No active thread context and no cursor or threadId was provided for mode="messages". Pass a threadId (use mode="threads" to discover thread IDs) or a message ID as cursor.' : 'No active thread context for mode="messages". This tool is limited to the current thread and no current thread could be resolved.'
|
|
21680
|
+
);
|
|
21680
21681
|
}
|
|
21681
21682
|
let targetThreadId;
|
|
21682
21683
|
let threadScope;
|
|
21683
21684
|
if (!isResourceScope) {
|
|
21684
21685
|
targetThreadId = currentThreadId;
|
|
21685
21686
|
threadScope = currentThreadId || void 0;
|
|
21686
|
-
} else if (
|
|
21687
|
+
} else if (hasResolvedThreadId) {
|
|
21687
21688
|
if (!resourceId) {
|
|
21688
21689
|
throw new Error("Resource ID is required for recall");
|
|
21689
21690
|
}
|
|
@@ -21700,7 +21701,7 @@ var recallTool = (_memoryConfig, options) => {
|
|
|
21700
21701
|
targetThreadId = currentThreadId;
|
|
21701
21702
|
threadScope = currentThreadId || void 0;
|
|
21702
21703
|
}
|
|
21703
|
-
if (hasCursor && !
|
|
21704
|
+
if (hasCursor && !hasResolvedThreadId && !currentThreadId) {
|
|
21704
21705
|
if (!isResourceScope) {
|
|
21705
21706
|
throw new Error("Current thread is required when browsing by cursor");
|
|
21706
21707
|
}
|
|
@@ -23133,7 +23134,7 @@ ${workingMemory}`;
|
|
|
23133
23134
|
"Observational memory requires @mastra/core support for request-response-id-rotation. Please bump @mastra/core to a newer version."
|
|
23134
23135
|
);
|
|
23135
23136
|
}
|
|
23136
|
-
const { ObservationalMemory: OMClass } = await import('./observational-memory-
|
|
23137
|
+
const { ObservationalMemory: OMClass } = await import('./observational-memory-TEIGXE56.cjs');
|
|
23137
23138
|
const onIndexObservations = this.hasRetrievalSearch(omConfig.retrieval) ? async (observation) => {
|
|
23138
23139
|
await this.indexObservation(observation);
|
|
23139
23140
|
} : void 0;
|
|
@@ -24089,7 +24090,7 @@ Notes:
|
|
|
24089
24090
|
if (!effectiveConfig) return null;
|
|
24090
24091
|
const engine = await this.omEngine;
|
|
24091
24092
|
if (!engine) return null;
|
|
24092
|
-
const { ObservationalMemoryProcessor: ObservationalMemoryProcessor2 } = await import('./observational-memory-
|
|
24093
|
+
const { ObservationalMemoryProcessor: ObservationalMemoryProcessor2 } = await import('./observational-memory-TEIGXE56.cjs');
|
|
24093
24094
|
return new ObservationalMemoryProcessor2(engine, this, {
|
|
24094
24095
|
temporalMarkers: effectiveConfig.temporalMarkers
|
|
24095
24096
|
});
|
|
@@ -30470,5 +30471,5 @@ exports.renderObservationGroupsForReflection = renderObservationGroupsForReflect
|
|
|
30470
30471
|
exports.stripEphemeralAnchorIds = stripEphemeralAnchorIds;
|
|
30471
30472
|
exports.stripObservationGroups = stripObservationGroups;
|
|
30472
30473
|
exports.wrapInObservationGroup = wrapInObservationGroup;
|
|
30473
|
-
//# sourceMappingURL=chunk-
|
|
30474
|
-
//# sourceMappingURL=chunk-
|
|
30474
|
+
//# sourceMappingURL=chunk-3JX4RMDN.cjs.map
|
|
30475
|
+
//# sourceMappingURL=chunk-3JX4RMDN.cjs.map
|