@mastra/clickhouse 0.0.0-vnext-inngest-20250508131921 → 0.0.0-vnext-20251119160359

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/LICENSE.md CHANGED
@@ -1,7 +1,15 @@
1
- Copyright 2025 Mastra AI, Inc.
1
+ # Apache License 2.0
2
2
 
3
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3
+ Copyright (c) 2025 Kepler Software, Inc.
4
4
 
5
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
6
8
 
7
- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
package/README.md CHANGED
@@ -26,29 +26,32 @@ const store = new ClickhouseStore({
26
26
 
27
27
  // Create a thread
28
28
  await store.saveThread({
29
- id: 'thread-123',
30
- resourceId: 'resource-456',
31
- title: 'My Thread',
32
- metadata: { key: 'value' },
33
- createdAt: new Date(),
34
- updatedAt: new Date(),
29
+ thread: {
30
+ id: 'thread-123',
31
+ resourceId: 'resource-456',
32
+ title: 'My Thread',
33
+ metadata: { key: 'value' },
34
+ createdAt: new Date(),
35
+ },
35
36
  });
36
37
 
37
38
  // Add messages to thread
38
- await store.saveMessages([
39
- {
40
- id: 'msg-789',
41
- threadId: 'thread-123',
42
- role: 'user',
43
- type: 'text',
44
- content: [{ type: 'text', text: 'Hello' }],
45
- createdAt: new Date(),
46
- },
47
- ]);
39
+ await store.saveMessages({
40
+ messages: [
41
+ {
42
+ id: 'msg-789',
43
+ threadId: 'thread-123',
44
+ role: 'user',
45
+ content: { content: 'Hello' },
46
+ resourceId: 'resource-456',
47
+ createdAt: new Date(),
48
+ },
49
+ ],
50
+ });
48
51
 
49
52
  // Query threads and messages
50
53
  const savedThread = await store.getThreadById({ threadId: 'thread-123' });
51
- const messages = await store.getMessages({ threadId: 'thread-123' });
54
+ const { messages } = await store.listMessages({ threadId: 'thread-123' });
52
55
 
53
56
  // Clean up
54
57
  await store.close();
@@ -89,21 +92,44 @@ The store uses different table engines for different types of data:
89
92
 
90
93
  ### Thread Operations
91
94
 
92
- - `saveThread(thread)`: Create or update a thread
95
+ - `saveThread({ thread })`: Create or update a thread
93
96
  - `getThreadById({ threadId })`: Get a thread by ID
97
+ - `listThreadsByResourceId({ resourceId, offset, limit, orderBy? })`: List paginated threads for a resource
94
98
  - `updateThread({ id, title, metadata })`: Update thread title and metadata
95
99
  - `deleteThread({ threadId })`: Delete a thread and its messages
96
100
 
97
101
  ### Message Operations
98
102
 
99
- - `saveMessages(messages)`: Save multiple messages
100
- - `getMessages({ threadId, selectBy? })`: Get messages for a thread with optional filtering
101
- - `deleteMessages(messageIds)`: Delete specific messages
103
+ - `saveMessages({ messages })`: Save multiple messages
104
+ - `listMessages({ threadId, perPage?, page? })`: Get messages for a thread with pagination
105
+ - `updateMessages({ messages })`: Update existing messages
106
+
107
+ ### Resource Operations
108
+
109
+ - `getResourceById({ resourceId })`: Get a resource by ID
110
+ - `saveResource({ resource })`: Create or save a resource
111
+ - `updateResource({ resourceId, workingMemory })`: Update resource working memory
102
112
 
103
113
  ### Workflow Operations
104
114
 
105
115
  - `persistWorkflowSnapshot({ workflowName, runId, snapshot })`: Save workflow state
106
116
  - `loadWorkflowSnapshot({ workflowName, runId })`: Load workflow state
117
+ - `listWorkflowRuns({ workflowName, pagination })`: List workflow runs with pagination
118
+ - `getWorkflowRunById({ workflowName, runId })`: Get a specific workflow run
119
+
120
+ ### Evaluation/Scoring Operations
121
+
122
+ - `getScoreById({ id })`: Get a score by ID
123
+ - `saveScore(score)`: Save an evaluation score
124
+ - `listScoresByScorerId({ scorerId, pagination })`: List scores by scorer with pagination
125
+ - `listScoresByRunId({ runId, pagination })`: List scores by run with pagination
126
+ - `listScoresByEntityId({ entityId, entityType, pagination })`: List scores by entity with pagination
127
+ - `listScoresBySpan({ traceId, spanId, pagination })`: List scores by span with pagination
128
+
129
+ ### Operations Not Currently Supported
130
+
131
+ - `deleteMessages(messageIds)`: Message deletion is not supported in ClickHouse
132
+ - AI Observability (traces/spans): Not currently supported
107
133
 
108
134
  ## Data Types
109
135