@voltro/cli 0.46.0 → 0.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/apiBuild-BsooZpw2.js +2 -0
  3. package/dist/{apiBuild-BKdd0I1Z.js → apiBuild-FpHCWiv6.js} +1 -1
  4. package/dist/bin.js +1 -1
  5. package/dist/{build-co6yadYz.js → build-zVygXxGB.js} +7 -7
  6. package/dist/{checkCommand-CXAXTjZL.js → checkCommand-B2Fw73lu.js} +1 -1
  7. package/dist/{checkCommand-B-eiW-G_.js → checkCommand-D0dAKciE.js} +4 -4
  8. package/dist/{codegen-sbN1Y8PB.js → codegen-CrMXs4hb.js} +176 -162
  9. package/dist/codegen-DiMn2KkZ.js +2 -0
  10. package/dist/{codegenCommand-CB6_3sX0.js → codegenCommand-BTtsnRus.js} +3 -3
  11. package/dist/{commands-C-hxgAGr.js → commands-BrFKxnYW.js} +18 -18
  12. package/dist/{dashboardCommand-CEVO0GWF.js → dashboardCommand-D9SjDc8E.js} +1 -1
  13. package/dist/{dataCommand-k0ezbQWa.js → dataCommand-Dl11q14e.js} +2 -2
  14. package/dist/dbCommand-BUD4Fd8v.js +2 -0
  15. package/dist/{dbCommand-BwkyNxn-.js → dbCommand-jbrmzwW_.js} +1 -1
  16. package/dist/{dev-DyoYst4j.js → dev-CaIfZnw5.js} +1 -1
  17. package/dist/{dev-8hTEnN6s.js → dev-RjB7eE_B.js} +2 -2
  18. package/dist/doctorCommand-5zv6PN-G.js +2 -0
  19. package/dist/{doctorCommand-B6D7HH1-.js → doctorCommand-D7X29cw6.js} +13 -13
  20. package/dist/{doctorSourceRelations-CPjSwYuZ.js → doctorSourceRelations-Dd48LPvO.js} +15 -10
  21. package/dist/{dormancyCommand-CrPAwOgo.js → dormancyCommand-BGOP27fz.js} +1 -1
  22. package/dist/{embeddingsCommand-DsSxsn_b.js → embeddingsCommand-D72E22bw.js} +1 -1
  23. package/dist/{envCommand-B_NPVGUf.js → envCommand-BHSxz6wC.js} +1 -1
  24. package/dist/{evolveCommand-DUuaCIyn.js → evolveCommand-C2ofGGlz.js} +1 -1
  25. package/dist/{frameworkTableAssembly-BPlPfU07.js → frameworkTableAssembly-BvZ0Lil_.js} +76 -72
  26. package/dist/frameworkTableAssembly-DDKtwsy2.js +2 -0
  27. package/dist/index.js +1 -1
  28. package/dist/{migrate-CM1qwalu.js → migrate-odCPGHPq.js} +2 -2
  29. package/dist/{runtimeTrace-BRNM06vK.js → runtimeTrace-C_OKr0jY.js} +1 -1
  30. package/dist/{sdkgen-CRCw_XcR.js → sdkgen-D9trW7sl.js} +1 -1
  31. package/dist/{serveCommand-CHOr74WM.js → serveCommand-BU0wfV6V.js} +388 -385
  32. package/dist/serveCommand-Bwrn_9Fn.js +2 -0
  33. package/dist/serveEntry.js +1 -1
  34. package/dist/{test-CHb7UwvE.js → test-rXFq4S76.js} +1 -1
  35. package/dist/{webhooksCommand-BRrG_sGf.js → webhooksCommand-BqcWcbuW.js} +1 -1
  36. package/package.json +17 -17
  37. package/templates/AGENTS.md +1 -1
  38. package/templates/agent-docs/_index.md +1 -1
  39. package/templates/agent-docs/cli.md +28 -0
  40. package/templates/agent-docs/whats-new.md +14 -160
  41. package/templates/apps/api-ai/package.json +7 -7
  42. package/templates/apps/api-auth/package.json +8 -8
  43. package/templates/apps/api-backend/package.json +7 -7
  44. package/templates/apps/api-backend-deactivation/package.json +7 -7
  45. package/templates/apps/api-backend-mail/package.json +8 -8
  46. package/templates/apps/api-backend-mariadb/package.json +9 -9
  47. package/templates/apps/api-backend-sqlite/package.json +8 -8
  48. package/templates/apps/api-backend-storage/package.json +8 -8
  49. package/templates/apps/api-cms/package.json +10 -10
  50. package/templates/apps/api-collab/package.json +8 -8
  51. package/templates/apps/api-data-advanced/package.json +8 -8
  52. package/templates/apps/api-durable/package.json +8 -8
  53. package/templates/apps/api-feature-flags/package.json +9 -9
  54. package/templates/apps/api-governance/package.json +8 -8
  55. package/templates/apps/api-kv/package.json +8 -8
  56. package/templates/apps/api-moderation/package.json +8 -8
  57. package/templates/apps/api-observability/package.json +8 -8
  58. package/templates/apps/api-ratelimit/package.json +8 -8
  59. package/templates/apps/api-rbac/package.json +8 -8
  60. package/templates/apps/api-rest/package.json +7 -7
  61. package/templates/apps/api-saas/package.json +11 -11
  62. package/templates/apps/api-saas-starter/package.json +10 -10
  63. package/templates/apps/api-search/package.json +8 -8
  64. package/templates/apps/api-status/package.json +8 -8
  65. package/templates/apps/api-versioning/package.json +8 -8
  66. package/templates/apps/api-webhooks/package.json +9 -9
  67. package/templates/apps/changelog/package.json +6 -6
  68. package/templates/apps/edge-functions/package.json +2 -2
  69. package/templates/apps/frontend-admin/package.json +8 -8
  70. package/templates/apps/frontend-app/package.json +9 -9
  71. package/templates/apps/frontend-auth/package.json +8 -8
  72. package/templates/apps/frontend-blank/package.json +7 -7
  73. package/templates/apps/frontend-cms/package.json +9 -9
  74. package/templates/apps/frontend-collab/package.json +10 -10
  75. package/templates/apps/frontend-contact/package.json +7 -7
  76. package/templates/apps/frontend-dashboard/package.json +7 -7
  77. package/templates/apps/frontend-docs/package.json +7 -7
  78. package/templates/apps/frontend-i18n/package.json +6 -6
  79. package/templates/apps/frontend-landing/package.json +7 -7
  80. package/templates/apps/frontend-portal/package.json +8 -8
  81. package/templates/apps/frontend-saas/package.json +8 -8
  82. package/templates/apps/frontend-spa/package.json +7 -7
  83. package/templates/apps/frontend-ssr/package.json +7 -7
  84. package/templates/apps/frontend-ssr-api/package.json +8 -8
  85. package/templates/apps/frontend-static-blog/package.json +6 -6
  86. package/templates/apps/frontend-status/package.json +8 -8
  87. package/templates/apps/mobile-app/package.json +4 -4
  88. package/dist/apiBuild-P2gewrfQ.js +0 -2
  89. package/dist/codegen-DcE2li1i.js +0 -2
  90. package/dist/dbCommand-C2XK63Dd.js +0 -2
  91. package/dist/doctorCommand-Btl2Jz1a.js +0 -2
  92. package/dist/frameworkTableAssembly-Bob3vj9R.js +0 -2
  93. package/dist/serveCommand-BNHMVXyp.js +0 -2
