@voltro/cli 0.53.0 → 0.55.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 (191) hide show
  1. package/CHANGELOG.md +335 -0
  2. package/dist/{agentsMd-0l980yhL.js → agentsMd-BaLC10Na.js} +110 -82
  3. package/dist/agentsMd-DCY1RSs8.js +2 -0
  4. package/dist/{apiBuild-CaPfoWku.js → apiBuild-CMvLJM_K.js} +2 -2
  5. package/dist/apiBuild-Cl0IDx8c.js +2 -0
  6. package/dist/bin.js +1 -1
  7. package/dist/{build-D-OnvNMf.js → build-S0QOzqPT.js} +115 -115
  8. package/dist/{checkCommand-D2ZduVlh.js → checkCommand-DNkY5kwF.js} +1 -1
  9. package/dist/{checkCommand-C5elt0tW.js → checkCommand-fbj9GDjN.js} +6 -6
  10. package/dist/{cloudCmd-QUXh-b5w.js → cloudCmd-DzKcSYuy.js} +1 -1
  11. package/dist/codegen-CN6vMM4J.js +2 -0
  12. package/dist/{codegen-FEk8AZHb.js → codegen-SIepQtUl.js} +76 -65
  13. package/dist/codegenCommand-3TDJezom.js +42 -0
  14. package/dist/{codemodRunner-BjtB2lq6.js → codemodRunner-C2zxZUIw.js} +64 -9
  15. package/dist/{commands-DyxAmhP0.js → commands-BBYJ7Q3B.js} +96 -73
  16. package/dist/{dashboardCommand-BdKTyT13.js → dashboardCommand-D2kmyCLL.js} +3 -3
  17. package/dist/{dataCommand-Bab9X7s8.js → dataCommand-BEPPQiTl.js} +267 -195
  18. package/dist/dbCommand-BTyBGhIA.js +2 -0
  19. package/dist/{dbCommand-06O2finM.js → dbCommand-DZTmOFT4.js} +3 -3
  20. package/dist/{dev-C6LGF4iY.js → dev-Ca_A_S9v.js} +2439 -2397
  21. package/dist/{dev-GjJWAYo2.js → dev-DfVZaoys.js} +1 -1
  22. package/dist/{doctorCommand-etMkflRc.js → doctorCommand-CGZJK_4o.js} +21 -21
  23. package/dist/doctorCommand-djmqEcDC.js +2 -0
  24. package/dist/{dormancyCommand-UwZ1AZzB.js → dormancyCommand-DY2rYpTa.js} +1 -1
  25. package/dist/{embeddingsCommand-C70zWHwo.js → embeddingsCommand-BoCqZsgp.js} +1 -1
  26. package/dist/{envCommand-dSyKvRkM.js → envCommand-Bxy2fOjc.js} +15 -15
  27. package/dist/{evolveCommand-CG0_ebO5.js → evolveCommand-BsbZ-XDg.js} +2 -2
  28. package/dist/fileConventions-l-RIXbx8.js +36 -0
  29. package/dist/{fileTaxonomy-B7uxipWS.js → fileTaxonomy-CbyMQYx_.js} +37 -37
  30. package/dist/frameworkTableAssembly-Df2Ymp2f.js +2 -0
  31. package/dist/{frameworkTableAssembly-DKx3ba3S.js → frameworkTableAssembly-Do-cf6RJ.js} +96 -102
  32. package/dist/index.js +2 -2
  33. package/dist/{infoCommand-_53iOc_j.js → infoCommand-EmM3jPKD.js} +1 -1
  34. package/dist/{inspect-Bd8-9wsi.js → inspect-DCqILJ1G.js} +4 -0
  35. package/dist/inspect-DGJwpOAb.js +2 -0
  36. package/dist/interruptedReplace-CwnkBb2X.js +41 -0
  37. package/dist/interruptedReplace-qzmFI020.js +2 -0
  38. package/dist/manifestBuild-CJ2zvPvT.js +2 -0
  39. package/dist/{manifestBuild-Cqgsx2bM.js → manifestBuild-DjX5MoXy.js} +1 -1
  40. package/dist/{metaCommands-Cn2oboG4.js → metaCommands-x7RCi2AF.js} +2 -2
  41. package/dist/{migrate-Cko9rswM.js → migrate-CGFZS-1a.js} +2 -2
  42. package/dist/mobileCommand-D9O6iq3D.js +428 -0
  43. package/dist/mobileCommand-DAum7tsG.js +2 -0
  44. package/dist/{pageConvention-C938S8oC.js → pageConvention-CMpfDN6r.js} +1 -1
  45. package/dist/{privacyCommand-DWTQMC6R.js → privacyCommand-BCa2OoZG.js} +2 -2
  46. package/dist/{probeCommand-DkGGLknv.js → probeCommand-Bs3iVBSL.js} +1 -1
  47. package/dist/{projectScaffold-EzlErR4E.js → projectScaffold-CJfP-xbT.js} +1 -1
  48. package/dist/{projectScaffold-B4dmTlwT.js → projectScaffold-CSN0OzBV.js} +2 -2
  49. package/dist/renderModeScan-43yQ2opo.js +147 -0
  50. package/dist/{renderProfile-CskIgAfn.js → renderProfile-DvrhVJHa.js} +2 -2
  51. package/dist/{runtimeTrace-c0APJz7E.js → runtimeTrace-C1BTpHGQ.js} +1 -1
  52. package/dist/{sdkgen-BiQCgIEr.js → sdkgen-CXMwLg9n.js} +1 -1
  53. package/dist/{serveCommand-CueKQgzl.js → serveCommand-C7IrCD58.js} +899 -897
  54. package/dist/serveCommand-Cjt5S9hD.js +2 -0
  55. package/dist/serveEntry.js +1 -1
  56. package/dist/start-DH7cat4-.js +3 -0
  57. package/dist/{start-ekPan8BT.js → start-EOV7s1NZ.js} +544 -527
  58. package/dist/startEntry.js +1 -1
  59. package/dist/{staticCommand-xlSL-IWk.js → staticCommand-ey0kYmOT.js} +1 -1
  60. package/dist/{subcommandNames-DpYs3DXr.js → subcommandNames-CDzfEtKV.js} +3 -3
  61. package/dist/{templates-BR-fb4SP.js → templates-BTWZkJJT.js} +41 -9
  62. package/dist/{test-BWPQcRoB.js → test-DO27-x2P.js} +1 -1
  63. package/dist/{updateCommand-C_8I8Rzo.js → updateCommand-C_jN1w18.js} +1 -1
  64. package/dist/updateCommand-nnFjDbl4.js +2 -0
  65. package/dist/{webDev-C7jWJ5dX.js → webDev-1XpVnYkW.js} +1 -1
  66. package/dist/{webDev-oczpugbx.js → webDev-B7vNj4Bq.js} +1231 -1186
  67. package/dist/{webhooksCommand-4SVPDjKg.js → webhooksCommand-B1LVcyO3.js} +1 -1
  68. package/dist/workspaceDeps-RKEkX92S.js +45 -0
  69. package/package.json +31 -19
  70. package/templates/AGENTS.core.md +2 -0
  71. package/templates/AGENTS.md +4 -2
  72. package/templates/agent-docs/_index.md +2 -2
  73. package/templates/agent-docs/_manifest.json +1 -1
  74. package/templates/agent-docs/ai.md +4 -4
  75. package/templates/agent-docs/authentication.md +115 -0
  76. package/templates/agent-docs/cli.md +98 -12
  77. package/templates/agent-docs/data.md +121 -21
  78. package/templates/agent-docs/database/advancedqueries.md +1 -1
  79. package/templates/agent-docs/database/migrations.md +1 -1
  80. package/templates/agent-docs/database/seedsdialects.md +64 -2
  81. package/templates/agent-docs/internationalization.md +2 -0
  82. package/templates/agent-docs/introduction.md +25 -0
  83. package/templates/agent-docs/local-first-mobile.md +139 -41
  84. package/templates/agent-docs/observability.md +4 -2
  85. package/templates/agent-docs/plugins/atlassian.md +2 -2
  86. package/templates/agent-docs/plugins/audit.md +2 -2
  87. package/templates/agent-docs/plugins/billing.md +1 -1
  88. package/templates/agent-docs/plugins/cdc-out.md +8 -3
  89. package/templates/agent-docs/plugins/comments.md +22 -0
  90. package/templates/agent-docs/plugins/presence.md +32 -3
  91. package/templates/agent-docs/plugins/prometheus.md +2 -0
  92. package/templates/agent-docs/plugins/queue.md +47 -4
  93. package/templates/agent-docs/plugins.md +52 -14
  94. package/templates/agent-docs/reference.md +25 -4
  95. package/templates/agent-docs/routing.md +81 -9
  96. package/templates/agent-docs/scheduling.md +1 -1
  97. package/templates/agent-docs/schema-driven-ui.md +137 -1
  98. package/templates/agent-docs/templates/appshells.md +36 -4
  99. package/templates/agent-docs/whats-new.md +75 -158
  100. package/templates/apps/api-ai/package.json +6 -6
  101. package/templates/apps/api-auth/package.json +8 -8
  102. package/templates/apps/api-backend/package.json +7 -7
  103. package/templates/apps/api-backend-deactivation/package.json +7 -7
  104. package/templates/apps/api-backend-mail/package.json +8 -8
  105. package/templates/apps/api-backend-mariadb/package.json +9 -9
  106. package/templates/apps/api-backend-sqlite/package.json +8 -8
  107. package/templates/apps/api-backend-storage/package.json +8 -8
  108. package/templates/apps/api-cms/package.json +9 -9
  109. package/templates/apps/api-collab/README.md +3 -3
  110. package/templates/apps/api-collab/app.config.ts +1 -1
  111. package/templates/apps/api-collab/database/schema.ts +12 -8
  112. package/templates/apps/api-collab/mutations/documents.create.mutation.server.ts +1 -1
  113. package/templates/apps/api-collab/mutations/documents.setBody.mutation.server.ts +1 -1
  114. package/templates/apps/api-collab/mutations/documents.setBody.mutation.ts +1 -1
  115. package/templates/apps/api-collab/package.json +8 -8
  116. package/templates/apps/api-collab/template.json +1 -1
  117. package/templates/apps/api-collab/tests/documents.setBody.test.ts +10 -2
  118. package/templates/apps/api-data-advanced/package.json +8 -8
  119. package/templates/apps/api-durable/package.json +8 -8
  120. package/templates/apps/api-feature-flags/package.json +9 -9
  121. package/templates/apps/api-governance/package.json +8 -8
  122. package/templates/apps/api-kv/package.json +8 -8
  123. package/templates/apps/api-moderation/package.json +8 -8
  124. package/templates/apps/api-observability/package.json +8 -8
  125. package/templates/apps/api-ratelimit/package.json +8 -8
  126. package/templates/apps/api-rbac/package.json +8 -8
  127. package/templates/apps/api-rest/package.json +7 -7
  128. package/templates/apps/api-row-history/package.json +8 -8
  129. package/templates/apps/api-saas/package.json +11 -10
  130. package/templates/apps/api-saas-starter/package.json +10 -10
  131. package/templates/apps/api-search/package.json +8 -8
  132. package/templates/apps/api-status/package.json +8 -8
  133. package/templates/apps/api-webhooks/package.json +9 -9
  134. package/templates/apps/changelog/package.json +7 -6
  135. package/templates/apps/edge-functions/package.json +2 -2
  136. package/templates/apps/frontend-admin/package.json +8 -8
  137. package/templates/apps/frontend-app/package.json +9 -9
  138. package/templates/apps/frontend-auth/package.json +8 -8
  139. package/templates/apps/frontend-blank/package.json +7 -7
  140. package/templates/apps/frontend-cms/package.json +9 -9
  141. package/templates/apps/frontend-collab/README.md +43 -24
  142. package/templates/apps/frontend-collab/app.config.ts +3 -3
  143. package/templates/apps/frontend-collab/package.json +14 -10
  144. package/templates/apps/frontend-collab/src/locales/de.ts +1 -2
  145. package/templates/apps/frontend-collab/src/locales/en.ts +1 -2
  146. package/templates/apps/frontend-collab/src/pages/page.test.tsx +72 -76
  147. package/templates/apps/frontend-collab/src/pages/page.tsx +45 -22
  148. package/templates/apps/frontend-collab/template.json +2 -2
  149. package/templates/apps/frontend-contact/package.json +7 -7
  150. package/templates/apps/frontend-dashboard/package.json +7 -7
  151. package/templates/apps/frontend-docs/package.json +8 -7
  152. package/templates/apps/frontend-i18n/package.json +6 -6
  153. package/templates/apps/frontend-landing/README.md +48 -0
  154. package/templates/apps/frontend-landing/app.config.ts +28 -0
  155. package/templates/apps/frontend-landing/package.json +7 -6
  156. package/templates/apps/frontend-landing/src/assets/hero.jpg +0 -0
  157. package/templates/apps/frontend-landing/src/fonts/Geist-Variable.woff2 +0 -0
  158. package/templates/apps/frontend-landing/src/fonts/LICENSE-Geist.txt +92 -0
  159. package/templates/apps/frontend-landing/src/globals.css +15 -0
  160. package/templates/apps/frontend-landing/src/globals.d.ts +17 -0
  161. package/templates/apps/frontend-landing/src/locales/de.ts +3 -2
  162. package/templates/apps/frontend-landing/src/locales/en.ts +5 -2
  163. package/templates/apps/frontend-landing/src/pages/page.test.tsx +79 -0
  164. package/templates/apps/frontend-landing/src/pages/page.tsx +26 -3
  165. package/templates/apps/frontend-landing/template.json +2 -2
  166. package/templates/apps/frontend-portal/package.json +8 -8
  167. package/templates/apps/frontend-saas/package.json +8 -8
  168. package/templates/apps/frontend-spa/package.json +7 -7
  169. package/templates/apps/frontend-ssr/package.json +7 -7
  170. package/templates/apps/frontend-ssr-api/package.json +8 -8
  171. package/templates/apps/frontend-static-blog/package.json +8 -7
  172. package/templates/apps/frontend-status/package.json +8 -8
  173. package/templates/apps/mobile-app/package.json +12 -11
  174. package/templates/apps/mobile-app/src/lib/deeplinks.ts +29 -17
  175. package/templates/apps/mobile-app/tests/deeplinks.test.ts +16 -0
  176. package/dist/agentsMd-SDDSkyl4.js +0 -2
  177. package/dist/apiBuild-DHtLXYx9.js +0 -2
  178. package/dist/codegen-BWpt3VgF.js +0 -2
  179. package/dist/codegenCommand-BOiWQ5hz.js +0 -137
  180. package/dist/dbCommand-B1EXBC6f.js +0 -2
  181. package/dist/doctorCommand-B0hX0tdz.js +0 -2
  182. package/dist/fileConventions-DASGEmj-.js +0 -35
  183. package/dist/frameworkTableAssembly-C_7Z-rMs.js +0 -2
  184. package/dist/inspect-CuoDInfZ.js +0 -2
  185. package/dist/interruptedReplace-C3O3M1MM.js +0 -28
  186. package/dist/interruptedReplace-CvmiAM9K.js +0 -2
  187. package/dist/manifestBuild-C4-J1-m_.js +0 -2
  188. package/dist/renderModeScan-CUbOeOAg.js +0 -122
  189. package/dist/serveCommand-DsnrVN3U.js +0 -2
  190. package/dist/start-BJzZLbt8.js +0 -3
  191. package/dist/updateCommand-Bqql_rsQ.js +0 -2
