@mastra/libsql 1.0.0-beta.4 → 1.0.0-beta.5
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 +16 -0
- package/dist/index.cjs +10 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/scores/index.d.ts +2 -2
- package/dist/storage/domains/scores/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +2 -2
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @mastra/libsql
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix saveScore not persisting ID correctly, breaking getScoreById retrieval ([#10915](https://github.com/mastra-ai/mastra/pull/10915))
|
|
8
|
+
|
|
9
|
+
**What Changed**
|
|
10
|
+
- saveScore now correctly returns scores that can be retrieved with getScoreById
|
|
11
|
+
- Validation errors now include contextual information (scorer, entity, trace details) for easier debugging
|
|
12
|
+
|
|
13
|
+
**Impact**
|
|
14
|
+
Previously, calling getScoreById after saveScore would return null because the generated ID wasn't persisted to the database. This is now fixed across all store implementations, ensuring consistent behavior and data integrity.
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [[`0d41fe2`](https://github.com/mastra-ai/mastra/commit/0d41fe245355dfc66d61a0d9c85d9400aac351ff), [`6b3ba91`](https://github.com/mastra-ai/mastra/commit/6b3ba91494cc10394df96782f349a4f7b1e152cc), [`7907fd1`](https://github.com/mastra-ai/mastra/commit/7907fd1c5059813b7b870b81ca71041dc807331b)]:
|
|
17
|
+
- @mastra/core@1.0.0-beta.8
|
|
18
|
+
|
|
3
19
|
## 1.0.0-beta.4
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -2755,11 +2755,11 @@ var ScoresLibSQL = class extends storage.ScoresStorage {
|
|
|
2755
2755
|
domain: error.ErrorDomain.STORAGE,
|
|
2756
2756
|
category: error.ErrorCategory.USER,
|
|
2757
2757
|
details: {
|
|
2758
|
-
scorer: score.scorer
|
|
2759
|
-
entityId: score.entityId,
|
|
2760
|
-
entityType: score.entityType,
|
|
2761
|
-
traceId: score.traceId
|
|
2762
|
-
spanId: score.spanId
|
|
2758
|
+
scorer: score.scorer?.id ?? "unknown",
|
|
2759
|
+
entityId: score.entityId ?? "unknown",
|
|
2760
|
+
entityType: score.entityType ?? "unknown",
|
|
2761
|
+
traceId: score.traceId ?? "",
|
|
2762
|
+
spanId: score.spanId ?? ""
|
|
2763
2763
|
}
|
|
2764
2764
|
},
|
|
2765
2765
|
error$1
|
|
@@ -2767,17 +2767,17 @@ var ScoresLibSQL = class extends storage.ScoresStorage {
|
|
|
2767
2767
|
}
|
|
2768
2768
|
try {
|
|
2769
2769
|
const id = crypto.randomUUID();
|
|
2770
|
+
const now = /* @__PURE__ */ new Date();
|
|
2770
2771
|
await this.operations.insert({
|
|
2771
2772
|
tableName: storage.TABLE_SCORERS,
|
|
2772
2773
|
record: {
|
|
2774
|
+
...parsedScore,
|
|
2773
2775
|
id,
|
|
2774
|
-
createdAt:
|
|
2775
|
-
updatedAt:
|
|
2776
|
-
...parsedScore
|
|
2776
|
+
createdAt: now.toISOString(),
|
|
2777
|
+
updatedAt: now.toISOString()
|
|
2777
2778
|
}
|
|
2778
2779
|
});
|
|
2779
|
-
|
|
2780
|
-
return { score: scoreFromDb };
|
|
2780
|
+
return { score: { ...parsedScore, id, createdAt: now, updatedAt: now } };
|
|
2781
2781
|
} catch (error$1) {
|
|
2782
2782
|
throw new error.MastraError(
|
|
2783
2783
|
{
|