@voltro/database 0.62.1 → 0.62.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.
package/CHANGELOG.md CHANGED
@@ -39,6 +39,35 @@ _Changes staged for the next release accumulate here (rolled up from
39
39
 
40
40
  ---
41
41
 
42
+ ## [0.62.3] — 2026-09-03
43
+
44
+ ### Added
45
+
46
+ - **@voltro/runtime** — `EffectStore` now exposes the complete Promise-store mutation surface plus transactions that roll back while preserving an inner Effect Cause. `defineSubscriber` accepts `eachReplica: true` so local per-replica work can state its topology explicitly; it cannot be combined with `once`.
47
+
48
+ ### Fixed
49
+
50
+ - **@voltro/cli** — `voltro build` no longer starts Vite's HMR WebSocket while pre-rendering. A `RedirectError` from a static loader is now emitted as redirect metadata and served by `voltro start` with its exact status and `Location`; unrelated loader errors still fail the build.
51
+ - **@voltro/cli, @voltro/database, @voltro/plugin-storage** — `voltro doctor` now resolves grouped event bindings and narrows its hand-roll, junction, ownership, nullable-write, singleton-read, and UI reachability checks to evidence they can actually prove. Ids owned by external systems can be declared with `.externalId()`; plugin references and non-FK asset references carry that metadata automatically.
52
+
53
+ ---
54
+
55
+ ## [0.62.2] — 2026-09-03
56
+
57
+ ### Added
58
+
59
+ - **@voltro/client, @voltro/web, @voltro/runtime, @voltro/cli, @voltro/devtools, @voltro/workflow** — Reconnect incidents now have one bounded, payload-free evidence path: browser diagnostics retain runtime/socket/protocol/subscription transitions across a reload, the subscriptions panel exposes recovery progress and stuck re-issues, and `voltro support collect` joins that export to inspect snapshots and exact browser-to-replica socket ids. The opt-in browser fault harness can reproduce a bounded transport cut without a proxy; logs and traces remain excluded from the support bundle unless explicitly requested.
60
+
61
+ Workflow admission rows now retain queue-time app/schema provenance. `voltro workflows flow validate` checks queued payloads against the current release without returning them, while `flow retry <intentId>` re-arms one retained dead letter after its fix. Support bundles also inventory project `conflictColumns` callsites, and `voltro support sentry <eventId>` delegates source-map resolution diagnosis to Sentry's own CLI.
62
+ - **@voltro/runtime** — Successful rpc WebSocket upgrades now emit structured open and close records carrying the serving `replicaId` and a stable per-socket `connectionId`, so connection cuts can be correlated to an api replica without debug traffic.
63
+
64
+ ### Fixed
65
+
66
+ - **@voltro/client, @voltro/web, @voltro/react-native** — Subscription recovery now re-issues transport-failed active subscriptions only after the rpc protocol has cleared the previous socket error. A longer outage could previously reopen the WebSocket, immediately reject every re-issued subscription against the stale error, and leave the screen degraded until a reload.
67
+ - **@voltro/workflow, @voltro/cli, @voltro/devtools-ui** — Queued workflow starts whose stored payload no longer decodes now signal `onFailure` once and remain visible as dead-letter intents instead of retrying forever. Inspect or remove them with `voltro workflows flow` and `voltro workflows flow discard <intentId>`; a valid later debounce arrival for the same key replaces the obsolete payload and resumes normal draining.
68
+
69
+ ---
70
+
42
71
  ## [0.62.1] — 2026-09-02
43
72
 
44
73
  ### Fixed
@@ -46,6 +75,11 @@ _Changes staged for the next release accumulate here (rolled up from
46
75
  - **@voltro/client, @voltro/web, @voltro/react-native** — `useSubscriptionHealth` now clears failures when replacement subscriptions succeed after a reconnect; each api keeps one error bus across transport, auth-refresh, and subject-reconnect generations.
47
76
  - **@voltro/client, @voltro/web, @voltro/react-native** — Active subscriptions whose fibers ended in a transport failure are now re-issued when the rpc socket opens again, preserving their last rows and resume revision; `useConnectionStatus` stays degraded until every affected subscription delivers a later snapshot or delta.
48
77
 
78
+ **Correction:** In 0.62.1 that reissue runs on the raw WebSocket `open`, before
79
+ the rpc protocol clears the previous socket error. After a longer outage the
80
+ reissued fibers can therefore fail immediately and remain terminal. The next
81
+ patch moves recovery behind the protocol-ready `onOpen` effect.
82
+
49
83
  ### Internal (no consumer-facing effect)
50
84
 
51
85
  - **@voltro/local-first** — Release dependency floors now exclude the vulnerable `fast-uri` and `@xmldom/xmldom` ranges, and the local-first test toolchain uses the patched Tiptap release.
@@ -38,6 +38,13 @@ var r = (e) => {
38
38
  nullable: !0
39
39
  });
40
40
  }
