@mastra/clickhouse 0.3.0-alpha.5 → 0.3.0-alpha.6
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/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +8 -0
- package/dist/_tsup-dts-rollup.d.cts +11 -2
- package/dist/_tsup-dts-rollup.d.ts +11 -2
- package/dist/index.cjs +2 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -2
- package/package.json +2 -2
- package/src/storage/index.ts +4 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/clickhouse@0.3.0-alpha.
|
|
2
|
+
> @mastra/clickhouse@0.3.0-alpha.6 build /home/runner/work/mastra/mastra/stores/clickhouse
|
|
3
3
|
> tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
6
6
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
7
|
[34mCLI[39m tsup v8.4.0
|
|
8
8
|
[34mTSC[39m Build start
|
|
9
|
-
[32mTSC[39m ⚡️ Build success in
|
|
9
|
+
[32mTSC[39m ⚡️ Build success in 8944ms
|
|
10
10
|
[34mDTS[39m Build start
|
|
11
11
|
[34mCLI[39m Target: es2022
|
|
12
12
|
Analysis will use the bundled TypeScript version 5.8.2
|
|
13
13
|
[36mWriting package typings: /home/runner/work/mastra/mastra/stores/clickhouse/dist/_tsup-dts-rollup.d.ts[39m
|
|
14
14
|
Analysis will use the bundled TypeScript version 5.8.2
|
|
15
15
|
[36mWriting package typings: /home/runner/work/mastra/mastra/stores/clickhouse/dist/_tsup-dts-rollup.d.cts[39m
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 10363ms
|
|
17
17
|
[34mCLI[39m Cleaning output folder
|
|
18
18
|
[34mESM[39m Build start
|
|
19
19
|
[34mCJS[39m Build start
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
20
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m25.72 KB[39m
|
|
21
|
+
[32mCJS[39m ⚡️ Build success in 996ms
|
|
22
|
+
[32mESM[39m [1mdist/index.js [22m[32m25.51 KB[39m
|
|
23
|
+
[32mESM[39m ⚡️ Build success in 998ms
|
package/CHANGELOG.md
CHANGED
|
@@ -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
|
-
|
|
37
|
-
|
|
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
|
-
|
|
37
|
-
|
|
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
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createClient } from '@clickhouse/client';
|
|
2
|
-
import {
|
|
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.3.0-alpha.
|
|
3
|
+
"version": "0.3.0-alpha.6",
|
|
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.9.0-alpha.
|
|
24
|
+
"@mastra/core": "^0.9.0-alpha.6"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@microsoft/api-extractor": "^7.52.1",
|
package/src/storage/index.ts
CHANGED
|
@@ -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
|
-
|
|
93
|
-
|
|
92
|
+
protected db: ClickHouseClient;
|
|
93
|
+
protected ttl: ClickhouseConfig['ttl'] = {};
|
|
94
94
|
|
|
95
95
|
constructor(config: ClickhouseConfig) {
|
|
96
96
|
super({ name: 'ClickhouseStore' });
|