@voltro/cli 0.45.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 (117) hide show
  1. package/CHANGELOG.md +206 -0
  2. package/dist/apiBuild-BsooZpw2.js +2 -0
  3. package/dist/{apiBuild-CDQBNRDx.js → apiBuild-FpHCWiv6.js} +2 -2
  4. package/dist/bin.d.ts +8 -0
  5. package/dist/bin.js +1 -1
  6. package/dist/{build-yvsLG77U.js → build-zVygXxGB.js} +8 -8
  7. package/dist/{checkCommand-lrzwOzV1.js → checkCommand-B2Fw73lu.js} +1 -1
  8. package/dist/{checkCommand-Boxov8lr.js → checkCommand-D0dAKciE.js} +4 -4
  9. package/dist/{codegen-sbN1Y8PB.js → codegen-CrMXs4hb.js} +176 -162
  10. package/dist/codegen-DiMn2KkZ.js +2 -0
  11. package/dist/{codegenCommand-CQOLytL-.js → codegenCommand-BTtsnRus.js} +16 -16
  12. package/dist/{codemodRunner-5ZhDH3rB.js → codemodRunner-DSZjgyCL.js} +8 -0
  13. package/dist/{commands-CEkVoFM5.js → commands-BrFKxnYW.js} +24 -24
  14. package/dist/{dashboardCommand-0ahyp-zA.js → dashboardCommand-D9SjDc8E.js} +3 -3
  15. package/dist/{dataCommand-D4IlZcih.js → dataCommand-Dl11q14e.js} +271 -230
  16. package/dist/dbCommand-BUD4Fd8v.js +2 -0
  17. package/dist/{dbCommand-B237qI-j.js → dbCommand-jbrmzwW_.js} +110 -110
  18. package/dist/{dev-P4HyeY9W.js → dev-CaIfZnw5.js} +1 -1
  19. package/dist/{dev-DAM5CnAa.js → dev-RjB7eE_B.js} +2081 -2058
  20. package/dist/devActivity.d.ts +8 -0
  21. package/dist/doctorCommand-5zv6PN-G.js +2 -0
  22. package/dist/{doctorCommand-DW2cwAvC.js → doctorCommand-D7X29cw6.js} +16 -16
  23. package/dist/{doctorSourceRelations-CPjSwYuZ.js → doctorSourceRelations-Dd48LPvO.js} +15 -10
  24. package/dist/{dormancyCommand-BqQz7lbM.js → dormancyCommand-BGOP27fz.js} +1 -1
  25. package/dist/{embeddingsCommand-DJyArpU4.js → embeddingsCommand-D72E22bw.js} +1 -1
  26. package/dist/{envCommand-CviRZx1L.js → envCommand-BHSxz6wC.js} +2 -2
  27. package/dist/{evalCommand-6RUfPen4.js → evalCommand-Db01Kbng.js} +24 -24
  28. package/dist/{evolveCommand-qdlP-R9G.js → evolveCommand-C2ofGGlz.js} +2 -2
  29. package/dist/{frameworkTableAssembly-oMPBKqlE.js → frameworkTableAssembly-BvZ0Lil_.js} +97 -89
  30. package/dist/frameworkTableAssembly-DDKtwsy2.js +2 -0
  31. package/dist/index.d.ts +8 -0
  32. package/dist/index.js +1 -1
  33. package/dist/{infoCommand-CNWPSUcW.js → infoCommand-CuNl9cbh.js} +1 -1
  34. package/dist/inspectState.d.ts +8 -0
  35. package/dist/interruptedReplace-C1ZI84xi.js +27 -0
  36. package/dist/interruptedReplace-DNJ7MKph.js +2 -0
  37. package/dist/{migrate-DN47p2PG.js → migrate-odCPGHPq.js} +27 -27
  38. package/dist/{runtimeTrace-BDZSt9W_.js → runtimeTrace-C_OKr0jY.js} +1 -1
  39. package/dist/{sdkgen-sNaD3oZB.js → sdkgen-D9trW7sl.js} +1 -1
  40. package/dist/{seedRunner-IdHEprqf.js → seedRunner-Dgsiwk_e.js} +59 -59
  41. package/dist/serveCommand-BU0wfV6V.js +1931 -0
  42. package/dist/serveCommand-Bwrn_9Fn.js +2 -0
  43. package/dist/serveEntry.d.ts +8 -0
  44. package/dist/serveEntry.js +1 -1
  45. package/dist/{start-Ds3xyn8R.js → start-7HcSIKEp.js} +1 -1
  46. package/dist/{start-BAlGcjF5.js → start-DvlYDyAr.js} +1 -1
  47. package/dist/startEntry.d.ts +8 -0
  48. package/dist/startEntry.js +1 -1
  49. package/dist/startup.d.ts +8 -0
  50. package/dist/{test-CHb7UwvE.js → test-rXFq4S76.js} +1 -1
  51. package/dist/{updateCommand-rCnhaj84.js → updateCommand-BlyXavoG.js} +1 -1
  52. package/dist/updateCommand-CT5AvVg7.js +2 -0
  53. package/dist/{webDev-101csg6Q.js → webDev-B4IEMB0n.js} +6 -6
  54. package/dist/webDev-B79ji8M5.js +2 -0
  55. package/dist/{webhooksCommand-C0iZZfaI.js → webhooksCommand-BqcWcbuW.js} +1 -1
  56. package/package.json +23 -17
  57. package/templates/AGENTS.md +1 -1
  58. package/templates/agent-docs/_index.md +1 -1
  59. package/templates/agent-docs/cli.md +166 -2
  60. package/templates/agent-docs/data.md +70 -4
  61. package/templates/agent-docs/whats-new.md +14 -87
  62. package/templates/apps/api-ai/package.json +7 -7
  63. package/templates/apps/api-auth/package.json +8 -8
  64. package/templates/apps/api-backend/package.json +7 -7
  65. package/templates/apps/api-backend-deactivation/package.json +7 -7
  66. package/templates/apps/api-backend-mail/package.json +8 -8
  67. package/templates/apps/api-backend-mariadb/package.json +9 -9
  68. package/templates/apps/api-backend-sqlite/package.json +8 -8
  69. package/templates/apps/api-backend-storage/package.json +8 -8
  70. package/templates/apps/api-cms/package.json +10 -10
  71. package/templates/apps/api-collab/package.json +8 -8
  72. package/templates/apps/api-data-advanced/package.json +8 -8
  73. package/templates/apps/api-durable/package.json +8 -8
  74. package/templates/apps/api-feature-flags/package.json +9 -9
  75. package/templates/apps/api-governance/package.json +8 -8
  76. package/templates/apps/api-kv/package.json +8 -8
  77. package/templates/apps/api-moderation/package.json +8 -8
  78. package/templates/apps/api-observability/package.json +8 -8
  79. package/templates/apps/api-ratelimit/package.json +8 -8
  80. package/templates/apps/api-rbac/package.json +8 -8
  81. package/templates/apps/api-rest/package.json +7 -7
  82. package/templates/apps/api-saas/package.json +11 -11
  83. package/templates/apps/api-saas-starter/package.json +10 -10
  84. package/templates/apps/api-search/package.json +8 -8
  85. package/templates/apps/api-status/package.json +8 -8
  86. package/templates/apps/api-versioning/package.json +8 -8
  87. package/templates/apps/api-webhooks/package.json +9 -9
  88. package/templates/apps/changelog/package.json +6 -6
  89. package/templates/apps/edge-functions/package.json +2 -2
  90. package/templates/apps/frontend-admin/package.json +8 -8
  91. package/templates/apps/frontend-app/package.json +9 -9
  92. package/templates/apps/frontend-auth/package.json +8 -8
  93. package/templates/apps/frontend-blank/package.json +7 -7
  94. package/templates/apps/frontend-cms/package.json +9 -9
  95. package/templates/apps/frontend-collab/package.json +10 -10
  96. package/templates/apps/frontend-contact/package.json +7 -7
  97. package/templates/apps/frontend-dashboard/package.json +7 -7
  98. package/templates/apps/frontend-docs/package.json +7 -7
  99. package/templates/apps/frontend-i18n/package.json +6 -6
  100. package/templates/apps/frontend-landing/package.json +7 -7
  101. package/templates/apps/frontend-portal/package.json +8 -8
  102. package/templates/apps/frontend-saas/package.json +8 -8
  103. package/templates/apps/frontend-spa/package.json +7 -7
  104. package/templates/apps/frontend-ssr/package.json +7 -7
  105. package/templates/apps/frontend-ssr-api/package.json +8 -8
  106. package/templates/apps/frontend-static-blog/package.json +6 -6
  107. package/templates/apps/frontend-status/package.json +8 -8
  108. package/templates/apps/mobile-app/package.json +4 -4
  109. package/dist/apiBuild-yJCqJYQ8.js +0 -2
  110. package/dist/codegen-DcE2li1i.js +0 -2
  111. package/dist/dbCommand-BvQeKQOb.js +0 -2
  112. package/dist/doctorCommand-2K1dIzYk.js +0 -2
  113. package/dist/frameworkTableAssembly-DgylYh9_.js +0 -2
  114. package/dist/serveCommand-BBhT2U94.js +0 -1885
  115. package/dist/serveCommand-DY2jLy0o.js +0 -2
  116. package/dist/updateCommand-BH6EGuCc.js +0 -2
  117. package/dist/webDev-BLKBO34K.js +0 -2