@@ -1,10 +1,10 @@
1
1
  import { t as e } from "./cliArgs-D4p8n7EE.js";
2
- import { a as t, l as n } from "./codegen-FEk8AZHb.js";
2
+ import { a as t, l as n } from "./codegen-SIepQtUl.js";
3
3
  import { r } from "./appGraph-yRuKjOba.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
- import { r as l } from "./fileTaxonomy-B7uxipWS.js";
7
- import { S as u } from "./doctorCommand-etMkflRc.js";
6
+ import { r as l } from "./fileTaxonomy-CbyMQYx_.js";
7
+ import { S as u } from "./doctorCommand-CGZJK_4o.js";
8
8
  import { resolve as d } from "node:path";
9
9
  import { readdirSync as f, statSync as p } from "node:fs";
10
10
  import { isReactivityChannelKey as m } from "@voltro/protocol";
@@ -170,9 +170,9 @@ var h = (e) => (e === void 0 ? [] : typeof e == "string" ? [e] : e).filter((e) =
170
170
  let t = e.severity === "error" ? "✗ error" : "⚠ warn", n = e.file ? ` (${e.file})` : "";
171
171
  return `${t} ${e.rule} ${e.node}${n}\n ${e.breaks.join("; ")}\n fix: ${e.fix}`;
172
172
  }).join("\n"), O = async (e) => {
173
- let { walk: t, loadDiscovered: n, loadApiConfig: r } = await import("./dev-GjJWAYo2.js"), { buildRpcEntry: i } = await import("./manifestBuild-C4-J1-m_.js"), { buildCapabilityManifest: a } = await import("./inspect-CuoDInfZ.js"), { relative: o } = await import("node:path"), s = await n(await t(e)), c = await r(e).then((e) => e?.plugins ?? []).catch(() => []);
173
+ let { walk: t, loadDiscovered: n, loadApiConfig: r } = await import("./dev-DfVZaoys.js"), { buildRpcEntry: i } = await import("./manifestBuild-CJ2zvPvT.js"), { buildCapabilityManifest: a } = await import("./inspect-DGJwpOAb.js"), { relative: o } = await import("node:path"), s = await n(await t(e)), c = await r(e).then((e) => e?.plugins ?? []).catch(() => []);
174
174
  try {
175
- let { mergePluginRoutesInto: e } = await import("./dev-GjJWAYo2.js");
175
+ let { mergePluginRoutesInto: e } = await import("./dev-DfVZaoys.js");
176
176
  e({
177
177
  plugins: c,
178
178
  queries: s.queries,
@@ -189,7 +189,7 @@ var h = (e) => (e === void 0 ? [] : typeof e == "string" ? [e] : e).filter((e) =
189
189
  ...s.mutations.map((e) => l(e.descriptor, "mutation", e.file)),
190
190
  ...s.actions.map((e) => l(e.descriptor, "action", e.file)),
191
191
  ...s.streams.map((e) => l(e.descriptor, "stream", e.file))
192
- ], { assembleFrameworkTables: d } = await import("./frameworkTableAssembly-C_7Z-rMs.js"), f = await d({ 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`), [])), p = new Set(s.tables.map((e) => e.tableName)), m = [...[...p].map((e) => ({ name: e })), ...f.map((e) => e.tableName).filter((e) => !p.has(e)).map((e) => ({
192
+ ], { assembleFrameworkTables: d } = await import("./frameworkTableAssembly-Df2Ymp2f.js"), f = await d({ 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`), [])), p = new Set(s.tables.map((e) => e.tableName)), m = [...[...p].map((e) => ({ name: e })), ...f.map((e) => e.tableName).filter((e) => !p.has(e)).map((e) => ({
193
193
  name: e,
194
194
  framework: !0
195
195
  }))], h = c;
@@ -1,7 +1,7 @@
1
1
  import { a as e, t } from "./cliArgs-D4p8n7EE.js";
2
2
  import { a as n, i as r, n as i, r as a, t as o } from "./cloudClient-DWL-Hw_T.js";
3
3
  import { n as s } from "./cliOutput-D1tSBoRM.js";
4
- import { d as c, f as l, o as u } from "./projectScaffold-B4dmTlwT.js";
4
+ import { d as c, f as l, o as u } from "./projectScaffold-CSN0OzBV.js";
5
5
  import { basename as d, join as f, resolve as p } from "node:path";
6
6
  import { promises as m } from "node:fs";
7
7
  import { ansi as h } from "@voltro/logger";
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./codegen-SIepQtUl.js";
2
+ export { e as checkRpcGroupFreshness };
@@ -1,4 +1,4 @@
1
- import { b as e, s as t, x as n } from "./fileConventions-DASGEmj-.js";
1
+ import { S as e, c as t, x as n } from "./fileConventions-l-RIXbx8.js";
2
2
  import { dirname as r, join as i, relative as a, resolve as o } from "node:path";
3
3
  import { promises as s, readFileSync as c } from "node:fs";
4
4
  import { pathToFileURL as l } from "node:url";
@@ -162,7 +162,7 @@ var h = /* @__PURE__ */ new Set(/* @__PURE__ */ "crypto.fs.path.os.net.http.http
162
162
  await a(o);
163
163
  continue;
164
164
  }
165
- s.isFile() && (n.test(s.name) || e.test(s.name)) && r.push(o);
165
+ s.isFile() && (e.test(s.name) || n.test(s.name)) && r.push(o);
166
166
  }
167
167
  };
168
168
  return await a(t), r;
@@ -304,8 +304,8 @@ ${o.join("\n\n")}\n`);
304
304
  file: t,
305
305
  reason: "a descriptor changed since the group was generated"
306
306
  };
307
- }, Q = (e, t, n, i = [], o = [], s = !1, l = !1, u = [], d = "") => {
308
- let f = o.length > 0, m = o.flatMap((e) => [{
307
+ }, Q = (e, t, n, i = [], o = [], s = !1, l = !1, u = [], d = {}, f = "") => {
308
+ let m = o.length > 0, h = o.flatMap((e) => [{
309
309
  file: e.file,
310
310
  exportName: e.exportName,
311
311
  rpcTag: `${e.name}.send`,
@@ -315,7 +315,7 @@ ${o.join("\n\n")}\n`);
315
315
  exportName: e.exportName,
