@voltro/cli 0.50.0 → 0.51.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 (111) hide show
  1. package/CHANGELOG.md +160 -0
  2. package/dist/{apiBuild-CFYXo06U.js → apiBuild-CPDHXF72.js} +2 -2
  3. package/dist/apiBuild-GDKuGOMV.js +2 -0
  4. package/dist/appGraph-CFmFKHb2.js +2 -0
  5. package/dist/appGraph-yRuKjOba.js +111 -0
  6. package/dist/bin.js +1 -1
  7. package/dist/{build-CnSH-zru.js → build-DETLZAFt.js} +271 -240
  8. package/dist/{checkCommand-OL41BMIb.js → checkCommand-CWcnDArJ.js} +1 -1
  9. package/dist/{checkCommand-Do3SQbLx.js → checkCommand-DNuPiWMc.js} +56 -46
  10. package/dist/{codegenCommand-BJzaRz6q.js → codegenCommand-BNBHcNNj.js} +2 -2
  11. package/dist/{codemodRunner-De3k0pRd.js → codemodRunner-BDVixlSw.js} +278 -136
  12. package/dist/{commands-By23Ljny.js → commands-B1OiS9bX.js} +24 -23
  13. package/dist/{dashboardCommand-DN1rAABE.js → dashboardCommand-C-vvPY1B.js} +5 -5
  14. package/dist/{dataCommand-B93TUBIx.js → dataCommand-C1GxXW5q.js} +458 -384
  15. package/dist/dbCommand-C27HIsGE.js +2 -0
  16. package/dist/{dbCommand-Bf7Cy0mn.js → dbCommand-If4Y1xQ-.js} +1 -1
  17. package/dist/{dev-BWwE0QjK.js → dev-CK522MV5.js} +1 -1
  18. package/dist/{dev-1yu42ubu.js → dev-kdAg9Q7l.js} +1246 -1246
  19. package/dist/doctorCommand-BK4l18eG.js +2 -0
  20. package/dist/{doctorCommand-y-EbP8st.js → doctorCommand-nKmeW78u.js} +42 -26
  21. package/dist/{doctorSourceRelations-Dd48LPvO.js → doctorSourceRelations-c5mlN5HI.js} +66 -34
  22. package/dist/{dormancyCommand-Dc7KRNCG.js → dormancyCommand-CY3wa_SW.js} +1 -1
  23. package/dist/{embeddingsCommand-kPs132bB.js → embeddingsCommand-BDLIgje_.js} +1 -1
  24. package/dist/{envCommand-E12zSt51.js → envCommand-C6V_xVlT.js} +13 -13
  25. package/dist/{evolveCommand-B3nagPVc.js → evolveCommand-D3c4DSfN.js} +2 -2
  26. package/dist/{generateCommand-CcyvH2ve.js → generateCommand-DTNPGjxo.js} +1 -1
  27. package/dist/index.js +1 -1
  28. package/dist/{infoCommand-Cq0Yz98u.js → infoCommand-BnRFEF1o.js} +1 -1
  29. package/dist/{inspect-B7U7Cl_Z.js → inspect-CtL_xTbu.js} +1 -0
  30. package/dist/inspect-CuGDYES0.js +2 -0
  31. package/dist/manifestBuild-CPjhvM62.js +2 -0
  32. package/dist/{manifestBuild-BK42hu0k.js → manifestBuild-CuU1VrSm.js} +2 -2
  33. package/dist/{migrate-D3MK9BpK.js → migrate-DehuBakM.js} +1 -1
  34. package/dist/{runtimeTrace-BpLUcrfy.js → runtimeTrace-ZsBU7Tkx.js} +1 -1
  35. package/dist/{sdkgen-dl4-WKF6.js → sdkgen-O4XqWOjM.js} +1 -1
  36. package/dist/serveCommand-BRnPCxVd.js +2 -0
  37. package/dist/{serveCommand-8CTzQCY0.js → serveCommand-DdiYNBBu.js} +4 -4
  38. package/dist/serveEntry.js +1 -1
  39. package/dist/{start-7HcSIKEp.js → start-BLNmWkLa.js} +331 -327
  40. package/dist/{start-DvlYDyAr.js → start-Dzicuyw8.js} +1 -1
  41. package/dist/startEntry.js +1 -1
  42. package/dist/{updateCommand-i8JbrLAA.js → updateCommand-Bs322Q78.js} +1 -1
  43. package/dist/updateCommand-eXB35SEv.js +2 -0
  44. package/dist/{webDev-B4IEMB0n.js → webDev-B-ubQEMX.js} +283 -224
  45. package/dist/webDev-DposiF3j.js +2 -0
  46. package/dist/{webhooksCommand-B0bdyuQ4.js → webhooksCommand-FLYY9IXh.js} +1 -1
  47. package/package.json +41 -17
  48. package/templates/AGENTS.core.md +15 -5
  49. package/templates/AGENTS.md +16 -6
  50. package/templates/agent-docs/_index.md +1 -1
  51. package/templates/agent-docs/cli.md +92 -3
  52. package/templates/agent-docs/data.md +36 -0
  53. package/templates/agent-docs/internationalization.md +131 -13
  54. package/templates/agent-docs/whats-new.md +73 -27
  55. package/templates/apps/api-ai/package.json +7 -7
  56. package/templates/apps/api-auth/package.json +8 -8
  57. package/templates/apps/api-backend/package.json +7 -7
  58. package/templates/apps/api-backend-deactivation/package.json +7 -7
  59. package/templates/apps/api-backend-mail/package.json +8 -8
  60. package/templates/apps/api-backend-mariadb/package.json +9 -9
  61. package/templates/apps/api-backend-sqlite/package.json +8 -8
  62. package/templates/apps/api-backend-storage/package.json +8 -8
  63. package/templates/apps/api-cms/package.json +10 -10
  64. package/templates/apps/api-collab/package.json +8 -8
  65. package/templates/apps/api-data-advanced/package.json +8 -8
  66. package/templates/apps/api-durable/package.json +8 -8
  67. package/templates/apps/api-feature-flags/package.json +9 -9
  68. package/templates/apps/api-governance/package.json +8 -8
  69. package/templates/apps/api-kv/package.json +8 -8
  70. package/templates/apps/api-moderation/package.json +8 -8
  71. package/templates/apps/api-observability/package.json +8 -8
  72. package/templates/apps/api-ratelimit/package.json +8 -8
  73. package/templates/apps/api-rbac/package.json +8 -8
  74. package/templates/apps/api-rest/package.json +7 -7
  75. package/templates/apps/api-saas/package.json +11 -11
  76. package/templates/apps/api-saas-starter/package.json +10 -10
  77. package/templates/apps/api-search/package.json +8 -8
  78. package/templates/apps/api-status/package.json +8 -8
  79. package/templates/apps/api-versioning/package.json +8 -8
  80. package/templates/apps/api-webhooks/package.json +9 -9
  81. package/templates/apps/changelog/package.json +6 -6
  82. package/templates/apps/edge-functions/package.json +2 -2
  83. package/templates/apps/frontend-admin/package.json +8 -8
  84. package/templates/apps/frontend-app/package.json +9 -9
  85. package/templates/apps/frontend-auth/package.json +8 -8
  86. package/templates/apps/frontend-blank/package.json +7 -7
  87. package/templates/apps/frontend-cms/package.json +9 -9
  88. package/templates/apps/frontend-collab/package.json +10 -10
  89. package/templates/apps/frontend-contact/package.json +7 -7
  90. package/templates/apps/frontend-dashboard/package.json +7 -7
  91. package/templates/apps/frontend-docs/package.json +7 -7
  92. package/templates/apps/frontend-i18n/package.json +6 -6
  93. package/templates/apps/frontend-landing/package.json +7 -7
  94. package/templates/apps/frontend-portal/package.json +8 -8
  95. package/templates/apps/frontend-saas/package.json +8 -8
  96. package/templates/apps/frontend-spa/package.json +7 -7
  97. package/templates/apps/frontend-ssr/package.json +7 -7
  98. package/templates/apps/frontend-ssr-api/package.json +8 -8
  99. package/templates/apps/frontend-static-blog/package.json +6 -6
  100. package/templates/apps/frontend-status/package.json +8 -8
  101. package/templates/apps/mobile-app/package.json +4 -4
  102. package/dist/apiBuild-BWo8KI6n.js +0 -2
  103. package/dist/appGraph-KGDPTuTy.js +0 -110
  104. package/dist/appGraph-zuMGKVYX.js +0 -2
  105. package/dist/dbCommand-Bnl7MSGC.js +0 -2
  106. package/dist/doctorCommand-BmovAwb7.js +0 -2
  107. package/dist/inspect-DUze25t0.js +0 -2
  108. package/dist/manifestBuild-j0n109tt.js +0 -2
  109. package/dist/serveCommand-C_WI4TTG.js +0 -2
  110. package/dist/updateCommand-D91-TZ7E.js +0 -2
  111. package/dist/webDev-B79ji8M5.js +0 -2
