@mastra/mongodb 1.22.0 → 1.22.1-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/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-memory-semantic-recall.md +2 -2
- package/dist/docs/references/docs-memory-working-memory.md +16 -0
- package/dist/docs/references/reference-rag-retrieval.md +7 -5
- package/dist/docs/references/reference-rag-vector-databases.md +1 -1
- package/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +2 -1
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { MessageList } from "@mastra/core/agent";
|
|
|
8
8
|
import { saveScorePayloadSchema } from "@mastra/core/evals";
|
|
9
9
|
import { skillSnapshotFieldValuesEqual } from "@mastra/core/storage/domains/skills";
|
|
10
10
|
//#region package.json
|
|
11
|
-
var version = "1.22.0";
|
|
11
|
+
var version = "1.22.1-alpha.0";
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/vector/filter.ts
|
|
14
14
|
/**
|
|
@@ -11591,10 +11591,12 @@ var WorkflowsStorageMongoDB = class WorkflowsStorageMongoDB extends WorkflowsSto
|
|
|
11591
11591
|
async dangerouslyClearAll() {
|
|
11592
11592
|
await (await this.getCollection(TABLE_WORKFLOW_SNAPSHOT)).deleteMany({});
|
|
11593
11593
|
}
|
|
11594
|
-
async updateWorkflowResults({ workflowName, runId, stepId, result, requestContext }) {
|
|
11594
|
+
async updateWorkflowResults({ workflowName, runId, stepId, result, requestContext, state }) {
|
|
11595
11595
|
try {
|
|
11596
11596
|
const collection = await this.getCollection(TABLE_WORKFLOW_SNAPSHOT);
|
|
11597
11597
|
const now = /* @__PURE__ */ new Date();
|
|
11598
|
+
const contextUpdate = { [stepId]: result };
|
|
11599
|
+
if (state !== void 0) contextUpdate.__state = state;
|
|
11598
11600
|
const defaultSnapshot = {
|
|
11599
11601
|
context: {},
|
|
11600
11602
|
activePaths: [],
|
|
@@ -11617,7 +11619,7 @@ var WorkflowsStorageMongoDB = class WorkflowsStorageMongoDB extends WorkflowsSto
|
|
|
11617
11619
|
run_id: runId,
|
|
11618
11620
|
snapshot: { $mergeObjects: [
|
|
11619
11621
|
{ $ifNull: ["$snapshot", defaultSnapshot] },
|
|
11620
|
-
{ context: { $mergeObjects: [{ $ifNull: [{ $ifNull: ["$snapshot.context", {}] }, {}] },
|
|
11622
|
+
{ context: { $mergeObjects: [{ $ifNull: [{ $ifNull: ["$snapshot.context", {}] }, {}] }, contextUpdate] } },
|
|
11621
11623
|
{ requestContext: { $mergeObjects: [{ $ifNull: [{ $ifNull: ["$snapshot.requestContext", {}] }, {}] }, requestContext] } }
|
|
11622
11624
|
] },
|
|
11623
11625
|
updatedAt: now,
|