@mastra/libsql 0.0.0-knowledge-w1-20261009044833 → 0.0.0-knowledge-w1-20261009054256
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/dist/_types/@internal_core/dist/knowledge-compat/index.d.ts +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +8 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/knowledge/index.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -583,6 +583,7 @@ interface KnowledgeSchemaSnapshot {
|
|
|
583
583
|
}
|
|
584
584
|
interface KnowledgeV2Core {
|
|
585
585
|
assertKnowledgeDescriptionWithinBound(description: string | undefined): void;
|
|
586
|
+
assertKnowledgeRecordTextWithinBound(text: string): void;
|
|
586
587
|
assertKnowledgeSchemaCompatible(inspection: KnowledgeSchemaInspection): void;
|
|
587
588
|
inspectKnowledgeSchema(snapshot: KnowledgeSchemaSnapshot): KnowledgeSchemaInspection;
|
|
588
589
|
}
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: mastra-libsql
|
|
|
3
3
|
description: Documentation for @mastra/libsql. Use when working with @mastra/libsql APIs, configuration, or implementation.
|
|
4
4
|
metadata:
|
|
5
5
|
package: "@mastra/libsql"
|
|
6
|
-
version: "0.0.0-knowledge-w1-
|
|
6
|
+
version: "0.0.0-knowledge-w1-20261009054256"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
package/dist/index.cjs
CHANGED
|
@@ -6664,10 +6664,11 @@ function assertKnowledgeV2CoreSupport(features) {
|
|
|
6664
6664
|
}
|
|
6665
6665
|
function resolveKnowledgeV2Core(storageModule) {
|
|
6666
6666
|
if (typeof storageModule !== "object" || storageModule === null) throw new Error("@mastra/core advertises Knowledge v2 without the required storage API");
|
|
6667
|
-
const { assertKnowledgeDescriptionWithinBound: assertDescription, assertKnowledgeSchemaCompatible: assertCompatible, inspectKnowledgeSchema: inspectSchema } = storageModule;
|
|
6668
|
-
if (typeof assertDescription !== "function" || typeof assertCompatible !== "function" || typeof inspectSchema !== "function") throw new Error("@mastra/core advertises Knowledge v2 without the required storage API");
|
|
6667
|
+
const { assertKnowledgeDescriptionWithinBound: assertDescription, assertKnowledgeRecordTextWithinBound: assertRecordText, assertKnowledgeSchemaCompatible: assertCompatible, inspectKnowledgeSchema: inspectSchema } = storageModule;
|
|
6668
|
+
if (typeof assertDescription !== "function" || typeof assertRecordText !== "function" || typeof assertCompatible !== "function" || typeof inspectSchema !== "function") throw new Error("@mastra/core advertises Knowledge v2 without the required storage API");
|
|
6669
6669
|
return {
|
|
6670
6670
|
assertKnowledgeDescriptionWithinBound: (description) => assertDescription(description),
|
|
6671
|
+
assertKnowledgeRecordTextWithinBound: (text) => assertRecordText(text),
|
|
6671
6672
|
assertKnowledgeSchemaCompatible: (inspection) => assertCompatible(inspection),
|
|
6672
6673
|
inspectKnowledgeSchema: (snapshot) => inspectSchema(snapshot)
|
|
6673
6674
|
};
|
|
@@ -6690,6 +6691,10 @@ async function assertKnowledgeDescriptionWithinBoundCompat(description) {
|
|
|
6690
6691
|
const { assertKnowledgeDescriptionWithinBound } = await loadKnowledgeV2Core();
|
|
6691
6692
|
assertKnowledgeDescriptionWithinBound(description);
|
|
6692
6693
|
}
|
|
6694
|
+
async function assertKnowledgeRecordTextWithinBoundCompat(text) {
|
|
6695
|
+
const { assertKnowledgeRecordTextWithinBound } = await loadKnowledgeV2Core();
|
|
6696
|
+
assertKnowledgeRecordTextWithinBound(text);
|
|
6697
|
+
}
|
|
6693
6698
|
const reconcileChains = /* @__PURE__ */ new Map();
|
|
6694
6699
|
const unidentifiedClientReconcileKey = {};
|
|
6695
6700
|
function withReconcileLock(key, operation) {
|
|
@@ -7455,6 +7460,7 @@ var KnowledgeLibSQL = class extends _mastra_core_storage.KnowledgeStorage {
|
|
|
7455
7460
|
});
|
|
7456
7461
|
}
|
|
7457
7462
|
async appendKnowledge(input) {
|
|
7463
|
+
await assertKnowledgeRecordTextWithinBoundCompat(input.text);
|
|
7458
7464
|
const scope = (0, _mastra_core_storage.canonicalizeKnowledgeScope)(input.scope);
|
|
7459
7465
|
const resolutionScope = (0, _mastra_core_storage.canonicalizeKnowledgeScope)(input.resolutionScope);
|
|
7460
7466
|
const defaultScope = (0, _mastra_core_storage.canonicalizeKnowledgeScope)(input.defaultScope);
|