@mastra/upstash 1.0.0-beta.3 → 1.0.0-beta.4

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 CHANGED
@@ -1,5 +1,36 @@
1
1
  # @mastra/upstash
2
2
 
3
+ ## 1.0.0-beta.4
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.3
4
35
 
5
36
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -81,7 +81,7 @@ var StoreMemoryUpstash = class extends storage.MemoryStorage {
81
81
  } catch (error$1) {
82
82
  throw new error.MastraError(
83
83
  {
84
- id: "STORAGE_UPSTASH_STORAGE_GET_THREAD_BY_ID_FAILED",
84
+ id: storage.createStorageErrorId("UPSTASH", "GET_THREAD_BY_ID", "FAILED"),
85
85
  domain: error.ErrorDomain.STORAGE,
86
86
  category: error.ErrorCategory.THIRD_PARTY,
87
87
  details: {
@@ -99,7 +99,7 @@ var StoreMemoryUpstash = class extends storage.MemoryStorage {
99
99
  if (page < 0) {
100
100
  throw new error.MastraError(
101
101
  {
102
- id: "STORAGE_UPSTASH_LIST_THREADS_BY_RESOURCE_ID_INVALID_PAGE",
102
+ id: storage.createStorageErrorId("UPSTASH", "LIST_THREADS_BY_RESOURCE_ID", "INVALID_PAGE"),
103
103
  domain: error.ErrorDomain.STORAGE,
104
104
  category: error.ErrorCategory.USER,
105
105
  details: { page }
@@ -141,7 +141,7 @@ var StoreMemoryUpstash = class extends storage.MemoryStorage {
141
141
  } catch (error$1) {
142
142
  const mastraError = new error.MastraError(
143
143
  {
144
- id: "STORAGE_UPSTASH_STORAGE_LIST_THREADS_BY_RESOURCE_ID_FAILED",
144
+ id: storage.createStorageErrorId("UPSTASH", "LIST_THREADS_BY_RESOURCE_ID", "FAILED"),
145
145
  domain: error.ErrorDomain.STORAGE,
146
146
  category: error.ErrorCategory.THIRD_PARTY,
147
147
  details: {
@@ -173,7 +173,7 @@ var StoreMemoryUpstash = class extends storage.MemoryStorage {
173
173
  } catch (error$1) {
174
174
  const mastraError = new error.MastraError(
175
175
  {
176
- id: "STORAGE_UPSTASH_STORAGE_SAVE_THREAD_FAILED",
176
+ id: storage.createStorageErrorId("UPSTASH", "SAVE_THREAD", "FAILED"),
177
177
  domain: error.ErrorDomain.STORAGE,
178
178
  category: error.ErrorCategory.THIRD_PARTY,
179
179
  details: {
@@ -195,7 +195,7 @@ var StoreMemoryUpstash = class extends storage.MemoryStorage {
195
195
  const thread = await this.getThreadById({ threadId: id });
196
196
  if (!thread) {
197
197
  throw new error.MastraError({
198
- id: "STORAGE_UPSTASH_STORAGE_UPDATE_THREAD_FAILED",
198
+ id: storage.createStorageErrorId("UPSTASH", "UPDATE_THREAD", "FAILED"),
199
199
  domain: error.ErrorDomain.STORAGE,
200
200
  category: error.ErrorCategory.USER,
201
201
  text: `Thread ${id} not found`,
@@ -218,7 +218,7 @@ var StoreMemoryUpstash = class extends storage.MemoryStorage {
218
218
  } catch (error$1) {
219
219
  throw new error.MastraError(
220
220
  {
221
- id: "STORAGE_UPSTASH_STORAGE_UPDATE_THREAD_FAILED",
221
+ id: storage.createStorageErrorId("UPSTASH", "UPDATE_THREAD", "FAILED"),
222
222
  domain: error.ErrorDomain.STORAGE,
223
223
  category: error.ErrorCategory.THIRD_PARTY,
224
224
  details: {
@@ -247,7 +247,7 @@ var StoreMemoryUpstash = class extends storage.MemoryStorage {
247
247
  } catch (error$1) {
248
248
  throw new error.MastraError(
249
249
  {
250
- id: "STORAGE_UPSTASH_STORAGE_DELETE_THREAD_FAILED",
250
+ id: storage.createStorageErrorId("UPSTASH", "DELETE_THREAD", "FAILED"),
251
251
  domain: error.ErrorDomain.STORAGE,
252
252
  category: error.ErrorCategory.THIRD_PARTY,
253
253
  details: {
@@ -273,7 +273,7 @@ var StoreMemoryUpstash = class extends storage.MemoryStorage {
273
273
  } catch (error$1) {
274
274
  throw new error.MastraError(
275
275
  {
276
- id: "STORAGE_UPSTASH_STORAGE_SAVE_MESSAGES_INVALID_ARGS",
276
+ id: storage.createStorageErrorId("UPSTASH", "SAVE_MESSAGES", "INVALID_ARGS"),
277
277
  domain: error.ErrorDomain.STORAGE,
278
278
  category: error.ErrorCategory.USER
279
279
  },
@@ -343,7 +343,7 @@ var StoreMemoryUpstash = class extends storage.MemoryStorage {
343
343
  } catch (error$1) {
344
344
  throw new error.MastraError(
345
345
  {
346
- id: "STORAGE_UPSTASH_STORAGE_SAVE_MESSAGES_FAILED",
346
+ id: storage.createStorageErrorId("UPSTASH", "SAVE_MESSAGES", "FAILED"),
347
347
  domain: error.ErrorDomain.STORAGE,
348
348
  category: error.ErrorCategory.THIRD_PARTY,
349
349
  details: {
@@ -469,7 +469,7 @@ var StoreMemoryUpstash = class extends storage.MemoryStorage {
469
469
  } catch (error$1) {
470
470
  throw new error.MastraError(
471
471
  {
472
- id: "STORAGE_UPSTASH_STORAGE_LIST_MESSAGES_BY_ID_FAILED",
472
+ id: storage.createStorageErrorId("UPSTASH", "LIST_MESSAGES_BY_ID", "FAILED"),
473
473
  domain: error.ErrorDomain.STORAGE,
474
474
  category: error.ErrorCategory.THIRD_PARTY,
475
475
  details: {
@@ -486,7 +486,7 @@ var StoreMemoryUpstash = class extends storage.MemoryStorage {
486
486
  if (threadIds.length === 0 || threadIds.some((id) => !id.trim())) {
487
487
  throw new error.MastraError(
488
488
  {
489
- id: "STORAGE_UPSTASH_LIST_MESSAGES_INVALID_THREAD_ID",
489
+ id: storage.createStorageErrorId("UPSTASH", "LIST_MESSAGES", "INVALID_THREAD_ID"),
490
490
  domain: error.ErrorDomain.STORAGE,
491
491
  category: error.ErrorCategory.THIRD_PARTY,
492
492
  details: { threadId: Array.isArray(threadId) ? threadId.join(",") : threadId }
@@ -500,7 +500,7 @@ var StoreMemoryUpstash = class extends storage.MemoryStorage {
500
500
  if (page < 0) {
501
501
  throw new error.MastraError(
502
502
  {
503
- id: "STORAGE_UPSTASH_LIST_MESSAGES_INVALID_PAGE",
503
+ id: storage.createStorageErrorId("UPSTASH", "LIST_MESSAGES", "INVALID_PAGE"),
504
504
  domain: error.ErrorDomain.STORAGE,
505
505
  category: error.ErrorCategory.USER,
506
506
  details: { page }
@@ -603,7 +603,7 @@ var StoreMemoryUpstash = class extends storage.MemoryStorage {
603
603
  } catch (error$1) {
604
604
  const mastraError = new error.MastraError(
605
605
  {
606
- id: "STORAGE_UPSTASH_STORAGE_LIST_MESSAGES_FAILED",
606
+ id: storage.createStorageErrorId("UPSTASH", "LIST_MESSAGES", "FAILED"),
607
607
  domain: error.ErrorDomain.STORAGE,
608
608
  category: error.ErrorCategory.THIRD_PARTY,
609
609
  details: {
@@ -794,7 +794,7 @@ var StoreMemoryUpstash = class extends storage.MemoryStorage {
794
794
  } catch (error$1) {
795
795
  throw new error.MastraError(
796
796
  {
797
- id: "STORAGE_UPSTASH_STORAGE_UPDATE_MESSAGES_FAILED",
797
+ id: storage.createStorageErrorId("UPSTASH", "UPDATE_MESSAGES", "FAILED"),
798
798
  domain: error.ErrorDomain.STORAGE,
799
799
  category: error.ErrorCategory.THIRD_PARTY,
800
800
  details: {
@@ -873,7 +873,7 @@ var StoreMemoryUpstash = class extends storage.MemoryStorage {
873
873
  } catch (error$1) {
874
874
  throw new error.MastraError(
875
875
  {
876
- id: "STORAGE_UPSTASH_DELETE_MESSAGES_FAILED",
876
+ id: storage.createStorageErrorId("UPSTASH", "DELETE_MESSAGES", "FAILED"),
877
877
  domain: error.ErrorDomain.STORAGE,
878
878
  category: error.ErrorCategory.THIRD_PARTY,
879
879
  details: { messageIds: messageIds.join(", ") }
@@ -918,7 +918,7 @@ var StoreOperationsUpstash = class extends storage.StoreOperations {
918
918
  } catch (error$1) {
919
919
  throw new error.MastraError(
920
920
  {
921
- id: "STORAGE_UPSTASH_STORAGE_CLEAR_TABLE_FAILED",
921
+ id: storage.createStorageErrorId("UPSTASH", "CLEAR_TABLE", "FAILED"),
922
922
  domain: error.ErrorDomain.STORAGE,
923
923
  category: error.ErrorCategory.THIRD_PARTY,
924
924
  details: {
@@ -939,7 +939,7 @@ var StoreOperationsUpstash = class extends storage.StoreOperations {
939
939
  } catch (error$1) {
940
940
  throw new error.MastraError(
941
941
  {
942
- id: "STORAGE_UPSTASH_STORAGE_INSERT_FAILED",
942
+ id: storage.createStorageErrorId("UPSTASH", "INSERT", "FAILED"),
943
943
  domain: error.ErrorDomain.STORAGE,
944
944
  category: error.ErrorCategory.THIRD_PARTY,
945
945
  details: {
@@ -967,7 +967,7 @@ var StoreOperationsUpstash = class extends storage.StoreOperations {
967
967
  } catch (error$1) {
968
968
  throw new error.MastraError(
969
969
  {
970
- id: "STORAGE_UPSTASH_STORAGE_BATCH_INSERT_FAILED",
970
+ id: storage.createStorageErrorId("UPSTASH", "BATCH_INSERT", "FAILED"),
971
971
  domain: error.ErrorDomain.STORAGE,
972
972
  category: error.ErrorCategory.THIRD_PARTY,
973
973
  details: {
@@ -986,7 +986,7 @@ var StoreOperationsUpstash = class extends storage.StoreOperations {
986
986
  } catch (error$1) {
987
987
  throw new error.MastraError(
988
988
  {
989
- id: "STORAGE_UPSTASH_STORAGE_LOAD_FAILED",
989
+ id: storage.createStorageErrorId("UPSTASH", "LOAD", "FAILED"),
990
990
  domain: error.ErrorDomain.STORAGE,
991
991
  category: error.ErrorCategory.THIRD_PARTY,
992
992
  details: {
@@ -1052,7 +1052,7 @@ var ScoresUpstash = class extends storage.ScoresStorage {
1052
1052
  } catch (error$1) {
1053
1053
  throw new error.MastraError(
1054
1054
  {
1055
- id: "STORAGE_UPSTASH_STORAGE_GET_SCORE_BY_ID_FAILED",
1055
+ id: storage.createStorageErrorId("UPSTASH", "GET_SCORE_BY_ID", "FAILED"),
1056
1056
  domain: error.ErrorDomain.STORAGE,
1057
1057
  category: error.ErrorCategory.THIRD_PARTY,
1058
1058
  details: {
@@ -1123,7 +1123,7 @@ var ScoresUpstash = class extends storage.ScoresStorage {
1123
1123
  } catch (error$1) {
1124
1124
  throw new error.MastraError(
1125
1125
  {
1126
- id: "STORAGE_UPSTASH_STORAGE_SAVE_SCORE_VALIDATION_FAILED",
1126
+ id: storage.createStorageErrorId("UPSTASH", "SAVE_SCORE", "VALIDATION_FAILED"),
1127
1127
  domain: error.ErrorDomain.STORAGE,
1128
1128
  category: error.ErrorCategory.THIRD_PARTY
1129
1129
  },
@@ -1137,7 +1137,7 @@ var ScoresUpstash = class extends storage.ScoresStorage {
1137
1137
  } catch (error$1) {
1138
1138
  throw new error.MastraError(
1139
1139
  {
1140
- id: "STORAGE_UPSTASH_STORAGE_SAVE_SCORE_FAILED",
1140
+ id: storage.createStorageErrorId("UPSTASH", "SAVE_SCORE", "FAILED"),
1141
1141
  domain: error.ErrorDomain.STORAGE,
1142
1142
  category: error.ErrorCategory.THIRD_PARTY,
1143
1143
  details: { id: score.id }
@@ -1348,7 +1348,7 @@ var WorkflowsUpstash = class extends storage.WorkflowsStorage {
1348
1348
  } catch (error$1) {
1349
1349
  throw new error.MastraError(
1350
1350
  {
1351
- id: "STORAGE_UPSTASH_STORAGE_PERSIST_WORKFLOW_SNAPSHOT_FAILED",
1351
+ id: storage.createStorageErrorId("UPSTASH", "PERSIST_WORKFLOW_SNAPSHOT", "FAILED"),
1352
1352
  domain: error.ErrorDomain.STORAGE,
1353
1353
  category: error.ErrorCategory.THIRD_PARTY,
1354
1354
  details: {
@@ -1375,7 +1375,7 @@ var WorkflowsUpstash = class extends storage.WorkflowsStorage {
1375
1375
  } catch (error$1) {
1376
1376
  throw new error.MastraError(
1377
1377
  {
1378
- id: "STORAGE_UPSTASH_STORAGE_LOAD_WORKFLOW_SNAPSHOT_FAILED",
1378
+ id: storage.createStorageErrorId("UPSTASH", "LOAD_WORKFLOW_SNAPSHOT", "FAILED"),
1379
1379
  domain: error.ErrorDomain.STORAGE,
1380
1380
  category: error.ErrorCategory.THIRD_PARTY,
1381
1381
  details: {
@@ -1407,7 +1407,7 @@ var WorkflowsUpstash = class extends storage.WorkflowsStorage {
1407
1407
  } catch (error$1) {
1408
1408
  throw new error.MastraError(
1409
1409
  {
1410
- id: "STORAGE_UPSTASH_STORAGE_GET_WORKFLOW_RUN_BY_ID_FAILED",
1410
+ id: storage.createStorageErrorId("UPSTASH", "GET_WORKFLOW_RUN_BY_ID", "FAILED"),
1411
1411
  domain: error.ErrorDomain.STORAGE,
1412
1412
  category: error.ErrorCategory.THIRD_PARTY,
1413
1413
  details: {
@@ -1433,7 +1433,7 @@ var WorkflowsUpstash = class extends storage.WorkflowsStorage {
1433
1433
  if (page !== void 0 && page < 0) {
1434
1434
  throw new error.MastraError(
1435
1435
  {
1436
- id: "UPSTASH_STORE_INVALID_PAGE",
1436
+ id: storage.createStorageErrorId("UPSTASH", "LIST_WORKFLOW_RUNS", "INVALID_PAGE"),
1437
1437
  domain: error.ErrorDomain.STORAGE,
1438
1438
  category: error.ErrorCategory.USER,
1439
1439
  details: { page }
@@ -1493,9 +1493,10 @@ var WorkflowsUpstash = class extends storage.WorkflowsStorage {
1493
1493
  }
1494
1494
  return { runs, total };
1495
1495
  } catch (error$1) {
1496
+ if (error$1 instanceof error.MastraError) throw error$1;
1496
1497
  throw new error.MastraError(
1497
1498
  {
1498
- id: "STORAGE_UPSTASH_STORAGE_LIST_WORKFLOW_RUNS_FAILED",
1499
+ id: storage.createStorageErrorId("UPSTASH", "LIST_WORKFLOW_RUNS", "FAILED"),
1499
1500
  domain: error.ErrorDomain.STORAGE,
1500
1501
  category: error.ErrorCategory.THIRD_PARTY,
1501
1502
  details: {
@@ -1515,7 +1516,7 @@ var UpstashStore = class extends storage.MastraStorage {
1515
1516
  redis;
1516
1517
  stores;
1517
1518
  constructor(config) {
1518
- super({ id: config.id, name: "Upstash" });
1519
+ super({ id: config.id, name: "Upstash", disableInit: config.disableInit });
1519
1520
  this.redis = new redis.Redis({
1520
1521
  url: config.url,
1521
1522
  token: config.token
@@ -1921,7 +1922,7 @@ var UpstashVector = class extends vector.MastraVector {
1921
1922
  } catch (error$1) {
1922
1923
  throw new error.MastraError(
1923
1924
  {
1924
- id: "STORAGE_UPSTASH_VECTOR_UPSERT_FAILED",
1925
+ id: storage.createVectorErrorId("UPSTASH", "UPSERT", "FAILED"),
1925
1926
  domain: error.ErrorDomain.STORAGE,
1926
1927
  category: error.ErrorCategory.THIRD_PARTY,
1927
1928
  details: { namespace, vectorCount: vectors.length }
@@ -1984,7 +1985,7 @@ var UpstashVector = class extends vector.MastraVector {
1984
1985
  } catch (error$1) {
1985
1986
  throw new error.MastraError(
1986
1987
  {
1987
- id: "STORAGE_UPSTASH_VECTOR_QUERY_FAILED",
1988
+ id: storage.createVectorErrorId("UPSTASH", "QUERY", "FAILED"),
1988
1989
  domain: error.ErrorDomain.STORAGE,
1989
1990
  category: error.ErrorCategory.THIRD_PARTY,
1990
1991
  details: { namespace, topK }
@@ -2004,7 +2005,7 @@ var UpstashVector = class extends vector.MastraVector {
2004
2005
  } catch (error$1) {
2005
2006
  throw new error.MastraError(
2006
2007
  {
2007
- id: "STORAGE_UPSTASH_VECTOR_LIST_INDEXES_FAILED",
2008
+ id: storage.createVectorErrorId("UPSTASH", "LIST_INDEXES", "FAILED"),
2008
2009
  domain: error.ErrorDomain.STORAGE,
2009
2010
  category: error.ErrorCategory.THIRD_PARTY
2010
2011
  },
@@ -2029,7 +2030,7 @@ var UpstashVector = class extends vector.MastraVector {
2029
2030
  } catch (error$1) {
2030
2031
  throw new error.MastraError(
2031
2032
  {
2032
- id: "STORAGE_UPSTASH_VECTOR_DESCRIBE_INDEX_FAILED",
2033
+ id: storage.createVectorErrorId("UPSTASH", "DESCRIBE_INDEX", "FAILED"),
2033
2034
  domain: error.ErrorDomain.STORAGE,
2034
2035
  category: error.ErrorCategory.THIRD_PARTY,
2035
2036
  details: { namespace }
@@ -2054,7 +2055,7 @@ var UpstashVector = class extends vector.MastraVector {
2054
2055
  }
2055
2056
  throw new error.MastraError(
2056
2057
  {
2057
- id: "STORAGE_UPSTASH_VECTOR_DELETE_INDEX_FAILED",
2058
+ id: storage.createVectorErrorId("UPSTASH", "DELETE_INDEX", "FAILED"),
2058
2059
  domain: error.ErrorDomain.STORAGE,
2059
2060
  category: error.ErrorCategory.THIRD_PARTY,
2060
2061
  details: { namespace }
@@ -2079,7 +2080,7 @@ var UpstashVector = class extends vector.MastraVector {
2079
2080
  const sparseVector = upstashUpdate.sparseVector;
2080
2081
  if ("id" in params && params.id && "filter" in params && params.filter) {
2081
2082
  throw new error.MastraError({
2082
- id: "STORAGE_UPSTASH_VECTOR_UPDATE_MUTUALLY_EXCLUSIVE",
2083
+ id: storage.createVectorErrorId("UPSTASH", "UPDATE_VECTOR", "MUTUALLY_EXCLUSIVE"),
2083
2084
  text: "Cannot specify both id and filter - they are mutually exclusive",
2084
2085
  domain: error.ErrorDomain.STORAGE,
2085
2086
  category: error.ErrorCategory.USER,
@@ -2088,7 +2089,7 @@ var UpstashVector = class extends vector.MastraVector {
2088
2089
  }
2089
2090
  if (!("id" in params && params.id) && !("filter" in params && params.filter)) {
2090
2091
  throw new error.MastraError({
2091
- id: "STORAGE_UPSTASH_VECTOR_UPDATE_NO_TARGET",
2092
+ id: storage.createVectorErrorId("UPSTASH", "UPDATE_VECTOR", "NO_TARGET"),
2092
2093
  text: "Either id or filter must be provided",
2093
2094
  domain: error.ErrorDomain.STORAGE,
2094
2095
  category: error.ErrorCategory.USER,
@@ -2097,7 +2098,7 @@ var UpstashVector = class extends vector.MastraVector {
2097
2098
  }
2098
2099
  if (!update.vector && !update.metadata && !sparseVector) {
2099
2100
  throw new error.MastraError({
2100
- id: "STORAGE_UPSTASH_VECTOR_UPDATE_NO_PAYLOAD",
2101
+ id: storage.createVectorErrorId("UPSTASH", "UPDATE_VECTOR", "NO_PAYLOAD"),
2101
2102
  text: "No update data provided",
2102
2103
  domain: error.ErrorDomain.STORAGE,
2103
2104
  category: error.ErrorCategory.USER,
@@ -2106,7 +2107,7 @@ var UpstashVector = class extends vector.MastraVector {
2106
2107
  }
2107
2108
  if ("filter" in params && params.filter && Object.keys(params.filter).length === 0) {
2108
2109
  throw new error.MastraError({
2109
- id: "STORAGE_UPSTASH_VECTOR_UPDATE_EMPTY_FILTER",
2110
+ id: storage.createVectorErrorId("UPSTASH", "UPDATE_VECTOR", "EMPTY_FILTER"),
2110
2111
  text: "Filter cannot be an empty filter object",
2111
2112
  domain: error.ErrorDomain.STORAGE,
2112
2113
  category: error.ErrorCategory.USER,
@@ -2174,7 +2175,7 @@ var UpstashVector = class extends vector.MastraVector {
2174
2175
  if (error$1 instanceof error.MastraError) throw error$1;
2175
2176
  throw new error.MastraError(
2176
2177
  {
2177
- id: "STORAGE_UPSTASH_VECTOR_UPDATE_VECTOR_FAILED",
2178
+ id: storage.createVectorErrorId("UPSTASH", "UPDATE_VECTOR", "FAILED"),
2178
2179
  domain: error.ErrorDomain.STORAGE,
2179
2180
  category: error.ErrorCategory.THIRD_PARTY,
2180
2181
  details: {
@@ -2201,7 +2202,7 @@ var UpstashVector = class extends vector.MastraVector {
2201
2202
  } catch (error$1) {
2202
2203
  const mastraError = new error.MastraError(
2203
2204
  {
2204
- id: "STORAGE_UPSTASH_VECTOR_DELETE_VECTOR_FAILED",
2205
+ id: storage.createVectorErrorId("UPSTASH", "DELETE_VECTOR", "FAILED"),
2205
2206
  domain: error.ErrorDomain.STORAGE,
2206
2207
  category: error.ErrorCategory.THIRD_PARTY,
2207
2208
  details: {
@@ -2225,7 +2226,7 @@ var UpstashVector = class extends vector.MastraVector {
2225
2226
  async deleteVectors({ indexName: namespace, filter, ids }) {
2226
2227
  if (ids && filter) {
2227
2228
  throw new error.MastraError({
2228
- id: "STORAGE_UPSTASH_VECTOR_DELETE_VECTORS_MUTUALLY_EXCLUSIVE",
2229
+ id: storage.createVectorErrorId("UPSTASH", "DELETE_VECTORS", "MUTUALLY_EXCLUSIVE"),
2229
2230
  text: "Cannot specify both ids and filter - they are mutually exclusive",
2230
2231
  domain: error.ErrorDomain.STORAGE,
2231
2232
  category: error.ErrorCategory.USER,
@@ -2234,7 +2235,7 @@ var UpstashVector = class extends vector.MastraVector {
2234
2235
  }
2235
2236
  if (!ids && !filter) {
2236
2237
  throw new error.MastraError({
2237
- id: "STORAGE_UPSTASH_VECTOR_DELETE_VECTORS_NO_TARGET",
2238
+ id: storage.createVectorErrorId("UPSTASH", "DELETE_VECTORS", "NO_TARGET"),
2238
2239
  text: "Either filter or ids must be provided",
2239
2240
  domain: error.ErrorDomain.STORAGE,
2240
2241
  category: error.ErrorCategory.USER,
@@ -2243,7 +2244,7 @@ var UpstashVector = class extends vector.MastraVector {
2243
2244
  }
2244
2245
  if (ids && ids.length === 0) {
2245
2246
  throw new error.MastraError({
2246
- id: "STORAGE_UPSTASH_VECTOR_DELETE_VECTORS_EMPTY_IDS",
2247
+ id: storage.createVectorErrorId("UPSTASH", "DELETE_VECTORS", "EMPTY_IDS"),
2247
2248
  text: "Cannot delete with empty ids array",
2248
2249
  domain: error.ErrorDomain.STORAGE,
2249
2250
  category: error.ErrorCategory.USER,
@@ -2252,7 +2253,7 @@ var UpstashVector = class extends vector.MastraVector {
2252
2253
  }
2253
2254
  if (filter && Object.keys(filter).length === 0) {
2254
2255
  throw new error.MastraError({
2255
- id: "STORAGE_UPSTASH_VECTOR_DELETE_VECTORS_EMPTY_FILTER",
2256
+ id: storage.createVectorErrorId("UPSTASH", "DELETE_VECTORS", "EMPTY_FILTER"),
2256
2257
  text: "Cannot delete with empty filter object",
2257
2258
  domain: error.ErrorDomain.STORAGE,
2258
2259
  category: error.ErrorCategory.USER,
@@ -2286,7 +2287,7 @@ var UpstashVector = class extends vector.MastraVector {
2286
2287
  if (error$1 instanceof error.MastraError) throw error$1;
2287
2288
  throw new error.MastraError(
2288
2289
  {
2289
- id: "STORAGE_UPSTASH_VECTOR_DELETE_VECTORS_FAILED",
2290
+ id: storage.createVectorErrorId("UPSTASH", "DELETE_VECTORS", "FAILED"),
2290
2291
  domain: error.ErrorDomain.STORAGE,
2291
2292
  category: error.ErrorCategory.THIRD_PARTY,
2292
2293
  details: {