@mastra/clickhouse 0.0.0-tsconfig-compile-20250703214351 → 0.0.0-update-scorers-api-20250801170445

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +105 -5
  2. package/LICENSE.md +12 -4
  3. package/dist/index.cjs +2055 -609
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.ts +2 -4
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +2054 -606
  8. package/dist/index.js.map +1 -0
  9. package/dist/storage/domains/legacy-evals/index.d.ts +21 -0
  10. package/dist/storage/domains/legacy-evals/index.d.ts.map +1 -0
  11. package/dist/storage/domains/memory/index.d.ts +79 -0
  12. package/dist/storage/domains/memory/index.d.ts.map +1 -0
  13. package/dist/storage/domains/operations/index.d.ts +42 -0
  14. package/dist/storage/domains/operations/index.d.ts.map +1 -0
  15. package/dist/storage/domains/scores/index.d.ts +43 -0
  16. package/dist/storage/domains/scores/index.d.ts.map +1 -0
  17. package/dist/storage/domains/traces/index.d.ts +21 -0
  18. package/dist/storage/domains/traces/index.d.ts.map +1 -0
  19. package/dist/storage/domains/utils.d.ts +28 -0
  20. package/dist/storage/domains/utils.d.ts.map +1 -0
  21. package/dist/storage/domains/workflows/index.d.ts +36 -0
  22. package/dist/storage/domains/workflows/index.d.ts.map +1 -0
  23. package/dist/{_tsup-dts-rollup.d.cts → storage/index.d.ts} +109 -94
  24. package/dist/storage/index.d.ts.map +1 -0
  25. package/package.json +8 -8
  26. package/src/storage/domains/legacy-evals/index.ts +246 -0
  27. package/src/storage/domains/memory/index.ts +1393 -0
  28. package/src/storage/domains/operations/index.ts +319 -0
  29. package/src/storage/domains/scores/index.ts +326 -0
  30. package/src/storage/domains/traces/index.ts +275 -0
  31. package/src/storage/domains/utils.ts +86 -0
  32. package/src/storage/domains/workflows/index.ts +285 -0
  33. package/src/storage/index.test.ts +15 -1143
  34. package/src/storage/index.ts +186 -1246
  35. package/tsconfig.build.json +9 -0
  36. package/tsconfig.json +1 -1
  37. package/tsup.config.ts +22 -0
  38. package/dist/_tsup-dts-rollup.d.ts +0 -191
  39. package/dist/index.d.cts +0 -4
