@mastra/clickhouse 0.0.0-vnextWorkflows-20250422142014 → 0.0.0-workflow-deno-20250616130925

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.
@@ -0,0 +1,23 @@
1
+
2
+ > @mastra/clickhouse@0.11.0-alpha.1 build /home/runner/work/mastra/mastra/stores/clickhouse
3
+ > tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting
4
+
5
+ CLI Building entry: src/index.ts
6
+ CLI Using tsconfig: tsconfig.json
7
+ CLI tsup v8.5.0
8
+ TSC Build start
9
+ TSC ⚡️ Build success in 9413ms
10
+ DTS Build start
11
+ CLI Target: es2022
12
+ Analysis will use the bundled TypeScript version 5.8.3
13
+ Writing package typings: /home/runner/work/mastra/mastra/stores/clickhouse/dist/_tsup-dts-rollup.d.ts
14
+ Analysis will use the bundled TypeScript version 5.8.3
15
+ Writing package typings: /home/runner/work/mastra/mastra/stores/clickhouse/dist/_tsup-dts-rollup.d.cts
16
+ DTS ⚡️ Build success in 11648ms
17
+ CLI Cleaning output folder
18
+ ESM Build start
19
+ CJS Build start
20
+ CJS dist/index.cjs 31.44 KB
21
+ CJS ⚡️ Build success in 905ms
22
+ ESM dist/index.js 31.18 KB
23
+ ESM ⚡️ Build success in 912ms
package/CHANGELOG.md CHANGED
@@ -1,6 +1,506 @@
1
1
  # @mastra/clickhouse
2
2
 
