@mastra/clickhouse 0.11.0-alpha.1 → 0.11.1-alpha.0
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 +44 -0
- package/dist/_tsup-dts-rollup.d.cts +10 -0
- package/dist/_tsup-dts-rollup.d.ts +10 -0
- package/dist/index.cjs +4 -0
- package/dist/index.js +4 -0
- package/package.json +4 -4
- package/src/storage/index.ts +12 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/clickhouse@0.11.
|
|
2
|
+
> @mastra/clickhouse@0.11.1-alpha.0 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.5.0
|
|
8
8
|
[34mTSC[39m Build start
|
|
9
|
-
[32mTSC[39m ⚡️ Build success in
|
|
9
|
+
[32mTSC[39m ⚡️ Build success in 8842ms
|
|
10
10
|
[34mDTS[39m Build start
|
|
11
11
|
[34mCLI[39m Target: es2022
|
|
12
12
|
Analysis will use the bundled TypeScript version 5.8.3
|
|
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.3
|
|
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 11112ms
|
|
17
17
|
[34mCLI[39m Cleaning output folder
|
|
18
18
|
[34mESM[39m Build start
|
|
19
19
|
[34mCJS[39m Build start
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
20
|
+
[32mESM[39m [1mdist/index.js [22m[32m31.34 KB[39m
|
|
21
|
+
[32mESM[39m ⚡️ Build success in 1175ms
|
|
22
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m31.60 KB[39m
|
|
23
|
+
[32mCJS[39m ⚡️ Build success in 1176ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# @mastra/clickhouse
|
|
2
2
|
|
|
3
|
+
## 0.11.1-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d8f2d19: Add updateMessages API to storage classes (only support for PG and LibSQL for now) and to memory class. Additionally allow for metadata to be saved in the content field of a message.
|
|
8
|
+
- Updated dependencies [d8f2d19]
|
|
9
|
+
- Updated dependencies [9d52b17]
|
|
10
|
+
- Updated dependencies [8ba1b51]
|
|
11
|
+
- @mastra/core@0.10.7-alpha.0
|
|
12
|
+
|
|
13
|
+
## 0.11.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- 704d1ca: Thread Timestamp Auto-Update Enhancement
|
|
18
|
+
Added automatic thread updatedAt timestamp updates when messages are saved across all storage providers
|
|
19
|
+
Enhanced user experience: Threads now accurately reflect their latest activity with automatic timestamp updates when new messages are added
|
|
20
|
+
Universal implementation: Consistent behavior across all 7 storage backends (ClickHouse, Cloudflare D1, DynamoDB, MongoDB, PostgreSQL, Upstash, LibSQL)
|
|
21
|
+
Performance optimized: Updates execute in parallel with message saving operations for minimal performance impact
|
|
22
|
+
Backwards compatible: No breaking changes - existing code continues to work unchanged
|
|
23
|
+
Improved conversation ordering: Chat interfaces can now properly sort threads by actual last activity
|
|
24
|
+
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.
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- 63f6b7d: dependencies updates:
|
|
29
|
+
- Updated dependency [`@clickhouse/client@^1.11.2` ↗︎](https://www.npmjs.com/package/@clickhouse/client/v/1.11.2) (from `^1.11.0`, in `dependencies`)
|
|
30
|
+
- Updated dependencies [63f6b7d]
|
|
31
|
+
- Updated dependencies [12a95fc]
|
|
32
|
+
- Updated dependencies [4b0f8a6]
|
|
33
|
+
- Updated dependencies [51264a5]
|
|
34
|
+
- Updated dependencies [8e6f677]
|
|
35
|
+
- Updated dependencies [d70c420]
|
|
36
|
+
- Updated dependencies [ee9af57]
|
|
37
|
+
- Updated dependencies [36f1c36]
|
|
38
|
+
- Updated dependencies [2a16996]
|
|
39
|
+
- Updated dependencies [10d352e]
|
|
40
|
+
- Updated dependencies [9589624]
|
|
41
|
+
- Updated dependencies [53d3c37]
|
|
42
|
+
- Updated dependencies [751c894]
|
|
43
|
+
- Updated dependencies [577ce3a]
|
|
44
|
+
- Updated dependencies [9260b3a]
|
|
45
|
+
- @mastra/core@0.10.6
|
|
46
|
+
|
|
3
47
|
## 0.11.0-alpha.1
|
|
4
48
|
|
|
5
49
|
### Minor Changes
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ClickHouseClient } from '@clickhouse/client';
|
|
2
2
|
import type { EvalRow } from '@mastra/core/storage';
|
|
3
|
+
import type { MastraMessageContentV2 } from '@mastra/core/agent';
|
|
3
4
|
import type { MastraMessageV1 } from '@mastra/core/memory';
|
|
4
5
|
import type { MastraMessageV2 } from '@mastra/core/memory';
|
|
5
6
|
import { MastraStorage } from '@mastra/core/storage';
|
|
@@ -160,6 +161,15 @@ declare class ClickhouseStore extends MastraStorage {
|
|
|
160
161
|
messages: MastraMessageV1[] | MastraMessageV2[];
|
|
161
162
|
}>;
|
|
162
163
|
close(): Promise<void>;
|
|
164
|
+
updateMessages(_args: {
|
|
165
|
+
messages: Partial<Omit<MastraMessageV2, 'createdAt'>> & {
|
|
166
|
+
id: string;
|
|
167
|
+
content?: {
|
|
168
|
+
metadata?: MastraMessageContentV2['metadata'];
|
|
169
|
+
content?: MastraMessageContentV2['content'];
|
|
170
|
+
};
|
|
171
|
+
}[];
|
|
172
|
+
}): Promise<MastraMessageV2[]>;
|
|
163
173
|
}
|
|
164
174
|
export { ClickhouseStore }
|
|
165
175
|
export { ClickhouseStore as ClickhouseStore_alias_1 }
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ClickHouseClient } from '@clickhouse/client';
|
|
2
2
|
import type { EvalRow } from '@mastra/core/storage';
|
|
3
|
+
import type { MastraMessageContentV2 } from '@mastra/core/agent';
|
|
3
4
|
import type { MastraMessageV1 } from '@mastra/core/memory';
|
|
4
5
|
import type { MastraMessageV2 } from '@mastra/core/memory';
|
|
5
6
|
import { MastraStorage } from '@mastra/core/storage';
|
|
@@ -160,6 +161,15 @@ declare class ClickhouseStore extends MastraStorage {
|
|
|
160
161
|
messages: MastraMessageV1[] | MastraMessageV2[];
|
|
161
162
|
}>;
|
|
162
163
|
close(): Promise<void>;
|
|
164
|
+
updateMessages(_args: {
|
|
165
|
+
messages: Partial<Omit<MastraMessageV2, 'createdAt'>> & {
|
|
166
|
+
id: string;
|
|
167
|
+
content?: {
|
|
168
|
+
metadata?: MastraMessageContentV2['metadata'];
|
|
169
|
+
content?: MastraMessageContentV2['content'];
|
|
170
|
+
};
|
|
171
|
+
}[];
|
|
172
|
+
}): Promise<MastraMessageV2[]>;
|
|
163
173
|
}
|
|
164
174
|
export { ClickhouseStore }
|
|
165
175
|
export { ClickhouseStore as ClickhouseStore_alias_1 }
|
package/dist/index.cjs
CHANGED
|
@@ -950,6 +950,10 @@ var ClickhouseStore = class extends storage.MastraStorage {
|
|
|
950
950
|
async close() {
|
|
951
951
|
await this.db.close();
|
|
952
952
|
}
|
|
953
|
+
async updateMessages(_args) {
|
|
954
|
+
this.logger.error("updateMessages is not yet implemented in ClickhouseStore");
|
|
955
|
+
throw new Error("Method not implemented");
|
|
956
|
+
}
|
|
953
957
|
};
|
|
954
958
|
|
|
955
959
|
exports.COLUMN_TYPES = COLUMN_TYPES;
|
package/dist/index.js
CHANGED
|
@@ -948,6 +948,10 @@ var ClickhouseStore = class extends MastraStorage {
|
|
|
948
948
|
async close() {
|
|
949
949
|
await this.db.close();
|
|
950
950
|
}
|
|
951
|
+
async updateMessages(_args) {
|
|
952
|
+
this.logger.error("updateMessages is not yet implemented in ClickhouseStore");
|
|
953
|
+
throw new Error("Method not implemented");
|
|
954
|
+
}
|
|
951
955
|
};
|
|
952
956
|
|
|
953
957
|
export { COLUMN_TYPES, ClickhouseStore, TABLE_ENGINES };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/clickhouse",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1-alpha.0",
|
|
4
4
|
"description": "Clickhouse provider for Mastra - includes db storage capabilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"tsup": "^8.5.0",
|
|
30
30
|
"typescript": "^5.8.3",
|
|
31
31
|
"vitest": "^3.2.3",
|
|
32
|
-
"@internal/lint": "0.0.
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
32
|
+
"@internal/lint": "0.0.13",
|
|
33
|
+
"@internal/storage-test-utils": "0.0.9",
|
|
34
|
+
"@mastra/core": "0.10.7-alpha.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@mastra/core": ">=0.10.4-0 <0.11.0"
|
package/src/storage/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ClickHouseClient } from '@clickhouse/client';
|
|
2
2
|
import { createClient } from '@clickhouse/client';
|
|
3
3
|
import { MessageList } from '@mastra/core/agent';
|
|
4
|
+
import type { MastraMessageContentV2 } from '@mastra/core/agent';
|
|
4
5
|
import type { MetricResult, TestInfo } from '@mastra/core/eval';
|
|
5
6
|
import type { MastraMessageV1, MastraMessageV2, StorageThreadType } from '@mastra/core/memory';
|
|
6
7
|
import {
|
|
@@ -1186,4 +1187,15 @@ export class ClickhouseStore extends MastraStorage {
|
|
|
1186
1187
|
async close(): Promise<void> {
|
|
1187
1188
|
await this.db.close();
|
|
1188
1189
|
}
|
|
1190
|
+
|
|
1191
|
+
async updateMessages(_args: {
|
|
1192
|
+
messages: Partial<Omit<MastraMessageV2, 'createdAt'>> &
|
|
1193
|
+
{
|
|
1194
|
+
id: string;
|
|
1195
|
+
content?: { metadata?: MastraMessageContentV2['metadata']; content?: MastraMessageContentV2['content'] };
|
|
1196
|
+
}[];
|
|
1197
|
+
}): Promise<MastraMessageV2[]> {
|
|
1198
|
+
this.logger.error('updateMessages is not yet implemented in ClickhouseStore');
|
|
1199
|
+
throw new Error('Method not implemented');
|
|
1200
|
+
}
|
|
1189
1201
|
}
|