@voltro/cli 0.40.0 → 0.41.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.
Files changed (100) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/dist/{apiBuild-C8xBEYbL.js → apiBuild-B_iH24qf.js} +2 -2
  3. package/dist/apiBuild-RM5W5YXk.js +2 -0
  4. package/dist/bin.js +1 -1
  5. package/dist/{build-CkhFGnKA.js → build-DUdi6F_Q.js} +150 -150
  6. package/dist/{checkCommand-QbHshOac.js → checkCommand-B2RWrpWi.js} +1 -1
  7. package/dist/{checkCommand-BcXJa2IS.js → checkCommand-DWL2_PPR.js} +2 -2
  8. package/dist/{codegenCommand-DF2OJh3O.js → codegenCommand-DkjoJ30Q.js} +2 -2
  9. package/dist/{codemodRunner-BcOvi4A2.js → codemodRunner-sFuWDETH.js} +520 -460
  10. package/dist/{commands-7Z7-HOE3.js → commands-D0VR1yBB.js} +22 -22
  11. package/dist/{dashboardCommand-CUycH6dR.js → dashboardCommand-Bro7Jwts.js} +5 -5
  12. package/dist/{dataCommand-By78lscK.js → dataCommand-OKC5FscP.js} +183 -172
  13. package/dist/{dbCommand-DSwGv9wS.js → dbCommand-BHRamDsy.js} +441 -414
  14. package/dist/dbCommand-C9iE1pd9.js +2 -0
  15. package/dist/{dev-Dh1NuYx1.js → dev-D4l_YOzI.js} +22 -22
  16. package/dist/{dev-D8JSKlBM.js → dev-DuqBJC7g.js} +1 -1
  17. package/dist/doctorCommand-Bw3V4L1j.js +2 -0
  18. package/dist/{doctorCommand-C-8-Z9D6.js → doctorCommand-TmZTAepc.js} +385 -279
  19. package/dist/{dormancyCommand-A79Odglm.js → dormancyCommand-CUKhRmGG.js} +1 -1
  20. package/dist/{embeddingsCommand-CoiyHfkY.js → embeddingsCommand-Db-iQM3l.js} +1 -1
  21. package/dist/{envCommand-B6d0s-jZ.js → envCommand-DQ_URZq9.js} +12 -12
  22. package/dist/{evolveCommand-BC5a9lxX.js → evolveCommand-CghRPrGO.js} +2 -2
  23. package/dist/index.js +1 -1
  24. package/dist/{infoCommand-ZqSVzJZ4.js → infoCommand-BCs_ZFnl.js} +1 -1
  25. package/dist/{migrate-BnPw2zC8.js → migrate-DLtPv2_D.js} +1 -1
  26. package/dist/{runtimeTrace-BslKJjDY.js → runtimeTrace-jFKvOPBz.js} +1 -1
  27. package/dist/{sdkgen-DQ8uEmmn.js → sdkgen-COQqHB9V.js} +1 -1
  28. package/dist/{serveCommand-Dqb9Ku1-.js → serveCommand-Cba_M2Su.js} +3 -3
  29. package/dist/serveCommand-DRbYK646.js +2 -0
  30. package/dist/serveEntry.js +1 -1
  31. package/dist/{start-dkNYKtgQ.js → start-BjcuFME_.js} +379 -343
  32. package/dist/{start-BA7txHhY.js → start-fifc0xpW.js} +1 -1
  33. package/dist/startEntry.js +1 -1
  34. package/dist/updateCommand-B2alql9k.js +2 -0
  35. package/dist/{updateCommand-eoGpZr3E.js → updateCommand-HZQVBU3T.js} +1 -1
  36. package/dist/webDev-D6QeXw3P.js +2 -0
  37. package/dist/{webDev-bybjZA0o.js → webDev-Dk8lFUzf.js} +642 -525
  38. package/dist/{webhooksCommand-DubZWNOx.js → webhooksCommand-D7ZpH7w0.js} +1 -1
  39. package/package.json +23 -17
  40. package/templates/AGENTS.md +1 -1
  41. package/templates/agent-docs/_index.md +1 -1
  42. package/templates/agent-docs/_manifest.json +1 -1
  43. package/templates/agent-docs/cli.md +6 -0
  44. package/templates/agent-docs/plugins/governance.md +8 -0
  45. package/templates/agent-docs/routing.md +141 -28
  46. package/templates/agent-docs/security.md +24 -0
  47. package/templates/agent-docs/whats-new.md +37 -121
  48. package/templates/apps/api-ai/package.json +7 -7
  49. package/templates/apps/api-auth/package.json +8 -8
  50. package/templates/apps/api-backend/package.json +7 -7
  51. package/templates/apps/api-backend-deactivation/package.json +7 -7
  52. package/templates/apps/api-backend-mail/package.json +8 -8
  53. package/templates/apps/api-backend-mariadb/package.json +9 -9
  54. package/templates/apps/api-backend-sqlite/package.json +8 -8
  55. package/templates/apps/api-backend-storage/package.json +8 -8
  56. package/templates/apps/api-cms/package.json +10 -10
  57. package/templates/apps/api-collab/package.json +8 -8
  58. package/templates/apps/api-data-advanced/package.json +8 -8
  59. package/templates/apps/api-durable/package.json +8 -8
  60. package/templates/apps/api-feature-flags/package.json +9 -9
  61. package/templates/apps/api-governance/package.json +8 -8
  62. package/templates/apps/api-kv/package.json +8 -8
  63. package/templates/apps/api-moderation/package.json +8 -8
  64. package/templates/apps/api-observability/package.json +8 -8
  65. package/templates/apps/api-ratelimit/package.json +8 -8
  66. package/templates/apps/api-rbac/package.json +8 -8
  67. package/templates/apps/api-rest/package.json +7 -7
  68. package/templates/apps/api-saas/package.json +11 -11
  69. package/templates/apps/api-saas-starter/package.json +10 -10
  70. package/templates/apps/api-search/package.json +8 -8
  71. package/templates/apps/api-status/package.json +8 -8
  72. package/templates/apps/api-versioning/package.json +8 -8
  73. package/templates/apps/api-webhooks/package.json +9 -9
  74. package/templates/apps/changelog/package.json +6 -6
  75. package/templates/apps/edge-functions/package.json +2 -2
  76. package/templates/apps/frontend-admin/package.json +8 -8
  77. package/templates/apps/frontend-app/package.json +9 -9
  78. package/templates/apps/frontend-auth/package.json +8 -8
  79. package/templates/apps/frontend-blank/package.json +7 -7
  80. package/templates/apps/frontend-cms/package.json +9 -9
  81. package/templates/apps/frontend-collab/package.json +10 -10
  82. package/templates/apps/frontend-contact/package.json +7 -7
  83. package/templates/apps/frontend-dashboard/package.json +7 -7
  84. package/templates/apps/frontend-docs/package.json +7 -7
  85. package/templates/apps/frontend-i18n/package.json +6 -6
  86. package/templates/apps/frontend-landing/package.json +7 -7
  87. package/templates/apps/frontend-portal/package.json +8 -8
  88. package/templates/apps/frontend-saas/package.json +8 -8
  89. package/templates/apps/frontend-spa/package.json +7 -7
  90. package/templates/apps/frontend-ssr/package.json +7 -7
  91. package/templates/apps/frontend-ssr-api/package.json +8 -8
  92. package/templates/apps/frontend-static-blog/package.json +6 -6
  93. package/templates/apps/frontend-status/package.json +8 -8
  94. package/templates/apps/mobile-app/package.json +4 -4
  95. package/dist/apiBuild-BIyGkym8.js +0 -2
  96. package/dist/dbCommand-DcqEyxju.js +0 -2
  97. package/dist/doctorCommand-FhQ7EVYL.js +0 -2
  98. package/dist/serveCommand-BmvEQCMS.js +0 -2
  99. package/dist/updateCommand-BauSVxPp.js +0 -2
  100. package/dist/webDev-CBbKs4dZ.js +0 -2
@@ -884,35 +884,35 @@ var b = (e, t, n) => {
884
884
  "Nothing changes for `static` / `ssr` / `isr` pages, or for a spa page that",
885
885
  "has no layout (still a pure client mount)."
886
886
  ].join("\n")
