@mastra/memory 1.18.2-alpha.0 → 1.18.2-alpha.1

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,14 @@
1
1
  # @mastra/memory
2
2
 
3
+ ## 1.18.2-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed thread deletion so it also clears thread-scoped observational memory. ([#16628](https://github.com/mastra-ai/mastra/pull/16628))
8
+
9
+ - Updated dependencies [[`816b974`](https://github.com/mastra-ai/mastra/commit/816b974b424e4a1bfae3af30cc41263b6f1c0344), [`816b974`](https://github.com/mastra-ai/mastra/commit/816b974b424e4a1bfae3af30cc41263b6f1c0344), [`b32ba5f`](https://github.com/mastra-ai/mastra/commit/b32ba5fde524b46a4ff1bdf38e30d62a2bb29b04)]:
10
+ - @mastra/core@1.35.0-alpha.2
11
+
3
12
  ## 1.18.2-alpha.0
4
13
 
5
14
  ### 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.18.2-alpha.0"
6
+ version: "1.18.2-alpha.1"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.18.2-alpha.0",
2
+ "version": "1.18.2-alpha.1",
3
3
  "package": "@mastra/memory",
4
4
  "exports": {
5
5
  "ModelByInputTokens": {
package/dist/index.cjs CHANGED
@@ -17420,7 +17420,11 @@ var Memory = class extends memory.MastraMemory {
17420
17420
  }
17421
17421
  async deleteThread(threadId) {
17422
17422
  const memoryStore = await this.getMemoryStore();
17423
+ const thread = await memoryStore.getThreadById({ threadId });
17423
17424
  await memoryStore.deleteThread({ threadId });
17425
+ if (thread?.resourceId && memoryStore.supportsObservationalMemory) {
17426
+ await memoryStore.clearObservationalMemory(threadId, thread.resourceId);
17427
+ }
17424
17428
  if (this.vector) {
17425
17429
  void this.deleteThreadVectors(threadId);
17426
17430
  }