@mastra/clickhouse 1.0.0-beta.4 → 1.0.0-beta.5
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/CHANGELOG.md +13 -0
- package/dist/index.cjs +27 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +27 -1
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/utils.d.ts.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +4 -0
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +4 -0
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @mastra/clickhouse
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Add delete workflow run API ([#10991](https://github.com/mastra-ai/mastra/pull/10991))
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
await workflow.deleteWorkflowRunById(runId);
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`edb07e4`](https://github.com/mastra-ai/mastra/commit/edb07e49283e0c28bd094a60e03439bf6ecf0221), [`b7e17d3`](https://github.com/mastra-ai/mastra/commit/b7e17d3f5390bb5a71efc112204413656fcdc18d), [`261473a`](https://github.com/mastra-ai/mastra/commit/261473ac637e633064a22076671e2e02b002214d), [`5d7000f`](https://github.com/mastra-ai/mastra/commit/5d7000f757cd65ea9dc5b05e662fd83dfd44e932), [`4f0331a`](https://github.com/mastra-ai/mastra/commit/4f0331a79bf6eb5ee598a5086e55de4b5a0ada03), [`8a000da`](https://github.com/mastra-ai/mastra/commit/8a000da0c09c679a2312f6b3aa05b2ca78ca7393)]:
|
|
14
|
+
- @mastra/core@1.0.0-beta.10
|
|
15
|
+
|
|
3
16
|
## 1.0.0-beta.4
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -15,7 +15,8 @@ var TABLE_ENGINES = {
|
|
|
15
15
|
[storage.TABLE_SCORERS]: `MergeTree()`,
|
|
16
16
|
[storage.TABLE_RESOURCES]: `ReplacingMergeTree()`,
|
|
17
17
|
// TODO: verify this is the correct engine for Spans when implementing clickhouse storage
|
|
18
|
-
[storage.TABLE_SPANS]: `ReplacingMergeTree()
|
|
18
|
+
[storage.TABLE_SPANS]: `ReplacingMergeTree()`,
|
|
19
|
+
mastra_agents: `ReplacingMergeTree()`
|
|
19
20
|
};
|
|
20
21
|
var COLUMN_TYPES = {
|
|
21
22
|
text: "String",
|
|
@@ -2156,6 +2157,28 @@ var WorkflowsStorageClickhouse = class extends storage.WorkflowsStorage {
|
|
|
2156
2157
|
);
|
|
2157
2158
|
}
|
|
2158
2159
|
}
|
|
2160
|
+
async deleteWorkflowRunById({ runId, workflowName }) {
|
|
2161
|
+
try {
|
|
2162
|
+
const values = {
|
|
2163
|
+
var_runId: runId,
|
|
2164
|
+
var_workflow_name: workflowName
|
|
2165
|
+
};
|
|
2166
|
+
await this.client.command({
|
|
2167
|
+
query: `DELETE FROM ${storage.TABLE_WORKFLOW_SNAPSHOT} WHERE run_id = {var_runId:String} AND workflow_name = {var_workflow_name:String}`,
|
|
2168
|
+
query_params: values
|
|
2169
|
+
});
|
|
2170
|
+
} catch (error$1) {
|
|
2171
|
+
throw new error.MastraError(
|
|
2172
|
+
{
|
|
2173
|
+
id: storage.createStorageErrorId("CLICKHOUSE", "DELETE_WORKFLOW_RUN_BY_ID", "FAILED"),
|
|
2174
|
+
domain: error.ErrorDomain.STORAGE,
|
|
2175
|
+
category: error.ErrorCategory.THIRD_PARTY,
|
|
2176
|
+
details: { runId, workflowName }
|
|
2177
|
+
},
|
|
2178
|
+
error$1
|
|
2179
|
+
);
|
|
2180
|
+
}
|
|
2181
|
+
}
|
|
2159
2182
|
};
|
|
2160
2183
|
|
|
2161
2184
|
// src/storage/index.ts
|
|
@@ -2300,6 +2323,9 @@ var ClickhouseStore = class extends storage.MastraStorage {
|
|
|
2300
2323
|
}) {
|
|
2301
2324
|
return this.stores.workflows.getWorkflowRunById({ runId, workflowName });
|
|
2302
2325
|
}
|
|
2326
|
+
async deleteWorkflowRunById({ runId, workflowName }) {
|
|
2327
|
+
return this.stores.workflows.deleteWorkflowRunById({ runId, workflowName });
|
|
2328
|
+
}
|
|
2303
2329
|
async getThreadById({ threadId }) {
|
|
2304
2330
|
return this.stores.memory.getThreadById({ threadId });
|
|
2305
2331
|
}
|