@voltro/cli 0.39.0 → 0.39.1

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 (84) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/dist/apiBuild-BmR_bIxN.js +2 -0
  3. package/dist/{apiBuild-DGalUk9v.js → apiBuild-D9FB13_2.js} +1 -1
  4. package/dist/bin.js +1 -1
  5. package/dist/{build-CfF6t0UM.js → build-DORV5mLM.js} +6 -6
  6. package/dist/{checkCommand-CBtynBKW.js → checkCommand-Bf6oMao4.js} +3 -3
  7. package/dist/{checkCommand-BV56Pcc1.js → checkCommand-D9qK_gtA.js} +1 -1
  8. package/dist/{codegenCommand-W7SDdiAQ.js → codegenCommand-CxOyKmc1.js} +1 -1
  9. package/dist/{commands-BD9eBRY3.js → commands-D6aW_6AR.js} +15 -15
  10. package/dist/{dashboardCommand-7qGylm0F.js → dashboardCommand-CwTZh-XZ.js} +1 -1
  11. package/dist/{dataCommand-C_F2DYxe.js → dataCommand-Cc9RiLQZ.js} +1 -1
  12. package/dist/{dev-gqpnzVhI.js → dev-3mgc8c-H.js} +26 -26
  13. package/dist/{dev-alhkKoEX.js → dev-CjJAasDs.js} +1 -1
  14. package/dist/doctorCommand-Cghssndo.js +2 -0
  15. package/dist/{doctorCommand-Bvs-BQrM.js → doctorCommand-oLuzc-aC.js} +28 -15
  16. package/dist/{dormancyCommand-B-PPHc9Q.js → dormancyCommand-Bxe4WtHU.js} +1 -1
  17. package/dist/{embeddingsCommand-OKY6XjUf.js → embeddingsCommand-CyNQkFIc.js} +1 -1
  18. package/dist/{envCommand-B1-Zm85H.js → envCommand-CAkSgBbh.js} +1 -1
  19. package/dist/{evolveCommand-C4-NlFbd.js → evolveCommand-CWhBoe_P.js} +1 -1
  20. package/dist/frameworkTableAssembly-DgylYh9_.js +2 -0
  21. package/dist/index.js +1 -1
  22. package/dist/{runtimeTrace-DzZOCd94.js → runtimeTrace-gNXeLf6H.js} +1 -1
  23. package/dist/{sdkgen-C4roLErM.js → sdkgen-C8zz10-X.js} +1 -1
  24. package/dist/{serveCommand-B6TATyCj.js → serveCommand-BpK8-m1N.js} +11 -11
  25. package/dist/serveCommand-CW-goXvh.js +2 -0
  26. package/dist/serveEntry.js +1 -1
  27. package/dist/{webhooksCommand-BVvOtZ1B.js → webhooksCommand-EccPZQZ4.js} +1 -1
  28. package/package.json +17 -17
  29. package/templates/AGENTS.md +1 -1
  30. package/templates/agent-docs/_index.md +1 -1
  31. package/templates/agent-docs/authentication.md +13 -4
  32. package/templates/agent-docs/whats-new.md +26 -198
  33. package/templates/apps/api-ai/package.json +7 -7
  34. package/templates/apps/api-auth/package.json +8 -8
  35. package/templates/apps/api-backend/package.json +7 -7
  36. package/templates/apps/api-backend-deactivation/package.json +7 -7
  37. package/templates/apps/api-backend-mail/package.json +8 -8
  38. package/templates/apps/api-backend-mariadb/package.json +9 -9
  39. package/templates/apps/api-backend-sqlite/package.json +8 -8
  40. package/templates/apps/api-backend-storage/package.json +8 -8
  41. package/templates/apps/api-cms/package.json +10 -10
  42. package/templates/apps/api-collab/package.json +8 -8
  43. package/templates/apps/api-data-advanced/package.json +8 -8
  44. package/templates/apps/api-durable/package.json +8 -8
  45. package/templates/apps/api-durable/startup/warm.startup.tsx +16 -2
  46. package/templates/apps/api-feature-flags/package.json +9 -9
  47. package/templates/apps/api-governance/package.json +8 -8
  48. package/templates/apps/api-kv/package.json +8 -8
  49. package/templates/apps/api-moderation/package.json +8 -8
  50. package/templates/apps/api-observability/package.json +8 -8
  51. package/templates/apps/api-ratelimit/package.json +8 -8
  52. package/templates/apps/api-rbac/package.json +8 -8
  53. package/templates/apps/api-rest/package.json +7 -7
  54. package/templates/apps/api-saas/package.json +11 -11
  55. package/templates/apps/api-saas-starter/package.json +10 -10
  56. package/templates/apps/api-search/package.json +8 -8
  57. package/templates/apps/api-status/package.json +8 -8
  58. package/templates/apps/api-versioning/package.json +8 -8
  59. package/templates/apps/api-webhooks/package.json +9 -9
  60. package/templates/apps/changelog/package.json +6 -6
  61. package/templates/apps/edge-functions/package.json +2 -2
  62. package/templates/apps/frontend-admin/package.json +8 -8
  63. package/templates/apps/frontend-app/package.json +9 -9
  64. package/templates/apps/frontend-auth/package.json +8 -8
  65. package/templates/apps/frontend-blank/package.json +7 -7
  66. package/templates/apps/frontend-cms/package.json +9 -9
  67. package/templates/apps/frontend-collab/package.json +10 -10
  68. package/templates/apps/frontend-contact/package.json +7 -7
  69. package/templates/apps/frontend-dashboard/package.json +7 -7
  70. package/templates/apps/frontend-docs/package.json +7 -7
  71. package/templates/apps/frontend-i18n/package.json +6 -6
  72. package/templates/apps/frontend-landing/package.json +7 -7
  73. package/templates/apps/frontend-portal/package.json +8 -8
  74. package/templates/apps/frontend-saas/package.json +8 -8
  75. package/templates/apps/frontend-spa/package.json +7 -7
  76. package/templates/apps/frontend-ssr/package.json +7 -7
  77. package/templates/apps/frontend-ssr-api/package.json +8 -8
  78. package/templates/apps/frontend-static-blog/package.json +6 -6
  79. package/templates/apps/frontend-status/package.json +8 -8
  80. package/templates/apps/mobile-app/package.json +4 -4
  81. package/dist/apiBuild-2GvK8CUB.js +0 -2
  82. package/dist/doctorCommand-CVXfRrng.js +0 -2
  83. package/dist/frameworkTableAssembly-YyVe32Cb.js +0 -2
  84. package/dist/serveCommand-CNR0gI9V.js +0 -2
