@voltro/cli 0.46.0 → 0.47.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 (93) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/apiBuild-BsooZpw2.js +2 -0
  3. package/dist/{apiBuild-BKdd0I1Z.js → apiBuild-FpHCWiv6.js} +1 -1
  4. package/dist/bin.js +1 -1
  5. package/dist/{build-co6yadYz.js → build-zVygXxGB.js} +7 -7
  6. package/dist/{checkCommand-CXAXTjZL.js → checkCommand-B2Fw73lu.js} +1 -1
  7. package/dist/{checkCommand-B-eiW-G_.js → checkCommand-D0dAKciE.js} +4 -4
  8. package/dist/{codegen-sbN1Y8PB.js → codegen-CrMXs4hb.js} +176 -162
  9. package/dist/codegen-DiMn2KkZ.js +2 -0
  10. package/dist/{codegenCommand-CB6_3sX0.js → codegenCommand-BTtsnRus.js} +3 -3
  11. package/dist/{commands-C-hxgAGr.js → commands-BrFKxnYW.js} +18 -18
  12. package/dist/{dashboardCommand-CEVO0GWF.js → dashboardCommand-D9SjDc8E.js} +1 -1
  13. package/dist/{dataCommand-k0ezbQWa.js → dataCommand-Dl11q14e.js} +2 -2
  14. package/dist/dbCommand-BUD4Fd8v.js +2 -0
  15. package/dist/{dbCommand-BwkyNxn-.js → dbCommand-jbrmzwW_.js} +1 -1
  16. package/dist/{dev-DyoYst4j.js → dev-CaIfZnw5.js} +1 -1
  17. package/dist/{dev-8hTEnN6s.js → dev-RjB7eE_B.js} +2 -2
  18. package/dist/doctorCommand-5zv6PN-G.js +2 -0
  19. package/dist/{doctorCommand-B6D7HH1-.js → doctorCommand-D7X29cw6.js} +13 -13
  20. package/dist/{doctorSourceRelations-CPjSwYuZ.js → doctorSourceRelations-Dd48LPvO.js} +15 -10
  21. package/dist/{dormancyCommand-CrPAwOgo.js → dormancyCommand-BGOP27fz.js} +1 -1
  22. package/dist/{embeddingsCommand-DsSxsn_b.js → embeddingsCommand-D72E22bw.js} +1 -1
  23. package/dist/{envCommand-B_NPVGUf.js → envCommand-BHSxz6wC.js} +1 -1
  24. package/dist/{evolveCommand-DUuaCIyn.js → evolveCommand-C2ofGGlz.js} +1 -1
  25. package/dist/{frameworkTableAssembly-BPlPfU07.js → frameworkTableAssembly-BvZ0Lil_.js} +76 -72
  26. package/dist/frameworkTableAssembly-DDKtwsy2.js +2 -0
  27. package/dist/index.js +1 -1
  28. package/dist/{migrate-CM1qwalu.js → migrate-odCPGHPq.js} +2 -2
  29. package/dist/{runtimeTrace-BRNM06vK.js → runtimeTrace-C_OKr0jY.js} +1 -1
  30. package/dist/{sdkgen-CRCw_XcR.js → sdkgen-D9trW7sl.js} +1 -1
  31. package/dist/{serveCommand-CHOr74WM.js → serveCommand-BU0wfV6V.js} +388 -385
  32. package/dist/serveCommand-Bwrn_9Fn.js +2 -0
  33. package/dist/serveEntry.js +1 -1
  34. package/dist/{test-CHb7UwvE.js → test-rXFq4S76.js} +1 -1
  35. package/dist/{webhooksCommand-BRrG_sGf.js → webhooksCommand-BqcWcbuW.js} +1 -1
  36. package/package.json +17 -17
  37. package/templates/AGENTS.md +1 -1
  38. package/templates/agent-docs/_index.md +1 -1
  39. package/templates/agent-docs/cli.md +28 -0
  40. package/templates/agent-docs/whats-new.md +14 -160
  41. package/templates/apps/api-ai/package.json +7 -7
  42. package/templates/apps/api-auth/package.json +8 -8
  43. package/templates/apps/api-backend/package.json +7 -7
  44. package/templates/apps/api-backend-deactivation/package.json +7 -7
  45. package/templates/apps/api-backend-mail/package.json +8 -8
  46. package/templates/apps/api-backend-mariadb/package.json +9 -9
  47. package/templates/apps/api-backend-sqlite/package.json +8 -8
  48. package/templates/apps/api-backend-storage/package.json +8 -8
  49. package/templates/apps/api-cms/package.json +10 -10
  50. package/templates/apps/api-collab/package.json +8 -8
  51. package/templates/apps/api-data-advanced/package.json +8 -8
  52. package/templates/apps/api-durable/package.json +8 -8
  53. package/templates/apps/api-feature-flags/package.json +9 -9
  54. package/templates/apps/api-governance/package.json +8 -8
  55. package/templates/apps/api-kv/package.json +8 -8
  56. package/templates/apps/api-moderation/package.json +8 -8
  57. package/templates/apps/api-observability/package.json +8 -8
  58. package/templates/apps/api-ratelimit/package.json +8 -8
  59. package/templates/apps/api-rbac/package.json +8 -8
  60. package/templates/apps/api-rest/package.json +7 -7
  61. package/templates/apps/api-saas/package.json +11 -11
  62. package/templates/apps/api-saas-starter/package.json +10 -10
  63. package/templates/apps/api-search/package.json +8 -8
  64. package/templates/apps/api-status/package.json +8 -8
  65. package/templates/apps/api-versioning/package.json +8 -8
  66. package/templates/apps/api-webhooks/package.json +9 -9
  67. package/templates/apps/changelog/package.json +6 -6
  68. package/templates/apps/edge-functions/package.json +2 -2
  69. package/templates/apps/frontend-admin/package.json +8 -8
  70. package/templates/apps/frontend-app/package.json +9 -9
  71. package/templates/apps/frontend-auth/package.json +8 -8
  72. package/templates/apps/frontend-blank/package.json +7 -7
  73. package/templates/apps/frontend-cms/package.json +9 -9
  74. package/templates/apps/frontend-collab/package.json +10 -10
  75. package/templates/apps/frontend-contact/package.json +7 -7
  76. package/templates/apps/frontend-dashboard/package.json +7 -7
  77. package/templates/apps/frontend-docs/package.json +7 -7
  78. package/templates/apps/frontend-i18n/package.json +6 -6
  79. package/templates/apps/frontend-landing/package.json +7 -7
  80. package/templates/apps/frontend-portal/package.json +8 -8
  81. package/templates/apps/frontend-saas/package.json +8 -8
  82. package/templates/apps/frontend-spa/package.json +7 -7
  83. package/templates/apps/frontend-ssr/package.json +7 -7
  84. package/templates/apps/frontend-ssr-api/package.json +8 -8
  85. package/templates/apps/frontend-static-blog/package.json +6 -6
  86. package/templates/apps/frontend-status/package.json +8 -8
  87. package/templates/apps/mobile-app/package.json +4 -4
  88. package/dist/apiBuild-P2gewrfQ.js +0 -2
  89. package/dist/codegen-DcE2li1i.js +0 -2
  90. package/dist/dbCommand-C2XK63Dd.js +0 -2
  91. package/dist/doctorCommand-Btl2Jz1a.js +0 -2
  92. package/dist/frameworkTableAssembly-Bob3vj9R.js +0 -2
  93. package/dist/serveCommand-BNHMVXyp.js +0 -2