@@ -4,16 +4,24 @@ import { basename as o, join as s } from "node:path";
4
4
  import { existsSync as c, promises as l } from "node:fs";
5
5
  import { pathToFileURL as u } from "node:url";
6
6
  import { defineAction as d, defineMutation as f, defineQuery as ee } from "@voltro/protocol";
7
- import { _voltroApiKeysTable as te, _voltroCdcOffsetsTable as ne, _voltroIdempotencyTable as re, _voltroKvTable as ie, _voltroMigrationPlansTable as ae, _voltroMigrationsTable as oe, _voltroMssqlCdcOffsetsTable as se, _voltroReplaceInProgressTable as ce, _voltroSeedsTable as le } from "@voltro/database";
7
+ import { _voltroApiKeysTable as te, _voltroCdcOffsetsTable as ne, _voltroIdempotencyTable as re, _voltroImportRunsTable as ie, _voltroKvTable as ae, _voltroMigrationPlansTable as oe, _voltroMigrationsTable as se, _voltroMssqlCdcOffsetsTable as ce, _voltroReplaceInProgressTable as le, _voltroSeedsTable as ue } from "@voltro/database";
8
8
  import { Effect as p } from "effect";
9
9
  import { SqlClient as m } from "@effect/sql";
10
- import { _voltroApprovalsTable as ue, _voltroConnectionGrantsTable as de, _voltroConnectionsTable as fe, _voltroScheduleClaimsTable as pe, _voltroScheduleRunsTable as me, _voltroTracesTable as he, _voltroUndoLogTable as ge, _voltroWakeupsTable as h, _voltroWorkflowEventDeliveriesTable as g, _voltroWorkflowEventsTable as _, outboxAttemptsTable as v, outboxTable as y } from "@voltro/runtime";
11
- import { _voltroBudgetHoldsTable as b, _voltroWorkflowAdmissionsTable as x, _voltroWorkflowPausesTable as S, _voltroWorkflowPendingTable as C, _voltroWorkflowRunEventsTable as w, _voltroWorkflowRunStepsTable as T, _voltroWorkflowRunsTable as E, _voltroWorkflowStartContextsTable as D, _voltroWorkflowWatermarksTable as O } from "@voltro/workflow";
12
- import { agentMessagesTable as k, agentThreadsTable as A, aiBudgetTable as j, aiInferencesTable as M, aiUsageTable as N, isAgentDescriptor as P, isAgentExecutor as F, promptsTable as I, resolveToolModuleHandlers as L } from "@voltro/ai";
13
- import { _voltroWebhookDeliveriesTable as _e, _voltroWebhookTargetsTable as ve } from "@voltro/plugin-webhooks/mixin";
14
- import { _voltroStorageBlobsTable as ye, _voltroStorageGrantsTable as be, _voltroStorageRefsTable as xe, _voltroStorageUsageTable as Se } from "@voltro/plugin-storage";
10
+ import { _voltroApprovalsTable as de, _voltroConnectionGrantsTable as fe, _voltroConnectionsTable as pe, _voltroScheduleClaimsTable as me, _voltroScheduleRunsTable as he, _voltroTracesTable as ge, _voltroUndoLogTable as h, _voltroWakeupsTable as g, _voltroWorkflowEventDeliveriesTable as _, _voltroWorkflowEventsTable as v, outboxAttemptsTable as y, outboxTable as b } from "@voltro/runtime";
11
+ import { _voltroBudgetHoldsTable as x, _voltroWorkflowAdmissionsTable as S, _voltroWorkflowPausesTable as C, _voltroWorkflowPendingTable as w, _voltroWorkflowRunEventsTable as T, _voltroWorkflowRunStepsTable as E, _voltroWorkflowRunsTable as D, _voltroWorkflowStartContextsTable as O, _voltroWorkflowWatermarksTable as k } from "@voltro/workflow";
12
+ import { agentMessagesTable as A, agentThreadsTable as j, aiBudgetTable as M, aiInferencesTable as N, aiUsageTable as P, isAgentDescriptor as F, isAgentExecutor as I, promptsTable as L, resolveToolModuleHandlers as _e } from "@voltro/ai";
13
+ import { _voltroWebhookDeliveriesTable as ve, _voltroWebhookTargetsTable as ye } from "@voltro/plugin-webhooks/mixin";
14
+ import { _voltroStorageBlobsTable as be, _voltroStorageGrantsTable as xe, _voltroStorageRefsTable as Se, _voltroStorageUsageTable as Ce } from "@voltro/plugin-storage";
15
15
  //#region src/frameworkTables.ts