887
- }), E = "client", D = "spa", Ge = (e) => {
887
+ }), E = "client", Ge = "spa", Ke = (e) => {
888
888
  if (!e) return null;
889
889
  let t = v.isAsExpression(e) ? e.getExpression() : e;
890
890
  return v.isStringLiteral(t) ? t : null;
891
- }, O = (e) => {
891
+ }, D = (e) => {
892
892
  let t = [];
893
893
  for (let n of e.getDescendantsOfKind(y.VariableDeclaration)) {
894
894
  if (n.getName() !== "renderMode") continue;
895
- let e = Ge(n.getInitializer());
895
+ let e = Ke(n.getInitializer());
896
896
  e && t.push(e);
897
897
  }
898
898
  for (let n of e.getDescendantsOfKind(y.PropertyAssignment)) {
899
899
  if (n.getName() !== "renderMode") continue;
900
- let e = Ge(n.getInitializer());
900
+ let e = Ke(n.getInitializer());
901
901
  e && t.push(e);
902
902
  }
903
903
  return t;
904
- }, Ke = S({
904
+ }, qe = S({
905
905
  version: "0.10.0",
906
906
  id: "0.10.0/01_render-mode-client-to-spa",
907
907
  title: "renderMode is a closed set — `'client'` becomes `'spa'`",
908
908
  kind: "transform",
909
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => O(e).some((e) => e.getLiteralValue() === E)),
909
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => D(e).some((e) => e.getLiteralValue() === E)),
910
910
  transform: ({ project: e, log: t }) => {
911
911
  let n = 0, r = /* @__PURE__ */ new Set();
912
- for (let t of e.getSourceFiles()) for (let e of O(t)) e.getLiteralValue() === E && (e.setLiteralValue(D), n++, r.add(t.getFilePath()));
913
- n > 0 && (t(`renderMode: rewrote ${n} \`'${E}'\` → \`'${D}'\` in ${r.size} file${r.size === 1 ? "" : "s"}`), t(" → 'spa' is the mode those pages already behaved as: no prerender, client-rendered"), t(" → new in 0.9.0: if such a page sits under a layout, that layout now server-renders (see the note above)"));
912
+ for (let t of e.getSourceFiles()) for (let e of D(t)) e.getLiteralValue() === E && (e.setLiteralValue(Ge), n++, r.add(t.getFilePath()));
913
+ n > 0 && (t(`renderMode: rewrote ${n} \`'${E}'\` → \`'${Ge}'\` in ${r.size} file${r.size === 1 ? "" : "s"}`), t(" → 'spa' is the mode those pages already behaved as: no prerender, client-rendered"), t(" → new in 0.9.0: if such a page sits under a layout, that layout now server-renders (see the note above)"));
914
914
  }
915
- }), qe = S({
915
+ }), Je = S({
916
916
  version: "0.10.0",
917
917
  id: "0.10.0/02_router-state-carries-its-path",
918
918
  title: "`renderRouterStateScript` now requires the `path` it rendered",
@@ -949,7 +949,7 @@ var b = (e, t, n) => {
949
949
  "Trailing slashes, a trailing `/index.html`, and percent-encoding are normalised",
950
950
  "before the comparison, so the usual static-host shapes still hydrate."
951
951
  ].join("\n")
952
- }), Je = S({
952
+ }), Ye = S({
953
953
  version: "0.10.0",
954
954
  id: "0.10.0/03_workflow-caller-context-resolved",
955
955
  title: "workflow `buildContext` receives a RESOLVED caller context",
@@ -995,7 +995,7 @@ var b = (e, t, n) => {
995
995
  "it receives the resolved context too, so `callerContext?.subject ?? …` there",
996
996
  "becomes `callerContext.subject`."
997
997
  ].join("\n")
998
- }), Ye = S({
998
+ }), Xe = S({
999
999
  version: "0.10.0",
1000
1000
  id: "0.10.0/04_seed-run-status-skipped",
1001
1001
  title: "seed run status gained `skipped`",
@@ -1036,7 +1036,7 @@ var b = (e, t, n) => {
1036
1036
  "`Schema.Literal`, a zod enum, a DB check constraint), widen it there too — an",
1037
1037
  "unlisted third state is a DECODE failure, not a rendering oddity."
1038
1038
  ].join("\n")
1039
- }), Xe = S({
1039
+ }), Ze = S({
1040
1040
  version: "0.10.0",
1041
1041
  id: "0.10.0/05_subscription-idle-state",
1042
1042
  title: "`useSubscription` gained an idle state for `skip`",
@@ -1088,7 +1088,7 @@ var b = (e, t, n) => {
1088
1088
  "time's data), hold it in your own state — the subscription no longer claims to",
1089
1089
  "have data it was told to stop fetching."
1090
1090
  ].join("\n")
1091
- }), Ze = S({
1091
+ }), Qe = S({
1092
1092
  version: "0.11.0",
1093
1093
  id: "0.11.0/01_step-options-type-params",
1094
1094
  title: "`StepOptions` takes the context type first",
@@ -1116,7 +1116,7 @@ var b = (e, t, n) => {
1116
1116
  "If the step reads nothing from earlier steps, `StepOptions<Record<never, never>,",
1117
1117
  "Result>` is the honest spelling."
1118
1118
  ].join("\n")
1119
- }), Qe = S({
1119
+ }), $e = S({
1120
1120
  version: "0.12.0",
1121
1121
  id: "0.12.0/01_outbound-http-ssrf-guard",
1122
1122
  title: "Outbound HttpClient blocks internal targets by default (add `http.allowHosts` if you call one)",
@@ -1156,7 +1156,7 @@ var b = (e, t, n) => {
1156
1156
  "private address (DNS rebinding) still passes. Pair with network-layer egress",
1157
1157
  "control if that is in your threat model."
1158
1158
  ].join("\n")
1159
- }), $e = S({
1159
+ }), et = S({
1160
1160
  version: "0.12.0",
1161
1161
  id: "0.12.0/02_api-key-revoke-tenant-scope",
1162
1162
  title: "apiKeyService.revoke/rotate now require the caller's tenantId",
@@ -1185,7 +1185,7 @@ var b = (e, t, n) => {
1185
1185
  "The framework's own `/v1/api-keys/revoke` route already passes the caller's",
1186
1186
  "tenant — no change needed if you only use the shipped routes."
1187
1187
  ].join("\n")
1188
- }), et = S({
1188
+ }), tt = S({
1189
1189
  version: "0.12.0",
1190
1190
  id: "0.12.0/03_api-key-on-behalf-of",
1191
1191
  title: "API keys: createdBy is provenance, onBehalfOf is ownership",
@@ -1219,7 +1219,7 @@ var b = (e, t, n) => {
1219
1219
  "specific one against what the body asks for. Grant them in your role map. A key",
1220
1220
  "can never carry scopes its issuer does not hold."
1221
1221
  ].join("\n")
1222
- }), tt = S({
1222
+ }), nt = S({
1223
1223
  version: "0.12.0",
1224
1224
  id: "0.12.0/04_inspect-fail-closed",
1225
1225
  title: "The inspect surface requires VOLTRO_INSPECT_TOKEN (previously open when unset)",
@@ -1248,7 +1248,7 @@ var b = (e, t, n) => {
1248
1248
  "",
1249
1249
  "To turn the surface off entirely instead, set `VOLTRO_INSPECT=off`."
1250
1250
  ].join("\n")
1251
- }), nt = S({
1251
+ }), rt = S({
1252
1252
  version: "0.13.0",
1253
1253
  id: "0.13.0/01_bearer-gates-fail-closed",
1254
1254
  title: "checkBearer is fail-closed; scimPlugin refuses an empty token",
@@ -1285,7 +1285,7 @@ var b = (e, t, n) => {
1285
1285
  " • `@voltro/plugin-prometheus` already passes `{ openWhenUnset: true }` — its",
1286
1286
  " `PROMETHEUS_TOKEN` is documented as optional. Nothing to do there."
1287
1287
  ].join("\n")
1288
- }), rt = S({
1288
+ }), it = S({
1289
1289
  version: "0.13.0",
1290
1290
  id: "0.13.0/02_storage-grants-owner-only",
1291
1291
  title: "storage.share / revoke / listGrants require ownership",
@@ -1316,7 +1316,7 @@ var b = (e, t, n) => {
1316
1316
  " returning the grant or null. `storage.revoke` is handed a grant id, so it has",
1317
1317
  " to resolve the object before it can check the owner."
1318
1318
  ].join("\n")
1319
- }), it = S({
1319
+ }), at = S({
1320
1320
  version: "0.13.0",
1321
1321
  id: "0.13.0/03_apply-plan-convergence-proof",
1322
1322
  title: "applyPlan requires a `replan` convergence proof",
@@ -1349,7 +1349,7 @@ var b = (e, t, n) => {
1349
1349
  " • `AppliedMigration` gained `appliedOps` (operations actually EXECUTED, from",
1350
1350
  " the per-op results). If you construct that value in a test fixture, add it."
1351
1351
  ].join("\n")
1352
- }), at = S({
1352
+ }), ot = S({
1353
1353
  version: "0.14.0",
1354
1354
  id: "0.14.0/01_resolve-scopes-store",
1355
1355
  title: "auth.resolveScopes receives the app DataStore",
@@ -1387,19 +1387,19 @@ var b = (e, t, n) => {
1387
1387
  " deliberately does not, because only you know how fast a role change must",
1388
1388
  " take effect."
1389
1389
  ].join("\n")
1390
- }), k = (e) => {
1390
+ }), O = (e) => {
1391
1391
  if (!v.isCallExpression(e)) return !1;
1392
1392
  let t = e.getExpression();
1393
1393
  return v.isPropertyAccessExpression(t) && t.getName() === "reactive" && e.getArguments().length === 0;
1394
- }, ot = (e) => e.getDescendantsOfKind(y.CallExpression).some(k), st = (e) => {
1394
+ }, st = (e) => e.getDescendantsOfKind(y.CallExpression).some(O), ct = (e) => {
1395
1395
  let t = 0, n = e.getDescendantsOfKind(y.CallExpression);
1396
1396
  for (let e of n) {
1397
- if (e.wasForgotten() || !k(e)) continue;
1397
+ if (e.wasForgotten() || !O(e)) continue;
1398
1398
  let n = e.getExpression();
1399
1399
  v.isPropertyAccessExpression(n) && (e.replaceWithText(n.getExpression().getText()), t++);
1400
1400
  }
1401
1401
  return t;
1402
- }, ct = S({
1402
+ }, lt = S({
1403
1403
  version: "0.14.0",
1404
1404
  id: "0.14.0/02_reactive-by-default",
1405
1405
  title: "Reactivity is the default; .reactive() is removed",
@@ -1417,16 +1417,16 @@ var b = (e, t, n) => {
1417
1417
  "real saving: REPLICA IDENTITY FULL widens every UPDATE/DELETE in the WAL.",
1418
1418
  "`voltro dev` warns if you opt out a table a query still reads."
1419
1419
  ].join("\n"),
1420
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => ot(e)),
1420
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => st(e)),
1421
1421
  transform: ({ project: e, log: t }) => {
1422
1422
  let n = 0, r = 0;
1423
1423
  for (let t of e.getSourceFiles()) {
1424
- let e = st(t);
1424
+ let e = ct(t);
1425
1425
  e !== 0 && (n += e, r++);
1426
1426
  }
1427
1427
  return n > 0 && t(`removed ${n} .reactive() call(s) across ${r} file(s) — reactivity is the default`), n > 0;
1428
1428
  }
1429
- }), lt = S({
1429
+ }), ut = S({
1430
1430
  version: "0.14.0",
1431
1431
  id: "0.14.0/07_dev-remote-file-migrations",
1432
1432
  title: "voltro dev refuses unattended file migrations against a remote database",
@@ -1469,19 +1469,19 @@ var b = (e, t, n) => {
1469
1469
  "Unchanged: `voltro db files`, `voltro db apply` and `voltro serve`. This gates the",
1470
1470
  "AUTOMATIC boot path only; an explicit command is already an explicit decision."
1471
1471
  ].join("\n")
1472
- }), ut = (e) => [...e.getImportDeclarations(), ...e.getExportDeclarations()], A = (e) => m(e).replace(/\.tsx?$/, ""), dt = (e, t, n) => {
1473
- let r = A(t), i = A(n);
1472
+ }), dt = (e) => [...e.getImportDeclarations(), ...e.getExportDeclarations()], k = (e) => m(e).replace(/\.tsx?$/, ""), ft = (e, t, n) => {
1473
+ let r = k(t), i = k(n);
1474
1474
  if (r === i) return;
1475
1475
  let a = /\.tsx?$/.exec(e)?.[0] ?? "", o = a === "" ? e : e.slice(0, -a.length);
1476
1476
  if (!o.endsWith(`/${r}`) && o !== r) return;
1477
1477
  let s = a === "" ? "" : /\.tsx$/.test(n) ? ".tsx" : ".ts";
1478
1478
  return `${o.slice(0, o.length - r.length)}${i}${s}`;
1479
- }, j = (e, t) => {
1479
+ }, A = (e, t) => {
1480
1480
  let n = e.getFilePath(), r = [];
1481
- for (let i of e.getProject().getSourceFiles()) for (let e of ut(i)) {
1481
+ for (let i of e.getProject().getSourceFiles()) for (let e of dt(i)) {
1482
1482
  let i = e.getModuleSpecifierValue();
1483
1483
  if (i === void 0 || i.startsWith(".") || e.getModuleSpecifierSourceFile()?.getFilePath() !== n) continue;
1484
- let a = dt(i, n, t);
1484
+ let a = ft(i, n, t);
1485
1485
  a !== void 0 && r.push({
1486
1486
  decl: e,
1487
1487
  spec: a
@@ -1490,19 +1490,19 @@ var b = (e, t, n) => {
1490
1490
  e.move(t);
1491
1491
  for (let e of r) e.decl.setModuleSpecifier(e.spec);
1492
1492
  return r.length;
1493
- }, ft = (e) => {
1493
+ }, pt = (e) => {
1494
1494
  let t = e.getProject().getCompilerOptions().paths;
1495
1495
  if (t === void 0) return;
1496
- let n = A(e.getFilePath()), r = e.getFilePath().slice(0, e.getFilePath().lastIndexOf("/"));
1496
+ let n = k(e.getFilePath()), r = e.getFilePath().slice(0, e.getFilePath().lastIndexOf("/"));
1497
1497
  for (let [e, i] of Object.entries(t)) if (!e.endsWith("*")) for (let t of i ?? []) {
1498
1498
  if (!/\.tsx?$/.test(t)) continue;
1499
- let i = A(t), a = t.slice(0, t.lastIndexOf("/"));
1499
+ let i = k(t), a = t.slice(0, t.lastIndexOf("/"));
1500
1500
  if (i === n && r.endsWith(a.replace(/^\.\//, ""))) return e;
1501
1501
  }
1502
- }, pt = /\.page\.tsx$/, M = (e) => {
1502
+ }, mt = /\.page\.tsx$/, j = (e) => {
1503
1503
  let t = e.includes("\\src\\pages\\") ? "\\src\\pages\\" : "/src/pages/", n = e.indexOf(t);
1504
1504
  return n === -1 ? null : e.slice(0, n);
1505
- }, mt = (e) => e.endsWith(".tsx") && !o.has(e) && !d(e) && !/\.island\.tsx$/.test(e) && !pt.test(e), ht = S({
1505
+ }, ht = (e) => e.endsWith(".tsx") && !o.has(e) && !d(e) && !/\.island\.tsx$/.test(e) && !mt.test(e), gt = S({
1506
1506
  version: "0.14.0",
1507
1507
  id: "0.14.0/03_pages-suffix",
1508
1508
  title: "Pages are declared with a .page.tsx suffix",
@@ -1517,8 +1517,8 @@ var b = (e, t, n) => {
1517
1517
  transform: ({ project: e, log: t }) => {
1518
1518
  let n = /* @__PURE__ */ new Map(), r = e.getSourceFiles().filter((t) => {
1519
1519
  let r = t.getFilePath();
1520
- if (!mt(m(r))) return !1;
1521
- let i = M(r);
1520
+ if (!ht(m(r))) return !1;
1521
+ let i = j(r);
1522
1522
  if (i === null) return !1;
1523
1523
  let a = n.get(i);
1524
1524
  return a === void 0 && (a = e.getSourceFile(g(i, "app.config.ts")) !== void 0 || e.getSourceFile(g(i, "app.config.tsx")) !== void 0, n.set(i, a)), a;
@@ -1536,12 +1536,12 @@ var b = (e, t, n) => {
1536
1536
  let n = t.getFilePath(), r = m(n), s = h(n), c = r.slice(0, -4);
1537
1537
  for (let t of [".test.tsx", ".spec.tsx"]) {
1538
1538
  let n = g(s, `${c}${t}`), r = e.getSourceFile(n);
1539
- r !== void 0 && (j(r, g(s, `${c}.page${t}`)), o += 1);
1539
+ r !== void 0 && (A(r, g(s, `${c}.page${t}`)), o += 1);
1540
1540
  }
1541
- j(t, g(s, `${c}.page.tsx`));
1541
+ A(t, g(s, `${c}.page.tsx`));
1542
1542
  let l = i.get(n);
1543
1543
  if (l !== void 0 && l.length > 0 && !l.every((e) => d(m(e)))) {
1544
- let e = M(n) ?? h(n), t = [...new Set(l)].map((t) => ne(e, t));
1544
+ let e = j(n) ?? h(n), t = [...new Set(l)].map((t) => ne(e, t));
1545
1545
  a.push(`${ne(e, n)} ← imported by ${t.join(", ")}`);
1546
1546
  }
1547
1547
  }
@@ -1550,7 +1550,7 @@ var b = (e, t, n) => {
1550
1550
  for (let e of a) t(` ${e}`);
1551
1551
  }
1552
1552
  }
1553
- }), gt = [
1553
+ }), _t = [
1554
1554
  /\.page\.tsx$/,
1555
1555
  a,
1556
1556
  s,
@@ -1561,10 +1561,10 @@ var b = (e, t, n) => {
1561
1561
  c,
1562
1562
  e,
1563
1563
  r
1564
- ], _t = (e) => {
1564
+ ], vt = (e) => {
1565
1565
  let n = m(e);
1566
- return !/\.tsx?$/.test(n) || o.has(n) || t(n) || n === "index.ts" || n === "index.tsx" || n === "app.config.ts" ? !1 : !gt.some((e) => e.test(n));
1567
- }, vt = (e) => {
1566
+ return !/\.tsx?$/.test(n) || o.has(n) || t(n) || n === "index.ts" || n === "index.tsx" || n === "app.config.ts" ? !1 : !_t.some((e) => e.test(n));
1567
+ }, yt = (e) => {
1568
1568
  let t = [], n = [], r = [], i = [];
1569
1569
  for (let [a, o] of e.getExportedDeclarations()) {
1570
1570
  let e = o[0];
@@ -1591,10 +1591,10 @@ var b = (e, t, n) => {
1591
1591
  others: r,
1592
1592
  types: i
1593
1593
  };
1594
- }, yt = (e, t) => {
1594
+ }, bt = (e, t) => {
1595
1595
  let { components: n, hooks: r, others: i, types: a } = e;
1596
1596
  return n.length + r.length + i.length === 0 ? a.length > 0 ? ".types" : null : t && te(n) && r.length === 0 && i.length === 0 ? ".component.tsx" : n.length === 0 && r.length === 1 && i.length === 0 ? ".hook" : null;
1597
- }, bt = S({
1597
+ }, xt = S({
1598
1598
  version: "0.14.0",
1599
1599
  id: "0.14.0/04_file-taxonomy",
1600
1600
  title: "Web files declare their contract (*.component.tsx / *.hook.ts / *.types.ts)",
@@ -1607,19 +1607,19 @@ var b = (e, t, n) => {
1607
1607
  if (s.length > 0) for (let e of s) t(` exempt (not ours): ${e.dir} — ${e.source}`);
1608
1608
  for (let t of e.getSourceFiles()) {
1609
1609
  let e = t.getFilePath();
1610
- if (!_t(e) || p(e, s)) continue;
1611
- let o = ft(t);
1610
+ if (!vt(e) || p(e, s)) continue;
1611
+ let o = pt(t);
1612
1612
  if (o !== void 0) {
1613
1613
  a.push(`${m(e)} (tsconfig paths: "${o}")`);
1614
1614
  continue;
1615
1615
  }
1616
- let c = e.endsWith(".tsx"), l = vt(t), u = yt(l, c);
1616
+ let c = e.endsWith(".tsx"), l = yt(t), u = bt(l, c);
1617
1617
  if (u === null) {
1618
1618
  l.components.length > 0 && l.hooks.length > 0 && r.push(`${m(e)} (component ${l.components.join("/")} + hook ${l.hooks.join("/")})`);
1619
1619
  continue;
1620
1620
  }
1621
1621
  let d = m(e).replace(/\.tsx?$/, ""), f = u === ".component.tsx" ? ".component.tsx" : `${u}${c ? ".tsx" : ".ts"}`;
1622
- i += j(t, g(h(e), `${d}${f}`)), n.push(`${d}${f}`);
1622
+ i += A(t, g(h(e), `${d}${f}`)), n.push(`${d}${f}`);
1623
1623
  }
1624
1624
  if (n.length > 0 && (t(`declared ${n.length} file(s): component / hook / types`), i > 0 && t(` rewrote ${i} aliased import specifier(s) (@/… and friends)`)), a.length > 0) {
1625
1625
  t(""), t(`left alone — a tsconfig \`paths\` entry names ${a.length} of these files directly:`);
@@ -1632,7 +1632,7 @@ var b = (e, t, n) => {
1632
1632
  r.length > 20 && t(` (+${r.length - 20} more)`);
1633
1633
  }
1634
1634
  }
1635
- }), xt = S({
1635
+ }), St = S({
1636
1636
  version: "0.14.0",
1637
1637
  id: "0.14.0/05_typed-tracking",
1638
1638
  title: "Tracking catalogues are typed against the component props",
@@ -1669,7 +1669,7 @@ var b = (e, t, n) => {
1669
1669
  "Read each one before changing it: a cast that no longer compiles is sometimes",
1670
1670
  "a real type disagreement the old signature was hiding."
1671
1671
  ].join("\n")
1672
- }), St = S({
1672
+ }), Ct = S({
1673
1673
  version: "0.14.0",
1674
1674
  id: "0.14.0/06_voltro-test-skips-e2e",
1675
1675
  title: "`voltro test` leaves `e2e/` to `voltro e2e`",
@@ -1691,13 +1691,13 @@ var b = (e, t, n) => {
1691
1691
  " code it tests, or",
1692
1692
  " • pass your own `--exclude`, which overrides the framework default outright."
1693
1693
  ].join("\n")
1694
- }), Ct = (e) => {
1694
+ }), wt = (e) => {
1695
1695
  let n = e.replace(/\.component(\.ui)?(\.tsx?)$/, "$2");
1696
1696
  return n === e ? null : t(n) ? n : null;
1697
- }, wt = (e) => {
1697
+ }, Tt = (e) => {
1698
1698
  for (let [, t] of e.getExportedDeclarations()) if (t[0] !== void 0) return !1;
1699
1699
  return e.getExportDeclarations().length === 0 && e.getExportAssignments().length === 0;
1700
- }, Tt = S({
1700
+ }, Et = S({
1701
1701
  version: "0.15.0",
1702
1702
  id: "0.15.0/01_undo-mistaken-taxonomy-renames",
1703
1703
  title: "Undo the two file renames 0.14.0 got wrong (framework primitives, side-effect modules)",
@@ -1714,14 +1714,14 @@ var b = (e, t, n) => {
1714
1714
  transform: ({ project: e, log: t }) => {
1715
1715
  let n = [], r = [];
1716
1716
  for (let t of e.getSourceFiles()) {
1717
- let e = t.getFilePath(), i = m(e), a = Ct(i);
1717
+ let e = t.getFilePath(), i = m(e), a = wt(i);
1718
1718
  if (a !== null) {
1719
- j(t, g(h(e), a)), n.push(`${i} → ${a}`);
1719
+ A(t, g(h(e), a)), n.push(`${i} → ${a}`);
1720
1720
  continue;
1721
1721
  }
1722
- if (/\.types\.tsx?$/.test(i) && wt(t)) {
1722
+ if (/\.types\.tsx?$/.test(i) && Tt(t)) {
1723
1723
  let n = i.replace(/\.types(\.tsx?)$/, "$1");
1724
- j(t, g(h(e), n)), r.push(`${i} → ${n}`);
1724
+ A(t, g(h(e), n)), r.push(`${i} → ${n}`);
1725
1725
  }
1726
1726
  }
1727
1727
  if (n.length > 0) {
@@ -1735,54 +1735,54 @@ var b = (e, t, n) => {
1735
1735
  }
1736
1736
  n.length === 0 && r.length === 0 && t("nothing to undo — 0.14.0 renamed neither a framework file nor a side-effect module here.");
1737
1737
  }
1738
- }), N = ["@voltro/client", "@voltro/web"], P = "@voltro/protocol", Et = S({
1738
+ }), M = ["@voltro/client", "@voltro/web"], N = "@voltro/protocol", Dt = S({
1739
1739
  version: "0.15.0",
1740
1740
  id: "0.15.0/02_error-tag-in-protocol",
1741
1741
  title: "`errorTag` is imported from @voltro/protocol",
1742
1742
  kind: "transform",
1743
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => e.getImportDeclarations().some((e) => N.includes(e.getModuleSpecifierValue()) && e.getNamedImports().some((e) => e.getName() === "errorTag"))),
1743
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => e.getImportDeclarations().some((e) => M.includes(e.getModuleSpecifierValue()) && e.getNamedImports().some((e) => e.getName() === "errorTag"))),
1744
1744
  transform: ({ project: e, log: t }) => {
1745
1745
  let n = 0;
1746
1746
  for (let t of e.getSourceFiles()) for (let e of t.getImportDeclarations()) {
1747
- if (!N.includes(e.getModuleSpecifierValue())) continue;
1747
+ if (!M.includes(e.getModuleSpecifierValue())) continue;
1748
1748
  let r = e.getNamedImports().find((e) => e.getName() === "errorTag");
1749
1749
  if (r === void 0) continue;
1750
1750
  let i = r.getAliasNode()?.getText(), a = e.isTypeOnly() || r.isTypeOnly();
1751
1751
  r.remove();
1752
- let o = t.getImportDeclarations().find((e) => e.getModuleSpecifierValue() === P && e.isTypeOnly() === a), s = {
1752
+ let o = t.getImportDeclarations().find((e) => e.getModuleSpecifierValue() === N && e.isTypeOnly() === a), s = {
1753
1753
  name: "errorTag",
1754
1754
  ...i === void 0 ? {} : { alias: i }
1755
1755
  };
1756
1756
  o === void 0 ? t.addImportDeclaration({
1757
- moduleSpecifier: P,
1757
+ moduleSpecifier: N,
1758
1758
  isTypeOnly: a,
1759
1759
  namedImports: [s]
1760
1760
  }) : o.addNamedImport(s), e.getNamedImports().length === 0 && e.getDefaultImport() === void 0 && e.getNamespaceImport() === void 0 && e.remove(), n += 1;
1761
1761
  }
1762
- n > 0 && t(`errorTag: ${n} import(s) repointed to ${P}`);
1762
+ n > 0 && t(`errorTag: ${n} import(s) repointed to ${N}`);
1763
1763
  }
1764
- }), F = /\.page\.tsx$/, Dt = /\.page\.(test|spec)\.tsx$/, I = (e) => /(^|\/)src\/pages\//.test(e), Ot = (e) => {
1765
- let t = h(e), n = m(e).replace(F, "");
1764
+ }), P = /\.page\.tsx$/, Ot = /\.page\.(test|spec)\.tsx$/, kt = (e) => /(^|\/)src\/pages\//.test(e), At = (e) => {
1765
+ let t = h(e), n = m(e).replace(P, "");
1766
1766
  return n === "index" ? g(t, "page.tsx") : g(t, n, "page.tsx");
1767
- }, kt = (e) => {
1768
- let t = h(e), n = m(e), r = /\.page\.spec\.tsx$/.test(n) ? "spec" : "test", i = n.replace(Dt, "");
1767
+ }, jt = (e) => {
1768
+ let t = h(e), n = m(e), r = /\.page\.spec\.tsx$/.test(n) ? "spec" : "test", i = n.replace(Ot, "");
1769
1769
  return i === "index" ? g(t, `page.${r}.tsx`) : g(t, i, `page.${r}.tsx`);
1770
- }, At = S({
1770
+ }, Mt = S({
1771
1771
  version: "0.17.0",
1772
1772
  id: "0.17.0/01_pages-are-directories",
1773
1773
  title: "A directory is a route segment; its route is page.tsx",
1774
1774
  kind: "transform",
1775
1775
  scope: ["**/src/pages/**/*.ts", "**/src/pages/**/*.tsx"],
1776
1776
  needsImporters: !0,
1777
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => I(e.getFilePath()) && F.test(m(e.getFilePath()))),
1777
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => kt(e.getFilePath()) && P.test(m(e.getFilePath()))),
1778
1778
  transform: ({ project: e, log: t }) => {
1779
1779
  let n = e.getSourceFiles(), r = [];
1780
1780
  for (let e of n) {
1781
1781
  let t = String(e.getFilePath());
1782
- if (!I(t)) continue;
1783
- let n = m(t), i = Dt.test(n);
1784
- if (!i && !F.test(n)) continue;
1785
- let a = i ? kt(t) : Ot(t);
1782
+ if (!kt(t)) continue;
1783
+ let n = m(t), i = Ot.test(n);
1784
+ if (!i && !P.test(n)) continue;
1785
+ let a = i ? jt(t) : At(t);
1786
1786
  a !== t && r.push({
1787
1787
  sf: e,
1788
1788
  from: t,
@@ -1801,7 +1801,7 @@ var b = (e, t, n) => {
1801
1801
  }
1802
1802
  }
1803
1803
  let l = [], u = 0;
1804
- for (let e of r) s.has(e.from) || (u += j(e.sf, e.to), e.isTest || l.push(o(e.to)));
1804
+ for (let e of r) s.has(e.from) || (u += A(e.sf, e.to), e.isTest || l.push(o(e.to)));
1805
1805
  if (l.length > 0 && (t(`moved ${l.length} route(s) into their own directory`), u > 0 && t(` rewrote ${u} aliased import specifier(s)`)), c.length > 0) {
1806
1806
  t(""), t(`LEFT ALONE — ${c.length} case(s) where two files claim one route:`);
1807
1807
  for (let e of c) t(` ${e}`);
@@ -1809,12 +1809,12 @@ var b = (e, t, n) => {
1809
1809
  }
1810
1810
  l.length === 0 && c.length === 0 && t("every route already lives in its own directory — nothing to move.");
1811
1811
  }
1812
- }), jt = /,\s*(['"])like\1\s*,/, Mt = S({
1812
+ }), Nt = /,\s*(['"])like\1\s*,/, Pt = S({
1813
1813
  version: "0.18.0",
1814
1814
  id: "0.18.0/01_where-like-removed",
1815
1815
  title: "the `'like'` where-operator is removed — pick `contains` or `startsWith`",
1816
1816
  kind: "manual",
1817
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => jt.test(e.getFullText())),
1817
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Nt.test(e.getFullText())),
1818
1818
  note: [
1819
1819
  "The `'like'` operator is removed from the ergonomic `.where(col, op, value)` form.",
1820
1820
  "",
@@ -1852,12 +1852,12 @@ var b = (e, t, n) => {
1852
1852
  "in a raw query (`ctx.store.raw`); the DSL has no arbitrary-pattern operator, and",
1853
1853
  "adding one that cannot use an index is not on the roadmap."
1854
1854
  ].join("\n")
1855
- }), Nt = /\.serverOnly\s*\(\s*\)/, Pt = S({
1855
+ }), Ft = /\.serverOnly\s*\(\s*\)/, It = S({
1856
1856
  version: "0.19.0",
1857
1857
  id: "0.19.0/01_server-only-gates-the-boot",
1858
1858
  title: "`.serverOnly()` now FAILS the boot under `voltro serve` — it used to only warn",
1859
1859
  kind: "manual",
1860
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Nt.test(e.getFullText())),
1860
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Ft.test(e.getFullText())),
1861
1861
  note: [
1862
1862
  "`.serverOnly()` now GATES. Before 0.19.0 it emitted one `log.warn` and let the",
1863
1863
  "boot continue — in every command, including `voltro serve`.",
@@ -1904,12 +1904,12 @@ var b = (e, t, n) => {
1904
1904
  "hatch is that people delete the marker instead — and a check whose only way out",
1905
1905
  "is to disable it gets disabled."
1906
1906
  ].join("\n")
1907
- }), Ft = /\bauditPlugin\s*\(/, It = S({
1907
+ }), Lt = /\bauditPlugin\s*\(/, Rt = S({
1908
1908
  version: "0.19.0",
1909
1909
  id: "0.19.0/02_audit-redact-input-default",
1910
1910
  title: "`auditPlugin` now redacts mutation input by default (`redactInput: 'all'`)",
1911
1911
  kind: "manual",
1912
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Ft.test(e.getFullText())),
1912
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Lt.test(e.getFullText())),
1913
1913
  note: [
1914
1914
  "`auditPlugin`'s `redactInput` now defaults to `'all'`. Audit rows written from",
1915
1915
  "now on carry `input: { __redacted: 'all' }` — which still proves a payload",
@@ -1945,12 +1945,12 @@ var b = (e, t, n) => {
1945
1945
  "those markers live on TABLE COLUMNS, and this is a mutation's INPUT.",
1946
1946
  "`changePassword({ oldPassword, newPassword })` has no column to consult."
1947
1947
  ].join("\n")
1948
- }), Lt = C("registerWriteRecorder"), Rt = S({
1948
+ }), zt = C("registerWriteRecorder"), Bt = S({
1949
1949
  version: "0.20.0",
1950
1950
  id: "0.20.0/01_write-recorder-port",
1951
1951
  title: "`WriteRecorder` takes a port (`{ append, maxOf }`) instead of a bare `append`",
1952
1952
  kind: "manual",
1953
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Lt.test(e.getFullText())),
1953
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => zt.test(e.getFullText())),
1954
1954
  note: [
1955
1955
  "If you wrote your own in-transaction write recorder, its first parameter is",
1956
1956
  "now an object rather than a function:",
@@ -1989,12 +1989,12 @@ var b = (e, t, n) => {
1989
1989
  "nested transaction, and a throw from either operation still rolls the",
1990
1990
  "caller's write back. That is the guarantee the timing exists for."
1991
1991
  ].join("\n")
1992
- }), zt = /\.maxLength\s*\(/, Bt = S({
1992
+ }), Vt = /\.maxLength\s*\(/, Ht = S({
1993
1993
  version: "0.21.0",
1994
1994
  id: "0.21.0/01_maxlength-now-migrates",
1995
1995
  title: "`text().maxLength(n)` now migrates EXISTING columns — plan before you apply",
1996
1996
  kind: "manual",
1997
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => zt.test(e.getFullText())),
1997
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Vt.test(e.getFullText())),
1998
1998
  note: [
1999
1999
  "Your source does not change. `text().maxLength(n)` compiles exactly as before",
2000
2000
  "and every bound you already declared stays as written.",
@@ -2036,12 +2036,12 @@ var b = (e, t, n) => {
2036
2036
  "framework guarantees, and an upgrade-time ALTER that fails on your data is a",
2037
2037
  "worse outcome than the index-size concern it would fix."
2038
2038
  ].join("\n")
2039
- }), Vt = /\bMigrationOperation\b|\bPlannedOperation\b|\bInspectMigrationOperationKind\b|\bOperationKind\b/, Ht = S({
2039
+ }), Ut = /\bMigrationOperation\b|\bPlannedOperation\b|\bInspectMigrationOperationKind\b|\bOperationKind\b/, Wt = S({
2040
2040
  version: "0.22.0",
2041
2041
  id: "0.22.0/01_rename-index-op",
2042
2042
  title: "`MigrationOperation` gained a `rename-index` kind",
2043
2043
  kind: "manual",
2044
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Vt.test(e.getFullText())),
2044
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Ut.test(e.getFullText())),
2045
2045
  note: [
2046
2046
  "The migration planner can now emit a `rename-index` operation:",
2047
2047
  "",
@@ -2073,12 +2073,12 @@ var b = (e, t, n) => {
2073
2073
  "match where two same-shaped indexes were renamed at once. Those still plan",
2074
2074
  "as drop + create, exactly as before."
2075
2075
  ].join("\n")
2076
- }), Ut = /@voltro\/plugin-(notifications|scim|ai-flows)/, Wt = S({
2076
+ }), Gt = /@voltro\/plugin-(notifications|scim|ai-flows)/, Kt = S({
2077
2077
  version: "0.22.0",
2078
2078
  id: "0.22.0/02_plugin-tables-voltro-prefixed",
2079
2079
  title: "plugin-owned tables are `_voltro_`-prefixed (the rows move themselves)",
2080
2080
  kind: "manual",
2081
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Ut.test(e.getFullText())),
2081
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Gt.test(e.getFullText())),
2082
2082
  note: [
2083
2083
  "Ten tables owned by @voltro/plugin-notifications, @voltro/plugin-scim and",
2084
2084
  "@voltro/plugin-ai-flows moved out of your table namespace and into the",
@@ -2128,12 +2128,12 @@ var b = (e, t, n) => {
2128
2128
  "gained a `rename-table` kind. An exhaustive `switch` needs an arm; don't add",
2129
2129
  "a `default:`, which would silence this and every future kind."
2130
2130
  ].join("\n")
2131
- }), Gt = /QueryCacheScope|QueryCacheConfig|scope\s*:\s*['"](?:subject|global)['"]/, Kt = S({
2131
+ }), qt = /QueryCacheScope|QueryCacheConfig|scope\s*:\s*['"](?:subject|global)['"]/, Jt = S({
2132
2132
  version: "0.22.0",
2133
2133
  id: "0.22.0/03_cache-scope-gained-tenant",
2134
2134
  title: "`cache.scope` gained 'tenant' — an exhaustive switch over it needs a branch",
2135
2135
  kind: "manual",
2136
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Gt.test(e.getFullText())),
2136
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => qt.test(e.getFullText())),
2137
2137
  note: [
2138
2138
  "`cache: { scope }` now accepts a third value, `'tenant'`: one cache entry per",
2139
2139
  "org, none shared across orgs.",
@@ -2162,12 +2162,12 @@ var b = (e, t, n) => {
2162
2162
  "Rubric: does the resolved predicate depend on the caller? On the PERSON →",
2163
2163
  "`subject`; on their ORG only → `tenant`; on neither → `global`."
2164
2164
  ].join("\n")
2165
- }), qt = /envTokenAuthResolver|InspectAuthResolver|authResolver/, Jt = S({
2165
+ }), Yt = /envTokenAuthResolver|InspectAuthResolver|authResolver/, Xt = S({
2166
2166
  version: "0.22.0",
2167
2167
  id: "0.22.0/04_inspect-write-credential",
2168
2168
  title: "Mutating `/_voltro/inspect/*` endpoints need VOLTRO_INSPECT_WRITE_TOKEN",
2169
2169
  kind: "manual",
2170
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => qt.test(e.getFullText())),
2170
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Yt.test(e.getFullText())),
2171
2171
  note: [
2172
2172
  "A POST / PATCH / PUT / DELETE to `/_voltro/inspect/*` now needs a SECOND",
2173
2173
  "credential: `VOLTRO_INSPECT_WRITE_TOKEN`, sent as the `x-voltro-inspect-write`",
@@ -2205,12 +2205,12 @@ var b = (e, t, n) => {
2205
2205
  "IMPLEMENTING a resolver is unaffected — `(headers) => …` still satisfies the",
2206
2206
  "type. Only callers are obliged."
2207
2207
  ].join("\n")
2208
- }), Yt = /versioningPlugin\s*\(/, Xt = S({
2208
+ }), Zt = /versioningPlugin\s*\(/, Qt = S({
2209
2209
  version: "0.23.0",
2210
2210
  id: "0.23.0/01_versioning-is-opt-out",
2211
2211
  title: "versioningPlugin: `tables: string[]` → opt-out by default, `include` / `exclude` by value",
2212
2212
  kind: "manual",
2213
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Yt.test(e.getFullText())),
2213
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Zt.test(e.getFullText())),
2214
2214
  note: [
2215
2215
  "`versioningPlugin({ tables: [...] })` no longer compiles. Row history is now",
2216
2216
  "ON by default for every table your app declares.",
@@ -2250,12 +2250,12 @@ var b = (e, t, n) => {
2250
2250
  "surprises you, `exclude` is the knob, and the retention sweep",
2251
2251
  "(`VOLTRO_ROW_HISTORY_TTL_HOURS`) still bounds age."
2252
2252
  ].join("\n")
2253
- }), Zt = /@voltro\/ai|\.agent\.tsx|agent_(threads|messages)/, Qt = S({
2253
+ }), $t = /@voltro\/ai|\.agent\.tsx|agent_(threads|messages)/, en = S({
2254
2254
  version: "0.24.0",
2255
2255
  id: "0.24.0/01_agent-tables-voltro-prefixed",
2256
2256
  title: "the two agent tables are `_voltro_`-prefixed (the rows move themselves)",
2257
2257
  kind: "manual",
2258
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Zt.test(e.getFullText())),
2258
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => $t.test(e.getFullText())),
2259
2259
  note: [
2260
2260
  "The two tables owned by @voltro/ai moved out of your table namespace and",
2261
2261
  "into the framework's:",
@@ -2308,12 +2308,12 @@ var b = (e, t, n) => {
2308
2308
  "declared by something. You get a fresh empty `_voltro_…` table alongside it,",
2309
2309
  "which is the collision this ends."
2310
2310
  ].join("\n")
2311
- }), $t = /\.events\s*\.\s*emit\s*\(/, en = S({
2311
+ }), tn = /\.events\s*\.\s*emit\s*\(/, nn = S({
2312
2312
  version: "0.25.0",
2313
2313
  id: "0.25.0/01_events-emit-to-publish",
2314
2314
  title: "`ctx.events.emit(name, data)` → `ctx.events.publish(descriptor, key, payload)`",
2315
2315
  kind: "manual",
2316
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => $t.test(e.getFullText())),
2316
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => tn.test(e.getFullText())),
2317
2317
  note: [
2318
2318
  "`ctx.events.emit('name', data)` is gone. Declare the event and publish it:",
2319
2319
  "",
@@ -2357,49 +2357,49 @@ var b = (e, t, n) => {
2357
2357
  "",
2358
2358
  "Docs: https://docs.voltro.dev/docs/data/events"
2359
2359
  ].join("\n")
2360
- }), tn = /* @__PURE__ */ new Set([
2360
+ }), rn = /* @__PURE__ */ new Set([
2361
2361
  "description",
2362
2362
  "version",
2363
2363
  "globalRateLimit"
2364
- ]), nn = ["defaultRetry", "defaultSigning"], L = (e) => e.getDescendantsOfKind(y.CallExpression).filter((e) => e.getExpression().getText() === "defineOutgoingEvent"), rn = S({
2364
+ ]), an = ["defaultRetry", "defaultSigning"], F = (e) => e.getDescendantsOfKind(y.CallExpression).filter((e) => e.getExpression().getText() === "defineOutgoingEvent"), on = S({
2365
2365
  version: "0.25.0",
2366
2366
  id: "0.25.0/02_outgoing-event-to-define-event",
2367
2367
  title: "`defineOutgoingEvent` → `defineEvent({ …, webhook: { … } })`",
2368
2368
  kind: "transform",
2369
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => L(e).length > 0),
2369
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => F(e).length > 0),
2370
2370
  transform: ({ project: e, log: t }) => {
2371
2371
  let n = 0, r = /* @__PURE__ */ new Set(), i = [];
2372
- for (let t of e.getSourceFiles()) for (let e of L(t)) {
2372
+ for (let t of e.getSourceFiles()) for (let e of F(t)) {
2373
2373
  let a = e.getArguments()[0];
2374
2374
  if (a === void 0 || !a.isKind(y.ObjectLiteralExpression)) continue;
2375
2375
  let o = a.getProperties().filter((e) => e.isKind(y.PropertyAssignment)), s = (e) => o.find((t) => t.asKindOrThrow(y.PropertyAssignment).getName() === e)?.asKindOrThrow(y.PropertyAssignment).getInitializer()?.getText(), c = s("id"), l = s("payload");
2376
2376
  if (c === void 0 || l === void 0) continue;
2377
- let u = [...tn].map((e) => {
2377
+ let u = [...rn].map((e) => {
2378
2378
  let t = s(e);
2379
2379
  if (t !== void 0) return `${e === "globalRateLimit" ? "rateLimit" : e}: ${t}`;
2380
2380
  }).filter((e) => e !== void 0);
2381
- for (let e of nn) s(e) !== void 0 && i.push(`${t.getBaseName()}: ${e}`);
2381
+ for (let e of an) s(e) !== void 0 && i.push(`${t.getBaseName()}: ${e}`);
2382
2382
  let d = u.length > 0 ? `, webhook: { ${u.join(", ")} }` : ", webhook: {}";
2383
2383
  e.replaceWithText(`defineEvent({ name: ${c}, key: Schema.Struct({}), payload: ${l}${d} })`), n++, r.add(t.getFilePath());
2384
2384
  }
2385
2385
  n !== 0 && (t(`webhooks: rewrote ${n} \`defineOutgoingEvent\` → \`defineEvent\` in ${r.size} file${r.size === 1 ? "" : "s"}`), t(" → `key: Schema.Struct({})` is CORRECT, not a placeholder: a webhook event goes to"), t(" subscribed targets, not to a routing key. Give it a key only if you also want"), t(" connected clients to subscribe per-something with `useEvent`."), t(" → import `defineEvent` from `@voltro/protocol` and `Schema` from `effect`;"), t(" the file is now a declaration, so `*.event.ts` is its home."), t(" → `ctx.webhooks.emit(descriptor, payload)` still works, and"), t(" `ctx.events.publish(descriptor, key, payload)` now reaches the HTTP targets too."), i.length > 0 && (t(` → NOT carried across (${i.length}): ${[...new Set(i)].join(", ")}`), t(" The plugin's retry/signing shapes are richer than the declared event can hold,"), t(" so they are left in place as a compile error rather than dropped silently."), t(" Configure them at subscribe time, where the full shape is typed.")));
2386
2386
  }
2387
- }), R = (e) => e.getDescendantsOfKind(y.CallExpression).filter((e) => {
2387
+ }), I = (e) => e.getDescendantsOfKind(y.CallExpression).filter((e) => {
2388
2388
  let t = e.getExpression().getText();
2389
2389
  return t === "broadcast" || t === "broadcastPlugin";
2390
- }), z = (e) => {
2390
+ }), L = (e) => {
2391
2391
  let t = e.getArguments()[0];
2392
2392
  if (!(t === void 0 || !t.isKind(y.ObjectLiteralExpression))) return t.getProperties().filter((e) => e.isKind(y.PropertyAssignment)).map((e) => e.asKindOrThrow(y.PropertyAssignment)).find((e) => e.getName() === "channel");
2393
- }, an = S({
2393
+ }, sn = S({
2394
2394
  version: "0.25.0",
2395
2395
  id: "0.25.0/03_broadcast-channel-to-namespace",
2396
2396
  title: "`broadcast({ channel })` → `broadcast({ namespace })`",
2397
2397
  kind: "transform",
2398
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => R(e).some((e) => z(e) !== void 0)),
2398
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => I(e).some((e) => L(e) !== void 0)),
2399
2399
  transform: ({ project: e, log: t }) => {
2400
2400
  let n = 0, r = [], i = [], a = /* @__PURE__ */ new Set();
2401
- for (let t of e.getSourceFiles()) for (let e of R(t)) {
2402
- let o = z(e);
2401
+ for (let t of e.getSourceFiles()) for (let e of I(t)) {
2402
+ let o = L(e);
2403
2403
  if (o === void 0) continue;
2404
2404
  let s = o.getInitializer();
2405
2405
  if (s === void 0) continue;
@@ -2416,7 +2416,7 @@ var b = (e, t, n) => {
2416
2416
  for (let e of i) t(` ! ${e} — carried verbatim; CHECK IT: the value is now a PREFIX the framework`), t(" appends ':changes' / ':events:<name>' / ':members' / ':presence' to.");
2417
2417
  }
2418
2418
  }
2419
- }), on = S({
2419
+ }), cn = S({
2420
2420
  version: "0.26.0",
2421
2421
  id: "0.26.0/01_event-webhook-retry-removed",
2422
2422
  title: "`defineEvent({ webhook: { retry } })` is gone — it never did anything",
@@ -2450,7 +2450,7 @@ var b = (e, t, n) => {
2450
2450
  "If you were relying on the declared value to take effect, note that it never",
2451
2451
  "did — your deliveries have been using the target default all along."
2452
2452
  ].join("\n")
2453
- }), sn = S({
2453
+ }), ln = S({
2454
2454
  version: "0.26.0",
2455
2455
  id: "0.26.0/02_step-retry-enforced",
2456
2456
  title: "workflow step `retry:` is now ENFORCED (was metadata) — drop any redundant manual retry",
@@ -2503,12 +2503,12 @@ var b = (e, t, n) => {
2503
2503
  "(retry transient, fail permanent), `maxElapsed: '5 minutes'` (a total time budget,",
2504
2504
  "not just a count), `jitter` (on by default), and `respectRetryAfter` (honor a 429)."
2505
2505
  ].join("\n")
2506
- }), cn = /\bmakeSubjectId\b/, ln = S({
2506
+ }), un = /\bmakeSubjectId\b/, dn = S({
2507
2507
  version: "0.28.0",
2508
2508
  id: "0.28.0/01_notifications-resolve-subject-id-async",
2509
2509
  title: "`makeSubjectId` returns a Promise; `resolveSubjectId` may be async",
2510
2510
  kind: "manual",
2511
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => cn.test(e.getFullText())),
2511
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => un.test(e.getFullText())),
2512
2512
  note: [
2513
2513
  "`makeSubjectId` from @voltro/plugin-notifications now returns a Promise.",
2514
2514
  "",
@@ -2540,12 +2540,12 @@ var b = (e, t, n) => {
2540
2540
  " reconnect. Memoise inside your own resolver if that trade suits your app —",
2541
2541
  " you know your invalidation and we do not."
2542
2542
  ].join("\n")
2543
- }), un = /\bPluginRefChange\b|\bisSoftDelete\s*\(|\bapplyPluginRefRules\s*\(/, dn = S({
2543
+ }), fn = /\bPluginRefChange\b|\bisSoftDelete\s*\(|\bapplyPluginRefRules\s*\(/, pn = S({
2544
2544
  version: "0.28.0",
2545
2545
  id: "0.28.0/02_plugin-ref-change-event",
2546
2546
  title: "`PluginRefChange` is removed — the change channel's `ChangeEvent` is the one shape",
2547
2547
  kind: "manual",
2548
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => un.test(e.getFullText())),
2548
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => fn.test(e.getFullText())),
2549
2549
  note: [
2550
2550
  "`PluginRefChange` no longer exists. `isSoftDelete` and `applyPluginRefRules`",
2551
2551
  "take `ChangeEvent` from @voltro/database — the type the change channel actually",
@@ -2587,12 +2587,12 @@ var b = (e, t, n) => {
2587
2587
  " not know that writes a delete, and the test passes against a stream the",
2588
2588
  " framework never emits. That is the defect this change removes."
2589
2589
  ].join("\n")
2590
- }), fn = /credentialsResolver\s*:/, pn = S({
2590
+ }), mn = /credentialsResolver\s*:/, hn = S({
2591
2591
  version: "0.28.0",
2592
2592
  id: "0.28.0/03_atlassian-credentials-context",
2593
2593
  title: "`credentialsResolver` receives `{ subject, store }` instead of a bare Subject",
2594
2594
  kind: "manual",
2595
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => fn.test(e.getFullText())),
2595
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => mn.test(e.getFullText())),
2596
2596
  note: [
2597
2597
  "@voltro/plugin-atlassian: `credentialsResolver` now takes a context object.",
2598
2598
  "",
@@ -2662,12 +2662,12 @@ var b = (e, t, n) => {
2662
2662
  "",
2663
2663
  "and rotate anything you find — a redacted future does not un-leak a past row."
2664
2664
  ].join("\n")
2665
- }), mn = /auditPlugin\s*\(/, hn = S({
2665
+ }), gn = /auditPlugin\s*\(/, _n = S({
2666
2666
  version: "0.28.0",
2667
2667
  id: "0.28.0/04_audit-redacts-subject-metadata",
2668
2668
  title: "`auditPlugin` redacts `subject.metadata` by default",
2669
2669
  kind: "manual",
2670
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => mn.test(e.getFullText())),
2670
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => gn.test(e.getFullText())),
2671
2671
  note: [
2672
2672
  "`auditPlugin` now redacts `subject.metadata` before the sink sees the event.",
2673
2673
  "",
@@ -2723,12 +2723,12 @@ var b = (e, t, n) => {
2723
2723
  " keeps the token in the framework vault, and the resolver's new `store`",
2724
2724
  " handle covers an app with its own token table."
2725
2725
  ].join("\n")
2726
- }), gn = C("useLoaderData"), _n = S({
2726
+ }), vn = C("useLoaderData"), yn = S({
2727
2727
  version: "0.29.0",
2728
2728
  id: "0.29.0/01_loader-data-absence",
2729
2729
  title: "`useLoaderData()` throws at a level that declares no `loader`",
2730
2730
  kind: "manual",
2731
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => gn.test(e.getFullText())),
2731
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => vn.test(e.getFullText())),
2732
2732
  note: [
2733
2733
  "`useLoaderData()` used to return `undefined` at a level with no `loader`,",
2734
2734
  "which then died at `Cannot destructure property 'x' of undefined` — a",
@@ -2764,24 +2764,24 @@ var b = (e, t, n) => {
2764
2764
  "that legitimately resolves to `undefined` does not throw — only a missing",
2765
2765
  "`loader` does."
2766
2766
  ].join("\n")
2767
- }), B = "@voltro/ui-shadcn", V = "voltro:lang", vn = "voltro:locale", H = "parsePreferenceCookies", yn = (e, t) => {
2767
+ }), R = "@voltro/ui-shadcn", z = "voltro:lang", bn = "voltro:locale", B = "parsePreferenceCookies", xn = (e, t) => {
2768
2768
  let n = [];
2769
- for (let r of e.getImportDeclarations()) if (r.getModuleSpecifierValue() === B) for (let e of r.getNamedImports()) e.getName() === t && n.push(e.getAliasNode()?.getText() ?? e.getName());
2769
+ for (let r of e.getImportDeclarations()) if (r.getModuleSpecifierValue() === R) for (let e of r.getNamedImports()) e.getName() === t && n.push(e.getAliasNode()?.getText() ?? e.getName());
2770
2770
  return n;
2771
- }, bn = (e) => {
2771
+ }, Sn = (e) => {
2772
2772
  let t = 0;
2773
- for (let n of e.getSourceFiles()) n.getFullText().includes(V) && n.forEachDescendant((e) => {
2773
+ for (let n of e.getSourceFiles()) n.getFullText().includes(z) && n.forEachDescendant((e) => {
2774
2774
  if (v.isStringLiteral(e) || v.isNoSubstitutionTemplateLiteral(e) || v.isTemplateHead(e) || v.isTemplateMiddle(e) || v.isTemplateTail(e) || v.isRegularExpressionLiteral(e)) {
2775
2775
  let n = e.getText();
2776
- if (!n.includes(V)) return;
2777
- e.replaceWithText(n.split(V).join(vn)), t++;
2776
+ if (!n.includes(z)) return;
2777
+ e.replaceWithText(n.split(z).join(bn)), t++;
2778
2778
  }
2779
2779
  });
2780
2780
  return t;
2781
- }, xn = (e) => {
2781
+ }, Cn = (e) => {
2782
2782
  let t = 0, n = 0;
2783
2783
  for (let r of e.getSourceFiles()) {
2784
- let e = yn(r, H);
2784
+ let e = xn(r, B);
2785
2785
  e.length !== 0 && r.forEachDescendant((r) => {
2786
2786
  if (!v.isCallExpression(r) || !e.includes(r.getExpression().getText())) return;
2787
2787
  let i = r.getParent();
@@ -2804,29 +2804,29 @@ var b = (e, t, n) => {
2804
2804
  access: t,
2805
2805
  destructured: n
2806
2806
  };
2807
- }, Sn = S({
2807
+ }, wn = S({
2808
2808
  version: "0.30.0",
2809
2809
  id: "0.30.0/01_locale-cookie-rename",
2810
2810
  title: "the language-preference cookie is `voltro:locale` (was `voltro:lang`)",
2811
2811
  kind: "transform",
2812
2812
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
2813
2813
  let t = e.getFullText();
2814
- return t.includes(V) || t.includes(B) && (t.includes("LANG_COOKIE") || t.includes(H));
2814
+ return t.includes(z) || t.includes(R) && (t.includes("LANG_COOKIE") || t.includes(B));
2815
2815
  }),
2816
2816
  transform: ({ project: e, helpers: t, log: n }) => {
2817
2817
  let r = t.renameImport(e, {
2818
- module: B,
2818
+ module: R,
2819
2819
  from: "LANG_COOKIE",
2820
2820
  to: "LOCALE_COOKIE"
2821
- }), i = bn(e), { access: a, destructured: o } = xn(e), s = [];
2821
+ }), i = Sn(e), { access: a, destructured: o } = Cn(e), s = [];
2822
2822
  r > 0 && s.push(`LANG_COOKIE → LOCALE_COOKIE (${r} import(s))`), i > 0 && s.push(`'voltro:lang' → 'voltro:locale' (${i} literal(s))`), a + o > 0 && s.push(`parsePreferenceCookies().lang → .locale (${a + o} site(s))`), s.length !== 0 && n(`locale cookie rename: ${s.join("; ")}. Your SOURCE is migrated. Your USERS' cookies are not — the old \`voltro:lang\` cookie in an already-visited browser is no longer read, so each user falls back to Accept-Language / defaultLocale once and re-picks their language. Nothing errors. If that reset is unacceptable, copy the old value forward at your own boot — the codemod file has the three-line bridge.` + (o > 0 ? ` ${o} destructure(s) were rewritten as \`{ locale: lang }\` to keep the local name safe from a scope collision — rename the binding yourself if you want the vocabulary to match.` : ""));
2823
2823
  }
2824
- }), Cn = /auditPlugin\s*\(|versioningPlugin\s*\(|atlassianPlugin\s*\(/, wn = S({
2824
+ }), Tn = /auditPlugin\s*\(|versioningPlugin\s*\(|atlassianPlugin\s*\(/, En = S({
2825
2825
  version: "0.30.0",
2826
2826
  id: "0.30.0/02_audit-purge-query-recheck",
2827
2827
  title: "re-run the credential-purge query — the 0.28.0 spelling under-reported on MySQL/MariaDB",
2828
2828
  kind: "manual",
2829
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Cn.test(e.getFullText())),
2829
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Tn.test(e.getFullText())),
2830
2830
  note: [
2831
2831
  "IF YOU ALREADY RAN THE 0.28.0 PURGE CHECK ON MySQL OR MariaDB, RUN IT AGAIN.",
2832
2832
  "The query that note shipped under-reported, and it under-reported by",
@@ -2873,14 +2873,14 @@ var b = (e, t, n) => {
2873
2873
  " `connectionCredentials(...)` keeps it in the framework vault",
2874
2874
  " (see `0.28.0/03_atlassian-credentials-context`)."
2875
2875
  ].join("\n")
2876
- }), Tn = /\.webhooks\s*\.\s*emit\s*\(|useWebhooks\s*\(/, En = S({
2876
+ }), Dn = /\.webhooks\s*\.\s*emit\s*\(|useWebhooks\s*\(/, On = S({
2877
2877
  version: "0.30.0",
2878
2878
  id: "0.30.0/03_webhook-emit-durable-deferral",
2879
2879
  title: "a deferred `webhooks.emit` rides the transactional outbox; `{ immediate: true }` opts out",
2880
2880
  kind: "manual",
2881
2881
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
2882
2882
  let t = e.getFullText();
2883
- return Tn.test(t) || C("emit").test(t);
2883
+ return Dn.test(t) || C("emit").test(t);
2884
2884
  }),
2885
2885
  note: [
2886
2886
  "A `ctx.webhooks.emit(...)` inside a MUTATION now enqueues a transactional",
@@ -2930,14 +2930,14 @@ var b = (e, t, n) => {
2930
2930
  "created by the declarative differ on the next `voltro dev` boot or",
2931
2931
  "`voltro db apply` — there is nothing to run by hand."
2932
2932
  ].join("\n")
2933
- }), Dn = /\.executionId\b|workflows\s*\.\s*start\s*\(|workflows\s*\.\s*child\s*\(/, On = S({
2933
+ }), kn = /\.executionId\b|workflows\s*\.\s*start\s*\(|workflows\s*\.\s*child\s*\(/, An = S({
2934
2934
  version: "0.30.0",
2935
2935
  id: "0.30.0/04_workflow-run-handle-nullable-execution",
2936
2936
  title: "`WorkflowRunHandle.executionId` is `string | null`; `status` gains queued/dropped/skipped",
2937
2937
  kind: "manual",
2938
2938
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
2939
2939
  let t = e.getFullText();
2940
- return Dn.test(t) || C("start").test(t);
2940
+ return kn.test(t) || C("start").test(t);
2941
2941
  }),
2942
2942
  note: [
2943
2943
  "A workflow start no longer always becomes a run. With declarative flow",
@@ -3002,12 +3002,12 @@ var b = (e, t, n) => {
3002
3002
  " and `singleton: { mode: 'skip' }` throws `WorkflowSingletonHeldError`",
3003
3003
  " carrying the incumbent's execution id, so you can wait on THAT run."
3004
3004
  ].join("\n")
3005
- }), kn = /auditPlugin\s*\(|versioningPlugin\s*\(|atlassianPlugin\s*\(/, An = S({
3005
+ }), jn = /auditPlugin\s*\(|versioningPlugin\s*\(|atlassianPlugin\s*\(/, Mn = S({
3006
3006
  version: "0.31.0",
3007
3007
  id: "0.31.0/01_rerun-credential-scan",
3008
3008
  title: "re-run `voltro db scan-credentials` — on 0.30.0–0.30.2 it skipped the column credentials land in",
3009
3009
  kind: "manual",
3010
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => kn.test(e.getFullText())),
3010
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => jn.test(e.getFullText())),
3011
3011
  note: [
3012
3012
  "IF YOU RAN `voltro db scan-credentials` ON 0.30.0, 0.30.1 OR 0.30.2, RUN IT",
3013
3013
  "AGAIN. Its answer did not cover the column a leaked credential is most",
@@ -3041,7 +3041,7 @@ var b = (e, t, n) => {
3041
3041
  "credential on the Subject — `connectionCredentials(...)` keeps it in the",
3042
3042
  "framework vault."
3043
3043
  ].join("\n")
3044
- }), jn = S({
3044
+ }), Nn = S({
3045
3045
  version: "0.32.0",
3046
3046
  id: "0.32.0/01_audit-redacts-outcome",
3047
3047
  title: "`auditPlugin` now redacts `outcome` by default — opt out if your trail reads it",
@@ -3082,7 +3082,7 @@ var b = (e, t, n) => {
3082
3082
  "purge the rows AND rotate the credentials — assume anything written to a",
3083
3083
  "log table has been read."
3084
3084
  ].join("\n")
3085
- }), Mn = S({
3085
+ }), Pn = S({
3086
3086
  version: "0.33.0",
3087
3087
  id: "0.33.0/01_opentelemetry-optional-peer",
3088
3088
  title: "`@effect/opentelemetry` is now an optional peer — install it if you use tracing",
@@ -3114,7 +3114,7 @@ var b = (e, t, n) => {
3114
3114
  "never wrote down. It is a startup failure, not a silent loss of traces —",
3115
3115
  "losing telemetry quietly would be the worse outcome."
3116
3116
  ].join("\n")
3117
- }), Nn = S({
3117
+ }), Fn = S({
3118
3118
  version: "0.33.0",
3119
3119
  id: "0.33.0/02_coordinated-handle-gained-wake",
3120
3120
  title: "`CoordinatedScheduleHandle` gained `wake()`, `currentIntervalMs()` and `isArmed()` — update hand-written test doubles",
@@ -3164,7 +3164,7 @@ var b = (e, t, n) => {
3164
3164
  "Reporting nothing is the conservative default on purpose — a task that",
3165
3165
  "cannot tell whether it was idle must not be slowed down on a guess."
3166
3166
  ].join("\n")
3167
- }), Pn = S({
3167
+ }), In = S({
3168
3168
  version: "0.34.0",
3169
3169
  id: "0.34.0/01_serve-does-mount-inspect",
3170
3170
  title: "Correction: `voltro serve` DOES mount an inspect surface (the 0.12.0 note said it mounts none)",
@@ -3205,12 +3205,12 @@ var b = (e, t, n) => {
3205
3205
  "place, everyone already past 0.12.0 — which is everyone the wrong sentence",
3206
3206
  "could have misled — would never have seen it."
3207
3207
  ].join("\n")
3208
- }), Fn = (e) => /\.with\(\s*[\w.]*tenant\(/.test(e) || /\.serverOnly\(\s*\)/.test(e), In = S({
3208
+ }), Ln = (e) => /\.with\(\s*[\w.]*tenant\(/.test(e) || /\.serverOnly\(\s*\)/.test(e), Rn = S({
3209
3209
  version: "0.34.0",
3210
3210
  id: "0.34.0/02_keyed-writes-are-tenant-scoped",
3211
3211
  title: "Keyed-by-pk writes are tenant-enforced, and `crud` refuses `.serverOnly()` input",
3212
3212
  kind: "manual",
3213
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Fn(e.getFullText())),
3213
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Ln(e.getFullText())),
3214
3214
  note: [
3215
3215
  "TWO WRITE-SIDE REFUSALS ARE NEW. Neither changes a type, so `tsc` will not",
3216
3216
  "point at the call sites — these are runtime behaviour changes.",
@@ -3274,12 +3274,12 @@ var b = (e, t, n) => {
3274
3274
  " an attack look like a no-op and leaves an honest caller debugging a",
3275
3275
  " value that quietly did not land."
3276
3276
  ].join("\n")
3277
- }), Ln = /* @__PURE__ */ new Set([
3277
+ }), zn = /* @__PURE__ */ new Set([
3278
3278
  "defineQuery",
3279
3279
  "defineMutation",
3280
3280
  "defineAction",
3281
3281
  "defineStream"
3282
- ]), Rn = (e) => {
3282
+ ]), Bn = (e) => {
3283
3283
  let t = e.getArguments()[0];
3284
3284
  if (t === void 0 || !t.isKind(y.ObjectLiteralExpression)) return /* @__PURE__ */ new Set();
3285
3285
  let n = /* @__PURE__ */ new Set();
@@ -3288,16 +3288,16 @@ var b = (e, t, n) => {
3288
3288
  t !== void 0 && n.add(t);
3289
3289
  }
3290
3290
  return n;
3291
- }, zn = (e, t) => /define(Query|Mutation|Action|Stream)\s*\(/.test(e) ? t.some((e) => {
3292
- if (!Ln.has(e.getExpression().getText())) return !1;
3293
- let t = Rn(e);
3291
+ }, Vn = (e, t) => /define(Query|Mutation|Action|Stream)\s*\(/.test(e) ? t.some((e) => {
3292
+ if (!zn.has(e.getExpression().getText())) return !1;
3293
+ let t = Bn(e);
3294
3294
  return !t.has("internal") && !t.has("guards") && !t.has("openAccess");
3295
- }) : !1, Bn = S({
3295
+ }) : !1, Hn = S({
3296
3296
  version: "0.34.0",
3297
3297
  id: "0.34.0/03_procedure-access-decision",
3298
3298
  title: "Every wire-exposed procedure declares an access decision (`guards:` or `openAccess:`)",
3299
3299
  kind: "manual",
3300
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => zn(e.getFullText(), e.getDescendantsOfKind(y.CallExpression))),
3300
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Vn(e.getFullText(), e.getDescendantsOfKind(y.CallExpression))),
3301
3301
  note: [
3302
3302
  "YOUR APP WILL NOT BOOT UNTIL EVERY WIRE-EXPOSED PROCEDURE DECIDES WHO MAY",
3303
3303
  "CALL IT. This is the single largest behaviour change in this release, and it",
@@ -3342,18 +3342,18 @@ var b = (e, t, n) => {
3342
3342
  "procedures your PLUGINS declare — the gate reads your app's own discovered",
3343
3343
  "files only, so adopting this does not turn into a plugin bug report."
3344
3344
  ].join("\n")
3345
- }), Vn = [
3345
+ }), Un = [
3346
3346
  "workosAuthorizationUrl",
3347
3347
  "workosAuthenticateWithCode",
3348
3348
  "workosBeginLogin"
3349
- ], Hn = S({
3349
+ ], Wn = S({
3350
3350
  version: "0.34.0",
3351
3351
  id: "0.34.0/04_workos-oauth-state-pkce",
3352
3352
  title: "WorkOS hosted login: `workosAuthorizationUrl` → `workosBeginLogin`, with mandatory `state` + PKCE",
3353
3353
  kind: "manual",
3354
3354
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
3355
3355
  let t = e.getFullText();
3356
- return t.includes("@voltro/plugin-auth-workos") && Vn.some((e) => t.includes(e));
3356
+ return t.includes("@voltro/plugin-auth-workos") && Un.some((e) => t.includes(e));
3357
3357
  }),
3358
3358
  note: [
3359
3359
  "YOUR WORKOS HOSTED-LOGIN FLOW HAD NO CSRF PROTECTION BY DEFAULT, AND NO PKCE.",
@@ -3411,12 +3411,12 @@ var b = (e, t, n) => {
3411
3411
  "are accepted on the existing endpoints; your registered redirect URI is",
3412
3412
  "unchanged."
3413
3413
  ].join("\n")
3414
- }), Un = /mirrorTables|_?voltro_mirror_/, Wn = S({
3414
+ }), Gn = /mirrorTables|_?voltro_mirror_/, Kn = S({
3415
3415
  version: "0.34.0",
3416
3416
  id: "0.34.0/05_analytics-mirror-versioned-writes",
3417
3417
  title: "Analytics CDC-mirror: version-ordered writes, tombstoned deletes, retry + repair",
3418
3418
  kind: "manual",
3419
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Un.test(e.getFullText())),
3419
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Gn.test(e.getFullText())),
3420
3420
  note: [
3421
3421
  "The analytics CDC-mirror (`mirrorTables`) now orders every write and",
3422
3422
  "retries the ones that fail. Three things to do.",
@@ -3471,7 +3471,7 @@ var b = (e, t, n) => {
3471
3471
  " VOLTRO_ANALYTICS_MIRROR_REPAIR_INTERVAL_MS (60000, 0 disables)",
3472
3472
  " VOLTRO_ANALYTICS_MIRROR_REPAIR_QUEUE_LIMIT (10000)"
3473
3473
  ].join("\n")
3474
- }), Gn = S({
3474
+ }), qn = S({
3475
3475
  version: "0.34.0",
3476
3476
  id: "0.34.0/06_origin-guard-and-trusted-proxies",
3477
3477
  title: "Cross-site protection, trusted proxies and security headers are ON by default on the api listener",
@@ -3595,7 +3595,7 @@ var b = (e, t, n) => {
3595
3595
  " a `Transfer-Encoding: chunked` body skipped it and was buffered without",
3596
3596
  " bound. No action needed; VOLTRO_MAX_RPC_BODY_BYTES still tunes it."
3597
3597
  ].join("\n")
3598
- }), Kn = S({
3598
+ }), Jn = S({
3599
3599
  version: "0.34.0",
3600
3600
  id: "0.34.0/07_incoming-webhook-declares-verification",
3601
3601
  title: "An incoming webhook with no signature scheme now refuses to boot",
@@ -3644,7 +3644,7 @@ var b = (e, t, n) => {
3644
3644
  "value — the sender holds the other half of it, so a generated one would",
3645
3645
  "authenticate nobody."
3646
3646
  ].join("\n")
3647
- }), qn = S({
3647
+ }), Yn = S({
3648
3648
  version: "0.34.0",
3649
3649
  id: "0.34.0/08_init-initialises-the-workspace",
3650
3650
  title: "`voltro init` initialises the workspace root; scaffolding is `create-project` only",
@@ -3696,20 +3696,20 @@ var b = (e, t, n) => {
3696
3696
  "all 18 of its scripts — including the `pnpm db:up` the CLI then printed as a",
3697
3697
  "next step. Run `voltro init` in the root first."
3698
3698
  ].join("\n")
3699
- }), Jn = (e, t) => (e.getProperty(t)?.asKind(y.PropertyAssignment))?.getInitializer()?.asKind(y.ObjectLiteralExpression), Yn = (e) => {
3699
+ }), Xn = (e, t) => (e.getProperty(t)?.asKind(y.PropertyAssignment))?.getInitializer()?.asKind(y.ObjectLiteralExpression), Zn = (e) => {
3700
3700
  if (e.getExpression().getText() !== "workflow") return !1;
3701
3701
  let t = e.getArguments()[0]?.asKind(y.ObjectLiteralExpression);
3702
3702
  if (t === void 0) return !1;
3703
- let n = Jn(t, "messages");
3703
+ let n = Xn(t, "messages");
3704
3704
  return n !== void 0 && n.getProperty("queries") !== void 0;
3705
- }, Xn = S({
3705
+ }, Qn = S({
3706
3706
  version: "0.34.0",
3707
3707
  id: "0.34.0/09_workflow-messages-queries-removed",
3708
3708
  title: "`workflow({ messages: { queries } })` is removed — it never had a send path",
3709
3709
  kind: "manual",
3710
3710
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
3711
3711
  let t = e.getFullText();
3712
- return !t.includes("queries") || !/workflow\s*\(/.test(t) ? !1 : e.getDescendantsOfKind(y.CallExpression).some(Yn);
3712
+ return !t.includes("queries") || !/workflow\s*\(/.test(t) ? !1 : e.getDescendantsOfKind(y.CallExpression).some(Zn);
3713
3713
  }),
3714
3714
  note: [
3715
3715
  "YOU DECLARED `messages: { queries: { … } }` ON A WORKFLOW. That channel is",
@@ -3752,7 +3752,7 @@ var b = (e, t, n) => {
3752
3752
  "in-flight runs finish on the old path after a deploy. See the Versioning",
3753
3753
  "page in the docs."
3754
3754
  ].join("\n")
3755
- }), Zn = S({
3755
+ }), $n = S({
3756
3756
  version: "0.34.0",
3757
3757
  id: "0.34.0/11_ai-flows-per-step-human-signal",
3758
3758
  title: "`HUMAN_RESPONSE_SIGNAL` removed — a human step's signal name is now per-step",
@@ -3796,23 +3796,23 @@ var b = (e, t, n) => {
3796
3796
  "per flow (`humanTimeoutMs`), per app (`aiFlowsPlugin({ humanReviewTimeoutMs })`)",
3797
3797
  "or per deploy (`VOLTRO_AI_FLOW_HUMAN_REVIEW_TIMEOUT_HOURS`). `0` = wait forever."
3798
3798
  ].join("\n")
3799
- }), Qn = /* @__PURE__ */ new Set([
3799
+ }), er = /* @__PURE__ */ new Set([
3800
3800
  "@voltro/plugin-auth",
3801
3801
  "@voltro/protocol/session",
3802
3802
  "@voltro/plugin-sso-saml"
3803
- ]), $n = /* @__PURE__ */ new Set(["issueSession", "signSession"]), er = (e) => {
3803
+ ]), tr = /* @__PURE__ */ new Set(["issueSession", "signSession"]), nr = (e) => {
3804
3804
  let t = e.getFullText();
3805
3805
  if (!/issueSession|signSession|resolveScopes|@voltro\/(plugin-auth|protocol\/session|plugin-sso-saml)/.test(t)) return !1;
3806
- for (let t of e.getImportDeclarations()) if (Qn.has(t.getModuleSpecifierValue())) return !0;
3807
- for (let t of e.getDescendantsOfKind(y.CallExpression)) if ($n.has(t.getExpression().getText())) return !0;
3806
+ for (let t of e.getImportDeclarations()) if (er.has(t.getModuleSpecifierValue())) return !0;
3807
+ for (let t of e.getDescendantsOfKind(y.CallExpression)) if (tr.has(t.getExpression().getText())) return !0;
3808
3808
  for (let t of e.getDescendantsOfKind(y.PropertyAssignment)) if (t.getName() === "resolveScopes") return !0;
3809
3809
  return !1;
3810
- }, tr = S({
3810
+ }, rr = S({
3811
3811
  version: "0.34.0",
3812
3812
  id: "0.34.0/12_session-cookie-carries-identity",
3813
3813
  title: "The session cookie carries identity only — authority resolves per request",
3814
3814
  kind: "manual",
3815
- appliesTo: ({ project: e }) => e.getSourceFiles().some(er),
3815
+ appliesTo: ({ project: e }) => e.getSourceFiles().some(nr),
3816
3816
  note: [
3817
3817
  "YOUR USERS WILL SIGN IN ONCE MORE, AND A SESSION COOKIE CAN NO LONGER",
3818
3818
  "CARRY PERMISSIONS.",
@@ -3903,12 +3903,12 @@ var b = (e, t, n) => {
3903
3903
  "not have: an authoritative resolver now overrides a token's own scope",
3904
3904
  "claim, which union-only could never do."
3905
3905
  ].join("\n")
3906
- }), nr = /\bMockEmail\b|\.email\.(sent|lastTo|clear)\b|\bSentEmail\b/, rr = S({
3906
+ }), ir = /\bMockEmail\b|\.email\.(sent|lastTo|clear)\b|\bSentEmail\b/, ar = S({
3907
3907
  version: "0.34.0",
3908
3908
  id: "0.34.0/10_testing-mail-is-a-service",
3909
3909
  title: "`ctx.email` / `MockEmail` removed — assert mail through the mail plugin",
3910
3910
  kind: "manual",
3911
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => nr.test(e.getFullText())),
3911
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => ir.test(e.getFullText())),
3912
3912
  note: [
3913
3913
  "`@voltro/testing` no longer ships `MockEmail`, and `makeTestContext()` no",
3914
3914
  "longer returns `ctx.email`. Your tests that touch it will not compile.",
@@ -3977,12 +3977,12 @@ var b = (e, t, n) => {
3977
3977
  " • `makeTestContext({ layers })` — your app's own `app.config.ts`",
3978
3978
  " `layers:` now resolve for an Effect-mode handler under test."
3979
3979
  ].join("\n")
3980
- }), ir = /from\s+['"]@voltro\/plugin-billing(?:\/[\w-]+)?['"]/, ar = S({
3980
+ }), or = /from\s+['"]@voltro\/plugin-billing(?:\/[\w-]+)?['"]/, sr = S({
3981
3981
  version: "0.34.0",
3982
3982
  id: "0.34.0/13_billing-provider-dunning",
3983
3983
  title: "Billing dunning — `BillingProvider.fetchSubscription` is required, and `plan()` now honours a grace period",
3984
3984
  kind: "manual",
3985
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => ir.test(e.getFullText())),
3985
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => or.test(e.getFullText())),
3986
3986
  note: [
3987
3987
  "BILLING GAINED A DUNNING SEQUENCE. TWO THINGS CHANGED UNDER YOU.",
3988
3988
  "",
@@ -4058,12 +4058,12 @@ var b = (e, t, n) => {
4058
4058
  "`pastDueSince` / `statusEventAt` columns ride the declarative differ — they",
4059
4059
  "are applied by `voltro db apply` and by a `voltro dev` boot, on every dialect."
4060
4060
  ].join("\n")
4061
- }), or = /from\s+['"]@voltro\/plugin-search(?:\/[\w-]+)?['"]/, sr = S({
4061
+ }), cr = /from\s+['"]@voltro\/plugin-search(?:\/[\w-]+)?['"]/, lr = S({
4062
4062
  version: "0.34.0",
4063
4063
  id: "0.34.0/14_search-memory-backend-refuses-production",
4064
4064
  title: "`plugin-search` on the in-memory backend now refuses to boot in production",
4065
4065
  kind: "manual",
4066
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => or.test(e.getFullText())),
4066
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => cr.test(e.getFullText())),
4067
4067
  note: [
4068
4068
  "THE ZERO-CONFIG SEARCH BACKEND NO LONGER BOOTS IN PRODUCTION.",
4069
4069
  "",
@@ -4132,7 +4132,7 @@ var b = (e, t, n) => {
4132
4132
  "(`ts_headline` / `snippet()` / …) that `SearchQuery` promises. Degrading",
4133
4133
  "those silently would replace one lie with another."
4134
4134
  ].join("\n")
4135
- }), cr = S({
4135
+ }), ur = S({
4136
4136
  version: "0.34.0",
4137
4137
  id: "0.34.0/15_mysql-mssql-tls-honoured",
4138
4138
  title: "mysql/mariadb and mssql connections honour ?ssl= / ?sslmode= — or refuse to boot",
@@ -4204,7 +4204,7 @@ var b = (e, t, n) => {
4204
4204
  "spins in-tick and starves the event loop. Set it only if you know nothing in",
4205
4205
  "your process does that, and set it well above their peak concurrency."
4206
4206
  ].join("\n")
4207
- }), lr = S({
4207
+ }), dr = S({
4208
4208
  version: "0.34.0",
4209
4209
  id: "0.34.0/16_declare-node-env-for-migration-commands",
4210
4210
  title: "`voltro db apply` / `voltro migrate` now treat an unset NODE_ENV as production",
@@ -4268,12 +4268,12 @@ var b = (e, t, n) => {
4268
4268
  "process environment if you want a non-production `voltro serve` without a",
4269
4269
  "built bundle. Everything downstream of the launcher does honour `.env`."
4270
4270
  ].join("\n")
4271
- }), ur = /\/(?:src\/)?pages\//, dr = /\bcacheInvalidatesOn\b/, fr = S({
4271
+ }), fr = /\/(?:src\/)?pages\//, pr = /\bcacheInvalidatesOn\b/, mr = S({
4272
4272
  version: "0.34.0",
4273
4273
  id: "0.34.0/17_isr-postgres-refuses-without-a-database",
4274
4274
  title: "The postgres ISR cache + CDC invalidator read DB_URL, and no longer fall back silently",
4275
4275
  kind: "manual",
4276
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => dr.test(e.getFullText()) || ur.test(e.getFilePath())),
4276
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => pr.test(e.getFullText()) || fr.test(e.getFilePath())),
4277
4277
  note: [
4278
4278
  "YOUR WEB PROCESS MAY HAVE BEEN USING THE MEMORY ISR CACHE ALL ALONG.",
4279
4279
  "",
@@ -4318,12 +4318,12 @@ var b = (e, t, n) => {
4318
4318
  " until their `revalidate` window expires. Give the web process a `DB_URL`",
4319
4319
  " or remove the declaration."
4320
4320
  ].join("\n")
4321
- }), pr = /\.migration\.ts$/, mr = S({
4321
+ }), hr = /\.migration\.ts$/, gr = S({
4322
4322
  version: "0.34.0",
4323
4323
  id: "0.34.0/18_serve-refuses-pending-file-migrations",
4324
4324
  title: "`voltro serve` refuses to boot with pending file-based migrations",
4325
4325
  kind: "manual",
4326
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => pr.test(e.getFilePath())),
4326
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => hr.test(e.getFilePath())),
4327
4327
  note: [
4328
4328
  "YOUR DEPLOY MUST RUN `migrations/*.migration.ts` BEFORE `voltro serve`.",
4329
4329
  "",
@@ -4366,11 +4366,11 @@ var b = (e, t, n) => {
4366
4366
  "fingerprint check — it is the one switch for \"no boot-time schema checks\",",
4367
4367
  "and it now covers both."
4368
4368
  ].join("\n")
4369
- }), hr = /* @__PURE__ */ new Set([
4369
+ }), _r = /* @__PURE__ */ new Set([
4370
4370
  "@voltro/plugin-auth",
4371
4371
  "@voltro/plugin-auth/schema",
4372
4372
  "@voltro/plugin-auth/plugin"
4373
- ]), gr = /* @__PURE__ */ new Set([
4373
+ ]), vr = /* @__PURE__ */ new Set([
4374
4374
  "UserStore",
4375
4375
  "authTables",
4376
4376
  "SendEmail",
@@ -4378,20 +4378,20 @@ var b = (e, t, n) => {
4378
4378
  "memoryUserStore",
4379
4379
  "postgresUserStore",
4380
4380
  "authRoutesPlugin"
4381
- ]), _r = (e) => {
4381
+ ]), yr = (e) => {
4382
4382
  if (!e.getFullText().includes("@voltro/plugin-auth")) return !1;
4383
- for (let t of e.getImportDeclarations()) if (hr.has(t.getModuleSpecifierValue())) {
4384
- for (let e of t.getNamedImports()) if (gr.has(e.getName())) return !0;
4383
+ for (let t of e.getImportDeclarations()) if (_r.has(t.getModuleSpecifierValue())) {
4384
+ for (let e of t.getNamedImports()) if (vr.has(e.getName())) return !0;
4385
4385
  if (t.getNamespaceImport() !== void 0) return !0;
4386
4386
  }
4387
4387
  for (let t of e.getDescendantsOfKind(y.TypeReference)) if (t.getTypeName().getText() === "UserStore") return !0;
4388
4388
  return !1;
4389
- }, vr = S({
4389
+ }, br = S({
4390
4390
  version: "0.34.0",
4391
4391
  id: "0.34.0/20_user-store-auth-feature-methods",
4392
4392
  title: "UserStore gained the email-verification, invitation and impersonation methods",
4393
4393
  kind: "manual",
4394
- appliesTo: ({ project: e }) => e.getSourceFiles().some(_r),
4394
+ appliesTo: ({ project: e }) => e.getSourceFiles().some(yr),
4395
4395
  note: [
4396
4396
  "IF YOU USE memoryUserStore OR postgresUserStore, THERE IS NOTHING TO DO.",
4397
4397
  "Both already implement everything below. Read on only if you wrote your",
@@ -4471,26 +4471,26 @@ var b = (e, t, n) => {
4471
4471
  " is the difference between \"new signups must confirm\" and \"everyone is",
4472
4472
  " locked out until they check their mail\"."
4473
4473
  ].join("\n")
4474
- }), U = /* @__PURE__ */ new Set([
4474
+ }), V = /* @__PURE__ */ new Set([
4475
4475
  "bindConnectionSubject",
4476
4476
  "getConnectionSubject",
4477
4477
  "unbindConnectionSubject",
4478
4478
  "onBindConnectionSubject",
4479
4479
  "connectionSubjectsSnapshot"
4480
- ]), yr = (e) => {
4480
+ ]), xr = (e) => {
4481
4481
  let t = e.getFullText();
4482
4482
  if (!/ConnectionSubject|connectionSubjectsSnapshot|rebind/.test(t)) return !1;
4483
- for (let t of e.getDescendantsOfKind(y.CallExpression)) if (U.has(t.getExpression().getText())) return !0;
4484
- for (let t of e.getImportDeclarations()) for (let e of t.getNamedImports()) if (U.has(e.getName())) return !0;
4483
+ for (let t of e.getDescendantsOfKind(y.CallExpression)) if (V.has(t.getExpression().getText())) return !0;
4484
+ for (let t of e.getImportDeclarations()) for (let e of t.getNamedImports()) if (V.has(e.getName())) return !0;
4485
4485
  for (let t of e.getDescendantsOfKind(y.PropertyAssignment)) if (t.getName() === "rebind") return !0;
4486
4486
  for (let t of e.getDescendantsOfKind(y.ShorthandPropertyAssignment)) if (t.getName() === "rebind") return !0;
4487
4487
  return !1;
4488
- }, br = S({
4488
+ }, Sr = S({
4489
4489
  version: "0.34.0",
4490
4490
  id: "0.34.0/19_connection-override-carries-a-credential",
4491
4491
  title: "Soft re-auth presents a credential — it no longer hands the server a Subject",
4492
4492
  kind: "manual",
4493
- appliesTo: ({ project: e }) => e.getSourceFiles().some(yr),
4493
+ appliesTo: ({ project: e }) => e.getSourceFiles().some(xr),
4494
4494
  note: [
4495
4495
  "A LIVE CONNECTION CAN NO LONGER BE HANDED A SUBJECT. IT PRESENTS A",
4496
4496
  "CREDENTIAL, AND THE SERVER RESOLVES IT LIKE ANY OTHER REQUEST.",
@@ -4575,19 +4575,19 @@ var b = (e, t, n) => {
4575
4575
  "it behaves identically under `voltro dev` and `voltro serve`, because both",
4576
4576
  "now build the middleware from one function (`makeAuthMiddlewareLayers`)."
4577
4577
  ].join("\n")
4578
- }), xr = (e) => {
4578
+ }), Cr = (e) => {
4579
4579
  if (/\.workflow(\.server)?\.tsx?$/.test(e.getBaseName())) return !0;
4580
4580
  let t = e.getFullText();
4581
4581
  if (!/resolveScopes|defineWorkflow|ctx\.workflows/.test(t)) return !1;
4582
4582
  for (let t of e.getDescendantsOfKind(y.PropertyAssignment)) if (t.getName() === "resolveScopes") return !0;
4583
4583
  for (let t of e.getDescendantsOfKind(y.CallExpression)) if (t.getExpression().getText() === "defineWorkflow") return !0;
4584
4584
  return !1;
4585
- }, Sr = S({
4585
+ }, wr = S({
4586
4586
  version: "0.34.0",
4587
4587
  id: "0.34.0/20_workflow-authority-resolves-at-resume",
4588
4588
  title: "A resumed workflow re-resolves its caller's authority instead of restoring it",
4589
4589
  kind: "manual",
4590
- appliesTo: ({ project: e }) => e.getSourceFiles().some(xr),
4590
+ appliesTo: ({ project: e }) => e.getSourceFiles().some(Cr),
4591
4591
  note: [
4592
4592
  "A WORKFLOW NO LONGER CARRIES ITS CALLER'S PERMISSIONS FORWARD. IT CARRIES",
4593
4593
  "THEIR IDENTITY, AND ASKS YOUR APP WHAT THEY MAY DO WHEN IT RUNS.",
@@ -4652,7 +4652,7 @@ var b = (e, t, n) => {
4652
4652
  " contain scopes and are stripped on READ — a resumed run cannot re-assert",
4653
4653
  " authority the old build persisted."
4654
4654
  ].join("\n")
4655
- }), Cr = /* @__PURE__ */ new Set([
4655
+ }), Tr = /* @__PURE__ */ new Set([
4656
4656
  "listTag",
4657
4657
  "createTag",
4658
4658
  "updateTag",
@@ -4660,21 +4660,21 @@ var b = (e, t, n) => {
4660
4660
  "createScope",
4661
4661
  "writeScope",
4662
4662
  "deleteScope"
4663
- ]), wr = (e) => {
4663
+ ]), Er = (e) => {
4664
4664
  let t = e.getFullText();
4665
4665
  if (!/EntityAdminSpec|deriveEntityAdmins|Tag\b|Scope\b/.test(t)) return !1;
4666
4666
  for (let t of e.getImportDeclarations()) for (let e of t.getNamedImports()) {
4667
4667
  let t = e.getName();
4668
4668
  if (t === "EntityAdminSpec" || t === "deriveEntityAdmins") return !0;
4669
4669
  }
4670
- for (let t of e.getDescendantsOfKind(y.PropertyAccessExpression)) if (Cr.has(t.getName())) return !0;
4670
+ for (let t of e.getDescendantsOfKind(y.PropertyAccessExpression)) if (Tr.has(t.getName())) return !0;
4671
4671
  return !1;
4672
- }, Tr = S({
4672
+ }, Dr = S({
4673
4673
  version: "0.34.0",
4674
4674
  id: "0.34.0/21_admin-gates-on-declared-access",
4675
4675
  title: "The derived admin gates on the api's DECLARED access — the invented `<table>:create` scopes are gone",
4676
4676
  kind: "manual",
4677
- appliesTo: ({ project: e }) => e.getSourceFiles().some(wr),
4677
+ appliesTo: ({ project: e }) => e.getSourceFiles().some(Er),
4678
4678
  note: [
4679
4679
  "YOUR ADMIN WAS GATING ON SCOPE STRINGS NOTHING PRODUCED.",
4680
4680
  "",
@@ -4764,14 +4764,14 @@ var b = (e, t, n) => {
4764
4764
  "from \"undeclared\", so an intentionally public action rendered as forbidden",
4765
4765
  "to everybody."
4766
4766
  ].join("\n")
4767
- }), Er = /\b(useMutation|useAction|useWorkflow|useWorkflowSignal|useWorkflowUpdate|useUpload)\b/, Dr = /FiberFailure|Cause\.squash|squashWith/, Or = S({
4767
+ }), Or = /\b(useMutation|useAction|useWorkflow|useWorkflowSignal|useWorkflowUpdate|useUpload)\b/, kr = /FiberFailure|Cause\.squash|squashWith/, Ar = S({
4768
4768
  version: "0.34.0",
4769
4769
  id: "0.34.0/22_write-rejections-carry-the-typed-error",
4770
4770
  title: "A rejected mutate/run/signal/upload carries the typed error, not a FiberFailure",
4771
4771
  kind: "manual",
4772
4772
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
4773
4773
  let t = e.getFullText();
4774
- return Er.test(t) || Dr.test(t);
4774
+ return Or.test(t) || kr.test(t);
4775
4775
  }),
4776
4776
  note: [
4777
4777
  "WHAT CHANGED. A write hook that rejects now rejects with the typed error",
@@ -4824,12 +4824,12 @@ var b = (e, t, n) => {
4824
4824
  "contract, reject from a real rpc client, or assert on the value your",
4825
4825
  "component branches on rather than on the literal the test wrote."
4826
4826
  ].join("\n")
4827
- }), kr = /@voltro\/plugin-sso-saml|samlSsoPlugin/, Ar = S({
4827
+ }), jr = /@voltro\/plugin-sso-saml|samlSsoPlugin/, Mr = S({
4828
4828
  version: "0.34.0",
4829
4829
  id: "0.34.0/23_saml-signature-and-replay-defaults",
4830
4830
  title: "SAML: response-signature requirement relaxed + surfaced; replay protection ON by default",
4831
4831
  kind: "manual",
4832
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => kr.test(e.getFullText())),
4832
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => jr.test(e.getFullText())),
4833
4833
  note: [
4834
4834
  "Two defaults in `samlSsoPlugin` moved. Read both — they interact.",
4835
4835
  "",
@@ -4920,24 +4920,24 @@ var b = (e, t, n) => {
4920
4920
  "request, and the envelope is unauthenticated. If you must run unsolicited,",
4921
4921
  "set `wantAuthnResponseSigned: true`."
4922
4922
  ].join("\n")
4923
- }), jr = /\b(signPayload|verifySignature)\s*\(/, Mr = S({
4923
+ }), Nr = /\b(signPayload|verifySignature)\s*\(/, Pr = S({
4924
4924
  version: "0.34.0",
4925
4925
  id: "0.34.0/24_webhook-signing-renders-headers",
4926
4926
  title: "Webhook signing: `signPayload`/`verifySignature` → `signRequest`/`verifyRequest`",
4927
4927
  kind: "manual",
4928
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => jr.test(e.getFullText())),
4928
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Nr.test(e.getFullText())),
4929
4929
  note: "A webhook signature scheme now renders a header MAP rather than one header,\nand verifies against the request's whole header map.\n\n - signPayload(scheme, rawBody, secret)\n → signRequest(scheme, { rawBody, secret, messageId })\n returns { headers } instead of { headerName, headerValue }\n\n - verifySignature(scheme, rawBody, secret, headerValue)\n → verifyRequest(scheme, { rawBody, secret, headers })\n\nRewrite each call site:\n\n // before\n const { headerName, headerValue } = signPayload(scheme, body, secret)\n await fetch(url, { headers: { [headerName]: headerValue }, body })\n\n // after\n const { headers } = signRequest(scheme, { rawBody: body, secret, messageId: deliveryId })\n await fetch(url, { headers, body })\n\nWHY `messageId` IS REQUIRED, AND WHY THIS IS NOT AUTOMATED:\n\n Standard Webhooks signs over `<messageId>.<timestamp>.<body>` and sends the\n id as `webhook-id` — which is also the value the spec tells consumers to\n use as their IDEMPOTENCY KEY. Pass the id that identifies the message to\n THAT receiver, stable across retries (the framework passes its delivery\n id). A fresh `randomUUID()` per attempt compiles and reads fine, and\n quietly makes every retry look like a new message to the receiver.\n\nTHE DEFAULT OUTGOING SCHEME CHANGED:\n\n `defaultOutgoingSignature()` now returns Standard Webhooks v1.0.0 —\n `webhook-id` / `webhook-timestamp` / `webhook-signature: v1,<base64>` — so\n a NEW subscription signs to an interoperable spec every conformant\n consumer library already verifies. Existing target rows are untouched:\n each stores the scheme it was created with.\n\n Its key serialization differs too: `whsec_` + base64 of 24..64 random\n bytes, HMAC-ing the DECODED bytes. `subscribe()` mints the right shape\n automatically; passing your own hex secret for a standard-webhooks target\n is REFUSED at subscribe rather than producing signatures no consumer\n accepts.\n\n To keep the previous house format on a new subscription, pass it\n explicitly: `webhooks.subscribe({ …, signing: genericHmacSignature() })`\n — the same shape as before, under a name that says it is a choice.\n\nALSO IN THIS RELEASE, no code change needed:\n\n - a 3xx response is a failure and redirects are no longer FOLLOWED (they\n were, by fetch's default — which also walked past the SSRF guard);\n - a `410 Gone` disables the target immediately, whatever the\n consecutive-failure threshold says;\n - each attempt has a 30s wire timeout (`VOLTRO_WEBHOOK_TIMEOUT_MS`, or\n `timeoutMs`). There was none, so a receiver that accepted the connection\n and never answered held the delivery workflow open indefinitely.\n\nAnd `slackSignature()` is now a REAL verifier. It shipped as a stub that\nreturned false unconditionally, workable only through a header-packing\nconvention in the route mounter. A scheme now receives the whole header map\nand reads `x-slack-request-timestamp` itself."
4930
- }), Nr = /from\s+['"]@voltro\/plugin-presence(?:\/[a-z]+)?['"]/, Pr = /\b(lastSeen|presenceTable|memoryPresenceStore|isOnline|filterOnline|staleKeys|PresenceStore|PresenceEntry|PresenceTracker)\b/, Fr = /_voltro_presence/, Ir = S({
4930
+ }), Fr = /from\s+['"]@voltro\/plugin-presence(?:\/[a-z]+)?['"]/, Ir = /\b(lastSeen|presenceTable|memoryPresenceStore|isOnline|filterOnline|staleKeys|PresenceStore|PresenceEntry|PresenceTracker)\b/, Lr = /_voltro_presence/, Rr = S({
4931
4931
  version: "0.34.0",
4932
4932
  id: "0.34.0/25_presence-has-no-table",
4933
4933
  title: "Presence: `_voltro_presence` is gone, and so is `lastSeen` on the roster",
4934
4934
  kind: "manual",
4935
4935
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
4936
4936
  let t = e.getFullText();
4937
- return Fr.test(t) || Nr.test(t) && Pr.test(t);
4937
+ return Lr.test(t) || Fr.test(t) && Ir.test(t);
4938
4938
  }),
4939
4939
  note: "@voltro/plugin-presence no longer declares a table. Four things moved.\n\n1. A roster member is now { key, meta } — there is NO `lastSeen`.\n\n It was the OWNING replica's clock, so on more than one replica \"active 3\n minutes ago\" rendered from it was wrong by the skew between two pods, with\n nothing to say so. It was also the only field a plain heartbeat changed,\n which is what made the roster push on every beat instead of on every change.\n\n // before\n members.map((m) => `${m.key} — ${ago(m.lastSeen)}`)\n // after: put anything time-shaped you need into meta\n usePresence(channel, { meta: { joinedAt: Date.now() } })\n members.map((m) => `${m.key} — ${ago(m.meta?.joinedAt)}`)\n\n2. `PresenceTracker.track()` and `.untrack()` return { delta, changed }.\n\n // before\n bus.announce(tracker.track({ channel, tenantId, key }))\n // after — announce ALWAYS (a peer's sweep needs the liveness signal),\n // push only on a change\n const write = tracker.track({ channel, tenantId, key })\n bus.announce(write.delta)\n if (write.changed) publishReactivity(store, presenceRoster)\n\n Do not blind-append `.delta` and move on: dropping `changed` restores the\n per-heartbeat push this release removed, and nothing will report it.\n\n `attachPresenceBus` also takes an optional `onRosterChanged` now — call it\n if you drive the bus yourself, or a peer's join and a peer's death will\n update your tracker and push nobody.\n\n3. These exports are DELETED, with no replacement:\n\n presenceTable, PresenceStore, PresenceEntry,\n memoryPresenceStore, isOnline, filterOnline, staleKeys\n\n They were the table era's read model — an abstraction over rows plus the\n staleness filter a row needed because it outlived the client that wrote it.\n Presence has neither. Reading the roster is `presence.list` / `usePresence`;\n the staleness sweep is the plugin's own and needs nothing from you.\n\n4. If your `source:` names '_voltro_presence' as a string, point it at the\n channel object instead:\n\n import { presenceRoster } from '@voltro/plugin-presence'\n defineQuery({ name: 'room.summary', source: presenceRoster, ... })\n\n And to push it yourself:\n\n import { publishReactivity } from '@voltro/protocol'\n publishReactivity(ctx.store, presenceRoster)\n\nTHE TABLE IS NOT DROPPED FOR YOU. The declarative differ never plans a drop for\na framework table no app declares — deliberately, so a live `_voltro_*` table is\nnever destroyed by an app that simply does not know about it. So an existing\n`_voltro_presence` stays, empty, until you remove it:\n\n DROP TABLE IF EXISTS _voltro_presence;\n\nIt holds no data anyone can use: nothing has written a row to it since presence\nmoved into memory."
4940
- }), Lr = (e) => {
4940
+ }), zr = (e) => {
4941
4941
  let t = e.getArguments()[0];
4942
4942
  if (t === void 0 || !t.isKind(y.ObjectLiteralExpression)) return /* @__PURE__ */ new Set();
4943
4943
  let n = /* @__PURE__ */ new Set();
@@ -4946,32 +4946,32 @@ var b = (e, t, n) => {
4946
4946
  t !== void 0 && n.add(t);
4947
4947
  }
4948
4948
  return n;
4949
- }, Rr = (e, t) => /defineEvent\s*\(/.test(e) ? t.some((e) => {
4949
+ }, Br = (e, t) => /defineEvent\s*\(/.test(e) ? t.some((e) => {
4950
4950
  if (e.getExpression().getText() !== "defineEvent") return !1;
4951
- let t = Lr(e);
4951
+ let t = zr(e);
4952
4952
  return !t.has("guards") && !t.has("openAccess");
4953
- }) : !1, zr = S({
4953
+ }) : !1, Vr = S({
4954
4954
  version: "0.35.0",
4955
4955
  id: "0.35.0/01_event-access-decision",
4956
4956
  title: "Every declared event decides who may listen (`guards:` or `openAccess:`)",
4957
4957
  kind: "manual",
4958
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Rr(e.getFullText(), e.getDescendantsOfKind(y.CallExpression))),
4958
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Br(e.getFullText(), e.getDescendantsOfKind(y.CallExpression))),
4959
4959
  note: (/* @__PURE__ */ "YOUR APP WILL NOT BOOT UNTIL EVERY DECLARED EVENT DECIDES WHO MAY LISTEN.(This closes the sibling of 0.34.0's procedure gate: `defineEvent`'s `guards:`(was optional and enforcement skipped an empty list, so an event with no(decision was silently subscribable by ANY authenticated session that could(open the socket.((WHAT TO DO, IN THIS ORDER:((1) LIST THEM. `voltro doctor` prints every undecided event with its tag and( file — the same set, from the same function, that the boot refuses on.( `voltro doctor --json` carries it as `accessDecisions.undecided` for CI.((2) DECIDE EACH ONE. There are exactly two answers and they are not the same( claim:(( guards: [{ scope: 'display:read' }] a subscriber must hold a scope( openAccess: 'public scoreboard' anyone may listen — and why(( `openAccess` takes a REASON, not a boolean. It is what a reviewer reads( later, and it is what makes \"we decided this is open\" distinguishable( from \"nobody looked\".((3) DO NOT RUBBER-STAMP. Reaching for a scope every caller already holds( satisfies the gate, reads as protection, and enforces nothing. If the( event is open, say `openAccess`. If it should not be open, this gate just( found a real hole — an event often carries exactly the data its table( guards behind a scoped query.((IF YOU NEED TO SHIP FIRST. The same field that covers procedures covers(events, in `app.config.ts`:(( export default { security: { defaultDeny: false } }((That restores the old default-allow for the WHOLE app, in one place a(reviewer can see. There is no env var for it, on purpose. `voltro doctor`(keeps listing the undecided events while it is off, marked advisory.((NOT AFFECTED: apps already running `security: { defaultDeny: false }`, and(events your PLUGINS declare — the gate reads your app's own discovered(`*.event.ts` files only.".split("(")).join("\n")
4960
- }), Br = /\brouteHttp\s*\(/, Vr = S({
4960
+ }), Hr = /\brouteHttp\s*\(/, Ur = S({
4961
4961
  version: "0.34.0",
4962
4962
  id: "0.34.0/26_route-http-is-async",
4963
4963
  title: "`routeHttp` returns a Promise",
4964
4964
  kind: "manual",
4965
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Br.test(e.getFullText())),
4965
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Hr.test(e.getFullText())),
4966
4966
  note: "`routeHttp` (@voltro/mcp) is async now:\n\n routeHttp(options): HttpOutcome // before\n routeHttp(options): Promise<HttpOutcome> // after\n\nAwait it, and make the enclosing function async if it is not already:\n\n // before\n const outcome = routeHttp({ method, url, body, tools })\n if (outcome.kind === 'json') respond(outcome)\n\n // after\n const outcome = await routeHttp({ method, url, body, tools })\n if (outcome.kind === 'json') respond(outcome)\n\nWhy it moved: `tools/list` now folds in the app's agent tools and `tools/call`\nexecutes one, so two of the methods reach the app. The rest still resolve without\ntouching anything, and the function is still pure in the sense that matters — it\nbinds no socket, and a test supplies a `live` double.\n\nIf you use the shipped `serveHttp` transport there is nothing to do; it already\nawaits."
4967
- }), Hr = /@voltro\/plugin-(billing|governance|storage)/, Ur = /* @__PURE__ */ RegExp("\\b(billing\\.(startCheckout|portalUrl|previewChange|changePlan|changeSeats|invoices|reportUsage)|governance\\.(export|erase)|storage\\.(mintUploadUrl|ingestUrl|listRefs))\\b"), Wr = /\bdefinePluginRoute\s*\(|\broutes\s*:\s*\[/, Gr = S({
4967
+ }), Wr = /@voltro\/plugin-(billing|governance|storage)/, Gr = /* @__PURE__ */ RegExp("\\b(billing\\.(startCheckout|portalUrl|previewChange|changePlan|changeSeats|invoices|reportUsage)|governance\\.(export|erase)|storage\\.(mintUploadUrl|ingestUrl|listRefs))\\b"), Kr = /\bdefinePluginRoute\s*\(|\broutes\s*:\s*\[/, qr = S({
4968
4968
  version: "0.35.0",
4969
4969
  id: "0.35.0/02_plugin-procedures-carry-access-decisions",
4970
4970
  title: "First-party plugin procedures carry access decisions; twelve now require a scope",
4971
4971
  kind: "manual",
4972
4972
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
4973
4973
  let t = e.getFullText();
4974
- return Hr.test(t) || Ur.test(t) || Wr.test(t) && /VoltroPlugin|definePlugin/.test(t);
4974
+ return Wr.test(t) || Gr.test(t) || Kr.test(t) && /VoltroPlugin|definePlugin/.test(t);
4975
4975
  }),
4976
4976
  note: [
4977
4977
  "Every first-party plugin rpc route now declares an access decision, and the",
@@ -5036,12 +5036,12 @@ var b = (e, t, n) => {
5036
5036
  "`openAccess` with the reason each is safe (self-scoped rows, signed",
5037
5037
  "subject-bound tickets, per-object grants), and behave exactly as before."
5038
5038
  ].join("\n")
5039
- }), Kr = /AnalyticsMirrorImpl/, qr = S({
5039
+ }), Jr = /AnalyticsMirrorImpl/, Yr = S({
5040
5040
  version: "0.35.0",
5041
5041
  id: "0.35.0/03_analytics-mirror-max-version",
5042
5042
  title: "Custom analytics mirror sinks answer `maxVersion` (fleet-scope seed read)",
5043
5043
  kind: "manual",
5044
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Kr.test(e.getFullText())),
5044
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Jr.test(e.getFullText())),
5045
5045
  note: [
5046
5046
  "The analytics CDC-mirror now derives its version from the CHANGE under",
5047
5047
  "`changeScope: 'fleet'` (postgres CDC, mysql binlog): warehouse baseline +",
@@ -5066,44 +5066,44 @@ var b = (e, t, n) => {
5066
5066
  "",
5067
5067
  "The read is issued at most once per key per process, off the commit path."
5068
5068
  ].join("\n")
5069
- }), Jr = (e) => /RunStepStatus/.test(e) || /['"]succeeded['"]/.test(e) && /['"]waiting['"]/.test(e) && /RunStep|runStep|flow/i.test(e), Yr = S({
5069
+ }), Xr = (e) => /RunStepStatus/.test(e) || /['"]succeeded['"]/.test(e) && /['"]waiting['"]/.test(e) && /RunStep|runStep|flow/i.test(e), Zr = S({
5070
5070
  version: "0.35.0",
5071
5071
  id: "0.35.0/04_flow-run-step-skipped",
5072
5072
  title: "A flow run step can now be 'skipped' — handle it where you render a run timeline",
5073
5073
  kind: "manual",
5074
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Jr(e.getFullText())),
5074
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => Xr(e.getFullText())),
5075
5075
  note: (/* @__PURE__ */ "A FLOW RUN STEP CAN NOW BE 'skipped'.((`when:` on a flow step gates it on a prior value, and a step whose condition(is false is SKIPPED rather than run. That is a sixth member of(`RunStepStatus`, so an exhaustive switch over it no longer compiles, and a(lookup keyed by status now has a hole.((WHAT TO DO:((1) FIND IT. Anywhere you render or branch on a run step status — a timeline( component, a status badge map, a progress calculation.((2) DECIDE WHAT A SKIPPED STEP LOOKS LIKE. It is NOT a failure and NOT a( success: it did not run, on purpose, and it produced no output. The( step carries `skipReason` — the rendered condition, e.g.( `{{mode}} equals \"full\"` — so the timeline can say WHY.((3) DO NOT DEFAULT IT TO INVISIBLE. Dropping the row compiles and reads fine( in review, and it reproduces exactly the problem `skipReason` exists to( prevent: a step that vanished is indistinguishable from a step nobody( declared, which is the first thing a user reports as a bug.((A PROGRESS COUNT probably needs a second look too: `succeeded / total` now(under-reports a completed run that skipped a step. Counting(`succeeded + skipped` against the total is usually what was meant.((If your app does not render a flow timeline, there is nothing to do — this(note fires on any file that names the status type or its literals.".split("(")).join("\n")
5076
- }), Xr = S({
5076
+ }), Qr = S({
5077
5077
  version: "0.35.0",
5078
5078
  id: "0.35.0/05_declared-schema-drops-runtime-flags",
5079
5079
  title: "The declared schema no longer reads `CDC` / `VOLTRO_UNDO` / `VOLTRO_TRACING_PERSIST`",
5080
5080
  kind: "manual",
5081
5081
  appliesTo: () => !0,
5082
5082
  note: (/* @__PURE__ */ "The set of framework tables your app DECLARES is hashed into the schema(fingerprint. A pre-deploy `voltro db apply` records that hash; every serving(container recomputes it and refuses to boot if it differs. Until this release(three RUNTIME flags fed into that set:(( CDC=0 removed `_voltro_cdc_offsets`( VOLTRO_UNDO=on added `_voltro_undo_log`( VOLTRO_TRACING_PERSIST=all added `_voltro_traces`((All three read as pure runtime knobs, so they tend to live on the PODS and(not on the pre-upgrade migrate Job — which is a green migrate followed by(every pod in CrashLoopBackOff. This was reported against a Helm deployment(where `CDC: \"0\"` was in all three overlays' pod blocks and none of their(jobs; it had been latent for months and would have fired on the next deploy.((WHAT YOU MUST DO — only if you set one of these to turn a table ON in(production:(( * `VOLTRO_UNDO=on` in production → add to app.config.ts:( export default { schema: { undo: true }, … }( * `VOLTRO_TRACING_PERSIST` keeping trace history in production → add:( export default { schema: { traces: true }, … }(( Without the declaration, `voltro serve` now REFUSES to boot and names the( field. That refusal is the point: before, the same configuration either( wrote to a table nobody created or produced a fingerprint the migrate job( could not reproduce.(( Turning capture OFF still needs no declaration and never will — a declared( table nobody writes to is harmless. Only turning it ON is a schema claim.((WHAT HAPPENS WITHOUT ANY ACTION:(( * On mariadb or mssql you will see ONE additive `create-table` in your next( plan: `_voltro_cdc_offsets` is now declared by the DIALECT rather than by( `CDC`, so it exists whether or not that process drives CDC. It is an( offsets table — a handful of rows — and the alternative was leaving a( runtime flag able to split your fleet.( * On postgres/sqlite nothing changes: those dialects have no offsets table.((AND ONE THING WORTH DOING ANYWAY: if you are upgrading a deployment that has(a separate migrate job, diff that job's `env:` against your pods' once. The(framework can now guarantee its OWN tables do not depend on a runtime flag;(it cannot make the same guarantee for a plugin's `extendSchema.tables`, which(is app code and may read anything. A `prod-mismatch` refusal now prints which(tables this process decided and from which input, so the comparison is quick.".split("(")).join("\n")
5083
- }), W = "session_expired", Zr = S({
5083
+ }), H = "session_expired", $r = S({
5084
5084
  version: "0.35.1",
5085
5085
  id: "0.35.1/01_unauthorized-replaces-session-expired",
5086
5086
  title: "A 401 is `code: 'unauthorized'`; the vault's own failure is `'credential_unusable'`",
5087
5087
  kind: "transform",
5088
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => e.getFullText().includes(W)),
5088
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => e.getFullText().includes(H)),
5089
5089
  transform: ({ project: e, log: t }) => {
5090
5090
  let n = [];
5091
5091
  for (let t of e.getSourceFiles()) {
5092
- if (!t.getFullText().includes(W)) continue;
5092
+ if (!t.getFullText().includes(H)) continue;
5093
5093
  let e = !1;
5094
- for (let n of t.getDescendantsOfKind(11)) n.getLiteralValue() === W && (n.setLiteralValue("unauthorized"), e = !0);
5094
+ for (let n of t.getDescendantsOfKind(11)) n.getLiteralValue() === H && (n.setLiteralValue("unauthorized"), e = !0);
5095
5095
  e && n.push(t.getFilePath());
5096
5096
  }
5097
- n.length !== 0 && t(`rewrote '${W}' to 'unauthorized' in ${n.length} file(s).\n A 401 now means only "the credential was refused" — expired, revoked, wrong\n scope and MALFORMED all produce that status, and the old name asserted the\n first one. If a rewritten branch was meant to catch a credential your\n CONNECTION VAULT could not produce (no grant, revoked grant, failed refresh),\n change it to 'credential_unusable' — that is the code the vault raises, and it\n is the one where re-auth is genuinely the right action.\n A health check that logs the user out on this code should read 'unauthorized'\n as "ask again", not as "the session is gone".\n` + n.map((e) => ` ${e}`).join("\n"));
5097
+ n.length !== 0 && t(`rewrote '${H}' to 'unauthorized' in ${n.length} file(s).\n A 401 now means only "the credential was refused" — expired, revoked, wrong\n scope and MALFORMED all produce that status, and the old name asserted the\n first one. If a rewritten branch was meant to catch a credential your\n CONNECTION VAULT could not produce (no grant, revoked grant, failed refresh),\n change it to 'credential_unusable' — that is the code the vault raises, and it\n is the one where re-auth is genuinely the right action.\n A health check that logs the user out on this code should read 'unauthorized'\n as "ask again", not as "the session is gone".\n` + n.map((e) => ` ${e}`).join("\n"));
5098
5098
  }
5099
- }), Qr = /\(\s*\{[^}]*\.\.\./, $r = /\bquery\??\.?\(\s*['"`]/, ei = S({
5099
+ }), ei = /\(\s*\{[^}]*\.\.\./, ti = /\bquery\??\.?\(\s*['"`]/, ni = S({
5100
5100
  version: "0.37.0",
5101
5101
  id: "0.37.0/01_procedure-input-rejects-undeclared-fields",
5102
5102
  title: "a procedure input rejects a field it does not declare (it used to drop it)",
5103
5103
  kind: "manual",
5104
5104
  appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
5105
5105
  let t = e.getFullText();
5106
- return Qr.test(t) || $r.test(t) || C("query").test(t);
5106
+ return ei.test(t) || ti.test(t) || C("query").test(t);
5107
5107
  }),
5108
5108
  note: [
5109
5109
  "A procedure call whose input carries a field the schema does not declare",
@@ -5165,33 +5165,33 @@ var b = (e, t, n) => {
5165
5165
  "two, the only safe direction is to refuse — and a warning would have to be",
5166
5166
  "read by someone, in a log, after the wrong rows were already served."
5167
5167
  ].join("\n")
5168
- }), G = "@voltro/plugin-auth", K = "@voltro/protocol", q = "IMPERSONATION_METADATA_KEY", ti = S({
5168
+ }), U = "@voltro/plugin-auth", W = "@voltro/protocol", G = "IMPERSONATION_METADATA_KEY", ri = S({
5169
5169
  version: "0.38.0",
5170
5170
  id: "0.38.0/01_impersonation-key-in-protocol",
5171
- title: `\`${q}\` is imported from @voltro/protocol`,
5171
+ title: `\`${G}\` is imported from @voltro/protocol`,
5172
5172
  kind: "transform",
5173
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => e.getImportDeclarations().some((e) => e.getModuleSpecifierValue() === G && e.getNamedImports().some((e) => e.getName() === q))),
5173
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => e.getImportDeclarations().some((e) => e.getModuleSpecifierValue() === U && e.getNamedImports().some((e) => e.getName() === G))),
5174
5174
  transform: ({ project: e, log: t }) => {
5175
5175
  let n = 0;
5176
5176
  for (let t of e.getSourceFiles()) for (let e of t.getImportDeclarations()) {
5177
- if (e.getModuleSpecifierValue() !== G) continue;
5178
- let r = e.getNamedImports().find((e) => e.getName() === q);
5177
+ if (e.getModuleSpecifierValue() !== U) continue;
5178
+ let r = e.getNamedImports().find((e) => e.getName() === G);
5179
5179
  if (r === void 0) continue;
5180
5180
  let i = r.getAliasNode()?.getText(), a = e.isTypeOnly() || r.isTypeOnly();
5181
5181
  r.remove();
5182
- let o = t.getImportDeclarations().find((e) => e.getModuleSpecifierValue() === K && e.isTypeOnly() === a), s = {
5183
- name: q,
5182
+ let o = t.getImportDeclarations().find((e) => e.getModuleSpecifierValue() === W && e.isTypeOnly() === a), s = {
5183
+ name: G,
5184
5184
  ...i === void 0 ? {} : { alias: i }
5185
5185
  };
5186
5186
  o === void 0 ? t.addImportDeclaration({
5187
- moduleSpecifier: K,
5187
+ moduleSpecifier: W,
5188
5188
  isTypeOnly: a,
5189
5189
  namedImports: [s]
5190
5190
  }) : o.addNamedImport(s), e.getNamedImports().length === 0 && e.getDefaultImport() === void 0 && e.getNamespaceImport() === void 0 && e.remove(), n += 1;
5191
5191
  }
5192
- n > 0 && t(`${q}: ${n} import(s) repointed to ${K}`);
5192
+ n > 0 && t(`${G}: ${n} import(s) repointed to ${W}`);
5193
5193
  }
5194
- }), ni = S({
5194
+ }), ii = S({
5195
5195
  version: "0.38.0",
5196
5196
  id: "0.38.0/02_startup-failure-refuses-boot",
5197
5197
  title: "a `*.startup.ts` that fails refuses the boot (it used to warn and continue)",
@@ -5276,7 +5276,167 @@ var b = (e, t, n) => {
5276
5276
  "long work after, so a failure in the long half cannot hide a missing",
5277
5277
  "registration."
5278
5278
  ].join("\n")
5279
- }), ri = /\bStruct\(\s*\{\s*\}\s*\)/, J = [
5279
+ }), ai = /\bStruct\(\s*\{\s*\}\s*\)/, oi = S({
5280
+ version: "0.39.0",
5281
+ id: "0.39.0/01_empty-input-schema-rejects-every-field",
5282
+ title: "a procedure declaring `Schema.Struct({})` used to accept every field and now accepts none",
5283
+ kind: "manual",
5284
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => ai.test(e.getFullText())),
5285
+ note: [
5286
+ "CHECK YOUR `Schema.Struct({})` PROCEDURES FIRST. They have been accepting",
5287
+ "every field anyone sent them, and they now accept none — the one jump in",
5288
+ "this change that goes from \"accepts anything\" straight to \"accepts",
5289
+ "nothing\" rather than from \"silently drops\" to \"rejects\".",
5290
+ "",
5291
+ "This is a correction to the 0.37.0 note, re-issued rather than edited: a",
5292
+ "codemod note is only ever shown to users crossing its version, so anyone",
5293
+ "already past 0.37.0 — the users most likely to be holding a broken call —",
5294
+ "could not have been reached by fixing it in place.",
5295
+ "",
5296
+ "WHY THAT SHAPE AND NOT THE OTHERS",
5297
+ "",
5298
+ "Excess-property checking compares a payload against the schema's expected",
5299
+ "keys. An empty struct has none, so there was nothing to compare and every",
5300
+ "field decoded away silently. The declaration that looks strictest was the",
5301
+ "only one enforcing nothing.",
5302
+ "",
5303
+ "THE LIST, IN ABOUT A MINUTE",
5304
+ "",
5305
+ " grep -rn \"Struct({})\" --include=*.ts src/",
5306
+ "",
5307
+ "For each hit, find its callers. The break is invisible at the call site",
5308
+ "whenever the caller is NOT typed against the descriptor — a wrapper hook",
5309
+ "that takes `Record<string, unknown>`, a table component passing its own",
5310
+ "`{ limit, offset }`, a `preload` entry, a `parentKey`. A caller that IS",
5311
+ "typed against the descriptor was already a compile error and is not your",
5312
+ "problem here.",
5313
+ "",
5314
+ "The reported case, in full, because it is the shape to look for:",
5315
+ "",
5316
+ " // the procedure",
5317
+ " input: Schema.Struct({})",
5318
+ " // the caller — a shared table hook, every page, always",
5319
+ " { limit: pageSize }",
5320
+ "",
5321
+ "Before: `limit` was dropped and the query returned everything. After: the",
5322
+ "call fails. Both the live subscription and the SSR seed of that page go,",
5323
+ "because they are the same procedure call made twice.",
5324
+ "",
5325
+ "WHAT TO DO WITH EACH ONE",
5326
+ "",
5327
+ " • The field is REAL and the schema was wrong — declare it. This is the",
5328
+ " common case for a `limit` that was silently ignored: the procedure was",
5329
+ " not honouring it before, so declaring it is a behaviour change you want",
5330
+ " to make deliberately, not a mechanical fix.",
5331
+ " • The field is JUNK a caller sends out of habit — drop it at the call",
5332
+ " site. Do NOT widen the input schema to absorb it; that re-creates the",
5333
+ " silent discard under a name that looks intentional.",
5334
+ "",
5335
+ "A procedure that genuinely takes no input keeps `Schema.Struct({})` and is",
5336
+ "correct as it stands — callers must send `{}` or nothing."
5337
+ ].join("\n")
5338
+ }), si = S({
5339
+ version: "0.40.0",
5340
+ id: "0.40.0/01_cold-start-failure-is-its-own-state",
5341
+ title: "a failed cold start is `failed: true`, not `loading: true`",
5342
+ kind: "manual",
5343
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
5344
+ let t = e.getFullText();
5345
+ return C("useSubscription").test(t) || C("usePreloadedSubscription").test(t) || /\buseWorkflow\w*\(/.test(t);
5346
+ }),
5347
+ note: [
5348
+ "A subscription whose COLD START failed no longer reports `loading: true`.",
5349
+ "It is its own state: `failed: true`, `loading: false`, `data: undefined`.",
5350
+ "",
5351
+ "WHY",
5352
+ "",
5353
+ "The old shape left `loading` true for a subscription where nothing was in",
5354
+ "flight and nothing more was coming, so the blessed pattern",
5355
+ "",
5356
+ " if (loading) return <Skeleton/>",
5357
+ "",
5358
+ "rendered a skeleton forever. The escape hatch was `error`, and the natural",
5359
+ "shape of a wrapper — passing `{ data, loading }` through — drops it. A",
5360
+ "consumer hit that with three wrappers; the framework had six of its own.",
5361
+ "",
5362
+ "WHAT BREAKS, AND HOW YOU FIND IT",
5363
+ "",
5364
+ "`!loading` no longer proves `data` is present, so every call site that",
5365
+ "reads `data` after a bare `loading` check is a TYPE ERROR naming the file",
5366
+ "and line. Run your typecheck; that list is the complete set of places to",
5367
+ "look. Nothing fails silently.",
5368
+ "",
5369
+ "WHAT TO WRITE INSTEAD — and this is a decision per screen, not a rewrite",
5370
+ "",
5371
+ " const s = useSubscription(api, tag, input)",
5372
+ " if (s.loading) return <Skeleton/>",
5373
+ " if (s.failed) return <RetryPanel error={s.error}/> // ← yours to choose",
5374
+ " return <Table rows={s.data}/>",
5375
+ "",
5376
+ "Or, when the two should look the same:",
5377
+ "",
5378
+ " if (s.loading || s.failed) return <Skeleton/>",
5379
+ "",
5380
+ "That second form is what a mechanical transform would have written",
5381
+ "everywhere, and it is wrong for most screens — an infinite skeleton is",
5382
+ "exactly what this release removes. We did not guess on your behalf.",
5383
+ "",
5384
+ "IF YOU WRAP THE STATE",
5385
+ "",
5386
+ "A hook that re-exports `{ data, loading }` must carry `failed` too, or its",
5387
+ "callers inherit the original bug through your wrapper. The framework fixed",
5388
+ "six of its own in `useWorkflow.ts`; `state.loading || state.idle` became",
5389
+ "`state.loading || state.idle || state.failed`.",
5390
+ "",
5391
+ "WHAT DOES NOT CHANGE",
5392
+ "",
5393
+ " • A failure AFTER the first snapshot still leaves good data on screen",
5394
+ " with `error` set. Only the COLD start — no snapshot ever — is `failed`.",
5395
+ " • A `fallback` subscription is unchanged: `data` is always present, so",
5396
+ " there is nothing to narrow. `failed` is reported there, not gating.",
5397
+ " • `idle` (from a dynamic `skip`) is untouched, and stays opt-in by",
5398
+ " overload. `failed` is NOT opt-in — any subscription can fail.",
5399
+ " • The failed state is terminal for one TRANSPORT, not forever: a",
5400
+ " reconnect discards the error and re-subscribes, so the entry returns to",
5401
+ " pending on its own."
5402
+ ].join("\n")
5403
+ }), ci = S({
5404
+ version: "0.40.0",
5405
+ id: "0.40.0/02_rejected-credential-widens-guard-results",
5406
+ title: "a rejected credential answers `Unauthenticated`, widening three guard results",
5407
+ kind: "manual",
5408
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
5409
+ let t = e.getFullText();
5410
+ return C("checkGuards").test(t) || C("checkGuardsEffect").test(t) || C("bindEvent").test(t);
5411
+ }),
5412
+ note: [
5413
+ "A guard refusing a caller whose CREDENTIAL was rejected now answers",
5414
+ "`Unauthenticated` rather than `ScopeError`. Three results widened:",
5415
+ "",
5416
+ " checkGuards(…) ScopeError | Unauthenticated | null",
5417
+ " checkGuardsEffect(…) Effect<ScopeError | Unauthenticated | null>",
5418
+ " bindEvent(…) Stream<…, ScopeError | Unauthenticated, …>",
5419
+ "",
5420
+ "WHY",
5421
+ "",
5422
+ "A user whose tab outlived their IdP token was told they lacked a scope.",
5423
+ "True — an anonymous caller holds none — and it sends whoever reads it into",
5424
+ "the permissions system while the problem is an expired session. A consumer",
5425
+ "spent a round there; the subject was their own administrator, and the same",
5426
+ "call with a fresh token worked.",
5427
+ "",
5428
+ "WHAT TO DO",
5429
+ "",
5430
+ "`tsc` names every site. At each one, decide what an expired session should",
5431
+ "do that a missing permission should not — re-authenticate instead of",
5432
+ "showing a permissions error is usually the answer, and is the reason this",
5433
+ "distinction now exists. Widening the annotation alone compiles and keeps",
5434
+ "the behaviour that was reported.",
5435
+ "",
5436
+ "`openAccess` procedures are untouched: the stamp only travels, and only a",
5437
+ "guard that actually refuses ever spends it."
5438
+ ].join("\n")
5439
+ }), K = "@voltro/web/middleware", q = /(^|[\\/])middleware\.tsx?$/, J = [
5280
5440
  _e,
5281
5441
  ve,
5282
5442
  be,
@@ -5293,7 +5453,6 @@ var b = (e, t, n) => {
5293
5453
  Be,
5294
5454
  Ve,
5295
5455
  We,
5296
- Ke,
5297
5456
  qe,
5298
5457
  Je,
5299
5458
  Ye,
@@ -5306,16 +5465,16 @@ var b = (e, t, n) => {
5306
5465
  nt,
5307
5466
  rt,
5308
5467
  it,
5309
- lt,
5310
5468
  at,
5311
- ct,
5312
- ht,
5313
- bt,
5469
+ ut,
5470
+ ot,
5471
+ lt,
5472
+ gt,
5314
5473
  xt,
5315
5474
  St,
5316
- Tt,
5475
+ Ct,
5317
5476
  Et,
5318
- At,
5477
+ Dt,
5319
5478
  Mt,
5320
5479
  Pt,
5321
5480
  It,
@@ -5328,220 +5487,121 @@ var b = (e, t, n) => {
5328
5487
  Xt,
5329
5488
  Qt,
5330
5489
  en,
5331
- rn,
5332
- an,
5490
+ nn,
5333
5491
  on,
5334
5492
  sn,
5493
+ cn,
5335
5494
  ln,
5336
5495
  dn,
5337
5496
  pn,
5338
5497
  hn,
5339
5498
  _n,
5340
- Sn,
5499
+ yn,
5341
5500
  wn,
5342
5501
  En,
5343
5502
  On,
5344
5503
  An,
5345
- jn,
5346
5504
  Mn,
5347
5505
  Nn,
5348
5506
  Pn,
5507
+ Fn,
5349
5508
  In,
5350
- Bn,
5509
+ Rn,
5351
5510
  Hn,
5352
5511
  Wn,
5353
- Gn,
5354
5512
  Kn,
5355
5513
  qn,
5356
- Xn,
5357
- rr,
5358
- Zn,
5359
- tr,
5514
+ Jn,
5515
+ Yn,
5516
+ Qn,
5360
5517
  ar,
5518
+ $n,
5519
+ rr,
5361
5520
  sr,
5362
- cr,
5363
5521
  lr,
5364
- fr,
5522
+ ur,
5523
+ dr,
5365
5524
  mr,
5366
- br,
5525
+ gr,
5367
5526
  Sr,
5368
- vr,
5369
- Tr,
5370
- Or,
5527
+ wr,
5528
+ br,
5529
+ Dr,
5371
5530
  Ar,
5372
5531
  Mr,
5373
- Ir,
5532
+ Pr,
5533
+ Rr,
5534
+ Ur,
5374
5535
  Vr,
5375
- zr,
5376
- Gr,
5377
5536
  qr,
5378
5537
  Yr,
5379
- Xr,
5380
5538
  Zr,
5381
- ei,
5382
- ti,
5539
+ Qr,
5540
+ $r,
5383
5541
  ni,
5542
+ ri,
5543
+ ii,
5544
+ oi,
5545
+ si,
5546
+ ci,
5384
5547
  S({
5385
- version: "0.39.0",
5386
- id: "0.39.0/01_empty-input-schema-rejects-every-field",
5387
- title: "a procedure declaring `Schema.Struct({})` used to accept every field and now accepts none",
5388
- kind: "manual",
5389
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => ri.test(e.getFullText())),
5390
- note: [
5391
- "CHECK YOUR `Schema.Struct({})` PROCEDURES FIRST. They have been accepting",
5392
- "every field anyone sent them, and they now accept none — the one jump in",
5393
- "this change that goes from \"accepts anything\" straight to \"accepts",
5394
- "nothing\" rather than from \"silently drops\" to \"rejects\".",
5395
- "",
5396
- "This is a correction to the 0.37.0 note, re-issued rather than edited: a",
5397
- "codemod note is only ever shown to users crossing its version, so anyone",
5398
- "already past 0.37.0 — the users most likely to be holding a broken call —",
5399
- "could not have been reached by fixing it in place.",
5400
- "",
5401
- "WHY THAT SHAPE AND NOT THE OTHERS",
5402
- "",
5403
- "Excess-property checking compares a payload against the schema's expected",
5404
- "keys. An empty struct has none, so there was nothing to compare and every",
5405
- "field decoded away silently. The declaration that looks strictest was the",
5406
- "only one enforcing nothing.",
5407
- "",
5408
- "THE LIST, IN ABOUT A MINUTE",
5409
- "",
5410
- " grep -rn \"Struct({})\" --include=*.ts src/",
5411
- "",
5412
- "For each hit, find its callers. The break is invisible at the call site",
5413
- "whenever the caller is NOT typed against the descriptor — a wrapper hook",
5414
- "that takes `Record<string, unknown>`, a table component passing its own",
5415
- "`{ limit, offset }`, a `preload` entry, a `parentKey`. A caller that IS",
5416
- "typed against the descriptor was already a compile error and is not your",
5417
- "problem here.",
5418
- "",
5419
- "The reported case, in full, because it is the shape to look for:",
5420
- "",
5421
- " // the procedure",
5422
- " input: Schema.Struct({})",
5423
- " // the caller — a shared table hook, every page, always",
5424
- " { limit: pageSize }",
5425
- "",
5426
- "Before: `limit` was dropped and the query returned everything. After: the",
5427
- "call fails. Both the live subscription and the SSR seed of that page go,",
5428
- "because they are the same procedure call made twice.",
5429
- "",
5430
- "WHAT TO DO WITH EACH ONE",
5431
- "",
5432
- " • The field is REAL and the schema was wrong — declare it. This is the",
5433
- " common case for a `limit` that was silently ignored: the procedure was",
5434
- " not honouring it before, so declaring it is a behaviour change you want",
5435
- " to make deliberately, not a mechanical fix.",
5436
- " • The field is JUNK a caller sends out of habit — drop it at the call",
5437
- " site. Do NOT widen the input schema to absorb it; that re-creates the",
5438
- " silent discard under a name that looks intentional.",
5439
- "",
5440
- "A procedure that genuinely takes no input keeps `Schema.Struct({})` and is",
5441
- "correct as it stands — callers must send `{}` or nothing."
5442
- ].join("\n")
5443
- }),
5444
- S({
5445
- version: "0.40.0",
5446
- id: "0.40.0/01_cold-start-failure-is-its-own-state",
5447
- title: "a failed cold start is `failed: true`, not `loading: true`",
5448
- kind: "manual",
5449
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
5450
- let t = e.getFullText();
5451
- return C("useSubscription").test(t) || C("usePreloadedSubscription").test(t) || /\buseWorkflow\w*\(/.test(t);
5452
- }),
5548
+ version: "0.41.0",
5549
+ id: "0.41.0/01_middleware-defines-where-it-runs",
5550
+ title: "`middleware.ts` exports `defineMiddleware(...)` and can say where it runs",
5551
+ kind: "transform",
5552
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => q.test(e.getFilePath()) ? e.getExportAssignment((e) => !e.isExportEquals()) !== void 0 || e.getFunctions().some((e) => e.isDefaultExport()) : !1),
5553
+ transform: ({ project: e, log: t }) => {
5554
+ let n = 0;
5555
+ for (let t of e.getSourceFiles()) {
5556
+ if (!q.test(t.getFilePath()) || t.getFullText().includes("defineMiddleware")) continue;
5557
+ let e = t.getExportAssignment((e) => !e.isExportEquals());
5558
+ if (e !== void 0) {
5559
+ let t = e.getExpression().getText();
5560
+ e.replaceWithText(`export default defineMiddleware({ run: ${t} })`), n += 1;
5561
+ } else {
5562
+ let e = t.getFunctions().find((e) => e.isDefaultExport());
5563
+ if (e === void 0) continue;
5564
+ let r = e.getText().replace(/^\s*export\s+default\s+/, "");
5565
+ e.replaceWithText(`export default defineMiddleware({ run: ${r} })`), n += 1;
5566
+ }
5567
+ let r = t.getImportDeclarations().find((e) => e.getModuleSpecifierValue() === K);
5568
+ r === void 0 ? t.insertImportDeclaration(0, {
5569
+ moduleSpecifier: K,
5570
+ namedImports: [{ name: "defineMiddleware" }]
5571
+ }) : r.getNamedImports().some((e) => e.getName() === "defineMiddleware") || r.addNamedImport({ name: "defineMiddleware" });
5572
+ }
5573
+ n > 0 && (t(`middleware.ts: ${n} export(s) wrapped in defineMiddleware`), t("Add a `match` if the middleware should not run on every route — see the note."));
5574
+ },
5453
5575
  note: [
5454
- "A subscription whose COLD START failed no longer reports `loading: true`.",
5455
- "It is its own state: `failed: true`, `loading: false`, `data: undefined`.",
5456
- "",
5457
- "WHY",
5458
- "",
5459
- "The old shape left `loading` true for a subscription where nothing was in",
5460
- "flight and nothing more was coming, so the blessed pattern",
5461
- "",
5462
- " if (loading) return <Skeleton/>",
5463
- "",
5464
- "rendered a skeleton forever. The escape hatch was `error`, and the natural",
5465
- "shape of a wrapper — passing `{ data, loading }` through — drops it. A",
5466
- "consumer hit that with three wrappers; the framework had six of its own.",
5467
- "",
5468
- "WHAT BREAKS, AND HOW YOU FIND IT",
5469
- "",
5470
- "`!loading` no longer proves `data` is present, so every call site that",
5471
- "reads `data` after a bare `loading` check is a TYPE ERROR naming the file",
5472
- "and line. Run your typecheck; that list is the complete set of places to",
5473
- "look. Nothing fails silently.",
5474
- "",
5475
- "WHAT TO WRITE INSTEAD — and this is a decision per screen, not a rewrite",
5476
- "",
5477
- " const s = useSubscription(api, tag, input)",
5478
- " if (s.loading) return <Skeleton/>",
5479
- " if (s.failed) return <RetryPanel error={s.error}/> // ← yours to choose",
5480
- " return <Table rows={s.data}/>",
5576
+ "`middleware.ts` now exports `defineMiddleware(...)`. Your file was rewritten",
5577
+ "to the wrapped form, which behaves exactly as it did: no `match` means every",
5578
+ "server-rendered route.",
5481
5579
  "",
5482
- "Or, when the two should look the same:",
5483
- "",
5484
- " if (s.loading || s.failed) return <Skeleton/>",
5485
- "",
5486
- "That second form is what a mechanical transform would have written",
5487
- "everywhere, and it is wrong for most screens — an infinite skeleton is",
5488
- "exactly what this release removes. We did not guess on your behalf.",
5489
- "",
5490
- "IF YOU WRAP THE STATE",
5491
- "",
5492
- "A hook that re-exports `{ data, loading }` must carry `failed` too, or its",
5493
- "callers inherit the original bug through your wrapper. The framework fixed",
5494
- "six of its own in `useWorkflow.ts`; `state.loading || state.idle` became",
5495
- "`state.loading || state.idle || state.failed`.",
5496
- "",
5497
- "WHAT DOES NOT CHANGE",
5498
- "",
5499
- " • A failure AFTER the first snapshot still leaves good data on screen",
5500
- " with `error` set. Only the COLD start — no snapshot ever — is `failed`.",
5501
- " • A `fallback` subscription is unchanged: `data` is always present, so",
5502
- " there is nothing to narrow. `failed` is reported there, not gating.",
5503
- " • `idle` (from a dynamic `skip`) is untouched, and stays opt-in by",
5504
- " overload. `failed` is NOT opt-in — any subscription can fail.",
5505
- " • The failed state is terminal for one TRANSPORT, not forever: a",
5506
- " reconnect discards the error and re-subscribes, so the entry returns to",
5507
- " pending on its own."
5508
- ].join("\n")
5509
- }),
5510
- S({
5511
- version: "0.40.0",
5512
- id: "0.40.0/02_rejected-credential-widens-guard-results",
5513
- title: "a rejected credential answers `Unauthenticated`, widening three guard results",
5514
- kind: "manual",
5515
- appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
5516
- let t = e.getFullText();
5517
- return C("checkGuards").test(t) || C("checkGuardsEffect").test(t) || C("bindEvent").test(t);
5518
- }),
5519
- note: [
5520
- "A guard refusing a caller whose CREDENTIAL was rejected now answers",
5521
- "`Unauthenticated` rather than `ScopeError`. Three results widened:",
5580
+ "WHAT TO DO NEXT (optional, and worth a minute)",
5522
5581
  "",
5523
- " checkGuards(…) ScopeError | Unauthenticated | null",
5524
- " checkGuardsEffect(…) Effect<ScopeError | Unauthenticated | null>",
5525
- " bindEvent(…) Stream<…, ScopeError | Unauthenticated, …>",
5582
+ "If your middleware starts with a hand-written path gate, move it into `match`",
5583
+ "and delete the `if`:",
5526
5584
  "",
5527
- "WHY",
5585
+ " export const session = defineMiddleware({",
5586
+ " match: { under: '/app', except: ['/app/public'] },",
5587
+ " run: async (req) => { /* the body, without the guard clause */ },",
5588
+ " })",
5528
5589
  "",
5529
- "A user whose tab outlived their IdP token was told they lacked a scope.",
5530
- "True — an anonymous caller holds none — and it sends whoever reads it into",
5531
- "the permissions system while the problem is an expired session. A consumer",
5532
- "spent a round there; the subject was their own administrator, and the same",
5533
- "call with a fresh token worked.",
5590
+ "WHY THIS IS BETTER THAN THE `if`",
5534
5591
  "",
5535
- "WHAT TO DO",
5592
+ " The hook no longer runs at all on routes it does not cover, so a public",
5593
+ " page stops paying for an IdP round trip it never used.",
5594
+ " • `under` / `routes` / `except` are checked against your ROUTES at boot. A",
5595
+ " path that matches nothing refuses the boot instead of silently never",
5596
+ " firing — the failure an `if` cannot report.",
5597
+ " • `voltro doctor` reports overlaps and dead matchers before you deploy.",
5536
5598
  "",
5537
- "`tsc` names every site. At each one, decide what an expired session should",
5538
- "do that a missing permission should not re-authenticate instead of",
5539
- "showing a permissions error is usually the answer, and is the reason this",
5540
- "distinction now exists. Widening the annotation alone compiles and keeps",
5541
- "the behaviour that was reported.",
5599
+ "You can export SEVERAL middlewares now, each with its own `match`. At most",
5600
+ "one may match any given route: two hooks writing one `authorization` header",
5601
+ "have no defensible winner, so an overlap refuses the boot and names both.",
5542
5602
  "",
5543
- "`openAccess` procedures are untouched: the stamp only travels, and only a",
5544
- "guard that actually refuses ever spends it."
5603
+ "Non-page requests (assets, unknown paths) are NOT matched unless you ask with",
5604
+ "`assets: true`. There is no render there, so only `setCookies` takes effect."
5545
5605
  ].join("\n")
5546
5606
  })
5547
5607
  ], Y = /* @__PURE__ */ new Set([
@@ -5556,12 +5616,12 @@ var b = (e, t, n) => {
5556
5616
  ".turbo",
5557
5617
  ".cache",
5558
5618
  ".output"
5559
- ]), ii = () => [...[...Y].map((e) => `**/${e}/**`), "**/.voltro-*/**"], X = /(?:from|import)\s*\(?\s*['"]([^'"]+)['"]|require\s*\(\s*['"]([^'"]+)['"]\s*\)/g, Z = /\.(?:tsx?|jsx?|mjs|cjs)$/, ai = (e) => m(e).replace(Z, ""), oi = (e) => {
5619
+ ]), li = () => [...[...Y].map((e) => `**/${e}/**`), "**/.voltro-*/**"], X = /(?:from|import)\s*\(?\s*['"]([^'"]+)['"]|require\s*\(\s*['"]([^'"]+)['"]\s*\)/g, ui = /\.(?:tsx?|jsx?|mjs|cjs)$/, di = (e) => m(e).replace(ui, ""), fi = (e) => {
5560
5620
  let t = e.split("/").filter((e) => e.length > 0).pop();
5561
5621
  if (t === void 0 || t === "." || t === "..") return;
5562
- let n = t.replace(Z, "");
5622
+ let n = t.replace(ui, "");
5563
5623
  return n.length > 0 ? n : void 0;
5564
- }, si = (e) => {
5624
+ }, pi = (e) => {
5565
5625
  let t = /* @__PURE__ */ new Map();
5566
5626
  for (let n of e) {
5567
5627
  let e;
@@ -5572,55 +5632,55 @@ var b = (e, t, n) => {
5572
5632
  }
5573
5633
  X.lastIndex = 0;
5574
5634
  for (let r = X.exec(e); r !== null; r = X.exec(e)) {
5575
- let e = oi(r[1] ?? r[2] ?? "");
5635
+ let e = fi(r[1] ?? r[2] ?? "");
5576
5636
  if (e === void 0) continue;
5577
5637
  let i = t.get(e);
5578
5638
  i === void 0 ? t.set(e, /* @__PURE__ */ new Set([n])) : i.add(n);
5579
5639
  }
5580
5640
  }
5581
5641
  return t;
5582
- }, ci = (e, t) => {
5642
+ }, mi = (e, t) => {
5583
5643
  let n = new Set(e);
5584
- for (let r of e) for (let e of [ai(r), m(h(r))]) {
5644
+ for (let r of e) for (let e of [di(r), m(h(r))]) {
5585
5645
  let r = t.get(e);
5586
5646
  if (r !== void 0) for (let e of r) n.add(e);
5587
5647
  }
5588
5648
  return n;
5589
- }, li = [
5649
+ }, Z = [
5590
5650
  "**/*.ts",
5591
5651
  "**/*.tsx",
5592
5652
  "!**/node_modules/**",
5593
5653
  "!**/dist/**",
5594
5654
  "!**/.framework/**",
5595
5655
  "!**/*.d.ts"
5596
- ], Q = (e, t, n = fi) => {
5656
+ ], Q = (e, t, n = _i) => {
5597
5657
  let r = /* @__PURE__ */ new Set();
5598
- for (let e of t) for (let t of e.scope ?? li) r.add(t);
5658
+ for (let e of t) for (let t of e.scope ?? Z) r.add(t);
5599
5659
  let i = n(e);
5600
5660
  if (i !== void 0) {
5601
- let t = [...r].filter((e) => !e.startsWith("!")).map((e) => di(e)), n = [...r].filter((e) => e.startsWith("!")).map((e) => di(e.slice(1))), a = [...Y], o = [];
5661
+ let t = [...r].filter((e) => !e.startsWith("!")).map((e) => gi(e)), n = [...r].filter((e) => e.startsWith("!")).map((e) => gi(e.slice(1))), a = [...Y], o = [];
5602
5662
  for (let r of i) {
5603
5663
  if (a.some((e) => r === e || r.startsWith(`${e}/`) || r.includes(`/${e}/`)) || !t.some((e) => e(r)) || n.some((e) => e(r))) continue;
5604
5664
  let i = g(e, r);
5605
5665
  _(i) && o.push(i);
5606
5666
  }
5607
- return ui(o.length, e), o;
5667
+ return hi(o.length, e), o;
5608
5668
  }
5609
5669
  let a = se([...r], {
5610
5670
  cwd: e,
5611
5671
  absolute: !0,
5612
5672
  expandDirectories: !1,
5613
5673
  followSymbolicLinks: !1,
5614
- ignore: [...ii()]
5674
+ ignore: [...li()]
5615
5675
  });
5616
- return ui(a.length, e), a;
5617
- }, ui = (e, t) => {
5618
- let n = pi();
5676
+ return hi(a.length, e), a;
5677
+ }, hi = (e, t) => {
5678
+ let n = vi();
5619
5679
  if (!(e <= n)) throw Error(`voltro update: the codemod scan matched ${e} files under ${t}, past the ${n} ceiling.\n Every matched file is parsed into one ts-morph project, so the heap needed grows with\n this number — past the ceiling it runs out of memory, and V8 aborts without naming a\n limit, which is why this stops here instead. Three ways out, in order:\n • put non-source directories in .gitignore (inside a git repo the scan then never\n sees them at all — a build cache, a data dump, a virtualenv),\n • run \`voltro update\` from the app directory rather than the workspace root, or\n • take one codemod at a time: \`voltro update --dry-run\` lists the ids, then\n \`voltro update --codemods-only --only <id>\` runs a single one.\n If every one of those files really is source this pass must rewrite, raise the ceiling\n with VOLTRO_CODEMOD_MAX_FILES and give node room: NODE_OPTIONS=--max-old-space-size=8192.`);
5620
- }, di = (e) => {
5680
+ }, gi = (e) => {
5621
5681
  let t = e.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*\*\//g, "\0").replace(/\*\*/g, ".*").replace(/\*/g, "[^/]*").replace(/\u0000/g, "(?:.*/)?").replace(/\\\{([^}]*)\\\}/g, (e, t) => `(?:${t.split(",").join("|")})`);
5622
5682
  return (e) => RegExp(`^${t}$`).test(e);
5623
- }, fi = (e) => {
5683
+ }, _i = (e) => {
5624
5684
  try {
5625
5685
  let t = ie("git", [
5626
5686
  "ls-files",
@@ -5641,7 +5701,7 @@ var b = (e, t, n) => {
5641
5701
  } catch {
5642
5702
  return;
5643
5703
  }
5644
- }, pi = () => {
5704
+ }, vi = () => {
5645
5705
  let e = Number(process.env.VOLTRO_CODEMOD_MAX_FILES);
5646
5706
  return Number.isInteger(e) && e > 0 ? e : 2e4;
5647
5707
  }, $ = (e, t) => {
@@ -5651,7 +5711,7 @@ var b = (e, t, n) => {
5651
5711
  if (t !== 0) return t;
5652
5712
  }
5653
5713
  return 0;
5654
- }, mi = (e, t, n = J) => n.filter((n) => $(e, n.version) < 0 && $(n.version, t) <= 0).slice().sort(ge), hi = (e, t, n = () => {}) => {
5714
+ }, yi = (e, t, n = J) => n.filter((n) => $(e, n.version) < 0 && $(n.version, t) <= 0).slice().sort(ge), bi = (e, t, n = () => {}) => {
5655
5715
  let r = [], i = [], a = [];
5656
5716
  for (let o of t) {
5657
5717
  if (!(!o.appliesTo || o.appliesTo({ project: e }))) {
@@ -5697,8 +5757,8 @@ var b = (e, t, n) => {
5697
5757
  manual: i,
5698
5758
  skipped: a
5699
5759
  };
5700
- }, gi = async (e) => {
5701
- let t = e.log ?? (() => {}), n = mi(e.from, e.to, e.codemods ?? J), r = e.only === void 0 || e.only.length === 0 ? n : (() => {
5760
+ }, xi = async (e) => {
5761
+ let t = e.log ?? (() => {}), n = yi(e.from, e.to, e.codemods ?? J), r = e.only === void 0 || e.only.length === 0 ? n : (() => {
5702
5762
  let t = n.filter((t) => e.only.includes(t.id)), r = e.only.filter((e) => !n.some((t) => t.id === e));
5703
5763
  if (r.length > 0) throw Error(`voltro update --only: no codemod in ${e.from} → ${e.to} has id ${r.map((e) => `"${e}"`).join(", ")}.\n Available for this jump:\n${n.map((e) => ` ${e.id}`).join("\n")}`);
5704
5764
  return t;
@@ -5717,15 +5777,15 @@ var b = (e, t, n) => {
5717
5777
  baseUrl: i.baseUrl,
5718
5778
  paths: i.paths
5719
5779
  } }
5720
- }), o, s = Q(e.root, r), c = r.filter((e) => e.needsImporters === !0 && e.scope !== void 0), l = [], u = [], d = [], p = c.length > 0 ? si(Q(e.root, [{
5780
+ }), o, s = Q(e.root, r), c = r.filter((e) => e.needsImporters === !0 && e.scope !== void 0), l = [], u = [], d = [], p = c.length > 0 ? pi(Q(e.root, [{
5721
5781
  ...c[0],
5722
- scope: li
5782
+ scope: Z
5723
5783
  }])) : void 0;
5724
5784
  for (let n of r) {
5725
5785
  if (c.includes(n)) {
5726
5786
  let r = a(), i = Q(e.root, [n]);
5727
- for (let e of ci(i, p)) _(e) && r.addSourceFileAtPath(e);
5728
- let s = hi(r, [n], t);
5787
+ for (let e of mi(i, p)) _(e) && r.addSourceFileAtPath(e);
5788
+ let s = bi(r, [n], t);
5729
5789
  e.dryRun || await r.save(), l.push(...s.applied), u.push(...s.manual), d.push(...s.skipped), o = void 0;
5730
5790
  continue;
5731
5791
  }
@@ -5734,7 +5794,7 @@ var b = (e, t, n) => {
5734
5794
  for (let t of s) _(t) && e.addSourceFileAtPath(t);
5735
5795
  return e;
5736
5796
  })();
5737
- let r = hi(o, [n], t);
5797
+ let r = bi(o, [n], t);
5738
5798
  e.dryRun || await o.save(), l.push(...r.applied), u.push(...r.manual), d.push(...r.skipped);
5739
5799
  }
5740
5800
  return {
@@ -5744,4 +5804,4 @@ var b = (e, t, n) => {
5744
5804
  };
5745
5805
  };
5746
5806
  //#endregion
5747
- export { S as i, gi as n, Y as r, $ as t };
5807
+ export { S as i, xi as n, Y as r, $ as t };