@mastra/mongodb 0.12.4 → 0.13.0-alpha.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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +34 -0
- package/dist/index.cjs +9 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +9 -7
- package/dist/index.js.map +1 -1
- package/dist/storage/MongoDBConnector.d.ts +2 -2
- package/dist/storage/connectors/MongoDBConnector.d.ts +2 -2
- package/dist/storage/domains/legacy-evals/index.d.ts +1 -1
- package/dist/storage/domains/memory/index.d.ts +1 -1
- package/dist/storage/domains/operations/index.d.ts +1 -1
- package/dist/storage/domains/scores/index.d.ts +1 -1
- package/dist/storage/domains/scores/index.d.ts.map +1 -1
- package/dist/storage/domains/traces/index.d.ts +1 -1
- package/dist/storage/domains/workflows/index.d.ts +1 -1
- package/dist/storage/index.d.ts +1 -1
- package/dist/storage/types.d.ts +1 -1
- package/dist/vector/index.d.ts +1 -1
- package/package.json +7 -6
- package/src/storage/domains/scores/index.ts +15 -11
- package/src/storage/domains/traces/index.ts +5 -5
- package/src/vector/index.test.ts +31 -0
- package/tsup.config.ts +2 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './vector';
|
|
2
|
-
export * from './storage';
|
|
3
|
-
export * from './storage/connectors/base';
|
|
4
|
-
export { MONGODB_PROMPT } from './vector/prompt';
|
|
1
|
+
export * from './vector/index.js';
|
|
2
|
+
export * from './storage/index.js';
|
|
3
|
+
export * from './storage/connectors/base.js';
|
|
4
|
+
export { MONGODB_PROMPT } from './vector/prompt.js';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1490,12 +1490,12 @@ function transformScoreRow(row) {
|
|
|
1490
1490
|
console.warn("Failed to parse scorer:", e);
|
|
1491
1491
|
}
|
|
1492
1492
|
}
|
|
1493
|
-
let
|
|
1494
|
-
if (row.
|
|
1493
|
+
let preprocessStepResultValue = null;
|
|
1494
|
+
if (row.preprocessStepResult) {
|
|
1495
1495
|
try {
|
|
1496
|
-
|
|
1496
|
+
preprocessStepResultValue = typeof row.preprocessStepResult === "string" ? safelyParseJSON(row.preprocessStepResult) : row.preprocessStepResult;
|
|
1497
1497
|
} catch (e) {
|
|
1498
|
-
console.warn("Failed to parse
|
|
1498
|
+
console.warn("Failed to parse preprocessStepResult:", e);
|
|
1499
1499
|
}
|
|
1500
1500
|
}
|
|
1501
1501
|
let analyzeStepResultValue = null;
|
|
@@ -1546,7 +1546,7 @@ function transformScoreRow(row) {
|
|
|
1546
1546
|
traceId: row.traceId,
|
|
1547
1547
|
runId: row.runId,
|
|
1548
1548
|
scorer: scorerValue,
|
|
1549
|
-
|
|
1549
|
+
preprocessStepResult: preprocessStepResultValue,
|
|
1550
1550
|
analyzeStepResult: analyzeStepResultValue,
|
|
1551
1551
|
score: row.score,
|
|
1552
1552
|
reason: row.reason,
|
|
@@ -1603,11 +1603,13 @@ var ScoresStorageMongoDB = class extends ScoresStorage {
|
|
|
1603
1603
|
traceId: score.traceId || "",
|
|
1604
1604
|
runId: score.runId,
|
|
1605
1605
|
scorer: typeof score.scorer === "string" ? safelyParseJSON(score.scorer) : score.scorer,
|
|
1606
|
-
|
|
1606
|
+
preprocessStepResult: typeof score.preprocessStepResult === "string" ? safelyParseJSON(score.preprocessStepResult) : score.preprocessStepResult,
|
|
1607
1607
|
analyzeStepResult: typeof score.analyzeStepResult === "string" ? safelyParseJSON(score.analyzeStepResult) : score.analyzeStepResult,
|
|
1608
1608
|
score: score.score,
|
|
1609
1609
|
reason: score.reason,
|
|
1610
|
-
|
|
1610
|
+
preprocessPrompt: score.preprocessPrompt,
|
|
1611
|
+
generateScorePrompt: score.generateScorePrompt,
|
|
1612
|
+
generateReasonPrompt: score.generateReasonPrompt,
|
|
1611
1613
|
analyzePrompt: score.analyzePrompt,
|
|
1612
1614
|
reasonPrompt: score.reasonPrompt,
|
|
1613
1615
|
input: typeof score.input === "string" ? safelyParseJSON(score.input) : score.input,
|