package/CHANGELOG.md CHANGED
@@ -39,6 +39,58 @@ _Changes staged for the next release accumulate here (rolled up from
39
39
 
40
40
  ---
41
41
 
42
+ ## [0.39.1] — 2026-08-16
43
+
44
+ ### Fixed
45
+
46
+ - **@voltro/runtime, @voltro/cli** — An app-registered tuple source is no longer replaced by the framework default.
47
+
48
+ Both boot paths carried this comment, verbatim:
49
+
50
+ > An app whose relationships live in its own tables overrides with > `setTupleSource`.
51
+
52
+ and then called `setTupleSource(default)` **unconditionally**. That call runs AFTER the app's startups — `runBootLifecycle` at `dev.ts:3910` and `serveCommand.ts:869`, against the registration at `dev.ts:4065` and `serveApi.ts:937` — and `setTupleSource` is last-write-wins. So the framework won every time: an app registering its own source in a `*.startup.tsx`, which is what the docs tell it to do, had it silently replaced.
53
+
54
+ The consequence is not subtle. Every relationship guard would then be answered from `_voltro_rebac_tuples` — empty, for exactly the app that keeps its relations in its own tables — so every guard DENIES, fail-closed, with a `no tuple source` warning that never fires because a source *is* registered: the wrong one.
55
+
56
+ The comment was not wrong about the design; it described the design while the code removed it. Same shape as the `DORMANCY_WAKEUP_TENANT` scar — equal by value at both call sites, so nothing could fail, and the comment was the only place the intent survived.
57
+
58
+ `registerDefaultTupleSource` fills the gap only when nobody else did, and returns whether it acted so the boot can say which source is live instead of leaving an operator to guess. `setTupleSource` itself is unchanged: an app calling it twice still gets the second one, because narrowing that would trade one silent surprise for another.
59
+
60
+ Found while re-checking a consumer's claim that a different item was still open. It was not — but it sits beside this, and this is the one that would have bitten them. Pinned in both directions: a unit test for the registrar, and a source guard asserting neither boot path installs `loadResourceTuples` through `setTupleSource` again. Red-verified by restoring the original line.
61
+ - **@voltro/cli** — `voltro doctor` no longer reports "scope vocabulary: none found" when it could not read the config at all.
62
+
63
+ A consumer HAD configured `doctor.scopeVocabulary` and still read `none found`. The cause was not their vocabulary: `app.config.ts` could not be imported outside their pod — an auth strategy demands its secret while the config is evaluated — so the vocabulary was never read. Inside the pod the message disappears and the rule runs.
64
+
65
+ "You have no vocabulary" and "I could not look" are different states, and only the first is a statement about their app. This section already made exactly that distinction one member earlier — its own comment reads **DORMANT AND CLEAN MUST NOT PRINT THE SAME** — and then collapsed the third.
66
+
67
+ The signal existed and was not connected. `offlineManifest` deliberately survives an unimportable config (a doctor run must not die on one), so the empty vocabulary arrived looking like a real absence, while the same failure was reported a hundred lines earlier under plugin tables. The consumer read the section about scopes and searched at the wrong end — which is the correct way to read a report.
68
+
69
+ The rule now probes importability before claiming an absence, and says so:
70
+
71
+ ```
72
+ • scope vocabulary: NOT EVALUATED — `app.config.ts` could not be imported.
73
+ This is not a statement about your scopes: the rule never got to read them.
74
+ … The same import failure is reported above for plugin tables; both sections
75
+ have this one cause.
76
+ ```
77
+
78
+ The dormant case keeps its own wording, so a quiet run on an app that genuinely publishes no vocabulary is not relabelled as a broken config.
79
+
80
+ ### Internal (no consumer-facing effect)
81
+
82
+ - **@voltro/cache, @voltro/kv** — The RESP TTL tests in `@voltro/cache` and `@voltro/kv` stopped measuring the machine. Test-only; no product code changed.
83
+
84
+ Both wrote a key with `ttlMs: 150`, asserted it was still there, then slept 300 ms and asserted it was gone. The second half is fine — waiting LONGER only strengthens "it expired". The first half was a race: the write and the read are two round-trips, so on a loaded runner the key legitimately expired before the liveness assertion, and the test reported a defect that was not there. It failed exactly that way on a release gate, in the keydb engine, while passing locally with 24/24 green.
85
+
86
+ Now: a 2 s window, so liveness has real headroom rather than 150 ms of it, and the expiry is awaited as a CONDITION (`awaitGone` polls) rather than as a duration. Idle machines finish in about the TTL; loaded ones take as long as they need; a key that never expires still fails, because the ceiling is a failure mode and not a timing assumption.
87
+
88
+ Fixed in BOTH packages in one change. The two files carried the identical construction, and this repo's standing lesson is that a fix landing in one copy of a duplicated shape leaves the other one broken — `@voltro/kv` had not failed yet, which is a statement about luck rather than about the test.
89
+
90
+ `@voltro/kv`'s header also pointed at `../cache/test/docker-compose.yml` for bringing the engines up. That path does not exist; there is one compose file, at the repo root.
91
+
92
+ ---
93
+
42
94
  ## [0.39.0] — 2026-08-16
43
95
 
44
96
  ### Added
@@ -0,0 +1,2 @@
1
+ import { c as e, l as t } from "./apiBuild-D9FB13_2.js";
2
+ export { e as runApiBuild, t as runServeBundleBuild };
@@ -1,4 +1,4 @@
1
- import { f as e } from "./dev-gqpnzVhI.js";
1
+ import { f as e } from "./dev-3mgc8c-H.js";
2
2
  import { ut as t } from "./webDev-CTpSY-e_.js";
3
3
  import { t as n } from "./dialectDriver-czCHYpeH.js";
4
4
  import { dirname as r, isAbsolute as i, join as a, relative as o, resolve as s } from "node:path";
package/dist/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { r as e } from "./commands-BD9eBRY3.js";
2
+ import { r as e } from "./commands-D6aW_6AR.js";
3
3
  import { a as t } from "./nodeEnvironment-cGFAj1J8.js";
4
4
  import { t as n } from "./loadEnv-D9nEOClM.js";
5
5
  import { n as r } from "./cliError-BmdYnghb.js";
@@ -1,8 +1,8 @@
1
- import { hn as e } from "./dev-gqpnzVhI.js";
1
+ import { hn as e } from "./dev-3mgc8c-H.js";
2
2
  import { D as t, G as n, K as r, O as i, S as a, W as o, Y as s, a as c, b as l, d as u, f as d, k as f, s as p, st as m, ut as h, v as g, x as _, y as v } from "./webDev-CTpSY-e_.js";
3
3
  import { t as y } from "./cliRuntime-Dh7UDinH.js";
4
4
  import { a as b } from "./renderModeScan-D7J1B7Kw.js";
5
- import { i as x, o as S, s as C } from "./apiBuild-DGalUk9v.js";
5
+ import { i as x, o as S, s as C } from "./apiBuild-D9FB13_2.js";
6
6
  import { n as w } from "./renderProfile-1OWWAAtx.js";
7
7
  import { dirname as T, join as E, resolve as D } from "node:path";
8
8
  import { existsSync as O, promises as k } from "node:fs";
@@ -474,7 +474,7 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
474
474
  file: n.file,
475
475
  reason: n.reason
476
476
  });
