@mastra/dynamodb 1.0.0-beta.2 → 1.0.0-beta.3
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 +31 -0
- package/dist/index.cjs +42 -42
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +43 -43
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/dist/storage/domains/operations/index.d.ts.map +1 -1
- package/dist/storage/domains/score/index.d.ts.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +20 -0
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @mastra/dynamodb
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.3
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Add `disableInit` option to all storage adapters ([#10851](https://github.com/mastra-ai/mastra/pull/10851))
|
|
8
|
+
|
|
9
|
+
Adds a new `disableInit` config option to all storage providers that allows users to disable automatic table creation/migrations at runtime. This is useful for CI/CD pipelines where you want to run migrations during deployment with elevated credentials, then run the application with `disableInit: true` so it doesn't attempt schema changes at runtime.
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
// CI/CD script - run migrations
|
|
13
|
+
const storage = new PostgresStore({
|
|
14
|
+
connectionString: DATABASE_URL,
|
|
15
|
+
id: 'pg-storage',
|
|
16
|
+
});
|
|
17
|
+
await storage.init();
|
|
18
|
+
|
|
19
|
+
// Runtime - skip auto-init
|
|
20
|
+
const storage = new PostgresStore({
|
|
21
|
+
connectionString: DATABASE_URL,
|
|
22
|
+
id: 'pg-storage',
|
|
23
|
+
disableInit: true,
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Standardize error IDs across all storage and vector stores using centralized helper functions (`createStorageErrorId` and `createVectorErrorId`). This ensures consistent error ID patterns (`MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS}` and `MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}`) across the codebase for better error tracking and debugging. ([#10913](https://github.com/mastra-ai/mastra/pull/10913))
|
|
30
|
+
|
|
31
|
+
- Updated dependencies [[`3076c67`](https://github.com/mastra-ai/mastra/commit/3076c6778b18988ae7d5c4c5c466366974b2d63f), [`85d7ee1`](https://github.com/mastra-ai/mastra/commit/85d7ee18ff4e14d625a8a30ec6656bb49804989b), [`c6c1092`](https://github.com/mastra-ai/mastra/commit/c6c1092f8fbf76109303f69e000e96fd1960c4ce), [`81dc110`](https://github.com/mastra-ai/mastra/commit/81dc11008d147cf5bdc8996ead1aa61dbdebb6fc), [`7aedb74`](https://github.com/mastra-ai/mastra/commit/7aedb74883adf66af38e270e4068fd42e7a37036), [`8f02d80`](https://github.com/mastra-ai/mastra/commit/8f02d800777397e4b45d7f1ad041988a8b0c6630), [`d7aad50`](https://github.com/mastra-ai/mastra/commit/d7aad501ce61646b76b4b511e558ac4eea9884d0), [`ce0a73a`](https://github.com/mastra-ai/mastra/commit/ce0a73abeaa75b10ca38f9e40a255a645d50ebfb), [`a02e542`](https://github.com/mastra-ai/mastra/commit/a02e542d23179bad250b044b17ff023caa61739f), [`a372c64`](https://github.com/mastra-ai/mastra/commit/a372c640ad1fd12e8f0613cebdc682fc156b4d95), [`8846867`](https://github.com/mastra-ai/mastra/commit/8846867ffa9a3746767618e314bebac08eb77d87), [`42a42cf`](https://github.com/mastra-ai/mastra/commit/42a42cf3132b9786feecbb8c13c583dce5b0e198), [`ae08bf0`](https://github.com/mastra-ai/mastra/commit/ae08bf0ebc6a4e4da992b711c4a389c32ba84cf4), [`21735a7`](https://github.com/mastra-ai/mastra/commit/21735a7ef306963554a69a89b44f06c3bcd85141), [`1d877b8`](https://github.com/mastra-ai/mastra/commit/1d877b8d7b536a251c1a7a18db7ddcf4f68d6f8b)]:
|
|
32
|
+
- @mastra/core@1.0.0-beta.7
|
|
33
|
+
|
|
3
34
|
## 1.0.0-beta.2
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -989,7 +989,7 @@ var MemoryStorageDynamoDB = class extends storage.MemoryStorage {
|
|
|
989
989
|
} catch (error$1) {
|
|
990
990
|
throw new error.MastraError(
|
|
991
991
|
{
|
|
992
|
-
id: "
|
|
992
|
+
id: storage.createStorageErrorId("DYNAMODB", "GET_THREAD_BY_ID", "FAILED"),
|
|
993
993
|
domain: error.ErrorDomain.STORAGE,
|
|
994
994
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
995
995
|
details: { threadId }
|
|
@@ -1023,7 +1023,7 @@ var MemoryStorageDynamoDB = class extends storage.MemoryStorage {
|
|
|
1023
1023
|
} catch (error$1) {
|
|
1024
1024
|
throw new error.MastraError(
|
|
1025
1025
|
{
|
|
1026
|
-
id: "
|
|
1026
|
+
id: storage.createStorageErrorId("DYNAMODB", "SAVE_THREAD", "FAILED"),
|
|
1027
1027
|
domain: error.ErrorDomain.STORAGE,
|
|
1028
1028
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1029
1029
|
details: { threadId: thread.id }
|
|
@@ -1065,7 +1065,7 @@ var MemoryStorageDynamoDB = class extends storage.MemoryStorage {
|
|
|
1065
1065
|
} catch (error$1) {
|
|
1066
1066
|
throw new error.MastraError(
|
|
1067
1067
|
{
|
|
1068
|
-
id: "
|
|
1068
|
+
id: storage.createStorageErrorId("DYNAMODB", "UPDATE_THREAD", "FAILED"),
|
|
1069
1069
|
domain: error.ErrorDomain.STORAGE,
|
|
1070
1070
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1071
1071
|
details: { threadId: id }
|
|
@@ -1097,7 +1097,7 @@ var MemoryStorageDynamoDB = class extends storage.MemoryStorage {
|
|
|
1097
1097
|
} catch (error$1) {
|
|
1098
1098
|
throw new error.MastraError(
|
|
1099
1099
|
{
|
|
1100
|
-
id: "
|
|
1100
|
+
id: storage.createStorageErrorId("DYNAMODB", "DELETE_THREAD", "FAILED"),
|
|
1101
1101
|
domain: error.ErrorDomain.STORAGE,
|
|
1102
1102
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1103
1103
|
details: { threadId }
|
|
@@ -1123,7 +1123,7 @@ var MemoryStorageDynamoDB = class extends storage.MemoryStorage {
|
|
|
1123
1123
|
} catch (error$1) {
|
|
1124
1124
|
throw new error.MastraError(
|
|
1125
1125
|
{
|
|
1126
|
-
id: "
|
|
1126
|
+
id: storage.createStorageErrorId("DYNAMODB", "LIST_MESSAGES_BY_ID", "FAILED"),
|
|
1127
1127
|
domain: error.ErrorDomain.STORAGE,
|
|
1128
1128
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1129
1129
|
details: { messageIds: JSON.stringify(messageIds) }
|
|
@@ -1138,7 +1138,7 @@ var MemoryStorageDynamoDB = class extends storage.MemoryStorage {
|
|
|
1138
1138
|
if (threadIds.length === 0 || threadIds.some((id) => !id.trim())) {
|
|
1139
1139
|
throw new error.MastraError(
|
|
1140
1140
|
{
|
|
1141
|
-
id: "
|
|
1141
|
+
id: storage.createStorageErrorId("DYNAMODB", "LIST_MESSAGES", "INVALID_THREAD_ID"),
|
|
1142
1142
|
domain: error.ErrorDomain.STORAGE,
|
|
1143
1143
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1144
1144
|
details: { threadId: Array.isArray(threadId) ? threadId.join(",") : threadId }
|
|
@@ -1152,7 +1152,7 @@ var MemoryStorageDynamoDB = class extends storage.MemoryStorage {
|
|
|
1152
1152
|
if (page < 0) {
|
|
1153
1153
|
throw new error.MastraError(
|
|
1154
1154
|
{
|
|
1155
|
-
id: "
|
|
1155
|
+
id: storage.createStorageErrorId("DYNAMODB", "LIST_MESSAGES", "INVALID_PAGE"),
|
|
1156
1156
|
domain: error.ErrorDomain.STORAGE,
|
|
1157
1157
|
category: error.ErrorCategory.USER,
|
|
1158
1158
|
details: { page }
|
|
@@ -1250,7 +1250,7 @@ var MemoryStorageDynamoDB = class extends storage.MemoryStorage {
|
|
|
1250
1250
|
} catch (error$1) {
|
|
1251
1251
|
const mastraError = new error.MastraError(
|
|
1252
1252
|
{
|
|
1253
|
-
id: "
|
|
1253
|
+
id: storage.createStorageErrorId("DYNAMODB", "LIST_MESSAGES", "FAILED"),
|
|
1254
1254
|
domain: error.ErrorDomain.STORAGE,
|
|
1255
1255
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1256
1256
|
details: {
|
|
@@ -1333,7 +1333,7 @@ var MemoryStorageDynamoDB = class extends storage.MemoryStorage {
|
|
|
1333
1333
|
} catch (error$1) {
|
|
1334
1334
|
throw new error.MastraError(
|
|
1335
1335
|
{
|
|
1336
|
-
id: "
|
|
1336
|
+
id: storage.createStorageErrorId("DYNAMODB", "SAVE_MESSAGES", "FAILED"),
|
|
1337
1337
|
domain: error.ErrorDomain.STORAGE,
|
|
1338
1338
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1339
1339
|
details: { count: messages.length }
|
|
@@ -1348,7 +1348,7 @@ var MemoryStorageDynamoDB = class extends storage.MemoryStorage {
|
|
|
1348
1348
|
if (page < 0) {
|
|
1349
1349
|
throw new error.MastraError(
|
|
1350
1350
|
{
|
|
1351
|
-
id: "
|
|
1351
|
+
id: storage.createStorageErrorId("DYNAMODB", "LIST_THREADS_BY_RESOURCE_ID", "INVALID_PAGE"),
|
|
1352
1352
|
domain: error.ErrorDomain.STORAGE,
|
|
1353
1353
|
category: error.ErrorCategory.USER,
|
|
1354
1354
|
details: { page }
|
|
@@ -1383,7 +1383,7 @@ var MemoryStorageDynamoDB = class extends storage.MemoryStorage {
|
|
|
1383
1383
|
} catch (error$1) {
|
|
1384
1384
|
throw new error.MastraError(
|
|
1385
1385
|
{
|
|
1386
|
-
id: "
|
|
1386
|
+
id: storage.createStorageErrorId("DYNAMODB", "LIST_THREADS_BY_RESOURCE_ID", "FAILED"),
|
|
1387
1387
|
domain: error.ErrorDomain.STORAGE,
|
|
1388
1388
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1389
1389
|
details: { resourceId, page, perPage }
|
|
@@ -1517,7 +1517,7 @@ var MemoryStorageDynamoDB = class extends storage.MemoryStorage {
|
|
|
1517
1517
|
} catch (error$1) {
|
|
1518
1518
|
throw new error.MastraError(
|
|
1519
1519
|
{
|
|
1520
|
-
id: "
|
|
1520
|
+
id: storage.createStorageErrorId("DYNAMODB", "UPDATE_MESSAGES", "FAILED"),
|
|
1521
1521
|
domain: error.ErrorDomain.STORAGE,
|
|
1522
1522
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1523
1523
|
details: { count: messages.length }
|
|
@@ -1546,7 +1546,7 @@ var MemoryStorageDynamoDB = class extends storage.MemoryStorage {
|
|
|
1546
1546
|
} catch (error$1) {
|
|
1547
1547
|
throw new error.MastraError(
|
|
1548
1548
|
{
|
|
1549
|
-
id: "
|
|
1549
|
+
id: storage.createStorageErrorId("DYNAMODB", "GET_RESOURCE_BY_ID", "FAILED"),
|
|
1550
1550
|
domain: error.ErrorDomain.STORAGE,
|
|
1551
1551
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1552
1552
|
details: { resourceId }
|
|
@@ -1578,7 +1578,7 @@ var MemoryStorageDynamoDB = class extends storage.MemoryStorage {
|
|
|
1578
1578
|
} catch (error$1) {
|
|
1579
1579
|
throw new error.MastraError(
|
|
1580
1580
|
{
|
|
1581
|
-
id: "
|
|
1581
|
+
id: storage.createStorageErrorId("DYNAMODB", "SAVE_RESOURCE", "FAILED"),
|
|
1582
1582
|
domain: error.ErrorDomain.STORAGE,
|
|
1583
1583
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1584
1584
|
details: { resourceId: resource.id }
|
|
@@ -1627,7 +1627,7 @@ var MemoryStorageDynamoDB = class extends storage.MemoryStorage {
|
|
|
1627
1627
|
} catch (error$1) {
|
|
1628
1628
|
throw new error.MastraError(
|
|
1629
1629
|
{
|
|
1630
|
-
id: "
|
|
1630
|
+
id: storage.createStorageErrorId("DYNAMODB", "UPDATE_RESOURCE", "FAILED"),
|
|
1631
1631
|
domain: error.ErrorDomain.STORAGE,
|
|
1632
1632
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1633
1633
|
details: { resourceId }
|
|
@@ -1727,7 +1727,7 @@ var StoreOperationsDynamoDB = class extends storage.StoreOperations {
|
|
|
1727
1727
|
}
|
|
1728
1728
|
throw new error.MastraError(
|
|
1729
1729
|
{
|
|
1730
|
-
id: "
|
|
1730
|
+
id: storage.createStorageErrorId("DYNAMODB", "VALIDATE_TABLE_EXISTS", "FAILED"),
|
|
1731
1731
|
domain: error.ErrorDomain.STORAGE,
|
|
1732
1732
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1733
1733
|
details: { tableName: this.tableName }
|
|
@@ -1760,7 +1760,7 @@ var StoreOperationsDynamoDB = class extends storage.StoreOperations {
|
|
|
1760
1760
|
this.logger.error("Error validating table access", { tableName: this.tableName, error: error$1 });
|
|
1761
1761
|
throw new error.MastraError(
|
|
1762
1762
|
{
|
|
1763
|
-
id: "
|
|
1763
|
+
id: storage.createStorageErrorId("DYNAMODB", "VALIDATE_TABLE_ACCESS", "FAILED"),
|
|
1764
1764
|
domain: error.ErrorDomain.STORAGE,
|
|
1765
1765
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1766
1766
|
details: { tableName: this.tableName }
|
|
@@ -1774,7 +1774,7 @@ var StoreOperationsDynamoDB = class extends storage.StoreOperations {
|
|
|
1774
1774
|
const entityName = this.getEntityNameForTable(tableName);
|
|
1775
1775
|
if (!entityName || !this.service.entities[entityName]) {
|
|
1776
1776
|
throw new error.MastraError({
|
|
1777
|
-
id: "
|
|
1777
|
+
id: storage.createStorageErrorId("DYNAMODB", "INSERT", "INVALID_ARGS"),
|
|
1778
1778
|
domain: error.ErrorDomain.STORAGE,
|
|
1779
1779
|
category: error.ErrorCategory.USER,
|
|
1780
1780
|
text: "No entity defined for tableName",
|
|
@@ -1787,7 +1787,7 @@ var StoreOperationsDynamoDB = class extends storage.StoreOperations {
|
|
|
1787
1787
|
} catch (error$1) {
|
|
1788
1788
|
throw new error.MastraError(
|
|
1789
1789
|
{
|
|
1790
|
-
id: "
|
|
1790
|
+
id: storage.createStorageErrorId("DYNAMODB", "INSERT", "FAILED"),
|
|
1791
1791
|
domain: error.ErrorDomain.STORAGE,
|
|
1792
1792
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1793
1793
|
details: { tableName }
|
|
@@ -1806,7 +1806,7 @@ var StoreOperationsDynamoDB = class extends storage.StoreOperations {
|
|
|
1806
1806
|
const entityName = this.getEntityNameForTable(tableName);
|
|
1807
1807
|
if (!entityName || !this.service.entities[entityName]) {
|
|
1808
1808
|
throw new error.MastraError({
|
|
1809
|
-
id: "
|
|
1809
|
+
id: storage.createStorageErrorId("DYNAMODB", "CLEAR_TABLE", "INVALID_ARGS"),
|
|
1810
1810
|
domain: error.ErrorDomain.STORAGE,
|
|
1811
1811
|
category: error.ErrorCategory.USER,
|
|
1812
1812
|
text: "No entity defined for tableName",
|
|
@@ -1869,7 +1869,7 @@ var StoreOperationsDynamoDB = class extends storage.StoreOperations {
|
|
|
1869
1869
|
} catch (error$1) {
|
|
1870
1870
|
throw new error.MastraError(
|
|
1871
1871
|
{
|
|
1872
|
-
id: "
|
|
1872
|
+
id: storage.createStorageErrorId("DYNAMODB", "CLEAR_TABLE", "FAILED"),
|
|
1873
1873
|
domain: error.ErrorDomain.STORAGE,
|
|
1874
1874
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1875
1875
|
details: { tableName }
|
|
@@ -1886,7 +1886,7 @@ var StoreOperationsDynamoDB = class extends storage.StoreOperations {
|
|
|
1886
1886
|
const entityName = this.getEntityNameForTable(tableName);
|
|
1887
1887
|
if (!entityName || !this.service.entities[entityName]) {
|
|
1888
1888
|
throw new error.MastraError({
|
|
1889
|
-
id: "
|
|
1889
|
+
id: storage.createStorageErrorId("DYNAMODB", "BATCH_INSERT", "INVALID_ARGS"),
|
|
1890
1890
|
domain: error.ErrorDomain.STORAGE,
|
|
1891
1891
|
category: error.ErrorCategory.USER,
|
|
1892
1892
|
text: "No entity defined for tableName",
|
|
@@ -1914,7 +1914,7 @@ var StoreOperationsDynamoDB = class extends storage.StoreOperations {
|
|
|
1914
1914
|
} catch (error$1) {
|
|
1915
1915
|
throw new error.MastraError(
|
|
1916
1916
|
{
|
|
1917
|
-
id: "
|
|
1917
|
+
id: storage.createStorageErrorId("DYNAMODB", "BATCH_INSERT", "FAILED"),
|
|
1918
1918
|
domain: error.ErrorDomain.STORAGE,
|
|
1919
1919
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1920
1920
|
details: { tableName }
|
|
@@ -1931,7 +1931,7 @@ var StoreOperationsDynamoDB = class extends storage.StoreOperations {
|
|
|
1931
1931
|
const entityName = this.getEntityNameForTable(tableName);
|
|
1932
1932
|
if (!entityName || !this.service.entities[entityName]) {
|
|
1933
1933
|
throw new error.MastraError({
|
|
1934
|
-
id: "
|
|
1934
|
+
id: storage.createStorageErrorId("DYNAMODB", "LOAD", "INVALID_ARGS"),
|
|
1935
1935
|
domain: error.ErrorDomain.STORAGE,
|
|
1936
1936
|
category: error.ErrorCategory.USER,
|
|
1937
1937
|
text: "No entity defined for tableName",
|
|
@@ -1949,7 +1949,7 @@ var StoreOperationsDynamoDB = class extends storage.StoreOperations {
|
|
|
1949
1949
|
} catch (error$1) {
|
|
1950
1950
|
throw new error.MastraError(
|
|
1951
1951
|
{
|
|
1952
|
-
id: "
|
|
1952
|
+
id: storage.createStorageErrorId("DYNAMODB", "LOAD", "FAILED"),
|
|
1953
1953
|
domain: error.ErrorDomain.STORAGE,
|
|
1954
1954
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1955
1955
|
details: { tableName }
|
|
@@ -2000,7 +2000,7 @@ var ScoresStorageDynamoDB = class extends storage.ScoresStorage {
|
|
|
2000
2000
|
} catch (error$1) {
|
|
2001
2001
|
throw new error.MastraError(
|
|
2002
2002
|
{
|
|
2003
|
-
id: "
|
|
2003
|
+
id: storage.createStorageErrorId("DYNAMODB", "GET_SCORE_BY_ID", "FAILED"),
|
|
2004
2004
|
domain: error.ErrorDomain.STORAGE,
|
|
2005
2005
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
2006
2006
|
details: { id }
|
|
@@ -2016,7 +2016,7 @@ var ScoresStorageDynamoDB = class extends storage.ScoresStorage {
|
|
|
2016
2016
|
} catch (error$1) {
|
|
2017
2017
|
throw new error.MastraError(
|
|
2018
2018
|
{
|
|
2019
|
-
id: "
|
|
2019
|
+
id: storage.createStorageErrorId("DYNAMODB", "SAVE_SCORE", "VALIDATION_FAILED"),
|
|
2020
2020
|
domain: error.ErrorDomain.STORAGE,
|
|
2021
2021
|
category: error.ErrorCategory.THIRD_PARTY
|
|
2022
2022
|
},
|
|
@@ -2064,7 +2064,7 @@ var ScoresStorageDynamoDB = class extends storage.ScoresStorage {
|
|
|
2064
2064
|
} catch (error$1) {
|
|
2065
2065
|
throw new error.MastraError(
|
|
2066
2066
|
{
|
|
2067
|
-
id: "
|
|
2067
|
+
id: storage.createStorageErrorId("DYNAMODB", "SAVE_SCORE", "FAILED"),
|
|
2068
2068
|
domain: error.ErrorDomain.STORAGE,
|
|
2069
2069
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
2070
2070
|
details: { scorerId: score.scorerId, runId: score.runId }
|
|
@@ -2112,7 +2112,7 @@ var ScoresStorageDynamoDB = class extends storage.ScoresStorage {
|
|
|
2112
2112
|
} catch (error$1) {
|
|
2113
2113
|
throw new error.MastraError(
|
|
2114
2114
|
{
|
|
2115
|
-
id: "
|
|
2115
|
+
id: storage.createStorageErrorId("DYNAMODB", "LIST_SCORES_BY_SCORER_ID", "FAILED"),
|
|
2116
2116
|
domain: error.ErrorDomain.STORAGE,
|
|
2117
2117
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
2118
2118
|
details: {
|
|
@@ -2156,7 +2156,7 @@ var ScoresStorageDynamoDB = class extends storage.ScoresStorage {
|
|
|
2156
2156
|
} catch (error$1) {
|
|
2157
2157
|
throw new error.MastraError(
|
|
2158
2158
|
{
|
|
2159
|
-
id: "
|
|
2159
|
+
id: storage.createStorageErrorId("DYNAMODB", "LIST_SCORES_BY_RUN_ID", "FAILED"),
|
|
2160
2160
|
domain: error.ErrorDomain.STORAGE,
|
|
2161
2161
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
2162
2162
|
details: { runId, page: pagination.page, perPage: pagination.perPage }
|
|
@@ -2195,7 +2195,7 @@ var ScoresStorageDynamoDB = class extends storage.ScoresStorage {
|
|
|
2195
2195
|
} catch (error$1) {
|
|
2196
2196
|
throw new error.MastraError(
|
|
2197
2197
|
{
|
|
2198
|
-
id: "
|
|
2198
|
+
id: storage.createStorageErrorId("DYNAMODB", "LIST_SCORES_BY_ENTITY_ID", "FAILED"),
|
|
2199
2199
|
domain: error.ErrorDomain.STORAGE,
|
|
2200
2200
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
2201
2201
|
details: { entityId, entityType, page: pagination.page, perPage: pagination.perPage }
|
|
@@ -2233,7 +2233,7 @@ var ScoresStorageDynamoDB = class extends storage.ScoresStorage {
|
|
|
2233
2233
|
} catch (error$1) {
|
|
2234
2234
|
throw new error.MastraError(
|
|
2235
2235
|
{
|
|
2236
|
-
id: "
|
|
2236
|
+
id: storage.createStorageErrorId("DYNAMODB", "LIST_SCORES_BY_SPAN", "FAILED"),
|
|
2237
2237
|
domain: error.ErrorDomain.STORAGE,
|
|
2238
2238
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
2239
2239
|
details: { traceId, spanId, page: pagination.page, perPage: pagination.perPage }
|
|
@@ -2299,7 +2299,7 @@ var WorkflowStorageDynamoDB = class extends storage.WorkflowsStorage {
|
|
|
2299
2299
|
} catch (error$1) {
|
|
2300
2300
|
throw new error.MastraError(
|
|
2301
2301
|
{
|
|
2302
|
-
id: "
|
|
2302
|
+
id: storage.createStorageErrorId("DYNAMODB", "PERSIST_WORKFLOW_SNAPSHOT", "FAILED"),
|
|
2303
2303
|
domain: error.ErrorDomain.STORAGE,
|
|
2304
2304
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
2305
2305
|
details: { workflowName, runId }
|
|
@@ -2327,7 +2327,7 @@ var WorkflowStorageDynamoDB = class extends storage.WorkflowsStorage {
|
|
|
2327
2327
|
} catch (error$1) {
|
|
2328
2328
|
throw new error.MastraError(
|
|
2329
2329
|
{
|
|
2330
|
-
id: "
|
|
2330
|
+
id: storage.createStorageErrorId("DYNAMODB", "LOAD_WORKFLOW_SNAPSHOT", "FAILED"),
|
|
2331
2331
|
domain: error.ErrorDomain.STORAGE,
|
|
2332
2332
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
2333
2333
|
details: { workflowName, runId }
|
|
@@ -2344,7 +2344,7 @@ var WorkflowStorageDynamoDB = class extends storage.WorkflowsStorage {
|
|
|
2344
2344
|
if (page < 0) {
|
|
2345
2345
|
throw new error.MastraError(
|
|
2346
2346
|
{
|
|
2347
|
-
id: "
|
|
2347
|
+
id: storage.createStorageErrorId("DYNAMODB", "LIST_WORKFLOW_RUNS", "INVALID_PAGE"),
|
|
2348
2348
|
domain: error.ErrorDomain.STORAGE,
|
|
2349
2349
|
category: error.ErrorCategory.USER,
|
|
2350
2350
|
details: { page }
|
|
@@ -2414,7 +2414,7 @@ var WorkflowStorageDynamoDB = class extends storage.WorkflowsStorage {
|
|
|
2414
2414
|
} catch (error$1) {
|
|
2415
2415
|
throw new error.MastraError(
|
|
2416
2416
|
{
|
|
2417
|
-
id: "
|
|
2417
|
+
id: storage.createStorageErrorId("DYNAMODB", "LIST_WORKFLOW_RUNS", "FAILED"),
|
|
2418
2418
|
domain: error.ErrorDomain.STORAGE,
|
|
2419
2419
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
2420
2420
|
details: { workflowName: args?.workflowName || "", resourceId: args?.resourceId || "" }
|
|
@@ -2468,7 +2468,7 @@ var WorkflowStorageDynamoDB = class extends storage.WorkflowsStorage {
|
|
|
2468
2468
|
} catch (error$1) {
|
|
2469
2469
|
throw new error.MastraError(
|
|
2470
2470
|
{
|
|
2471
|
-
id: "
|
|
2471
|
+
id: storage.createStorageErrorId("DYNAMODB", "GET_WORKFLOW_RUN_BY_ID", "FAILED"),
|
|
2472
2472
|
domain: error.ErrorDomain.STORAGE,
|
|
2473
2473
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
2474
2474
|
details: { runId, workflowName: args?.workflowName || "" }
|
|
@@ -2487,7 +2487,7 @@ var DynamoDBStore = class extends storage.MastraStorage {
|
|
|
2487
2487
|
hasInitialized = null;
|
|
2488
2488
|
stores;
|
|
2489
2489
|
constructor({ name, config }) {
|
|
2490
|
-
super({ id: config.id, name });
|
|
2490
|
+
super({ id: config.id, name, disableInit: config.disableInit });
|
|
2491
2491
|
try {
|
|
2492
2492
|
if (!config.tableName || typeof config.tableName !== "string" || config.tableName.trim() === "") {
|
|
2493
2493
|
throw new Error("DynamoDBStore: config.tableName must be provided and cannot be empty.");
|
|
@@ -2522,7 +2522,7 @@ var DynamoDBStore = class extends storage.MastraStorage {
|
|
|
2522
2522
|
} catch (error$1) {
|
|
2523
2523
|
throw new error.MastraError(
|
|
2524
2524
|
{
|
|
2525
|
-
id: "
|
|
2525
|
+
id: storage.createStorageErrorId("DYNAMODB", "CONSTRUCTOR", "FAILED"),
|
|
2526
2526
|
domain: error.ErrorDomain.STORAGE,
|
|
2527
2527
|
category: error.ErrorCategory.USER
|
|
2528
2528
|
},
|
|
@@ -2558,7 +2558,7 @@ var DynamoDBStore = class extends storage.MastraStorage {
|
|
|
2558
2558
|
}
|
|
2559
2559
|
throw new error.MastraError(
|
|
2560
2560
|
{
|
|
2561
|
-
id: "
|
|
2561
|
+
id: storage.createStorageErrorId("DYNAMODB", "VALIDATE_TABLE_EXISTS", "FAILED"),
|
|
2562
2562
|
domain: error.ErrorDomain.STORAGE,
|
|
2563
2563
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
2564
2564
|
details: { tableName: this.tableName }
|
|
@@ -2581,7 +2581,7 @@ var DynamoDBStore = class extends storage.MastraStorage {
|
|
|
2581
2581
|
} catch (error$1) {
|
|
2582
2582
|
throw new error.MastraError(
|
|
2583
2583
|
{
|
|
2584
|
-
id: "
|
|
2584
|
+
id: storage.createStorageErrorId("DYNAMODB", "INIT", "FAILED"),
|
|
2585
2585
|
domain: error.ErrorDomain.STORAGE,
|
|
2586
2586
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
2587
2587
|
details: { tableName: this.tableName }
|
|
@@ -2716,7 +2716,7 @@ var DynamoDBStore = class extends storage.MastraStorage {
|
|
|
2716
2716
|
} catch (error$1) {
|
|
2717
2717
|
throw new error.MastraError(
|
|
2718
2718
|
{
|
|
2719
|
-
id: "
|
|
2719
|
+
id: storage.createStorageErrorId("DYNAMODB", "CLOSE", "FAILED"),
|
|
2720
2720
|
domain: error.ErrorDomain.STORAGE,
|
|
2721
2721
|
category: error.ErrorCategory.THIRD_PARTY
|
|
2722
2722
|
},
|