@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,176 +1,170 @@
1
1
  import { n as e } from "./appModuleLoader-C9r9mxZt.js";
2
2
  import { n as t } from "./declaredSchemaGates-BlcwObhb.js";
3
- import { A as n, M as r, O as i, S as a, o } from "./fileConventions-DASGEmj-.js";
3
+ import { C as n, N as r, j as i, k as a, o } from "./fileConventions-l-RIXbx8.js";
4
4
  import { basename as s, join as c } from "node:path";
5
5
  import { existsSync as l, promises as u } from "node:fs";
6
6
  import { pathToFileURL as d } from "node:url";
7
- import { defineAction as f, defineMutation as ee, defineQuery as te } from "@voltro/protocol";
8
- import { _voltroApiKeysTable as ne, _voltroCdcOffsetsTable as re, _voltroDataTransfersTable as ie, _voltroIdempotencyTable as ae, _voltroKvTable as oe, _voltroMigrationPlansTable as se, _voltroMigrationsTable as ce, _voltroMssqlCdcOffsetsTable as le, _voltroReplaceInProgressTable as ue, _voltroSeedsTable as de } from "@voltro/database";
9
- import { Effect as p } from "effect";
10
- import { SqlClient as m } from "@effect/sql";
11
- import { _voltroApprovalsTable as fe, _voltroConnectionGrantsTable as pe, _voltroConnectionsTable as me, _voltroScheduleClaimsTable as he, _voltroScheduleRunsTable as h, _voltroTracesTable as g, _voltroUndoLogTable as _, _voltroWakeupsTable as v, _voltroWorkflowEventDeliveriesTable as y, _voltroWorkflowEventsTable as b, outboxAttemptsTable as x, outboxTable as S } from "@voltro/runtime";
12
- import { _voltroBudgetHoldsTable as C, _voltroWorkflowAdmissionsTable as w, _voltroWorkflowPausesTable as T, _voltroWorkflowPendingTable as E, _voltroWorkflowRunEventsTable as D, _voltroWorkflowRunStepsTable as O, _voltroWorkflowRunsTable as k, _voltroWorkflowStartContextsTable as A, _voltroWorkflowWatermarksTable as j } from "@voltro/workflow";
13
- import { agentMessagesTable as M, agentThreadsTable as N, aiBudgetTable as P, aiInferencesTable as F, aiUsageTable as I, isAgentDescriptor as L, isAgentExecutor as R, promptsTable as ge, resolveToolModuleHandlers as _e } from "@voltro/ai";
14
- import { _voltroWebhookDeliveriesTable as ve, _voltroWebhookTargetsTable as ye } from "@voltro/plugin-webhooks/mixin";
15
- import { _voltroStorageBlobsTable as be, _voltroStorageGrantsTable as xe, _voltroStorageRefsTable as Se, _voltroStorageUsageTable as Ce } from "@voltro/plugin-storage";
7
+ import { defineAction as f, defineMutation as ee, defineQuery as te, pluginAlias as p, pluginAlias as m, pluginSlug as ne } from "@voltro/protocol";
8
+ import { _voltroApiKeysTable as re, _voltroCdcOffsetsTable as ie, _voltroDataTransfersTable as ae, _voltroIdempotencyTable as oe, _voltroKvTable as se, _voltroMigrationPlansTable as ce, _voltroMigrationsTable as le, _voltroMssqlCdcOffsetsTable as ue, _voltroReplaceInProgressTable as de, _voltroSeedsTable as fe } from "@voltro/database";
9
+ import { Effect as h } from "effect";
10
+ import { SqlClient as g } from "@effect/sql";
11
+ import { _voltroApprovalsTable as pe, _voltroConnectionGrantsTable as me, _voltroConnectionsTable as _, _voltroScheduleClaimsTable as v, _voltroScheduleRunsTable as y, _voltroTracesTable as b, _voltroUndoLogTable as x, _voltroWakeupsTable as S, _voltroWorkflowEventDeliveriesTable as C, _voltroWorkflowEventsTable as w, outboxAttemptsTable as T, outboxTable as E } from "@voltro/runtime";
12
+ import { _voltroBudgetHoldsTable as D, _voltroWorkflowAdmissionsTable as O, _voltroWorkflowPausesTable as k, _voltroWorkflowPendingTable as A, _voltroWorkflowRunEventsTable as j, _voltroWorkflowRunStepsTable as M, _voltroWorkflowRunsTable as N, _voltroWorkflowStartContextsTable as P, _voltroWorkflowWatermarksTable as F } from "@voltro/workflow";
13
+ import { agentMessagesTable as I, agentThreadsTable as L, aiBudgetTable as R, aiInferencesTable as z, aiUsageTable as he, isAgentDescriptor as ge, isAgentExecutor as _e, promptsTable as ve, resolveToolModuleHandlers as ye } from "@voltro/ai";
14
+ import { _voltroWebhookDeliveriesTable as be, _voltroWebhookTargetsTable as xe } from "@voltro/plugin-webhooks/mixin";
15
+ import { _voltroStorageBlobsTable as Se, _voltroStorageGrantsTable as Ce, _voltroStorageRefsTable as we, _voltroStorageUsageTable as Te } from "@voltro/plugin-storage";
16
16
  //#region src/frameworkTables.ts
