@mastra/cloudflare 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 +49 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +50 -44
- 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/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 -5
- package/dist/storage/types.d.ts.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
# @mastra/cloudflare
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix saveScore not persisting ID correctly, breaking getScoreById retrieval ([#10915](https://github.com/mastra-ai/mastra/pull/10915))
|
|
8
|
+
|
|
9
|
+
**What Changed**
|
|
10
|
+
- saveScore now correctly returns scores that can be retrieved with getScoreById
|
|
11
|
+
- Validation errors now include contextual information (scorer, entity, trace details) for easier debugging
|
|
12
|
+
|
|
13
|
+
**Impact**
|
|
14
|
+
Previously, calling getScoreById after saveScore would return null because the generated ID wasn't persisted to the database. This is now fixed across all store implementations, ensuring consistent behavior and data integrity.
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [[`0d41fe2`](https://github.com/mastra-ai/mastra/commit/0d41fe245355dfc66d61a0d9c85d9400aac351ff), [`6b3ba91`](https://github.com/mastra-ai/mastra/commit/6b3ba91494cc10394df96782f349a4f7b1e152cc), [`7907fd1`](https://github.com/mastra-ai/mastra/commit/7907fd1c5059813b7b870b81ca71041dc807331b)]:
|
|
17
|
+
- @mastra/core@1.0.0-beta.8
|
|
18
|
+
|
|
19
|
+
## 1.0.0-beta.4
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- Add `disableInit` option to all storage adapters ([#10851](https://github.com/mastra-ai/mastra/pull/10851))
|
|
24
|
+
|
|
25
|
+
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.
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
// CI/CD script - run migrations
|
|
29
|
+
const storage = new PostgresStore({
|
|
30
|
+
connectionString: DATABASE_URL,
|
|
31
|
+
id: 'pg-storage',
|
|
32
|
+
});
|
|
33
|
+
await storage.init();
|
|
34
|
+
|
|
35
|
+
// Runtime - skip auto-init
|
|
36
|
+
const storage = new PostgresStore({
|
|
37
|
+
connectionString: DATABASE_URL,
|
|
38
|
+
id: 'pg-storage',
|
|
39
|
+
disableInit: true,
|
|
40
|
+
});
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- 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))
|
|
46
|
+
|
|
47
|
+
- 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)]:
|
|
48
|
+
- @mastra/core@1.0.0-beta.7
|
|
49
|
+
|
|
3
50
|
## 1.0.0-beta.3
|
|
4
51
|
|
|
5
52
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -45,7 +45,7 @@ var MemoryStorageCloudflare = class extends storage.MemoryStorage {
|
|
|
45
45
|
} catch (error$1) {
|
|
46
46
|
const mastraError = new error.MastraError(
|
|
47
47
|
{
|
|
48
|
-
id: "
|
|
48
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "GET_THREAD_BY_ID", "FAILED"),
|
|
49
49
|
domain: error.ErrorDomain.STORAGE,
|
|
50
50
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
51
51
|
details: {
|
|
@@ -66,7 +66,7 @@ var MemoryStorageCloudflare = class extends storage.MemoryStorage {
|
|
|
66
66
|
if (page < 0) {
|
|
67
67
|
throw new error.MastraError(
|
|
68
68
|
{
|
|
69
|
-
id: "
|
|
69
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "LIST_THREADS_BY_RESOURCE_ID", "INVALID_PAGE"),
|
|
70
70
|
domain: error.ErrorDomain.STORAGE,
|
|
71
71
|
category: error.ErrorCategory.USER,
|
|
72
72
|
details: { page }
|
|
@@ -102,7 +102,7 @@ var MemoryStorageCloudflare = class extends storage.MemoryStorage {
|
|
|
102
102
|
} catch (error$1) {
|
|
103
103
|
throw new error.MastraError(
|
|
104
104
|
{
|
|
105
|
-
id: "
|
|
105
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "LIST_THREADS_BY_RESOURCE_ID", "FAILED"),
|
|
106
106
|
domain: error.ErrorDomain.STORAGE,
|
|
107
107
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
108
108
|
text: "Failed to get threads by resource ID with pagination"
|
|
@@ -118,7 +118,7 @@ var MemoryStorageCloudflare = class extends storage.MemoryStorage {
|
|
|
118
118
|
} catch (error$1) {
|
|
119
119
|
throw new error.MastraError(
|
|
120
120
|
{
|
|
121
|
-
id: "
|
|
121
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "SAVE_THREAD", "FAILED"),
|
|
122
122
|
domain: error.ErrorDomain.STORAGE,
|
|
123
123
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
124
124
|
details: {
|
|
@@ -153,7 +153,7 @@ var MemoryStorageCloudflare = class extends storage.MemoryStorage {
|
|
|
153
153
|
} catch (error$1) {
|
|
154
154
|
throw new error.MastraError(
|
|
155
155
|
{
|
|
156
|
-
id: "
|
|
156
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "UPDATE_THREAD", "FAILED"),
|
|
157
157
|
domain: error.ErrorDomain.STORAGE,
|
|
158
158
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
159
159
|
details: {
|
|
@@ -202,7 +202,7 @@ var MemoryStorageCloudflare = class extends storage.MemoryStorage {
|
|
|
202
202
|
} catch (error$1) {
|
|
203
203
|
throw new error.MastraError(
|
|
204
204
|
{
|
|
205
|
-
id: "
|
|
205
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "DELETE_THREAD", "FAILED"),
|
|
206
206
|
domain: error.ErrorDomain.STORAGE,
|
|
207
207
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
208
208
|
details: {
|
|
@@ -407,7 +407,7 @@ var MemoryStorageCloudflare = class extends storage.MemoryStorage {
|
|
|
407
407
|
} catch (error$1) {
|
|
408
408
|
throw new error.MastraError(
|
|
409
409
|
{
|
|
410
|
-
id: "
|
|
410
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "SAVE_MESSAGES", "FAILED"),
|
|
411
411
|
domain: error.ErrorDomain.STORAGE,
|
|
412
412
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
413
413
|
details: {
|
|
@@ -427,7 +427,7 @@ var MemoryStorageCloudflare = class extends storage.MemoryStorage {
|
|
|
427
427
|
} catch (error$1) {
|
|
428
428
|
throw new error.MastraError(
|
|
429
429
|
{
|
|
430
|
-
id: "
|
|
430
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "SAVE_MESSAGES", "FAILED"),
|
|
431
431
|
domain: error.ErrorDomain.STORAGE,
|
|
432
432
|
category: error.ErrorCategory.THIRD_PARTY
|
|
433
433
|
},
|
|
@@ -576,7 +576,7 @@ var MemoryStorageCloudflare = class extends storage.MemoryStorage {
|
|
|
576
576
|
} catch (error$1) {
|
|
577
577
|
const mastraError = new error.MastraError(
|
|
578
578
|
{
|
|
579
|
-
id: "
|
|
579
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "LIST_MESSAGES_BY_ID", "FAILED"),
|
|
580
580
|
domain: error.ErrorDomain.STORAGE,
|
|
581
581
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
582
582
|
text: `Error retrieving messages by ID`,
|
|
@@ -598,7 +598,7 @@ var MemoryStorageCloudflare = class extends storage.MemoryStorage {
|
|
|
598
598
|
if (threadIds.length === 0 || threadIds.some((id) => !isValidThreadId(id))) {
|
|
599
599
|
throw new error.MastraError(
|
|
600
600
|
{
|
|
601
|
-
id: "
|
|
601
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "LIST_MESSAGES", "INVALID_THREAD_ID"),
|
|
602
602
|
domain: error.ErrorDomain.STORAGE,
|
|
603
603
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
604
604
|
details: { threadId: Array.isArray(threadId) ? JSON.stringify(threadId) : String(threadId) }
|
|
@@ -612,7 +612,7 @@ var MemoryStorageCloudflare = class extends storage.MemoryStorage {
|
|
|
612
612
|
if (page < 0) {
|
|
613
613
|
throw new error.MastraError(
|
|
614
614
|
{
|
|
615
|
-
id: "
|
|
615
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "LIST_MESSAGES", "INVALID_PAGE"),
|
|
616
616
|
domain: error.ErrorDomain.STORAGE,
|
|
617
617
|
category: error.ErrorCategory.USER,
|
|
618
618
|
details: { page }
|
|
@@ -760,7 +760,7 @@ var MemoryStorageCloudflare = class extends storage.MemoryStorage {
|
|
|
760
760
|
} catch (error$1) {
|
|
761
761
|
const mastraError = new error.MastraError(
|
|
762
762
|
{
|
|
763
|
-
id: "
|
|
763
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "LIST_MESSAGES", "FAILED"),
|
|
764
764
|
domain: error.ErrorDomain.STORAGE,
|
|
765
765
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
766
766
|
text: `Failed to list messages for thread ${Array.isArray(threadId) ? threadId.join(",") : threadId}: ${error$1 instanceof Error ? error$1.message : String(error$1)}`,
|
|
@@ -882,7 +882,7 @@ var MemoryStorageCloudflare = class extends storage.MemoryStorage {
|
|
|
882
882
|
} catch (error$1) {
|
|
883
883
|
throw new error.MastraError(
|
|
884
884
|
{
|
|
885
|
-
id: "
|
|
885
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "UPDATE_MESSAGES", "FAILED"),
|
|
886
886
|
domain: error.ErrorDomain.STORAGE,
|
|
887
887
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
888
888
|
text: "Failed to update messages"
|
|
@@ -905,7 +905,7 @@ var MemoryStorageCloudflare = class extends storage.MemoryStorage {
|
|
|
905
905
|
} catch (error$1) {
|
|
906
906
|
const mastraError = new error.MastraError(
|
|
907
907
|
{
|
|
908
|
-
id: "
|
|
908
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "GET_RESOURCE_BY_ID", "FAILED"),
|
|
909
909
|
domain: error.ErrorDomain.STORAGE,
|
|
910
910
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
911
911
|
details: {
|
|
@@ -934,7 +934,7 @@ var MemoryStorageCloudflare = class extends storage.MemoryStorage {
|
|
|
934
934
|
} catch (error$1) {
|
|
935
935
|
throw new error.MastraError(
|
|
936
936
|
{
|
|
937
|
-
id: "
|
|
937
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "SAVE_RESOURCE", "FAILED"),
|
|
938
938
|
domain: error.ErrorDomain.STORAGE,
|
|
939
939
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
940
940
|
details: {
|
|
@@ -1005,7 +1005,7 @@ var StoreOperationsCloudflare = class extends storage.StoreOperations {
|
|
|
1005
1005
|
} catch (error$1) {
|
|
1006
1006
|
throw new error.MastraError(
|
|
1007
1007
|
{
|
|
1008
|
-
id: "
|
|
1008
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "CLEAR_TABLE", "FAILED"),
|
|
1009
1009
|
domain: error.ErrorDomain.STORAGE,
|
|
1010
1010
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1011
1011
|
details: {
|
|
@@ -1025,7 +1025,7 @@ var StoreOperationsCloudflare = class extends storage.StoreOperations {
|
|
|
1025
1025
|
} catch (error$1) {
|
|
1026
1026
|
throw new error.MastraError(
|
|
1027
1027
|
{
|
|
1028
|
-
id: "
|
|
1028
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "DROP_TABLE", "FAILED"),
|
|
1029
1029
|
domain: error.ErrorDomain.STORAGE,
|
|
1030
1030
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1031
1031
|
details: {
|
|
@@ -1327,7 +1327,7 @@ var StoreOperationsCloudflare = class extends storage.StoreOperations {
|
|
|
1327
1327
|
} catch (error$1) {
|
|
1328
1328
|
throw new error.MastraError(
|
|
1329
1329
|
{
|
|
1330
|
-
id: "
|
|
1330
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "INSERT", "FAILED"),
|
|
1331
1331
|
domain: error.ErrorDomain.STORAGE,
|
|
1332
1332
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1333
1333
|
details: {
|
|
@@ -1347,7 +1347,7 @@ var StoreOperationsCloudflare = class extends storage.StoreOperations {
|
|
|
1347
1347
|
} catch (error$1) {
|
|
1348
1348
|
const mastraError = new error.MastraError(
|
|
1349
1349
|
{
|
|
1350
|
-
id: "
|
|
1350
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "LOAD", "FAILED"),
|
|
1351
1351
|
domain: error.ErrorDomain.STORAGE,
|
|
1352
1352
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1353
1353
|
details: {
|
|
@@ -1373,7 +1373,7 @@ var StoreOperationsCloudflare = class extends storage.StoreOperations {
|
|
|
1373
1373
|
} catch (error$1) {
|
|
1374
1374
|
throw new error.MastraError(
|
|
1375
1375
|
{
|
|
1376
|
-
id: "
|
|
1376
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "BATCH_INSERT", "FAILED"),
|
|
1377
1377
|
domain: error.ErrorDomain.STORAGE,
|
|
1378
1378
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1379
1379
|
text: `Error in batch insert for table ${input.tableName}`,
|
|
@@ -1445,7 +1445,7 @@ var StoreOperationsCloudflare = class extends storage.StoreOperations {
|
|
|
1445
1445
|
} catch (error$1) {
|
|
1446
1446
|
throw new error.MastraError(
|
|
1447
1447
|
{
|
|
1448
|
-
id: "
|
|
1448
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "CREATE_TABLE", "FAILED"),
|
|
1449
1449
|
domain: error.ErrorDomain.STORAGE,
|
|
1450
1450
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1451
1451
|
details: {
|
|
@@ -1477,7 +1477,7 @@ var StoreOperationsCloudflare = class extends storage.StoreOperations {
|
|
|
1477
1477
|
} catch (error$1) {
|
|
1478
1478
|
throw new error.MastraError(
|
|
1479
1479
|
{
|
|
1480
|
-
id: "
|
|
1480
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "LIST_NAMESPACE_KEYS", "FAILED"),
|
|
1481
1481
|
domain: error.ErrorDomain.STORAGE,
|
|
1482
1482
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1483
1483
|
details: {
|
|
@@ -1535,7 +1535,7 @@ var ScoresStorageCloudflare = class extends storage.ScoresStorage {
|
|
|
1535
1535
|
} catch (error$1) {
|
|
1536
1536
|
const mastraError = new error.MastraError(
|
|
1537
1537
|
{
|
|
1538
|
-
id: "
|
|
1538
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "GET_SCORE_BY_ID", "FAILED"),
|
|
1539
1539
|
domain: error.ErrorDomain.STORAGE,
|
|
1540
1540
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1541
1541
|
text: `Failed to get score by id: ${id}`
|
|
@@ -1554,16 +1554,22 @@ var ScoresStorageCloudflare = class extends storage.ScoresStorage {
|
|
|
1554
1554
|
} catch (error$1) {
|
|
1555
1555
|
throw new error.MastraError(
|
|
1556
1556
|
{
|
|
1557
|
-
id: "
|
|
1557
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "SAVE_SCORE", "VALIDATION_FAILED"),
|
|
1558
1558
|
domain: error.ErrorDomain.STORAGE,
|
|
1559
1559
|
category: error.ErrorCategory.USER,
|
|
1560
|
-
details: {
|
|
1560
|
+
details: {
|
|
1561
|
+
scorer: score.scorer?.id ?? "unknown",
|
|
1562
|
+
entityId: score.entityId ?? "unknown",
|
|
1563
|
+
entityType: score.entityType ?? "unknown",
|
|
1564
|
+
traceId: score.traceId ?? "",
|
|
1565
|
+
spanId: score.spanId ?? ""
|
|
1566
|
+
}
|
|
1561
1567
|
},
|
|
1562
1568
|
error$1
|
|
1563
1569
|
);
|
|
1564
1570
|
}
|
|
1571
|
+
const id = crypto.randomUUID();
|
|
1565
1572
|
try {
|
|
1566
|
-
const id = crypto.randomUUID();
|
|
1567
1573
|
const serializedRecord = {};
|
|
1568
1574
|
for (const [key, value] of Object.entries(parsedScore)) {
|
|
1569
1575
|
if (value !== null && value !== void 0) {
|
|
@@ -1576,23 +1582,23 @@ var ScoresStorageCloudflare = class extends storage.ScoresStorage {
|
|
|
1576
1582
|
serializedRecord[key] = null;
|
|
1577
1583
|
}
|
|
1578
1584
|
}
|
|
1585
|
+
const now = /* @__PURE__ */ new Date();
|
|
1579
1586
|
serializedRecord.id = id;
|
|
1580
|
-
serializedRecord.createdAt =
|
|
1581
|
-
serializedRecord.updatedAt =
|
|
1587
|
+
serializedRecord.createdAt = now.toISOString();
|
|
1588
|
+
serializedRecord.updatedAt = now.toISOString();
|
|
1582
1589
|
await this.operations.putKV({
|
|
1583
1590
|
tableName: storage.TABLE_SCORERS,
|
|
1584
1591
|
key: id,
|
|
1585
1592
|
value: serializedRecord
|
|
1586
1593
|
});
|
|
1587
|
-
|
|
1588
|
-
return { score: scoreFromDb };
|
|
1594
|
+
return { score: { ...parsedScore, id, createdAt: now, updatedAt: now } };
|
|
1589
1595
|
} catch (error$1) {
|
|
1590
1596
|
const mastraError = new error.MastraError(
|
|
1591
1597
|
{
|
|
1592
|
-
id: "
|
|
1598
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "SAVE_SCORE", "FAILED"),
|
|
1593
1599
|
domain: error.ErrorDomain.STORAGE,
|
|
1594
1600
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1595
|
-
|
|
1601
|
+
details: { id }
|
|
1596
1602
|
},
|
|
1597
1603
|
error$1
|
|
1598
1604
|
);
|
|
@@ -1649,7 +1655,7 @@ var ScoresStorageCloudflare = class extends storage.ScoresStorage {
|
|
|
1649
1655
|
} catch (error$1) {
|
|
1650
1656
|
const mastraError = new error.MastraError(
|
|
1651
1657
|
{
|
|
1652
|
-
id: "
|
|
1658
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "GET_SCORES_BY_SCORER_ID", "FAILED"),
|
|
1653
1659
|
domain: error.ErrorDomain.STORAGE,
|
|
1654
1660
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1655
1661
|
text: `Failed to get scores by scorer id: ${scorerId}`
|
|
@@ -1697,7 +1703,7 @@ var ScoresStorageCloudflare = class extends storage.ScoresStorage {
|
|
|
1697
1703
|
} catch (error$1) {
|
|
1698
1704
|
const mastraError = new error.MastraError(
|
|
1699
1705
|
{
|
|
1700
|
-
id: "
|
|
1706
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "GET_SCORES_BY_RUN_ID", "FAILED"),
|
|
1701
1707
|
domain: error.ErrorDomain.STORAGE,
|
|
1702
1708
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1703
1709
|
text: `Failed to get scores by run id: ${runId}`
|
|
@@ -1746,7 +1752,7 @@ var ScoresStorageCloudflare = class extends storage.ScoresStorage {
|
|
|
1746
1752
|
} catch (error$1) {
|
|
1747
1753
|
const mastraError = new error.MastraError(
|
|
1748
1754
|
{
|
|
1749
|
-
id: "
|
|
1755
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "GET_SCORES_BY_ENTITY_ID", "FAILED"),
|
|
1750
1756
|
domain: error.ErrorDomain.STORAGE,
|
|
1751
1757
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1752
1758
|
text: `Failed to get scores by entity id: ${entityId}, type: ${entityType}`
|
|
@@ -1795,7 +1801,7 @@ var ScoresStorageCloudflare = class extends storage.ScoresStorage {
|
|
|
1795
1801
|
} catch (error$1) {
|
|
1796
1802
|
const mastraError = new error.MastraError(
|
|
1797
1803
|
{
|
|
1798
|
-
id: "
|
|
1804
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "GET_SCORES_BY_SPAN", "FAILED"),
|
|
1799
1805
|
domain: error.ErrorDomain.STORAGE,
|
|
1800
1806
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1801
1807
|
text: `Failed to get scores by span: traceId=${traceId}, spanId=${spanId}`
|
|
@@ -1854,7 +1860,7 @@ var WorkflowsStorageCloudflare = class extends storage.WorkflowsStorage {
|
|
|
1854
1860
|
} catch (error$1) {
|
|
1855
1861
|
throw new error.MastraError(
|
|
1856
1862
|
{
|
|
1857
|
-
id: "
|
|
1863
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "PERSIST_WORKFLOW_SNAPSHOT", "FAILED"),
|
|
1858
1864
|
domain: error.ErrorDomain.STORAGE,
|
|
1859
1865
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1860
1866
|
text: `Error persisting workflow snapshot for workflow ${params.workflowName}, run ${params.runId}`,
|
|
@@ -1879,7 +1885,7 @@ var WorkflowsStorageCloudflare = class extends storage.WorkflowsStorage {
|
|
|
1879
1885
|
} catch (error$1) {
|
|
1880
1886
|
const mastraError = new error.MastraError(
|
|
1881
1887
|
{
|
|
1882
|
-
id: "
|
|
1888
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "LOAD_WORKFLOW_SNAPSHOT", "FAILED"),
|
|
1883
1889
|
domain: error.ErrorDomain.STORAGE,
|
|
1884
1890
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
1885
1891
|
text: `Error loading workflow snapshot for workflow ${params.workflowName}, run ${params.runId}`,
|
|
@@ -1938,7 +1944,7 @@ var WorkflowsStorageCloudflare = class extends storage.WorkflowsStorage {
|
|
|
1938
1944
|
if (page < 0 || !Number.isInteger(page)) {
|
|
1939
1945
|
throw new error.MastraError(
|
|
1940
1946
|
{
|
|
1941
|
-
id: "
|
|
1947
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "LIST_WORKFLOW_RUNS", "INVALID_PAGE"),
|
|
1942
1948
|
domain: error.ErrorDomain.STORAGE,
|
|
1943
1949
|
category: error.ErrorCategory.USER,
|
|
1944
1950
|
details: { page }
|
|
@@ -1993,7 +1999,7 @@ var WorkflowsStorageCloudflare = class extends storage.WorkflowsStorage {
|
|
|
1993
1999
|
} catch (error$1) {
|
|
1994
2000
|
const mastraError = new error.MastraError(
|
|
1995
2001
|
{
|
|
1996
|
-
id: "
|
|
2002
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "LIST_WORKFLOW_RUNS", "FAILED"),
|
|
1997
2003
|
domain: error.ErrorDomain.STORAGE,
|
|
1998
2004
|
category: error.ErrorCategory.THIRD_PARTY
|
|
1999
2005
|
},
|
|
@@ -2031,7 +2037,7 @@ var WorkflowsStorageCloudflare = class extends storage.WorkflowsStorage {
|
|
|
2031
2037
|
} catch (error$1) {
|
|
2032
2038
|
const mastraError = new error.MastraError(
|
|
2033
2039
|
{
|
|
2034
|
-
id: "
|
|
2040
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "GET_WORKFLOW_RUN_BY_ID", "FAILED"),
|
|
2035
2041
|
domain: error.ErrorDomain.STORAGE,
|
|
2036
2042
|
category: error.ErrorCategory.THIRD_PARTY,
|
|
2037
2043
|
details: {
|
|
@@ -2093,7 +2099,7 @@ var CloudflareStore = class extends storage.MastraStorage {
|
|
|
2093
2099
|
return supports;
|
|
2094
2100
|
}
|
|
2095
2101
|
constructor(config) {
|
|
2096
|
-
super({ id: config.id, name: "Cloudflare" });
|
|
2102
|
+
super({ id: config.id, name: "Cloudflare", disableInit: config.disableInit });
|
|
2097
2103
|
try {
|
|
2098
2104
|
if (isWorkersConfig(config)) {
|
|
2099
2105
|
this.validateWorkersConfig(config);
|
|
@@ -2133,7 +2139,7 @@ var CloudflareStore = class extends storage.MastraStorage {
|
|
|
2133
2139
|
} catch (error$1) {
|
|
2134
2140
|
throw new error.MastraError(
|
|
2135
2141
|
{
|
|
2136
|
-
id: "
|
|
2142
|
+
id: storage.createStorageErrorId("CLOUDFLARE", "INIT", "FAILED"),
|
|
2137
2143
|
domain: error.ErrorDomain.STORAGE,
|
|
2138
2144
|
category: error.ErrorCategory.THIRD_PARTY
|
|
2139
2145
|
},
|