@mastra/pg 1.22.1 → 1.22.2
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 +14 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -3
- 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/pg
|
|
2
2
|
|
|
3
|
+
## 1.22.2
|
|
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.22.2-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.22.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/docs/SKILL.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -7839,6 +7839,18 @@ var FavoritesPG = class FavoritesPG extends _mastra_core_storage.FavoritesStorag
|
|
|
7839
7839
|
};
|
|
7840
7840
|
//#endregion
|
|
7841
7841
|
//#region src/storage/domains/knowledge/index.ts
|
|
7842
|
+
let assertDescriptionWithinBound;
|
|
7843
|
+
async function assertKnowledgeDescriptionWithinBoundCompat(description) {
|
|
7844
|
+
let assertWithinBound = assertDescriptionWithinBound;
|
|
7845
|
+
if (!assertWithinBound) {
|
|
7846
|
+
const resolvedAssert = (await import("@mastra/core/storage")).assertKnowledgeDescriptionWithinBound ?? ((value) => {
|
|
7847
|
+
if (value !== void 0 && value.length > 400) throw new Error("Knowledge node description exceeds the 400 UTF-16 code unit limit");
|
|
7848
|
+
});
|
|
7849
|
+
assertDescriptionWithinBound = resolvedAssert;
|
|
7850
|
+
assertWithinBound = resolvedAssert;
|
|
7851
|
+
}
|
|
7852
|
+
assertWithinBound(description);
|
|
7853
|
+
}
|
|
7842
7854
|
const camelCaseColumns = [
|
|
7843
7855
|
"canonicalName",
|
|
7844
7856
|
"scopeKey",
|
|
@@ -8150,7 +8162,7 @@ var KnowledgePG = class extends _mastra_core_storage.KnowledgeStorage {
|
|
|
8150
8162
|
});
|
|
8151
8163
|
}
|
|
8152
8164
|
async createNode(input) {
|
|
8153
|
-
|
|
8165
|
+
await assertKnowledgeDescriptionWithinBoundCompat(input.description);
|
|
8154
8166
|
const scope = (0, _mastra_core_storage.canonicalizeKnowledgeScope)(input.scope);
|
|
8155
8167
|
return this.#transaction(async (tx) => {
|
|
8156
8168
|
const existing = await this.#getNodeByName(tx, input.name, scope);
|
|
@@ -8238,7 +8250,7 @@ var KnowledgePG = class extends _mastra_core_storage.KnowledgeStorage {
|
|
|
8238
8250
|
})).rows.map(parseNode);
|
|
8239
8251
|
}
|
|
8240
8252
|
async updateNode(input) {
|
|
8241
|
-
|
|
8253
|
+
await assertKnowledgeDescriptionWithinBoundCompat(input.description);
|
|
8242
8254
|
return this.#transaction(async (tx) => {
|
|
8243
8255
|
const existing = await this.#getNode(tx, input.id);
|
|
8244
8256
|
if (!existing) throw new _mastra_core_storage.KnowledgeNotFoundError("node", input.id);
|