17
- var we = [
17
+ var Ee = [
18
18
  {
19
- table: ce,
19
+ table: le,
20
20
  when: "always"
21
21
  },
22
22
  {
23
- table: de,
23
+ table: fe,
24
24
  when: "always"
25
25
  },
26
26
  {
27
- table: se,
27
+ table: ce,
28
28
  when: "always"
29
29
  },
30
30
  {
31
- table: ue,
31
+ table: de,
32
32
  when: "always"
33
33
  },
34
34
  {
35
- table: ie,
35
+ table: ae,
36
36
  when: "always"
37
37
  },
38
38
  {
39
- table: k,
39
+ table: N,
40
40
  when: "workflows"
41
41
  },
42
42
  {
43
- table: O,
43
+ table: M,
44
44
  when: "workflows"
45
45
  },
46
46
  {
47
- table: D,
47
+ table: j,
48
48
  when: "workflows"
49
49
  },
50
50
  {
51
- table: A,
51
+ table: P,
52
52
  when: "workflows"
53
53
  },
54
54
  {
55
- table: E,
55
+ table: A,
56
56
  when: "workflows"
57
57
  },
58
58
  {
59
- table: w,
59
+ table: O,
60
60
  when: "workflows"
61
61
  },
62
62
  {
63
- table: T,
63
+ table: k,
64
64
  when: "workflows"
65
65
  },
66
66
  {
67
- table: j,
67
+ table: F,
68
68
  when: "workflows"
69
69
  },
70
70
  {
71
- table: b,
71
+ table: w,
72
72
  when: "workflows"
73
73
  },
74
74
  {
75
- table: y,
75
+ table: C,
76
76
  when: "workflows"
77
77
  },
78
78
  {
79
- table: h,
79
+ table: y,
80
80
  when: "schedules"
81
81
  },
82
82
  {
83
- table: he,
83
+ table: v,
84
84
  when: "schedules"
85
85
  },
86
86
  {
87
- table: ye,
87
+ table: xe,
88
88
  when: "webhooks"
89
89
  },
90
90
  {
91
- table: ve,
91
+ table: be,
92
92
  when: "webhooks"
93
93
  },
94
94
  {
95
- table: g,
95
+ table: b,
96
96
  when: "traces"
97
97
  },
98
98
  {
99
- table: _,
99
+ table: x,
100
100
  when: "undo"
101
101
  },
102
102
  {
103
- table: fe,
103
+ table: pe,
104
104
  when: "always"
105
105
  },
106
106
  {
107
- table: C,
107
+ table: D,
108
108
  when: "workflows"
109
109
  },
110
110
  {
111
- table: S,
111
+ table: E,
112
112
  when: "always"
113
113
  },
114
114
  {
115
- table: x,
115
+ table: T,
116
116
  when: "always"
117
117
  },
118
118
  {
119
- table: me,
119
+ table: _,
120
120
  when: "connections"
121
121
  },
122
122
  {
123
- table: pe,
123
+ table: me,
124
124
  when: "connections"
125
125
  },
126
126
  {
127
- table: v,
127
+ table: S,
128
128
  when: "always"
129
129
  },
130
130
  {
131
- table: Se,
131
+ table: we,
132
132
  when: "always"
133
133
  },
134
134
  {
135
- table: xe,
135
+ table: Ce,
136
136
  when: "always"
137
137
  },
138
138
  {
139
- table: be,
139
+ table: Se,
140
140
  when: "always"
141
141
  },
142
142
  {
143
- table: Ce,
143
+ table: Te,
144
144
  when: "always"
145
145
  },
146
146
  {
147
- table: ae,
147
+ table: oe,
148
148
  when: "always"
149
149
  },
150
150
  {
151
- table: ne,
151
+ table: re,
152
152
  when: "always"
153
153
  },
154
154
  {
155
- table: oe,
155
+ table: se,
156
156
  when: "always"
157
157
  }
158
- ], Te = (e) => {
159
- 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);
160
- return e.cdc === !0 && t.push(e.cdcDialect === "mssql" ? le : re), t;
161
- }, z = (e) => {
162
- let t = e.startsWith("@") ? e.replace(/^@[^/]+\//, "") : e;
163
- return (t.startsWith("plugin-") ? t.slice(7) : t).replace(/-([a-zA-Z0-9])/g, (e, t) => t.toUpperCase());
164
- }, Ee = (e) => {
165
- let t = e.startsWith("@") ? e.replace(/^@[^/]+\//, "") : e;
166
- return (t.startsWith("plugin-") ? t.slice(7) : t).replace(/#/g, "--").replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
167
- }, De = (e, t) => B(e, t.name), B = (e, t) => {
168
- let n = z(e.name);
158
+ ], De = (e) => {
159
+ let t = Ee.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);
160
+ return e.cdc === !0 && t.push(e.cdcDialect === "mssql" ? ue : ie), t;
161
+ }, Oe = (e, t) => B(e, t.name), B = (e, t) => {
162
+ let n = p(e.name);
169
163
  if (!t.includes(".")) return `${n}.${t}`;
170
164
  if (e.baseName === void 0) return t;
171
- let r = `${z(e.baseName)}.`;
165
+ let r = `${p(e.baseName)}.`;
172
166
  return t.startsWith(r) ? `${n}.${t.slice(r.length)}` : t;
173
- }, V = (e) => e.openAccess === void 0 ? e.guards !== void 0 && e.guards.length > 0 ? { guards: e.guards } : {} : { openAccess: e.openAccess }, Oe = (e, t, n) => {
167
+ }, V = (e) => e.openAccess === void 0 ? e.guards !== void 0 && e.guards.length > 0 ? { guards: e.guards } : {} : { openAccess: e.openAccess }, ke = (e, t, n) => {
174
168
  switch (e) {
175
169
  case "query": return te({
176
170
  name: t,
@@ -195,23 +189,23 @@ var we = [
195
189
  ...V(n)
196
190
  });
197
191
  }
198
- }, ke = (e) => (t, n) => p.suspend(() => {
192
+ }, Ae = (e) => (t, n) => h.suspend(() => {
199
193
  let r = { request: {
200
194
  subject: n.request.subject,
201
195
  traceId: n.request.traceId
202
196
  } };
203
197
  return e.execute(t, r);
204
- }), Ae = (e) => {
198
+ }), je = (e) => {
205
199
  let t = [];
206
200
  for (let n of e) {
207
201
  let e = n.routes ?? [];
208
202
  for (let r of e) {
209
- let e = De(n, r), i = Oe(r.kind, e, r);
203
+ let e = Oe(n, r), i = ke(r.kind, e, r);
210
204
  t.push({
211
205
  kind: r.kind,
212
206
  file: `plugin:${n.name}`,
213
207
  descriptor: i,
214
- executor: ke(r),
208
+ executor: Ae(r),
215
209
  plugin: {
216
210
  name: n.name,
217
211
  version: n.version
@@ -220,7 +214,7 @@ var we = [
220
214
  }
221
215
  }
222
216
  return t;
223
- }, je = (e, t, n = /* @__PURE__ */ new Set()) => {
217
+ }, Me = (e, t, n = /* @__PURE__ */ new Set()) => {
224
218
  let r = /* @__PURE__ */ new Map();
225
219
  for (let e of t) r.set(e, "user-route");
226
220
  let i = [];
@@ -232,8 +226,8 @@ var we = [
232
226
  }
233
227
  }
234
228
  return i;
235
- }, H = "_voltro_plugin_migrations", Me = () => p.gen(function* () {
236
- yield* (yield* m.SqlClient).unsafe(`
229
+ }, H = "_voltro_plugin_migrations", Ne = () => h.gen(function* () {
230
+ yield* (yield* g.SqlClient).unsafe(`
237
231
  CREATE TABLE IF NOT EXISTS ${H} (
238
232
  id TEXT PRIMARY KEY,
239
233
  plugin_name TEXT NOT NULL,
@@ -241,26 +235,26 @@ var we = [
241
235
  description TEXT,
242
236
  applied_at TEXT NOT NULL
243
237
  );
244
- `).pipe(p.orDie);
245
- }), Ne = (e, t) => `${z(e)}__${t}`, Pe = () => p.gen(function* () {
246
- let e = yield* m.SqlClient, t = yield* e`SELECT id FROM ${e(H)}`.pipe(p.orDie);
238
+ `).pipe(h.orDie);
239
+ }), Pe = (e, t) => `${m(e)}__${t}`, Fe = () => h.gen(function* () {
240
+ let e = yield* g.SqlClient, t = yield* e`SELECT id FROM ${e(H)}`.pipe(h.orDie);
247
241
  return new Set(t.map((e) => e.id));
248
- }), Fe = (e) => p.gen(function* () {
249
- let t = yield* m.SqlClient, n = (/* @__PURE__ */ new Date()).toISOString();
242
+ }), Ie = (e) => h.gen(function* () {
243
+ let t = yield* g.SqlClient, n = (/* @__PURE__ */ new Date()).toISOString();
250
244
  yield* t`
251
245
  INSERT INTO ${t(H)} (id, plugin_name, migration_id, description, applied_at)
252
246
  VALUES (${e.key}, ${e.pluginName}, ${e.migration.id}, ${e.migration.description ?? null}, ${n})
253
- `.pipe(p.orDie);
254
- }), U = (e) => p.gen(function* () {
247
+ `.pipe(h.orDie);
248
+ }), U = (e) => h.gen(function* () {
255
249
  let t = e.flatMap((e) => (e.extendSchema?.migrations ?? []).map((t) => ({
256
250
  plugin: e,
257
251
  migration: t
258
252
  })));
259
253
  if (t.length === 0) return [];
260
- yield* Me();
261
- let n = yield* Pe(), r = [];
254
+ yield* Ne();
255
+ let n = yield* Fe(), r = [];
262
256
  for (let { plugin: e, migration: i } of t) {
263
- let t = Ne(e.name, i.id), a = Date.now();
257
+ let t = Pe(e.name, i.id), a = Date.now();
264
258
  if (n.has(t)) {
265
259
  r.push({
266
260
  pluginName: e.name,
@@ -270,9 +264,9 @@ var we = [
270
264
  });
271
265
  continue;
272
266
  }
273
- let o = yield* m.SqlClient;
267
+ let o = yield* g.SqlClient;
274
268
  try {
275
- yield* i.up(o).pipe(p.mapError((e) => e)), yield* Fe({
269
+ yield* i.up(o).pipe(h.mapError((e) => e)), yield* Ie({
276
270
  key: t,
277
271
  pluginName: e.name,
278
272
  migration: i
@@ -289,30 +283,30 @@ var we = [
289
283
  status: "failed",
290
284
  durationMs: Date.now() - a,
291
285
  error: t
292
- }), yield* p.fail(/* @__PURE__ */ Error(`Plugin migration failed: ${e.name} ${i.id} — ${t instanceof Error ? t.message : String(t)}`));
286
+ }), yield* h.fail(/* @__PURE__ */ Error(`Plugin migration failed: ${e.name} ${i.id} — ${t instanceof Error ? t.message : String(t)}`));
293
287
  }
294
288
  }
295
289
  return r;
296
- }), Ie = (e, t) => p.gen(function* () {
290
+ }), Le = (e, t) => h.gen(function* () {
297
291
  let n = yield* U(e);
298
292
  if (n.length === 0) return n;
299
293
  let r = n.filter((e) => e.status === "applied"), i = n.filter((e) => e.status === "skipped");
300
294
  return t(`plugin migrations: ${r.length} applied, ${i.length} already applied`, { applied: r.map((e) => `${e.pluginName}:${e.migrationId}`) }), n;
301
- }), Le = (e) => e.filter((e) => e.extendSchema && (e.extendSchema.tables?.length ?? 0) + (e.extendSchema.migrations?.length ?? 0) > 0).map((e) => ({
295
+ }), Re = (e) => e.filter((e) => e.extendSchema && (e.extendSchema.tables?.length ?? 0) + (e.extendSchema.migrations?.length ?? 0) > 0).map((e) => ({
302
296
  pluginName: e.name,
303
- pluginAlias: z(e.name),
297
+ pluginAlias: m(e.name),
304
298
  tables: e.extendSchema.tables?.length ?? 0,
305
299
  migrations: e.extendSchema.migrations?.length ?? 0
306
- })), Re = (e) => e.flatMap((e) => e.extendSchema?.tables ?? []), W = /(?<!\.server)\.agent\.tsx?$/, ze = /\.agent\.server\.tsx?$/, G = /\.tool\.tsx?$/, Be = async (t, n) => {
300
+ })), ze = (e) => e.flatMap((e) => e.extendSchema?.tables ?? []), W = /(?<!\.server)\.agent\.tsx?$/, Be = /\.agent\.server\.tsx?$/, G = /\.tool\.tsx?$/, Ve = async (t, n) => {
307
301
  let r = 0;
308
302
  for (let i of t) if (G.test(i)) try {
309
303
  let t = await e(i);
310
- r += _e(t);
304
+ r += ye(t);
311
305
  } catch (e) {
312
306
  n.warn("tool: failed to import — handler not wired", { file: i }, e);
313
307
  }
314
308
  return r;
315
- }, Ve = (e) => e.replace(/\.agent\.(tsx?)$/, ".agent.server.$1"), K = async (t, n) => {
309
+ }, He = (e) => e.replace(/\.agent\.(tsx?)$/, ".agent.server.$1"), Ue = async (t, n) => {
316
310
  let r = [], i = /* @__PURE__ */ new Set();
317
311
  for (let a of t) {
318
312
  if (!W.test(a)) continue;
@@ -323,7 +317,7 @@ var we = [
323
317
  n.warn("agent: failed to import descriptor", { file: a }, e);
324
318
  continue;
325
319
  }
326
- let o = Object.values(t).find(L);
320
+ let o = Object.values(t).find(ge);
327
321
  if (o === void 0) {
328
322
  n.warn("agent: no defineAgent() descriptor export found", { file: a });
329
323
  continue;
@@ -335,7 +329,7 @@ var we = [
335
329
  });
336
330
  continue;
337
331
  }
338
- let s = Ve(a), c;
332
+ let s = He(a), c;
339
333
  try {
340
334
  c = await e(s);
341
335
  } catch (e) {
@@ -347,7 +341,7 @@ var we = [
347
341
  continue;
348
342
  }
349
343
  let l = c.default;
350
- if (!R(l)) {
344
+ if (!_e(l)) {
351
345
  n.warn("agent: executor file must default-export defineAgentExecutor(descriptor, {...})", {
352
346
  file: s,
353
347
  name: o.name
@@ -362,7 +356,7 @@ var we = [
362
356
  });
363
357
  }
364
358
  return { agents: r };
365
- }, q = /\.connection\.tsx?$/, He = (e) => e.replace(q, ""), Ue = async (t, n) => {
359
+ }, K = /\.connection\.tsx?$/, q = (e) => e.replace(K, ""), We = async (t, n) => {
366
360
  let r = [], i = /* @__PURE__ */ new Map();
367
361
  for (let a of t) {
368
362
  let t;
@@ -405,27 +399,27 @@ var we = [
405
399
  }
406
400
  return r.length > 0 && n.info("discovered connections", {
407
401
  connections: r.map((e) => `${e.definition.id} (${e.definition.kind})`),
408
- files: r.map((e) => He(s(e.file)))
402
+ files: r.map((e) => q(s(e.file)))
409
403
  }), r;
410
- }, J = (e) => o.test(e) || a.test(e), Y = async (e) => {
411
- let t = !1, a = !1, o = !1, s = !1, l = !1, d = async (e) => {
404
+ }, J = (e) => o.test(e) || n.test(e), Y = async (e) => {
405
+ let t = !1, n = !1, o = !1, s = !1, l = !1, d = async (e) => {
412
406
  let f = await u.readdir(e, { withFileTypes: !0 }).catch(() => []);
413
407
  for (let u of f) if (u.isDirectory()) {
414
408
  if (u.name === "node_modules" || u.name === "dist" || u.name === ".framework" || u.name.startsWith(".")) continue;
415
409
  await d(c(e, u.name));
416
410
  } else {
417
411
  let e = u.name;
418
- (r.test(e) || i.test(e)) && (t = !0), J(e) && (a = !0), n.test(e) && (o = !0), W.test(e) && (s = !0), q.test(e) && (l = !0);
412
+ (r.test(e) || a.test(e)) && (t = !0), J(e) && (n = !0), i.test(e) && (o = !0), W.test(e) && (s = !0), K.test(e) && (l = !0);
419
413
  }
420
414
  };
421
415
  return await d(e), {
422
416
  workflows: t,
423
- schedules: a,
417
+ schedules: n,
424
418
  webhooks: o,
425
419
  agents: s,
426
420
  connections: l
427
421
  };
428
- }, We = async (e) => {
422
+ }, Ge = async (e) => {
429
423
  let t = c(e, "app.config.ts");
430
424
  if (!l(t)) return { plugins: [] };
431
425
  try {
@@ -440,8 +434,8 @@ var we = [
440
434
  error: e
441
435
  };
442
436
  }
443
- }, Ge = async (e) => (await X(e)).plugins, X = async (e) => {
444
- let { plugins: t, schema: n, error: r } = await We(e);
437
+ }, Ke = async (e) => (await X(e)).plugins, X = async (e) => {
438
+ let { plugins: t, schema: n, error: r } = await Ge(e);
445
439
  if (r !== void 0) throw new Z(e, r);
446
440
  return {
447
441
  plugins: t,
@@ -463,7 +457,7 @@ Cause: ${t instanceof Error ? t.message : String(t)}`), this.root = e, this.caus
463
457
  let t = /* @__PURE__ */ new Map(), n = (e) => {
464
458
  e?.tableName && !t.has(e.tableName) && t.set(e.tableName, e);
465
459
  };
466
- for (let t of Te({
460
+ for (let t of De({
467
461
  workflows: e.mix.workflows,
468
462
  schedules: e.mix.schedules,
469
463
  webhooks: e.mix.webhooks,
@@ -473,10 +467,10 @@ Cause: ${t instanceof Error ? t.message : String(t)}`), this.root = e, this.caus
473
467
  undo: e.gates.undo,
474
468
  connections: e.mix.connections
475
469
  })) n(t);
476
- e.mix.agents && (n(N), n(M), n(I), n(P)), e.mix.workflows && n(F), (e.mix.workflows || e.mix.agents) && n(ge);
477
- for (let t of Re(e.plugins)) n(t);
470
+ e.mix.agents && (n(L), n(I), n(he), n(R)), e.mix.workflows && n(z), (e.mix.workflows || e.mix.agents) && n(ve);
471
+ for (let t of ze(e.plugins)) n(t);
478
472
  return [...t.values()];
479
- }, Ke = async (e) => {
473
+ }, qe = async (e) => {
480
474
  let n = await Y(e.root), { plugins: r, schema: i } = await X(e.root);
481
475
  return Q({
482
476
  mix: n,
@@ -493,4 +487,4 @@ Cause: ${t instanceof Error ? t.message : String(t)}`), this.root = e, this.caus
493
487
  return t === "mariadb" ? "mariadb" : t === "mssql" ? "mssql" : void 0;
494
488
  };
495
489
  //#endregion
496
- export { Ee as C, z as S, U as _, Y as a, Ae as b, X as c, W as d, ze as f, Ie as g, Be as h, $ as i, q as l, K as m, Ke as n, J as o, G as p, Q as r, Ge as s, Z as t, Ue as u, Le as v, B as x, je as y };
490
+ export { ne as C, m as S, U as _, Y as a, je as b, X as c, W as d, Be as f, Le as g, Ve as h, $ as i, K as l, Ue as m, qe as n, J as o, G as p, Q as r, Ke as s, Z as t, We as u, Re as v, B as x, Me as y };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { a as e, i as t, n, o as r, r as i, t as a } from "./commands-DyxAmhP0.js";
2
- import { r as o } from "./templates-BR-fb4SP.js";
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "./commands-BBYJ7Q3B.js";
2
+ import { r as o } from "./templates-BTWZkJJT.js";
3
3
  //#region src/index.ts
4
4
  var s = "framework";
5
5
  //#endregion
@@ -1,5 +1,5 @@
1
1
  import { n as e, r as t, t as n } from "./cliOutput-D1tSBoRM.js";
2
- import { o as r } from "./updateCommand-C_8I8Rzo.js";
2
+ import { o as r } from "./updateCommand-C_jN1w18.js";
3
3
  import { join as i, resolve as a } from "node:path";
4
4
  import { readFileSync as o, readdirSync as s, statSync as c } from "node:fs";
5
5
  //#region src/infoCommand.ts
@@ -148,6 +148,7 @@ var r = "/_voltro/inspect", i = () => process.env.VOLTRO_INSPECT === "off", a =
148
148
  }, b = (e) => e === "/_voltro/inspect" || e.startsWith("/_voltro/inspect/"), x = [
149
149
  "text",
150
150
  "textarea",
151
+ "rich-text",
151
152
  "number",
152
153
  "checkbox",
153
154
  "switch",
@@ -160,6 +161,8 @@ var r = "/_voltro/inspect", i = () => process.env.VOLTRO_INSPECT === "off", a =
160
161
  "daterange",
161
162
  "file",
162
163
  "hidden",
164
+ "array",
165
+ "reference",
163
166
  "custom"
164
167
  ], S = (e, t, n = [], r = []) => ({
165
168
  version: 2,
@@ -232,6 +235,7 @@ var r = "/_voltro/inspect", i = () => process.env.VOLTRO_INSPECT === "off", a =
232
235
  return a === "/_voltro/inspect/metrics" ? t.metrics === void 0 ? c(200, [], s) : c(200, t.metrics(), s) : a === "/_voltro/inspect/subscriptions" ? t.kind === "api" ? t.subscriptions === void 0 ? c(200, {
233
236
  subscriptions: [],
234
237
  matcherStats: [],
238
+ resume: [],
235
239
  capturedAt: Date.now()
236
240
  }, s) : c(200, t.subscriptions(), s) : c(404, { error: "subscriptions endpoint is api-only" }, s) : a === "/_voltro/inspect/members" ? t.kind === "api" ? t.members === void 0 ? c(200, {
237
241
  members: [],
@@ -0,0 +1,2 @@
1
+ import { r as e } from "./inspect-DCqILJ1G.js";
2
+ export { e as buildCapabilityManifest };
@@ -0,0 +1,41 @@
1
+ import { REPLACE_IN_PROGRESS_TABLE as e, interruptedReplaceRefusal as t, stagingLeftoverReport as n, stagingLeftovers as r, stagingNamesOf as i, stagingStaleAfterMs as a } from "@voltro/database";
2
+ //#region src/interruptedReplace.ts
3
+ var o = async (t) => {
4
+ try {
5
+ let n = await t.query({
6
+ table: e,
7
+ predicate: void 0,
8
+ order: [],
9
+ take: void 0,
10
+ skip: void 0,
11
+ projection: void 0
12
+ }), r = (e) => e instanceof Date ? e : e == null ? null : new Date(String(e));
13
+ return n.map((e) => ({
14
+ id: String(e.id ?? ""),
15
+ startedAt: r(e.startedAt) ?? /* @__PURE__ */ new Date(NaN),
16
+ kind: e.kind === void 0 || e.kind === null ? "replace" : String(e.kind),
17
+ tables: e.tables === null || e.tables === void 0 ? null : Number(e.tables),
18
+ capture: e.capture === null || e.capture === void 0 ? null : String(e.capture),
19
+ via: String(e.via ?? "unknown"),
20
+ staging: i(e.staging),
21
+ heartbeatAt: r(e.heartbeatAt),
22
+ resumable: e.resumable === !0 || e.resumable === 1 || e.resumable === "1"
23
+ }));
24
+ } catch {
25
+ return [];
26
+ }
27
+ }, s = async (e) => t(await o(e)), c = async (t, i, s) => {
28
+ let c = i === "postgres" || i === "mysql" || i === "mariadb" || i === "sqlite" || i === "mssql" ? i : void 0, l = await o(t), u = r(l, Date.now(), a(process.env, s?.dataTransfer?.stagingStaleMinutes));
29
+ if (u.all.length === 0) return;
30
+ let { STAGING_PREFIX: d, canStage: f, dropStagingSql: p, execStatements: m } = await import("@voltro/data-transfer"), h = [], g = f(t) ? t : void 0;
31
+ if (c !== void 0 && g !== void 0) for (let n of u.droppable) try {
32
+ await m(g, n.staging.map((e) => p(e.startsWith(d) ? e.slice(d.length) : e, c))), await t.delete(e, n.id), h.push(n.id);
33
+ } catch {}
34
+ let _ = new Set(h);
35
+ return n({
36
+ all: u.all,
37
+ droppable: u.droppable.filter((e) => _.has(e.id))
38
+ }, Date.now());
39
+ };
40
+ //#endregion
41
+ export { c as n, s as t };
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./interruptedReplace-CwnkBb2X.js";
2
+ export { e as interruptedReplaceAtBoot };
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./manifestBuild-DjX5MoXy.js";
2
+ export { e as buildRpcEntry };
@@ -1,4 +1,4 @@
1
- import { P as e } from "./inspect-Bd8-9wsi.js";
1
+ import { P as e } from "./inspect-DCqILJ1G.js";
2
2
  import { JSONSchema as t } from "effect";
3
3
  //#region src/manifestBuild.ts
4
4
  var n = (e) => {
@@ -1,7 +1,7 @@
1
1
  import { i as e, n as t, r as n } from "./cliArgs-D4p8n7EE.js";
2
2
  import { t as r } from "./cliRuntime-Dh7UDinH.js";
3
- import { n as i } from "./renderProfile-CskIgAfn.js";
4
- import { a, i as o } from "./projectScaffold-B4dmTlwT.js";
3
+ import { n as i } from "./renderProfile-DvrhVJHa.js";
4
+ import { a, i as o } from "./projectScaffold-CSN0OzBV.js";
5
5
  import { t as s } from "./discover-C9XKJDco.js";
6
6
  import { basename as c, join as l, relative as u, resolve as d } from "node:path";
7
7
  import { createLogger as f } from "@voltro/logger";
@@ -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 { g as i, n as a, s as o } from "./frameworkTableAssembly-DKx3ba3S.js";
4
+ import { g as i, n as a, s as o } from "./frameworkTableAssembly-Do-cf6RJ.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-B1EXBC6f.js");
82
+ let { runDbCommand: t } = await import("./dbCommand-BTyBGhIA.js");
83
83
  return t(["apply", ...e]);
84
84
  };
85
85
  //#endregion