@mastra/duckdb 1.3.0-alpha.0 → 1.3.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/CHANGELOG.md +60 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{observability-YJW7WSXX.cjs → observability-2PJ44OVC.cjs} +220 -52
- package/dist/observability-2PJ44OVC.cjs.map +1 -0
- package/dist/{observability-2R7ZOHEZ.js → observability-7LL4LLXY.js} +220 -52
- package/dist/observability-7LL4LLXY.js.map +1 -0
- package/dist/storage/domains/observability/tracing.d.ts +29 -5
- package/dist/storage/domains/observability/tracing.d.ts.map +1 -1
- package/package.json +5 -5
- package/dist/observability-2R7ZOHEZ.js.map +0 -1
- package/dist/observability-YJW7WSXX.cjs.map +0 -1
|
@@ -14,7 +14,21 @@ export declare function getRootSpan(db: DuckDBConnection, args: GetRootSpanArgs)
|
|
|
14
14
|
export declare function getTrace(db: DuckDBConnection, args: GetTraceArgs): Promise<GetTraceResponse | null>;
|
|
15
15
|
/** Reconstruct lightweight spans belonging to a trace (timeline fields only). */
|
|
16
16
|
export declare function getTraceLight(db: DuckDBConnection, args: GetTraceArgs): Promise<GetTraceLightResponse | null>;
|
|
17
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* List root spans (traces) with filtering, ordering, and pagination.
|
|
19
|
+
*
|
|
20
|
+
* Instead of reconstructing every span in the table and then filtering, we:
|
|
21
|
+
* 1. Pick candidate root `(traceId, spanId)` tuples from raw `span_events`
|
|
22
|
+
* by looking only at rows where `eventType = 'start'` and
|
|
23
|
+
* `parentSpanId IS NULL`. All scalar filters (entity*, *Id, service,
|
|
24
|
+
* environment, startedAt range, ...) run here, against raw columns.
|
|
25
|
+
* 2. Fully reconstruct spans only for that narrowed set, then apply
|
|
26
|
+
* post-aggregation filters (status/tags/metadata/scope/endedAt/
|
|
27
|
+
* hasChildError).
|
|
28
|
+
*
|
|
29
|
+
* When there are no post-aggregation filters, ordering + pagination happen
|
|
30
|
+
* inside the prefilter CTE so reconstruction runs on at most `perPage` rows.
|
|
31
|
+
*/
|
|
18
32
|
export declare function listTraces(db: DuckDBConnection, args: ListTracesArgs): Promise<ListTracesResponse>;
|
|
19
33
|
/**
|
|
20
34
|
* Reconstruct multiple spans by spanId within a single trace. Single round-trip
|
|
@@ -25,10 +39,20 @@ export declare function listTraces(db: DuckDBConnection, args: ListTracesArgs):
|
|
|
25
39
|
export declare function getSpans(db: DuckDBConnection, args: GetSpansArgs): Promise<GetSpansResponse>;
|
|
26
40
|
/**
|
|
27
41
|
* List branch anchor spans (named-entity invocations) across all traces with
|
|
28
|
-
* filtering, ordering, and pagination.
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* (
|
|
42
|
+
* filtering, ordering, and pagination.
|
|
43
|
+
*
|
|
44
|
+
* Same two-stage strategy as `listTraces`:
|
|
45
|
+
* 1. Pick candidate anchor `(traceId, spanId)` tuples from raw `span_events`
|
|
46
|
+
* by looking only at `eventType = 'start'` rows whose `spanType` is in
|
|
47
|
+
* {@link BRANCH_SPAN_TYPES}. Scalar filters (entity*, *Id, environment,
|
|
48
|
+
* serviceName, startedAt range, ...) run here, against raw columns. This
|
|
49
|
+
* avoids paying reconstruction cost for the high-volume sub-operation
|
|
50
|
+
* events (MODEL_STEP, MODEL_CHUNK, ...) that are never anchors.
|
|
51
|
+
* 2. Reconstruct full span data only for that narrowed set, then apply
|
|
52
|
+
* post-aggregation filters (status / metadata / tags / endedAt range).
|
|
53
|
+
*
|
|
54
|
+
* When there are no post-aggregation filters, ordering + pagination happen
|
|
55
|
+
* inside the prefilter so reconstruction runs on at most `perPage` rows.
|
|
32
56
|
*/
|
|
33
57
|
export declare function listBranches(db: DuckDBConnection, args: ListBranchesArgs): Promise<ListBranchesResponse>;
|
|
34
58
|
//# sourceMappingURL=tracing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/observability/tracing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EAErB,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EAEtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/observability/tracing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EAErB,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EAEtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAofvD,6CAA6C;AAC7C,wBAAsB,UAAU,CAAC,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAM1F;AAED,sEAAsE;AACtE,wBAAsB,gBAAgB,CAAC,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAUtG;AAED,sDAAsD;AACtD,wBAAsB,iBAAiB,CAAC,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAIxG;AAMD,wDAAwD;AACxD,wBAAsB,OAAO,CAAC,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAOtG;AAED,yDAAyD;AACzD,wBAAsB,WAAW,CAAC,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAOlH;AAED,kDAAkD;AAClD,wBAAsB,QAAQ,CAAC,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAOzG;AAED,iFAAiF;AACjF,wBAAsB,aAAa,CAAC,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CASnH;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,UAAU,CAAC,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA2GxG;AAQD;;;;;GAKG;AACH,wBAAsB,QAAQ,CAAC,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAiBlG;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,YAAY,CAAC,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA6I9G"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/duckdb",
|
|
3
|
-
"version": "1.3.0
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "DuckDB vector store provider for Mastra - embedded high-performance vector storage with HNSW indexing",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"tsup": "^8.5.1",
|
|
32
32
|
"typescript": "^6.0.3",
|
|
33
33
|
"vitest": "4.1.5",
|
|
34
|
-
"@internal/
|
|
35
|
-
"@internal/
|
|
36
|
-
"@internal/types-builder": "0.0.
|
|
37
|
-
"@mastra/core": "1.32.0
|
|
34
|
+
"@internal/storage-test-utils": "0.0.87",
|
|
35
|
+
"@internal/lint": "0.0.91",
|
|
36
|
+
"@internal/types-builder": "0.0.66",
|
|
37
|
+
"@mastra/core": "1.32.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@mastra/core": ">=1.0.0-0 <2.0.0-0"
|