41
+ externalId() {
42
+ if (this.rejectIfRaw("externalId"), this.definition.type === "reference" || this.definition.type === "id") throw Error(`.externalId() requires a scalar non-primary-key column (got ${this.definition.type}) — \`reference()\` is local by definition and \`id()\` identifies this row.`);
43
+ return new e({
44
+ ...this.definition,
45
+ externalId: !0
46
+ });
47
+ }
41
48
  encrypted() {
42
49
  return this.rejectIfRaw("encrypted"), new e({
43
50
  ...this.definition,
package/dist/index.d.ts CHANGED
@@ -946,6 +946,13 @@ export declare class ColumnBuilder<TsType, Type extends ColumnType, HasDefault e
946
946
  */
947
947
  private rejectIfRaw;
948
948
  nullable(): ColumnBuilder<TsType | null, Type, HasDefault>;
949
+ /**
950
+ * Declare that this scalar id points outside the app's local database graph.
951
+ * Use it for provider, gateway, hardware, polymorphic, or cross-installation
952
+ * identifiers that intentionally must not become `reference()` columns.
953
+ * This is schema metadata only and does not change the SQL column.
954
+ */
955
+ externalId(): this;
949
956
  /**
950
957
  * Encrypt this column's value at rest (AES-256-GCM). The runtime
951
958
  * store middleware transparently encrypts on write + decrypts on
@@ -1382,6 +1389,12 @@ export declare interface ColumnDefinition<TsType, Type extends ColumnType = Colu
1382
1389
  * overhead.
1383
1390
  */
1384
1391
  readonly fkAutoIndex?: boolean;
1392
+ /**
1393
+ * This id-shaped scalar names something outside the local relational graph.
1394
+ * Set by `.externalId()` so schema audits do not guess a local FK from the
1395
+ * column name. Metadata only; it emits no constraint or DDL.
1396
+ */
1397
+ readonly externalId?: boolean;
1385
1398
  readonly jsonType?: unknown;
1386
1399
  /**
1387
1400
  * Closed value set, set by `text().oneOf([...])`. When present:
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as e, $t as t, A as n, At as r, B as i, Bt as a, C as o, Ct as s, D as c, Dt as l, E as u, Et as d, F as f, Ft as p, G as m, Gt as h, H as g, Ht as _, I as ee, It as te, J as ne, Jt as v, K as y, Kt as re, L as b, Lt as ie, M as ae, Mt as oe, N as x, Nt as se, O as ce, Ot as le, P as ue, Pt as de, Q as fe, Qt as pe, R as me, Rt as he, S as ge, St as _e, T as ve, Tt as ye, U as be, Ut as S, V as xe, Vt as Se, W as Ce, Wt as we, X as Te, Xt as Ee, Y as De, Yt as Oe, Z as ke, Zt as Ae, _ as je, _t as Me, a as Ne, at as Pe, b as Fe, bt as Ie, c as Le, ct as Re, d as ze, dt as Be, en as C, et as Ve, f as He, ft as Ue, g as We, gt as Ge, h as w, ht as Ke, it as T, j as qe, jt as Je, k as Ye, kt as Xe, l as Ze, lt as Qe, m as $e, mt as et, n as tt, nt, o as rt, ot as it, p as at, pt as ot, q as E, qt as st, r as ct, rt as lt, s as ut, st as dt, t as ft, tn as pt, tt as mt, u as ht, ut as gt, v as _t, vt, w as yt, wt as bt, x as xt, xt as St, y as Ct, yt as wt, z as Tt, zt as Et } from "./frameworkLiveTables-CwDemhjW.js";
1
+ import { $ as e, $t as t, A as n, At as r, B as i, Bt as a, C as o, Ct as s, D as c, Dt as l, E as u, Et as d, F as f, Ft as p, G as m, Gt as h, H as g, Ht as _, I as ee, It as te, J as ne, Jt as v, K as y, Kt as re, L as b, Lt as ie, M as ae, Mt as oe, N as x, Nt as se, O as ce, Ot as le, P as ue, Pt as de, Q as fe, Qt as pe, R as me, Rt as he, S as ge, St as _e, T as ve, Tt as ye, U as be, Ut as S, V as xe, Vt as Se, W as Ce, Wt as we, X as Te, Xt as Ee, Y as De, Yt as Oe, Z as ke, Zt as Ae, _ as je, _t as Me, a as Ne, at as Pe, b as Fe, bt as Ie, c as Le, ct as Re, d as ze, dt as Be, en as C, et as Ve, f as He, ft as Ue, g as We, gt as Ge, h as w, ht as Ke, it as T, j as qe, jt as Je, k as Ye, kt as Xe, l as Ze, lt as Qe, m as $e, mt as et, n as tt, nt, o as rt, ot as it, p as at, pt as ot, q as E, qt as st, r as ct, rt as lt, s as ut, st as dt, t as ft, tn as pt, tt as mt, u as ht, ut as gt, v as _t, vt, w as yt, wt as bt, x as xt, xt as St, y as Ct, yt as wt, z as Tt, zt as Et } from "./frameworkLiveTables-CewCJ809.js";
2
2
  import { timestampMs as Dt, timestampMsOrNull as Ot } from "./wire.js";
3
3
  import { Cause as kt, Chunk as At, Data as jt, Effect as D, Exit as Mt, Metric as O, MetricBoundaries as Nt, Option as k, Runtime as Pt, Schedule as Ft, Schema as A, Stream as It } from "effect";
4
4
  import { createHash as Lt } from "node:crypto";
package/dist/sql.d.ts CHANGED
@@ -428,6 +428,12 @@ declare interface ColumnDefinition<TsType, Type extends ColumnType = ColumnType,
428
428
  * overhead.
429
429
  */
430
430
  readonly fkAutoIndex?: boolean;
431
+ /**
432
+ * This id-shaped scalar names something outside the local relational graph.
433
+ * Set by `.externalId()` so schema audits do not guess a local FK from the
434
+ * column name. Metadata only; it emits no constraint or DDL.
435
+ */
436
+ readonly externalId?: boolean;
431
437
  readonly jsonType?: unknown;
432
438
  /**
433
439
  * Closed value set, set by `text().oneOf([...])`. When present:
package/dist/sql.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as e, $t as t, Ht as n, Ut as r, a as i, at as a, c as o, d as s, en as c, et as l, g as u, h as d, i as f, it as p, o as m, r as h, s as g, tt as _, u as v, vt as y, wt as b, y as x } from "./frameworkLiveTables-CwDemhjW.js";
1
+ import { $ as e, $t as t, Ht as n, Ut as r, a as i, at as a, c as o, d as s, en as c, et as l, g as u, h as d, i as f, it as p, o as m, r as h, s as g, tt as _, u as v, vt as y, wt as b, y as x } from "./frameworkLiveTables-CewCJ809.js";
2
2
  import { Effect as S, Schedule as C } from "effect";
3
3
  import { createHash as w } from "node:crypto";
4
4
  import { createLogger as T } from "@voltro/logger";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltro/database",
3
- "version": "0.62.1",
3
+ "version": "0.62.3",
4
4
  "description": "Browser-safe schema DSL, query builder, and cross-dialect migration planner for Voltro — one schema, every SQL backend.",
5
5
  "keywords": [
6
6
  "voltro",
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@effect/sql": "^0.52.0",
47
- "@voltro/logger": "0.62.1",
47
+ "@voltro/logger": "0.62.3",
48
48
  "typeid-js": "^1.2.0",
49
49
  "ulidx": "^2.4.1"
50
50
  },