16
- var Ce = [
16
+ var we = [
17
+ {
18
+ table: se,
19
+ when: "always"
20
+ },
21
+ {
22
+ table: ue,
23
+ when: "always"
24
+ },
17
25
  {
18
26
  table: oe,
19
27
  when: "always"
@@ -23,12 +31,12 @@ var Ce = [
23
31
  when: "always"
24
32
  },
25
33
  {
26
- table: ae,
34
+ table: ie,
27
35
  when: "always"
28
36
  },
29
37
  {
30
- table: ce,
31
- when: "always"
38
+ table: D,
39
+ when: "workflows"
32
40
  },
33
41
  {
34
42
  table: E,
@@ -39,27 +47,27 @@ var Ce = [
39
47
  when: "workflows"
40
48
  },
41
49
  {
42
- table: w,
50
+ table: O,
43
51
  when: "workflows"
44
52
  },
45
53
  {
46
- table: D,
54
+ table: w,
47
55
  when: "workflows"
48
56
  },
49
57
  {
50
- table: C,
58
+ table: S,
51
59
  when: "workflows"
52
60
  },
53
61
  {
54
- table: x,
62
+ table: C,
55
63
  when: "workflows"
56
64
  },
57
65
  {
58
- table: S,
66
+ table: k,
59
67
  when: "workflows"
60
68
  },
61
69
  {
62
- table: O,
70
+ table: v,
63
71
  when: "workflows"
64
72
  },
65
73
  {
@@ -67,75 +75,71 @@ var Ce = [
67
75
  when: "workflows"
68
76
  },
69
77
  {
70
- table: g,
71
- when: "workflows"
72
- },
73
- {
74
- table: me,
78
+ table: he,
75
79
  when: "schedules"
76
80
  },
77
81
  {
78
- table: pe,
82
+ table: me,
79
83
  when: "schedules"
80
84
  },
81
85
  {
82
- table: ve,
86
+ table: ye,
83
87
  when: "webhooks"
84
88
  },
85
89
  {
86
- table: _e,
90
+ table: ve,
87
91
  when: "webhooks"
88
92
  },
89
93
  {
90
- table: he,
94
+ table: ge,
91
95
  when: "traces"
92
96
  },
93
97
  {
94
- table: ge,
98
+ table: h,
95
99
  when: "undo"
96
100
  },
97
101
  {
98
- table: ue,
102
+ table: de,
99
103
  when: "always"
100
104
  },
101
105
  {
102
- table: b,
106
+ table: x,
103
107
  when: "workflows"
104
108
  },
105
109
  {
106
- table: y,
110
+ table: b,
107
111
  when: "always"
108
112
  },
109
113
  {
110
- table: v,
114
+ table: y,
111
115
  when: "always"
112
116
  },
113
117
  {
114
- table: fe,
118
+ table: pe,
115
119
  when: "connections"
116
120
  },
117
121
  {
118
- table: de,
122
+ table: fe,
119
123
  when: "connections"
120
124
  },
121
125
  {
122
- table: h,
126
+ table: g,
123
127
  when: "always"
124
128
  },
125
129
  {
126
- table: xe,
130
+ table: Se,
127
131
  when: "always"
128
132
  },
129
133
  {
130
- table: be,
134
+ table: xe,
131
135
  when: "always"
132
136
  },
133
137
  {
134
- table: ye,
138
+ table: be,
135
139
  when: "always"
136
140
  },
137
141
  {
138
- table: Se,
142
+ table: Ce,
139
143
  when: "always"
140
144
  },
141
145
  {
@@ -147,32 +151,32 @@ var Ce = [
147
151
  when: "always"
148
152
  },
149
153
  {
150
- table: ie,
154
+ table: ae,
151
155
  when: "always"
152
156
  }
153
- ], we = (e) => {
154
- let t = Ce.filter((t) => t.when === "always" || t.when === "workflows" && e.workflows || t.when === "schedules" && e.schedules || t.when === "webhooks" && e.webhooks || t.when === "traces" && e.traces || t.when === "undo" && e.undo === !0 || t.when === "connections" && e.connections === !0).map((e) => e.table);
155
- return e.cdc === !0 && t.push(e.cdcDialect === "mssql" ? se : ne), t;
157
+ ], Te = (e) => {
158
+ let t = we.filter((t) => t.when === "always" || t.when === "workflows" && e.workflows || t.when === "schedules" && e.schedules || t.when === "webhooks" && e.webhooks || t.when === "traces" && e.traces || t.when === "undo" && e.undo === !0 || t.when === "connections" && e.connections === !0).map((e) => e.table);
159
+ return e.cdc === !0 && t.push(e.cdcDialect === "mssql" ? ce : ne), t;
156
160
  }, R = (e) => {
157
161
  let t = e.startsWith("@") ? e.replace(/^@[^/]+\//, "") : e;
158
162
  return (t.startsWith("plugin-") ? t.slice(7) : t).replace(/-([a-zA-Z0-9])/g, (e, t) => t.toUpperCase());
159
- }, Te = (e) => {
163
+ }, Ee = (e) => {
160
164
  let t = e.startsWith("@") ? e.replace(/^@[^/]+\//, "") : e;
161
165
  return (t.startsWith("plugin-") ? t.slice(7) : t).replace(/#/g, "--").replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
162
- }, Ee = (e, t) => z(e, t.name), z = (e, t) => {
166
+ }, z = (e, t) => B(e, t.name), B = (e, t) => {
163
167
  let n = R(e.name);
164
168
  if (!t.includes(".")) return `${n}.${t}`;
165
169
  if (e.baseName === void 0) return t;
166
170
  let r = `${R(e.baseName)}.`;
167
171
  return t.startsWith(r) ? `${n}.${t.slice(r.length)}` : t;
168
- }, B = (e) => e.openAccess === void 0 ? e.guards !== void 0 && e.guards.length > 0 ? { guards: e.guards } : {} : { openAccess: e.openAccess }, De = (e, t, n) => {
172
+ }, V = (e) => e.openAccess === void 0 ? e.guards !== void 0 && e.guards.length > 0 ? { guards: e.guards } : {} : { openAccess: e.openAccess }, De = (e, t, n) => {
169
173
  switch (e) {
170
174
  case "query": return ee({
171
175
  name: t,
172
176
  input: n.input,
173
177
  output: n.output,
174
178
  ...n.error === void 0 ? {} : { error: n.error },
175
- ...B(n),
179
+ ...V(n),
176
180
  ...n.source === void 0 ? {} : { source: n.source }
177
181
  });
178
182
  case "mutation": return f({
@@ -180,14 +184,14 @@ var Ce = [
180
184
  input: n.input,
181
185
  output: n.output,
182
186
  ...n.error === void 0 ? {} : { error: n.error },
183
- ...B(n)
187
+ ...V(n)
184
188
  });
185
189
  case "action": return d({
186
190
  name: t,
187
191
  input: n.input,
188
192
  output: n.output,
189
193
  ...n.error === void 0 ? {} : { error: n.error },
190
- ...B(n)
194
+ ...V(n)
191
195
  });
192
196
  }
193
197
  }, Oe = (e) => (t, n) => p.suspend(() => {
@@ -201,7 +205,7 @@ var Ce = [
201
205
  for (let n of e) {
202
206
  let e = n.routes ?? [];
203
207
  for (let r of e) {
204
- let e = Ee(n, r), i = De(r.kind, e, r);
208
+ let e = z(n, r), i = De(r.kind, e, r);
205
209
  t.push({
206
210
  kind: r.kind,
207
211
  file: `plugin:${n.name}`,
@@ -227,9 +231,9 @@ var Ce = [
227
231
  }
228
232
  }
229
233
  return i;
230
- }, V = "_voltro_plugin_migrations", je = () => p.gen(function* () {
234
+ }, H = "_voltro_plugin_migrations", je = () => p.gen(function* () {
231
235
  yield* (yield* m.SqlClient).unsafe(`
232
- CREATE TABLE IF NOT EXISTS ${V} (
236
+ CREATE TABLE IF NOT EXISTS ${H} (
233
237
  id TEXT PRIMARY KEY,
234
238
  plugin_name TEXT NOT NULL,
235
239
  migration_id TEXT NOT NULL,
@@ -238,15 +242,15 @@ var Ce = [
238
242
  );
239
243
  `).pipe(p.orDie);
240
244
  }), Me = (e, t) => `${R(e)}__${t}`, Ne = () => p.gen(function* () {
241
- let e = yield* m.SqlClient, t = yield* e`SELECT id FROM ${e(V)}`.pipe(p.orDie);
245
+ let e = yield* m.SqlClient, t = yield* e`SELECT id FROM ${e(H)}`.pipe(p.orDie);
242
246
  return new Set(t.map((e) => e.id));
243
247
  }), Pe = (e) => p.gen(function* () {
244
248
  let t = yield* m.SqlClient, n = (/* @__PURE__ */ new Date()).toISOString();
245
249
  yield* t`
246
- INSERT INTO ${t(V)} (id, plugin_name, migration_id, description, applied_at)
250
+ INSERT INTO ${t(H)} (id, plugin_name, migration_id, description, applied_at)
247
251
  VALUES (${e.key}, ${e.pluginName}, ${e.migration.id}, ${e.migration.description ?? null}, ${n})
248
252
  `.pipe(p.orDie);
249
- }), H = (e) => p.gen(function* () {
253
+ }), U = (e) => p.gen(function* () {
250
254
  let t = e.flatMap((e) => (e.extendSchema?.migrations ?? []).map((t) => ({
251
255
  plugin: e,
252
256
  migration: t
@@ -289,7 +293,7 @@ var Ce = [
289
293
  }
290
294
  return r;
291
295
  }), Fe = (e, t) => p.gen(function* () {
292
- let n = yield* H(e);
296
+ let n = yield* U(e);
293
297
  if (n.length === 0) return n;
294
298
  let r = n.filter((e) => e.status === "applied"), i = n.filter((e) => e.status === "skipped");
295
299
  return t(`plugin migrations: ${r.length} applied, ${i.length} already applied`, { applied: r.map((e) => `${e.pluginName}:${e.migrationId}`) }), n;
@@ -298,11 +302,11 @@ var Ce = [
298
302
  pluginAlias: R(e.name),
299
303
  tables: e.extendSchema.tables?.length ?? 0,
300
304
  migrations: e.extendSchema.migrations?.length ?? 0
301
- })), Le = (e) => e.flatMap((e) => e.extendSchema?.tables ?? []), U = /(?<!\.server)\.agent\.tsx?$/, Re = /\.agent\.server\.tsx?$/, W = /\.tool\.tsx?$/, ze = async (t, n) => {
305
+ })), Le = (e) => e.flatMap((e) => e.extendSchema?.tables ?? []), W = /(?<!\.server)\.agent\.tsx?$/, Re = /\.agent\.server\.tsx?$/, G = /\.tool\.tsx?$/, ze = async (t, n) => {
302
306
  let r = 0;
303
- for (let i of t) if (W.test(i)) try {
307
+ for (let i of t) if (G.test(i)) try {
304
308
  let t = await e(i);
305
- r += L(t);
309
+ r += _e(t);
306
310
  } catch (e) {
307
311
  n.warn("tool: failed to import — handler not wired", { file: i }, e);
308
312
  }
@@ -310,7 +314,7 @@ var Ce = [
310
314
  }, Be = (e) => e.replace(/\.agent\.(tsx?)$/, ".agent.server.$1"), Ve = async (t, n) => {
311
315
  let r = [], i = /* @__PURE__ */ new Set();
312
316
  for (let a of t) {
313
- if (!U.test(a)) continue;
317
+ if (!W.test(a)) continue;
314
318
  let t;
315
319
  try {
316
320
  t = await e(a);
@@ -318,7 +322,7 @@ var Ce = [
318
322
  n.warn("agent: failed to import descriptor", { file: a }, e);
319
323
  continue;
320
324
  }
321
- let o = Object.values(t).find(P);
325
+ let o = Object.values(t).find(F);
322
326
  if (o === void 0) {
323
327
  n.warn("agent: no defineAgent() descriptor export found", { file: a });
324
328
  continue;
@@ -342,7 +346,7 @@ var Ce = [
342
346
  continue;
343
347
  }
344
348
  let l = c.default;
345
- if (!F(l)) {
349
+ if (!I(l)) {
346
350
  n.warn("agent: executor file must default-export defineAgentExecutor(descriptor, {...})", {
347
351
  file: s,
348
352
  name: o.name
@@ -357,7 +361,7 @@ var Ce = [
357
361
  });
358
362
  }
359
363
  return { agents: r };
360
- }, G = /\.connection\.tsx?$/, K = (e) => e.replace(G, ""), He = async (t, n) => {
364
+ }, K = /\.connection\.tsx?$/, He = (e) => e.replace(K, ""), Ue = async (t, n) => {
361
365
  let r = [], i = /* @__PURE__ */ new Map();
362
366
  for (let a of t) {
363
367
  let t;
@@ -400,7 +404,7 @@ var Ce = [
400
404
  }
401
405
  return r.length > 0 && n.info("discovered connections", {
402
406
  connections: r.map((e) => `${e.definition.id} (${e.definition.kind})`),
403
- files: r.map((e) => K(o(e.file)))
407
+ files: r.map((e) => He(o(e.file)))
404
408
  }), r;
405
409
  }, q = (e) => {
406
410
  let t = e.nodeEnv !== "production";
@@ -409,13 +413,13 @@ var Ce = [
409
413
  undo: e.declared?.undo ?? t,
410
414
  cdc: e.cdcDialect !== void 0
411
415
  };
412
- }, Ue = (e) => {
416
+ }, We = (e) => {
413
417
  let t = e.nodeEnv ?? "<unset>", n = (n) => e.declared?.[n] === void 0 ? `the default for NODE_ENV=${t}` : `app.config.ts \`schema: { ${n}: ${String(e.declared[n])} }\``, r = (e, t, n) => ` ${e ? "+" : "-"} ${t.padEnd(22)} ${n}`;
414
418
  return `The three tables whose presence is DECIDED rather than implied by your source tree —
415
419
  compare these against the other process's environment before anything else:
416
420
 
417
421
  ${r(e.gates.traces, "_voltro_traces", n("traces"))}\n${r(e.gates.undo, "_voltro_undo_log", n("undo"))}\n${r(e.gates.cdc, "_voltro_cdc_offsets", `DB_DIALECT=${e.cdcDialect ?? "<no out-of-band CDC>"}`)}\n\nNone of them reads a runtime flag any more. If you are upgrading FROM a version where\nthey did, a migrate job without \`CDC\` / \`VOLTRO_UNDO\` / \`VOLTRO_TRACING_PERSIST\` recorded\na different set than your pods computed — re-run \`voltro db apply\` once on this version.`;
418
- }, We = (e) => {
422
+ }, Ge = (e) => {
419
423
  let t = [{
420
424
  key: "traces",
421
425
  table: "_voltro_traces",
@@ -434,7 +438,7 @@ ${r(e.gates.traces, "_voltro_traces", n("traces"))}\n${r(e.gates.undo, "_voltro_
434
438
  await d(s(e, l.name));
435
439
  } else {
436
440
  let e = l.name;
437
- (r.test(e) || t.test(e)) && (n = !0), J(e) && (a = !0), i.test(e) && (o = !0), U.test(e) && (c = !0), G.test(e) && (u = !0);
441
+ (r.test(e) || t.test(e)) && (n = !0), J(e) && (a = !0), i.test(e) && (o = !0), W.test(e) && (c = !0), K.test(e) && (u = !0);
438
442
  }
439
443
  };
440
444
  return await d(e), {
@@ -444,7 +448,7 @@ ${r(e.gates.traces, "_voltro_traces", n("traces"))}\n${r(e.gates.undo, "_voltro_
444
448
  agents: c,
445
449
  connections: u
446
450
  };
447
- }, Ge = async (e) => {
451
+ }, Ke = async (e) => {
448
452
  let t = s(e, "app.config.ts");
449
453
  if (!c(t)) return { plugins: [] };
450
454
  try {
@@ -459,8 +463,8 @@ ${r(e.gates.traces, "_voltro_traces", n("traces"))}\n${r(e.gates.undo, "_voltro_
459
463
  error: e
460
464
  };
461
465
  }
462
- }, Ke = async (e) => (await X(e)).plugins, X = async (e) => {
463
- let { plugins: t, schema: n, error: r } = await Ge(e);
466
+ }, qe = async (e) => (await X(e)).plugins, X = async (e) => {
467
+ let { plugins: t, schema: n, error: r } = await Ke(e);
464
468
  if (r !== void 0) throw new Z(e, r);
465
469
  return {
466
470
  plugins: t,
@@ -482,7 +486,7 @@ Cause: ${t instanceof Error ? t.message : String(t)}`), this.root = e, this.caus
482
486
  let t = /* @__PURE__ */ new Map(), n = (e) => {
483
487
  e?.tableName && !t.has(e.tableName) && t.set(e.tableName, e);
484
488
  };
485
- for (let t of we({
489
+ for (let t of Te({
486
490
  workflows: e.mix.workflows,
487
491
  schedules: e.mix.schedules,
488
492
  webhooks: e.mix.webhooks,
@@ -492,10 +496,10 @@ Cause: ${t instanceof Error ? t.message : String(t)}`), this.root = e, this.caus
492
496
  undo: e.gates.undo,
493
497
  connections: e.mix.connections
494
498
  })) n(t);
495
- e.mix.agents && (n(A), n(k), n(N), n(j)), e.mix.workflows && n(M), (e.mix.workflows || e.mix.agents) && n(I);
499
+ e.mix.agents && (n(j), n(A), n(P), n(M)), e.mix.workflows && n(N), (e.mix.workflows || e.mix.agents) && n(L);
496
500
  for (let t of Le(e.plugins)) n(t);
497
501
  return [...t.values()];
498
- }, qe = async (e) => {
502
+ }, Je = async (e) => {
499
503
  let t = await Y(e.root), { plugins: n, schema: r } = await X(e.root);
500
504
  return Q({
501
505
  mix: t,
@@ -512,4 +516,4 @@ Cause: ${t instanceof Error ? t.message : String(t)}`), this.root = e, this.caus
512
516
  return t === "mariadb" ? "mariadb" : t === "mssql" ? "mssql" : void 0;
513
517
  };
514
518
  //#endregion
515
- export { ke as C, Te as E, Ae as S, R as T, Ve as _, Y as a, H as b, X as c, We as d, G as f, W as g, Re as h, $ as i, Ue as l, U as m, qe as n, J as o, He as p, Q as r, Ke as s, Z as t, q as u, ze as v, z as w, Ie as x, Fe as y };
519
+ export { ke as C, Ee as E, Ae as S, R as T, Ve as _, Y as a, U as b, X as c, Ge as d, K as f, G as g, Re as h, $ as i, We as l, W as m, Je as n, J as o, Ue as p, Q as r, qe as s, Z as t, q as u, ze as v, B as w, Ie as x, Fe as y };
@@ -0,0 +1,2 @@
1
+ import { c as e, n as t } from "./frameworkTableAssembly-BvZ0Lil_.js";
2
+ export { t as assembleFrameworkTables, e as loadAppSchemaInputs };
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-C-hxgAGr.js";
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "./commands-BrFKxnYW.js";
2
2
  import { r as o } from "./templates-BR-fb4SP.js";
3
3
  //#region src/index.ts
4
4
  var s = "framework";
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./cliError-BmdYnghb.js";
2
2
  import { r as t } from "./dialectDriver-czCHYpeH.js";
3
3
  import { a as n, r } from "./connectionConfig-Bk9IC7D0.js";
4
- import { n as i, s as a, y as o } from "./frameworkTableAssembly-BPlPfU07.js";
4
+ import { n as i, s as a, y as o } from "./frameworkTableAssembly-BvZ0Lil_.js";
5
5
  import { t as s } from "./cliRuntime-Dh7UDinH.js";
6
6
  import { join as c, relative as l, resolve as u } from "node:path";
7
7
  import { pathToFileURL as d } from "node:url";
@@ -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-C2XK63Dd.js");
82
+ let { runDbCommand: t } = await import("./dbCommand-BUD4Fd8v.js");
83
83
  return t(["apply", ...e]);
84
84
  };
85
85
  //#endregion
@@ -1,4 +1,4 @@
1
- import { n as e } from "./apiBuild-BKdd0I1Z.js";
1
+ import { n as e } from "./apiBuild-FpHCWiv6.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-CXAXTjZL.js"), { manifest: n } = await t(e);
425
+ let { offlineManifest: t } = await import("./checkCommand-B2Fw73lu.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), {