@@ -0,0 +1,2 @@
1
+ import { b as e, y as t } from "./doctorCommand-nKmeW78u.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-1yu42ubu.js";
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";
1
+ import { Ht as e, Ut as t, Vt as n } from "./dev-kdAg9Q7l.js";
2
+ import { at as r, ct as i, ot as a, s as o, st as s, t as c, w as l, y as u } from "./webDev-B-ubQEMX.js";
3
3
  import { x as d } from "./frameworkTableAssembly-BwJVEKLr.js";
4
4
  import { n as f } from "./pageConvention-cEiRxdab.js";
5
- import { r as p, u as m } from "./apiBuild-CFYXo06U.js";
5
+ import { r as p, u as m } from "./apiBuild-CPDHXF72.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-BWwE0QjK.js"), r = await t(e);
1353
+ let { walk: t, loadDiscovered: n } = await import("./dev-CK522MV5.js"), r = await t(e);
1354
1354
  return {
1355
1355
  files: r,
1356
1356
  discovered: await n(r)
@@ -1385,25 +1385,41 @@ var le = /* @__PURE__ */ new Set([
1385
1385
  };
1386
1386
  }), qt = async (e) => {
1387
1387
  try {
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 = [];
1388
+ let { missingRelationSources: t } = await import("./doctorSourceRelations-c5mlN5HI.js"), { sourceKeys: n } = await import("@voltro/protocol"), { readFile: r } = await import("node:fs/promises"), { discovered: i } = await U(e), a = [], o = [];
1389
1389
  for (let e of i.queries) {
1390
1390
  let i = n(e.descriptor.source);
1391
1391
  if (i.length === 0) continue;
1392
- let o = Jt(e.file);
1393
- if (o === void 0) continue;
1394
- let s = await r(o, "utf8").catch(() => null);
1395
- s !== null && a.push(...t(e.descriptor.name, i, s));
1392
+ let s = Jt(e.file);
1393
+ if (s === void 0) continue;
1394
+ let c = await r(s, "utf8").catch(() => null);
1395
+ if (c === null) continue;
1396
+ let l = t(e.descriptor.name, i, c);
1397
+ a.push(...l.findings), l.unresolved.length > 0 && o.push({
1398
+ procedure: e.descriptor.name,
1399
+ relations: l.unresolved
1400
+ });
1396
1401
  }
1397
- return a;
1402
+ return {
1403
+ findings: a,
1404
+ unresolved: o
1405
+ };
1398
1406
  } catch {
1399
1407
  return null;
1400
1408
  }
1401
1409
  }, Jt = (e) => e.endsWith(".ts") && !e.endsWith(".server.ts") ? `${e.slice(0, -3)}.server.ts` : void 0, Yt = async (e) => {
1402
1410
  let t = await qt(e);
1403
- if (t === null || t.length === 0) return;
1404
- let { describeMissingRelationSource: n } = await import("./doctorSourceRelations-Dd48LPvO.js");
1405
- console.log(""), console.log(`\u2717 ${t.length} quer${t.length === 1 ? "y" : "ies"} load a relation they do not declare:`);
1406
- for (let e of t) console.log(` ${n(e)}`);
1411
+ if (t === null) return;
1412
+ let n = t.findings;
1413
+ if (n.length > 0) {
1414
+ let { describeMissingRelationSource: e } = await import("./doctorSourceRelations-c5mlN5HI.js");
1415
+ console.log(""), console.log(`\u2717 ${n.length} quer${n.length === 1 ? "y" : "ies"} load a relation they do not declare:`);
1416
+ for (let t of n) console.log(` ${e(t)}`);
1417
+ }
1418
+ if (t.unresolved.length > 0) {
1419
+ console.log(""), console.log(`\u26a0 ${t.unresolved.length} quer${t.unresolved.length === 1 ? "y" : "ies"} could not be fully checked — the base table is neither declared nor readable from the executor:`);
1420
+ for (let e of t.unresolved) console.log(` ${e.procedure}: ${e.relations.map((e) => `\`${e}\``).join(", ")} resolved against no table`);
1421
+ console.log(" declare the base table in `source:` and re-run — relations under it are unchecked until then.");
1422
+ }
1407
1423
  }, W = async (e) => {
1408
1424
  try {
1409
1425
  let { discovered: t } = await U(e);
@@ -1459,7 +1475,7 @@ var le = /* @__PURE__ */ new Set([
1459
1475
  }
1460
1476
  }, J = async (r) => {
1461
1477
  try {
1462
- let { loadApiConfig: i } = await import("./dev-BWwE0QjK.js"), { discovered: a } = await U(r), o = e(await i(r)), s = {
1478
+ let { loadApiConfig: i } = await import("./dev-CK522MV5.js"), { discovered: a } = await U(r), o = e(await i(r)), s = {
1463
1479
  queries: a.queries,
1464
1480
  mutations: a.mutations,
1465
1481
  actions: a.actions,
@@ -1543,7 +1559,7 @@ var le = /* @__PURE__ */ new Set([
1543
1559
  }, nn = async (e) => nt({
1544
1560
  hasWorkflows: async () => (await U(e)).discovered.workflows.length > 0,
1545
1561
  openStore: async () => {
1546
- let { loadApiConfig: t, buildStore: n } = await import("./dev-BWwE0QjK.js"), r = await t(e);
1562
+ let { loadApiConfig: t, buildStore: n } = await import("./dev-CK522MV5.js"), r = await t(e);
1547
1563
  if (r === null) throw Error("no app.config.ts in this directory");
1548
1564
  let i = await n(r, void 0);
1549
1565
  return {
@@ -1623,7 +1639,7 @@ var le = /* @__PURE__ */ new Set([
1623
1639
  }
1624
1640
  }, ln = async (e) => {
1625
1641
  try {
1626
- let { loadApiConfig: t } = await import("./dev-BWwE0QjK.js"), n = (await t(e))?.doctor?.scopeVocabulary;
1642
+ let { loadApiConfig: t } = await import("./dev-CK522MV5.js"), n = (await t(e))?.doctor?.scopeVocabulary;
1627
1643
  if (typeof n != "string") return [];
1628
1644
  let [r, i] = n.split("#");
1629
1645
  if (r === void 0 || i === void 0) return [];
@@ -1640,7 +1656,7 @@ var le = /* @__PURE__ */ new Set([
1640
1656
  findings: []
1641
1657
  });
1642
1658
  try {
1643
- let { offlineManifest: n, toInput: r } = await import("./checkCommand-OL41BMIb.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])];
1659
+ let { offlineManifest: n, toInput: r } = await import("./checkCommand-CWcnDArJ.js"), { buildAppGraph: i, checkAppGraph: a } = await import("./appGraph-CFmFKHb2.js"), o = await n(e), s = r(o.manifest, o.tables), c = await ln(e), l = [.../* @__PURE__ */ new Set([...s.scopes ?? [], ...c])];
1644
1660
  if (l.length === 0) {
1645
1661
  try {
1646
1662
  let { loadAppSchemaInputs: t } = await import("./frameworkTableAssembly-CVDB2hCq.js");
@@ -1694,7 +1710,7 @@ var le = /* @__PURE__ */ new Set([
1694
1710
  if (n === void 0 || r.length === 0) return;
1695
1711
  let i = [];
1696
1712
  try {
1697
- let { loadApiConfig: t } = await import("./dev-BWwE0QjK.js");
1713
+ let { loadApiConfig: t } = await import("./dev-CK522MV5.js");
1698
1714
  i = (await t(e))?.locales ?? [];
1699
1715
  } catch {
1700
1716
  return;
@@ -1712,7 +1728,7 @@ var le = /* @__PURE__ */ new Set([
1712
1728
  if (!S(t)) return !1;
1713
1729
  let n = [];
1714
1730
  try {
1715
- let { walkPagesTree: e } = await import("./webDev-B79ji8M5.js");
1731
+ let { walkPagesTree: e } = await import("./webDev-DposiF3j.js");
1716
1732
  n = (await e(t)).pages.map((e) => e.pattern);
1717
1733
  } catch {
1718
1734
  return !1;
@@ -1725,7 +1741,7 @@ var le = /* @__PURE__ */ new Set([
1725
1741
  }, pn = async (e) => {
1726
1742
  let { discovered: t } = await U(e), n = [];
1727
1743
  try {
1728
- let { loadApiConfig: t } = await import("./dev-BWwE0QjK.js");
1744
+ let { loadApiConfig: t } = await import("./dev-CK522MV5.js");
1729
1745
  n = ((await t(e))?.plugins ?? []).map((e) => {
1730
1746
  let t = (e.extendSchema?.tables ?? []).map((e) => {
1731
1747
  let t = e;
@@ -1870,7 +1886,7 @@ var le = /* @__PURE__ */ new Set([
1870
1886
  return n.unchecked.length > $ && console.log(` … and ${n.unchecked.length - $} more — \`voltro doctor --json\` prints every one (\`authz.unchecked\`).`), i === void 0 ? (console.log(`\nNo ${X} yet, so this run is advisory. To start the ratchet:`), console.log("\n voltro doctor --write-authz-allowlist\n"), console.log("That records today's unchecked handlers as DEBT and fails every run after on"), console.log("anything NEW. Fix a handler and its line stops mattering — the scan reports it as"), console.log("guarded whether or not the line is still there."), !1) : (console.log(`\n${n.unchecked.length} executor(s) with no access check are not in ${X}.`), console.log("Add a guard, or add the tag to that file if it is genuinely open."), console.log("\nBefore hand-rolling another check: `guards: [{ action, resourceType, resource }]`"), console.log("answers \"may this subject act on THIS row\" declaratively, and an app whose"), console.log("relationships live in its own tables registers its own tuple source rather than"), console.log("copying data into a framework table. See the authorization docs."), !0);
