@mastra/clickhouse 0.0.0-vector-query-tool-provider-options-20250828222356 → 0.0.0-vector-extension-schema-20250922130418
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 +159 -3
- package/dist/index.cjs +23 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +23 -10
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +2 -1
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +2 -1
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +21 -8
- package/docker-compose.yaml +0 -15
- package/eslint.config.js +0 -6
- package/src/index.ts +0 -2
- package/src/storage/domains/legacy-evals/index.ts +0 -246
- package/src/storage/domains/memory/index.ts +0 -1473
- package/src/storage/domains/operations/index.ts +0 -319
- package/src/storage/domains/scores/index.ts +0 -351
- package/src/storage/domains/traces/index.ts +0 -275
- package/src/storage/domains/utils.ts +0 -90
- package/src/storage/domains/workflows/index.ts +0 -323
- package/src/storage/index.test.ts +0 -26
- package/src/storage/index.ts +0 -456
- package/tsconfig.build.json +0 -9
- package/tsconfig.json +0 -5
- package/tsup.config.ts +0 -17
- package/vitest.config.ts +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,167 @@
|
|
|
1
1
|
# @mastra/clickhouse
|
|
2
2
|
|
|
3
|
-
## 0.0.0-vector-
|
|
3
|
+
## 0.0.0-vector-extension-schema-20250922130418
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
7
|
+
- Update Peerdeps for packages based on core minor bump ([#8025](https://github.com/mastra-ai/mastra/pull/8025))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`cf34503`](https://github.com/mastra-ai/mastra/commit/cf345031de4e157f29087946449e60b965e9c8a9), [`6b4b1e4`](https://github.com/mastra-ai/mastra/commit/6b4b1e4235428d39e51cbda9832704c0ba70ab32), [`3469fca`](https://github.com/mastra-ai/mastra/commit/3469fca7bb7e5e19369ff9f7044716a5e4b02585), [`a61f23f`](https://github.com/mastra-ai/mastra/commit/a61f23fbbca4b88b763d94f1d784c47895ed72d7), [`d1dc606`](https://github.com/mastra-ai/mastra/commit/d1dc6067b0557a71190b68d56ee15b48c26d2411), [`c45298a`](https://github.com/mastra-ai/mastra/commit/c45298a0a0791db35cf79f1199d77004da0704cb), [`c4a8204`](https://github.com/mastra-ai/mastra/commit/c4a82046bfd241d6044e234bc5917d5a01fe6b55), [`d3bd4d4`](https://github.com/mastra-ai/mastra/commit/d3bd4d482a685bbb67bfa89be91c90dca3fa71ad)]:
|
|
10
|
+
- @mastra/core@0.0.0-vector-extension-schema-20250922130418
|
|
11
|
+
|
|
12
|
+
## 0.15.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- clean up console logs in monorepo ([#7926](https://github.com/mastra-ai/mastra/pull/7926))
|
|
17
|
+
|
|
18
|
+
- Update peerdep of @mastra/core ([#7619](https://github.com/mastra-ai/mastra/pull/7619))
|
|
19
|
+
|
|
20
|
+
- Add resource id to workflow run snapshots ([#7740](https://github.com/mastra-ai/mastra/pull/7740))
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [[`197cbb2`](https://github.com/mastra-ai/mastra/commit/197cbb248fc8cb4bbf61bf70b770f1388b445df2), [`a1bb887`](https://github.com/mastra-ai/mastra/commit/a1bb887e8bfae44230f487648da72e96ef824561), [`6590763`](https://github.com/mastra-ai/mastra/commit/65907630ef4bf4127067cecd1cb21b56f55d5f1b), [`fb84c21`](https://github.com/mastra-ai/mastra/commit/fb84c21859d09bdc8f158bd5412bdc4b5835a61c), [`5802bf5`](https://github.com/mastra-ai/mastra/commit/5802bf57f6182e4b67c28d7d91abed349a8d14f3), [`5bda53a`](https://github.com/mastra-ai/mastra/commit/5bda53a9747bfa7d876d754fc92c83a06e503f62), [`c2eade3`](https://github.com/mastra-ai/mastra/commit/c2eade3508ef309662f065e5f340d7840295dd53), [`f26a8fd`](https://github.com/mastra-ai/mastra/commit/f26a8fd99fcb0497a5d86c28324430d7f6a5fb83), [`222965a`](https://github.com/mastra-ai/mastra/commit/222965a98ce8197b86673ec594244650b5960257), [`6047778`](https://github.com/mastra-ai/mastra/commit/6047778e501df460648f31decddf8e443f36e373), [`a0f5f1c`](https://github.com/mastra-ai/mastra/commit/a0f5f1ca39c3c5c6d26202e9fcab986b4fe14568), [`9d4fc09`](https://github.com/mastra-ai/mastra/commit/9d4fc09b2ad55caa7738c7ceb3a905e454f74cdd), [`05c7abf`](https://github.com/mastra-ai/mastra/commit/05c7abfe105a015b7760c9bf33ff4419727502a0), [`0324ceb`](https://github.com/mastra-ai/mastra/commit/0324ceb8af9d16c12a531f90e575f6aab797ac81), [`d75ccf0`](https://github.com/mastra-ai/mastra/commit/d75ccf06dfd2582b916aa12624e3cd61b279edf1), [`0f9d227`](https://github.com/mastra-ai/mastra/commit/0f9d227890a98db33865abbea39daf407cd55ef7), [`b356f5f`](https://github.com/mastra-ai/mastra/commit/b356f5f7566cb3edb755d91f00b72fc1420b2a37), [`de056a0`](https://github.com/mastra-ai/mastra/commit/de056a02cbb43f6aa0380ab2150ea404af9ec0dd), [`f5ce05f`](https://github.com/mastra-ai/mastra/commit/f5ce05f831d42c69559bf4c0fdb46ccb920fc3a3), [`60c9cec`](https://github.com/mastra-ai/mastra/commit/60c9cec7048a79a87440f7840c383875bd710d93), [`c93532a`](https://github.com/mastra-ai/mastra/commit/c93532a340b80e4dd946d4c138d9381de5f70399), [`6cb1fcb`](https://github.com/mastra-ai/mastra/commit/6cb1fcbc8d0378ffed0d17784c96e68f30cb0272), [`aee4f00`](https://github.com/mastra-ai/mastra/commit/aee4f00e61e1a42e81a6d74ff149dbe69e32695a), [`9f6f30f`](https://github.com/mastra-ai/mastra/commit/9f6f30f04ec6648bbca798ea8aad59317c40d8db), [`547c621`](https://github.com/mastra-ai/mastra/commit/547c62104af3f7a551b3754e9cbdf0a3fbba15e4), [`897995e`](https://github.com/mastra-ai/mastra/commit/897995e630d572fe2891e7ede817938cabb43251), [`0fed8f2`](https://github.com/mastra-ai/mastra/commit/0fed8f2aa84b167b3415ea6f8f70755775132c8d), [`4f9ea8c`](https://github.com/mastra-ai/mastra/commit/4f9ea8c95ea74ba9abbf3b2ab6106c7d7bc45689), [`1a1fbe6`](https://github.com/mastra-ai/mastra/commit/1a1fbe66efb7d94abc373ed0dd9676adb8122454), [`d706fad`](https://github.com/mastra-ai/mastra/commit/d706fad6e6e4b72357b18d229ba38e6c913c0e70), [`87fd07f`](https://github.com/mastra-ai/mastra/commit/87fd07ff35387a38728967163460231b5d33ae3b), [`5c3768f`](https://github.com/mastra-ai/mastra/commit/5c3768fa959454232ad76715c381f4aac00c6881), [`2685a78`](https://github.com/mastra-ai/mastra/commit/2685a78f224b8b04e20d4fab5ac1adb638190071), [`36f39c0`](https://github.com/mastra-ai/mastra/commit/36f39c00dc794952dc3c11aab91c2fa8bca74b11), [`239b5a4`](https://github.com/mastra-ai/mastra/commit/239b5a497aeae2e8b4d764f46217cfff2284788e), [`8a3f5e4`](https://github.com/mastra-ai/mastra/commit/8a3f5e4212ec36b302957deb4bd47005ab598382)]:
|
|
23
|
+
- @mastra/core@0.17.0
|
|
24
|
+
|
|
25
|
+
## 0.15.1-alpha.2
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- clean up console logs in monorepo ([#7926](https://github.com/mastra-ai/mastra/pull/7926))
|
|
30
|
+
|
|
31
|
+
- Updated dependencies [[`197cbb2`](https://github.com/mastra-ai/mastra/commit/197cbb248fc8cb4bbf61bf70b770f1388b445df2), [`6590763`](https://github.com/mastra-ai/mastra/commit/65907630ef4bf4127067cecd1cb21b56f55d5f1b), [`c2eade3`](https://github.com/mastra-ai/mastra/commit/c2eade3508ef309662f065e5f340d7840295dd53), [`222965a`](https://github.com/mastra-ai/mastra/commit/222965a98ce8197b86673ec594244650b5960257), [`0324ceb`](https://github.com/mastra-ai/mastra/commit/0324ceb8af9d16c12a531f90e575f6aab797ac81), [`0f9d227`](https://github.com/mastra-ai/mastra/commit/0f9d227890a98db33865abbea39daf407cd55ef7), [`de056a0`](https://github.com/mastra-ai/mastra/commit/de056a02cbb43f6aa0380ab2150ea404af9ec0dd), [`c93532a`](https://github.com/mastra-ai/mastra/commit/c93532a340b80e4dd946d4c138d9381de5f70399), [`6cb1fcb`](https://github.com/mastra-ai/mastra/commit/6cb1fcbc8d0378ffed0d17784c96e68f30cb0272), [`2685a78`](https://github.com/mastra-ai/mastra/commit/2685a78f224b8b04e20d4fab5ac1adb638190071), [`239b5a4`](https://github.com/mastra-ai/mastra/commit/239b5a497aeae2e8b4d764f46217cfff2284788e)]:
|
|
32
|
+
- @mastra/core@0.17.0-alpha.6
|
|
33
|
+
|
|
34
|
+
## 0.15.1-alpha.1
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- Update peerdep of @mastra/core ([#7619](https://github.com/mastra-ai/mastra/pull/7619))
|
|
39
|
+
|
|
40
|
+
- Updated dependencies [[`a1bb887`](https://github.com/mastra-ai/mastra/commit/a1bb887e8bfae44230f487648da72e96ef824561), [`a0f5f1c`](https://github.com/mastra-ai/mastra/commit/a0f5f1ca39c3c5c6d26202e9fcab986b4fe14568), [`b356f5f`](https://github.com/mastra-ai/mastra/commit/b356f5f7566cb3edb755d91f00b72fc1420b2a37), [`f5ce05f`](https://github.com/mastra-ai/mastra/commit/f5ce05f831d42c69559bf4c0fdb46ccb920fc3a3), [`9f6f30f`](https://github.com/mastra-ai/mastra/commit/9f6f30f04ec6648bbca798ea8aad59317c40d8db), [`d706fad`](https://github.com/mastra-ai/mastra/commit/d706fad6e6e4b72357b18d229ba38e6c913c0e70), [`5c3768f`](https://github.com/mastra-ai/mastra/commit/5c3768fa959454232ad76715c381f4aac00c6881), [`8a3f5e4`](https://github.com/mastra-ai/mastra/commit/8a3f5e4212ec36b302957deb4bd47005ab598382)]:
|
|
41
|
+
- @mastra/core@0.17.0-alpha.3
|
|
42
|
+
|
|
43
|
+
## 0.15.1-alpha.0
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- Add resource id to workflow run snapshots ([#7740](https://github.com/mastra-ai/mastra/pull/7740))
|
|
48
|
+
|
|
49
|
+
- Updated dependencies [[`547c621`](https://github.com/mastra-ai/mastra/commit/547c62104af3f7a551b3754e9cbdf0a3fbba15e4)]:
|
|
50
|
+
- @mastra/core@0.16.4-alpha.1
|
|
51
|
+
|
|
52
|
+
## 0.15.0
|
|
53
|
+
|
|
54
|
+
### Minor Changes
|
|
55
|
+
|
|
56
|
+
- 376913a: Update peerdeps of @mastra/core
|
|
57
|
+
|
|
58
|
+
### Patch Changes
|
|
59
|
+
|
|
60
|
+
- 6f5eb7a: Throw if an empty or whitespace-only threadId is passed when getting messages
|
|
61
|
+
- Updated dependencies [8fbf79e]
|
|
62
|
+
- Updated dependencies [fd83526]
|
|
63
|
+
- Updated dependencies [d0b90ab]
|
|
64
|
+
- Updated dependencies [6f5eb7a]
|
|
65
|
+
- Updated dependencies [a01cf14]
|
|
66
|
+
- Updated dependencies [a9e50ee]
|
|
67
|
+
- Updated dependencies [5397eb4]
|
|
68
|
+
- Updated dependencies [c9f4e4a]
|
|
69
|
+
- Updated dependencies [0acbc80]
|
|
70
|
+
- @mastra/core@0.16.0
|
|
71
|
+
|
|
72
|
+
## 0.15.0-alpha.1
|
|
73
|
+
|
|
74
|
+
### Minor Changes
|
|
75
|
+
|
|
76
|
+
- 376913a: Update peerdeps of @mastra/core
|
|
77
|
+
|
|
78
|
+
### Patch Changes
|
|
79
|
+
|
|
80
|
+
- Updated dependencies [8fbf79e]
|
|
81
|
+
- @mastra/core@0.16.0-alpha.1
|
|
82
|
+
|
|
83
|
+
## 0.14.4-alpha.0
|
|
84
|
+
|
|
85
|
+
### Patch Changes
|
|
86
|
+
|
|
87
|
+
- 6f5eb7a: Throw if an empty or whitespace-only threadId is passed when getting messages
|
|
88
|
+
- Updated dependencies [fd83526]
|
|
89
|
+
- Updated dependencies [d0b90ab]
|
|
90
|
+
- Updated dependencies [6f5eb7a]
|
|
91
|
+
- Updated dependencies [a01cf14]
|
|
92
|
+
- Updated dependencies [a9e50ee]
|
|
93
|
+
- Updated dependencies [5397eb4]
|
|
94
|
+
- Updated dependencies [c9f4e4a]
|
|
95
|
+
- Updated dependencies [0acbc80]
|
|
96
|
+
- @mastra/core@0.16.0-alpha.0
|
|
97
|
+
|
|
98
|
+
## 0.14.3
|
|
99
|
+
|
|
100
|
+
### Patch Changes
|
|
101
|
+
|
|
102
|
+
- de3cbc6: Update the `package.json` file to include additional fields like `repository`, `homepage` or `files`.
|
|
103
|
+
- f0dfcac: updated core peerdep
|
|
104
|
+
- Updated dependencies [ab48c97]
|
|
105
|
+
- Updated dependencies [85ef90b]
|
|
106
|
+
- Updated dependencies [aedbbfa]
|
|
107
|
+
- Updated dependencies [ff89505]
|
|
108
|
+
- Updated dependencies [637f323]
|
|
109
|
+
- Updated dependencies [de3cbc6]
|
|
110
|
+
- Updated dependencies [c19bcf7]
|
|
111
|
+
- Updated dependencies [4474d04]
|
|
112
|
+
- Updated dependencies [183dc95]
|
|
113
|
+
- Updated dependencies [a1111e2]
|
|
114
|
+
- Updated dependencies [b42a961]
|
|
115
|
+
- Updated dependencies [61debef]
|
|
116
|
+
- Updated dependencies [9beaeff]
|
|
117
|
+
- Updated dependencies [29de0e1]
|
|
118
|
+
- Updated dependencies [f643c65]
|
|
119
|
+
- Updated dependencies [00c74e7]
|
|
120
|
+
- Updated dependencies [fef7375]
|
|
121
|
+
- Updated dependencies [e3d8fea]
|
|
122
|
+
- Updated dependencies [45e4d39]
|
|
123
|
+
- Updated dependencies [9eee594]
|
|
124
|
+
- Updated dependencies [7149d8d]
|
|
125
|
+
- Updated dependencies [822c2e8]
|
|
126
|
+
- Updated dependencies [979912c]
|
|
127
|
+
- Updated dependencies [7dcf4c0]
|
|
128
|
+
- Updated dependencies [4106a58]
|
|
129
|
+
- Updated dependencies [ad78bfc]
|
|
130
|
+
- Updated dependencies [0302f50]
|
|
131
|
+
- Updated dependencies [6ac697e]
|
|
132
|
+
- Updated dependencies [74db265]
|
|
133
|
+
- Updated dependencies [0ce418a]
|
|
134
|
+
- Updated dependencies [af90672]
|
|
135
|
+
- Updated dependencies [8387952]
|
|
136
|
+
- Updated dependencies [7f3b8da]
|
|
137
|
+
- Updated dependencies [905352b]
|
|
138
|
+
- Updated dependencies [599d04c]
|
|
139
|
+
- Updated dependencies [56041d0]
|
|
140
|
+
- Updated dependencies [3412597]
|
|
141
|
+
- Updated dependencies [5eca5d2]
|
|
142
|
+
- Updated dependencies [f2cda47]
|
|
143
|
+
- Updated dependencies [5de1555]
|
|
144
|
+
- Updated dependencies [cfd377a]
|
|
145
|
+
- Updated dependencies [1ed5a3e]
|
|
146
|
+
- @mastra/core@0.15.3
|
|
147
|
+
|
|
148
|
+
## 0.14.3-alpha.1
|
|
149
|
+
|
|
150
|
+
### Patch Changes
|
|
151
|
+
|
|
152
|
+
- [#7394](https://github.com/mastra-ai/mastra/pull/7394) [`f0dfcac`](https://github.com/mastra-ai/mastra/commit/f0dfcac4458bdf789b975e2d63e984f5d1e7c4d3) Thanks [@NikAiyer](https://github.com/NikAiyer)! - updated core peerdep
|
|
153
|
+
|
|
154
|
+
- Updated dependencies [[`7149d8d`](https://github.com/mastra-ai/mastra/commit/7149d8d4bdc1edf0008e0ca9b7925eb0b8b60dbe)]:
|
|
155
|
+
- @mastra/core@0.15.3-alpha.7
|
|
156
|
+
|
|
157
|
+
## 0.14.3-alpha.0
|
|
158
|
+
|
|
159
|
+
### Patch Changes
|
|
160
|
+
|
|
161
|
+
- [#7343](https://github.com/mastra-ai/mastra/pull/7343) [`de3cbc6`](https://github.com/mastra-ai/mastra/commit/de3cbc61079211431bd30487982ea3653517278e) Thanks [@LekoArts](https://github.com/LekoArts)! - Update the `package.json` file to include additional fields like `repository`, `homepage` or `files`.
|
|
162
|
+
|
|
163
|
+
- Updated dependencies [[`85ef90b`](https://github.com/mastra-ai/mastra/commit/85ef90bb2cd4ae4df855c7ac175f7d392c55c1bf), [`de3cbc6`](https://github.com/mastra-ai/mastra/commit/de3cbc61079211431bd30487982ea3653517278e)]:
|
|
164
|
+
- @mastra/core@0.15.3-alpha.5
|
|
9
165
|
|
|
10
166
|
## 0.14.2
|
|
11
167
|
|
package/dist/index.cjs
CHANGED
|
@@ -257,6 +257,7 @@ var MemoryStorageClickhouse = class extends storage.MemoryStorage {
|
|
|
257
257
|
format
|
|
258
258
|
}) {
|
|
259
259
|
try {
|
|
260
|
+
if (!threadId.trim()) throw new Error("threadId must be a non-empty string");
|
|
260
261
|
const messages = [];
|
|
261
262
|
const limit = storage.resolveMessageLimit({ last: selectBy?.last, defaultLimit: 40 });
|
|
262
263
|
const include = selectBy?.include || [];
|
|
@@ -849,11 +850,12 @@ var MemoryStorageClickhouse = class extends storage.MemoryStorage {
|
|
|
849
850
|
}
|
|
850
851
|
}
|
|
851
852
|
async getMessagesPaginated(args) {
|
|
853
|
+
const { threadId, resourceId, selectBy, format = "v1" } = args;
|
|
854
|
+
const page = selectBy?.pagination?.page || 0;
|
|
855
|
+
const perPageInput = selectBy?.pagination?.perPage;
|
|
856
|
+
const perPage = perPageInput !== void 0 ? perPageInput : storage.resolveMessageLimit({ last: selectBy?.last, defaultLimit: 20 });
|
|
852
857
|
try {
|
|
853
|
-
|
|
854
|
-
const page = selectBy?.pagination?.page || 0;
|
|
855
|
-
const perPageInput = selectBy?.pagination?.perPage;
|
|
856
|
-
const perPage = perPageInput !== void 0 ? perPageInput : storage.resolveMessageLimit({ last: selectBy?.last, defaultLimit: 20 });
|
|
858
|
+
if (!threadId.trim()) throw new Error("threadId must be a non-empty string");
|
|
857
859
|
const offset = page * perPage;
|
|
858
860
|
const dateRange = selectBy?.pagination?.dateRange;
|
|
859
861
|
const fromDate = dateRange?.start;
|
|
@@ -1012,14 +1014,21 @@ var MemoryStorageClickhouse = class extends storage.MemoryStorage {
|
|
|
1012
1014
|
hasMore: offset + perPage < total
|
|
1013
1015
|
};
|
|
1014
1016
|
} catch (error$1) {
|
|
1015
|
-
|
|
1017
|
+
const mastraError = new error.MastraError(
|
|
1016
1018
|
{
|
|
1017
1019
|
id: "CLICKHOUSE_STORAGE_GET_MESSAGES_PAGINATED_FAILED",
|
|
1018
1020
|
domain: error.ErrorDomain.STORAGE,
|
|
1019
|
-
category: error.ErrorCategory.THIRD_PARTY
|
|
1021
|
+
category: error.ErrorCategory.THIRD_PARTY,
|
|
1022
|
+
details: {
|
|
1023
|
+
threadId,
|
|
1024
|
+
resourceId: resourceId ?? ""
|
|
1025
|
+
}
|
|
1020
1026
|
},
|
|
1021
1027
|
error$1
|
|
1022
1028
|
);
|
|
1029
|
+
this.logger?.trackException?.(mastraError);
|
|
1030
|
+
this.logger?.error?.(mastraError.toString());
|
|
1031
|
+
return { messages: [], total: 0, page, perPage: perPageInput || 40, hasMore: false };
|
|
1023
1032
|
}
|
|
1024
1033
|
}
|
|
1025
1034
|
async updateMessages(args) {
|
|
@@ -1102,7 +1111,7 @@ var MemoryStorageClickhouse = class extends storage.MemoryStorage {
|
|
|
1102
1111
|
UPDATE ${setClauses.join(", ")}
|
|
1103
1112
|
WHERE id = {var_id_${paramIdx}:String}
|
|
1104
1113
|
`;
|
|
1105
|
-
console.
|
|
1114
|
+
console.info("Updating message:", id, "with query:", updateQuery, "values:", values);
|
|
1106
1115
|
updatePromises.push(
|
|
1107
1116
|
this.client.command({
|
|
1108
1117
|
query: updateQuery,
|
|
@@ -1161,7 +1170,7 @@ var MemoryStorageClickhouse = class extends storage.MemoryStorage {
|
|
|
1161
1170
|
}
|
|
1162
1171
|
}
|
|
1163
1172
|
if (needsRetry) {
|
|
1164
|
-
console.
|
|
1173
|
+
console.info("Update not applied correctly, retrying with DELETE + INSERT for message:", id);
|
|
1165
1174
|
await this.client.command({
|
|
1166
1175
|
query: `DELETE FROM ${storage.TABLE_MESSAGES} WHERE id = {messageId:String}`,
|
|
1167
1176
|
query_params: { messageId: id },
|
|
@@ -1613,7 +1622,7 @@ var StoreOperationsClickhouse = class extends storage.StoreOperations {
|
|
|
1613
1622
|
use_client_time_zone: 1
|
|
1614
1623
|
}
|
|
1615
1624
|
});
|
|
1616
|
-
console.
|
|
1625
|
+
console.info("INSERT RESULT", result);
|
|
1617
1626
|
} catch (error$1) {
|
|
1618
1627
|
throw new error.MastraError(
|
|
1619
1628
|
{
|
|
@@ -2295,6 +2304,7 @@ var WorkflowsStorageClickhouse = class extends storage.WorkflowsStorage {
|
|
|
2295
2304
|
async persistWorkflowSnapshot({
|
|
2296
2305
|
workflowName,
|
|
2297
2306
|
runId,
|
|
2307
|
+
resourceId,
|
|
2298
2308
|
snapshot
|
|
2299
2309
|
}) {
|
|
2300
2310
|
try {
|
|
@@ -2305,11 +2315,13 @@ var WorkflowsStorageClickhouse = class extends storage.WorkflowsStorage {
|
|
|
2305
2315
|
const now = /* @__PURE__ */ new Date();
|
|
2306
2316
|
const persisting = currentSnapshot ? {
|
|
2307
2317
|
...currentSnapshot,
|
|
2318
|
+
resourceId,
|
|
2308
2319
|
snapshot: JSON.stringify(snapshot),
|
|
2309
2320
|
updatedAt: now.toISOString()
|
|
2310
2321
|
} : {
|
|
2311
2322
|
workflow_name: workflowName,
|
|
2312
2323
|
run_id: runId,
|
|
2324
|
+
resourceId,
|
|
2313
2325
|
snapshot: JSON.stringify(snapshot),
|
|
2314
2326
|
createdAt: now.toISOString(),
|
|
2315
2327
|
updatedAt: now.toISOString()
|
|
@@ -2646,9 +2658,10 @@ var ClickhouseStore = class extends storage.MastraStorage {
|
|
|
2646
2658
|
async persistWorkflowSnapshot({
|
|
2647
2659
|
workflowName,
|
|
2648
2660
|
runId,
|
|
2661
|
+
resourceId,
|
|
2649
2662
|
snapshot
|
|
2650
2663
|
}) {
|
|
2651
|
-
return this.stores.workflows.persistWorkflowSnapshot({ workflowName, runId, snapshot });
|
|
2664
|
+
return this.stores.workflows.persistWorkflowSnapshot({ workflowName, runId, resourceId, snapshot });
|
|
2652
2665
|
}
|
|
2653
2666
|
async loadWorkflowSnapshot({
|
|
2654
2667
|
workflowName,
|