@mastra/clickhouse 0.0.0-vnextWorkflows-20250417075051 → 0.0.0-vnextWorkflows-20250421062111

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,6 +1,6 @@
1
1
  # @mastra/clickhouse
2
2
 
3
- ## 0.0.0-vnextWorkflows-20250417075051
3
+ ## 0.0.0-vnextWorkflows-20250421062111
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -8,12 +8,47 @@
8
8
 
9
9
  ### Patch Changes
10
10
 
11
+ - dd8d0cb: make Clickhouse storage extendable
12
+ - Updated dependencies [08bb78e]
13
+ - Updated dependencies [ed2f549]
14
+ - Updated dependencies [7e92011]
11
15
  - Updated dependencies [9ee4293]
12
16
  - Updated dependencies [03f3cd0]
17
+ - Updated dependencies [71d9444]
18
+ - Updated dependencies [157c741]
13
19
  - Updated dependencies [8a8a73b]
14
20
  - Updated dependencies [fe3ae4d]
15
21
  - Updated dependencies [6f92295]
16
- - @mastra/core@0.0.0-vnextWorkflows-20250417075051
22
+ - @mastra/core@0.0.0-vnextWorkflows-20250421062111
23
+
24
+ ## 0.3.0-alpha.7
25
+
26
+ ### Patch Changes
27
+
28
+ - Updated dependencies [71d9444]
29
+ - @mastra/core@0.9.0-alpha.7
30
+
31
+ ## 0.3.0-alpha.6
32
+
33
+ ### Patch Changes
34
+
35
+ - dd8d0cb: make Clickhouse storage extendable
36
+ - Updated dependencies [157c741]
37
+ - @mastra/core@0.9.0-alpha.6
38
+
39
+ ## 0.3.0-alpha.5
40
+
41
+ ### Patch Changes
42
+
43
+ - Updated dependencies [08bb78e]
44
+ - @mastra/core@0.9.0-alpha.5
45
+
46
+ ## 0.3.0-alpha.4
47
+
48
+ ### Patch Changes
49
+
50
+ - Updated dependencies [7e92011]
51
+ - @mastra/core@0.9.0-alpha.4
17
52
 
18
53
  ## 0.3.0-alpha.3
19
54
 
@@ -1,3 +1,4 @@
1
+ import type { ClickHouseClient } from '@clickhouse/client';
1
2
  import type { EvalRow } from '@mastra/core/storage';
2
3
  import { MastraStorage } from '@mastra/core/storage';
3
4
  import type { MessageType } from '@mastra/core/memory';
@@ -33,8 +34,8 @@ export { ClickhouseConfig }
33
34
  export { ClickhouseConfig as ClickhouseConfig_alias_1 }
34
35
 
