@uptimizr/db 0.7.1 → 0.7.2

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.
Files changed (2) hide show
  1. package/README.md +13 -10
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -5,16 +5,16 @@ The OSS storage contracts plus the single-file **DuckDB** store:
5
5
  - **DuckDB (OSS default)** — one persisted `.duckdb` file holds **both events and metadata**, so
6
6
  the collector self-hosts in a single process with no external database service. A wide `events`
7
7
  table (hot fields like camera `position`/`direction`, pointer `screen`, `mesh`, `fps` promoted to
8
- columns; the full event preserved as JSON in `payload` so reads stay replay-complete) plus
9
- `projects` / `api_keys` (stored only as SHA-256 hashes).
8
+ columns; the full event preserved as JSON in `payload` so reads stay replay-complete) plus a
9
+ dedicated `node_samples` table for high-cardinality `node_transform` rows, and `projects` /
10
+ `api_keys` (stored only as SHA-256 hashes, with `query` / `ingest` capability).
10
11
  - **Engine-neutral contracts** — the dialect-agnostic query layer (`buildX` + `Dialect`), the
11
- neutral event-row mapper (`toEventRow`, `formatUtcTimestamp`), and the metadata types
12
- (`Project`, `ApiKeyRecord`, `SceneRepresentation*`).
12
+ neutral event-row mappers (`toEventRow`, `toNodeSampleRow`, `formatUtcTimestamp`), and the
13
+ metadata types (`Project`, `ApiKeyRecord`, `ResolvedApiKey`, `SceneRepresentation*`).
13
14
 
14
- This package carries **no ClickHouse/Postgres dependency**. An optional, separately-licensed
15
- scale store (single-tenant ClickHouse + Postgres + rollups) composes these contracts
16
- behind the same interface. Server/Node only no DOM imports. Aggregations are
17
- **query-time** in v1; no materialized views.
15
+ This package carries **no ClickHouse/Postgres dependency**. Optional scale adapters such as
16
+ `@uptimizr/db-clickhouse` compose these contracts behind the same interface. Server/Node only — no
17
+ DOM imports. Aggregations are **query-time** in v1; no materialized views.
18
18
 
19
19
  > **Single-writer constraint.** DuckDB is an embedded, single-writer store: only one process may
20
20
  > open the file read-write at a time. Run a single collector per file; for multi-writer /
@@ -55,10 +55,13 @@ const projectId = await duckdbResolveApiKey(db, "utk_…");
55
55
  ```
56
56
 
57
57
  Connection settings come from the environment (see [`.env.example`](../../../.env.example));
58
- `readDbSettings()` exposes them. When `DUCKDB_PATH` is unset the store defaults to
58
+ `readDbSettings()` exposes `DUCKDB_PATH`, the `CLICKHOUSE_*` settings used by adapters, and raw
59
+ session retention. When `DUCKDB_PATH` is unset the store defaults to
59
60
  `<repo-root>/data/uptimizr.duckdb` — resolved against the monorepo root (the directory with
60
61
  `pnpm-workspace.yaml`), not the process cwd, so the collector and the migrate/seed/new-project
61
- CLIs all share one canonical file regardless of which package they run from.
62
+ CLIs all share one canonical file regardless of which package they run from. The collector selects
63
+ its backend with `COLLECTOR_STORE` (`duckdb` by default; `clickhouse` and `memory` are also wired in
64
+ `@uptimizr/collector-server`).
62
65
 
63
66
  ## Extending
64
67
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uptimizr/db",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "OSS storage contracts (dialect-agnostic query layer, neutral event/metadata types) and the single-file DuckDB store for Uptimizr.",
5
5
  "keywords": [
6
6
  "uptimizr",
@@ -51,7 +51,7 @@
51
51
  ],
52
52
  "dependencies": {
53
53
  "@duckdb/node-api": "^1.5.4-r.1",
54
- "@uptimizr/schema": "0.5.0"
54
+ "@uptimizr/schema": "0.5.1"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@types/node": "^26.1.0",