@@ -0,0 +1,42 @@
1
+ import type { ClickHouseClient } from '@clickhouse/client';
2
+ import { StoreOperations } from '@mastra/core/storage';
3
+ import type { StorageColumn, TABLE_NAMES } from '@mastra/core/storage';
4
+ import type { ClickhouseConfig } from '../utils';
5
+ export declare class StoreOperationsClickhouse extends StoreOperations {
6
+ protected ttl: ClickhouseConfig['ttl'];
7
+ protected client: ClickHouseClient;
8
+ constructor({ client, ttl }: {
9
+ client: ClickHouseClient;
10
+ ttl: ClickhouseConfig['ttl'];
11
+ });
12
+ hasColumn(table: string, column: string): Promise<boolean>;
13
+ protected getSqlType(type: StorageColumn['type']): string;
14
+ createTable({ tableName, schema, }: {
15
+ tableName: TABLE_NAMES;
16
+ schema: Record<string, StorageColumn>;
17
+ }): Promise<void>;
18
+ alterTable({ tableName, schema, ifNotExists, }: {
19
+ tableName: TABLE_NAMES;
20
+ schema: Record<string, StorageColumn>;
21
+ ifNotExists: string[];
22
+ }): Promise<void>;
23
+ clearTable({ tableName }: {
24
+ tableName: TABLE_NAMES;
25
+ }): Promise<void>;
26
+ dropTable({ tableName }: {
27
+ tableName: TABLE_NAMES;
28
+ }): Promise<void>;
29
+ insert({ tableName, record }: {
30
+ tableName: TABLE_NAMES;
31
+ record: Record<string, any>;
32
+ }): Promise<void>;
33
+ batchInsert({ tableName, records }: {
34
+ tableName: TABLE_NAMES;
35
+ records: Record<string, any>[];
36
+ }): Promise<void>;
37
+ load<R>({ tableName, keys }: {
38
+ tableName: TABLE_NAMES;
39
+ keys: Record<string, string>;
40
+ }): Promise<R | null>;
41
+ }
42
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/operations/index.ts"],"names":[],"mappings":"AA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E,EAAE;QAAE,SAAS,EAAE,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAMnE,MAAM,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;QAAE,SAAS,EAAE,WAAW,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAoCrG,WAAW,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;QAAE,SAAS,EAAE,WAAW,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAmC9G,IAAI,CAAC,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE;QAAE,SAAS,EAAE,WAAW,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;CA6DhH"}
@@ -0,0 +1,43 @@
1
+ import type { ClickHouseClient } from '@clickhouse/client';
2
+ import type { ScoreRowData } from '@mastra/core/scores';
3
+ import { ScoresStorage } from '@mastra/core/storage';
4
+ import type { PaginationInfo, StoragePagination } from '@mastra/core/storage';
5
+ import type { StoreOperationsClickhouse } from '../operations';
6
+ export declare class ScoresStorageClickhouse extends ScoresStorage {
7
+ protected client: ClickHouseClient;
8
+ protected operations: StoreOperationsClickhouse;
9
+ constructor({ client, operations }: {
10
+ client: ClickHouseClient;
11
+ operations: StoreOperationsClickhouse;
12
+ });
13
+ private transformScoreRow;
14
+ getScoreById({ id }: {
15
+ id: string;
16
+ }): Promise<ScoreRowData | null>;
17
+ saveScore(score: ScoreRowData): Promise<{
18
+ score: ScoreRowData;
19
+ }>;
20
+ getScoresByRunId({ runId, pagination, }: {
21
+ runId: string;
22
+ pagination: StoragePagination;
23
+ }): Promise<{
24
+ pagination: PaginationInfo;
25
+ scores: ScoreRowData[];
26
+ }>;
27
+ getScoresByScorerId({ scorerId, pagination, }: {
28
+ scorerId: string;
29
+ pagination: StoragePagination;
30
+ }): Promise<{
31
+ pagination: PaginationInfo;
32
+ scores: ScoreRowData[];
33
+ }>;
34
+ getScoresByEntityId({ entityId, entityType, pagination, }: {
35
+ pagination: StoragePagination;
36
+ entityId: string;
37
+ entityType: string;
38
+ }): Promise<{
39
+ pagination: PaginationInfo;
40
+ scores: ScoreRowData[];
41
+ }>;
42
+ }
43
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/scores/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAkC,MAAM,sBAAsB,CAAC;AACrF,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAE/D,qBAAa,uBAAwB,SAAQ,aAAa;IACxD,SAAS,CAAC,MAAM,EAAE,gBAAgB,CAAC;IACnC,SAAS,CAAC,UAAU,EAAE,yBAAyB,CAAC;gBACpC,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE;QAAE,MAAM,EAAE,gBAAgB,CAAC;QAAC,UAAU,EAAE,yBAAyB,CAAA;KAAE;IAMvG,OAAO,CAAC,iBAAiB;IA2BnB,YAAY,CAAC,EAAE,EAAE,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAmClE,SAAS,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,YAAY,CAAA;KAAE,CAAC;IA6BhE,gBAAgB,CAAC,EACrB,KAAK,EACL,UAAU,GACX,EAAE;QACD,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,iBAAiB,CAAC;KAC/B,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,MAAM,EAAE,YAAY,EAAE,CAAA;KAAE,CAAC;IAkE7D,mBAAmB,CAAC,EACxB,QAAQ,EACR,UAAU,GACX,EAAE;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,iBAAiB,CAAC;KAC/B,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,MAAM,EAAE,YAAY,EAAE,CAAA;KAAE,CAAC;IAkE7D,mBAAmB,CAAC,EACxB,QAAQ,EACR,UAAU,EACV,UAAU,GACX,EAAE;QACD,UAAU,EAAE,iBAAiB,CAAC;QAC9B,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,MAAM,EAAE,YAAY,EAAE,CAAA;KAAE,CAAC;CAkEpE"}
@@ -0,0 +1,21 @@
1
+ import type { ClickHouseClient } from '@clickhouse/client';
2
+ import { TracesStorage } from '@mastra/core/storage';
3
+ import type { PaginationInfo, StorageGetTracesPaginatedArg, StorageGetTracesArg } from '@mastra/core/storage';
4
+ import type { Trace } from '@mastra/core/telemetry';
5
+ import type { StoreOperationsClickhouse } from '../operations';
6
+ export declare class TracesStorageClickhouse extends TracesStorage {
7
+ protected client: ClickHouseClient;
8
+ protected operations: StoreOperationsClickhouse;
9
+ constructor({ client, operations }: {
10
+ client: ClickHouseClient;
11
+ operations: StoreOperationsClickhouse;
12
+ });
13
+ getTracesPaginated(args: StorageGetTracesPaginatedArg): Promise<PaginationInfo & {
14
+ traces: Trace[];
15
+ }>;
16
+ getTraces({ name, scope, page, perPage, attributes, filters, fromDate, toDate, }: StorageGetTracesArg): Promise<any[]>;
17
+ batchTraceInsert(args: {
18
+ records: Trace[];
19
+ }): Promise<void>;
20
+ }
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/traces/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAgD,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACnG,OAAO,KAAK,EAAE,cAAc,EAAE,4BAA4B,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC9G,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAE/D,qBAAa,uBAAwB,SAAQ,aAAa;IACxD,SAAS,CAAC,MAAM,EAAE,gBAAgB,CAAC;IACnC,SAAS,CAAC,UAAU,EAAE,yBAAyB,CAAC;gBAEpC,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE;QAAE,MAAM,EAAE,gBAAgB,CAAC;QAAC,UAAU,EAAE,yBAAyB,CAAA;KAAE;IAMjG,kBAAkB,CAAC,IAAI,EAAE,4BAA4B,GAAG,OAAO,CAAC,cAAc,GAAG;QAAE,MAAM,EAAE,KAAK,EAAE,CAAA;KAAE,CAAC;IAgJrG,SAAS,CAAC,EACd,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,OAAO,EACP,UAAU,EACV,OAAO,EACP,QAAQ,EACR,MAAM,GACP,EAAE,mBAAmB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAqGjC,gBAAgB,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,KAAK,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAGlE"}
@@ -0,0 +1,28 @@
1
+ import type { TABLE_NAMES, TABLE_SCHEMAS, StorageColumn } from '@mastra/core/storage';
2
+ export declare const TABLE_ENGINES: Record<TABLE_NAMES, string>;
3
+ export declare const COLUMN_TYPES: Record<StorageColumn['type'], string>;
4
+ export type IntervalUnit = 'NANOSECOND' | 'MICROSECOND' | 'MILLISECOND' | 'SECOND' | 'MINUTE' | 'HOUR' | 'DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR';
5
+ export type ClickhouseConfig = {
6
+ url: string;
7
+ username: string;
8
+ password: string;
9
+ ttl?: {
10
+ [TableKey in TABLE_NAMES]?: {
11
+ row?: {
12
+ interval: number;
13
+ unit: IntervalUnit;
14
+ ttlKey?: string;
15
+ };
16
+ columns?: Partial<{
17
+ [ColumnKey in keyof (typeof TABLE_SCHEMAS)[TableKey]]: {
18
+ interval: number;
19
+ unit: IntervalUnit;
20
+ ttlKey?: string;
21
+ };
22
+ }>;
23
+ };
24
+ };
25
+ };
26
+ export declare function transformRow<R>(row: any): R;
27
+ export declare function transformRows<R>(rows: any[]): R[];
28
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/storage/domains/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAYtF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAQrD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,CAQ9D,CAAC;AAEF,MAAM,MAAM,YAAY,GACpB,YAAY,GACZ,aAAa,GACb,aAAa,GACb,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,KAAK,GACL,MAAM,GACN,OAAO,GACP,SAAS,GACT,MAAM,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE;SACH,QAAQ,IAAI,WAAW,CAAC,CAAC,EAAE;YAC1B,GAAG,CAAC,EAAE;gBAAE,QAAQ,EAAE,MAAM,CAAC;gBAAC,IAAI,EAAE,YAAY,CAAC;gBAAC,MAAM,CAAC,EAAE,MAAM,CAAA;aAAE,CAAC;YAChE,OAAO,CAAC,EAAE,OAAO,CAAC;iBACf,SAAS,IAAI,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC,QAAQ,CAAC,GAAG;oBACrD,QAAQ,EAAE,MAAM,CAAC;oBACjB,IAAI,EAAE,YAAY,CAAC;oBACnB,MAAM,CAAC,EAAE,MAAM,CAAC;iBACjB;aACF,CAAC,CAAC;SACJ;KACF,CAAC;CACH,CAAC;AAEF,wBAAgB,YAAY,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC,CAkB3C;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAEjD"}
@@ -0,0 +1,36 @@
1
+ import type { ClickHouseClient } from '@clickhouse/client';
2
+ import { WorkflowsStorage } from '@mastra/core/storage';
3
+ import type { WorkflowRun, WorkflowRuns } from '@mastra/core/storage';
4
+ import type { WorkflowRunState } from '@mastra/core/workflows';
5
+ import type { StoreOperationsClickhouse } from '../operations';
6
+ export declare class WorkflowsStorageClickhouse extends WorkflowsStorage {
7
+ protected client: ClickHouseClient;
8
+ protected operations: StoreOperationsClickhouse;
9
+ constructor({ client, operations }: {
10
+ client: ClickHouseClient;
11
+ operations: StoreOperationsClickhouse;
12
+ });
13
+ persistWorkflowSnapshot({ workflowName, runId, snapshot, }: {
14
+ workflowName: string;
15
+ runId: string;
16
+ snapshot: WorkflowRunState;
17
+ }): Promise<void>;
18
+ loadWorkflowSnapshot({ workflowName, runId, }: {
19
+ workflowName: string;
20
+ runId: string;
21
+ }): Promise<WorkflowRunState | null>;
22
+ private parseWorkflowRun;
23
+ getWorkflowRuns({ workflowName, fromDate, toDate, limit, offset, resourceId, }?: {
24
+ workflowName?: string;
25
+ fromDate?: Date;
26
+ toDate?: Date;
27
+ limit?: number;
28
+ offset?: number;
29
+ resourceId?: string;
30
+ }): Promise<WorkflowRuns>;
31
+ getWorkflowRunById({ runId, workflowName, }: {
32
+ runId: string;
33
+ workflowName?: string;
34
+ }): Promise<WorkflowRun | null>;
35
+ }
36
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/workflows/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAA2B,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAG/D,qBAAa,0BAA2B,SAAQ,gBAAgB;IAC9D,SAAS,CAAC,MAAM,EAAE,gBAAgB,CAAC;IACnC,SAAS,CAAC,UAAU,EAAE,yBAAyB,CAAC;gBACpC,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE;QAAE,MAAM,EAAE,gBAAgB,CAAC;QAAC,UAAU,EAAE,yBAAyB,CAAA;KAAE;IAMjG,uBAAuB,CAAC,EAC5B,YAAY,EACZ,KAAK,EACL,QAAQ,GACT,EAAE;QACD,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,gBAAgB,CAAC;KAC5B,GAAG,OAAO,CAAC,IAAI,CAAC;IA8CX,oBAAoB,CAAC,EACzB,YAAY,EACZ,KAAK,GACN,EAAE;QACD,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IA4BpC,OAAO,CAAC,gBAAgB;IAqBlB,eAAe,CAAC,EACpB,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,KAAK,EACL,MAAM,EACN,UAAU,GACX,GAAE;QACD,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,EAAE,IAAI,CAAC;QAChB,MAAM,CAAC,EAAE,IAAI,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;KAChB,GAAG,OAAO,CAAC,YAAY,CAAC;IAuFxB,kBAAkB,CAAC,EACvB,KAAK,EACL,YAAY,GACb,EAAE;QACD,KAAK,EAAE,MAAM,CAAC;QACd,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAmDhC"}
@@ -1,23 +1,13 @@
1
1
  import type { ClickHouseClient } from '@clickhouse/client';
