@mastra/mongodb 1.18.3 → 1.18.4
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 +18 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +15 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -4
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/knowledge/index.d.ts.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @mastra/mongodb
|
|
2
2
|
|
|
3
|
+
## 1.18.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fixed the store package failing to load when installed with `@mastra/core` older than 1.63.1, and corrected the minimum supported core version. ([#22548](https://github.com/mastra-ai/mastra/pull/22548))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`0a9d29c`](https://github.com/mastra-ai/mastra/commit/0a9d29c0c4dbbaa6afc1c8146cdd41759cbd4002)]:
|
|
10
|
+
- @mastra/core@1.63.2
|
|
11
|
+
|
|
12
|
+
## 1.18.4-alpha.0
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Fixed the store package failing to load when installed with `@mastra/core` older than 1.63.1, and corrected the minimum supported core version. ([#22548](https://github.com/mastra-ai/mastra/pull/22548))
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`0a9d29c`](https://github.com/mastra-ai/mastra/commit/0a9d29c0c4dbbaa6afc1c8146cdd41759cbd4002)]:
|
|
19
|
+
- @mastra/core@1.63.2-alpha.0
|
|
20
|
+
|
|
3
21
|
## 1.18.3
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/docs/SKILL.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -10,7 +10,7 @@ let _mastra_core_agent = require("@mastra/core/agent");
|
|
|
10
10
|
let _mastra_core_evals = require("@mastra/core/evals");
|
|
11
11
|
let _mastra_core_storage_domains_skills = require("@mastra/core/storage/domains/skills");
|
|
12
12
|
//#region package.json
|
|
13
|
-
var version = "1.18.
|
|
13
|
+
var version = "1.18.4";
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/vector/filter.ts
|
|
16
16
|
/**
|
|
@@ -4352,6 +4352,18 @@ var MongoDBExperimentsStorage = class MongoDBExperimentsStorage extends _mastra_
|
|
|
4352
4352
|
};
|
|
4353
4353
|
//#endregion
|
|
4354
4354
|
//#region src/storage/domains/knowledge/index.ts
|
|
4355
|
+
let assertDescriptionWithinBound;
|
|
4356
|
+
async function assertKnowledgeDescriptionWithinBoundCompat(description) {
|
|
4357
|
+
let assertWithinBound = assertDescriptionWithinBound;
|
|
4358
|
+
if (!assertWithinBound) {
|
|
4359
|
+
const resolvedAssert = (await import("@mastra/core/storage")).assertKnowledgeDescriptionWithinBound ?? ((value) => {
|
|
4360
|
+
if (value !== void 0 && value.length > 400) throw new Error("Knowledge node description exceeds the 400 UTF-16 code unit limit");
|
|
4361
|
+
});
|
|
4362
|
+
assertDescriptionWithinBound = resolvedAssert;
|
|
4363
|
+
assertWithinBound = resolvedAssert;
|
|
4364
|
+
}
|
|
4365
|
+
assertWithinBound(description);
|
|
4366
|
+
}
|
|
4355
4367
|
const cloneScope = (scope) => [...scope];
|
|
4356
4368
|
const canonicalName = (name) => name.trim().toLocaleLowerCase();
|
|
4357
4369
|
const nodeReferenceId = (node) => typeof node === "string" ? node : node.id;
|
|
@@ -4485,7 +4497,7 @@ var KnowledgeMongoDB = class KnowledgeMongoDB extends _mastra_core_storage.Knowl
|
|
|
4485
4497
|
});
|
|
4486
4498
|
}
|
|
4487
4499
|
async createNode(input) {
|
|
4488
|
-
|
|
4500
|
+
await assertKnowledgeDescriptionWithinBoundCompat(input.description);
|
|
4489
4501
|
const scope = (0, _mastra_core_storage.canonicalizeKnowledgeScope)(input.scope);
|
|
4490
4502
|
return this.#connector.withTransaction(async (session) => {
|
|
4491
4503
|
const existing = await this.#getNodeByName(input.name, scope, session);
|
|
@@ -4563,7 +4575,7 @@ var KnowledgeMongoDB = class KnowledgeMongoDB extends _mastra_core_storage.Knowl
|
|
|
4563
4575
|
}).limit(input.limit ?? 100).toArray()).map(nodeFromDocument);
|
|
4564
4576
|
}
|
|
4565
4577
|
async updateNode(input) {
|
|
4566
|
-
|
|
4578
|
+
await assertKnowledgeDescriptionWithinBoundCompat(input.description);
|
|
4567
4579
|
return this.#connector.withTransaction(async (session) => {
|
|
4568
4580
|
const existing = await this.#getNode(input.id, session);
|
|
4569
4581
|
if (!existing) throw new _mastra_core_storage.KnowledgeNotFoundError("node", input.id);
|