@mastra/memory 1.12.0 → 1.12.1-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 +11 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +11 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -8
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @mastra/memory
|
|
2
2
|
|
|
3
|
+
## 1.12.1-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Standardized all logger calls across the codebase to use static string messages with structured data objects. Dynamic values are now passed as key-value pairs in the second argument instead of being interpolated into template literal strings. This improves log filterability and searchability in observability storage. ([#14899](https://github.com/mastra-ai/mastra/pull/14899))
|
|
8
|
+
|
|
9
|
+
Removed ~150 redundant or noisy log calls including duplicate error logging after trackException and verbose in-memory storage CRUD traces.
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`cbeec24`](https://github.com/mastra-ai/mastra/commit/cbeec24b3c97a1a296e7e461e66cc7f7d215dc50), [`cee146b`](https://github.com/mastra-ai/mastra/commit/cee146b5d858212e1df2b2730fc36d3ceda0e08d), [`aa0aeff`](https://github.com/mastra-ai/mastra/commit/aa0aeffa11efbef5e219fbd97bf43d263cfe3afe), [`2bcec65`](https://github.com/mastra-ai/mastra/commit/2bcec652d62b07eab15e9eb9822f70184526eede), [`ad9bded`](https://github.com/mastra-ai/mastra/commit/ad9bdedf86a824801f49928a8d40f6e31ff5450f), [`cbeec24`](https://github.com/mastra-ai/mastra/commit/cbeec24b3c97a1a296e7e461e66cc7f7d215dc50), [`208c0bb`](https://github.com/mastra-ai/mastra/commit/208c0bbacbf5a1da6318f2a0e0c544390e542ddc), [`f566ee7`](https://github.com/mastra-ai/mastra/commit/f566ee7d53a3da33a01103e2a5ac2070ddefe6b0)]:
|
|
12
|
+
- @mastra/core@1.20.0-alpha.0
|
|
13
|
+
|
|
3
14
|
## 1.12.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
package/dist/docs/SKILL.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -16630,7 +16630,7 @@ var Memory = class extends memory.MastraMemory {
|
|
|
16630
16630
|
const shouldGetNewestAndReverse = !orderBy && perPage !== false;
|
|
16631
16631
|
const effectiveOrderBy = shouldGetNewestAndReverse ? { field: "createdAt", direction: "DESC" } : orderBy;
|
|
16632
16632
|
const vectorResults = [];
|
|
16633
|
-
this.logger.debug(
|
|
16633
|
+
this.logger.debug("Memory recall", {
|
|
16634
16634
|
threadId,
|
|
16635
16635
|
perPage,
|
|
16636
16636
|
page,
|
|
@@ -16806,12 +16806,12 @@ var Memory = class extends memory.MastraMemory {
|
|
|
16806
16806
|
filter: { thread_id: threadId }
|
|
16807
16807
|
});
|
|
16808
16808
|
} catch {
|
|
16809
|
-
this.logger.debug(
|
|
16809
|
+
this.logger.debug("Failed to delete vectors for thread, skipping", { threadId, indexName });
|
|
16810
16810
|
}
|
|
16811
16811
|
})
|
|
16812
16812
|
);
|
|
16813
16813
|
} catch {
|
|
16814
|
-
this.logger.debug(
|
|
16814
|
+
this.logger.debug("Failed to clean up vectors for thread", { threadId });
|
|
16815
16815
|
}
|
|
16816
16816
|
}
|
|
16817
16817
|
async updateWorkingMemory({
|
|
@@ -16989,7 +16989,10 @@ ${workingMemory}`;
|
|
|
16989
16989
|
async embedMessageContent(content) {
|
|
16990
16990
|
const key = (await this.hasher).h32(content);
|
|
16991
16991
|
const cached = this.embeddingCache.get(key);
|
|
16992
|
-
if (cached)
|
|
16992
|
+
if (cached) {
|
|
16993
|
+
this.logger.debug("Embedding cache hit", { contentHash: key, chunks: cached.chunks.length });
|
|
16994
|
+
return cached;
|
|
16995
|
+
}
|
|
16993
16996
|
const chunks = this.chunkText(content);
|
|
16994
16997
|
if (typeof this.embedder === `undefined`) {
|
|
16995
16998
|
throw new Error(`Tried to embed message content but this Memory instance doesn't have an attached embedder.`);
|
|
@@ -17765,13 +17768,13 @@ Notes:
|
|
|
17765
17768
|
filter: { message_id: { $in: batch } }
|
|
17766
17769
|
});
|
|
17767
17770
|
} catch {
|
|
17768
|
-
this.logger.debug(
|
|
17771
|
+
this.logger.debug("Failed to delete vector batch, skipping", { indexName, batchOffset: i });
|
|
17769
17772
|
}
|
|
17770
17773
|
}
|
|
17771
17774
|
})
|
|
17772
17775
|
);
|
|
17773
17776
|
} catch {
|
|
17774
|
-
this.logger.debug(
|
|
17777
|
+
this.logger.debug("Failed to clean up old vectors during message update");
|
|
17775
17778
|
}
|
|
17776
17779
|
}
|
|
17777
17780
|
if (embeddingData.length > 0 && dimension !== void 0) {
|
|
@@ -17845,13 +17848,13 @@ Notes:
|
|
|
17845
17848
|
filter: { message_id: { $in: batch } }
|
|
17846
17849
|
});
|
|
17847
17850
|
} catch {
|
|
17848
|
-
this.logger.debug(
|
|
17851
|
+
this.logger.debug("Failed to delete vector batch, skipping", { indexName, batchOffset: i });
|
|
17849
17852
|
}
|
|
17850
17853
|
}
|
|
17851
17854
|
})
|
|
17852
17855
|
);
|
|
17853
17856
|
} catch {
|
|
17854
|
-
this.logger.debug(
|
|
17857
|
+
this.logger.debug("Failed to clean up vectors for deleted messages");
|
|
17855
17858
|
}
|
|
17856
17859
|
}
|
|
17857
17860
|
/**
|