@mastra/clickhouse 0.13.0-alpha.0 → 0.13.0-alpha.2
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 +1 -1
- package/CHANGELOG.md +21 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/legacy-evals/index.d.ts +1 -1
- package/dist/storage/domains/memory/index.d.ts +1 -1
- package/dist/storage/domains/operations/index.d.ts +1 -1
- package/dist/storage/domains/scores/index.d.ts +1 -1
- package/dist/storage/domains/traces/index.d.ts +1 -1
- package/dist/storage/domains/workflows/index.d.ts +1 -1
- package/package.json +6 -5
- package/src/storage/domains/traces/index.ts +10 -10
- package/tsup.config.ts +2 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ClickHouseClient } from '@clickhouse/client';
|
|
2
2
|
import { LegacyEvalsStorage } from '@mastra/core/storage';
|
|
3
3
|
import type { EvalRow, PaginationArgs, PaginationInfo } from '@mastra/core/storage';
|
|
4
|
-
import type { StoreOperationsClickhouse } from '../operations';
|
|
4
|
+
import type { StoreOperationsClickhouse } from '../operations/index.js';
|
|
5
5
|
export declare class LegacyEvalsStorageClickhouse extends LegacyEvalsStorage {
|
|
6
6
|
protected client: ClickHouseClient;
|
|
7
7
|
protected operations: StoreOperationsClickhouse;
|
|
@@ -3,7 +3,7 @@ import type { MastraMessageContentV2 } from '@mastra/core/agent';
|
|
|
3
3
|
import type { MastraMessageV1, MastraMessageV2, StorageThreadType } from '@mastra/core/memory';
|
|
4
4
|
import type { PaginationInfo, StorageGetMessagesArg, StorageResourceType } from '@mastra/core/storage';
|
|
5
5
|
import { MemoryStorage } from '@mastra/core/storage';
|
|
6
|
-
import type { StoreOperationsClickhouse } from '../operations';
|
|
6
|
+
import type { StoreOperationsClickhouse } from '../operations/index.js';
|
|
7
7
|
export declare class MemoryStorageClickhouse extends MemoryStorage {
|
|
8
8
|
protected client: ClickHouseClient;
|
|
9
9
|
protected operations: StoreOperationsClickhouse;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ClickHouseClient } from '@clickhouse/client';
|
|
2
2
|
import { StoreOperations } from '@mastra/core/storage';
|
|
3
3
|
import type { StorageColumn, TABLE_NAMES } from '@mastra/core/storage';
|
|
4
|
-
import type { ClickhouseConfig } from '../utils';
|
|
4
|
+
import type { ClickhouseConfig } from '../utils.js';
|
|
5
5
|
export declare class StoreOperationsClickhouse extends StoreOperations {
|
|
6
6
|
protected ttl: ClickhouseConfig['ttl'];
|
|
7
7
|
protected client: ClickHouseClient;
|
|
@@ -2,7 +2,7 @@ import type { ClickHouseClient } from '@clickhouse/client';
|
|
|
2
2
|
import type { ScoreRowData } from '@mastra/core/scores';
|
|
3
3
|
import { ScoresStorage } from '@mastra/core/storage';
|
|
4
4
|
import type { PaginationInfo, StoragePagination } from '@mastra/core/storage';
|
|
5
|
-
import type { StoreOperationsClickhouse } from '../operations';
|
|
5
|
+
import type { StoreOperationsClickhouse } from '../operations/index.js';
|
|
6
6
|
export declare class ScoresStorageClickhouse extends ScoresStorage {
|
|
7
7
|
protected client: ClickHouseClient;
|
|
8
8
|
protected operations: StoreOperationsClickhouse;
|
|
@@ -2,7 +2,7 @@ import type { ClickHouseClient } from '@clickhouse/client';
|
|
|
2
2
|
import { TracesStorage } from '@mastra/core/storage';
|
|
3
3
|
import type { PaginationInfo, StorageGetTracesPaginatedArg, StorageGetTracesArg } from '@mastra/core/storage';
|
|
4
4
|
import type { Trace } from '@mastra/core/telemetry';
|
|
5
|
-
import type { StoreOperationsClickhouse } from '../operations';
|
|
5
|
+
import type { StoreOperationsClickhouse } from '../operations/index.js';
|
|
6
6
|
export declare class TracesStorageClickhouse extends TracesStorage {
|
|
7
7
|
protected client: ClickHouseClient;
|
|
8
8
|
protected operations: StoreOperationsClickhouse;
|
|
@@ -2,7 +2,7 @@ import type { ClickHouseClient } from '@clickhouse/client';
|
|
|
2
2
|
import { WorkflowsStorage } from '@mastra/core/storage';
|
|
3
3
|
import type { WorkflowRun, WorkflowRuns } from '@mastra/core/storage';
|
|
4
4
|
import type { WorkflowRunState } from '@mastra/core/workflows';
|
|
5
|
-
import type { StoreOperationsClickhouse } from '../operations';
|
|
5
|
+
import type { StoreOperationsClickhouse } from '../operations/index.js';
|
|
6
6
|
export declare class WorkflowsStorageClickhouse extends WorkflowsStorage {
|
|
7
7
|
protected client: ClickHouseClient;
|
|
8
8
|
protected operations: StoreOperationsClickhouse;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/clickhouse",
|
|
3
|
-
"version": "0.13.0-alpha.
|
|
3
|
+
"version": "0.13.0-alpha.2",
|
|
4
4
|
"description": "Clickhouse provider for Mastra - includes db storage capabilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"default": "./dist/index.js"
|
|
13
13
|
},
|
|
14
14
|
"require": {
|
|
15
|
-
"types": "./dist/index.d.
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
16
|
"default": "./dist/index.cjs"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@clickhouse/client": "^1.
|
|
23
|
+
"@clickhouse/client": "^1.12.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@microsoft/api-extractor": "^7.52.8",
|
|
@@ -31,10 +31,11 @@
|
|
|
31
31
|
"vitest": "^3.2.4",
|
|
32
32
|
"@internal/lint": "0.0.26",
|
|
33
33
|
"@internal/storage-test-utils": "0.0.22",
|
|
34
|
-
"@
|
|
34
|
+
"@internal/types-builder": "0.0.1",
|
|
35
|
+
"@mastra/core": "0.13.0-alpha.2"
|
|
35
36
|
},
|
|
36
37
|
"peerDependencies": {
|
|
37
|
-
"@mastra/core": ">=0.
|
|
38
|
+
"@mastra/core": ">=0.13.0-0 <0.14.0-0"
|
|
38
39
|
},
|
|
39
40
|
"scripts": {
|
|
40
41
|
"build": "tsup --silent --config tsup.config.ts",
|
|
@@ -112,13 +112,13 @@ export class TracesStorageClickhouse extends TracesStorage {
|
|
|
112
112
|
name: row.name,
|
|
113
113
|
scope: row.scope,
|
|
114
114
|
kind: row.kind,
|
|
115
|
-
status: safelyParseJSON(row.status
|
|
116
|
-
events: safelyParseJSON(row.events
|
|
117
|
-
links: safelyParseJSON(row.links
|
|
118
|
-
attributes: safelyParseJSON(row.attributes
|
|
115
|
+
status: safelyParseJSON(row.status),
|
|
116
|
+
events: safelyParseJSON(row.events),
|
|
117
|
+
links: safelyParseJSON(row.links),
|
|
118
|
+
attributes: safelyParseJSON(row.attributes),
|
|
119
119
|
startTime: row.startTime,
|
|
120
120
|
endTime: row.endTime,
|
|
121
|
-
other: safelyParseJSON(row.other
|
|
121
|
+
other: safelyParseJSON(row.other),
|
|
122
122
|
createdAt: row.createdAt,
|
|
123
123
|
}));
|
|
124
124
|
|
|
@@ -235,13 +235,13 @@ export class TracesStorageClickhouse extends TracesStorage {
|
|
|
235
235
|
name: row.name,
|
|
236
236
|
scope: row.scope,
|
|
237
237
|
kind: row.kind,
|
|
238
|
-
status: safelyParseJSON(row.status
|
|
239
|
-
events: safelyParseJSON(row.events
|
|
240
|
-
links: safelyParseJSON(row.links
|
|
241
|
-
attributes: safelyParseJSON(row.attributes
|
|
238
|
+
status: safelyParseJSON(row.status),
|
|
239
|
+
events: safelyParseJSON(row.events),
|
|
240
|
+
links: safelyParseJSON(row.links),
|
|
241
|
+
attributes: safelyParseJSON(row.attributes),
|
|
242
242
|
startTime: row.startTime,
|
|
243
243
|
endTime: row.endTime,
|
|
244
|
-
other: safelyParseJSON(row.other
|
|
244
|
+
other: safelyParseJSON(row.other),
|
|
245
245
|
createdAt: row.createdAt,
|
|
246
246
|
}));
|
|
247
247
|
} catch (error: any) {
|
package/tsup.config.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { promisify } from 'util';
|
|
1
|
+
import { generateTypes } from '@internal/types-builder';
|
|
3
2
|
import { defineConfig } from 'tsup';
|
|
4
3
|
|
|
5
|
-
const exec = promisify(spawn);
|
|
6
|
-
|
|
7
4
|
export default defineConfig({
|
|
8
5
|
entry: ['src/index.ts'],
|
|
9
6
|
format: ['esm', 'cjs'],
|
|
@@ -15,8 +12,6 @@ export default defineConfig({
|
|
|
15
12
|
},
|
|
16
13
|
sourcemap: true,
|
|
17
14
|
onSuccess: async () => {
|
|
18
|
-
await
|
|
19
|
-
stdio: 'inherit',
|
|
20
|
-
});
|
|
15
|
+
await generateTypes(process.cwd());
|
|
21
16
|
},
|
|
22
17
|
});
|