3
- ## 0.0.0-vnextWorkflows-20250422142014
3
+ ## 0.0.0-workflow-deno-20250616130925
4
+
5
+ ### Minor Changes
6
+
7
+ - 704d1ca: Thread Timestamp Auto-Update Enhancement
8
+ Added automatic thread updatedAt timestamp updates when messages are saved across all storage providers
9
+ Enhanced user experience: Threads now accurately reflect their latest activity with automatic timestamp updates when new messages are added
10
+ Universal implementation: Consistent behavior across all 7 storage backends (ClickHouse, Cloudflare D1, DynamoDB, MongoDB, PostgreSQL, Upstash, LibSQL)
11
+ Performance optimized: Updates execute in parallel with message saving operations for minimal performance impact
12
+ Backwards compatible: No breaking changes - existing code continues to work unchanged
13
+ Improved conversation ordering: Chat interfaces can now properly sort threads by actual last activity
14
+ This enhancement resolves the issue where active conversations appeared stale due to outdated thread timestamps, providing better conversation management and user experience in chat applications.
15
+
16
+ ### Patch Changes
17
+
18
+ - 63f6b7d: dependencies updates:
19
+ - Updated dependency [`@clickhouse/client@^1.11.2` ↗︎](https://www.npmjs.com/package/@clickhouse/client/v/1.11.2) (from `^1.11.0`, in `dependencies`)
20
+ - Updated dependencies [63f6b7d]
21
+ - Updated dependencies [ee9af57]
22
+ - Updated dependencies [36f1c36]
23
+ - Updated dependencies [10d352e]
24
+ - Updated dependencies [3ca9a67]
25
+ - Updated dependencies [53d3c37]
26
+ - Updated dependencies [577ce3a]
27
+ - Updated dependencies [9260b3a]
28
+ - @mastra/core@0.0.0-workflow-deno-20250616130925
29
+
30
+ ## 0.11.0-alpha.1
31
+
32
+ ### Minor Changes
33
+
34
+ - 704d1ca: Thread Timestamp Auto-Update Enhancement
35
+ Added automatic thread updatedAt timestamp updates when messages are saved across all storage providers
36
+ Enhanced user experience: Threads now accurately reflect their latest activity with automatic timestamp updates when new messages are added
37
+ Universal implementation: Consistent behavior across all 7 storage backends (ClickHouse, Cloudflare D1, DynamoDB, MongoDB, PostgreSQL, Upstash, LibSQL)
38
+ Performance optimized: Updates execute in parallel with message saving operations for minimal performance impact
39
+ Backwards compatible: No breaking changes - existing code continues to work unchanged
40
+ Improved conversation ordering: Chat interfaces can now properly sort threads by actual last activity
41
+ This enhancement resolves the issue where active conversations appeared stale due to outdated thread timestamps, providing better conversation management and user experience in chat applications.
42
+
43
+ ## 0.10.3-alpha.0
44
+
45
+ ### Patch Changes
46
+
47
+ - 63f6b7d: dependencies updates:
48
+ - Updated dependency [`@clickhouse/client@^1.11.2` ↗︎](https://www.npmjs.com/package/@clickhouse/client/v/1.11.2) (from `^1.11.0`, in `dependencies`)
49
+ - Updated dependencies [63f6b7d]
50
+ - Updated dependencies [36f1c36]
51
+ - Updated dependencies [10d352e]
52
+ - Updated dependencies [53d3c37]
53
+ - @mastra/core@0.10.6-alpha.0
54
+
55
+ ## 0.10.2
56
+
57
+ ### Patch Changes
58
+
59
+ - dffb67b: updated stores to add alter table and change tests
60
+ - 925ab94: added paginated functions to base class and added boilerplate and updated imports
61
+ - 66f4424: Update peerdeps
62
+ - Updated dependencies [d1ed912]
63
+ - Updated dependencies [f6fd25f]
64
+ - Updated dependencies [dffb67b]
65
+ - Updated dependencies [f1f1f1b]
66
+ - Updated dependencies [925ab94]
67
+ - Updated dependencies [f9816ae]
68
+ - Updated dependencies [82090c1]
69
+ - Updated dependencies [1b443fd]
70
+ - Updated dependencies [ce97900]
71
+ - Updated dependencies [f1309d3]
72
+ - Updated dependencies [14a2566]
73
+ - Updated dependencies [f7f8293]
74
+ - Updated dependencies [48eddb9]
75
+ - @mastra/core@0.10.4
76
+
77
+ ## 0.10.2-alpha.2
78
+
79
+ ### Patch Changes
80
+
81
+ - 66f4424: Update peerdeps
82
+
83
+ ## 0.10.2-alpha.1
84
+
85
+ ### Patch Changes
86
+
87
+ - 925ab94: added paginated functions to base class and added boilerplate and updated imports
88
+ - Updated dependencies [925ab94]
89
+ - @mastra/core@0.10.4-alpha.3
90
+
91
+ ## 0.10.2-alpha.0
92
+
93
+ ### Patch Changes
94
+
95
+ - dffb67b: updated stores to add alter table and change tests
96
+ - Updated dependencies [f6fd25f]
97
+ - Updated dependencies [dffb67b]
98
+ - Updated dependencies [f1309d3]
99
+ - Updated dependencies [f7f8293]
100
+ - @mastra/core@0.10.4-alpha.1
101
+
102
+ ## 0.10.1
103
+
104
+ ### Patch Changes
105
+
106
+ - e5dc18d: Added a backwards compatible layer to begin storing/retrieving UIMessages in storage instead of CoreMessages
107
+ - c5bf1ce: Add backwards compat code for new MessageList in storage
108
+ - f0d559f: Fix peerdeps for alpha channel
109
+ - Updated dependencies [ee77e78]
110
+ - Updated dependencies [592a2db]
111
+ - Updated dependencies [e5dc18d]
112
+ - Updated dependencies [ab5adbe]
113
+ - Updated dependencies [1e8bb40]
114
+ - Updated dependencies [1b5fc55]
115
+ - Updated dependencies [195c428]
116
+ - Updated dependencies [f73e11b]
117
+ - Updated dependencies [37643b8]
118
+ - Updated dependencies [99fd6cf]
119
+ - Updated dependencies [c5bf1ce]
120
+ - Updated dependencies [add596e]
121
+ - Updated dependencies [8dc94d8]
122
+ - Updated dependencies [ecebbeb]
123
+ - Updated dependencies [79d5145]
124
+ - Updated dependencies [12b7002]
125
+ - Updated dependencies [2901125]
126
+ - @mastra/core@0.10.2
127
+
128
+ ## 0.10.1-alpha.2
129
+
130
+ ### Patch Changes
131
+
132
+ - c5bf1ce: Add backwards compat code for new MessageList in storage
133
+ - Updated dependencies [c5bf1ce]
134
+ - Updated dependencies [12b7002]
135
+ - @mastra/core@0.10.2-alpha.4
136
+
137
+ ## 0.10.1-alpha.1
138
+
139
+ ### Patch Changes
140
+
141
+ - f0d559f: Fix peerdeps for alpha channel
142
+ - Updated dependencies [1e8bb40]
143
+ - @mastra/core@0.10.2-alpha.2
144
+
145
+ ## 0.10.1-alpha.0
146
+
147
+ ### Patch Changes
148
+
149
+ - e5dc18d: Added a backwards compatible layer to begin storing/retrieving UIMessages in storage instead of CoreMessages
150
+ - Updated dependencies [592a2db]
151
+ - Updated dependencies [e5dc18d]
152
+ - @mastra/core@0.10.2-alpha.0
153
+
154
+ ## 0.10.0
155
+
156
+ ### Minor Changes
157
+
158
+ - 83da932: Move @mastra/core to peerdeps
159
+
160
+ ### Patch Changes
161
+
162
+ - b3a3d63: BREAKING: Make vnext workflow the default worklow, and old workflow legacy_workflow
163
+ - eabdcd9: [MASTRA-3451] SQL Injection Protection
164
+ - Updated dependencies [b3a3d63]
165
+ - Updated dependencies [344f453]
166
+ - Updated dependencies [0a3ae6d]
167
+ - Updated dependencies [95911be]
168
+ - Updated dependencies [f53a6ac]
169
+ - Updated dependencies [5eb5a99]
170
+ - Updated dependencies [7e632c5]
171
+ - Updated dependencies [1e9fbfa]
172
+ - Updated dependencies [eabdcd9]
173
+ - Updated dependencies [90be034]
174
+ - Updated dependencies [99f050a]
175
+ - Updated dependencies [d0ee3c6]
176
+ - Updated dependencies [b2ae5aa]
177
+ - Updated dependencies [23f258c]
178
+ - Updated dependencies [a7292b0]
179
+ - Updated dependencies [0dcb9f0]
180
+ - Updated dependencies [2672a05]
181
+ - @mastra/core@0.10.0
182
+
183
+ ## 0.4.0-alpha.1
184
+
185
+ ### Minor Changes
186
+
187
+ - 83da932: Move @mastra/core to peerdeps
188
+
189
+ ### Patch Changes
190
+
191
+ - b3a3d63: BREAKING: Make vnext workflow the default worklow, and old workflow legacy_workflow
192
+ - Updated dependencies [b3a3d63]
193
+ - Updated dependencies [344f453]
194
+ - Updated dependencies [0a3ae6d]
195
+ - Updated dependencies [95911be]
196
+ - Updated dependencies [5eb5a99]
197
+ - Updated dependencies [7e632c5]
198
+ - Updated dependencies [1e9fbfa]
199
+ - Updated dependencies [b2ae5aa]
200
+ - Updated dependencies [a7292b0]
201
+ - Updated dependencies [0dcb9f0]
202
+ - @mastra/core@0.10.0-alpha.1
203
+
204
+ ## 0.3.5-alpha.0
205
+
206
+ ### Patch Changes
207
+
208
+ - eabdcd9: [MASTRA-3451] SQL Injection Protection
209
+ - Updated dependencies [f53a6ac]
210
+ - Updated dependencies [eabdcd9]
211
+ - Updated dependencies [90be034]
212
+ - Updated dependencies [99f050a]
213
+ - Updated dependencies [d0ee3c6]
214
+ - Updated dependencies [23f258c]
215
+ - Updated dependencies [2672a05]
216
+ - @mastra/core@0.9.5-alpha.0
217
+
218
+ ## 0.3.4
219
+
220
+ ### Patch Changes
221
+
222
+ - 302a9f0: fix: do not partition clickhouse trace table
223
+ - Updated dependencies [396be50]
224
+ - Updated dependencies [ab80e7e]
225
+ - Updated dependencies [c3bd795]
226
+ - Updated dependencies [da082f8]
227
+ - Updated dependencies [a5810ce]
228
+ - Updated dependencies [3e9c131]
229
+ - Updated dependencies [3171b5b]
230
+ - Updated dependencies [973e5ac]
231
+ - Updated dependencies [daf942f]
232
+ - Updated dependencies [0b8b868]
233
+ - Updated dependencies [9e1eff5]
234
+ - Updated dependencies [6fa1ad1]
235
+ - Updated dependencies [c28d7a0]
236
+ - Updated dependencies [edf1e88]
237
+ - @mastra/core@0.9.4
238
+
239
+ ## 0.3.4-alpha.4
240
+
241
+ ### Patch Changes
242
+
243
+ - Updated dependencies [3e9c131]
244
+ - @mastra/core@0.9.4-alpha.4
245
+
246
+ ## 0.3.4-alpha.3
247
+
248
+ ### Patch Changes
249
+
250
+ - 302a9f0: fix: do not partition clickhouse trace table
251
+ - Updated dependencies [396be50]
252
+ - Updated dependencies [c3bd795]
253
+ - Updated dependencies [da082f8]
254
+ - Updated dependencies [a5810ce]
255
+ - @mastra/core@0.9.4-alpha.3
256
+
257
+ ## 0.3.4-alpha.2
258
+
259
+ ### Patch Changes
260
+
261
+ - Updated dependencies [3171b5b]
262
+ - Updated dependencies [973e5ac]
263
+ - Updated dependencies [9e1eff5]
264
+ - @mastra/core@0.9.4-alpha.2
265
+
266
+ ## 0.3.4-alpha.1
267
+
268
+ ### Patch Changes
269
+
270
+ - Updated dependencies [ab80e7e]
271
+ - Updated dependencies [6fa1ad1]
272
+ - Updated dependencies [c28d7a0]
273
+ - Updated dependencies [edf1e88]
274
+ - @mastra/core@0.9.4-alpha.1
275
+
276
+ ## 0.3.4-alpha.0
277
+
278
+ ### Patch Changes
279
+
280
+ - Updated dependencies [daf942f]
281
+ - Updated dependencies [0b8b868]
282
+ - @mastra/core@0.9.4-alpha.0
283
+
284
+ ## 0.3.3
285
+
286
+ ### Patch Changes
287
+
288
+ - Updated dependencies [e450778]
289
+ - Updated dependencies [8902157]
290
+ - Updated dependencies [ca0dc88]
291
+ - Updated dependencies [526c570]
292
+ - Updated dependencies [d7a6a33]
293
+ - Updated dependencies [9cd1a46]
294
+ - Updated dependencies [b5d2de0]
295
+ - Updated dependencies [644f8ad]
296
+ - Updated dependencies [70dbf51]
297
+ - @mastra/core@0.9.3
298
+
299
+ ## 0.3.3-alpha.1
300
+
301
+ ### Patch Changes
302
+
303
+ - Updated dependencies [e450778]
304
+ - Updated dependencies [8902157]
305
+ - Updated dependencies [ca0dc88]
306
+ - Updated dependencies [9cd1a46]
307
+ - Updated dependencies [70dbf51]
308
+ - @mastra/core@0.9.3-alpha.1
309
+
310
+ ## 0.3.3-alpha.0
311
+
312
+ ### Patch Changes
313
+
314
+ - Updated dependencies [526c570]
315
+ - Updated dependencies [b5d2de0]
316
+ - Updated dependencies [644f8ad]
317
+ - @mastra/core@0.9.3-alpha.0
318
+
319
+ ## 0.3.2
320
+
321
+ ### Patch Changes
322
+
323
+ - 4155f47: Add parameters to filter workflow runs
324
+ Add fromDate and toDate to telemetry parameters
325
+ - Updated dependencies [6052aa6]
326
+ - Updated dependencies [967b41c]
327
+ - Updated dependencies [3d2fb5c]
328
+ - Updated dependencies [26738f4]
329
+ - Updated dependencies [4155f47]
330
+ - Updated dependencies [7eeb2bc]
331
+ - Updated dependencies [b804723]
332
+ - Updated dependencies [8607972]
333
+ - Updated dependencies [ccef9f9]
334
+ - Updated dependencies [0097d50]
335
+ - Updated dependencies [7eeb2bc]
336
+ - Updated dependencies [17826a9]
337
+ - Updated dependencies [7d8b7c7]
338
+ - Updated dependencies [fba031f]
339
+ - Updated dependencies [3a5f1e1]
340
+ - Updated dependencies [51e6923]
341
+ - Updated dependencies [8398d89]
342
+ - @mastra/core@0.9.2
343
+
344
+ ## 0.3.2-alpha.6
345
+
346
+ ### Patch Changes
347
+
348
+ - Updated dependencies [6052aa6]
349
+ - Updated dependencies [7d8b7c7]
350
+ - Updated dependencies [3a5f1e1]
351
+ - Updated dependencies [8398d89]
352
+ - @mastra/core@0.9.2-alpha.6
353
+
354
+ ## 0.3.2-alpha.5
355
+
356
+ ### Patch Changes
357
+
358
+ - Updated dependencies [3d2fb5c]
359
+ - Updated dependencies [7eeb2bc]
360
+ - Updated dependencies [8607972]
361
+ - Updated dependencies [7eeb2bc]
362
+ - Updated dependencies [fba031f]
363
+ - @mastra/core@0.9.2-alpha.5
364
+
365
+ ## 0.3.2-alpha.4
366
+
367
+ ### Patch Changes
368
+
369
+ - Updated dependencies [ccef9f9]
370
+ - Updated dependencies [51e6923]
371
+ - @mastra/core@0.9.2-alpha.4
372
+
373
+ ## 0.3.2-alpha.3
374
+
375
+ ### Patch Changes
376
+
377
+ - 4155f47: Add parameters to filter workflow runs
378
+ Add fromDate and toDate to telemetry parameters
379
+ - Updated dependencies [967b41c]
380
+ - Updated dependencies [4155f47]
381
+ - Updated dependencies [17826a9]
382
+ - @mastra/core@0.9.2-alpha.3
383
+
384
+ ## 0.3.2-alpha.2
385
+
386
+ ### Patch Changes
387
+
388
+ - Updated dependencies [26738f4]
389
+ - @mastra/core@0.9.2-alpha.2
390
+
391
+ ## 0.3.2-alpha.1
392
+
393
+ ### Patch Changes
394
+
395
+ - Updated dependencies [b804723]
396
+ - @mastra/core@0.9.2-alpha.1
397
+
398
+ ## 0.3.2-alpha.0
399
+
400
+ ### Patch Changes
401
+
402
+ - Updated dependencies [0097d50]
403
+ - @mastra/core@0.9.2-alpha.0
404
+
405
+ ## 0.3.1
406
+
407
+ ### Patch Changes
408
+
409
+ - 479f490: [MASTRA-3131] Add getWorkflowRunByID and add resourceId as filter for getWorkflowRuns
410
+ - Updated dependencies [405b63d]
411
+ - Updated dependencies [81fb7f6]
412
+ - Updated dependencies [20275d4]
413
+ - Updated dependencies [7d1892c]
414
+ - Updated dependencies [a90a082]
415
+ - Updated dependencies [2d17c73]
416
+ - Updated dependencies [61e92f5]
417
+ - Updated dependencies [35955b0]
418
+ - Updated dependencies [6262bd5]
419
+ - Updated dependencies [c1409ef]
420
+ - Updated dependencies [3e7b69d]
421
+ - Updated dependencies [e4943b8]
422
+ - Updated dependencies [11d4485]
423
+ - Updated dependencies [479f490]
424
+ - Updated dependencies [c23a81c]
425
+ - Updated dependencies [2d4001d]
426
+ - Updated dependencies [c71013a]
427
+ - Updated dependencies [1d3b1cd]
428
+ - @mastra/core@0.9.1
429
+
430
+ ## 0.3.1-alpha.8
431
+
432
+ ### Patch Changes
433
+
434
+ - Updated dependencies [2d17c73]
435
+ - @mastra/core@0.9.1-alpha.8
436
+
437
+ ## 0.3.1-alpha.7
438
+
439
+ ### Patch Changes
440
+
441
+ - Updated dependencies [1d3b1cd]
442
+ - @mastra/core@0.9.1-alpha.7
443
+
444
+ ## 0.3.1-alpha.6
445
+
446
+ ### Patch Changes
447
+
448
+ - Updated dependencies [c23a81c]
449
+ - @mastra/core@0.9.1-alpha.6
450
+
451
+ ## 0.3.1-alpha.5
452
+
453
+ ### Patch Changes
454
+
455
+ - Updated dependencies [3e7b69d]
456
+ - @mastra/core@0.9.1-alpha.5
457
+
458
+ ## 0.3.1-alpha.4
459
+
460
+ ### Patch Changes
461
+
462
+ - 479f490: [MASTRA-3131] Add getWorkflowRunByID and add resourceId as filter for getWorkflowRuns
463
+ - Updated dependencies [e4943b8]
464
+ - Updated dependencies [479f490]
465
+ - @mastra/core@0.9.1-alpha.4
466
+
467
+ ## 0.3.1-alpha.3
468
+
469
+ ### Patch Changes
470
+
471
+ - Updated dependencies [6262bd5]
472
+ - @mastra/core@0.9.1-alpha.3
473
+
474
+ ## 0.3.1-alpha.2
475
+
476
+ ### Patch Changes
477
+
478
+ - Updated dependencies [405b63d]
479
+ - Updated dependencies [61e92f5]
480
+ - Updated dependencies [c71013a]
481
+ - @mastra/core@0.9.1-alpha.2
482
+
483
+ ## 0.3.1-alpha.1
484
+
485
+ ### Patch Changes
486
+
487
+ - Updated dependencies [20275d4]
488
+ - Updated dependencies [7d1892c]
489
+ - Updated dependencies [a90a082]
490
+ - Updated dependencies [35955b0]
491
+ - Updated dependencies [c1409ef]
492
+ - Updated dependencies [11d4485]
493
+ - Updated dependencies [2d4001d]
494
+ - @mastra/core@0.9.1-alpha.1
495
+
496
+ ## 0.3.1-alpha.0
497
+
498
+ ### Patch Changes
499
+
500
+ - Updated dependencies [81fb7f6]
501
+ - @mastra/core@0.9.1-alpha.0
502
+
503
+ ## 0.3.0
4
504
 
5
505
  ### Minor Changes
6
506
 
@@ -9,17 +509,36 @@
9
509
  ### Patch Changes
10
510
 
11
511
  - dd8d0cb: make Clickhouse storage extendable
512
+ - Updated dependencies [000a6d4]
12
513
  - Updated dependencies [08bb78e]
13
514
  - Updated dependencies [ed2f549]
14
515
  - Updated dependencies [7e92011]
15
516
  - Updated dependencies [9ee4293]
16
517
  - Updated dependencies [03f3cd0]
518
+ - Updated dependencies [c0f22b4]
17
519
  - Updated dependencies [71d9444]
18
520
  - Updated dependencies [157c741]
19
521
  - Updated dependencies [8a8a73b]
522
+ - Updated dependencies [0a033fa]
20
523
  - Updated dependencies [fe3ae4d]
524
+ - Updated dependencies [9c26508]
525
+ - Updated dependencies [0f4eae3]
526
+ - Updated dependencies [16a8648]
21
527
  - Updated dependencies [6f92295]
22
- - @mastra/core@0.0.0-vnextWorkflows-20250422142014
528
+ - @mastra/core@0.9.0
529
+
530
+ ## 0.3.0-alpha.8
531
+
532
+ ### Patch Changes
533
+
534
+ - Updated dependencies [000a6d4]
535
+ - Updated dependencies [ed2f549]
536
+ - Updated dependencies [c0f22b4]
537
+ - Updated dependencies [0a033fa]
538
+ - Updated dependencies [9c26508]
539
+ - Updated dependencies [0f4eae3]
540
+ - Updated dependencies [16a8648]
541
+ - @mastra/core@0.9.0-alpha.8
23
542
 
24
543
  ## 0.3.0-alpha.7
25
544
 
@@ -1,12 +1,18 @@
1
1
  import type { ClickHouseClient } from '@clickhouse/client';
2
2
  import type { EvalRow } from '@mastra/core/storage';
3
+ import type { MastraMessageV1 } from '@mastra/core/memory';
4
+ import type { MastraMessageV2 } from '@mastra/core/memory';
3
5
  import { MastraStorage } from '@mastra/core/storage';
4
- import type { MessageType } from '@mastra/core/memory';
6
+ import type { PaginationInfo } from '@mastra/core/storage';
5
7
  import type { StorageColumn } from '@mastra/core/storage';
6
8
  import type { StorageGetMessagesArg } from '@mastra/core/storage';
9
+ import type { StorageGetTracesArg } from '@mastra/core/storage';
7
10
  import type { StorageThreadType } from '@mastra/core/memory';
8
11
  import type { TABLE_NAMES } from '@mastra/core/storage';
9
12
  import { TABLE_SCHEMAS } from '@mastra/core/storage';
13
+ import type { Trace } from '@mastra/core/telemetry';
14
+ import type { WorkflowRun } from '@mastra/core/storage';
15
+ import type { WorkflowRuns } from '@mastra/core/storage';
10
16
  import type { WorkflowRunState } from '@mastra/core/workflows';
11
17
 
12
18
  declare type ClickhouseConfig = {
@@ -43,13 +49,15 @@ declare class ClickhouseStore extends MastraStorage {
43
49
  tableName: TABLE_NAMES;
44
50
  records: Record<string, any>[];
45
51
  }): Promise<void>;
46
- getTraces({ name, scope, page, perPage, attributes, filters, }: {
52
+ getTraces({ name, scope, page, perPage, attributes, filters, fromDate, toDate, }: {
47
53
  name?: string;
48
54
  scope?: string;
49
55
  page: number;
50
56
  perPage: number;
51
57
  attributes?: Record<string, string>;
52
58
  filters?: Record<string, any>;
59
+ fromDate?: Date;
60
+ toDate?: Date;
53
61
  }): Promise<any[]>;
54
62
  optimizeTable({ tableName }: {
55
63
  tableName: TABLE_NAMES;
@@ -61,6 +69,18 @@ declare class ClickhouseStore extends MastraStorage {
61
69
  tableName: TABLE_NAMES;
62
70
  schema: Record<string, StorageColumn>;
63
71
  }): Promise<void>;
72
+ protected getSqlType(type: StorageColumn['type']): string;
73
+ /**
74
+ * Alters table schema to add columns if they don't exist
75
+ * @param tableName Name of the table
76
+ * @param schema Schema of the table
77
+ * @param ifNotExists Array of column names to add if they don't exist
78
+ */
79
+ alterTable({ tableName, schema, ifNotExists, }: {
80
+ tableName: TABLE_NAMES;
81
+ schema: Record<string, StorageColumn>;
82
+ ifNotExists: string[];
83
+ }): Promise<void>;
64
84
  clearTable({ tableName }: {
65
85
  tableName: TABLE_NAMES;
66
86
  }): Promise<void>;
@@ -89,10 +109,20 @@ declare class ClickhouseStore extends MastraStorage {
89
109
  deleteThread({ threadId }: {
90
110
  threadId: string;
91
111
  }): Promise<void>;
92
- getMessages<T = unknown>({ threadId, selectBy }: StorageGetMessagesArg): Promise<T>;
93
- saveMessages({ messages }: {
94
- messages: MessageType[];
95
- }): Promise<MessageType[]>;
112
+ getMessages(args: StorageGetMessagesArg & {
113
+ format?: 'v1';
114
+ }): Promise<MastraMessageV1[]>;
115
+ getMessages(args: StorageGetMessagesArg & {
116
+ format: 'v2';
117
+ }): Promise<MastraMessageV2[]>;
118
+ saveMessages(args: {
119
+ messages: MastraMessageV1[];
120
+ format?: undefined | 'v1';
121
+ }): Promise<MastraMessageV1[]>;
122
+ saveMessages(args: {
123
+ messages: MastraMessageV2[];
124
+ format: 'v2';
125
+ }): Promise<MastraMessageV2[]>;
96
126
  persistWorkflowSnapshot({ workflowName, runId, snapshot, }: {
97
127
  workflowName: string;
98
128
  runId: string;
@@ -102,21 +132,32 @@ declare class ClickhouseStore extends MastraStorage {
102
132
  workflowName: string;
103
133
  runId: string;
104
134
  }): Promise<WorkflowRunState | null>;
105
- getWorkflowRuns({ workflowName, fromDate, toDate, limit, offset, }?: {
135
+ private parseWorkflowRun;
136
+ getWorkflowRuns({ workflowName, fromDate, toDate, limit, offset, resourceId, }?: {
106
137
  workflowName?: string;
107
138
  fromDate?: Date;
108
139
  toDate?: Date;
109
140
  limit?: number;
110
141
  offset?: number;
111
- }): Promise<{
112
- runs: Array<{
113
- workflowName: string;
114
- runId: string;
115
- snapshot: WorkflowRunState | string;
116
- createdAt: Date;
117
- updatedAt: Date;
118
- }>;
119
- total: number;
142
+ resourceId?: string;
143
+ }): Promise<WorkflowRuns>;
144
+ getWorkflowRunById({ runId, workflowName, }: {
145
+ runId: string;
146
+ workflowName?: string;
147
+ }): Promise<WorkflowRun | null>;
148
+ private hasColumn;
149
+ getTracesPaginated(_args: StorageGetTracesArg): Promise<PaginationInfo & {
150
+ traces: Trace[];
151
+ }>;
152
+ getThreadsByResourceIdPaginated(_args: {
153
+ resourceId: string;
154
+ page?: number;
155
+ perPage?: number;
156
+ }): Promise<PaginationInfo & {
157
+ threads: StorageThreadType[];
158
+ }>;
159
+ getMessagesPaginated(_args: StorageGetMessagesArg): Promise<PaginationInfo & {
160
+ messages: MastraMessageV1[] | MastraMessageV2[];
120
161
  }>;
121
162
  close(): Promise<void>;
122
163
  }