2
- import type { EvalRow } from '@mastra/core/storage';
3
2
  import type { MastraMessageContentV2 } from '@mastra/core/agent';
4
- import type { MastraMessageV1 } from '@mastra/core/memory';
5
- import type { MastraMessageV2 } from '@mastra/core/memory';
3
+ import type { MastraMessageV1, MastraMessageV2, StorageThreadType } from '@mastra/core/memory';
4
+ import type { ScoreRowData } from '@mastra/core/scores';
6
5
  import { MastraStorage } from '@mastra/core/storage';
7
- import type { PaginationInfo } from '@mastra/core/storage';
8
- import type { StorageColumn } from '@mastra/core/storage';
9
- import type { StorageGetMessagesArg } from '@mastra/core/storage';
10
- import type { StorageGetTracesArg } from '@mastra/core/storage';
11
- import type { StorageThreadType } from '@mastra/core/memory';
12
- import type { TABLE_NAMES } from '@mastra/core/storage';
13
- import type { TABLE_RESOURCES } from '@mastra/core/storage';
14
- import { TABLE_SCHEMAS } from '@mastra/core/storage';
6
+ import type { TABLE_SCHEMAS, EvalRow, PaginationInfo, StorageColumn, StorageGetMessagesArg, TABLE_NAMES, WorkflowRun, WorkflowRuns, StorageGetTracesArg, StorageGetTracesPaginatedArg, StoragePagination, StorageDomains, PaginationArgs, StorageResourceType } from '@mastra/core/storage';
15
7
  import type { Trace } from '@mastra/core/telemetry';