35
36
  declare class ClickhouseStore extends MastraStorage {
36
- private db;
37
- private ttl;
37
+ protected db: ClickHouseClient;
38
+ protected ttl: ClickhouseConfig['ttl'];
38
39
  constructor(config: ClickhouseConfig);
39
40
  private transformEvalRow;
40
41
  getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
@@ -122,6 +123,14 @@ declare class ClickhouseStore extends MastraStorage {
122
123
  export { ClickhouseStore }
123
124
  export { ClickhouseStore as ClickhouseStore_alias_1 }
124
125
 
126
+ declare const COLUMN_TYPES: Record<StorageColumn['type'], string>;
127
+ export { COLUMN_TYPES }
128
+ export { COLUMN_TYPES as COLUMN_TYPES_alias_1 }
129
+
125
130
  declare type IntervalUnit = 'NANOSECOND' | 'MICROSECOND' | 'MILLISECOND' | 'SECOND' | 'MINUTE' | 'HOUR' | 'DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR';
126
131
 
132
+ declare const TABLE_ENGINES: Record<TABLE_NAMES, string>;
133
+ export { TABLE_ENGINES }
134
+ export { TABLE_ENGINES as TABLE_ENGINES_alias_1 }
135
+
127
136
  export { }
@@ -1,3 +1,4 @@
1
+ import type { ClickHouseClient } from '@clickhouse/client';
1
2
  import type { EvalRow } from '@mastra/core/storage';
2
3
  import { MastraStorage } from '@mastra/core/storage';
3
4
  import type { MessageType } from '@mastra/core/memory';
@@ -33,8 +34,8 @@ export { ClickhouseConfig }
33
34
  export { ClickhouseConfig as ClickhouseConfig_alias_1 }
34
35
 
35
36
  declare class ClickhouseStore extends MastraStorage {
36
- private db;
37
- private ttl;
37
+ protected db: ClickHouseClient;
38
+ protected ttl: ClickhouseConfig['ttl'];
38
39
  constructor(config: ClickhouseConfig);
39
40
  private transformEvalRow;
40
41
  getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
@@ -122,6 +123,14 @@ declare class ClickhouseStore extends MastraStorage {
122
123
  export { ClickhouseStore }
123
124
  export { ClickhouseStore as ClickhouseStore_alias_1 }
124
125
 
126
+ declare const COLUMN_TYPES: Record<StorageColumn['type'], string>;
127
+ export { COLUMN_TYPES }
128
+ export { COLUMN_TYPES as COLUMN_TYPES_alias_1 }
129
+
125
130
  declare type IntervalUnit = 'NANOSECOND' | 'MICROSECOND' | 'MILLISECOND' | 'SECOND' | 'MINUTE' | 'HOUR' | 'DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR';
126
131
 
132
+ declare const TABLE_ENGINES: Record<TABLE_NAMES, string>;
133
+ export { TABLE_ENGINES }
134
+ export { TABLE_ENGINES as TABLE_ENGINES_alias_1 }
135
+
127
136
  export { }
package/dist/index.cjs CHANGED
@@ -778,4 +778,6 @@ var ClickhouseStore = class extends storage.MastraStorage {
778
778
  }
779
779
  };
780
780
 
781
+ exports.COLUMN_TYPES = COLUMN_TYPES;
781
782
  exports.ClickhouseStore = ClickhouseStore;
783
+ exports.TABLE_ENGINES = TABLE_ENGINES;
package/dist/index.d.cts CHANGED
@@ -1,2 +1,4 @@
1
1
  export { ClickhouseConfig } from './_tsup-dts-rollup.cjs';
2
+ export { TABLE_ENGINES } from './_tsup-dts-rollup.cjs';
3
+ export { COLUMN_TYPES } from './_tsup-dts-rollup.cjs';
2
4
  export { ClickhouseStore } from './_tsup-dts-rollup.cjs';
package/dist/index.d.ts CHANGED
@@ -1,2 +1,4 @@
1
1
  export { ClickhouseConfig } from './_tsup-dts-rollup.js';
2
+ export { TABLE_ENGINES } from './_tsup-dts-rollup.js';
3
+ export { COLUMN_TYPES } from './_tsup-dts-rollup.js';
2
4
  export { ClickhouseStore } from './_tsup-dts-rollup.js';
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createClient } from '@clickhouse/client';
2
- import { MastraStorage, TABLE_EVALS, TABLE_SCHEMAS, TABLE_TRACES, TABLE_WORKFLOW_SNAPSHOT, TABLE_THREADS, TABLE_MESSAGES } from '@mastra/core/storage';
2
+ import { TABLE_EVALS, TABLE_THREADS, TABLE_TRACES, TABLE_WORKFLOW_SNAPSHOT, TABLE_MESSAGES, MastraStorage, TABLE_SCHEMAS } from '@mastra/core/storage';
3
3
 
4
4
  // src/storage/index.ts
5
5
  function safelyParseJSON(jsonString) {
@@ -776,4 +776,4 @@ var ClickhouseStore = class extends MastraStorage {
776
776
  }
777
777
  };
778
778
 
779
- export { ClickhouseStore };
779
+ export { COLUMN_TYPES, ClickhouseStore, TABLE_ENGINES };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/clickhouse",
3
- "version": "0.0.0-vnextWorkflows-20250417075051",
3
+ "version": "0.0.0-vnextWorkflows-20250421062111",
4
4
  "description": "Clickhouse provider for Mastra - includes db storage capabilities",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -21,7 +21,7 @@
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
23
  "@clickhouse/client": "^1.11.0",
24
- "@mastra/core": "0.0.0-vnextWorkflows-20250417075051"
24
+ "@mastra/core": "0.0.0-vnextWorkflows-20250421062111"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@microsoft/api-extractor": "^7.52.1",
@@ -53,7 +53,7 @@ export type ClickhouseConfig = {
53
53
  };
54
54
  };
55
55
 
56
- const TABLE_ENGINES: Record<TABLE_NAMES, string> = {
56
+ export const TABLE_ENGINES: Record<TABLE_NAMES, string> = {
57
57
  [TABLE_MESSAGES]: `MergeTree()`,
58
58
  [TABLE_WORKFLOW_SNAPSHOT]: `ReplacingMergeTree()`,
59
59
  [TABLE_TRACES]: `MergeTree()`,
@@ -61,7 +61,7 @@ const TABLE_ENGINES: Record<TABLE_NAMES, string> = {
61
61
  [TABLE_EVALS]: `MergeTree()`,
62
62
  };
63
63
 
64
- const COLUMN_TYPES: Record<StorageColumn['type'], string> = {
64
+ export const COLUMN_TYPES: Record<StorageColumn['type'], string> = {
65
65
  text: 'String',
66
66
  timestamp: 'DateTime64(3)',
67
67
  uuid: 'String',
@@ -89,8 +89,8 @@ function transformRow<R>(row: any): R {
89
89
  }
90
90
 
91
91
  export class ClickhouseStore extends MastraStorage {
92
- private db: ClickHouseClient;
93
- private ttl: ClickhouseConfig['ttl'] = {};
92
+ protected db: ClickHouseClient;
93
+ protected ttl: ClickhouseConfig['ttl'] = {};
94
94
 
95
95
  constructor(config: ClickhouseConfig) {
96
96
  super({ name: 'ClickhouseStore' });