@mastra/libsql 0.13.1-alpha.0 → 0.13.2-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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +20 -0
- package/dist/index.cjs +16 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -11
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/scores/index.d.ts +3 -2
- package/dist/storage/domains/scores/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +3 -2
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/storage/domains/scores/index.ts +18 -11
- package/src/storage/index.ts +4 -2
package/.turbo/turbo-build.log
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @mastra/libsql
|
|
2
2
|
|
|
3
|
+
## 0.13.2-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b32c50d: Filter scores by source
|
|
8
|
+
- Updated dependencies [d5330bf]
|
|
9
|
+
- Updated dependencies [a239d41]
|
|
10
|
+
- Updated dependencies [b32c50d]
|
|
11
|
+
- Updated dependencies [121a3f8]
|
|
12
|
+
- Updated dependencies [ec510e7]
|
|
13
|
+
- @mastra/core@0.13.2-alpha.2
|
|
14
|
+
|
|
15
|
+
## 0.13.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 8888b57: Fix LibSQL vector metadata filtering for Memory system - corrected JSON path syntax for simple fields and changed default minScore to -1 to include all similarity results
|
|
20
|
+
- Updated dependencies [cd0042e]
|
|
21
|
+
- @mastra/core@0.13.1
|
|
22
|
+
|
|
3
23
|
## 0.13.1-alpha.0
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -2060,6 +2060,7 @@ var ScoresLibSQL = class extends storage.ScoresStorage {
|
|
|
2060
2060
|
scorerId,
|
|
2061
2061
|
entityId,
|
|
2062
2062
|
entityType,
|
|
2063
|
+
source,
|
|
2063
2064
|
pagination
|
|
2064
2065
|
}) {
|
|
2065
2066
|
try {
|
|
@@ -2077,6 +2078,10 @@ var ScoresLibSQL = class extends storage.ScoresStorage {
|
|
|
2077
2078
|
conditions.push(`entityType = ?`);
|
|
2078
2079
|
queryParams.push(entityType);
|
|
2079
2080
|
}
|
|
2081
|
+
if (source) {
|
|
2082
|
+
conditions.push(`source = ?`);
|
|
2083
|
+
queryParams.push(source);
|
|
2084
|
+
}
|
|
2080
2085
|
const whereClause = conditions.length > 0 ? `WHERE ${conditions.join(" AND ")}` : "";
|
|
2081
2086
|
const result = await this.client.execute({
|
|
2082
2087
|
sql: `SELECT * FROM ${storage.TABLE_SCORERS} ${whereClause} ORDER BY createdAt DESC LIMIT ? OFFSET ?`,
|
|
@@ -2103,15 +2108,15 @@ var ScoresLibSQL = class extends storage.ScoresStorage {
|
|
|
2103
2108
|
}
|
|
2104
2109
|
}
|
|
2105
2110
|
transformScoreRow(row) {
|
|
2106
|
-
const scorerValue =
|
|
2107
|
-
const inputValue =
|
|
2108
|
-
const outputValue =
|
|
2109
|
-
const additionalLLMContextValue = row.additionalLLMContext ?
|
|
2110
|
-
const runtimeContextValue = row.runtimeContext ?
|
|
2111
|
-
const metadataValue = row.metadata ?
|
|
2112
|
-
const entityValue = row.entity ?
|
|
2113
|
-
const preprocessStepResultValue = row.preprocessStepResult ?
|
|
2114
|
-
const analyzeStepResultValue = row.analyzeStepResult ?
|
|
2111
|
+
const scorerValue = storage.safelyParseJSON(row.scorer);
|
|
2112
|
+
const inputValue = storage.safelyParseJSON(row.input ?? "{}");
|
|
2113
|
+
const outputValue = storage.safelyParseJSON(row.output ?? "{}");
|
|
2114
|
+
const additionalLLMContextValue = row.additionalLLMContext ? storage.safelyParseJSON(row.additionalLLMContext) : null;
|
|
2115
|
+
const runtimeContextValue = row.runtimeContext ? storage.safelyParseJSON(row.runtimeContext) : null;
|
|
2116
|
+
const metadataValue = row.metadata ? storage.safelyParseJSON(row.metadata) : null;
|
|
2117
|
+
const entityValue = row.entity ? storage.safelyParseJSON(row.entity) : null;
|
|
2118
|
+
const preprocessStepResultValue = row.preprocessStepResult ? storage.safelyParseJSON(row.preprocessStepResult) : null;
|
|
2119
|
+
const analyzeStepResultValue = row.analyzeStepResult ? storage.safelyParseJSON(row.analyzeStepResult) : null;
|
|
2115
2120
|
return {
|
|
2116
2121
|
id: row.id,
|
|
2117
2122
|
traceId: row.traceId,
|
|
@@ -2632,9 +2637,10 @@ var LibSQLStore = class extends storage.MastraStorage {
|
|
|
2632
2637
|
scorerId,
|
|
2633
2638
|
entityId,
|
|
2634
2639
|
entityType,
|
|
2640
|
+
source,
|
|
2635
2641
|
pagination
|
|
2636
2642
|
}) {
|
|
2637
|
-
return this.stores.scores.getScoresByScorerId({ scorerId, entityId, entityType, pagination });
|
|
2643
|
+
return this.stores.scores.getScoresByScorerId({ scorerId, entityId, entityType, source, pagination });
|
|
2638
2644
|
}
|
|
2639
2645
|
async getScoresByRunId({
|
|
2640
2646
|
runId,
|