@mastra/clickhouse 0.0.0-toolOptionTypes-20250917085558 → 0.0.0-top-level-fix-20251211111608

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/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