316
316
  rpcTag: `${e.name}.messages`,
317
317
  kind: "query"
318
- }]), h = [...new Map(u.map((e) => [e.tag, e])).values()].sort((e, t) => e.tag < t.tag ? -1 : 1), g = h.map((e) => ({
318
+ }]), g = [...new Map(u.map((e) => [e.tag, e])).values()].sort((e, t) => e.tag < t.tag ? -1 : 1), _ = g.map((e) => ({
319
319
  file: `plugin:${e.module}`,
320
320
  exportName: e.name,
321
321
  rpcTag: e.tag,
@@ -323,26 +323,26 @@ ${o.join("\n\n")}\n`);
323
323
  }));
324
324
  ee([
325
325
  ...n,
326
- ...m,
327
- ...g
326
+ ...h,
327
+ ..._
328
328
  ], e), q([
329
329
  ...n,
330
- ...m,
331
- ...g
330
+ ...h,
331
+ ..._
332
332
  ], e);
333
- let _ = (e) => e.replace(/[^a-zA-Z0-9_$]/g, "_"), v = (e) => `__src_agent_${_(e.name)}`, y = (e) => `__agentRoutes_${_(e.name)}`, b = i.length > 0, x = i.map((e, t) => `import { ${e.name} as __pe${t} } from '${e.module}'`), S = b ? ", __voltroPluginErrors" : "", C = h.length > 0, w = h.map((e, t) => `import { ${e.name} as __prpc${t} } from '${e.module}'`), T = (e) => e === "query" ? "queryToRpc" : e === "mutation" ? "mutationToRpc" : "actionToRpc", E = h.map((e, t) => `export const ${G(e.tag)} = ${T(e.kind)}(__prpc${t}${S})`), D = h.map((e) => ` ${G(e.tag)},`), O = [...n].sort((e, t) => e.kind === t.kind ? e.rpcTag < t.rpcTag ? -1 : 1 : J(e.kind) - J(t.kind)), k = r(t), A = (e) => `__src_${G(e.rpcTag)}`, j = (e) => {
334
- let t = `./${a(k, e.file).replace(/\\/g, "/").replace(/\.tsx?$/, "")}`;
335
- return `import { ${e.exportName} as ${A(e)} } from '${t}'`;
336
- }, M = (e) => {
337
- let t = G(e.rpcTag), n = A(e);
338
- return e.kind === "query" ? `export const ${t} = queryToRpc(${n}${S})` : e.kind === "mutation" ? `export const ${t} = mutationToRpc(${n}${S})` : e.kind === "action" ? `export const ${t} = actionToRpc(${n}${S})` : e.kind === "stream" ? `export const ${t} = streamToRpc(${n}${S})` : e.kind === "event" ? `export const ${t} = eventToRpc(${n}${S})` : [
333
+ let v = (e) => e.replace(/[^a-zA-Z0-9_$]/g, "_"), y = (e) => `__src_agent_${v(e.name)}`, b = (e) => `__agentRoutes_${v(e.name)}`, x = i.length > 0, S = i.map((e, t) => `import { ${e.name} as __pe${t} } from '${e.module}'`), C = x ? ", __voltroPluginErrors" : "", w = g.length > 0, T = g.map((e, t) => `import { ${e.name} as __prpc${t} } from '${e.module}'`), E = (e) => e === "query" ? "queryToRpc" : e === "mutation" ? "mutationToRpc" : "actionToRpc", D = g.map((e, t) => `export const ${G(e.tag)} = ${E(e.kind)}(withRpcTag(__prpc${t}, ${JSON.stringify(e.tag)})${C})`), O = g.map((e) => ` ${G(e.tag)},`), k = [...n].sort((e, t) => e.kind === t.kind ? e.rpcTag < t.rpcTag ? -1 : 1 : J(e.kind) - J(t.kind)), A = r(t), j = (e) => `__src_${G(e.rpcTag)}`, M = (e) => {
334
+ let t = `./${a(A, e.file).replace(/\\/g, "/").replace(/\.tsx?$/, "")}`;
335
+ return `import { ${e.exportName} as ${j(e)} } from '${t}'`;
336
+ }, N = (e) => {
337
+ let t = G(e.rpcTag), n = j(e);
338
+ return e.kind === "query" ? `export const ${t} = queryToRpc(${n}${C})` : e.kind === "mutation" ? `export const ${t} = mutationToRpc(${n}${C})` : e.kind === "action" ? `export const ${t} = actionToRpc(${n}${C})` : e.kind === "stream" ? `export const ${t} = streamToRpc(${n}${C})` : e.kind === "event" ? `export const ${t} = eventToRpc(${n}${C})` : [
339
339
  `export const ${t} = Rpc.make('${e.rpcTag}', {`,
340
340
  ` payload: strictInput(${n}.payloadSchema),`,
341
341
  " success: WorkflowRunHandleSchema,",
342
342
  ` error: ${n}.errorSchema,`,
343
343
  "})"
344
344
  ].join("\n");
345
- }, N = [...O.filter((e) => e.kind === "query" || e.kind === "mutation" || e.kind === "action" || e.kind === "stream").map((e) => ` | __AppErrorOf<typeof ${A(e)}>`), ...b ? [" | Schema.Schema.Type<(typeof __voltroPluginErrors)[number]>"] : []], P = N.length > 0, F = O.some((e) => e.kind === "workflow"), I = F ? [
345
+ }, P = [...k.filter((e) => e.kind === "query" || e.kind === "mutation" || e.kind === "action" || e.kind === "stream").map((e) => ` | __AppErrorOf<typeof ${j(e)}>`), ...x ? [" | Schema.Schema.Type<(typeof __voltroPluginErrors)[number]>"] : []], F = P.length > 0, I = k.some((e) => e.kind === "workflow"), L = I ? [
346
346
  "__voltroWorkflowRun",
347
347
  "__voltroWorkflowRuns",
348
348
  "__voltroWorkflowRunSteps",
@@ -353,27 +353,29 @@ ${o.join("\n\n")}\n`);
353
353
  "__voltroWorkflowResume",
354
354
  "__voltroWorkflowSignal",
355
355
  "__voltroWorkflowUpdate"
356
- ] : [], L = s ? [
356
+ ] : [], R = s ? [
357
357
  "__voltroUndoLog",
358
358
  "__voltroUndoApply",
359
359
  "__voltroUndoRedo"
360
- ] : [], R = O.some((e) => e.requiresApproval === !0), z = R ? ["__voltroApprovalsPending", "__voltroApprovalsDecide"] : [], B = l ? [
360
+ ] : [], z = k.some((e) => e.requiresApproval === !0), B = z ? ["__voltroApprovalsPending", "__voltroApprovalsDecide"] : [], V = l ? [
361
361
  "__voltroConnectionsList",
362
362
  "__voltroConnectionStart",
363
363
  "__voltroConnectionSubmitToken",
364
364
  "__voltroConnectionDisconnect"
365
- ] : [], V = [
366
- ...O.map((e) => ` ${G(e.rpcTag)},`),
365
+ ] : [], H = [
366
+ ...k.map((e) => ` ${G(e.rpcTag)},`),
367
367
  ...o.flatMap((e) => [` ${G(`${e.name}.send`)},`, ` ${G(`${e.name}.messages`)},`]),
368
- ...I.map((e) => ` ${e},`),
369
368
  ...L.map((e) => ` ${e},`),
370
- ...z.map((e) => ` ${e},`),
369
+ ...R.map((e) => ` ${e},`),
371
370
  ...B.map((e) => ` ${e},`),
372
- ...D
373
- ].join("\n"), H = ["queryToRpc"];
374
- (O.some((e) => e.kind === "mutation") || h.some((e) => e.kind === "mutation")) && H.push("mutationToRpc"), (O.some((e) => e.kind === "action") || F || f || h.some((e) => e.kind === "action")) && H.push("actionToRpc"), O.some((e) => e.kind === "stream") && H.push("streamToRpc"), O.some((e) => e.kind === "event") && H.push("eventToRpc"), F && H.push("strictInput", "WorkflowRunHandleSchema", "workflowCancelDescriptor", "workflowDomainEventsQueryDescriptor", "workflowEventDeliveriesQueryDescriptor", "workflowResumeDescriptor", "workflowRunEventsQueryDescriptor", "workflowRunQueryDescriptor", "workflowRunsQueryDescriptor", "workflowRunStepsQueryDescriptor", "workflowSignalDescriptor", "workflowUpdateDescriptor"), s && H.push("mutationToRpc", "undoLogQueryDescriptor", "undoApplyDescriptor", "undoRedoDescriptor"), R && H.push("mutationToRpc", "approvalsPendingQueryDescriptor", "approvalsDecideDescriptor"), l && H.push("mutationToRpc", "actionToRpc", "connectionsListQueryDescriptor", "connectionStartDescriptor", "connectionSubmitTokenDescriptor", "connectionDisconnectDescriptor"), (O.some((e) => e.kind === "query" || e.kind === "mutation" || e.kind === "action" || e.kind === "stream") || f || F || s || R || l || C) && H.push("normalizeDescriptor");
375
- let U = [...new Set(H)].sort(), W = [...O.filter((e) => e.kind === "query" || e.kind === "mutation" || e.kind === "action" || e.kind === "stream").map((e) => [e.rpcTag, A(e)]), ...o.flatMap((e) => [[`${e.name}.send`, `${y(e)}.send`], [`${e.name}.messages`, `${y(e)}.messages`]])], K = [
376
- ...F ? [
371
+ ...V.map((e) => ` ${e},`),
372
+ ...O
373
+ ].join("\n"), U = ["queryToRpc"];
374
+ w && U.push("withRpcTag");
375
+ let W = Object.entries(d).sort(([e], [t]) => e < t ? -1 : 1), K = W.length > 0;
376
+ K && U.push("registerPluginAliases"), (k.some((e) => e.kind === "mutation") || g.some((e) => e.kind === "mutation")) && U.push("mutationToRpc"), (k.some((e) => e.kind === "action") || I || m || g.some((e) => e.kind === "action")) && U.push("actionToRpc"), k.some((e) => e.kind === "stream") && U.push("streamToRpc"), k.some((e) => e.kind === "event") && U.push("eventToRpc"), I && U.push("strictInput", "WorkflowRunHandleSchema", "workflowCancelDescriptor", "workflowDomainEventsQueryDescriptor", "workflowEventDeliveriesQueryDescriptor", "workflowResumeDescriptor", "workflowRunEventsQueryDescriptor", "workflowRunQueryDescriptor", "workflowRunsQueryDescriptor", "workflowRunStepsQueryDescriptor", "workflowSignalDescriptor", "workflowUpdateDescriptor"), s && U.push("mutationToRpc", "undoLogQueryDescriptor", "undoApplyDescriptor", "undoRedoDescriptor"), z && U.push("mutationToRpc", "approvalsPendingQueryDescriptor", "approvalsDecideDescriptor"), l && U.push("mutationToRpc", "actionToRpc", "connectionsListQueryDescriptor", "connectionStartDescriptor", "connectionSubmitTokenDescriptor", "connectionDisconnectDescriptor"), (k.some((e) => e.kind === "query" || e.kind === "mutation" || e.kind === "action" || e.kind === "stream") || m || I || s || z || l || w) && U.push("normalizeDescriptor");
377
+ let Y = [...new Set(U)].sort(), X = [...k.filter((e) => e.kind === "query" || e.kind === "mutation" || e.kind === "action" || e.kind === "stream").map((e) => [e.rpcTag, j(e)]), ...o.flatMap((e) => [[`${e.name}.send`, `${b(e)}.send`], [`${e.name}.messages`, `${b(e)}.messages`]])], Z = [
378
+ ...I ? [
377
379
  ["__voltro.workflow.run", "workflowRunQueryDescriptor"],
378
380
  ["__voltro.workflow.runs", "workflowRunsQueryDescriptor"],
379
381
  ["__voltro.workflow.run.steps", "workflowRunStepsQueryDescriptor"],
@@ -390,20 +392,20 @@ ${o.join("\n\n")}\n`);
390
392
  ["__voltro.undo.apply", "undoApplyDescriptor"],
391
393
  ["__voltro.undo.redo", "undoRedoDescriptor"]
392
394
  ] : [],
393
- ...R ? [["__voltro.approvals.pending", "approvalsPendingQueryDescriptor"], ["__voltro.approvals.decide", "approvalsDecideDescriptor"]] : [],
395
+ ...z ? [["__voltro.approvals.pending", "approvalsPendingQueryDescriptor"], ["__voltro.approvals.decide", "approvalsDecideDescriptor"]] : [],
394
396
  ...l ? [
395
397
  ["__voltro.connections.list", "connectionsListQueryDescriptor"],
396
398
  ["__voltro.connections.start", "connectionStartDescriptor"],
397
399
  ["__voltro.connections.submitToken", "connectionSubmitTokenDescriptor"],
398
400
  ["__voltro.connections.disconnect", "connectionDisconnectDescriptor"]
399
401
  ] : [],
400
- ...h.map((e, t) => [e.tag, `__prpc${t}`])
401
- ], Y = ([e, t]) => ` ${JSON.stringify(e)}: normalizeDescriptor(${t}),`, X = ([e, t]) => ` readonly ${JSON.stringify(e)}: typeof ${t}`, Z = W.map(Y), Q = K.map(Y), $ = O.filter((e) => e.kind === "workflow").map((e) => ` ${JSON.stringify(e.rpcTag)}: { kind: 'workflow' },`), ne = O.filter((e) => e.kind === "workflow").map((e) => ` readonly ${JSON.stringify(e.rpcTag)}: { readonly kind: 'workflow' }`), re = [
402
- ...W.map(X),
403
- ...ne,
404
- ...K.map(X)
405
- ], ie = O.filter((e) => e.kind === "workflow").map((e) => {
406
- let t = A(e);
402
+ ...g.map((e, t) => [e.tag, `__prpc${t}`])
403
+ ], Q = ([e, t]) => ` ${JSON.stringify(e)}: normalizeDescriptor(${t}),`, $ = ([e, t]) => ` readonly ${JSON.stringify(e)}: typeof ${t}`, ne = X.map(Q), re = Z.map(Q), ie = k.filter((e) => e.kind === "workflow").map((e) => ` ${JSON.stringify(e.rpcTag)}: { kind: 'workflow' },`), ae = k.filter((e) => e.kind === "workflow").map((e) => ` readonly ${JSON.stringify(e.rpcTag)}: { readonly kind: 'workflow' }`), oe = [
404
+ ...X.map($),
405
+ ...ae,
406
+ ...Z.map($)
407
+ ], se = k.filter((e) => e.kind === "workflow").map((e) => {
408
+ let t = j(e);
407
409
  return [
408
410
  ` ${JSON.stringify(e.rpcTag)}: {`,
409
411
  " kind: 'workflow',",
@@ -414,44 +416,53 @@ ${o.join("\n\n")}\n`);
414
416
  ` updates: __voltroWorkflowMessages(${t}).updates,`,
415
417
  " },"
416
418
  ].join("\n");
417
- }), ae = [...O, ...o.map((e) => ({
419
+ }), ce = [...k, ...o.map((e) => ({
418
420
  rpcTag: `agent:${e.name}`,
419
421
  file: e.file
420
422
  }))];
421
423
  return [
422
424
  "// THIS FILE IS GENERATED — DO NOT EDIT BY HAND.",
423
425
  "// Re-emitted by `voltro dev` whenever query/mutation/action/stream/workflow files change.",
424
- `// descriptor-fingerprint: ${p("sha1").update(ae.map((e) => {
426
+ `// descriptor-fingerprint: ${p("sha1").update(ce.map((e) => {
425
427
  let t = "";
426
428
  try {
427
429
  t = c(e.file, "utf8");
428
430
  } catch {}
429
431
  return `${e.rpcTag}\u0000${t}`;
430
432
  }).join("")).digest("hex").slice(0, 16)}`,
431
- `${te}${d}`,
433
+ `${te}${f}`,
432
434
  "// Source files:",
433
- ...O.map((t) => `// - ${a(e, t.file).replace(/\\/g, "/")}`),
435
+ ...k.map((t) => `// - ${a(e, t.file).replace(/\\/g, "/")}`),
434
436
  ...o.map((t) => `// - ${a(e, t.file).replace(/\\/g, "/")} (agent)`),
435
437
  "",
436
- F ? "import { Rpc, RpcGroup } from '@effect/rpc'" : "import { RpcGroup } from '@effect/rpc'",
437
- ...F || P ? ["import { Schema } from 'effect'"] : [],
438
- `import { ${U.join(", ")} } from '@voltro/protocol'`,
439
- ...f ? ["import { agentRouteDescriptors as __voltroAgentRoutes } from '@voltro/ai/agent'"] : [],
438
+ I ? "import { Rpc, RpcGroup } from '@effect/rpc'" : "import { RpcGroup } from '@effect/rpc'",
439
+ ...I || F ? ["import { Schema } from 'effect'"] : [],
440
+ `import { ${Y.join(", ")} } from '@voltro/protocol'`,
441
+ ...m ? ["import { agentRouteDescriptors as __voltroAgentRoutes } from '@voltro/ai/agent'"] : [],
440
442
  "",
441
- ...O.map(j),
442
- ...o.map((e) => `import { ${e.exportName} as ${v(e)} } from './${a(k, e.file).replace(/\\/g, "/").replace(/\.tsx?$/, "")}'`),
443
- ...b ? ["", ...x] : [],
444
- ...C ? ["", ...w] : [],
443
+ ...k.map(M),
444
+ ...o.map((e) => `import { ${e.exportName} as ${y(e)} } from './${a(A, e.file).replace(/\\/g, "/").replace(/\.tsx?$/, "")}'`),
445
+ ...x ? ["", ...S] : [],
446
+ ...w ? ["", ...T] : [],
447
+ ...K ? [
448
+ "",
449
+ "/** Which namespace each installed plugin answers to in THIS app. Read by",
450
+ " * the plugins' own client hooks via `pluginTag()` so an `alias` in",
451
+ " * app.config.ts moves them too, not just the server's routes. */",
452
+ "registerPluginAliases({",
453
+ ...W.map(([e, t]) => ` ${JSON.stringify(e)}: ${JSON.stringify(t)},`),
454
+ "})"
455
+ ] : [],
445
456
  "",
446
- ...o.map((e) => `const ${y(e)} = __voltroAgentRoutes(${v(e)})`),
447
- ...f ? [""] : [],
448
- ...b ? [
457
+ ...o.map((e) => `const ${b(e)} = __voltroAgentRoutes(${y(e)})`),
458
+ ...m ? [""] : [],
459
+ ...x ? [
449
460
  "/** Cross-cutting plugin error schemas, unioned into every rpc's",
450
461
  " * wire error so interceptor failures decode typed on the client. */",
451
462
  `const __voltroPluginErrors = [${i.map((e, t) => `__pe${t}`).join(", ")}] as const`,
452
463
  ""
453
464
  ] : [],
454
- ...F ? [
465
+ ...I ? [
455
466
  "const __voltroEmptyWorkflowMessages = { signals: {}, updates: {} } as const",
456
467
  "const __voltroWorkflowMessages = <const M extends {",
457
468
  " readonly signals: Readonly<Record<string, Schema.Schema.Any>>",
@@ -460,7 +471,7 @@ ${o.join("\n\n")}\n`);
460
471
  " definition.__voltroWorkflowMessages ?? __voltroEmptyWorkflowMessages",
461
472
  "",
462
473
  "export const workflowDescriptors = {",
463
- ...ie,
474
+ ...se,
464
475
  "} as const",
465
476
  "",
466
477
  "export type WorkflowDescriptors = typeof workflowDescriptors",
@@ -479,9 +490,9 @@ ${o.join("\n\n")}\n`);
479
490
  "} }",
480
491
  ""
481
492
  ] : [],
482
- ...O.map(M),
483
- ...o.flatMap((e) => [`export const ${G(`${e.name}.send`)} = actionToRpc(${y(e)}.send${S})`, `export const ${G(`${e.name}.messages`)} = queryToRpc(${y(e)}.messages${S})`]),
484
- ...F ? [
493
+ ...k.map(N),
494
+ ...o.flatMap((e) => [`export const ${G(`${e.name}.send`)} = actionToRpc(${b(e)}.send${C})`, `export const ${G(`${e.name}.messages`)} = queryToRpc(${b(e)}.messages${C})`]),
495
+ ...I ? [
485
496
  "export const __voltroWorkflowRun = queryToRpc(workflowRunQueryDescriptor)",
486
497
  "export const __voltroWorkflowRuns = queryToRpc(workflowRunsQueryDescriptor)",
487
498
  "export const __voltroWorkflowRunSteps = queryToRpc(workflowRunStepsQueryDescriptor)",
@@ -498,26 +509,26 @@ ${o.join("\n\n")}\n`);
498
509
  "export const __voltroUndoApply = mutationToRpc(undoApplyDescriptor)",
499
510
  "export const __voltroUndoRedo = mutationToRpc(undoRedoDescriptor)"
500
511
  ] : [],
501
- ...R ? ["export const __voltroApprovalsPending = queryToRpc(approvalsPendingQueryDescriptor)", "export const __voltroApprovalsDecide = mutationToRpc(approvalsDecideDescriptor)"] : [],
512
+ ...z ? ["export const __voltroApprovalsPending = queryToRpc(approvalsPendingQueryDescriptor)", "export const __voltroApprovalsDecide = mutationToRpc(approvalsDecideDescriptor)"] : [],
502
513
  ...l ? [
503
514
  "export const __voltroConnectionsList = queryToRpc(connectionsListQueryDescriptor)",
504
515
  "export const __voltroConnectionStart = actionToRpc(connectionStartDescriptor)",
505
516
  "export const __voltroConnectionSubmitToken = mutationToRpc(connectionSubmitTokenDescriptor)",
506
517
  "export const __voltroConnectionDisconnect = mutationToRpc(connectionDisconnectDescriptor)"
507
518
  ] : [],
508
- ...E,
519
+ ...D,
509
520
  "",
510
521
  "export const appGroup = RpcGroup.make(",
511
- V,
522
+ H,
512
523
  ")",
513
524
  "",
514
525
  "/** Per-rpc-tag metadata for the client. Drives auto-optimistic etc.",
515
526
  " * Function fields (target.shape, target.identify) survive because",
516
527
  " * the descriptors themselves are imported by reference. */",
517
528
  "export const appDescriptors = {",
518
- ...Z,
519
- ...$,
520
- ...Q,
529
+ ...ne,
530
+ ...ie,
531
+ ...re,
521
532
  "} as const",
522
533
  "",
523
534
  "export type AppDescriptors = typeof appDescriptors",
@@ -541,16 +552,16 @@ ${o.join("\n\n")}\n`);
541
552
  " * Types only — erased at build time, so importing it costs the bundle",
542
553
  " * nothing. */",
543
554
  "export type AppProcedures = {",
544
- ...re,
555
+ ...oe,
545
556
  "}",
546
557
  "",
547
- ...P ? [
558
+ ...F ? [
548
559
  "type __AppErrorOf<D> = D extends { readonly error: infer E extends Schema.Schema.Any } ? Schema.Schema.Type<E> : never",
549
560
  "/** Union of every typed error the app's rpcs can fail with — the declared",
550
561
  " * `error:` schemas + cross-cutting plugin errors. Generated by reference,",
551
562
  " * so it can never drift out of date. (Workflows: see `WorkflowErrors`.) */",
552
563
  "export type AppError =",
553
- ...N,
564
+ ...P,
554
565
  "/** The `_tag` literal of every AppError — the exhaustive key set for `matchError`. */",
555
566
  "export type AppErrorTag = AppError extends { readonly _tag: infer T extends string } ? T : never",
556
567
  "",
@@ -594,7 +605,7 @@ ${o.join("\n\n")}\n`);
594
605
  "workflows"
595
606
  ]), p = (e) => e.slice(e.lastIndexOf("/") + 1), m = u;
596
607
  for (; m !== t && d.has(p(m));) m = m.slice(0, m.lastIndexOf("/")) || "/";
597
- let h = o(e.outputFile ?? i(m, "rpcGroup.generated.ts")), g = [...new Map((e.pluginErrorImports ?? []).map((e) => [`${e.module}#${e.name}`, e])).values()], _ = [...new Map((e.pluginRpcImports ?? []).map((e) => [e.tag, e])).values()], v = await Y(r(h)), y = Q(t, h, a, g, c, f(), l, _, v), b = [];
608
+ let h = o(e.outputFile ?? i(m, "rpcGroup.generated.ts")), g = [...new Map((e.pluginErrorImports ?? []).map((e) => [`${e.module}#${e.name}`, e])).values()], _ = [...new Map((e.pluginRpcImports ?? []).map((e) => [e.tag, e])).values()], v = await Y(r(h)), y = Q(t, h, a, g, c, f(), l, _, e.pluginAliases ?? {}, v), b = [];
598
609
  for (let t of e.pluginContributions ?? []) {
599
610
  let e = null;
600
611
  try {
@@ -0,0 +1,42 @@
1
+ import { Dn as e, En as t, V as n, l as r, u as i } from "./dev-Ca_A_S9v.js";
2
+ import { n as a } from "./frameworkTableAssembly-Do-cf6RJ.js";
3
+ import { i as o, r as s } from "./codegen-SIepQtUl.js";
4
+ import { n as c, r as l } from "./mobileCommand-D9O6iq3D.js";
5
+ import { basename as u, relative as d, resolve as f } from "node:path";
6
+ //#region src/codegenCommand.ts
7
+ var p = async (t) => {
8
+ let { config: i, present: a, error: o } = await r(t);
9
+ if (a && i === null) return {
10
+ kind: "refused",
11
+ reason: "app.config.ts exists but could not be loaded" + (o === void 0 ? "" : ` — ${o instanceof Error ? o.message : String(o)}`)
12
+ };
13
+ let c = i?.plugins ?? [], { pluginContributions: l, pluginErrorImports: d, pluginRpcImports: f, pluginAliases: p } = await n(c, i?.name ?? u(t), t), h = await s({
14
+ root: t,
15
+ ...l.length > 0 ? { pluginContributions: l } : {},
16
+ ...d.length > 0 ? { pluginErrorImports: d } : {},
17
+ ...f.length > 0 ? { pluginRpcImports: f } : {},
18
+ ...Object.keys(p).length > 0 ? { pluginAliases: p } : {},
19
+ ...i?.name === void 0 ? {} : { apiName: i.name }
20
+ });
21
+ if (!h) return { kind: "nothing-to-write" };
22
+ let g = await m(t, i), _ = await e(h, g);
23
+ return {
24
+ kind: "wrote",
25
+ file: h,
26
+ plugins: c.length,
27
+ errorSchemas: d.length,
28
+ routes: f.length,
29
+ tables: g.size,
30
+ dts: _
31
+ };
32
+ }, m = async (e, n) => {
33
+ let r = await o(e), { tables: s } = await i(r), c = await a({ root: e });
34
+ return t(s, c, n?.analytics?.tables ?? []);
35
+ }, h = async (e) => {
36
+ let t = f(e.find((e) => !e.startsWith("-")) ?? process.cwd()), n = await l(t);
37
+ if (n.apis.kind !== "not-a-mobile-app") return c(t, n);
38
+ let r = await p(t);
39
+ return r.kind === "refused" ? (console.error(`voltro codegen: ${r.reason} — refusing to write.`), console.error(" The generated file would omit every plugin's error union and client routes, and would typecheck, so the omission would only surface as a missing error tag at runtime."), 1) : r.kind === "nothing-to-write" ? (console.log("voltro codegen: no rpc primitives found — nothing to write."), 0) : (console.log(`voltro codegen: wrote ${d(t, r.file)} (plugins ${r.plugins}, error schemas ${r.errorSchemas}, plugin routes ${r.routes})`), console.log(r.dts.action === "removed" ? ` removed ${d(t, r.dts.path)} — no tables declared, so \`source:\` is \`string\` again` : r.dts.action === "skipped" ? " no tables declared — `source:` stays `string`" : ` ${r.dts.action} ${d(t, r.dts.path)} (${r.tables} table name(s) typed for \`source:\`)`), r.plugins > 0 && r.errorSchemas === 0 && console.log(" note: no plugin contributed a cross-cutting error schema, so the wire error union carries only each procedure's own `error:`. Expected if none of your plugins declare `errorSchemas` — but `guards:` needs @voltro/plugin-rbac for its ScopeError to decode typed."), 0);
40
+ };
41
+ //#endregion
42
+ export { p as regenerateRpcGroup, h as runCodegenCommand };
@@ -1,7 +1,7 @@
1
- import { D as e, E as t, F as n, d as r, f as i, g as a, i as o, k as s, p as c, r as l, u } from "./fileConventions-DASGEmj-.js";
2
- import { t as d } from "./pageConvention-C938S8oC.js";
1
+ import { A as e, D as t, I as n, O as r, _ as i, d as a, f as o, i as s, m as c, p as l, r as u } from "./fileConventions-l-RIXbx8.js";
2
+ import { t as d } from "./pageConvention-CMpfDN6r.js";
3
3
  import { r as f } from "./tsconfigPaths-BWXBWgcl.js";
4
- import { a as p, i as m, t as h } from "./fileTaxonomy-B7uxipWS.js";
4
+ import { a as p, i as m, t as h } from "./fileTaxonomy-CbyMQYx_.js";
5
5
  import { basename as g, dirname as _, join as v, relative as ee } from "node:path";
6
6
  import { existsSync as y, readFileSync as te, statSync as ne } from "node:fs";
7
7
  import { execFileSync as re } from "node:child_process";
@@ -1503,7 +1503,7 @@ var S = (e, t, n) => {
1503
1503
  }, dt = /\.page\.tsx$/, F = (e) => {
1504
1504
  let t = e.includes("\\src\\pages\\") ? "\\src\\pages\\" : "/src/pages/", n = e.indexOf(t);
1505
1505
  return n === -1 ? null : e.slice(0, n);
1506
- }, ft = (e) => e.endsWith(".tsx") && !a.has(e) && !d(e) && !/\.island\.tsx$/.test(e) && !dt.test(e), pt = w({
1506
+ }, ft = (e) => e.endsWith(".tsx") && !i.has(e) && !d(e) && !/\.island\.tsx$/.test(e) && !dt.test(e), pt = w({
1507
1507
  version: "0.14.0",
1508
1508
  id: "0.14.0/03_pages-suffix",
1509
1509
  title: "Pages are declared with a .page.tsx suffix",
@@ -1554,17 +1554,17 @@ var S = (e, t, n) => {
1554
1554
  }), mt = [
1555
1555
  /\.page\.tsx$/,
1556
1556
  c,
1557
- o,
1558
- l,
1559
- r,
1560
1557
  s,
1561
- i,
1562
1558
  u,
1559
+ o,
1563
1560
  e,
1561
+ l,
1562
+ a,
1563
+ r,
1564
1564
  t
1565
1565
  ], ht = (e) => {
1566
1566
  let t = g(e);
1567
- return !/\.tsx?$/.test(t) || a.has(t) || n(t) || t === "index.ts" || t === "index.tsx" || t === "app.config.ts" ? !1 : !mt.some((e) => e.test(t));
1567
+ return !/\.tsx?$/.test(t) || i.has(t) || n(t) || t === "index.ts" || t === "index.tsx" || t === "app.config.ts" ? !1 : !mt.some((e) => e.test(t));
1568
1568
  }, gt = (e) => {
1569
1569
  let t = [], n = [], r = [], i = [];
1570
1570
  for (let [a, o] of e.getExportedDeclarations()) {
@@ -6130,6 +6130,61 @@ var S = (e, t, n) => {
6130
6130
  "Partial registries (`Partial<Record<WidgetKind, …>>` or per-kind lookups)",
6131
6131
  "need nothing."
6132
6132
  ].join("\n")
6133
+ }),
6134
+ w({
6135
+ version: "0.55.0",
6136
+ id: "0.55.0/01_target-relations-declare-columns",
6137
+ title: "A target's `relations:` names the junction's two columns now, not just the table",
6138
+ kind: "manual",
6139
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => {
6140
+ let t = e.getFullText();
6141
+ return /relations:\s*\{[^}{]*:\s*['"`]/.test(t);
6142
+ }),
6143
+ note: [
6144
+ "A write target declares its many-to-many relations as objects now:",
6145
+ "",
6146
+ " // before",
6147
+ " target: { table: 'employees', op: 'update',",
6148
+ " relations: { assignedStores: 'employee_assigned_stores' } }",
6149
+ "",
6150
+ " // after",
6151
+ " target: { table: 'employees', op: 'update',",
6152
+ " relations: { assignedStores: {",
6153
+ " junction: 'employee_assigned_stores',",
6154
+ " anchorColumn: 'employeeId', // the junction reference() pointing at `employees`",
6155
+ " targetColumn: 'storeId', // the junction's other reference()",
6156
+ " } } }",
6157
+ "",
6158
+ "Take both column names from the junction table's own `reference()`",
6159
+ "columns in your `db/` schema — `anchorColumn` is the one pointing at the",
6160
+ "target's table, `targetColumn` is the other one.",
6161
+ "",
6162
+ "Why: the SAME declaration now drives the optimistic update in the browser,",
6163
+ "so a multi-reference field flips as instantly as a scalar one instead of",
6164
+ "waiting for the server delta. The browser cannot import your schema, so the",
6165
+ "columns have to be stated. They are not taken on trust: before it writes,",
6166
+ "the server compares them against the junction's real reference columns and",
6167
+ "refuses — naming the correct pair — if they disagree."
6168
+ ].join("\n")
6169
+ }),
6170
+ w({
6171
+ version: "0.55.0",
6172
+ id: "0.55.0/02_widget-kind-gained-rich-text",
6173
+ title: "WidgetKind gained 'rich-text' — total widget registries need one new entry",
6174
+ kind: "manual",
6175
+ appliesTo: ({ project: e }) => e.getSourceFiles().some((e) => /Record<WidgetKind/.test(e.getFullText())),
6176
+ note: [
6177
+ "This repository types a widget registry as `Record<WidgetKind, …>`.",
6178
+ "`WidgetKind` gained `'rich-text'`, so the total map needs one new entry.",
6179
+ "The framework ships a default you can point at:",
6180
+ "",
6181
+ " import { RichTextWidget } from '@voltro/web'",
6182
+ " // …",
6183
+ " 'rich-text': RichTextWidget,",
6184
+ "",
6185
+ "Partial registries (`Partial<Record<WidgetKind, …>>` or per-kind lookups)",
6186
+ "need nothing."
6187
+ ].join("\n")
6133
6188
  })
6134
6189
  ], J = /* @__PURE__ */ new Set([
6135
6190
  "node_modules",