@mastra/mongodb 1.0.0-beta.3 → 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 +47 -0
- package/dist/index.cjs +88 -86
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +88 -86
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/dist/storage/domains/observability/index.d.ts.map +1 -1
- package/dist/storage/domains/operations/index.d.ts.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/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +2 -2
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/types.d.ts +28 -4
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/vector/index.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var error = require('@mastra/core/error');
|
|
4
|
+
var storage = require('@mastra/core/storage');
|
|
4
5
|
var vector = require('@mastra/core/vector');
|
|
5
6
|
var mongodb = require('mongodb');
|
|
6
7
|
var uuid = require('uuid');
|
|
7
8
|
var filter = require('@mastra/core/vector/filter');
|
|
8
|
-
var storage = require('@mastra/core/storage');
|
|
9
9
|
var agent = require('@mastra/core/agent');
|
|
10
10
|
var evals = require('@mastra/core/evals');
|
|
11
11
|
|
|
@@ -13,7 +13,7 @@ var evals = require('@mastra/core/evals');
|
|
|
13
13
|
|
|
14
14
|
// package.json
|
|
15
15
|
var package_default = {
|
|
16
|
-
version: "1.0.0-beta.
|
|
16
|
+
version: "1.0.0-beta.5"};
|
|
17
17
|
var MongoDBFilterTranslator = class extends filter.BaseFilterTranslator {
|
|
18
18
|
getSupportedOperators() {
|
|
19
19
|
return {
|
|
@@ -136,7 +136,7 @@ var MongoDBVector = class extends vector.MastraVector {
|
|
|
136
136
|
} catch (error$1) {
|
|
137
137
|
throw new error.MastraError(
|
|
138
138
|
{
|
|
139
|
-
id: "
|
|
139
|
+
id: storage.createVectorErrorId("MONGODB", "CONNECT", "FAILED"),
|
|
140
140
|
domain: error.ErrorDomain.STORAGE,
|
|
141
141
|
category: error.ErrorCategory.THIRD_PARTY
|
|
142
142
|
},
|
|
@@ -150,7 +150,7 @@ var MongoDBVector = class extends vector.MastraVector {
|
|
|
150
150
|
} catch (error$1) {
|
|
151
151
|
throw new error.MastraError(
|
|
152
152
|
{
|
|
153
|
-
id: "
|
|
153
|
+
id: storage.createVectorErrorId("MONGODB", "DISCONNECT", "FAILED"),
|
|
154
154
|
domain: error.ErrorDomain.STORAGE,
|
|
155
155
|
category: error.ErrorCategory.THIRD_PARTY
|
|
156
156
|
},
|
|
@@ -171,7 +171,7 @@ var MongoDBVector = class extends vector.MastraVector {
|
|
|
171
171
|
} catch (error$1) {
|
|
172
172
|
throw new error.MastraError(
|
|
173
173
|
{
|
|
174
|
-
id: "
|
|
174
|
+
id: storage.createVectorErrorId("MONGODB", "CREATE_INDEX", "INVALID_ARGS"),
|
|
175
175
|
domain: error.ErrorDomain.STORAGE,
|
|
176
176
|
category: error.ErrorCategory.USER,
|
|
177
177
|
details: {
|
|
@@ -224,7 +224,7 @@ var MongoDBVector = class extends vector.MastraVector {
|
|
|
224
224
|
if (error$1.codeName !== "IndexAlreadyExists") {
|
|
225
225
|
throw new error.MastraError(
|
|
226
226
|
{
|
|
227
|
-
id: "
|
|
227
|
+
id: storage.createVectorErrorId("MONGODB", "CREATE_INDEX", "FAILED"),
|
|
228
228
|
domain: error.ErrorDomain.STORAGE,
|
|
229
229
|
category: error.ErrorCategory.THIRD_PARTY
|
|
230
230
|
},
|
|
@@ -237,7 +237,7 @@ var MongoDBVector = class extends vector.MastraVector {
|
|
|
237
237
|
} catch (error$1) {
|
|
238
238
|
throw new error.MastraError(
|
|
239
239
|
{
|
|
240
|
-
id: "
|
|
240
|
+
id: storage.createVectorErrorId("MONGODB", "CREATE_INDEX", "STORE_METADATA_FAILED"),
|
|
241
241
|
domain: error.ErrorDomain.STORAGE,
|
|
242
242
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
243
243
|
details: {
|
|
@@ -314,7 +314,7 @@ var MongoDBVector = class extends vector.MastraVector {
|
|
|
314
314
|
} catch (error$1) {
|
|
315
315
|
throw new error.MastraError(
|
|
316
316
|
{
|
|
317
|
-
id: "
|
|
317
|
+
id: storage.createVectorErrorId("MONGODB", "UPSERT", "FAILED"),
|
|
318
318
|
domain: error.ErrorDomain.STORAGE,
|
|
319
319
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
320
320
|
details: {
|
|
@@ -395,7 +395,7 @@ var MongoDBVector = class extends vector.MastraVector {
|
|
|
395
395
|
} catch (error$1) {
|
|
396
396
|
throw new error.MastraError(
|
|
397
397
|
{
|
|
398
|
-
id: "
|
|
398
|
+
id: storage.createVectorErrorId("MONGODB", "QUERY", "FAILED"),
|
|
399
399
|
domain: error.ErrorDomain.STORAGE,
|
|
400
400
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
401
401
|
details: {
|
|
@@ -413,7 +413,7 @@ var MongoDBVector = class extends vector.MastraVector {
|
|
|
413
413
|
} catch (error$1) {
|
|
414
414
|
throw new error.MastraError(
|
|
415
415
|
{
|
|
416
|
-
id: "
|
|
416
|
+
id: storage.createVectorErrorId("MONGODB", "LIST_INDEXES", "FAILED"),
|
|
417
417
|
domain: error.ErrorDomain.STORAGE,
|
|
418
418
|
category: error.ErrorCategory.THIRD_PARTY
|
|
419
419
|
},
|
|
@@ -442,7 +442,7 @@ var MongoDBVector = class extends vector.MastraVector {
|
|
|
442
442
|
} catch (error$1) {
|
|
443
443
|
throw new error.MastraError(
|
|
444
444
|
{
|
|
445
|
-
id: "
|
|
445
|
+
id: storage.createVectorErrorId("MONGODB", "DESCRIBE_INDEX", "FAILED"),
|
|
446
446
|
domain: error.ErrorDomain.STORAGE,
|
|
447
447
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
448
448
|
details: {
|
|
@@ -465,7 +465,7 @@ var MongoDBVector = class extends vector.MastraVector {
|
|
|
465
465
|
} catch (error$1) {
|
|
466
466
|
throw new error.MastraError(
|
|
467
467
|
{
|
|
468
|
-
id: "
|
|
468
|
+
id: storage.createVectorErrorId("MONGODB", "DELETE_INDEX", "FAILED"),
|
|
469
469
|
domain: error.ErrorDomain.STORAGE,
|
|
470
470
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
471
471
|
details: {
|
|
@@ -490,7 +490,7 @@ var MongoDBVector = class extends vector.MastraVector {
|
|
|
490
490
|
const { indexName, update } = params;
|
|
491
491
|
if ("id" in params && params.id && "filter" in params && params.filter) {
|
|
492
492
|
throw new error.MastraError({
|
|
493
|
-
id: "
|
|
493
|
+
id: storage.createVectorErrorId("MONGODB", "UPDATE_VECTOR", "MUTUALLY_EXCLUSIVE"),
|
|
494
494
|
domain: error.ErrorDomain.STORAGE,
|
|
495
495
|
category: error.ErrorCategory.USER,
|
|
496
496
|
details: { indexName },
|
|
@@ -499,7 +499,7 @@ var MongoDBVector = class extends vector.MastraVector {
|
|
|
499
499
|
}
|
|
500
500
|
if (!("id" in params || "filter" in params) || !params.id && !params.filter) {
|
|
501
501
|
throw new error.MastraError({
|
|
502
|
-
id: "
|
|
502
|
+
id: storage.createVectorErrorId("MONGODB", "UPDATE_VECTOR", "NO_TARGET"),
|
|
503
503
|
domain: error.ErrorDomain.STORAGE,
|
|
504
504
|
category: error.ErrorCategory.USER,
|
|
505
505
|
text: "Either id or filter must be provided",
|
|
@@ -533,7 +533,7 @@ var MongoDBVector = class extends vector.MastraVector {
|
|
|
533
533
|
const filter = params.filter;
|
|
534
534
|
if (!filter || Object.keys(filter).length === 0) {
|
|
535
535
|
throw new error.MastraError({
|
|
536
|
-
id: "
|
|
536
|
+
id: storage.createVectorErrorId("MONGODB", "UPDATE_VECTOR", "EMPTY_FILTER"),
|
|
537
537
|
domain: error.ErrorDomain.STORAGE,
|
|
538
538
|
category: error.ErrorCategory.USER,
|
|
539
539
|
details: { indexName },
|
|
@@ -544,7 +544,7 @@ var MongoDBVector = class extends vector.MastraVector {
|
|
|
544
544
|
const transformedFilter = this.transformMetadataFilter(mongoFilter);
|
|
545
545
|
if (!transformedFilter || Object.keys(transformedFilter).length === 0) {
|
|
546
546
|
throw new error.MastraError({
|
|
547
|
-
id: "
|
|
547
|
+
id: storage.createVectorErrorId("MONGODB", "UPDATE_VECTOR", "INVALID_FILTER"),
|
|
548
548
|
domain: error.ErrorDomain.STORAGE,
|
|
549
549
|
category: error.ErrorCategory.USER,
|
|
550
550
|
details: { indexName },
|
|
@@ -566,7 +566,7 @@ var MongoDBVector = class extends vector.MastraVector {
|
|
|
566
566
|
}
|
|
567
567
|
throw new error.MastraError(
|
|
568
568
|
{
|
|
569
|
-
id: "
|
|
569
|
+
id: storage.createVectorErrorId("MONGODB", "UPDATE_VECTOR", "FAILED"),
|
|
570
570
|
domain: error.ErrorDomain.STORAGE,
|
|
571
571
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
572
572
|
details: errorDetails
|
|
@@ -589,7 +589,7 @@ var MongoDBVector = class extends vector.MastraVector {
|
|
|
589
589
|
} catch (error$1) {
|
|
590
590
|
throw new error.MastraError(
|
|
591
591
|
{
|
|
592
|
-
id: "
|
|
592
|
+
id: storage.createVectorErrorId("MONGODB", "DELETE_VECTOR", "FAILED"),
|
|
593
593
|
domain: error.ErrorDomain.STORAGE,
|
|
594
594
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
595
595
|
details: {
|
|
@@ -604,7 +604,7 @@ var MongoDBVector = class extends vector.MastraVector {
|
|
|
604
604
|
async deleteVectors({ indexName, filter, ids }) {
|
|
605
605
|
if (!filter && !ids) {
|
|
606
606
|
throw new error.MastraError({
|
|
607
|
-
id: "
|
|
607
|
+
id: storage.createVectorErrorId("MONGODB", "DELETE_VECTORS", "NO_TARGET"),
|
|
608
608
|
domain: error.ErrorDomain.STORAGE,
|
|
609
609
|
category: error.ErrorCategory.USER,
|
|
610
610
|
details: { indexName },
|
|
@@ -613,7 +613,7 @@ var MongoDBVector = class extends vector.MastraVector {
|
|
|
613
613
|
}
|
|
614
614
|
if (filter && ids) {
|
|
615
615
|
throw new error.MastraError({
|
|
616
|
-
id: "
|
|
616
|
+
id: storage.createVectorErrorId("MONGODB", "DELETE_VECTORS", "MUTUALLY_EXCLUSIVE"),
|
|
617
617
|
domain: error.ErrorDomain.STORAGE,
|
|
618
618
|
category: error.ErrorCategory.USER,
|
|
619
619
|
details: { indexName },
|
|
@@ -625,7 +625,7 @@ var MongoDBVector = class extends vector.MastraVector {
|
|
|
625
625
|
if (ids) {
|
|
626
626
|
if (ids.length === 0) {
|
|
627
627
|
throw new error.MastraError({
|
|
628
|
-
id: "
|
|
628
|
+
id: storage.createVectorErrorId("MONGODB", "DELETE_VECTORS", "EMPTY_IDS"),
|
|
629
629
|
domain: error.ErrorDomain.STORAGE,
|
|
630
630
|
category: error.ErrorCategory.USER,
|
|
631
631
|
details: { indexName },
|
|
@@ -636,7 +636,7 @@ var MongoDBVector = class extends vector.MastraVector {
|
|
|
636
636
|
} else {
|
|
637
637
|
if (!filter || Object.keys(filter).length === 0) {
|
|
638
638
|
throw new error.MastraError({
|
|
639
|
-
id: "
|
|
639
|
+
id: storage.createVectorErrorId("MONGODB", "DELETE_VECTORS", "EMPTY_FILTER"),
|
|
640
640
|
domain: error.ErrorDomain.STORAGE,
|
|
641
641
|
category: error.ErrorCategory.USER,
|
|
642
642
|
details: { indexName },
|
|
@@ -647,7 +647,7 @@ var MongoDBVector = class extends vector.MastraVector {
|
|
|
647
647
|
const transformedFilter = this.transformMetadataFilter(mongoFilter);
|
|
648
648
|
if (!transformedFilter || Object.keys(transformedFilter).length === 0) {
|
|
649
649
|
throw new error.MastraError({
|
|
650
|
-
id: "
|
|
650
|
+
id: storage.createVectorErrorId("MONGODB", "DELETE_VECTORS", "INVALID_FILTER"),
|
|
651
651
|
domain: error.ErrorDomain.STORAGE,
|
|
652
652
|
category: error.ErrorCategory.USER,
|
|
653
653
|
details: { indexName },
|
|
@@ -665,7 +665,7 @@ var MongoDBVector = class extends vector.MastraVector {
|
|
|
665
665
|
}
|
|
666
666
|
throw new error.MastraError(
|
|
667
667
|
{
|
|
668
|
-
id: "
|
|
668
|
+
id: storage.createVectorErrorId("MONGODB", "DELETE_VECTORS", "FAILED"),
|
|
669
669
|
domain: error.ErrorDomain.STORAGE,
|
|
670
670
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
671
671
|
details: {
|
|
@@ -907,7 +907,7 @@ var MemoryStorageMongoDB = class extends storage.MemoryStorage {
|
|
|
907
907
|
} catch (error$1) {
|
|
908
908
|
throw new error.MastraError(
|
|
909
909
|
{
|
|
910
|
-
id: "
|
|
910
|
+
id: storage.createStorageErrorId("MONGODB", "LIST_MESSAGES_BY_ID", "FAILED"),
|
|
911
911
|
domain: error.ErrorDomain.STORAGE,
|
|
912
912
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
913
913
|
details: { messageIds: JSON.stringify(messageIds) }
|
|
@@ -922,7 +922,7 @@ var MemoryStorageMongoDB = class extends storage.MemoryStorage {
|
|
|
922
922
|
if (threadIds.length === 0 || threadIds.some((id) => !id.trim())) {
|
|
923
923
|
throw new error.MastraError(
|
|
924
924
|
{
|
|
925
|
-
id: "
|
|
925
|
+
id: storage.createStorageErrorId("MONGODB", "LIST_MESSAGES", "INVALID_THREAD_ID"),
|
|
926
926
|
domain: error.ErrorDomain.STORAGE,
|
|
927
927
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
928
928
|
details: { threadId: Array.isArray(threadId) ? threadId.join(",") : threadId }
|
|
@@ -933,7 +933,7 @@ var MemoryStorageMongoDB = class extends storage.MemoryStorage {
|
|
|
933
933
|
if (page < 0) {
|
|
934
934
|
throw new error.MastraError(
|
|
935
935
|
{
|
|
936
|
-
id: "
|
|
936
|
+
id: storage.createStorageErrorId("MONGODB", "LIST_MESSAGES", "INVALID_PAGE"),
|
|
937
937
|
domain: error.ErrorDomain.STORAGE,
|
|
938
938
|
category: error.ErrorCategory.USER,
|
|
939
939
|
details: { page }
|
|
@@ -1016,7 +1016,7 @@ var MemoryStorageMongoDB = class extends storage.MemoryStorage {
|
|
|
1016
1016
|
} catch (error$1) {
|
|
1017
1017
|
const mastraError = new error.MastraError(
|
|
1018
1018
|
{
|
|
1019
|
-
id: "
|
|
1019
|
+
id: storage.createStorageErrorId("MONGODB", "LIST_MESSAGES", "FAILED"),
|
|
1020
1020
|
domain: error.ErrorDomain.STORAGE,
|
|
1021
1021
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1022
1022
|
details: {
|
|
@@ -1085,7 +1085,7 @@ var MemoryStorageMongoDB = class extends storage.MemoryStorage {
|
|
|
1085
1085
|
} catch (error$1) {
|
|
1086
1086
|
throw new error.MastraError(
|
|
1087
1087
|
{
|
|
1088
|
-
id: "
|
|
1088
|
+
id: storage.createStorageErrorId("MONGODB", "SAVE_MESSAGES", "FAILED"),
|
|
1089
1089
|
domain: error.ErrorDomain.STORAGE,
|
|
1090
1090
|
category: error.ErrorCategory.THIRD_PARTY
|
|
1091
1091
|
},
|
|
@@ -1183,7 +1183,7 @@ var MemoryStorageMongoDB = class extends storage.MemoryStorage {
|
|
|
1183
1183
|
} catch (error$1) {
|
|
1184
1184
|
throw new error.MastraError(
|
|
1185
1185
|
{
|
|
1186
|
-
id: "
|
|
1186
|
+
id: storage.createStorageErrorId("MONGODB", "GET_RESOURCE_BY_ID", "FAILED"),
|
|
1187
1187
|
domain: error.ErrorDomain.STORAGE,
|
|
1188
1188
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1189
1189
|
details: { resourceId }
|
|
@@ -1209,7 +1209,7 @@ var MemoryStorageMongoDB = class extends storage.MemoryStorage {
|
|
|
1209
1209
|
} catch (error$1) {
|
|
1210
1210
|
throw new error.MastraError(
|
|
1211
1211
|
{
|
|
1212
|
-
id: "
|
|
1212
|
+
id: storage.createStorageErrorId("MONGODB", "SAVE_RESOURCE", "FAILED"),
|
|
1213
1213
|
domain: error.ErrorDomain.STORAGE,
|
|
1214
1214
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1215
1215
|
details: { resourceId: resource.id }
|
|
@@ -1254,7 +1254,7 @@ var MemoryStorageMongoDB = class extends storage.MemoryStorage {
|
|
|
1254
1254
|
} catch (error$1) {
|
|
1255
1255
|
throw new error.MastraError(
|
|
1256
1256
|
{
|
|
1257
|
-
id: "
|
|
1257
|
+
id: storage.createStorageErrorId("MONGODB", "UPDATE_RESOURCE", "FAILED"),
|
|
1258
1258
|
domain: error.ErrorDomain.STORAGE,
|
|
1259
1259
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1260
1260
|
details: { resourceId }
|
|
@@ -1277,7 +1277,7 @@ var MemoryStorageMongoDB = class extends storage.MemoryStorage {
|
|
|
1277
1277
|
} catch (error$1) {
|
|
1278
1278
|
throw new error.MastraError(
|
|
1279
1279
|
{
|
|
1280
|
-
id: "
|
|
1280
|
+
id: storage.createStorageErrorId("MONGODB", "GET_THREAD_BY_ID", "FAILED"),
|
|
1281
1281
|
domain: error.ErrorDomain.STORAGE,
|
|
1282
1282
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1283
1283
|
details: { threadId }
|
|
@@ -1292,7 +1292,7 @@ var MemoryStorageMongoDB = class extends storage.MemoryStorage {
|
|
|
1292
1292
|
if (page < 0) {
|
|
1293
1293
|
throw new error.MastraError(
|
|
1294
1294
|
{
|
|
1295
|
-
id: "
|
|
1295
|
+
id: storage.createStorageErrorId("MONGODB", "LIST_THREADS_BY_RESOURCE_ID", "INVALID_PAGE"),
|
|
1296
1296
|
domain: error.ErrorDomain.STORAGE,
|
|
1297
1297
|
category: error.ErrorCategory.USER,
|
|
1298
1298
|
details: { page }
|
|
@@ -1338,7 +1338,7 @@ var MemoryStorageMongoDB = class extends storage.MemoryStorage {
|
|
|
1338
1338
|
} catch (error$1) {
|
|
1339
1339
|
throw new error.MastraError(
|
|
1340
1340
|
{
|
|
1341
|
-
id: "
|
|
1341
|
+
id: storage.createStorageErrorId("MONGODB", "LIST_THREADS_BY_RESOURCE_ID", "FAILED"),
|
|
1342
1342
|
domain: error.ErrorDomain.STORAGE,
|
|
1343
1343
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1344
1344
|
details: { resourceId: args.resourceId }
|
|
@@ -1364,7 +1364,7 @@ var MemoryStorageMongoDB = class extends storage.MemoryStorage {
|
|
|
1364
1364
|
} catch (error$1) {
|
|
1365
1365
|
throw new error.MastraError(
|
|
1366
1366
|
{
|
|
1367
|
-
id: "
|
|
1367
|
+
id: storage.createStorageErrorId("MONGODB", "SAVE_THREAD", "FAILED"),
|
|
1368
1368
|
domain: error.ErrorDomain.STORAGE,
|
|
1369
1369
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1370
1370
|
details: { threadId: thread.id }
|
|
@@ -1381,7 +1381,7 @@ var MemoryStorageMongoDB = class extends storage.MemoryStorage {
|
|
|
1381
1381
|
const thread = await this.getThreadById({ threadId: id });
|
|
1382
1382
|
if (!thread) {
|
|
1383
1383
|
throw new error.MastraError({
|
|
1384
|
-
id: "
|
|
1384
|
+
id: storage.createStorageErrorId("MONGODB", "UPDATE_THREAD", "NOT_FOUND"),
|
|
1385
1385
|
domain: error.ErrorDomain.STORAGE,
|
|
1386
1386
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1387
1387
|
details: { threadId: id, status: 404 },
|
|
@@ -1410,7 +1410,7 @@ var MemoryStorageMongoDB = class extends storage.MemoryStorage {
|
|
|
1410
1410
|
} catch (error$1) {
|
|
1411
1411
|
throw new error.MastraError(
|
|
1412
1412
|
{
|
|
1413
|
-
id: "
|
|
1413
|
+
id: storage.createStorageErrorId("MONGODB", "UPDATE_THREAD", "FAILED"),
|
|
1414
1414
|
domain: error.ErrorDomain.STORAGE,
|
|
1415
1415
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1416
1416
|
details: { threadId: id }
|
|
@@ -1429,7 +1429,7 @@ var MemoryStorageMongoDB = class extends storage.MemoryStorage {
|
|
|
1429
1429
|
} catch (error$1) {
|
|
1430
1430
|
throw new error.MastraError(
|
|
1431
1431
|
{
|
|
1432
|
-
id: "
|
|
1432
|
+
id: storage.createStorageErrorId("MONGODB", "DELETE_THREAD", "FAILED"),
|
|
1433
1433
|
domain: error.ErrorDomain.STORAGE,
|
|
1434
1434
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1435
1435
|
details: { threadId }
|
|
@@ -1466,7 +1466,7 @@ var ObservabilityMongoDB = class extends storage.ObservabilityStorage {
|
|
|
1466
1466
|
} catch (error$1) {
|
|
1467
1467
|
throw new error.MastraError(
|
|
1468
1468
|
{
|
|
1469
|
-
id: "
|
|
1469
|
+
id: storage.createStorageErrorId("MONGODB", "CREATE_SPAN", "FAILED"),
|
|
1470
1470
|
domain: error.ErrorDomain.STORAGE,
|
|
1471
1471
|
category: error.ErrorCategory.USER,
|
|
1472
1472
|
details: {
|
|
@@ -1494,7 +1494,7 @@ var ObservabilityMongoDB = class extends storage.ObservabilityStorage {
|
|
|
1494
1494
|
} catch (error$1) {
|
|
1495
1495
|
throw new error.MastraError(
|
|
1496
1496
|
{
|
|
1497
|
-
id: "
|
|
1497
|
+
id: storage.createStorageErrorId("MONGODB", "GET_TRACE", "FAILED"),
|
|
1498
1498
|
domain: error.ErrorDomain.STORAGE,
|
|
1499
1499
|
category: error.ErrorCategory.USER,
|
|
1500
1500
|
details: {
|
|
@@ -1530,7 +1530,7 @@ var ObservabilityMongoDB = class extends storage.ObservabilityStorage {
|
|
|
1530
1530
|
} catch (error$1) {
|
|
1531
1531
|
throw new error.MastraError(
|
|
1532
1532
|
{
|
|
1533
|
-
id: "
|
|
1533
|
+
id: storage.createStorageErrorId("MONGODB", "UPDATE_SPAN", "FAILED"),
|
|
1534
1534
|
domain: error.ErrorDomain.STORAGE,
|
|
1535
1535
|
category: error.ErrorCategory.USER,
|
|
1536
1536
|
details: {
|
|
@@ -1576,7 +1576,7 @@ var ObservabilityMongoDB = class extends storage.ObservabilityStorage {
|
|
|
1576
1576
|
name = `agent run: '${entityId}'`;
|
|
1577
1577
|
} else {
|
|
1578
1578
|
const error$1 = new error.MastraError({
|
|
1579
|
-
id: "
|
|
1579
|
+
id: storage.createStorageErrorId("MONGODB", "GET_TRACES_PAGINATED", "INVALID_ENTITY_TYPE"),
|
|
1580
1580
|
domain: error.ErrorDomain.STORAGE,
|
|
1581
1581
|
category: error.ErrorCategory.USER,
|
|
1582
1582
|
details: {
|
|
@@ -1613,7 +1613,7 @@ var ObservabilityMongoDB = class extends storage.ObservabilityStorage {
|
|
|
1613
1613
|
} catch (error$1) {
|
|
1614
1614
|
throw new error.MastraError(
|
|
1615
1615
|
{
|
|
1616
|
-
id: "
|
|
1616
|
+
id: storage.createStorageErrorId("MONGODB", "GET_TRACES_PAGINATED", "FAILED"),
|
|
1617
1617
|
domain: error.ErrorDomain.STORAGE,
|
|
1618
1618
|
category: error.ErrorCategory.USER
|
|
1619
1619
|
},
|
|
@@ -1641,7 +1641,7 @@ var ObservabilityMongoDB = class extends storage.ObservabilityStorage {
|
|
|
1641
1641
|
} catch (error$1) {
|
|
1642
1642
|
throw new error.MastraError(
|
|
1643
1643
|
{
|
|
1644
|
-
id: "
|
|
1644
|
+
id: storage.createStorageErrorId("MONGODB", "BATCH_CREATE_SPANS", "FAILED"),
|
|
1645
1645
|
domain: error.ErrorDomain.STORAGE,
|
|
1646
1646
|
category: error.ErrorCategory.USER
|
|
1647
1647
|
},
|
|
@@ -1674,7 +1674,7 @@ var ObservabilityMongoDB = class extends storage.ObservabilityStorage {
|
|
|
1674
1674
|
} catch (error$1) {
|
|
1675
1675
|
throw new error.MastraError(
|
|
1676
1676
|
{
|
|
1677
|
-
id: "
|
|
1677
|
+
id: storage.createStorageErrorId("MONGODB", "BATCH_UPDATE_SPANS", "FAILED"),
|
|
1678
1678
|
domain: error.ErrorDomain.STORAGE,
|
|
1679
1679
|
category: error.ErrorCategory.USER
|
|
1680
1680
|
},
|
|
@@ -1691,7 +1691,7 @@ var ObservabilityMongoDB = class extends storage.ObservabilityStorage {
|
|
|
1691
1691
|
} catch (error$1) {
|
|
1692
1692
|
throw new error.MastraError(
|
|
1693
1693
|
{
|
|
1694
|
-
id: "
|
|
1694
|
+
id: storage.createStorageErrorId("MONGODB", "BATCH_DELETE_TRACES", "FAILED"),
|
|
1695
1695
|
domain: error.ErrorDomain.STORAGE,
|
|
1696
1696
|
category: error.ErrorCategory.USER
|
|
1697
1697
|
},
|
|
@@ -1742,7 +1742,7 @@ var StoreOperationsMongoDB = class extends storage.StoreOperations {
|
|
|
1742
1742
|
} catch (error$1) {
|
|
1743
1743
|
const mastraError = new error.MastraError(
|
|
1744
1744
|
{
|
|
1745
|
-
id: "
|
|
1745
|
+
id: storage.createStorageErrorId("MONGODB", "CLEAR_TABLE", "FAILED"),
|
|
1746
1746
|
domain: error.ErrorDomain.STORAGE,
|
|
1747
1747
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1748
1748
|
details: { tableName }
|
|
@@ -1764,7 +1764,7 @@ var StoreOperationsMongoDB = class extends storage.StoreOperations {
|
|
|
1764
1764
|
}
|
|
1765
1765
|
throw new error.MastraError(
|
|
1766
1766
|
{
|
|
1767
|
-
id: "
|
|
1767
|
+
id: storage.createStorageErrorId("MONGODB", "DROP_TABLE", "FAILED"),
|
|
1768
1768
|
domain: error.ErrorDomain.STORAGE,
|
|
1769
1769
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1770
1770
|
details: { tableName }
|
|
@@ -1795,7 +1795,7 @@ var StoreOperationsMongoDB = class extends storage.StoreOperations {
|
|
|
1795
1795
|
} catch (error$1) {
|
|
1796
1796
|
const mastraError = new error.MastraError(
|
|
1797
1797
|
{
|
|
1798
|
-
id: "
|
|
1798
|
+
id: storage.createStorageErrorId("MONGODB", "INSERT", "FAILED"),
|
|
1799
1799
|
domain: error.ErrorDomain.STORAGE,
|
|
1800
1800
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1801
1801
|
details: { tableName }
|
|
@@ -1818,7 +1818,7 @@ var StoreOperationsMongoDB = class extends storage.StoreOperations {
|
|
|
1818
1818
|
} catch (error$1) {
|
|
1819
1819
|
throw new error.MastraError(
|
|
1820
1820
|
{
|
|
1821
|
-
id: "
|
|
1821
|
+
id: storage.createStorageErrorId("MONGODB", "BATCH_INSERT", "FAILED"),
|
|
1822
1822
|
domain: error.ErrorDomain.STORAGE,
|
|
1823
1823
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1824
1824
|
details: { tableName }
|
|
@@ -1835,7 +1835,7 @@ var StoreOperationsMongoDB = class extends storage.StoreOperations {
|
|
|
1835
1835
|
} catch (error$1) {
|
|
1836
1836
|
throw new error.MastraError(
|
|
1837
1837
|
{
|
|
1838
|
-
id: "
|
|
1838
|
+
id: storage.createStorageErrorId("MONGODB", "LOAD", "FAILED"),
|
|
1839
1839
|
domain: error.ErrorDomain.STORAGE,
|
|
1840
1840
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1841
1841
|
details: { tableName }
|
|
@@ -1857,7 +1857,7 @@ var StoreOperationsMongoDB = class extends storage.StoreOperations {
|
|
|
1857
1857
|
} catch (error$1) {
|
|
1858
1858
|
throw new error.MastraError(
|
|
1859
1859
|
{
|
|
1860
|
-
id: "
|
|
1860
|
+
id: storage.createStorageErrorId("MONGODB", "UPDATE", "FAILED"),
|
|
1861
1861
|
domain: error.ErrorDomain.STORAGE,
|
|
1862
1862
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1863
1863
|
details: { tableName }
|
|
@@ -1889,7 +1889,7 @@ var StoreOperationsMongoDB = class extends storage.StoreOperations {
|
|
|
1889
1889
|
} catch (error$1) {
|
|
1890
1890
|
throw new error.MastraError(
|
|
1891
1891
|
{
|
|
1892
|
-
id: "
|
|
1892
|
+
id: storage.createStorageErrorId("MONGODB", "BATCH_UPDATE", "FAILED"),
|
|
1893
1893
|
domain: error.ErrorDomain.STORAGE,
|
|
1894
1894
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1895
1895
|
details: { tableName }
|
|
@@ -1921,7 +1921,7 @@ var ScoresStorageMongoDB = class extends storage.ScoresStorage {
|
|
|
1921
1921
|
} catch (error$1) {
|
|
1922
1922
|
throw new error.MastraError(
|
|
1923
1923
|
{
|
|
1924
|
-
id: "
|
|
1924
|
+
id: storage.createStorageErrorId("MONGODB", "GET_SCORE_BY_ID", "FAILED"),
|
|
1925
1925
|
domain: error.ErrorDomain.STORAGE,
|
|
1926
1926
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1927
1927
|
details: { id }
|
|
@@ -1937,16 +1937,23 @@ var ScoresStorageMongoDB = class extends storage.ScoresStorage {
|
|
|
1937
1937
|
} catch (error$1) {
|
|
1938
1938
|
throw new error.MastraError(
|
|
1939
1939
|
{
|
|
1940
|
-
id: "
|
|
1940
|
+
id: storage.createStorageErrorId("MONGODB", "SAVE_SCORE", "VALIDATION_FAILED"),
|
|
1941
1941
|
domain: error.ErrorDomain.STORAGE,
|
|
1942
|
-
category: error.ErrorCategory.
|
|
1942
|
+
category: error.ErrorCategory.USER,
|
|
1943
|
+
details: {
|
|
1944
|
+
scorer: score.scorer?.id ?? "unknown",
|
|
1945
|
+
entityId: score.entityId ?? "unknown",
|
|
1946
|
+
entityType: score.entityType ?? "unknown",
|
|
1947
|
+
traceId: score.traceId ?? "",
|
|
1948
|
+
spanId: score.spanId ?? ""
|
|
1949
|
+
}
|
|
1943
1950
|
},
|
|
1944
1951
|
error$1
|
|
1945
1952
|
);
|
|
1946
1953
|
}
|
|
1947
1954
|
try {
|
|
1948
1955
|
const now = /* @__PURE__ */ new Date();
|
|
1949
|
-
const scoreId =
|
|
1956
|
+
const scoreId = crypto.randomUUID();
|
|
1950
1957
|
const scorer = typeof validatedScore.scorer === "string" ? storage.safelyParseJSON(validatedScore.scorer) : validatedScore.scorer;
|
|
1951
1958
|
const preprocessStepResult = typeof validatedScore.preprocessStepResult === "string" ? storage.safelyParseJSON(validatedScore.preprocessStepResult) : validatedScore.preprocessStepResult;
|
|
1952
1959
|
const analyzeStepResult = typeof validatedScore.analyzeStepResult === "string" ? storage.safelyParseJSON(validatedScore.analyzeStepResult) : validatedScore.analyzeStepResult;
|
|
@@ -1958,6 +1965,7 @@ var ScoresStorageMongoDB = class extends storage.ScoresStorage {
|
|
|
1958
1965
|
const updatedAt = now;
|
|
1959
1966
|
const dataToSave = {
|
|
1960
1967
|
...validatedScore,
|
|
1968
|
+
id: scoreId,
|
|
1961
1969
|
scorer,
|
|
1962
1970
|
preprocessStepResult,
|
|
1963
1971
|
analyzeStepResult,
|
|
@@ -1970,17 +1978,11 @@ var ScoresStorageMongoDB = class extends storage.ScoresStorage {
|
|
|
1970
1978
|
};
|
|
1971
1979
|
const collection = await this.operations.getCollection(storage.TABLE_SCORERS);
|
|
1972
1980
|
await collection.insertOne(dataToSave);
|
|
1973
|
-
|
|
1974
|
-
...score,
|
|
1975
|
-
id: scoreId,
|
|
1976
|
-
createdAt: now,
|
|
1977
|
-
updatedAt: now
|
|
1978
|
-
};
|
|
1979
|
-
return { score: savedScore };
|
|
1981
|
+
return { score: dataToSave };
|
|
1980
1982
|
} catch (error$1) {
|
|
1981
1983
|
throw new error.MastraError(
|
|
1982
1984
|
{
|
|
1983
|
-
id: "
|
|
1985
|
+
id: storage.createStorageErrorId("MONGODB", "SAVE_SCORE", "FAILED"),
|
|
1984
1986
|
domain: error.ErrorDomain.STORAGE,
|
|
1985
1987
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1986
1988
|
details: { scorerId: score.scorerId, runId: score.runId }
|
|
@@ -2042,7 +2044,7 @@ var ScoresStorageMongoDB = class extends storage.ScoresStorage {
|
|
|
2042
2044
|
} catch (error$1) {
|
|
2043
2045
|
throw new error.MastraError(
|
|
2044
2046
|
{
|
|
2045
|
-
id: "
|
|
2047
|
+
id: storage.createStorageErrorId("MONGODB", "LIST_SCORES_BY_SCORER_ID", "FAILED"),
|
|
2046
2048
|
domain: error.ErrorDomain.STORAGE,
|
|
2047
2049
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
2048
2050
|
details: { scorerId, page: pagination.page, perPage: pagination.perPage }
|
|
@@ -2091,7 +2093,7 @@ var ScoresStorageMongoDB = class extends storage.ScoresStorage {
|
|
|
2091
2093
|
} catch (error$1) {
|
|
2092
2094
|
throw new error.MastraError(
|
|
2093
2095
|
{
|
|
2094
|
-
id: "
|
|
2096
|
+
id: storage.createStorageErrorId("MONGODB", "LIST_SCORES_BY_RUN_ID", "FAILED"),
|
|
2095
2097
|
domain: error.ErrorDomain.STORAGE,
|
|
2096
2098
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
2097
2099
|
details: { runId, page: pagination.page, perPage: pagination.perPage }
|
|
@@ -2141,7 +2143,7 @@ var ScoresStorageMongoDB = class extends storage.ScoresStorage {
|
|
|
2141
2143
|
} catch (error$1) {
|
|
2142
2144
|
throw new error.MastraError(
|
|
2143
2145
|
{
|
|
2144
|
-
id: "
|
|
2146
|
+
id: storage.createStorageErrorId("MONGODB", "LIST_SCORES_BY_ENTITY_ID", "FAILED"),
|
|
2145
2147
|
domain: error.ErrorDomain.STORAGE,
|
|
2146
2148
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
2147
2149
|
details: { entityId, entityType, page: pagination.page, perPage: pagination.perPage }
|
|
@@ -2192,7 +2194,7 @@ var ScoresStorageMongoDB = class extends storage.ScoresStorage {
|
|
|
2192
2194
|
} catch (error$1) {
|
|
2193
2195
|
throw new error.MastraError(
|
|
2194
2196
|
{
|
|
2195
|
-
id: "
|
|
2197
|
+
id: storage.createStorageErrorId("MONGODB", "LIST_SCORES_BY_SPAN", "FAILED"),
|
|
2196
2198
|
domain: error.ErrorDomain.STORAGE,
|
|
2197
2199
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
2198
2200
|
details: { traceId, spanId, page: pagination.page, perPage: pagination.perPage }
|
|
@@ -2249,7 +2251,7 @@ var WorkflowsStorageMongoDB = class extends storage.WorkflowsStorage {
|
|
|
2249
2251
|
} catch (error$1) {
|
|
2250
2252
|
throw new error.MastraError(
|
|
2251
2253
|
{
|
|
2252
|
-
id: "
|
|
2254
|
+
id: storage.createStorageErrorId("MONGODB", "PERSIST_WORKFLOW_SNAPSHOT", "FAILED"),
|
|
2253
2255
|
domain: error.ErrorDomain.STORAGE,
|
|
2254
2256
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
2255
2257
|
details: { workflowName, runId }
|
|
@@ -2277,7 +2279,7 @@ var WorkflowsStorageMongoDB = class extends storage.WorkflowsStorage {
|
|
|
2277
2279
|
} catch (error$1) {
|
|
2278
2280
|
throw new error.MastraError(
|
|
2279
2281
|
{
|
|
2280
|
-
id: "
|
|
2282
|
+
id: storage.createStorageErrorId("MONGODB", "LOAD_WORKFLOW_SNAPSHOT", "FAILED"),
|
|
2281
2283
|
domain: error.ErrorDomain.STORAGE,
|
|
2282
2284
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
2283
2285
|
details: { workflowName, runId }
|
|
@@ -2316,7 +2318,7 @@ var WorkflowsStorageMongoDB = class extends storage.WorkflowsStorage {
|
|
|
2316
2318
|
if (options.page < 0) {
|
|
2317
2319
|
throw new error.MastraError(
|
|
2318
2320
|
{
|
|
2319
|
-
id: "
|
|
2321
|
+
id: storage.createStorageErrorId("MONGODB", "LIST_WORKFLOW_RUNS", "INVALID_PAGE"),
|
|
2320
2322
|
domain: error.ErrorDomain.STORAGE,
|
|
2321
2323
|
category: error.ErrorCategory.USER,
|
|
2322
2324
|
details: { page: options.page }
|
|
@@ -2342,7 +2344,7 @@ var WorkflowsStorageMongoDB = class extends storage.WorkflowsStorage {
|
|
|
2342
2344
|
} catch (error$1) {
|
|
2343
2345
|
throw new error.MastraError(
|
|
2344
2346
|
{
|
|
2345
|
-
id: "
|
|
2347
|
+
id: storage.createStorageErrorId("MONGODB", "LIST_WORKFLOW_RUNS", "FAILED"),
|
|
2346
2348
|
domain: error.ErrorDomain.STORAGE,
|
|
2347
2349
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
2348
2350
|
details: { workflowName: options.workflowName || "unknown" }
|
|
@@ -2369,7 +2371,7 @@ var WorkflowsStorageMongoDB = class extends storage.WorkflowsStorage {
|
|
|
2369
2371
|
} catch (error$1) {
|
|
2370
2372
|
throw new error.MastraError(
|
|
2371
2373
|
{
|
|
2372
|
-
id: "
|
|
2374
|
+
id: storage.createStorageErrorId("MONGODB", "GET_WORKFLOW_RUN_BY_ID", "FAILED"),
|
|
2373
2375
|
domain: error.ErrorDomain.STORAGE,
|
|
2374
2376
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
2375
2377
|
details: { runId: args.runId }
|
|
@@ -2407,7 +2409,7 @@ var loadConnector = (config) => {
|
|
|
2407
2409
|
} catch (error$1) {
|
|
2408
2410
|
throw new error.MastraError(
|
|
2409
2411
|
{
|
|
2410
|
-
id: "
|
|
2412
|
+
id: storage.createStorageErrorId("MONGODB", "CONSTRUCTOR", "FAILED"),
|
|
2411
2413
|
domain: error.ErrorDomain.STORAGE,
|
|
2412
2414
|
category: error.ErrorCategory.USER,
|
|
2413
2415
|
details: { connectionHandler: true }
|
|
@@ -2425,7 +2427,7 @@ var loadConnector = (config) => {
|
|
|
2425
2427
|
} catch (error$1) {
|
|
2426
2428
|
throw new error.MastraError(
|
|
2427
2429
|
{
|
|
2428
|
-
id: "
|
|
2430
|
+
id: storage.createStorageErrorId("MONGODB", "CONSTRUCTOR", "FAILED"),
|
|
2429
2431
|
domain: error.ErrorDomain.STORAGE,
|
|
2430
2432
|
category: error.ErrorCategory.USER,
|
|
2431
2433
|
details: { url: config?.url, dbName: config?.dbName }
|
|
@@ -2448,7 +2450,7 @@ var MongoDBStore = class extends storage.MastraStorage {
|
|
|
2448
2450
|
};
|
|
2449
2451
|
}
|
|
2450
2452
|
constructor(config) {
|
|
2451
|
-
super({ id: config.id, name: "MongoDBStore" });
|
|
2453
|
+
super({ id: config.id, name: "MongoDBStore", disableInit: config.disableInit });
|
|
2452
2454
|
this.stores = {};
|
|
2453
2455
|
this.#connector = loadConnector(config);
|
|
2454
2456
|
const operations = new StoreOperationsMongoDB({
|
|
@@ -2568,7 +2570,7 @@ var MongoDBStore = class extends storage.MastraStorage {
|
|
|
2568
2570
|
} catch (error$1) {
|
|
2569
2571
|
throw new error.MastraError(
|
|
2570
2572
|
{
|
|
2571
|
-
id: "
|
|
2573
|
+
id: storage.createStorageErrorId("MONGODB", "CLOSE", "FAILED"),
|
|
2572
2574
|
domain: error.ErrorDomain.STORAGE,
|
|
2573
2575
|
category: error.ErrorCategory.USER
|
|
2574
2576
|
},
|
|
@@ -2640,7 +2642,7 @@ var MongoDBStore = class extends storage.MastraStorage {
|
|
|
2640
2642
|
async createSpan(span) {
|
|
2641
2643
|
if (!this.stores.observability) {
|
|
2642
2644
|
throw new error.MastraError({
|
|
2643
|
-
id: "
|
|
2645
|
+
id: storage.createStorageErrorId("MONGODB", "OBSERVABILITY", "NOT_INITIALIZED"),
|
|
2644
2646
|
domain: error.ErrorDomain.STORAGE,
|
|
2645
2647
|
category: error.ErrorCategory.SYSTEM,
|
|
2646
2648
|
text: "Observability storage is not initialized"
|
|
@@ -2655,7 +2657,7 @@ var MongoDBStore = class extends storage.MastraStorage {
|
|
|
2655
2657
|
}) {
|
|
2656
2658
|
if (!this.stores.observability) {
|
|
2657
2659
|
throw new error.MastraError({
|
|
2658
|
-
id: "
|
|
2660
|
+
id: storage.createStorageErrorId("MONGODB", "OBSERVABILITY", "NOT_INITIALIZED"),
|
|
2659
2661
|
domain: error.ErrorDomain.STORAGE,
|
|
2660
2662
|
category: error.ErrorCategory.SYSTEM,
|
|
2661
2663
|
text: "Observability storage is not initialized"
|
|
@@ -2666,7 +2668,7 @@ var MongoDBStore = class extends storage.MastraStorage {
|
|
|
2666
2668
|
async getTrace(traceId) {
|
|
2667
2669
|
if (!this.stores.observability) {
|
|
2668
2670
|
throw new error.MastraError({
|
|
2669
|
-
id: "
|
|
2671
|
+
id: storage.createStorageErrorId("MONGODB", "OBSERVABILITY", "NOT_INITIALIZED"),
|
|
2670
2672
|
domain: error.ErrorDomain.STORAGE,
|
|
2671
2673
|
category: error.ErrorCategory.SYSTEM,
|
|
2672
2674
|
text: "Observability storage is not initialized"
|
|
@@ -2677,7 +2679,7 @@ var MongoDBStore = class extends storage.MastraStorage {
|
|
|
2677
2679
|
async getTracesPaginated(args) {
|
|
2678
2680
|
if (!this.stores.observability) {
|
|
2679
2681
|
throw new error.MastraError({
|
|
2680
|
-
id: "
|
|
2682
|
+
id: storage.createStorageErrorId("MONGODB", "OBSERVABILITY", "NOT_INITIALIZED"),
|
|
2681
2683
|
domain: error.ErrorDomain.STORAGE,
|
|
2682
2684
|
category: error.ErrorCategory.SYSTEM,
|
|
2683
2685
|
text: "Observability storage is not initialized"
|
|
@@ -2688,7 +2690,7 @@ var MongoDBStore = class extends storage.MastraStorage {
|
|
|
2688
2690
|
async batchCreateSpans(args) {
|
|
2689
2691
|
if (!this.stores.observability) {
|
|
2690
2692
|
throw new error.MastraError({
|
|
2691
|
-
id: "
|
|
2693
|
+
id: storage.createStorageErrorId("MONGODB", "OBSERVABILITY", "NOT_INITIALIZED"),
|
|
2692
2694
|
domain: error.ErrorDomain.STORAGE,
|
|
2693
2695
|
category: error.ErrorCategory.SYSTEM,
|
|
2694
2696
|
text: "Observability storage is not initialized"
|
|
@@ -2699,7 +2701,7 @@ var MongoDBStore = class extends storage.MastraStorage {
|
|
|
2699
2701
|
async batchUpdateSpans(args) {
|
|
2700
2702
|
if (!this.stores.observability) {
|
|
2701
2703
|
throw new error.MastraError({
|
|
2702
|
-
id: "
|
|
2704
|
+
id: storage.createStorageErrorId("MONGODB", "OBSERVABILITY", "NOT_INITIALIZED"),
|
|
2703
2705
|
domain: error.ErrorDomain.STORAGE,
|
|
2704
2706
|
category: error.ErrorCategory.SYSTEM,
|
|
2705
2707
|
text: "Observability storage is not initialized"
|
|
@@ -2710,7 +2712,7 @@ var MongoDBStore = class extends storage.MastraStorage {
|
|
|
2710
2712
|
async batchDeleteTraces(args) {
|
|
2711
2713
|
if (!this.stores.observability) {
|
|
2712
2714
|
throw new error.MastraError({
|
|
2713
|
-
id: "
|
|
2715
|
+
id: storage.createStorageErrorId("MONGODB", "OBSERVABILITY", "NOT_INITIALIZED"),
|
|
2714
2716
|
domain: error.ErrorDomain.STORAGE,
|
|
2715
2717
|
category: error.ErrorCategory.SYSTEM,
|
|
2716
2718
|
text: "Observability storage is not initialized"
|