@mastra/clickhouse 1.30.0-alpha.2 → 1.30.0-alpha.3

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.
@@ -3,7 +3,7 @@ name: mastra-clickhouse
3
3
  description: Documentation for @mastra/clickhouse. Use when working with @mastra/clickhouse APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/clickhouse"
6
- version: "1.30.0-alpha.2"
6
+ version: "1.30.0-alpha.3"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.30.0-alpha.2",
2
+ "version": "1.30.0-alpha.3",
3
3
  "package": "@mastra/clickhouse",
4
4
  "exports": {
5
5
  "COLUMN_TYPES": {
@@ -10,12 +10,12 @@
10
10
  "ClickhouseStore": {
11
11
  "types": "dist/storage/index.d.ts",
12
12
  "implementation": "dist/index.js",
13
- "line": 11920
13
+ "line": 11922
14
14
  },
15
15
  "ClickhouseStoreVNext": {
16
16
  "types": "dist/storage/index.d.ts",
17
17
  "implementation": "dist/index.js",
18
- "line": 12036
18
+ "line": 12038
19
19
  },
20
20
  "MemoryStorageClickhouse": {
21
21
  "types": "dist/storage/domains/memory/index.d.ts",
@@ -30,12 +30,12 @@
30
30
  "ObservabilityStorageClickhouseVNext": {
31
31
  "types": "dist/storage/domains/observability/v-next/index.d.ts",
32
32
  "implementation": "dist/index.js",
33
- "line": 10338
33
+ "line": 10340
34
34
  },
35
35
  "ScoresStorageClickhouse": {
36
36
  "types": "dist/storage/domains/scores/index.d.ts",
37
37
  "implementation": "dist/index.js",
38
- "line": 11224
38
+ "line": 11226
39
39
  },
40
40
  "TABLE_DELETION_REQUESTS": {
41
41
  "types": "dist/storage/domains/observability/v-next/ddl.d.ts",
@@ -50,12 +50,12 @@
50
50
  "WorkflowsStorageClickhouse": {
51
51
  "types": "dist/storage/domains/workflows/index.d.ts",
52
52
  "implementation": "dist/index.js",
53
- "line": 11625
53
+ "line": 11627
54
54
  },
55
55
  "applyClickHouseRetention": {
56
56
  "types": "dist/storage/domains/observability/v-next/index.d.ts",
57
57
  "implementation": "dist/index.js",
58
- "line": 10163
58
+ "line": 10165
59
59
  },
60
60
  "markDeletionRequestApplied": {
61
61
  "types": "dist/storage/domains/observability/v-next/deletion-requests.d.ts",
package/dist/index.cjs CHANGED
@@ -8238,7 +8238,7 @@ function afterCursor$1(plan, parameters) {
8238
8238
  const equal = [];
8239
8239
  if (cursor.sortValue === null) equal.push(`isNull(${field})`);
8240
8240
  else {
8241
- const numeric = plan.orderBy.field === "timeToFirstChunkMs" || plan.orderBy.field === "timeToFirstTokenMs";
8241
+ const numeric = typeof cursor.sortValue === "number";
8242
8242
  const value = parameters.add(cursor.sortValue, numeric ? "Float64" : "DateTime64(3, 'UTC')");
8243
8243
  terms.push(`${field} ${plan.orderBy.direction === "asc" ? ">" : "<"} ${value}`);
8244
8244
  if (numeric) terms.push(`isNull(${field})`);
@@ -8466,7 +8466,8 @@ async function querySpans(client, plan, timeoutMs) {
8466
8466
  const selected = (await run(compileClickHouseSpanQuery(plan))).map((row) => ({
8467
8467
  ...row,
8468
8468
  startedAt: iso$1(row.startedAt),
8469
- endedAt: iso$1(row.endedAt)
8469
+ endedAt: iso$1(row.endedAt),
8470
+ ...row.durationMs === void 0 ? {} : { durationMs: Number(row.durationMs) }
8470
8471
  }));
8471
8472
  const page = selected.slice(0, plan.limit);
8472
8473
  if (!page.length) return {
@@ -10063,6 +10064,7 @@ function buildBranchCursor(row) {
10063
10064
  const spanQueryFeatures = typeof _mastra_core_storage.planSpanQuery === "function" ? [
10064
10065
  "span-query",
10065
10066
  "span-query-context-fields",
10067
+ ..._mastra_core_storage.SPAN_QUERY_ORDER_FIELDS?.includes("durationMs") ? ["span-query-duration-sort"] : [],
10066
10068
  ..."model" in (_mastra_core_storage.SPAN_QUERY_FIELD_REGISTRY ?? {}) ? ["span-query-model-fields"] : []
10067
10069
  ] : [];
10068
10070
  const spanAggregateFeatures = typeof _mastra_core_storage.planSpanAggregate === "function" ? ["span-aggregate", ..."model" in (_mastra_core_storage.SPAN_AGGREGATE_DIMENSION_REGISTRY ?? {}) ? ["span-aggregate-model-dimensions"] : []] : [];