@@ -1,7 +1,7 @@
1
- import { B as e, Sn as t, l as n, u as r, xn as i } from "./dev-8hTEnN6s.js";
1
+ import { B as e, Sn as t, l as n, u as r, xn as i } from "./dev-RjB7eE_B.js";
2
2
  import { dt as a } from "./webDev-B4IEMB0n.js";
3
- import { r as o, u as s } from "./frameworkTableAssembly-BPlPfU07.js";
4
- import { i as c, r as l } from "./codegen-sbN1Y8PB.js";
3
+ import { r as o, u as s } from "./frameworkTableAssembly-BvZ0Lil_.js";
4
+ import { i as c, r as l } from "./codegen-CrMXs4hb.js";
5
5
  import { basename as u, join as d, relative as f, resolve as p } from "node:path";
6
6
  import { promises as m } from "node:fs";
7
7
  import { pathToFileURL as h } from "node:url";
@@ -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-DyoYst4j.js").then((t) => t.runDev(e)),
94
+ run: (e) => import("./dev-CaIfZnw5.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-CEVO0GWF.js").then((t) => t.runDashboardCommand(e)),
112
+ run: (e) => import("./dashboardCommand-D9SjDc8E.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-CXAXTjZL.js").then((t) => t.runCheckCommand(e)),
124
+ run: (e) => import("./checkCommand-B2Fw73lu.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-BRrG_sGf.js").then((t) => t.runWebhooksCommand(e)),
158
+ run: (e) => import("./webhooksCommand-BqcWcbuW.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-DUuaCIyn.js").then((t) => t.runEvolveCommand(e)),
174
+ run: (e) => import("./evolveCommand-C2ofGGlz.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-CB6_3sX0.js").then((t) => t.runCodegenCommand(e)),
191
+ run: (e) => import("./codegenCommand-BTtsnRus.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"]],
@@ -199,7 +199,7 @@ var c = () => {
199
199
  name: "migrate",
200
200
  summary: "Apply the declared schema to the database (alias of `db apply` — diffs declared vs live and emits the ALTERs). `--create-only` for the bootstrap-only CREATE TABLE IF NOT EXISTS path.",
201
201
  status: "wired",
202
- run: (e) => import("./migrate-CM1qwalu.js").then((t) => t.runMigrateCommand(e)),
202
+ run: (e) => import("./migrate-odCPGHPq.js").then((t) => t.runMigrateCommand(e)),
203
203
  help: {
204
204
  usage: "[app] [--create-only]",
205
205
  flags: [["--create-only", "only CREATE TABLE IF NOT EXISTS — never ALTER (bootstrap)"]],
@@ -211,7 +211,7 @@ var c = () => {
211
211
  name: "test",
212
212
  summary: "Run vitest against the app at the cwd (auto-discovers *.test.ts/tsx).",
213
213
  status: "wired",
214
- run: (e) => import("./test-CHb7UwvE.js").then((t) => t.runTestCommand(e)),
214
+ run: (e) => import("./test-rXFq4S76.js").then((t) => t.runTestCommand(e)),
215
215
  help: {
216
216
  usage: "[dir] [filter…] [--watch] [-t <pattern>]",
217
217
  flags: [
@@ -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-B_NPVGUf.js").then((t) => t.runEnvCommand(e)),
283
+ run: (e) => import("./envCommand-BHSxz6wC.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-Btl2Jz1a.js");
312
+ let { runServePreflight: e } = await import("./doctorCommand-5zv6PN-G.js");
313
313
  return e(a(t), !0);
314
314
  }
315
315
  let { tryRunWebServe: n } = await import("./webDev-B79ji8M5.js"), r = await n(a(t));
316
316
  if (!r.ran) {
317
- let { runServeDispatch: t } = await import("./serveCommand-BNHMVXyp.js");
317
+ let { runServeDispatch: t } = await import("./serveCommand-Bwrn_9Fn.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-Btl2Jz1a.js").then((t) => t.runDoctorCommand(e))
345
+ run: (e) => import("./doctorCommand-5zv6PN-G.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-co6yadYz.js").then((t) => t.runBuildCommand(e)),
351
+ run: (e) => import("./build-zVygXxGB.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-BRNM06vK.js").then((t) => t.runPruneRuntimeCommand(e)),
367
+ run: (e) => import("./runtimeTrace-C_OKr0jY.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-CrPAwOgo.js").then((t) => t.runDormancyCommand(e)),
385
+ run: (e) => import("./dormancyCommand-BGOP27fz.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: [
@@ -453,7 +453,7 @@ var c = () => {
453
453
  name: "db",
454
454
  summary: "Database subcommands. Declarative flow: plan, apply, branch, plans, drift [--accept], squash, restore-snapshot. File migrations: generate [name], migrate, rollback, status, files, rollback-file. Data + housekeeping: seed, gc-snapshots, adopt. Credentials at rest: scan-credentials (find plaintext), encrypt-column (migrate a populated column onto .encrypted()).",
455
455
  status: "wired",
456
- run: (e) => import("./dbCommand-C2XK63Dd.js").then((t) => t.runDbCommand(e)),
456
+ run: (e) => import("./dbCommand-BUD4Fd8v.js").then((t) => t.runDbCommand(e)),
457
457
  help: {
458
458
  usage: t(n),
459
459
  examples: [
@@ -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-k0ezbQWa.js").then((t) => t.runDataCommand(e)),
472
+ run: (e) => import("./dataCommand-Dl11q14e.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-DsSxsn_b.js").then((t) => t.runEmbeddingsCommand(e)),
540
+ run: (e) => import("./embeddingsCommand-D72E22bw.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-8hTEnN6s.js";
1
+ import { d as e } from "./dev-RjB7eE_B.js";
2
2
  import { H as t, z as n } from "./webDev-B4IEMB0n.js";
3
3
  import { t as r } from "./start-7HcSIKEp.js";
4
4
  import { join as i } from "node:path";
@@ -1,10 +1,10 @@
1
1
  import { t as e } from "./cliError-BmdYnghb.js";
2
- import { c as t, i as n, o as r, z as i } from "./dev-8hTEnN6s.js";
2
+ import { c as t, i as n, o as r, z as i } from "./dev-RjB7eE_B.js";
3
3
  import { n as a, t as o } from "./cliArgs-D4p8n7EE.js";
4
4
  import { r as s } from "./dialectDriver-czCHYpeH.js";
5
5
  import { t as c } from "./dataProfile-Cm0YVKSy.js";
6
6
  import { o as l, t as u } from "./inspectFetch-EMuhTG_9.js";
7
- import { r as d } from "./dbCommand-BwkyNxn-.js";
7
+ import { r as d } from "./dbCommand-jbrmzwW_.js";
8
8
  import { resolve as f } from "node:path";
9
9
  import { createLogger as p } from "@voltro/logger";
10
10
  import { connectionIdentity as m, normaliseTarget as h, sameDatabase as g, streamTable as _ } from "@voltro/database";
@@ -0,0 +1,2 @@
1
+ import { s as e } from "./dbCommand-jbrmzwW_.js";
2
+ export { e as runDbCommand };
@@ -6,7 +6,7 @@ import { a, i as o, n as s, t as c } from "./cliArgs-D4p8n7EE.js";
6
6
  import { r as l } from "./dialectDriver-czCHYpeH.js";
7
7
  import { a as u } from "./connectionConfig-Bk9IC7D0.js";
8
8
  import { i as d, n as f, r as p, s as m, t as h } from "./seedRunner-Dgsiwk_e.js";
9
- import { n as g, s as _, y as v } from "./frameworkTableAssembly-BPlPfU07.js";
9
+ import { n as g, s as _, y as v } from "./frameworkTableAssembly-BvZ0Lil_.js";
10
10
  import { b as y, x as b } from "./fileConventions-Cof68_BL.js";
11
11
  import { r as x, t as S } from "./inspectGateHint-BjnFubmH.js";
12
12
  import { basename as ee, join as C, relative as w, resolve as T } from "node:path";
@@ -1,3 +1,3 @@
1
- import { c as e, d as t, f as n, i as r, u as i } from "./dev-8hTEnN6s.js";
1
+ import { c as e, d as t, f as n, i as r, u as i } from "./dev-RjB7eE_B.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 };
@@ -10,14 +10,14 @@ import { n as ne, r as S } from "./dialectDriver-czCHYpeH.js";
10
10
  import { a as C, i as re, n as ie, t as ae } from "./connectionConfig-Bk9IC7D0.js";
11
11
  import { a as oe, c as se, i as ce, n as le, o as ue, r as de, t as fe } from "./seedRunner-Dgsiwk_e.js";
12
12
  import { r as pe } from "./devActivity-Dx_3nnGv.js";
13
- import { C as me, E as w, S as he, T as ge, _ as _e, b as ve, d as ye, f as be, g as xe, h as Se, m as Ce, o as we, p as T, r as Te, u as Ee, v as De, w as Oe, x as ke } from "./frameworkTableAssembly-BPlPfU07.js";
13
+ import { C as me, E as w, S as he, T as ge, _ as _e, b as ve, d as ye, f as be, g as xe, h as Se, m as Ce, o as we, p as T, r as Te, u as Ee, v as De, w as Oe, x as ke } from "./frameworkTableAssembly-BvZ0Lil_.js";
14
14
  import { A as Ae, D as je, M as Me, P as Ne, S as Pe, _ as Fe, a as E, b as D, c as Ie, g as O, k as Le, n as Re, o as ze, p as Be, s as Ve, t as He, v as Ue, w as We, x as Ge, y as k } from "./fileConventions-Cof68_BL.js";
15
15
  import { A as Ke, C as qe, D as A, E as j, N as Je, O as Ye, S as Xe, T as Ze, _ as Qe, a as $e, b as et, c as tt, d as nt, f as rt, g as it, h as at, i as ot, l as st, m as ct, o as lt, p as ut, r as dt, s as ft, t as pt, u as mt, v as ht, w as M, x as gt, y as _t } from "./inspect-B7U7Cl_Z.js";
16
16
  import { t as vt } from "./manifestBuild-BK42hu0k.js";
17
17
  import { n as yt } from "./cliRuntime-Dh7UDinH.js";
18
18
  import { n as bt, t as xt } from "./tsxLoader-EuXmSJ1K.js";
19
19
  import { n as St } from "./agentsMd-D6yD7IQv.js";
20
- import { c as Ct, l as wt, o as Tt, r as Et, s as Dt } from "./codegen-sbN1Y8PB.js";
20
+ import { c as Ct, l as wt, o as Tt, r as Et, s as Dt } from "./codegen-CrMXs4hb.js";
21
21
  import { n as Ot } from "./mssqlClusterPatch-_4cE_nun.js";
22
22
  import { p as kt } from "./renderModeScan-D7J1B7Kw.js";
23
23
  import { i as At, n as jt, r as Mt } from "./webhookDiscovery-CphsQe59.js";
@@ -0,0 +1,2 @@
1
+ import { b as e, y as t } from "./doctorCommand-D7X29cw6.js";
2
+ export { t as runDoctorCommand, e as runServePreflight };
@@ -1,8 +1,8 @@
1
- import { Ht as e, Ut as t, Vt as n } from "./dev-8hTEnN6s.js";
1
+ import { Ht as e, Ut as t, Vt as n } from "./dev-RjB7eE_B.js";
2
2
  import { at as r, it as i, ot as a, s as o, st as s, t as c, w as l, y as u } from "./webDev-B4IEMB0n.js";
3
- import { w as d } from "./frameworkTableAssembly-BPlPfU07.js";
3
+ import { w as d } from "./frameworkTableAssembly-BvZ0Lil_.js";
4
4
  import { n as f } from "./pageConvention-cEiRxdab.js";
5
- import { r as p, u as m } from "./apiBuild-BKdd0I1Z.js";
5
+ import { r as p, u as m } from "./apiBuild-FpHCWiv6.js";
6
6
  import { n as h, r as g, t as ee } from "./cliOutput-D1tSBoRM.js";
7
7
  import { n as _, t as te } from "./tsconfigPaths-BWXBWgcl.js";
8
8
  import { n as ne, r as re } from "./fileTaxonomy-CJfgOllU.js";
@@ -1350,7 +1350,7 @@ var le = /* @__PURE__ */ new Set([
1350
1350
  let t = Wt.get(e);
1351
1351
  if (t !== void 0) return t;
1352
1352
  let n = (async () => {
1353
- let { walk: t, loadDiscovered: n } = await import("./dev-DyoYst4j.js"), r = await t(e);
1353
+ let { walk: t, loadDiscovered: n } = await import("./dev-CaIfZnw5.js"), r = await t(e);
1354
1354
  return {
1355
1355
  files: r,
1356
1356
  discovered: await n(r)
@@ -1385,7 +1385,7 @@ var le = /* @__PURE__ */ new Set([
1385
1385
  };
1386
1386
  }), qt = async (e) => {
1387
1387
  try {
1388
- let { missingRelationSources: t } = await import("./doctorSourceRelations-CPjSwYuZ.js"), { sourceKeys: n } = await import("@voltro/protocol"), { readFile: r } = await import("node:fs/promises"), { discovered: i } = await U(e), a = [];
1388
+ let { missingRelationSources: t } = await import("./doctorSourceRelations-Dd48LPvO.js"), { sourceKeys: n } = await import("@voltro/protocol"), { readFile: r } = await import("node:fs/promises"), { discovered: i } = await U(e), a = [];
1389
1389
  for (let e of i.queries) {
1390
1390
  let i = n(e.descriptor.source);
1391
1391
  if (i.length === 0) continue;
@@ -1401,7 +1401,7 @@ var le = /* @__PURE__ */ new Set([
1401
1401
  }, Jt = (e) => e.endsWith(".ts") && !e.endsWith(".server.ts") ? `${e.slice(0, -3)}.server.ts` : void 0, Yt = async (e) => {
1402
1402
  let t = await qt(e);
1403
1403
  if (t === null || t.length === 0) return;
1404
- let { describeMissingRelationSource: n } = await import("./doctorSourceRelations-CPjSwYuZ.js");
1404
+ let { describeMissingRelationSource: n } = await import("./doctorSourceRelations-Dd48LPvO.js");
1405
1405
  console.log(""), console.log(`\u2717 ${t.length} quer${t.length === 1 ? "y" : "ies"} load a relation they do not declare:`);
1406
1406
  for (let e of t) console.log(` ${n(e)}`);
1407
1407
  }, W = async (e) => {
@@ -1459,7 +1459,7 @@ var le = /* @__PURE__ */ new Set([
1459
1459
  }
1460
1460
  }, J = async (r) => {
1461
1461
  try {
1462
- let { loadApiConfig: i } = await import("./dev-DyoYst4j.js"), { discovered: a } = await U(r), o = e(await i(r)), s = {
1462
+ let { loadApiConfig: i } = await import("./dev-CaIfZnw5.js"), { discovered: a } = await U(r), o = e(await i(r)), s = {
1463
1463
  queries: a.queries,
1464
1464
  mutations: a.mutations,
1465
1465
  actions: a.actions,
@@ -1543,7 +1543,7 @@ var le = /* @__PURE__ */ new Set([
1543
1543
  }, nn = async (e) => nt({
1544
1544
  hasWorkflows: async () => (await U(e)).discovered.workflows.length > 0,
1545
1545
  openStore: async () => {
1546
- let { loadApiConfig: t, buildStore: n } = await import("./dev-DyoYst4j.js"), r = await t(e);
1546
+ let { loadApiConfig: t, buildStore: n } = await import("./dev-CaIfZnw5.js"), r = await t(e);
1547
1547
  if (r === null) throw Error("no app.config.ts in this directory");
1548
1548
  let i = await n(r, void 0);
1549
1549
  return {
@@ -1623,7 +1623,7 @@ var le = /* @__PURE__ */ new Set([
1623
1623
  }
1624
1624
  }, ln = async (e) => {
1625
1625
  try {
1626
- let { loadApiConfig: t } = await import("./dev-DyoYst4j.js"), n = (await t(e))?.doctor?.scopeVocabulary;
1626
+ let { loadApiConfig: t } = await import("./dev-CaIfZnw5.js"), n = (await t(e))?.doctor?.scopeVocabulary;
1627
1627
  if (typeof n != "string") return [];
1628
1628
  let [r, i] = n.split("#");
1629
1629
  if (r === void 0 || i === void 0) return [];
@@ -1640,10 +1640,10 @@ var le = /* @__PURE__ */ new Set([
1640
1640
  findings: []
1641
1641
  });
1642
1642
  try {
1643
- let { offlineManifest: n, toInput: r } = await import("./checkCommand-CXAXTjZL.js"), { buildAppGraph: i, checkAppGraph: a } = await import("./appGraph-zuMGKVYX.js"), o = await n(e), s = r(o.manifest, o.tables), c = await ln(e), l = [.../* @__PURE__ */ new Set([...s.scopes ?? [], ...c])];
1643
+ let { offlineManifest: n, toInput: r } = await import("./checkCommand-B2Fw73lu.js"), { buildAppGraph: i, checkAppGraph: a } = await import("./appGraph-zuMGKVYX.js"), o = await n(e), s = r(o.manifest, o.tables), c = await ln(e), l = [.../* @__PURE__ */ new Set([...s.scopes ?? [], ...c])];
1644
1644
  if (l.length === 0) {
1645
1645
  try {
1646
- let { loadAppSchemaInputs: t } = await import("./frameworkTableAssembly-Bob3vj9R.js");
1646
+ let { loadAppSchemaInputs: t } = await import("./frameworkTableAssembly-DDKtwsy2.js");
1647
1647
  await t(e);
1648
1648
  } catch {
1649
1649
  return t("app-not-importable");
@@ -1694,7 +1694,7 @@ var le = /* @__PURE__ */ new Set([
1694
1694
  if (n === void 0 || r.length === 0) return;
1695
1695
  let i = [];
1696
1696
  try {
1697
- let { loadApiConfig: t } = await import("./dev-DyoYst4j.js");
1697
+ let { loadApiConfig: t } = await import("./dev-CaIfZnw5.js");
1698
1698
  i = (await t(e))?.locales ?? [];
1699
1699
  } catch {
1700
1700
  return;
@@ -1725,7 +1725,7 @@ var le = /* @__PURE__ */ new Set([
1725
1725
  }, pn = async (e) => {
1726
1726
  let { discovered: t } = await U(e), n = [];
1727
1727
  try {
1728
- let { loadApiConfig: t } = await import("./dev-DyoYst4j.js");
1728
+ let { loadApiConfig: t } = await import("./dev-CaIfZnw5.js");
1729
1729
  n = ((await t(e))?.plugins ?? []).map((e) => {
1730
1730
  let t = (e.extendSchema?.tables ?? []).map((e) => {
1731
1731
  let t = e;
@@ -41,26 +41,31 @@ var t = (e) => {
41
41
  else if (r === ":" && t === 0) return n;
42
42
  }
43
43
  return -1;
44
- }, s = (n, r, i) => {
44
+ }, s = (e) => {
45
+ let t = /* @__PURE__ */ new Set();
46
+ for (let n of e.matchAll(/\bdatabase\.([A-Za-z_$][\w$]*)\b/g)) t.add(n[1]);
47
+ for (let n of e.matchAll(/\.select\(\s*['"]([A-Za-z_][\w]*)['"]/g)) t.add(n[1]);
48
+ return t;
49
+ }, c = (n, r, i) => {
45
50
  let a = t(i);
46
51
  if (a.size === 0) return [];
47
- let o = new Set(r), s = [], l = /* @__PURE__ */ new Set();
48
- for (let t of r) {
52
+ let o = new Set(r), c = [], u = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set([...s(i), ...r]);
53
+ for (let t of d) {
49
54
  let r = e(t);
50
55
  if (r !== void 0) for (let e of a) {
51
56
  let i = r[e];
52
57
  if (i === void 0) continue;
53
58
  let a = [{
54
- table: c(i.target),
59
+ table: l(i.target),
55
60
  kind: "target"
56
61
  }, {
57
- table: c(i.through),
62
+ table: l(i.through),
58
63
  kind: "junction"
59
64
  }];
60
65
  for (let r of a) {
61
66
  if (r.table === void 0 || o.has(r.table)) continue;
62
67
  let i = `${e}:${r.table}`;
63
- l.has(i) || (l.add(i), s.push({
68
+ u.has(i) || (u.add(i), c.push({
64
69
  procedure: n,
65
70
  from: t,
66
71
  relation: e,
@@ -70,14 +75,14 @@ var t = (e) => {
70
75
  }
71
76
  }
72
77
  }
73
- return s;
74
- }, c = (e) => {
78
+ return c;
79
+ }, l = (e) => {
75
80
  try {
76
81
  let t = (typeof e == "function" ? e() : e)?.tableName;
77
82
  return typeof t == "string" && t.length > 0 ? t : void 0;
78
83
  } catch {
79
84
  return;
80
85
  }
81
- }, l = (e) => `${e.procedure}: eager-loads \`${e.relation}\` from '${e.from}' but does not declare '${e.missing}' in \`source:\`` + (e.kind === "junction" ? " (the junction table — a link added or removed does not move the target row)" : "") + ` — the view will not update when '${e.missing}' changes.`;
86
+ }, u = (e) => `${e.procedure}: eager-loads \`${e.relation}\` from '${e.from}' but does not declare '${e.missing}' in \`source:\`` + (e.kind === "junction" ? " (the junction table — a link added or removed does not move the target row)" : "") + ` — the view will not update when '${e.missing}' changes.`;
82
87
  //#endregion
83
- export { l as describeMissingRelationSource, s as missingRelationSources };
88
+ export { u as describeMissingRelationSource, c as missingRelationSources };
@@ -1,4 +1,4 @@
1
- import { c as e, i as t } from "./dev-8hTEnN6s.js";
1
+ import { c as e, i as t } from "./dev-RjB7eE_B.js";
2
2
  import { n, t as r } from "./cliArgs-D4p8n7EE.js";
3
3
  import { r as i } from "./appPort-B_HpJ_ck.js";
4
4
  import { resolve as a } from "node:path";
@@ -1,4 +1,4 @@
1
- import { c as e, i as t } from "./dev-8hTEnN6s.js";
1
+ import { c as e, i as t } from "./dev-RjB7eE_B.js";
2
2
  import { Effect as n } from "effect";
3
3
  import { embedMany as r } from "@voltro/ai";
4
4
  //#region src/embeddingsBackfill.ts
@@ -1,4 +1,4 @@
1
- import { c as e } from "./dev-8hTEnN6s.js";
1
+ import { c as e } from "./dev-RjB7eE_B.js";
2
2
  import { _t as t, gt as n, mt as r, pt as i } from "./webDev-B4IEMB0n.js";
3
3
  import { join as a } from "node:path";
4
4
  import { promises as o } from "node:fs";
@@ -1,5 +1,5 @@
1
1
  import { n as e } from "./cliOutput-D1tSBoRM.js";
2
- import { t } from "./checkCommand-B-eiW-G_.js";
2
+ import { t } from "./checkCommand-D0dAKciE.js";
3
3
  import { i as n, n as r } from "./codemodRunner-DSZjgyCL.js";
4
4
  import { basename as i, join as a, resolve as o } from "node:path";
5
5
  import { branchNamespaceName as s, planBranchProvision as c } from "@voltro/database";