477
- let { regenerateRpcGroup: r } = await import("./codegenCommand-W7SDdiAQ.js"), i = await r(e);
477
+ let { regenerateRpcGroup: r } = await import("./codegenCommand-CxOyKmc1.js"), i = await r(e);
478
478
  if (i.kind === "refused") {
479
479
  F.warn("could not regenerate the rpc group — building against what is on disk", { reason: i.reason });
480
480
  return;
@@ -486,10 +486,10 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
486
486
  }, K = async (e) => {
487
487
  let t = await u(e);
488
488
  if (!t) {
489
- let { loadApiConfig: t } = await import("./dev-alhkKoEX.js"), n = await t(e);
489
+ let { loadApiConfig: t } = await import("./dev-CjJAasDs.js"), n = await t(e);
490
490
  if (n) {
491
491
  F.info("building api app", { app: n.name ?? "(unnamed)" }), await G(e);
492
- let { runApiBuild: t, runServeBundleBuild: r } = await import("./apiBuild-2GvK8CUB.js");
492
+ let { runApiBuild: t, runServeBundleBuild: r } = await import("./apiBuild-BmR_bIxN.js");
493
493
  await t(e);
494
494
  try {
495
495
  await r(e);
@@ -708,7 +708,7 @@ var N = A({ scope: "voltro:build" }), P = async (e) => {
708
708
  return t.ran ? t.exitCode : (yield* j.logError("no web app found at this path", { hint: "looked for app.config.ts with `type: 'web'`" }), 1);
709
709
  }), J = async (t) => {
710
710
  if (t.includes("--target")) {
711
- let { runSdkBuildCommand: e } = await import("./sdkgen-C4roLErM.js");
711
+ let { runSdkBuildCommand: e } = await import("./sdkgen-C8zz10-X.js");
712
712
  return e(t);
713
713
  }
714
714
  let n = t.find((e) => !e.startsWith("-")) ?? process.cwd(), r = await y(q(n), { scope: "voltro:build" }), i = e(n);
@@ -4,7 +4,7 @@ import { r } from "./appGraph-KGDPTuTy.js";
4
4
  import { n as i } from "./cliOutput-D1tSBoRM.js";
5
5
  import { n as a, o, r as s, t as c } from "./inspectFetch-EMuhTG_9.js";
6
6
  import { r as l } from "./fileTaxonomy-CJfgOllU.js";
7
- import { x as u } from "./doctorCommand-Bvs-BQrM.js";
7
+ import { x as u } from "./doctorCommand-oLuzc-aC.js";
8
8
  import { resolve as d } from "node:path";
9
9
  import { readdirSync as f, statSync as p } from "node:fs";
10
10
  //#region src/observedDiff.ts
@@ -141,12 +141,12 @@ var m = (e) => e === void 0 ? [] : typeof e == "string" ? [e] : e, h = /* @__PUR
141
141
  let t = e.severity === "error" ? "✗ error" : "⚠ warn", n = e.file ? ` (${e.file})` : "";
142
142
  return `${t} ${e.rule} ${e.node}${n}\n ${e.breaks.join("; ")}\n fix: ${e.fix}`;
143
143
  }).join("\n"), C = async (e) => {
144
- let { walk: t, loadDiscovered: n, loadApiConfig: r } = await import("./dev-alhkKoEX.js"), { buildRpcEntry: i } = await import("./manifestBuild-j0n109tt.js"), { buildCapabilityManifest: a } = await import("./inspect-DUze25t0.js"), { relative: o } = await import("node:path"), s = await n(await t(e)), c = (t, n, r) => i(t, n, o(e, r)), l = [
144
+ let { walk: t, loadDiscovered: n, loadApiConfig: r } = await import("./dev-CjJAasDs.js"), { buildRpcEntry: i } = await import("./manifestBuild-j0n109tt.js"), { buildCapabilityManifest: a } = await import("./inspect-DUze25t0.js"), { relative: o } = await import("node:path"), s = await n(await t(e)), c = (t, n, r) => i(t, n, o(e, r)), l = [
145
145
  ...s.queries.map((e) => c(e.descriptor, "query", e.file)),
146
146
  ...s.mutations.map((e) => c(e.descriptor, "mutation", e.file)),
147
147
  ...s.actions.map((e) => c(e.descriptor, "action", e.file)),
148
148
  ...s.streams.map((e) => c(e.descriptor, "stream", e.file))
149
- ], { assembleFrameworkTables: u } = await import("./frameworkTableAssembly-YyVe32Cb.js"), d = await u({ root: e }).catch((e) => (console.warn(`\n⚠ plugin tables could not be collected — this report is INCOMPLETE.\n ${e instanceof Error ? e.message.split("\n")[0] : String(e)}\n`), [])), f = new Set(s.tables.map((e) => e.tableName)), p = [...[...f].map((e) => ({ name: e })), ...d.map((e) => e.tableName).filter((e) => !f.has(e)).map((e) => ({
149
+ ], { assembleFrameworkTables: u } = await import("./frameworkTableAssembly-DgylYh9_.js"), d = await u({ root: e }).catch((e) => (console.warn(`\n⚠ plugin tables could not be collected — this report is INCOMPLETE.\n ${e instanceof Error ? e.message.split("\n")[0] : String(e)}\n`), [])), f = new Set(s.tables.map((e) => e.tableName)), p = [...[...f].map((e) => ({ name: e })), ...d.map((e) => e.tableName).filter((e) => !f.has(e)).map((e) => ({
150
150
  name: e,
151
151
  framework: !0
152
152
  }))], m = await r(e).then((e) => e?.plugins ?? []).catch(() => []);
@@ -1,2 +1,2 @@
1
- import { n as e, r as t, t as n } from "./checkCommand-CBtynBKW.js";
1
+ import { n as e, r as t, t as n } from "./checkCommand-Bf6oMao4.js";
2
2
  export { n as offlineManifest, e as runCheckCommand, t as toInput };
@@ -1,4 +1,4 @@
1
- import { l as e, z as t } from "./dev-gqpnzVhI.js";
1
+ import { l as e, z as t } from "./dev-3mgc8c-H.js";
2
2
  import { rt as n } from "./webDev-CTpSY-e_.js";
3
3
  import { r } from "./codegen-CbpGCWLG.js";
4
4
  import { basename as i, join as a, relative as o, resolve as s } from "node:path";
@@ -91,7 +91,7 @@ var c = () => {
91
91
  name: "dev",
92
92
  summary: "Start the local development server (auto-discovers routes / mutations).",
93
93
  status: "wired",
94
- run: (e) => import("./dev-alhkKoEX.js").then((t) => t.runDev(e)),
94
+ run: (e) => import("./dev-CjJAasDs.js").then((t) => t.runDev(e)),
95
95
  help: {
96
96
  usage: "[app]",
97
97
  examples: [["voltro dev", "boot the app in the current directory"], ["voltro dev apps/acme/api", "boot a specific app"]],
@@ -109,7 +109,7 @@ var c = () => {
109
109
  name: "dashboard",
110
110
  summary: "Serve the DevTools dashboard standalone (from @voltro/dashboard). Targets via VOLTRO_DASHBOARD_APPS; --port to override.",
111
111
  status: "wired",
112
- run: (e) => import("./dashboardCommand-7qGylm0F.js").then((t) => t.runDashboardCommand(e)),
112
+ run: (e) => import("./dashboardCommand-CwTZh-XZ.js").then((t) => t.runDashboardCommand(e)),
113
113
  help: {
114
114
  usage: "[--port <n>]",
115
115
  flags: [["--port <n>", "port to serve the dashboard on"]],
@@ -121,7 +121,7 @@ var c = () => {
121
121
  name: "check",
122
122
  summary: "Verify the app graph (blast-radius checks) against a running api; LLM-shaped --json diagnostics. Flags: --json, --process <p>, --diff removeTable:<name>.",
123
123
  status: "wired",
124
- run: (e) => import("./checkCommand-BV56Pcc1.js").then((t) => t.runCheckCommand(e)),
124
+ run: (e) => import("./checkCommand-D9qK_gtA.js").then((t) => t.runCheckCommand(e)),
125
125
  help: {
126
126
  usage: "[--json] [--offline] [--process <name>] [--diff removeTable:<name>]",
127
127
  flags: [
@@ -155,7 +155,7 @@ var c = () => {
155
155
  name: "webhooks",
156
156
  summary: "Outbound-webhook artefacts. `consumer` generates the ZERO-DEPENDENCY Standard-Webhooks verification package a subscriber installs, from this app's own declared events; `events` lists the events a subscriber can register for. Usage: voltro webhooks <consumer|events> [path] [--out <dir>] [--name <pkg>] [--json].",
157
157
  status: "wired",
158
- run: (e) => import("./webhooksCommand-BVvOtZ1B.js").then((t) => t.runWebhooksCommand(e)),
158
+ run: (e) => import("./webhooksCommand-EccPZQZ4.js").then((t) => t.runWebhooksCommand(e)),
159
159
  help: {
160
160
  usage: "<consumer|events> [path] [--out <dir>] [--name <pkg>] [--json]",
161
161
  flags: [
@@ -171,7 +171,7 @@ var c = () => {
171
171
  name: "evolve",
172
172
  summary: "Schema-evolution copilot: propose an observed-graph-driven codemod + a branch-verified backfill for a schema change (rename/retype/split/drop a column, rename a table). Dry-run by default; --write applies. Usage: voltro evolve rename-column <table>.<col> --to <newName> [--write] [--json].",
173
173
  status: "wired",
174
- run: (e) => import("./evolveCommand-C4-NlFbd.js").then((t) => t.runEvolveCommand(e)),
174
+ run: (e) => import("./evolveCommand-CWhBoe_P.js").then((t) => t.runEvolveCommand(e)),
175
175
  help: {
176
176
  usage: "<rename-column|rename-table|retype-column|split-column|drop-column> <target> [--to <new>] [--write]",
177
177
  flags: [
@@ -188,7 +188,7 @@ var c = () => {
188
188
  name: "codegen",
189
189
  summary: "Emit rpcGroup.generated.ts from discovered route / mutation descriptors.",
190
190
  status: "wired",
191
- run: (e) => import("./codegenCommand-W7SDdiAQ.js").then((t) => t.runCodegenCommand(e)),
191
+ run: (e) => import("./codegenCommand-CxOyKmc1.js").then((t) => t.runCodegenCommand(e)),
192
192
  help: {
193
193
  usage: "[app]",
194
194
  examples: [["voltro codegen", "regenerate rpcGroup.generated.ts for the app in the cwd"]],
@@ -280,7 +280,7 @@ var c = () => {
280
280
  name: "env",
281
281
  summary: "Inspect/sync the typed-env manifest. Subcommands: check (default), sync (.env.example), types (env.generated.d.ts for CI tsc), turbo.",
282
282
  status: "wired",
283
- run: (e) => import("./envCommand-B1-Zm85H.js").then((t) => t.runEnvCommand(e)),
283
+ run: (e) => import("./envCommand-CAkSgBbh.js").then((t) => t.runEnvCommand(e)),
284
284
  help: {
285
285
  usage: "[check|sync|types|turbo] [--force]",
286
286
  flags: [["--force", "overwrite the generated file instead of refusing on a conflict"]],
@@ -309,12 +309,12 @@ var c = () => {
309
309
  run: async (e) => {
310
310
  let t = e.find((e) => !e.startsWith("-")) ?? process.cwd();
311
311
  if (e.includes("--preflight")) {
312
- let { runServePreflight: e } = await import("./doctorCommand-CVXfRrng.js");
312
+ let { runServePreflight: e } = await import("./doctorCommand-Cghssndo.js");
313
313
  return e(a(t), !0);
314
314
  }
315
315
  let { tryRunWebServe: n } = await import("./webDev-id3I5PvG.js"), r = await n(a(t));
316
316
  if (!r.ran) {
317
- let { runServeDispatch: t } = await import("./serveCommand-CNR0gI9V.js");
317
+ let { runServeDispatch: t } = await import("./serveCommand-CW-goXvh.js");
318
318
  return t(e);
319
319
  }
320
320
  return r.exitCode;
@@ -342,13 +342,13 @@ var c = () => {
342
342
  handlesHelp: !0,
343
343
  summary: "Preflight an app for production: the precompiled serve bundle, hand-rolled primitives (naming the shipped one), @voltro/* version skew, executors with no access check, `.serverOnly()` leaks, and junction-FK gaps.",
344
344
  status: "wired",
345
- run: (e) => import("./doctorCommand-CVXfRrng.js").then((t) => t.runDoctorCommand(e))
345
+ run: (e) => import("./doctorCommand-Cghssndo.js").then((t) => t.runDoctorCommand(e))
346
346
  },
347
347
  {
348
348
  name: "build",
349
349
  summary: "Production build for a web app (vite build + per-page SSG pre-render).",
350
350
  status: "wired",
351
- run: (e) => import("./build-CfF6t0UM.js").then((t) => t.runBuildCommand(e)),
351
+ run: (e) => import("./build-DORV5mLM.js").then((t) => t.runBuildCommand(e)),
352
352
  help: {
353
353
  usage: "[app] [--target <t>]",
354
354
  flags: [["--target <t>", "build target"]],
@@ -364,7 +364,7 @@ var c = () => {
364
364
  name: "prune-runtime",
365
365
  summary: "Trim a deployed web tree’s node_modules to the reachable runtime set (standalone image slimming).",
366
366
  status: "wired",
367
- run: (e) => import("./runtimeTrace-DzZOCd94.js").then((t) => t.runPruneRuntimeCommand(e)),
367
+ run: (e) => import("./runtimeTrace-gNXeLf6H.js").then((t) => t.runPruneRuntimeCommand(e)),
368
368
  hidden: !0
369
369
  },
370
370
  {
@@ -382,7 +382,7 @@ var c = () => {
382
382
  name: "dormancy",
383
383
  summary: "Single-node scale-to-zero: front the API with a wake-orchestrator that stops the app when idle and brings it back on a request or a due wakeup (cron/workflow). Needs a SQL store. Flags: --port, --app-port, --idle-grace-ms, --tick-ms.",
384
384
  status: "wired",
385
- run: (e) => import("./dormancyCommand-B-PPHc9Q.js").then((t) => t.runDormancyCommand(e)),
385
+ run: (e) => import("./dormancyCommand-Bxe4WtHU.js").then((t) => t.runDormancyCommand(e)),
386
386
  help: {
387
387
  usage: "[app] [--port <n>] [--app-port <n>] [--idle-grace-ms <n>] [--tick-ms <n>]",
388
388
  flags: [
@@ -469,7 +469,7 @@ var c = () => {
469
469
  name: "data",
470
470
  summary: "Export/import + backup/restore of app data. Logical (rows + optional assets): export <dir> [--tenant <id>|--tables a,b] [--assets] [--compression zstd|gzip|none] [--consistency live|snapshot]; import <dir> [--assets] [--no-verify]. Native (rows ONLY — no blobs): backup <dir> / restore <dir> (pg_dump/mariadb-dump/…). Resumable; typed-NDJSON; content-addressed assets on the logical path.",
471
471
  status: "wired",
472
- run: (e) => import("./dataCommand-C_F2DYxe.js").then((t) => t.runDataCommand(e)),
472
+ run: (e) => import("./dataCommand-Cc9RiLQZ.js").then((t) => t.runDataCommand(e)),
473
473
  help: {
474
474
  usage: "<export|import|backup|restore> <dir> [options]",
475
475
  flags: [
@@ -537,7 +537,7 @@ var c = () => {
537
537
  name: "embeddings",
538
538
  summary: "Embeddings tooling. Subcommand: backfill <table> --text <field> --vector <field> [--model <m>] [--model-field <f>] [--batch <n>] [--dry-run] — (re)embed rows the vectorEmbedding() mixin missed.",
539
539
  status: "wired",
540
- run: (e) => import("./embeddingsCommand-OKY6XjUf.js").then((t) => t.runEmbeddingsCommand(e)),
540
+ run: (e) => import("./embeddingsCommand-CyNQkFIc.js").then((t) => t.runEmbeddingsCommand(e)),
541
541
  help: {
542
542
  usage: "backfill <table> --text <field> --vector <field> [--model <m>] [--batch <n>] [--dry-run]",
543
543
  flags: [
@@ -1,4 +1,4 @@
1
- import { d as e } from "./dev-gqpnzVhI.js";
1
+ import { d as e } from "./dev-3mgc8c-H.js";
2
2
  import { P as t, j as n } from "./webDev-CTpSY-e_.js";
3
3
  import { t as r } from "./start-ft_KzFTd.js";
4
4
  import { join as i } from "node:path";
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./cliError-BmdYnghb.js";
2
- import { c as t, i as n, o as r } from "./dev-gqpnzVhI.js";
2
+ import { c as t, i as n, o as r } from "./dev-3mgc8c-H.js";
3
3
  import { n as i, t as a } from "./cliArgs-D4p8n7EE.js";
4
4
  import { r as o } from "./dialectDriver-czCHYpeH.js";
5
5
  import { t as s } from "./dataProfile-dW-PsfLB.js";
@@ -37,7 +37,7 @@ import { ADMISSIONS_TABLE as hr, EVENTS_TABLE as gr, PAUSES_TABLE as _r, Workflo
37
37
  import { makeClusterCronLayer as qr, parseShardLockMode as Jr, pollWorkflowStorage as Yr, redriveFailedRun as Xr, resolveRunnerIdentity as Zr, resolveRunnerStorage as Qr, resumeRunFromStep as $r, workflowEngineLayer as ei } from "@voltro/workflow/cluster";
38
38
  import { appToolDecision as ti, loadAgentMessages as ni, runAgentTurn as ri } from "@voltro/ai";
39
39
  import { actorsTable as ii, allRegisteredTables as ai, and as oi, auditAllTableIndexes as si, bindResidentStore as ci, connectionIdentity as li, contains as ui, drainIdentifierWarnings as di, encryptedColumnsOf as fi, ensureTableRegistered as pi, eq as z, formatIndexAuditIssue as mi, gte as hi, inSet as gi, isEmptyRelationsSpec as _i, isEncrypted as vi, isNotNull as yi, isNull as bi, isSqliteFamily as xi, lt as Si, lte as Ci, notInSubquery as wi, or as Ti, registerCoreTables as Ei, registerDiscoveredRelations as Di, resolveTenantNamespace as Oi, runWithWriteAttribution as ki, serverOnlyColumns as Ai, setResidencyConfig as ji, startsWith as Mi, validateRegisteredRelations as Ni, walkLeaves as Pi } from "@voltro/database";
40
- import { AggregateError as Fi, AggregateMaintainer as Ii, AggregateNotFound as Li, AggregateRegistry as Ri, AggregateStale as zi, AnalyticsSink as Bi, CostRegistry as Vi, DEFAULT_APPROVAL_EXPIRY_MS as Hi, DORMANCY_WAKEUP_TENANT as Ui, Dispatcher as Wi, EventBus as Gi, ExpectationRegistry as Ki, ExperimentRegistry as qi, InMemoryDataStore as Ji, InstanceMembership as Yi, NO_ROW_FILTER as Xi, OUTBOX_TABLE as Zi, ReactionRateLimiter as Qi, ReplicatedDataStore as $i, SYSTEM_SUBJECT as B, actingUserId as ea, apiKeyManagementRoutes as ta, applyPluginRefRules as na, applyUndoInvocation as ra, approvalsPendingExecutor as ia, assertConnectionCipherConfigured as aa, attachAnalyticsMirror as oa, attachExpectations as sa, attachExperiments as ca, attachFinops as la, awaitServerListening as ua, bindEvent as da, bindMutation as fa, bindStream as pa, bindSubscription as ma, buildTracingLayer as ha, cacheScopeLeaks as ga, cancelWakeup as _a, collectPluginRefRules as va, compileCron as ya, completeOAuthConnect as ba, cronOccurrences as xa, dataStoreApiKeyStore as Sa, dataStoreIdempotencyStore as Ca, decideApprovalInvocation as wa, defineSchedule as Ta, drainOutbox as Ea, enableGraphObservation as Da, enterRequestLoader as V, extractDbCause as Oa, formatCacheScopeLeaks as ka, formatServerOnlyLeaks as Aa, formatUnresolvedSources as ja, frameworkApiKeyStrategy as Ma, getFieldCipher as Na, getResourcePolicy as Pa, getTimelineRecorder as Fa, installApprovalGate as Ia, installPolicyGuardResolver as La, isAggregateDefinition as Ra, isCostBudgetDefinition as za, isEmptyTenantScopedRead as Ba, isExpectationDefinition as Va, isExperimentDefinition as Ha, isOrglessUserSubject as Ua, isScheduleDefinition as Wa, isWorkflowEventTriggerDefinition as Ga, listRetentionConflicts as Ka, listRetentions as H, loadResourceTuples as qa, localityAwareSelector as Ja, makeActionRunner as Ya, makeAdvisoryLockCoordinator as Xa, makeApiKeyService as Za, makeApiKeyUsageBuffer as Qa, makeApiKeyUsageFlusher as $a, makeAppAccess as eo, makeApprovalGate as to, makeAsyncKv as no, makeAuthMiddlewareLayers as ro, makeBufferingSpanProcessor as io, makeConnectionRegistry as ao, makeConnectionResolver as oo, makeConnectionsFacade as so, makeCoordinatedScheduler as co, makeDataLoader as lo, makeDisconnectConnectionExecutor as uo, makeEffectStoreLayer as fo, makeEventPublisher as po, makeEventsFacade as mo, makeLazyWorkflowFacade as ho, makeListConnectionsExecutor as go, makeMutationOutputCodec as _o, makeMutationRunner as vo, makeOneShotQueryRunner as yo, makeOutboxFacade as bo, makePostCommitWorkflowFacade as xo, makeQueryDescriptorProducer as So, makeQueryFinalizer as Co, makeQueryReauthorizer as wo, makeQuerySubscriber as To, makeSchemaRegistry as Eo, makeStartConnectionExecutor as Do, makeSubmitTokenExecutor as Oo, makeUndoCapture as ko, makeWorkflowFacade as Ao, makeWorkflowFacadeWithCallerContext as jo, makeWorkflowLayers as Mo, memoryRywPositionStore as No, nextFiring as Po, noopAnalytics as Fo, noopAnalyticsSpec as Io, observedGraph as Lo, onProcessShutdown as U, parseApprovalInterval as Ro, powerOfTwoSelector as zo, recordSubscriptionDelivery as Bo, recordTimelineEvent as Vo, recordWorkflowRun as Ho, redisRywPositionStore as Uo, redoUndoInvocation as Wo, registerRetention as W, registerWakeup as Go, resolveCurrentRegion as Ko, resolveSecretsBackend as qo, retentionTtlMsFromEnv as G, runProvidedEffect as Jo, runReaction as Yo, sanitizeRedirectTo as Xo, serverOnlyLeaks as Zo, setConnectionResolver as K, setSecretsBackend as Qo, setSystemStoreHandle as $o, setTupleSource as es, settleHandlerBody as ts, singleCoordinator as ns, ssrfGuardHttpClientLayer as rs, startRpcServer as is, startScheduler as as, stripForbiddenForWire as os, sweepRetention as ss, tracingHttpClientLayer as cs, undoCaptureEnabled as ls, undoLogExecutor as us, undoSurfaceEnabled as ds, unresolvedSources as fs, withScopedRequest as ps, wrapStoreWithBootCodec as ms, wrapStoreWithMixinBehaviour as hs } from "@voltro/runtime";
40
+ import { AggregateError as Fi, AggregateMaintainer as Ii, AggregateNotFound as Li, AggregateRegistry as Ri, AggregateStale as zi, AnalyticsSink as Bi, CostRegistry as Vi, DEFAULT_APPROVAL_EXPIRY_MS as Hi, DORMANCY_WAKEUP_TENANT as Ui, Dispatcher as Wi, EventBus as Gi, ExpectationRegistry as Ki, ExperimentRegistry as qi, InMemoryDataStore as Ji, InstanceMembership as Yi, NO_ROW_FILTER as Xi, OUTBOX_TABLE as Zi, ReactionRateLimiter as Qi, ReplicatedDataStore as $i, SYSTEM_SUBJECT as B, actingUserId as ea, apiKeyManagementRoutes as ta, applyPluginRefRules as na, applyUndoInvocation as ra, approvalsPendingExecutor as ia, assertConnectionCipherConfigured as aa, attachAnalyticsMirror as oa, attachExpectations as sa, attachExperiments as ca, attachFinops as la, awaitServerListening as ua, bindEvent as da, bindMutation as fa, bindStream as pa, bindSubscription as ma, buildTracingLayer as ha, cacheScopeLeaks as ga, cancelWakeup as _a, collectPluginRefRules as va, compileCron as ya, completeOAuthConnect as ba, cronOccurrences as xa, dataStoreApiKeyStore as Sa, dataStoreIdempotencyStore as Ca, decideApprovalInvocation as wa, defineSchedule as Ta, drainOutbox as Ea, enableGraphObservation as Da, enterRequestLoader as V, extractDbCause as Oa, formatCacheScopeLeaks as ka, formatServerOnlyLeaks as Aa, formatUnresolvedSources as ja, frameworkApiKeyStrategy as Ma, getFieldCipher as Na, getResourcePolicy as Pa, getTimelineRecorder as Fa, installApprovalGate as Ia, installPolicyGuardResolver as La, isAggregateDefinition as Ra, isCostBudgetDefinition as za, isEmptyTenantScopedRead as Ba, isExpectationDefinition as Va, isExperimentDefinition as Ha, isOrglessUserSubject as Ua, isScheduleDefinition as Wa, isWorkflowEventTriggerDefinition as Ga, listRetentionConflicts as Ka, listRetentions as H, loadResourceTuples as qa, localityAwareSelector as Ja, makeActionRunner as Ya, makeAdvisoryLockCoordinator as Xa, makeApiKeyService as Za, makeApiKeyUsageBuffer as Qa, makeApiKeyUsageFlusher as $a, makeAppAccess as eo, makeApprovalGate as to, makeAsyncKv as no, makeAuthMiddlewareLayers as ro, makeBufferingSpanProcessor as io, makeConnectionRegistry as ao, makeConnectionResolver as oo, makeConnectionsFacade as so, makeCoordinatedScheduler as co, makeDataLoader as lo, makeDisconnectConnectionExecutor as uo, makeEffectStoreLayer as fo, makeEventPublisher as po, makeEventsFacade as mo, makeLazyWorkflowFacade as ho, makeListConnectionsExecutor as go, makeMutationOutputCodec as _o, makeMutationRunner as vo, makeOneShotQueryRunner as yo, makeOutboxFacade as bo, makePostCommitWorkflowFacade as xo, makeQueryDescriptorProducer as So, makeQueryFinalizer as Co, makeQueryReauthorizer as wo, makeQuerySubscriber as To, makeSchemaRegistry as Eo, makeStartConnectionExecutor as Do, makeSubmitTokenExecutor as Oo, makeUndoCapture as ko, makeWorkflowFacade as Ao, makeWorkflowFacadeWithCallerContext as jo, makeWorkflowLayers as Mo, memoryRywPositionStore as No, nextFiring as Po, noopAnalytics as Fo, noopAnalyticsSpec as Io, observedGraph as Lo, onProcessShutdown as U, parseApprovalInterval as Ro, powerOfTwoSelector as zo, recordSubscriptionDelivery as Bo, recordTimelineEvent as Vo, recordWorkflowRun as Ho, redisRywPositionStore as Uo, redoUndoInvocation as Wo, registerDefaultTupleSource as Go, registerRetention as W, registerWakeup as Ko, resolveCurrentRegion as qo, resolveSecretsBackend as Jo, retentionTtlMsFromEnv as G, runProvidedEffect as Yo, runReaction as Xo, sanitizeRedirectTo as Zo, serverOnlyLeaks as Qo, setConnectionResolver as K, setSecretsBackend as $o, setSystemStoreHandle as es, settleHandlerBody as ts, singleCoordinator as ns, ssrfGuardHttpClientLayer as rs, startRpcServer as is, startScheduler as as, stripForbiddenForWire as os, sweepRetention as ss, tracingHttpClientLayer as cs, undoCaptureEnabled as ls, undoLogExecutor as us, undoSurfaceEnabled as ds, unresolvedSources as fs, withScopedRequest as ps, wrapStoreWithBootCodec as ms, wrapStoreWithMixinBehaviour as hs } from "@voltro/runtime";
41
41
  import { isEnvContract as gs } from "@voltro/env";
42
42
  import { SESSION_COOKIE_NAME as _s, readCookie as vs, resolveOptionalSessionSecrets as ys, verifySessionKeyed as bs } from "@voltro/protocol/session";
43
43
  import { randomBytes as xs, randomUUID as Ss } from "node:crypto";
@@ -1294,7 +1294,7 @@ var $s = (e) => {
1294
1294
  };
1295
1295
  }, Tl = (e) => ({
1296
1296
  status: 302,
1297
- headers: { location: Xo(e.startsWith("/") ? e : `/${e}`) },
1297
+ headers: { location: Zo(e.startsWith("/") ? e : `/${e}`) },
1298
1298
  body: ""
1299
1299
  }), El = (e) => process.env.VOLTRO_PUBLIC_URL?.replace(/\/+$/, "") ?? `http://localhost:${e}`, Dl = class extends Error {
1300
1300
  constructor(e) {
@@ -1791,7 +1791,7 @@ var $s = (e) => {
1791
1791
  ...e
1792
1792
  }), l = t.onChange((e) => {
1793
1793
  let t = s.get(e.table);
1794
- if (t !== void 0) for (let { reaction: n, log: r } of t) Yo(n, e, c()).then((t) => {
1794
+ if (t !== void 0) for (let { reaction: n, log: r } of t) Xo(n, e, c()).then((t) => {
1795
1795
  t === "acted" && r.info("reaction: acted", {
1796
1796
  table: e.table,
1797
1797
  op: e.op
@@ -6644,7 +6644,7 @@ ${r.join("\n")}\n A consumer with no producer waits forever and looks exactly l
6644
6644
  let n = Ai(t);
6645
6645
  n.length > 0 && v.set(e, n);
6646
6646
  }
6647
- let ee = v.size === 0 ? [] : r.flatMap((e) => Zo({
6647
+ let ee = v.size === 0 ? [] : r.flatMap((e) => Qo({
6648
6648
  name: e.descriptor.name,
6649
6649
  output: e.descriptor.output,
6650
6650
  source: e.descriptor.source
@@ -6819,7 +6819,7 @@ ${r.join("\n")}\n A consumer with no producer waits forever and looks exactly l
6819
6819
  }
6820
6820
  }
6821
6821
  ee ||= No();
6822
- let y = ig(m.length), b = Ko(), C = b && y.length > 0 ? Ja({
6822
+ let y = ig(m.length), b = qo(), C = b && y.length > 0 ? Ja({
6823
6823
  currentRegion: b,
6824
6824
  replicaRegions: ag(g, y),
6825
6825
  inner: zo()
@@ -6957,7 +6957,7 @@ ${r.join("\n")}\n A consumer with no producer waits forever and looks exactly l
6957
6957
  commandHint: "`voltro dev`"
6958
6958
  });
6959
6959
  let ht = A.length > 0 || Ze.length > 0, j = await Zh(n), gt = Gc(j?.http ?? {});
6960
- Qo(qo(j?.secrets));
6960
+ $o(Jo(j?.secrets));
6961
6961
  let _t = gc(gs(j?.env) ? j.env : void 0, n);
6962
6962
  _t.minted.length > 0 && _t.file !== void 0 && (Z.warn(`minted ${_t.minted.length} project secret(s) into ${zt(n, _t.file)} — unique to this project, gitignored. Your DEPLOYMENT needs its own values (\`voltro secret generate\`).`, {
6963
6963
  keys: _t.minted,
@@ -7356,7 +7356,7 @@ ${r.join("\n")}\n A consumer with no producer waits forever and looks exactly l
7356
7356
  bi();
7357
7357
  });
7358
7358
  let Si = Eo(P);
7359
- $o({
7359
+ es({
7360
7360
  dataStore: R,
7361
7361
  schemaRegistry: Si
7362
7362
  });
@@ -7423,7 +7423,7 @@ ${r.join("\n")}\n A consumer with no producer waits forever and looks exactly l
7423
7423
  }
7424
7424
  ji.length > 0 && (Oi.info("discovered subscribers", { subscribers: ji.map((e) => `${e.id}@${e.definition.table}`) }), Mi = _l(ji, R, Oi, Si, Ni.bus)), Mi && U(() => {
7425
7425
  Mi();
7426
- }), La(), es((e) => qa(R, e.subjectId, e.resourceType, e.resourceId));
7426
+ }), La(), Go((e) => qa(R, e.subjectId, e.resourceType, e.resourceId)) || Z.info("policy guards: using the app-registered tuple source");
7427
7427
  let Fi, Ii = Z.child("outbox"), Li = T.filter((e) => ze.test(e)), zi = Li.length > 0 ? await yl(Li, Ii) : [], Bi = jt(T.filter((e) => Ie.test(e)).length, qe) ? [...zi, {
7428
7428
  file: "<framework>/webhooks",
7429
7429
  id: "voltro-webhook-emit",
@@ -7705,7 +7705,7 @@ ${r.join("\n")}\n A consumer with no producer waits forever and looks exactly l
7705
7705
  userLayers: ko.length,
7706
7706
  pluginLayers: No.length
7707
7707
  });
7708
- let Uo = (e, t) => Jo(e.pipe(F.provide(fo(t)), F.provide(zo), F.provide(gt)));
7708
+ let Uo = (e, t) => Yo(e.pipe(F.provide(fo(t)), F.provide(zo), F.provide(gt)));
7709
7709
  if ((process.env.VOLTRO_INDEX_AUDIT ?? "on") !== "off") {
7710
7710
  let e = si(P), t = process.stdout.isTTY === !0 && (process.env.NO_COLOR ?? "") === "";
7711
7711
  for (let n of e) Z.warn("\n" + mi(n, {
@@ -7732,19 +7732,19 @@ ${r.join("\n")}\n A consumer with no producer waits forever and looks exactly l
7732
7732
  }
7733
7733
  let W = (process.env.VOLTRO_TENANT_ISOLATION ?? j?.tenancy?.isolation) === "namespace";
7734
7734
  W && Z.info("multi-tenancy: PHYSICAL namespace isolation ON — each request runs against its tenant's own namespace (schema/database/attached file). Requests without a resolvable tenant fail closed.");
7735
- let Ko = $(j), G = W && Ko !== "memory" ? await (async () => {
7736
- let e = await S(Ko);
7735
+ let qo = $(j), G = W && qo !== "memory" ? await (async () => {
7736
+ let e = await S(qo);
7737
7737
  return zc({
7738
7738
  tables: ai(),
7739
7739
  sqlLayer: e.makeSqlLayer(Q()),
7740
- dialect: Ko,
7740
+ dialect: qo,
7741
7741
  options: { retryFilter: e.retryFilter },
7742
7742
  log: {
7743
7743
  info: (e, t) => Z.info(e, t),
7744
7744
  error: (e, t, n) => Z.error(e, t ?? {}, n)
7745
7745
  }
7746
7746
  });
7747
- })() : void 0, Yo = await Ch({
7747
+ })() : void 0, Xo = await Ch({
7748
7748
  input: j?.tenancy?.residency,
7749
7749
  namespaceIsolationOn: W,
7750
7750
  makeStoreForUrl: (e, t) => tg(j, $n, ne(Q(), t)),
@@ -7753,15 +7753,15 @@ ${r.join("\n")}\n A consumer with no producer waits forever and looks exactly l
7753
7753
  warn: (e, t) => Z.warn(e, t)
7754
7754
  }
7755
7755
  });
7756
- Yo !== void 0 && U(async () => {
7757
- await Yo.close();
7756
+ Xo !== void 0 && U(async () => {
7757
+ await Xo.close();
7758
7758
  });
7759
- let Xo = Uc({
7759
+ let Zo = Uc({
7760
7760
  store: R,
7761
7761
  schemaRegistry: Si,
7762
7762
  cache: Rr,
7763
7763
  kv: Zr,
7764
- ...Yo === void 0 ? {} : { resolveResidentStore: Yo.resolveStore },
7764
+ ...Xo === void 0 ? {} : { resolveResidentStore: Xo.resolveStore },
7765
7765
  ...Fi === void 0 ? {} : { webhooksService: Fi },
7766
7766
  ...V === void 0 ? {} : { workflowsProxy: V },
7767
7767
  eventTriggers: Ze,
@@ -7771,7 +7771,7 @@ ${r.join("\n")}\n A consumer with no producer waits forever and looks exactly l
7771
7771
  ...Hi === void 0 ? {} : { outbox: { nudge: Hi.nudge } },
7772
7772
  ...ar.active ? { connections: { registry: ar.registry } } : {},
7773
7773
  eventBus: Ni.bus
7774
- }), Zo = async () => {
7774
+ }), Qo = async () => {
7775
7775
  if (Ei.length === 0) return;
7776
7776
  let e = process.env.HOSTNAME ?? `pid-${process.pid}`, t;
7777
7777
  da ? t = ns : aa === "cluster" ? (Z.warn("scheduling.coordination=cluster needs store=postgres — falling back to single (dev/memory)"), t = ns) : aa === "advisoryLock" ? B === "memory" ? (Z.warn("scheduling.coordination=advisoryLock needs a SQL store (the claim-row gate) — falling back to single (memory)"), t = ns) : t = Xa(R, e, {
@@ -7786,7 +7786,7 @@ ${r.join("\n")}\n A consumer with no producer waits forever and looks exactly l
7786
7786
  replicaId: e,
7787
7787
  armSelf: !da,
7788
7788
  dormancy: j?.dormancy ?? "always-on",
7789
- buildContext: ({ traceId: e, scheduleName: t, subject: n }) => Xo({
7789
+ buildContext: ({ traceId: e, scheduleName: t, subject: n }) => Zo({
7790
7790
  subject: n,
7791
7791
  traceId: e
7792
7792
  }, R, void 0, `schedule:${t}`),
@@ -7852,14 +7852,14 @@ ${r.join("\n")}\n A consumer with no producer waits forever and looks exactly l
7852
7852
  }, ys = Lt(), bs = Pf(j?.plugins ?? [], ys), xs = bs.mutation, Ss = bs.action, Cs = bs.query, ws = zl(v), Ts = vo({
7853
7853
  store: R,
7854
7854
  defaultDeny: ws,
7855
- buildContext: (e, t, n) => Xo(e, t, n),
7855
+ buildContext: (e, t, n) => Zo(e, t, n),
7856
7856
  runEffect: (e, t) => Uo(e, t),
7857
7857
  ...xs ? { interceptor: xs } : {},
7858
7858
  recordMetric: (e) => ys.record(e),
7859
7859
  undoCapture: pf()
7860
7860
  }), Es = Ya({
7861
7861
  defaultDeny: ws,
7862
- buildContext: (e) => Xo(e),
7862
+ buildContext: (e) => Zo(e),
7863
7863
  runEffect: (e, t) => Uo(e, t),
7864
7864
  ...Ss ? { interceptor: Ss } : {},
7865
7865
  recordMetric: (e) => ys.record(e)
@@ -7874,7 +7874,7 @@ ${r.join("\n")}\n A consumer with no producer waits forever and looks exactly l
7874
7874
  }
7875
7875
  }), Ps = {
7876
7876
  defaultDeny: ws,
7877
- buildContext: (e) => Xo(e),
7877
+ buildContext: (e) => Zo(e),
7878
7878
  finalize: (e, t) => Ds(e, t.subject),
7879
7879
  provideEffect: (e, t) => e.pipe(F.provide(fo(t)), F.provide(zo), F.provide(gt)),
7880
7880
  ...Cs ? { interceptor: Cs } : {}
@@ -7900,7 +7900,7 @@ ${r.join("\n")}\n A consumer with no producer waits forever and looks exactly l
7900
7900
  for (let e of xo) {
7901
7901
  let t = `stream.${e.descriptor.name}`;
7902
7902
  K[e.descriptor.name] = (n) => pa((t) => ps(t, (t) => {
7903
- let r = Xo(t), i = e.executor(n, r);
7903
+ let r = Zo(t), i = e.executor(n, r);
7904
7904
  return F.isEffect(i) ? i.pipe(F.provide(fo(r.store)), F.provide(zo), F.provide(gt)) : typeof i == "object" && i && typeof i.then == "function" ? F.promise(() => i) : i;
7905
7905
  }), t);
7906
7906
  }
@@ -8021,11 +8021,11 @@ ${r.join("\n")}\n A consumer with no producer waits forever and looks exactly l
8021
8021
  source: "workflow-rpc"
8022
8022
  }).start(e.definition.name, t);
8023
8023
  }, t, `workflow.${e.definition.name}`);
8024
- let Bs = (e, t) => Xo({
8024
+ let Bs = (e, t) => Zo({
8025
8025
  subject: e.subject,
8026
8026
  traceId: e.traceId
8027
8027
  }, R, void 0, `workflow:${t.workflowName}`, { parentExecutionId: t.executionId }), Vs = Uf(j?.plugins ?? [], ys), Hs = Hr, Us = (e, t) => w.emit(e, t), Gs = j?.dormancy === "sleep" ? {
8028
- register: (e, t, n) => Go(R, {
8028
+ register: (e, t, n) => Ko(R, {
8029
8029
  tenantId: n ?? Ui,
8030
8030
  kind: "workflow",
8031
8031
  refId: e,
@@ -8832,7 +8832,7 @@ ${r.join("\n")}\n A consumer with no producer waits forever and looks exactly l
8832
8832
  port: C,
8833
8833
  ws: `ws://localhost:${C}/ws`,
8834
8834
  store: J
8835
- }), Ce?.set({ phase: "ready" }), process.send?.({ type: cl }), process.channel?.unref(), J === "postgres" && Z.info("postgres change-data-capture", { enabled: (process.env.CDC ?? "1") !== "0" }), await Zo();
8835
+ }), Ce?.set({ phase: "ready" }), process.send?.({ type: cl }), process.channel?.unref(), J === "postgres" && Z.info("postgres change-data-capture", { enabled: (process.env.CDC ?? "1") !== "0" }), await Qo();
8836
8836
  try {
8837
8837
  await Nt({
8838
8838
  id: ae,
@@ -1,3 +1,3 @@
1
- import { c as e, d as t, f as n, i as r, u as i } from "./dev-gqpnzVhI.js";
1
+ import { c as e, d as t, f as n, i as r, u as i } from "./dev-3mgc8c-H.js";
2
2
  import "./dialectDriver-czCHYpeH.js";
3
3
  export { r as buildStore, e as loadApiConfig, i as loadDiscovered, t as runDev, n as walk };
@@ -0,0 +1,2 @@
1
+ import { v as e, y as t } from "./doctorCommand-oLuzc-aC.js";
2
+ export { e as runDoctorCommand, t as runServePreflight };