@@ -60,3 +60,11 @@ declare module '@voltro/protocol' {
60
60
  '_voltro_undo_log': true;
61
61
  }
62
62
  }
63
+
64
+
65
+ declare module '@voltro/protocol' {
66
+ interface VoltroTableNames {
67
+ 'invoices': true;
68
+ 'invoice_lines': true;
69
+ }
70
+ }
@@ -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 { Bt as e, Ht as t, Vt as n } from "./dev-DAM5CnAa.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-101csg6Q.js";
3
- import { w as d } from "./frameworkTableAssembly-oMPBKqlE.js";
1
+ import { Ht as e, Ut as t, Vt as n } from "./dev-RjB7eE_B.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";
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-CDQBNRDx.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-P4HyeY9W.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-P4HyeY9W.js"), { discovered: a } = await U(r), o = n(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,
@@ -1470,7 +1470,7 @@ var le = /* @__PURE__ */ new Set([
1470
1470
  checked: !0,
1471
1471
  defaultDeny: o,
1472
1472
  undecided: t(s),
1473
- openAccess: e(s)
1473
+ openAccess: n(s)
1474
1474
  };
1475
1475
  } catch (e) {
1476
1476
  return {
@@ -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-P4HyeY9W.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-P4HyeY9W.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-lrzwOzV1.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-DgylYh9_.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-P4HyeY9W.js");
1697
+ let { loadApiConfig: t } = await import("./dev-CaIfZnw5.js");
1698
1698
  i = (await t(e))?.locales ?? [];
1699
1699
  } catch {
1700
1700
  return;
@@ -1712,7 +1712,7 @@ var le = /* @__PURE__ */ new Set([
1712
1712
  if (!S(t)) return !1;
1713
1713
  let n = [];
1714
1714
  try {
1715
- let { walkPagesTree: e } = await import("./webDev-BLKBO34K.js");
1715
+ let { walkPagesTree: e } = await import("./webDev-B79ji8M5.js");
1716
1716
  n = (await e(t)).pages.map((e) => e.pattern);
1717
1717
  } catch {
1718
1718
  return !1;
@@ -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-P4HyeY9W.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-DAM5CnAa.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-DAM5CnAa.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,5 +1,5 @@
1
- import { c as e } from "./dev-DAM5CnAa.js";
2
- import { _t as t, gt as n, mt as r, pt as i } from "./webDev-101csg6Q.js";
1
+ import { c as e } from "./dev-RjB7eE_B.js";
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";
5
5
  import { createLogger as s } from "@voltro/logger";
@@ -2,9 +2,9 @@ import { n as e } from "./appModuleLoader-C9r9mxZt.js";
2
2
  import { n as t } from "./cliOutput-D1tSBoRM.js";
3
3
  import { basename as n, join as r, resolve as i } from "node:path";
4
4
  import { readdirSync as a, statSync as o } from "node:fs";
5
- import { Effect as s } from "effect";
6
- import { generateText as c, isEvalDefinition as l, llmJudge as u, runEval as d } from "@voltro/ai";
7
- import { branchNamespaceName as f } from "@voltro/database";
5
+ import { branchNamespaceName as s } from "@voltro/database";
6
+ import { Effect as c } from "effect";
7
+ import { generateText as l, isEvalDefinition as u, llmJudge as d, runEval as f } from "@voltro/ai";
8
8
  //#region src/evalCommand.ts
9
9
  var p = /* @__PURE__ */ new Set([
10
10
  "node_modules",
@@ -43,11 +43,11 @@ var p = /* @__PURE__ */ new Set([
43
43
  r(`eval: failed to import ${e}: ${t.message}`), a.push(e);
44
44
  continue;
45
45
  }
46
- if (!l(o)) {
46
+ if (!u(o)) {
47
47
  a.push(e);
48
48
  continue;
49
49
  }
50
- let s = await d(o, {
50
+ let s = await f(o, {
51
51
  replay: t.replay,
52
52
  ...t.judge === void 0 ? {} : { judge: t.judge },
53
53
  ...t.branchId === void 0 ? {} : { branchId: t.branchId }
@@ -61,16 +61,16 @@ var p = /* @__PURE__ */ new Set([
61
61
  };
62
62
  }, _ = async ({ case: e }) => {
63
63
  let t = Date.now();
64
- return await s.runPromise(c({
64
+ return await c.runPromise(l({
65
65
  prompt: e.input.prompt,
66
66
  ...e.input.system === void 0 ? {} : { system: e.input.system }
67
- }).pipe(s.map((e) => ({
67
+ }).pipe(c.map((e) => ({
68
68
  text: e.text,
69
69
  latencyMs: Date.now() - t
70
- })), s.catchAll((n) => s.succeed({
70
+ })), c.catchAll((n) => c.succeed({
71
71
  text: "",
72
72
  latencyMs: Date.now() - t
73
- }).pipe(s.tap(() => s.sync(() => console.error(` replay error (${e.id}): ${n.message}`)))))));
73
+ }).pipe(c.tap(() => c.sync(() => console.error(` replay error (${e.id}): ${n.message}`)))))));
74
74
  }, v = (e) => [`${e.ok ? "✓" : "✗"} ${e.name}: ${e.passed}/${e.cases.length} passed${e.branch ? ` (branch ${e.branch.id})` : ""}`, ...e.cases.filter((e) => !e.pass).map((e) => {
75
75
  let t = e.assertionFailures.map((e) => ` - ${e.detail}`), n = e.judge !== void 0 && e.judge.score < .7 ? [` - judge: ${e.judge.score.toFixed(2)} — ${e.judge.reason}`] : [];
76
76
  return [
@@ -91,28 +91,28 @@ var p = /* @__PURE__ */ new Set([
91
91
  }, x = async (e) => {
92
92
  let r = e.includes("--json"), a = e.includes("--branch"), o = y(e);
93
93
  if (o !== void 0 && (o < 0 || o > 1)) return console.error("voltro eval: --threshold must be within 0..1"), 1;
94
- let s = i(e.find((e) => !e.startsWith("-") && Number.isNaN(Number(e))) ?? process.cwd()), c = h(s);
95
- if (c.length === 0) return console.error(`voltro eval: no *.eval.ts found under ${s}`), console.error(" Author an eval with `export default defineEval({ name, cases, judge? })`."), 1;
96
- let l = a ? f(n(s), b(e)) : void 0;
97
- l !== void 0 && !r && console.log(`replays target data branch: ${l} (provision via voltro's BranchExecutor)`);
98
- let d = await g({
99
- root: s,
100
- files: c,
94
+ let c = i(e.find((e) => !e.startsWith("-") && Number.isNaN(Number(e))) ?? process.cwd()), l = h(c);
95
+ if (l.length === 0) return console.error(`voltro eval: no *.eval.ts found under ${c}`), console.error(" Author an eval with `export default defineEval({ name, cases, judge? })`."), 1;
96
+ let u = a ? s(n(c), b(e)) : void 0;
97
+ u !== void 0 && !r && console.log(`replays target data branch: ${u} (provision via voltro's BranchExecutor)`);
98
+ let f = await g({
99
+ root: c,
100
+ files: l,
101
101
  replay: _,
102
- judge: u,
103
- ...l === void 0 ? {} : { branchId: l },
102
+ judge: d,
103
+ ...u === void 0 ? {} : { branchId: u },
104
104
  log: (e) => console.error(e)
105
105
  });
106
106
  if (r) t({
107
- ok: d.ok,
108
- reports: d.reports,
109
- skipped: d.skipped
107
+ ok: f.ok,
108
+ reports: f.reports,
109
+ skipped: f.skipped
110
110
  });
111
111
  else {
112
- for (let e of d.reports) console.log(v(e));
113
- d.reports.length === 0 && console.log("voltro eval: no runnable eval suites (files found but none exported a defineEval)"), console.log(d.ok ? "\nvoltro eval: OK" : "\nvoltro eval: FAILED (regressions above)");
112
+ for (let e of f.reports) console.log(v(e));
113
+ f.reports.length === 0 && console.log("voltro eval: no runnable eval suites (files found but none exported a defineEval)"), console.log(f.ok ? "\nvoltro eval: OK" : "\nvoltro eval: FAILED (regressions above)");
114
114
  }
115
- return +!d.ok;
115
+ return +!f.ok;
116
116
  };
117
117
  //#endregion
118
118
  export { x as runEvalCommand };
@@ -1,6 +1,6 @@
1
1
  import { n as e } from "./cliOutput-D1tSBoRM.js";
2
- import { t } from "./checkCommand-Boxov8lr.js";
3
- import { i as n, n as r } from "./codemodRunner-5ZhDH3rB.js";
2
+ import { t } from "./checkCommand-D0dAKciE.js";
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";
6
6
  import { readFile as l } from "node:fs/promises";