1871
1887
  }, yn = async (e) => {
1872
1888
  try {
1873
- let { loadApiConfig: t } = await import("./dev-BWwE0QjK.js"), { decidedSchemaReport: n } = await import("./doctorDecidedSchema-BlbWgCD_.js"), r = await t(e);
1889
+ let { loadApiConfig: t } = await import("./dev-CK522MV5.js"), { decidedSchemaReport: n } = await import("./doctorDecidedSchema-BlbWgCD_.js"), r = await t(e);
1874
1890
  return r == null ? null : n({
1875
1891
  ...r.schema ? { declared: r.schema } : {},
1876
1892
  ...r.store === void 0 ? {} : { store: r.store },
@@ -1895,8 +1911,8 @@ var le = /* @__PURE__ */ new Set([
1895
1911
  fileTaxonomy: re(o).findings,
1896
1912
  junctionFks: (await W(o))?.issues ?? [],
1897
1913
  eventDelivery: await G(o),
1898
- duplicateInstances: i(o),
1899
- versionSkew: r(o) ?? null,
1914
+ duplicateInstances: r(o),
1915
+ versionSkew: a(o) ?? null,
1900
1916
  serverOnly: (await q(o)).status,
1901
1917
  accessDecisions: await J(o),
1902
1918
  webhookVerification: await Y(o),
@@ -1908,9 +1924,9 @@ var le = /* @__PURE__ */ new Set([
1908
1924
  }), 0;
1909
1925
  let c = ct(o, t);
1910
1926
  z(o), At(o), Ht(o), ne(o), await It(o), await an(o), await rn(o), await Gt(o), await Xt(o), await Yt(o), await bn(o), await Zt(o), await pn(o), await un(o), await cn(o), await dn(o);
1911
- let l = await tn(o), u = await vn(o, e.includes("--write-authz-allowlist")), d = await Qt(o), f = await en(o), p = await fn(o), m = s(r(o));
1927
+ let l = await tn(o), u = await vn(o, e.includes("--write-authz-allowlist")), d = await Qt(o), f = await en(o), p = await fn(o), m = i(a(o));
1912
1928
  m !== void 0 && (console.log(""), console.log(m));
1913
- let _ = a(i(o));
1929
+ let _ = s(r(o));
1914
1930
  return _ !== void 0 && console.log(`\n${_}`), l || u || d || p || f ? Math.max(c, 1) : c;
1915
1931
  };
1916
1932
  //#endregion
@@ -1,10 +1,10 @@
1
1
  import { getRelations as e } from "@voltro/database";
2
2
  //#region src/doctorSourceRelations.ts
3
3
  var t = (e) => {
4
- let t = /* @__PURE__ */ new Set();
4
+ let t = [];
5
5
  for (let r = e.indexOf(".with("); r !== -1; r = e.indexOf(".with(", r + 1)) {
6
6
  let i = n(e, r);
7
- i !== void 0 && a(i, t);
7
+ i !== void 0 && t.push(...a(i));
8
8
  }
9
9
  return t;
10
10
  }, n = (e, t) => {
@@ -23,15 +23,31 @@ var t = (e) => {
23
23
  "{([".includes(a) ? n++ : "})]".includes(a) ? n-- : a === "," && n === 0 && (t.push(e.slice(r, i)), r = i + 1);
24
24
  }
25
25
  return t.push(e.slice(r)), t.filter((e) => e.trim() !== "");
26
- }, i = /^(?:'([A-Za-z_$][\w$]*)'|"([A-Za-z_$][\w$]*)"|([A-Za-z_$][\w$]*))$/, a = (e, t) => {
26
+ }, i = /^(?:'([A-Za-z_$][\w$]*)'|"([A-Za-z_$][\w$]*)"|([A-Za-z_$][\w$]*))$/, a = (e) => {
27
+ let t = [];
27
28
  for (let s of r(e)) {
28
29
  let e = o(s), r = (e === -1 ? s : s.slice(0, e)).trim(), c = i.exec(r), l = c?.[1] ?? c?.[2] ?? c?.[3];
29
- if (l === void 0 || (l !== "with" && t.add(l), e === -1)) continue;
30
- let u = s.slice(e + 1), d = u.indexOf("with");
31
- if (d === -1) continue;
32
- let f = n(u, d);
33
- f !== void 0 && a(f, t);
30
+ if (l === void 0) continue;
31
+ if (e === -1) {
32
+ t.push({
33
+ name: l,
34
+ nested: []
35
+ });
36
+ continue;
37
+ }
38
+ let u = s.slice(e + 1);
39
+ if (l === "with") {
40
+ let e = n(u, 0);
41
+ e !== void 0 && t.push(...a(e));
42
+ continue;
43
+ }
44
+ let d = u.indexOf("with"), f = d === -1 ? void 0 : n(u, d);
45
+ t.push({
46
+ name: l,
47
+ nested: f === void 0 ? [] : a(f)
48
+ });
34
49
  }
50
+ return t;
35
51
  }, o = (e) => {
36
52
  let t = 0;
37
53
  for (let n = 0; n < e.length; n++) {
@@ -48,34 +64,50 @@ var t = (e) => {
48
64
  return t;
49
65
  }, c = (n, r, i) => {
50
66
  let a = t(i);
51
- if (a.size === 0) return [];
52
- let o = new Set(r), c = [], u = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set([...s(i), ...r]);
53
- for (let t of d) {
54
- let r = e(t);
55
- if (r !== void 0) for (let e of a) {
56
- let i = r[e];
57
- if (i === void 0) continue;
58
- let a = [{
59
- table: l(i.target),
60
- kind: "target"
61
- }, {
62
- table: l(i.through),
63
- kind: "junction"
64
- }];
65
- for (let r of a) {
66
- if (r.table === void 0 || o.has(r.table)) continue;
67
- let i = `${e}:${r.table}`;
68
- u.has(i) || (u.add(i), c.push({
69
- procedure: n,
70
- from: t,
71
- relation: e,
72
- missing: r.table,
73
- kind: r.kind
74
- }));
67
+ if (a.length === 0) return {
68
+ findings: [],
69
+ unresolved: []
70
+ };
71
+ let o = new Set(r), c = [], u = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set([...s(i), ...r]), p = (t, r, i) => {
72
+ for (let a of r) {
73
+ let r = /* @__PURE__ */ new Set();
74
+ for (let i of t) {
75
+ let t = e(i);
76
+ if (t === void 0) continue;
77
+ let s = t[a.name];
78
+ if (s === void 0) continue;
79
+ let d = l(s.target);
80
+ d !== void 0 && r.add(d);
81
+ let f = [{
82
+ table: d,
83
+ kind: "target"
84
+ }, {
85
+ table: l(s.through),
86
+ kind: "junction"
87
+ }];
88
+ for (let e of f) {
89
+ if (e.table === void 0 || o.has(e.table)) continue;
90
+ let t = `${a.name}:${e.table}`;
91
+ u.has(t) || (u.add(t), c.push({
92
+ procedure: n,
93
+ from: i,
94
+ relation: a.name,
95
+ missing: e.table,
96
+ kind: e.kind
97
+ }));
98
+ }
99
+ }
100
+ if (r.size === 0) {
101
+ i && d.add(a.name);
102
+ continue;
75
103
  }
104
+ a.nested.length > 0 && p(r, a.nested, !1);
76
105
  }
77
- }
78
- return c;
106
+ };
107
+ return p(f, a, !0), {
108
+ findings: c,
109
+ unresolved: [...d].sort()
110
+ };
79
111
  }, l = (e) => {
80
112
  try {
81
113
  let t = (typeof e == "function" ? e() : e)?.tableName;
@@ -1,4 +1,4 @@
1
- import { c as e, i as t } from "./dev-1yu42ubu.js";
1
+ import { c as e, i as t } from "./dev-kdAg9Q7l.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-1yu42ubu.js";
1
+ import { c as e, i as t } from "./dev-kdAg9Q7l.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,5 +1,5 @@
1
- import { c as e } from "./dev-1yu42ubu.js";
2
- import { _t as t, gt as n, mt as r, pt as i } from "./webDev-B4IEMB0n.js";
1
+ import { c as e } from "./dev-kdAg9Q7l.js";
2
+ import { _t as t, ht as n, mt as r, vt as i } from "./webDev-B-ubQEMX.js";
3
3
  import { join as a } from "node:path";
4
4
  import { promises as o } from "node:fs";
5
5
  import { createLogger as s } from "@voltro/logger";
@@ -21,27 +21,27 @@ var u = s({ scope: "voltro:env" }), d = "# Environment for this app", f = async
21
21
  }, h = async (e) => {
22
22
  let t = await f(e);
23
23
  if (!t) return u.error("no app.config.ts found in the current directory"), 1;
24
- let n = i(t.name, t.input), r = `${p("KEY", 32)} ${p("OWNER", 16)} ${p("ACCESS", 8)} ${p("REQ", 4)} SET`;
25
- u.info(`env manifest — ${n.app} (${n.summary.total} vars, ${n.summary.set} set)`), m(r);
24
+ let n = r(t.name, t.input), i = `${p("KEY", 32)} ${p("OWNER", 16)} ${p("ACCESS", 8)} ${p("REQ", 4)} SET`;
25
+ u.info(`env manifest — ${n.app} (${n.summary.total} vars, ${n.summary.set} set)`), m(i);
26
26
  for (let e of n.entries) {
27
27
  let t = e.isSet ? "✓" : e.satisfied ? "·" : "✗";
28
28
  m(`${p(e.key, 32)} ${p(e.owner, 16)} ${p(e.access, 8)} ${p(e.required ? "yes" : "", 4)} ${t}`);
29
29
  }
30
30
  return n.summary.missingRequired > 0 ? (u.error(`${n.summary.missingRequired} required var(s) are unset`), 1) : 0;
31
31
  }, g = async (e, t) => {
32
- let n = await f(e);
33
- if (!n) return u.error("no app.config.ts found in the current directory"), 1;
34
- let i = r(n.input, ["Environment for this app — generated from app.config.ts `env` + plugin declarations.", "Regenerate with `voltro env sync`. Copy to `.env` and fill in the blanks."]), s = a(e, ".env.example"), c = await o.readFile(s, "utf8").catch(() => null);
32
+ let r = await f(e);
33
+ if (!r) return u.error("no app.config.ts found in the current directory"), 1;
34
+ let i = n(r.input, ["Environment for this app — generated from app.config.ts `env` + plugin declarations.", "Regenerate with `voltro env sync`. Copy to `.env` and fill in the blanks."]), s = a(e, ".env.example"), c = await o.readFile(s, "utf8").catch(() => null);
35
35
  if (c !== null && !c.startsWith(d) && !t) {
36
36
  let t = a(e, ".env.example.generated");
37
37
  return await o.writeFile(t, i, "utf8"), u.warn(".env.example exists and is not framework-generated — wrote .env.example.generated instead", { hint: "merge it by hand, or pass --force to overwrite .env.example" }), 0;
38
38
  }
39
- return await o.writeFile(s, i, "utf8"), u.info("wrote .env.example", { app: n.name }), 0;
40
- }, _ = async (r) => {
41
- let i = await e(r).catch(() => null);
42
- if (!i) return u.error("no app.config.ts found in the current directory"), 1;
43
- let a = l(i.env) ? i.env : void 0;
44
- return a ? (i.type === "web" ? (await n(r, a), u.info("wrote src/voltro-env.d.ts (publicEnv augmentation)", { app: i.name ?? "app" })) : (await t(r, a), u.info("wrote env.generated.d.ts (serverEnv augmentation)", { app: i.name ?? "app" })), 0) : (u.warn("no `defineEnv` declared in app.config.ts — nothing to generate", { hint: "add `env: defineEnv({ ... })` to app.config.ts (see @voltro/env)" }), 0);
39
+ return await o.writeFile(s, i, "utf8"), u.info("wrote .env.example", { app: r.name }), 0;
40
+ }, _ = async (n) => {
41
+ let r = await e(n).catch(() => null);
42
+ if (!r) return u.error("no app.config.ts found in the current directory"), 1;
43
+ let a = l(r.env) ? r.env : void 0;
44
+ return a ? (r.type === "web" ? (await t(n, a), u.info("wrote src/voltro-env.d.ts (publicEnv augmentation)", { app: r.name ?? "app" })) : (await i(n, a), u.info("wrote env.generated.d.ts (serverEnv augmentation)", { app: r.name ?? "app" })), 0) : (u.warn("no `defineEnv` declared in app.config.ts — nothing to generate", { hint: "add `env: defineEnv({ ... })` to app.config.ts (see @voltro/env)" }), 0);
45
45
  }, v = () => {
46
46
  let e = c();
47
47
  return u.info(`${e.length} framework env vars for turbo.json globalPassThroughEnv:`), m(JSON.stringify([...e].sort(), null, 2)), u.info("merge these into the workspace turbo.json `globalPassThroughEnv` array (+ your own app vars)."), 0;
@@ -1,6 +1,6 @@
1
1
  import { n as e } from "./cliOutput-D1tSBoRM.js";
2
- import { t } from "./checkCommand-Do3SQbLx.js";
3
- import { i as n, n as r } from "./codemodRunner-De3k0pRd.js";
2
+ import { t } from "./checkCommand-DNuPiWMc.js";
3
+ import { i as n, n as r } from "./codemodRunner-BDVixlSw.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";
6
6
  import { readFile as l } from "node:fs/promises";
@@ -1,4 +1,4 @@
1
- import { r as e } from "./appGraph-KGDPTuTy.js";
1
+ import { r as e } from "./appGraph-yRuKjOba.js";
2
2
  import { dirname as t, join as n } from "node:path";
3
3
  import { promises as r } from "node:fs";
4
4
  import { createLogger as i } from "@voltro/logger";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as e, i as t, n, o as r, r as i, t as a } from "./commands-By23Ljny.js";
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "./commands-B1OiS9bX.js";
2
2
  import { r as o } from "./templates-BR-fb4SP.js";
3
3
  //#region src/index.ts
4
4
  var s = "framework";
@@ -1,5 +1,5 @@
1
1
  import { n as e, r as t, t as n } from "./cliOutput-D1tSBoRM.js";
2
- import { o as r } from "./updateCommand-i8JbrLAA.js";
2
+ import { o as r } from "./updateCommand-Bs322Q78.js";
3
3
  import { join as i, resolve as a } from "node:path";
4
4
  import { readFileSync as o, readdirSync as s, statSync as c } from "node:fs";
5
5
  //#region src/infoCommand.ts
@@ -172,6 +172,7 @@ var r = "/_voltro/inspect", i = () => process.env.VOLTRO_INSPECT === "off", a =
172
172
  ...e.source === void 0 ? {} : { source: e.source },
173
173
  ...e.targets === void 0 ? {} : { targets: e.targets },
174
174
  ...e.guards === void 0 ? {} : { guards: e.guards },
175
+ ...e.internal === !0 ? { internal: !0 } : {},
175
176
  ...e.publicApi === void 0 ? {} : { publicApi: e.publicApi },
176
177
  ...e.exposeAsTool === void 0 ? {} : { exposeAsTool: e.exposeAsTool }
177
178
  })),
@@ -0,0 +1,2 @@
1
+ import { r as e } from "./inspect-CtL_xTbu.js";
2
+ export { e as buildCapabilityManifest };
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./manifestBuild-CuU1VrSm.js";
2
+ export { e as buildRpcEntry };
@@ -1,4 +1,4 @@
1
- import { P as e } from "./inspect-B7U7Cl_Z.js";
1
+ import { P as e } from "./inspect-CtL_xTbu.js";
2
2
  import { JSONSchema as t } from "effect";
3
3
  //#region src/manifestBuild.ts
4
4
  var n = (e) => {
@@ -31,7 +31,7 @@ var n = (e) => {
31
31
  }));
32
32
  e.length > 0 && (s.targets = e);
33
33
  }
34
- s.guards = e(t.guards) ?? [], t.publicApi != null && typeof t.publicApi == "object" && (s.publicApi = t.publicApi);
34
+ s.guards = e(t.guards) ?? [], t.internal === !0 && (s.internal = !0), t.publicApi != null && typeof t.publicApi == "object" && (s.publicApi = t.publicApi);
35
35
  let d = t.exposeAsTool;
36
36
  return d === !0 ? s.exposeAsTool = { enabled: !0 } : typeof d == "object" && d && (s.exposeAsTool = d), s;
37
37
  };
@@ -79,7 +79,7 @@ var _ = /* @__PURE__ */ new Set([
79
79
  let t = u(e.find((e) => !e.startsWith("-")) ?? process.cwd());
80
80
  return s(S(t), { scope: "voltro:migrate" });
81
81
  }
82
- let { runDbCommand: t } = await import("./dbCommand-Bnl7MSGC.js");
82
+ let { runDbCommand: t } = await import("./dbCommand-C27HIsGE.js");
83
83
  return t(["apply", ...e]);
84
84
  };
85
85
  //#endregion
@@ -1,4 +1,4 @@
1
- import { n as e } from "./apiBuild-CFYXo06U.js";
1
+ import { n as e } from "./apiBuild-CPDHXF72.js";
2
2
  import { join as t, resolve as n, sep as r } from "node:path";
3
3
  import { existsSync as i, promises as a } from "node:fs";
4
4
  import { createLogger as o } from "@voltro/logger";
@@ -422,7 +422,7 @@ let package = Package(
422
422
  await l.mkdir(o(e), { recursive: !0 }), await l.writeFile(e, n.content, "utf8");
423
423
  }
424
424
  }, X = async (e) => {
425
- let { offlineManifest: t } = await import("./checkCommand-OL41BMIb.js"), { manifest: n } = await t(e);
425
+ let { offlineManifest: t } = await import("./checkCommand-CWcnDArJ.js"), { manifest: n } = await t(e);
426
426
  return n;
427
427
  }, Z = async (e) => {
428
428
  let t = J(await (e.manifestProvider ?? X)(e.root), {
@@ -0,0 +1,2 @@
1
+ import { n as e } from "./serveCommand-DdiYNBBu.js";
2
+ export { e as runServeDispatch };
@@ -4,21 +4,21 @@ import { r as n, t as r } from "./appModuleLoader-C9r9mxZt.js";
4
4
  import { t as i } from "./bootRefusal-pgvDxlrU.js";
5
5
  import { n as a, r as o } from "./startupRunner-CEqQq7ax.js";
6
6
  import { t as s } from "./interruptedReplace-C3O3M1MM.js";
7
- import { $ as c, $t as l, A as u, At as d, Bt as f, C as ee, Cn as te, Ct as ne, D as p, Dt as m, E as h, En as re, Et as g, F as ie, Ft as ae, G as oe, Gt as se, H as _, Ht as ce, I as le, It as ue, J as de, Jt as v, K as y, Kt as fe, L as b, Lt as pe, M as me, Mt as he, N as ge, Nt as _e, O as ve, Ot as ye, P as be, Pt as xe, Q as Se, Qt as Ce, R as x, Rt as we, S as Te, St as Ee, T as De, Tn as Oe, Tt as S, U as ke, V as Ae, W as je, Wt as Me, X as Ne, Xt as Pe, Y as Fe, Yt as C, Z as Ie, Zt as Le, _ as w, _n as Re, _t as T, an as ze, at as Be, b as Ve, bn as He, bt as Ue, c as We, cn as Ge, ct as Ke, dn as qe, dt as Je, en as Ye, et as Xe, f as Ze, fn as Qe, ft as $e, g as et, gt as tt, h as nt, hn as rt, ht as it, i as at, in as ot, it as st, j as ct, jt as lt, k as ut, kt as dt, ln as ft, lt as pt, m as mt, mn as ht, mt as gt, nn as _t, nt as E, o as D, on as vt, ot as O, p as k, pn as yt, pt as bt, q as xt, qt as St, r as Ct, rn as A, rt as wt, sn as j, st as Tt, t as Et, tn as Dt, tt as Ot, u as kt, un as At, ut as jt, v as Mt, vn as Nt, vt as M, w as N, wn as Pt, wt as Ft, x as It, xn as Lt, xt as Rt, y as zt, yn as Bt, yt as Vt, zt as Ht } from "./dev-1yu42ubu.js";
7
+ import { $ as c, $t as l, A as u, At as d, Bt as f, C as ee, Cn as te, Ct as ne, D as p, Dt as m, E as h, En as re, Et as g, F as ie, Ft as ae, G as oe, Gt as se, H as _, Ht as ce, I as le, It as ue, J as de, Jt as v, K as y, Kt as fe, L as b, Lt as pe, M as me, Mt as he, N as ge, Nt as _e, O as ve, Ot as ye, P as be, Pt as xe, Q as Se, Qt as Ce, R as x, Rt as we, S as Te, St as Ee, T as De, Tn as Oe, Tt as S, U as ke, V as Ae, W as je, Wt as Me, X as Ne, Xt as Pe, Y as Fe, Yt as C, Z as Ie, Zt as Le, _ as w, _n as Re, _t as T, an as ze, at as Be, b as Ve, bn as He, bt as Ue, c as We, cn as Ge, ct as Ke, dn as qe, dt as Je, en as Ye, et as Xe, f as Ze, fn as Qe, ft as $e, g as et, gt as tt, h as nt, hn as rt, ht as it, i as at, in as ot, it as st, j as ct, jt as lt, k as ut, kt as dt, ln as ft, lt as pt, m as mt, mn as ht, mt as gt, nn as _t, nt as E, o as D, on as vt, ot as O, p as k, pn as yt, pt as bt, q as xt, qt as St, r as Ct, rn as A, rt as wt, sn as j, st as Tt, t as Et, tn as Dt, tt as Ot, u as kt, un as At, ut as jt, v as Mt, vn as Nt, vt as M, w as N, wn as Pt, wt as Ft, x as It, xn as Lt, xt as Rt, y as zt, yn as Bt, yt as Vt, zt as Ht } from "./dev-kdAg9Q7l.js";
8
8
  import { n as Ut } from "./cliArgs-D4p8n7EE.js";
9
9
  import { r as P } from "./appPort-B_HpJ_ck.js";
10
- import { ht as Wt, pt as Gt } from "./webDev-B4IEMB0n.js";
10
+ import { gt as Wt, mt as Gt } from "./webDev-B-ubQEMX.js";
11
11
  import { r as F } from "./dialectDriver-czCHYpeH.js";
12
12
  import { i as Kt, n as qt } from "./connectionConfig-Bk9IC7D0.js";
13
13
  import { c as Jt, n as I, o as Yt } from "./seedRunner-Dgsiwk_e.js";
14
14
  import { b as Xt, d as Zt, h as Qt, m as $t, p as en, r as tn, y as nn } from "./frameworkTableAssembly-BwJVEKLr.js";
15
15
  import { n as rn, r as an, t as on } from "./declaredSchemaGates-BlcwObhb.js";
16
16
  import { S as sn, c as cn, n as ln, p as un, s as dn, x as fn } from "./fileConventions-Cof68_BL.js";
17
- import { h as pn, o as mn } from "./inspect-B7U7Cl_Z.js";
17
+ import { h as pn, o as mn } from "./inspect-CtL_xTbu.js";
18
18
  import { n as hn } from "./mssqlClusterPatch-_4cE_nun.js";
19
19
  import { i as gn, n as _n, r as vn, t as yn } from "./webhookDiscovery-CphsQe59.js";
20
20
  import { t as bn } from "./inspectMetrics-CfdKLh6t.js";
21
- import { r as xn, u as Sn } from "./apiBuild-CFYXo06U.js";
21
+ import { r as xn, u as Sn } from "./apiBuild-CPDHXF72.js";
22
22
  import { t as Cn } from "./bootTiming-BdyP9nYw.js";
23
23
  import { a as wn, o as Tn, t as En } from "./dataProfile-Du3ztYxv.js";
24
24
  import L, { basename as Dn, join as On } from "node:path";
@@ -1,4 +1,4 @@
1
- import { t as e } from "./serveCommand-8CTzQCY0.js";
1
+ import { t as e } from "./serveCommand-DdiYNBBu.js";
2
2
  import { t } from "./loadEnv-D9nEOClM.js";
3
3
  import { r as n } from "./appModuleLoader-C9r9mxZt.js";
4
4
  import { i as r } from "./dialectDriver-czCHYpeH.js";