16
- import type { WorkflowRun } from '@mastra/core/storage';
17
- import type { WorkflowRuns } from '@mastra/core/storage';
18
8
  import type { WorkflowRunState } from '@mastra/core/workflows';
19
-
20
- declare type ClickhouseConfig = {
9
+ type IntervalUnit = 'NANOSECOND' | 'MICROSECOND' | 'MILLISECOND' | 'SECOND' | 'MINUTE' | 'HOUR' | 'DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR';
10
+ export type ClickhouseConfig = {
21
11
  url: string;
22
12
  username: string;
23
13
  password: string;
@@ -38,30 +28,29 @@ declare type ClickhouseConfig = {
38
28
  };
39
29
  };
40
30
  };
41
- export { ClickhouseConfig }
42
- export { ClickhouseConfig as ClickhouseConfig_alias_1 }
43
-
44
- declare class ClickhouseStore extends MastraStorage {
31
+ export declare class ClickhouseStore extends MastraStorage {
45
32
  protected db: ClickHouseClient;
46
33
  protected ttl: ClickhouseConfig['ttl'];
34
+ stores: StorageDomains;
47
35
  constructor(config: ClickhouseConfig);
48
- private transformEvalRow;
49
- private escape;
36
+ get supports(): {
37
+ selectByIncludeResourceScope: boolean;
38
+ resourceWorkingMemory: boolean;
39
+ hasColumn: boolean;
40
+ createTable: boolean;
41
+ deleteMessages: boolean;
42
+ };
50
43
  getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
44
+ getEvals(options: {
45
+ agentName?: string;
46
+ type?: 'test' | 'live';
47
+ } & PaginationArgs): Promise<PaginationInfo & {
48
+ evals: EvalRow[];
49
+ }>;
51
50
  batchInsert({ tableName, records }: {
52
51
  tableName: TABLE_NAMES;
53
52
  records: Record<string, any>[];
54
53
  }): Promise<void>;
55
- getTraces({ name, scope, page, perPage, attributes, filters, fromDate, toDate, }: {
56
- name?: string;
57
- scope?: string;
58
- page: number;
59
- perPage: number;
60
- attributes?: Record<string, string>;
61
- filters?: Record<string, any>;
62
- fromDate?: Date;
63
- toDate?: Date;
64
- }): Promise<any[]>;
65
54
  optimizeTable({ tableName }: {
66
55
  tableName: TABLE_NAMES;
67
56
  }): Promise<void>;
@@ -69,16 +58,12 @@ declare class ClickhouseStore extends MastraStorage {
69
58
  tableName: TABLE_NAMES;
70
59
  }): Promise<void>;
71
60
  createTable({ tableName, schema, }: {
72
- tableName: SUPPORTED_TABLE_NAMES;
61
+ tableName: TABLE_NAMES;
73
62
  schema: Record<string, StorageColumn>;
74
63
  }): Promise<void>;
75
- protected getSqlType(type: StorageColumn['type']): string;
76
- /**
77
- * Alters table schema to add columns if they don't exist
78
- * @param tableName Name of the table
79
- * @param schema Schema of the table
80
- * @param ifNotExists Array of column names to add if they don't exist
81
- */
64
+ dropTable({ tableName }: {
65
+ tableName: TABLE_NAMES;
66
+ }): Promise<void>;
82
67
  alterTable({ tableName, schema, ifNotExists, }: {
83
68
  tableName: TABLE_NAMES;
84
69
  schema: Record<string, StorageColumn>;
@@ -91,10 +76,38 @@ declare class ClickhouseStore extends MastraStorage {
91
76
  tableName: TABLE_NAMES;
92
77
  record: Record<string, any>;
93
78
  }): Promise<void>;
94
- load<R>({ tableName, keys, }: {
95
- tableName: SUPPORTED_TABLE_NAMES;
79
+ load<R>({ tableName, keys }: {
80
+ tableName: TABLE_NAMES;
96
81
  keys: Record<string, string>;
97
82
  }): Promise<R | null>;
83
+ persistWorkflowSnapshot({ workflowName, runId, snapshot, }: {
84
+ workflowName: string;
85
+ runId: string;
86
+ snapshot: WorkflowRunState;
87
+ }): Promise<void>;
88
+ loadWorkflowSnapshot({ workflowName, runId, }: {
89
+ workflowName: string;
90
+ runId: string;
91
+ }): Promise<WorkflowRunState | null>;
92
+ getWorkflowRuns({ workflowName, fromDate, toDate, limit, offset, resourceId, }?: {
93
+ workflowName?: string;
94
+ fromDate?: Date;
95
+ toDate?: Date;
96
+ limit?: number;
97
+ offset?: number;
98
+ resourceId?: string;
99
+ }): Promise<WorkflowRuns>;
100
+ getWorkflowRunById({ runId, workflowName, }: {
101
+ runId: string;
102
+ workflowName?: string;
103
+ }): Promise<WorkflowRun | null>;
104
+ getTraces(args: StorageGetTracesArg): Promise<any[]>;
105
+ getTracesPaginated(args: StorageGetTracesPaginatedArg): Promise<PaginationInfo & {
106
+ traces: Trace[];
107
+ }>;
108
+ batchTraceInsert(args: {
109
+ records: Trace[];
110
+ }): Promise<void>;
98
111
  getThreadById({ threadId }: {
99
112
  threadId: string;
100
113
  }): Promise<StorageThreadType | null>;
@@ -112,6 +125,13 @@ declare class ClickhouseStore extends MastraStorage {
112
125
  deleteThread({ threadId }: {
113
126
  threadId: string;
114
127
  }): Promise<void>;
128
+ getThreadsByResourceIdPaginated(args: {
129
+ resourceId: string;
130
+ page: number;
131
+ perPage: number;
132
+ }): Promise<PaginationInfo & {
133
+ threads: StorageThreadType[];
134
+ }>;
115
135
  getMessages(args: StorageGetMessagesArg & {
116
136
  format?: 'v1';
117
137
  }): Promise<MastraMessageV1[]>;
@@ -126,66 +146,61 @@ declare class ClickhouseStore extends MastraStorage {
126
146
  messages: MastraMessageV2[];
127
147
  format: 'v2';
128
148
  }): Promise<MastraMessageV2[]>;
129
- persistWorkflowSnapshot({ workflowName, runId, snapshot, }: {
130
- workflowName: string;
131
- runId: string;
132
- snapshot: WorkflowRunState;
133
- }): Promise<void>;
134
- loadWorkflowSnapshot({ workflowName, runId, }: {
135
- workflowName: string;
136
- runId: string;
137
- }): Promise<WorkflowRunState | null>;
138
- private parseWorkflowRun;
139
- getWorkflowRuns({ workflowName, fromDate, toDate, limit, offset, resourceId, }?: {
140
- workflowName?: string;
141
- fromDate?: Date;
142
- toDate?: Date;
143
- limit?: number;
144
- offset?: number;
145
- resourceId?: string;
146
- }): Promise<WorkflowRuns>;
147
- getWorkflowRunById({ runId, workflowName, }: {
148
- runId: string;
149
- workflowName?: string;
150
- }): Promise<WorkflowRun | null>;
151
- private hasColumn;
152
- getTracesPaginated(_args: StorageGetTracesArg): Promise<PaginationInfo & {
153
- traces: Trace[];
154
- }>;
155
- getThreadsByResourceIdPaginated(_args: {
156
- resourceId: string;
157
- page?: number;
158
- perPage?: number;
149
+ getMessagesPaginated(args: StorageGetMessagesArg & {
150
+ format?: 'v1' | 'v2';
159
151
  }): Promise<PaginationInfo & {
160
- threads: StorageThreadType[];
161
- }>;
162
- getMessagesPaginated(_args: StorageGetMessagesArg): Promise<PaginationInfo & {
163
152
  messages: MastraMessageV1[] | MastraMessageV2[];
164
153
  }>;
165
- close(): Promise<void>;
166
- updateMessages(_args: {
167
- messages: Partial<Omit<MastraMessageV2, 'createdAt'>> & {
154
+ updateMessages(args: {
155
+ messages: (Partial<Omit<MastraMessageV2, 'createdAt'>> & {
168
156
  id: string;
157
+ threadId?: string;
169
158
  content?: {
170
159
  metadata?: MastraMessageContentV2['metadata'];
171
160
  content?: MastraMessageContentV2['content'];
172
161
  };
173
- }[];
162
+ })[];
174
163
  }): Promise<MastraMessageV2[]>;
164
+ getResourceById({ resourceId }: {
165
+ resourceId: string;
166
+ }): Promise<StorageResourceType | null>;
167
+ saveResource({ resource }: {
168
+ resource: StorageResourceType;
169
+ }): Promise<StorageResourceType>;
170
+ updateResource({ resourceId, workingMemory, metadata, }: {
171
+ resourceId: string;
172
+ workingMemory?: string;
173
+ metadata?: Record<string, unknown>;
174
+ }): Promise<StorageResourceType>;
175
+ getScoreById({ id }: {
176
+ id: string;
177
+ }): Promise<ScoreRowData | null>;
178
+ saveScore(_score: ScoreRowData): Promise<{
179
+ score: ScoreRowData;
180
+ }>;
181
+ getScoresByRunId({ runId, pagination, }: {
182
+ runId: string;
183
+ pagination: StoragePagination;
184
+ }): Promise<{
185
+ pagination: PaginationInfo;
186
+ scores: ScoreRowData[];
187
+ }>;
188
+ getScoresByEntityId({ entityId, entityType, pagination, }: {
189
+ pagination: StoragePagination;
190
+ entityId: string;
191
+ entityType: string;
192
+ }): Promise<{
193
+ pagination: PaginationInfo;
194
+ scores: ScoreRowData[];
195
+ }>;
196
+ getScoresByScorerId({ scorerId, pagination, }: {
197
+ scorerId: string;
198
+ pagination: StoragePagination;
199
+ }): Promise<{
200
+ pagination: PaginationInfo;
201
+ scores: ScoreRowData[];
202
+ }>;
203
+ close(): Promise<void>;
175
204
  }
176
- export { ClickhouseStore }
177
- export { ClickhouseStore as ClickhouseStore_alias_1 }
178
-
179
- declare const COLUMN_TYPES: Record<StorageColumn['type'], string>;
180
- export { COLUMN_TYPES }
181
- export { COLUMN_TYPES as COLUMN_TYPES_alias_1 }
182
-
183
- declare type IntervalUnit = 'NANOSECOND' | 'MICROSECOND' | 'MILLISECOND' | 'SECOND' | 'MINUTE' | 'HOUR' | 'DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR';
184
-
185
- declare type SUPPORTED_TABLE_NAMES = Exclude<TABLE_NAMES, typeof TABLE_RESOURCES>;
186
-
187
- declare const TABLE_ENGINES: Record<SUPPORTED_TABLE_NAMES, string>;
188
- export { TABLE_ENGINES }
189
- export { TABLE_ENGINES as TABLE_ENGINES_alias_1 }
190
-
191
- export { }
205
+ export {};
206
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EACV,aAAa,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E;QACD,UAAU,EAAE,iBAAiB,CAAC;QAC9B,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,MAAM,EAAE,YAAY,EAAE,CAAA;KAAE,CAAC;IAI7D,mBAAmB,CAAC,EACxB,QAAQ,EACR,UAAU,GACX,EAAE;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,iBAAiB,CAAC;KAC/B,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,MAAM,EAAE,YAAY,EAAE,CAAA;KAAE,CAAC;IAI7D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/clickhouse",
3
- "version": "0.0.0-tsconfig-compile-20250703214351",
3
+ "version": "0.0.0-update-scorers-api-20250801170445",
4
4
  "description": "Clickhouse provider for Mastra - includes db storage capabilities",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -25,20 +25,20 @@
25
25
  "devDependencies": {
26
26
  "@microsoft/api-extractor": "^7.52.8",
27
27
  "@types/node": "^20.19.0",
28
- "eslint": "^9.29.0",
28
+ "eslint": "^9.30.1",
29
29
  "tsup": "^8.5.0",
30
30
  "typescript": "^5.8.3",
31
31
  "vitest": "^3.2.4",
32
- "@internal/lint": "0.0.0-tsconfig-compile-20250703214351",
33
- "@mastra/core": "0.0.0-tsconfig-compile-20250703214351",
34
- "@internal/storage-test-utils": "0.0.13"
32
+ "@internal/lint": "0.0.0-update-scorers-api-20250801170445",
33
+ "@internal/storage-test-utils": "0.0.21",
34
+ "@mastra/core": "0.0.0-update-scorers-api-20250801170445"
35
35
  },
36
36
  "peerDependencies": {
37
- "@mastra/core": "0.0.0-tsconfig-compile-20250703214351"
37
+ "@mastra/core": "0.0.0-update-scorers-api-20250801170445"
38
38
  },
39
39
  "scripts": {
40
- "build": "tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting",
41
- "build:watch": "pnpm build --watch",
40
+ "build": "tsup --silent --config tsup.config.ts",
41
+ "build:watch": "tsup --watch --silent --config tsup.config.ts",
42
42
  "pretest": "docker compose up -d && (for i in $(seq 1 30); do docker compose exec -T db clickhouse-client --query 'SELECT 1' && break || (sleep 1; [ $i -eq 30 ] && exit 1); done)",
43
43
  "test": "vitest run",
44
44
  "posttest": "docker compose down -v",