@mastra/mongodb 1.6.1-alpha.3 → 1.6.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/CHANGELOG.md +23 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +12 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/datasets/index.d.ts.map +1 -1
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @mastra/mongodb
|
|
2
2
|
|
|
3
|
+
## 1.6.2-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Added expectedTrajectory support to dataset items across all storage backends and API layer. Dataset items can now store trajectory expectations that define expected agent execution steps, ordering, and constraints for trajectory-based evaluation scoring. ([#14902](https://github.com/mastra-ai/mastra/pull/14902))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`cb15509`](https://github.com/mastra-ai/mastra/commit/cb15509b58f6a83e11b765c945082afc027db972), [`80c5668`](https://github.com/mastra-ai/mastra/commit/80c5668e365470d3a96d3e953868fd7a643ff67c), [`3d478c1`](https://github.com/mastra-ai/mastra/commit/3d478c1e13f17b80f330ac49d7aa42ef929b93ff), [`6039f17`](https://github.com/mastra-ai/mastra/commit/6039f176f9c457304825ff1df8c83b8e457376c0), [`06b928d`](https://github.com/mastra-ai/mastra/commit/06b928dfc2f5630d023467476cc5919dfa858d0a), [`6a8d984`](https://github.com/mastra-ai/mastra/commit/6a8d9841f2933456ee1598099f488d742b600054)]:
|
|
10
|
+
- @mastra/core@1.22.0-alpha.2
|
|
11
|
+
|
|
12
|
+
## 1.6.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- dependencies updates: ([#10188](https://github.com/mastra-ai/mastra/pull/10188))
|
|
17
|
+
- Updated dependency [`cloudflare@^5.2.0` ↗︎](https://www.npmjs.com/package/cloudflare/v/5.2.0) (from `^4.5.0`, in `dependencies`)
|
|
18
|
+
|
|
19
|
+
- The internal architecture of observational memory has been refactored. The public API and behavior remain unchanged. ([#14453](https://github.com/mastra-ai/mastra/pull/14453))
|
|
20
|
+
|
|
21
|
+
- Added `scorerIds` persistence for datasets. The `scorerIds` field is now stored and retrieved correctly when creating or updating datasets. ([#14783](https://github.com/mastra-ai/mastra/pull/14783))
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [[`dc514a8`](https://github.com/mastra-ai/mastra/commit/dc514a83dba5f719172dddfd2c7b858e4943d067), [`e333b77`](https://github.com/mastra-ai/mastra/commit/e333b77e2d76ba57ccec1818e08cebc1993469ff), [`dc9fc19`](https://github.com/mastra-ai/mastra/commit/dc9fc19da4437f6b508cc355f346a8856746a76b), [`60a224d`](https://github.com/mastra-ai/mastra/commit/60a224dd497240e83698cfa5bfd02e3d1d854844), [`fbf22a7`](https://github.com/mastra-ai/mastra/commit/fbf22a7ad86bcb50dcf30459f0d075e51ddeb468), [`f16d92c`](https://github.com/mastra-ai/mastra/commit/f16d92c677a119a135cebcf7e2b9f51ada7a9df4), [`949b7bf`](https://github.com/mastra-ai/mastra/commit/949b7bfd4e40f2b2cba7fef5eb3f108a02cfe938), [`404fea1`](https://github.com/mastra-ai/mastra/commit/404fea13042181f0b0c73a101392ac87c79ceae2), [`ebf5047`](https://github.com/mastra-ai/mastra/commit/ebf5047e825c38a1a356f10b214c1d4260dfcd8d), [`12c647c`](https://github.com/mastra-ai/mastra/commit/12c647cf3a26826eb72d40b42e3c8356ceae16ed), [`d084b66`](https://github.com/mastra-ai/mastra/commit/d084b6692396057e83c086b954c1857d20b58a14), [`79c699a`](https://github.com/mastra-ai/mastra/commit/79c699acf3cd8a77e11c55530431f48eb48456e9), [`62757b6`](https://github.com/mastra-ai/mastra/commit/62757b6db6e8bb86569d23ad0b514178f57053f8), [`675f15b`](https://github.com/mastra-ai/mastra/commit/675f15b7eaeea649158d228ea635be40480c584d), [`b174c63`](https://github.com/mastra-ai/mastra/commit/b174c63a093108d4e53b9bc89a078d9f66202b3f), [`819f03c`](https://github.com/mastra-ai/mastra/commit/819f03c25823373b32476413bd76be28a5d8705a), [`04160ee`](https://github.com/mastra-ai/mastra/commit/04160eedf3130003cf842ad08428c8ff69af4cc1), [`2c27503`](https://github.com/mastra-ai/mastra/commit/2c275032510d131d2cde47f99953abf0fe02c081), [`424a1df`](https://github.com/mastra-ai/mastra/commit/424a1df7bee59abb5c83717a54807fdd674a6224), [`3d70b0b`](https://github.com/mastra-ai/mastra/commit/3d70b0b3524d817173ad870768f259c06d61bd23), [`eef7cb2`](https://github.com/mastra-ai/mastra/commit/eef7cb2abe7ef15951e2fdf792a5095c6c643333), [`260fe12`](https://github.com/mastra-ai/mastra/commit/260fe1295fe7354e39d6def2775e0797a7a277f0), [`12c88a6`](https://github.com/mastra-ai/mastra/commit/12c88a6e32bf982c2fe0c6af62e65a3414519a75), [`43595bf`](https://github.com/mastra-ai/mastra/commit/43595bf7b8df1a6edce7a23b445b5124d2a0b473), [`78670e9`](https://github.com/mastra-ai/mastra/commit/78670e97e76d7422cf7025faf371b2aeafed860d), [`e8a5b0b`](https://github.com/mastra-ai/mastra/commit/e8a5b0b9bc94d12dee4150095512ca27a288d778), [`3b45a13`](https://github.com/mastra-ai/mastra/commit/3b45a138d09d040779c0aba1edbbfc1b57442d23), [`d400e7c`](https://github.com/mastra-ai/mastra/commit/d400e7c8b8d7afa6ba2c71769eace4048e3cef8e), [`f58d1a7`](https://github.com/mastra-ai/mastra/commit/f58d1a7a457588a996c3ecb53201a68f3d28c432), [`a49a929`](https://github.com/mastra-ai/mastra/commit/a49a92904968b4fc67e01effee8c7c8d0464ba85), [`8127d96`](https://github.com/mastra-ai/mastra/commit/8127d96280492e335d49b244501088dfdd59a8f1)]:
|
|
24
|
+
- @mastra/core@1.18.0
|
|
25
|
+
|
|
3
26
|
## 1.6.1-alpha.3
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: mastra-mongodb
|
|
|
3
3
|
description: Documentation for @mastra/mongodb. Use when working with @mastra/mongodb APIs, configuration, or implementation.
|
|
4
4
|
metadata:
|
|
5
5
|
package: "@mastra/mongodb"
|
|
6
|
-
version: "1.6.
|
|
6
|
+
version: "1.6.2-alpha.0"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
package/dist/index.cjs
CHANGED
|
@@ -14,7 +14,7 @@ var evals = require('@mastra/core/evals');
|
|
|
14
14
|
|
|
15
15
|
// package.json
|
|
16
16
|
var package_default = {
|
|
17
|
-
version: "1.6.
|
|
17
|
+
version: "1.6.2-alpha.0"};
|
|
18
18
|
var MongoDBFilterTranslator = class extends filter.BaseFilterTranslator {
|
|
19
19
|
getSupportedOperators() {
|
|
20
20
|
return {
|
|
@@ -1810,6 +1810,7 @@ var MongoDBDatasetsStorage = class extends storage.DatasetsStorage {
|
|
|
1810
1810
|
datasetVersion: row.datasetVersion,
|
|
1811
1811
|
input: typeof row.input === "string" ? storage.safelyParseJSON(row.input) : row.input,
|
|
1812
1812
|
groundTruth: typeof row.groundTruth === "string" ? storage.safelyParseJSON(row.groundTruth) : row.groundTruth,
|
|
1813
|
+
expectedTrajectory: typeof row.expectedTrajectory === "string" ? storage.safelyParseJSON(row.expectedTrajectory) : row.expectedTrajectory,
|
|
1813
1814
|
requestContext: typeof row.requestContext === "string" ? storage.safelyParseJSON(row.requestContext) : row.requestContext,
|
|
1814
1815
|
metadata: typeof row.metadata === "string" ? storage.safelyParseJSON(row.metadata) : row.metadata,
|
|
1815
1816
|
source: typeof row.source === "string" ? storage.safelyParseJSON(row.source) : row.source,
|
|
@@ -2022,6 +2023,7 @@ var MongoDBDatasetsStorage = class extends storage.DatasetsStorage {
|
|
|
2022
2023
|
isDeleted: false,
|
|
2023
2024
|
input: args.input,
|
|
2024
2025
|
groundTruth: args.groundTruth ?? null,
|
|
2026
|
+
expectedTrajectory: args.expectedTrajectory ?? null,
|
|
2025
2027
|
requestContext: args.requestContext ?? null,
|
|
2026
2028
|
metadata: args.metadata ?? null,
|
|
2027
2029
|
source: args.source ?? null,
|
|
@@ -2040,6 +2042,7 @@ var MongoDBDatasetsStorage = class extends storage.DatasetsStorage {
|
|
|
2040
2042
|
datasetVersion: newVersion,
|
|
2041
2043
|
input: args.input,
|
|
2042
2044
|
groundTruth: args.groundTruth,
|
|
2045
|
+
expectedTrajectory: args.expectedTrajectory,
|
|
2043
2046
|
requestContext: args.requestContext,
|
|
2044
2047
|
metadata: args.metadata,
|
|
2045
2048
|
source: args.source,
|
|
@@ -2077,7 +2080,7 @@ var MongoDBDatasetsStorage = class extends storage.DatasetsStorage {
|
|
|
2077
2080
|
details: { itemId: args.id, expectedDatasetId: args.datasetId, actualDatasetId: existing.datasetId }
|
|
2078
2081
|
});
|
|
2079
2082
|
}
|
|
2080
|
-
const hasChanges = args.input !== void 0 || args.groundTruth !== void 0 || args.requestContext !== void 0 || args.metadata !== void 0 || args.source !== void 0;
|
|
2083
|
+
const hasChanges = args.input !== void 0 || args.groundTruth !== void 0 || args.expectedTrajectory !== void 0 || args.requestContext !== void 0 || args.metadata !== void 0 || args.source !== void 0;
|
|
2081
2084
|
if (!hasChanges) {
|
|
2082
2085
|
return existing;
|
|
2083
2086
|
}
|
|
@@ -2085,6 +2088,7 @@ var MongoDBDatasetsStorage = class extends storage.DatasetsStorage {
|
|
|
2085
2088
|
const versionId = crypto.randomUUID();
|
|
2086
2089
|
const mergedInput = args.input !== void 0 ? args.input : existing.input;
|
|
2087
2090
|
const mergedGroundTruth = args.groundTruth !== void 0 ? args.groundTruth : existing.groundTruth;
|
|
2091
|
+
const mergedExpectedTrajectory = args.expectedTrajectory !== void 0 ? args.expectedTrajectory : existing.expectedTrajectory;
|
|
2088
2092
|
const mergedRequestContext = args.requestContext !== void 0 ? args.requestContext : existing.requestContext;
|
|
2089
2093
|
const mergedMetadata = args.metadata !== void 0 ? args.metadata : existing.metadata;
|
|
2090
2094
|
const mergedSource = args.source !== void 0 ? args.source : existing.source;
|
|
@@ -2117,6 +2121,7 @@ var MongoDBDatasetsStorage = class extends storage.DatasetsStorage {
|
|
|
2117
2121
|
isDeleted: false,
|
|
2118
2122
|
input: mergedInput,
|
|
2119
2123
|
groundTruth: mergedGroundTruth,
|
|
2124
|
+
expectedTrajectory: mergedExpectedTrajectory ?? null,
|
|
2120
2125
|
requestContext: mergedRequestContext,
|
|
2121
2126
|
metadata: mergedMetadata,
|
|
2122
2127
|
source: mergedSource,
|
|
@@ -2134,6 +2139,7 @@ var MongoDBDatasetsStorage = class extends storage.DatasetsStorage {
|
|
|
2134
2139
|
datasetVersion: newVersion,
|
|
2135
2140
|
input: mergedInput,
|
|
2136
2141
|
groundTruth: mergedGroundTruth,
|
|
2142
|
+
expectedTrajectory: mergedExpectedTrajectory,
|
|
2137
2143
|
requestContext: mergedRequestContext,
|
|
2138
2144
|
metadata: mergedMetadata,
|
|
2139
2145
|
source: mergedSource,
|
|
@@ -2262,6 +2268,7 @@ var MongoDBDatasetsStorage = class extends storage.DatasetsStorage {
|
|
|
2262
2268
|
isDeleted: false,
|
|
2263
2269
|
input: itemInput.input,
|
|
2264
2270
|
groundTruth: itemInput.groundTruth ?? null,
|
|
2271
|
+
expectedTrajectory: itemInput.expectedTrajectory ?? null,
|
|
2265
2272
|
requestContext: itemInput.requestContext ?? null,
|
|
2266
2273
|
metadata: itemInput.metadata ?? null,
|
|
2267
2274
|
source: itemInput.source ?? null,
|
|
@@ -2282,6 +2289,7 @@ var MongoDBDatasetsStorage = class extends storage.DatasetsStorage {
|
|
|
2282
2289
|
datasetVersion: newVersion,
|
|
2283
2290
|
input: itemInput.input,
|
|
2284
2291
|
groundTruth: itemInput.groundTruth,
|
|
2292
|
+
expectedTrajectory: itemInput.expectedTrajectory,
|
|
2285
2293
|
requestContext: itemInput.requestContext,
|
|
2286
2294
|
metadata: itemInput.metadata,
|
|
2287
2295
|
source: itemInput.source,
|
|
@@ -5704,7 +5712,8 @@ var MemoryStorageMongoDB = class _MemoryStorageMongoDB extends storage.MemorySto
|
|
|
5704
5712
|
lastObservedAt: input.chunk.lastObservedAt,
|
|
5705
5713
|
createdAt: /* @__PURE__ */ new Date(),
|
|
5706
5714
|
suggestedContinuation: input.chunk.suggestedContinuation,
|
|
5707
|
-
currentTask: input.chunk.currentTask
|
|
5715
|
+
currentTask: input.chunk.currentTask,
|
|
5716
|
+
threadTitle: input.chunk.threadTitle
|
|
5708
5717
|
};
|
|
5709
5718
|
const now = /* @__PURE__ */ new Date();
|
|
5710
5719
|
const setStage = {
|