@voltro/cli 0.33.0 → 0.35.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 (343) hide show
  1. package/CHANGELOG.md +1968 -0
  2. package/bin/nodeEnvironment.d.mts +30 -0
  3. package/bin/nodeEnvironment.mjs +158 -0
  4. package/bin/voltro.mjs +69 -5
  5. package/dist/addCommand-BNeoeSxe.js +124 -0
  6. package/dist/addCommand-aXSQveak.js +2 -0
  7. package/dist/agentsMd-BTchIZku.js +2 -0
  8. package/dist/agentsMd-mhQMF1bx.js +254 -0
  9. package/dist/apiBuild-B8aoJvuw.js +2 -0
  10. package/dist/{apiBuild-h9VHtnlw.js → apiBuild-DYD_ONLD.js} +46 -46
  11. package/dist/{appGraph-gQ_6GkQQ.js → appGraph-KGDPTuTy.js} +1 -1
  12. package/dist/appGraph-zuMGKVYX.js +2 -0
  13. package/dist/appPort-B_HpJ_ck.js +48 -0
  14. package/dist/baselineCommand-C2ClWZN3.js +2 -0
  15. package/dist/baselineCommand-DIttzO8A.js +227 -0
  16. package/dist/bin.js +71 -28
  17. package/dist/build-CD8K4XOr.js +711 -0
  18. package/dist/cacheCommand-DA4OH9xt.js +42 -0
  19. package/dist/capabilitiesCommand-nq_pz5xd.js +123 -0
  20. package/dist/checkCommand-Ct9xkTrS.js +232 -0
  21. package/dist/checkCommand-DKpDLlqu.js +2 -0
  22. package/dist/{cliArgs-qdZSElM3.js → cliArgs-D4p8n7EE.js} +12 -1
  23. package/dist/cliError-BmdYnghb.js +10 -0
  24. package/dist/cliOutput-D1tSBoRM.js +15 -0
  25. package/dist/{cliRuntime-Oh517vCV.js → cliRuntime-Dh7UDinH.js} +20 -20
  26. package/dist/cloudClient-DWL-Hw_T.js +67 -0
  27. package/dist/cloudCmd-Cvv5HGaZ.js +364 -0
  28. package/dist/clusterCmd-D5wsCmA_.js +54 -0
  29. package/dist/codegen-CYM3Zqrf.js +605 -0
  30. package/dist/codegen-ChBi_hVa.js +2 -0
  31. package/dist/codegenCommand-C4YoQIc2.js +30 -0
  32. package/dist/codemodRunner-BnFq3Fgu.js +5384 -0
  33. package/dist/commandRunner-BLAEFLjp.js +47 -0
  34. package/dist/commands-BE8E7zF3.js +816 -0
  35. package/dist/connectionConfig-UFlIEiys.js +66 -0
  36. package/dist/dashboardCommand-D7SgZGaN.js +25 -0
  37. package/dist/dataCommand-BhYwDgg-.js +537 -0
  38. package/dist/dataProfile-dW-PsfLB.js +15 -0
  39. package/dist/dbCommand-DS4b97Is.js +2 -0
  40. package/dist/{dbCommand-DTLKAfbA.js → dbCommand-O8HA63s2.js} +552 -402
  41. package/dist/{dev-C_P8FLSx.js → dev-C7sFZq3m.js} +3670 -3169
  42. package/dist/dev-D2BikO7a.js +3 -0
  43. package/dist/devActivity-Dx_3nnGv.js +100 -0
  44. package/dist/devActivity.js +1 -1
  45. package/dist/dialectDriver-CgXnDfec.js +39 -0
  46. package/dist/discover-C9XKJDco.js +25 -0
  47. package/dist/doctorCommand-CM4Ch9C7.js +2 -0
  48. package/dist/{checkCommand-xGhRFFg2.js → doctorCommand-DnimF5IM.js} +523 -1278
  49. package/dist/dormancyCommand-QewYug_s.js +69 -0
  50. package/dist/e2eCmd-BRabZww-.js +147 -0
  51. package/dist/embeddingsCommand-BfiLS_QI.js +73 -0
  52. package/dist/envCommand-CCGPRQY1.js +60 -0
  53. package/dist/evalCommand-6RUfPen4.js +118 -0
  54. package/dist/evolveCommand-CHsLCtDf.js +281 -0
  55. package/dist/fileTaxonomy-CJfgOllU.js +457 -0
  56. package/dist/frameworkTableAssembly-YyVe32Cb.js +2 -0
  57. package/dist/frameworkTableAssembly-oMPBKqlE.js +511 -0
  58. package/dist/generateCommand-DbgcUpGw.js +147 -0
  59. package/dist/index.d.ts +45 -0
  60. package/dist/index.js +4 -3
  61. package/dist/infoCommand-DwOgK1t6.js +60 -0
  62. package/dist/{inspect-BUUjt773.js → inspect-CjTYzAs_.js} +113 -41
  63. package/dist/inspect-P4pxoMaV.js +2 -0
  64. package/dist/inspectCmd-EHFZ9yYu.js +224 -0
  65. package/dist/inspectFetch-EMuhTG_9.js +151 -0
  66. package/dist/inspectMetrics-CfdKLh6t.js +72 -0
  67. package/dist/loadEnv-D9nEOClM.js +44 -0
  68. package/dist/logFileSink-C_D2wRN1.js +105 -0
  69. package/dist/logsCmd-D36xK7Zu.js +260 -0
  70. package/dist/manifestBuild-COkJoyAr.js +2 -0
  71. package/dist/{manifestBuild-BLrVuSlM.js → manifestBuild-hpPLaGxV.js} +1 -1
  72. package/dist/metaCommands-7MJfZ5cf.js +196 -0
  73. package/dist/migrate-BV7I-ZHZ.js +83 -0
  74. package/dist/mssqlClusterPatch-_4cE_nun.js +44 -0
  75. package/dist/newCommand-COWOJ1_E.js +156 -0
  76. package/dist/nodeEnvironment-cGFAj1J8.js +28 -0
  77. package/dist/packageCommand-Cug_3Ogl.js +271 -0
  78. package/dist/pageConvention-cEiRxdab.js +5 -0
  79. package/dist/privacyCommand-C-Df56U_.js +146 -0
  80. package/dist/probeCommand-CZfaaUOZ.js +122 -0
  81. package/dist/projectScaffold-DmzEKHib.js +2 -0
  82. package/dist/projectScaffold-LMMtaavR.js +814 -0
  83. package/dist/renderModeScan-D7J1B7Kw.js +105 -0
  84. package/dist/renderProfile-1OWWAAtx.js +81 -0
  85. package/dist/runtimeRegistry-DMeKfTHP.js +81 -0
  86. package/dist/runtimeTrace-CH3eUiMw.js +91 -0
  87. package/dist/scheduleCmd-DQRu6BZC.js +149 -0
  88. package/dist/scheduleManifestCmd-D2x0CTTY.js +249 -0
  89. package/dist/schemaIr-UJybUUZW.js +103 -0
  90. package/dist/{sdkgen-C81QIkiL.js → sdkgen-BLkvGRfX.js} +111 -209
  91. package/dist/seedRunner-ZmLSqNe2.js +333 -0
  92. package/dist/serveCommand-CbDHU6l-.js +2 -0
  93. package/dist/serveCommand-iwlUBNS1.js +1766 -0
  94. package/dist/serveEntry.js +5 -5
  95. package/dist/serverlessCommand-CfJZy6dS.js +482 -0
  96. package/dist/start-BgN62boB.js +3 -0
  97. package/dist/start-T4VesWiM.js +1087 -0
  98. package/dist/startEntry.js +2 -2
  99. package/dist/staticCommand-Dr2M6tpU.js +304 -0
  100. package/dist/storageCommand-Co6NfLqN.js +42 -0
  101. package/dist/templates-De8IR5-c.js +102 -0
  102. package/dist/test-CI6iDsYc.js +115 -0
  103. package/dist/tracesCmd-DStmCJPi.js +232 -0
  104. package/dist/tsconfigPaths-BWXBWgcl.js +107 -0
  105. package/dist/tsxLoader-EuXmSJ1K.js +51 -0
  106. package/dist/typecheckCommand-BlsWiCNq.js +61 -0
  107. package/dist/updateCommand-BlMZhWgO.js +2 -0
  108. package/dist/updateCommand-x0pI_x-B.js +585 -0
  109. package/dist/webDev-BcykISYQ2.js +2 -0
  110. package/dist/{inspectMetrics-1xzTKAFx.js → webDev-Dybxew86.js} +988 -1560
  111. package/dist/webhookDiscovery-CrGAfhIG.js +2 -0
  112. package/dist/webhookDiscovery-D7VaeMlz.js +51 -0
  113. package/dist/webhooksCommand-DlAgS2Iw.js +267 -0
  114. package/dist/workflowsCmd-BGF-mRZ5.js +608 -0
  115. package/package.json +209 -17
  116. package/templates/AGENTS.core.md +58 -3
  117. package/templates/AGENTS.md +64 -7
  118. package/templates/agent-docs/_index.md +6 -4
  119. package/templates/agent-docs/_manifest.json +23 -6
  120. package/templates/agent-docs/ai.md +370 -0
  121. package/templates/agent-docs/authentication.md +313 -31
  122. package/templates/agent-docs/caching.md +6 -0
  123. package/templates/agent-docs/cli.md +853 -50
  124. package/templates/agent-docs/data.md +608 -12
  125. package/templates/agent-docs/database/migrations.md +223 -25
  126. package/templates/agent-docs/database/misc.md +156 -40
  127. package/templates/agent-docs/database/querying.md +19 -1
  128. package/templates/agent-docs/database/scaling.md +60 -0
  129. package/templates/agent-docs/database/schema.md +1 -0
  130. package/templates/agent-docs/database/seedsdialects.md +208 -19
  131. package/templates/agent-docs/database/transactions.md +68 -0
  132. package/templates/agent-docs/deployment.md +284 -25
  133. package/templates/agent-docs/introduction.md +88 -17
  134. package/templates/agent-docs/local-first-mobile.md +79 -4
  135. package/templates/agent-docs/multi-tenancy.md +188 -42
  136. package/templates/agent-docs/observability.md +58 -3
  137. package/templates/agent-docs/plugins/ai-flows.md +247 -2
  138. package/templates/agent-docs/plugins/analytics-postgres.md +1 -1
  139. package/templates/agent-docs/plugins/audit.md +37 -1
  140. package/templates/agent-docs/plugins/auth-social.md +143 -0
  141. package/templates/agent-docs/plugins/auth-workos.md +4 -2
  142. package/templates/agent-docs/plugins/auth.md +131 -6
  143. package/templates/agent-docs/plugins/billing.md +132 -15
  144. package/templates/agent-docs/plugins/cdc-out.md +46 -7
  145. package/templates/agent-docs/plugins/clickhouse.md +32 -1
  146. package/templates/agent-docs/plugins/duckdb.md +1 -1
  147. package/templates/agent-docs/plugins/flags.md +132 -0
  148. package/templates/agent-docs/plugins/governance.md +105 -7
  149. package/templates/agent-docs/plugins/multitenancy.md +9 -4
  150. package/templates/agent-docs/plugins/presence.md +13 -2
  151. package/templates/agent-docs/plugins/ratelimit.md +9 -0
  152. package/templates/agent-docs/plugins/search.md +162 -8
  153. package/templates/agent-docs/plugins/sso-saml.md +47 -8
  154. package/templates/agent-docs/plugins/storage.md +11 -0
  155. package/templates/agent-docs/plugins/webhooks.md +105 -0
  156. package/templates/agent-docs/plugins.md +152 -18
  157. package/templates/agent-docs/reference.md +60 -3
  158. package/templates/agent-docs/releases.md +1117 -0
  159. package/templates/agent-docs/routing.md +43 -25
  160. package/templates/agent-docs/scheduling.md +27 -0
  161. package/templates/agent-docs/schema-driven-ui.md +92 -12
  162. package/templates/agent-docs/security.md +426 -0
  163. package/templates/agent-docs/templates/apibackends.md +87 -18
  164. package/templates/agent-docs/templates/appshells.md +32 -14
  165. package/templates/agent-docs/templates/overview.md +13 -8
  166. package/templates/agent-docs/testing.md +211 -14
  167. package/templates/agent-docs/whats-new.md +98 -136
  168. package/templates/agent-docs/workflows.md +231 -14
  169. package/templates/apps/api-ai/actions/summarize.action.ts +11 -0
  170. package/templates/apps/api-ai/package.json +8 -7
  171. package/templates/apps/api-auth/actions/me.action.ts +13 -0
  172. package/templates/apps/api-auth/package.json +9 -8
  173. package/templates/apps/api-backend/mutations/notes.create.mutation.ts +9 -0
  174. package/templates/apps/api-backend/package.json +12 -8
  175. package/templates/apps/api-backend/queries/notes.query.ts +30 -8
  176. package/templates/apps/api-backend-deactivation/actions/users.get.action.ts +14 -0
  177. package/templates/apps/api-backend-deactivation/mutations/users.create.mutation.ts +8 -0
  178. package/templates/apps/api-backend-deactivation/mutations/users.deactivate.mutation.ts +10 -0
  179. package/templates/apps/api-backend-deactivation/package.json +8 -7
  180. package/templates/apps/api-backend-mail/actions/sendWelcome.action.ts +17 -0
  181. package/templates/apps/api-backend-mail/mutations/notes.create.mutation.ts +9 -0
  182. package/templates/apps/api-backend-mail/package.json +9 -8
  183. package/templates/apps/api-backend-mail/queries/notes.query.ts +30 -8
  184. package/templates/apps/api-backend-mariadb/.env.example +14 -0
  185. package/templates/apps/api-backend-mariadb/mutations/notes.create.mutation.ts +9 -0
  186. package/templates/apps/api-backend-mariadb/package.json +10 -9
  187. package/templates/apps/api-backend-mariadb/queries/notes.query.ts +30 -8
  188. package/templates/apps/api-backend-sqlite/.env.example +14 -0
  189. package/templates/apps/api-backend-sqlite/mutations/notes.create.mutation.ts +9 -0
  190. package/templates/apps/api-backend-sqlite/package.json +9 -8
  191. package/templates/apps/api-backend-sqlite/queries/notes.query.ts +30 -8
  192. package/templates/apps/api-backend-storage/actions/uploadAvatar.action.ts +13 -0
  193. package/templates/apps/api-backend-storage/actions/uploadDocument.action.ts +12 -0
  194. package/templates/apps/api-backend-storage/mutations/notes.create.mutation.ts +9 -0
  195. package/templates/apps/api-backend-storage/package.json +9 -8
  196. package/templates/apps/api-backend-storage/queries/notes.query.ts +30 -8
  197. package/templates/apps/api-cms/actions/content.get.action.ts +7 -0
  198. package/templates/apps/api-cms/actions/content.types.action.ts +6 -0
  199. package/templates/apps/api-cms/actions/me.action.ts +13 -0
  200. package/templates/apps/api-cms/app.config.ts +19 -0
  201. package/templates/apps/api-cms/authz.ts +63 -0
  202. package/templates/apps/api-cms/mutations/content.publish.mutation.ts +10 -0
  203. package/templates/apps/api-cms/mutations/content.saveDraft.mutation.ts +10 -0
  204. package/templates/apps/api-cms/mutations/content.unpublish.mutation.ts +5 -0
  205. package/templates/apps/api-cms/package.json +11 -10
  206. package/templates/apps/api-cms/queries/content.list.query.ts +23 -7
  207. package/templates/apps/api-cms/tests/accessDecisions.test.ts +121 -0
  208. package/templates/apps/api-cms/tests/content.descriptors.test.ts +8 -4
  209. package/templates/apps/api-collab/mutations/documents.create.mutation.ts +8 -0
  210. package/templates/apps/api-collab/mutations/documents.setBody.mutation.ts +13 -0
  211. package/templates/apps/api-collab/package.json +9 -8
  212. package/templates/apps/api-collab/queries/documents.query.ts +19 -7
  213. package/templates/apps/api-data-advanced/package.json +9 -8
  214. package/templates/apps/api-data-advanced/queries/authors.withBooks.query.ts +12 -0
  215. package/templates/apps/api-data-advanced/queries/books.search.query.ts +9 -0
  216. package/templates/apps/api-durable/mutations/orders.approve.mutation.ts +17 -0
  217. package/templates/apps/api-durable/mutations/orders.place.mutation.ts +9 -0
  218. package/templates/apps/api-durable/package.json +9 -8
  219. package/templates/apps/api-feature-flags/actions/notes.export.action.ts +16 -0
  220. package/templates/apps/api-feature-flags/mutations/notes.create.mutation.ts +12 -0
  221. package/templates/apps/api-feature-flags/package.json +10 -9
  222. package/templates/apps/api-governance/README.md +30 -8
  223. package/templates/apps/api-governance/actions/profiles.get.action.server.ts +17 -1
  224. package/templates/apps/api-governance/actions/profiles.get.action.ts +29 -4
  225. package/templates/apps/api-governance/database/schema.ts +16 -4
  226. package/templates/apps/api-governance/mutations/profiles.create.mutation.ts +12 -0
  227. package/templates/apps/api-governance/package.json +9 -8
  228. package/templates/apps/api-kv/actions/sync.pull.action.ts +15 -0
  229. package/templates/apps/api-kv/actions/sync.reset.action.ts +13 -0
  230. package/templates/apps/api-kv/actions/sync.status.action.ts +7 -0
  231. package/templates/apps/api-kv/package.json +9 -8
  232. package/templates/apps/api-kv/queries/events.list.query.ts +19 -8
  233. package/templates/apps/api-moderation/mutations/comments.create.mutation.ts +11 -0
  234. package/templates/apps/api-moderation/mutations/posts.create.mutation.ts +13 -0
  235. package/templates/apps/api-moderation/package.json +9 -8
  236. package/templates/apps/api-observability/mutations/notes.create.mutation.ts +8 -0
  237. package/templates/apps/api-observability/package.json +9 -8
  238. package/templates/apps/api-observability/queries/notes.list.query.ts +13 -0
  239. package/templates/apps/api-ratelimit/mutations/notes.create.mutation.ts +14 -0
  240. package/templates/apps/api-ratelimit/package.json +9 -8
  241. package/templates/apps/api-rbac/package.json +9 -8
  242. package/templates/apps/api-rest/package.json +8 -7
  243. package/templates/apps/api-saas/mutations/projects.create.mutation.ts +13 -0
  244. package/templates/apps/api-saas/package.json +12 -11
  245. package/templates/apps/api-saas/queries/projects.list.query.ts +11 -0
  246. package/templates/apps/api-saas-starter/actions/me.action.ts +13 -0
  247. package/templates/apps/api-saas-starter/app.config.ts +19 -0
  248. package/templates/apps/api-saas-starter/authz.ts +75 -0
  249. package/templates/apps/api-saas-starter/mutations/invites.create.mutation.ts +10 -0
  250. package/templates/apps/api-saas-starter/mutations/projects.create.mutation.ts +9 -0
  251. package/templates/apps/api-saas-starter/package.json +15 -11
  252. package/templates/apps/api-saas-starter/queries/invites.list.query.ts +19 -8
  253. package/templates/apps/api-saas-starter/queries/projects.list.query.ts +18 -7
  254. package/templates/apps/api-saas-starter/tests/accessDecisions.test.ts +135 -0
  255. package/templates/apps/api-search/mutations/articles.create.mutation.ts +14 -0
  256. package/templates/apps/api-search/package.json +9 -8
  257. package/templates/apps/api-search/queries/articles.list.query.ts +21 -8
  258. package/templates/apps/api-status/README.md +10 -3
  259. package/templates/apps/api-status/app.config.ts +8 -3
  260. package/templates/apps/api-status/authz.ts +5 -3
  261. package/templates/apps/api-status/package.json +9 -8
  262. package/templates/apps/api-status/queries/components.list.query.ts +14 -6
  263. package/templates/apps/api-status/queries/incidents.live.query.ts +23 -10
  264. package/templates/apps/api-status/queries/updates.list.query.ts +16 -9
  265. package/templates/apps/api-status/tests/status.test.ts +9 -1
  266. package/templates/apps/api-versioning/actions/documents.asOf.action.ts +12 -0
  267. package/templates/apps/api-versioning/actions/documents.history.action.ts +13 -0
  268. package/templates/apps/api-versioning/mutations/documents.create.mutation.ts +9 -0
  269. package/templates/apps/api-versioning/mutations/documents.update.mutation.ts +12 -0
  270. package/templates/apps/api-versioning/package.json +9 -8
  271. package/templates/apps/api-webhooks/mutations/orders.fulfill.mutation.ts +16 -0
  272. package/templates/apps/api-webhooks/package.json +10 -9
  273. package/templates/apps/api-webhooks/queries/orders.list.query.ts +10 -0
  274. package/templates/apps/changelog/package.json +8 -6
  275. package/templates/apps/edge-functions/package.json +2 -2
  276. package/templates/apps/frontend-admin/package.json +10 -8
  277. package/templates/apps/frontend-admin/src/lib/admin.ts +20 -9
  278. package/templates/apps/frontend-admin/src/locales/de.ts +11 -1
  279. package/templates/apps/frontend-admin/src/locales/en.ts +13 -1
  280. package/templates/apps/frontend-admin/src/pages/admin/[entity]/page.tsx +65 -22
  281. package/templates/apps/frontend-admin/src/pages/admin/entity.test.tsx +130 -23
  282. package/templates/apps/frontend-admin/src/pages/admin/layout.tsx +3 -2
  283. package/templates/apps/frontend-admin/src/pages/admin/page.test.tsx +19 -2
  284. package/templates/apps/frontend-admin/src/pages/admin/page.tsx +9 -4
  285. package/templates/apps/frontend-app/app.config.ts +4 -3
  286. package/templates/apps/frontend-app/package.json +11 -8
  287. package/templates/apps/frontend-app/src/lib/api.ts +25 -0
  288. package/templates/apps/frontend-app/src/pages/page.test.tsx +130 -82
  289. package/templates/apps/frontend-app/src/pages/page.tsx +14 -18
  290. package/templates/apps/frontend-auth/package.json +10 -8
  291. package/templates/apps/frontend-blank/package.json +9 -7
  292. package/templates/apps/frontend-cms/package.json +11 -9
  293. package/templates/apps/frontend-collab/package.json +12 -9
  294. package/templates/apps/frontend-collab/src/pages/page.test.tsx +122 -78
  295. package/templates/apps/frontend-contact/package.json +9 -7
  296. package/templates/apps/frontend-dashboard/package.json +9 -7
  297. package/templates/apps/frontend-docs/package.json +9 -7
  298. package/templates/apps/frontend-i18n/package.json +8 -6
  299. package/templates/apps/frontend-landing/package.json +9 -7
  300. package/templates/apps/frontend-portal/package.json +10 -8
  301. package/templates/apps/frontend-saas/app.config.ts +10 -6
  302. package/templates/apps/frontend-saas/package.json +10 -8
  303. package/templates/apps/frontend-saas/src/lib/api.ts +27 -32
  304. package/templates/apps/frontend-saas/src/pages/dashboard/billing/page.tsx +7 -8
  305. package/templates/apps/frontend-saas/src/pages/dashboard/page.test.tsx +27 -3
  306. package/templates/apps/frontend-saas/src/pages/dashboard/page.tsx +4 -4
  307. package/templates/apps/frontend-saas/src/pages/dashboard/team/page.tsx +3 -4
  308. package/templates/apps/frontend-spa/package.json +9 -7
  309. package/templates/apps/frontend-ssr/package.json +9 -7
  310. package/templates/apps/frontend-ssr-api/package.json +10 -8
  311. package/templates/apps/frontend-static-blog/package.json +8 -6
  312. package/templates/apps/frontend-status/package.json +10 -8
  313. package/templates/apps/mobile-app/README.md +1 -0
  314. package/templates/apps/mobile-app/package.json +4 -2
  315. package/templates/apps/mobile-app/src/app/index.tsx +22 -12
  316. package/templates/apps/mobile-app/src/app/orders/[id].tsx +1 -1
  317. package/templates/apps/mobile-app/src/lib/api.ts +34 -0
  318. package/templates/apps/mobile-app/voltro.mobile.ts +4 -2
  319. package/templates/baselines/bare/.env.example +14 -0
  320. package/templates/baselines/bare/baseline.json +4 -4
  321. package/templates/baselines/compose/.env.example +14 -0
  322. package/templates/baselines/compose/README.md +1 -1
  323. package/templates/baselines/compose/baseline.json +5 -5
  324. package/templates/baselines/compose-mariadb/.env.example +14 -0
  325. package/templates/baselines/compose-mariadb/README.md +1 -1
  326. package/templates/baselines/compose-mariadb/baseline.json +5 -5
  327. package/templates/baselines/helm/.env.example +14 -0
  328. package/templates/baselines/helm/baseline.json +4 -4
  329. package/dist/apiBuild-C-x9YacA.js +0 -2
  330. package/dist/appGraph-CvQCte0z.js +0 -2
  331. package/dist/checkCommand-DRovTKza.js +0 -2
  332. package/dist/commands-CJfepbm4.js +0 -11541
  333. package/dist/dbCommand-b1gum4td.js +0 -2
  334. package/dist/dev-iiMtlkfs.js +0 -3
  335. package/dist/devActivity-BhIu6ncs.js +0 -159
  336. package/dist/frameworkTableAssembly-BwIrO5nv.js +0 -638
  337. package/dist/frameworkTableAssembly-D-EebUQX.js +0 -2
  338. package/dist/inspect-mmBuRXmy.js +0 -2
  339. package/dist/manifestBuild-Dj8Jjoto.js +0 -2
  340. package/dist/seedRunner-Bqxgp7HZ.js +0 -230
  341. package/dist/serveCommand-DdaM4Hup.js +0 -1608
  342. package/dist/start-C0koT0UO.js +0 -1084
  343. /package/templates/apps/api-ai/actions/{summarize.action.server.tsx → summarize.action.server.ts} +0 -0
@@ -1,638 +0,0 @@
1
- import { n as e } from "./appModuleLoader-C9r9mxZt.js";
2
- import { D as t, a as n, j as r, k as i } from "./fileConventions-Cof68_BL.js";
3
- import { basename as a, join as o } from "node:path";
4
- import { pathToFileURL as s } from "node:url";
5
- import { Effect as c } from "effect";
6
- import { existsSync as l, promises as u } from "node:fs";
7
- import { _voltroConnectionGrantsTable as d, _voltroConnectionsTable as f, _voltroScheduleClaimsTable as p, _voltroScheduleRunsTable as ee, _voltroTracesTable as te, _voltroUndoLogTable as ne, _voltroWakeupsTable as re, _voltroWorkflowEventDeliveriesTable as ie, _voltroWorkflowEventsTable as ae, outboxAttemptsTable as oe, outboxTable as se, undoCaptureEnabled as ce } from "@voltro/runtime";
8
- import { SqlClient as m } from "@effect/sql";
9
- import { _voltroWorkflowAdmissionsTable as le, _voltroWorkflowPausesTable as ue, _voltroWorkflowPendingTable as de, _voltroWorkflowRunEventsTable as fe, _voltroWorkflowRunStepsTable as pe, _voltroWorkflowRunsTable as me, _voltroWorkflowStartContextsTable as he, _voltroWorkflowWatermarksTable as ge } from "@voltro/workflow";
10
- import { agentMessagesTable as _e, agentThreadsTable as h, aiBudgetTable as g, aiInferencesTable as _, aiUsageTable as v, isAgentDescriptor as y, isAgentExecutor as b, resolveToolModuleHandlers as x } from "@voltro/ai";
11
- import { _voltroApiKeysTable as S, _voltroCdcOffsetsTable as C, _voltroIdempotencyTable as w, _voltroKvTable as T, _voltroMigrationPlansTable as E, _voltroMigrationsTable as D, _voltroMssqlCdcOffsetsTable as O, _voltroSeedsTable as k, lt as A } from "@voltro/database";
12
- import { _voltroWebhookDeliveriesTable as j, _voltroWebhookTargetsTable as M } from "@voltro/plugin-webhooks/mixin";
13
- import { _voltroStorageBlobsTable as N, _voltroStorageGrantsTable as P, _voltroStorageRefsTable as F, _voltroStorageUsageTable as I } from "@voltro/plugin-storage";
14
- import { defineAction as ve, defineMutation as ye, defineQuery as be } from "@voltro/protocol";
15
- //#region src/frameworkTables.ts
16
- var xe = [
17
- {
18
- table: D,
19
- when: "always"
20
- },
21
- {
22
- table: k,
23
- when: "always"
24
- },
25
- {
26
- table: E,
27
- when: "always"
28
- },
29
- {
30
- table: me,
31
- when: "workflows"
32
- },
33
- {
34
- table: pe,
35
- when: "workflows"
36
- },
37
- {
38
- table: fe,
39
- when: "workflows"
40
- },
41
- {
42
- table: he,
43
- when: "workflows"
44
- },
45
- {
46
- table: de,
47
- when: "workflows"
48
- },
49
- {
50
- table: le,
51
- when: "workflows"
52
- },
53
- {
54
- table: ue,
55
- when: "workflows"
56
- },
57
- {
58
- table: ge,
59
- when: "workflows"
60
- },
61
- {
62
- table: ae,
63
- when: "workflows"
64
- },
65
- {
66
- table: ie,
67
- when: "workflows"
68
- },
69
- {
70
- table: ee,
71
- when: "schedules"
72
- },
73
- {
74
- table: p,
75
- when: "schedules"
76
- },
77
- {
78
- table: M,
79
- when: "webhooks"
80
- },
81
- {
82
- table: j,
83
- when: "webhooks"
84
- },
85
- {
86
- table: te,
87
- when: "traces"
88
- },
89
- {
90
- table: ne,
91
- when: "undo"
92
- },
93
- {
94
- table: se,
95
- when: "always"
96
- },
97
- {
98
- table: oe,
99
- when: "always"
100
- },
101
- {
102
- table: f,
103
- when: "connections"
104
- },
105
- {
106
- table: d,
107
- when: "connections"
108
- },
109
- {
110
- table: re,
111
- when: "always"
112
- },
113
- {
114
- table: F,
115
- when: "always"
116
- },
117
- {
118
- table: P,
119
- when: "always"
120
- },
121
- {
122
- table: N,
123
- when: "always"
124
- },
125
- {
126
- table: I,
127
- when: "always"
128
- },
129
- {
130
- table: w,
131
- when: "always"
132
- },
133
- {
134
- table: S,
135
- when: "always"
136
- },
137
- {
138
- table: T,
139
- when: "always"
140
- }
141
- ], L = (e) => {
142
- let t = xe.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);
143
- return e.cdc === !0 && t.push(e.cdcDialect === "mssql" ? O : C), t;
144
- }, R = (e) => {
145
- let t = e.startsWith("@") ? e.replace(/^@[^/]+\//, "") : e;
146
- return (t.startsWith("plugin-") ? t.slice(7) : t).replace(/-([a-zA-Z0-9])/g, (e, t) => t.toUpperCase());
147
- }, Se = (e) => {
148
- let t = e.startsWith("@") ? e.replace(/^@[^/]+\//, "") : e;
149
- return (t.startsWith("plugin-") ? t.slice(7) : t).replace(/#/g, "--").replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
150
- }, Ce = (e, t) => t.name.includes(".") ? t.name : `${R(e.name)}.${t.name}`, we = (e, t, n) => {
151
- switch (e) {
152
- case "query": return be({
153
- name: t,
154
- input: n.input,
155
- output: n.output,
156
- ...n.error === void 0 ? {} : { error: n.error },
157
- ...n.source === void 0 ? {} : { source: n.source }
158
- });
159
- case "mutation": return ye({
160
- name: t,
161
- input: n.input,
162
- output: n.output,
163
- ...n.error === void 0 ? {} : { error: n.error }
164
- });
165
- case "action": return ve({
166
- name: t,
167
- input: n.input,
168
- output: n.output,
169
- ...n.error === void 0 ? {} : { error: n.error }
170
- });
171
- }
172
- }, Te = (e) => (t, n) => c.suspend(() => {
173
- let r = { request: {
174
- subject: n.request.subject,
175
- traceId: n.request.traceId
176
- } };
177
- return e.execute(t, r);
178
- }), Ee = (e) => {
179
- let t = [];
180
- for (let n of e) {
181
- let e = n.routes ?? [];
182
- for (let r of e) {
183
- let e = Ce(n, r), i = we(r.kind, e, r);
184
- t.push({
185
- kind: r.kind,
186
- file: `plugin:${n.name}`,
187
- descriptor: i,
188
- executor: Te(r),
189
- plugin: {
190
- name: n.name,
191
- version: n.version
192
- }
193
- });
194
- }
195
- }
196
- return t;
197
- }, De = (e, t, n = /* @__PURE__ */ new Set()) => {
198
- let r = /* @__PURE__ */ new Map();
199
- for (let e of t) r.set(e, "user-route");
200
- let i = [];
201
- for (let t of e) {
202
- let e = t.descriptor.name, a = r.get(e);
203
- if (!(a === "user-route" && n.has(e))) {
204
- if (a !== void 0) throw Error(`plugin route tag collision: "${e}" declared by plugin "${t.plugin.name}" but already claimed by ${a === "user-route" ? "a user-authored route" : `plugin "${a}"`}` + (a === "user-route" ? `.\nIf replacing it is intentional, declare \`overridesPlugin: true\` on your "${e}" — renaming yours or aliasing the plugin both split the namespace by who built it.` : ""));
205
- r.set(e, t.plugin.name), i.push(t);
206
- }
207
- }
208
- return i;
209
- }, z = "_voltro_plugin_migrations", B = () => c.gen(function* () {
210
- yield* (yield* m.SqlClient).unsafe(`
211
- CREATE TABLE IF NOT EXISTS ${z} (
212
- id TEXT PRIMARY KEY,
213
- plugin_name TEXT NOT NULL,
214
- migration_id TEXT NOT NULL,
215
- description TEXT,
216
- applied_at TEXT NOT NULL
217
- );
218
- `).pipe(c.orDie);
219
- }), Oe = (e, t) => `${R(e)}__${t}`, ke = () => c.gen(function* () {
220
- let e = yield* m.SqlClient, t = yield* e`SELECT id FROM ${e(z)}`.pipe(c.orDie);
221
- return new Set(t.map((e) => e.id));
222
- }), Ae = (e) => c.gen(function* () {
223
- let t = yield* m.SqlClient, n = (/* @__PURE__ */ new Date()).toISOString();
224
- yield* t`
225
- INSERT INTO ${t(z)} (id, plugin_name, migration_id, description, applied_at)
226
- VALUES (${e.key}, ${e.pluginName}, ${e.migration.id}, ${e.migration.description ?? null}, ${n})
227
- `.pipe(c.orDie);
228
- }), je = (e) => c.gen(function* () {
229
- let t = e.flatMap((e) => (e.extendSchema?.migrations ?? []).map((t) => ({
230
- plugin: e,
231
- migration: t
232
- })));
233
- if (t.length === 0) return [];
234
- yield* B();
235
- let n = yield* ke(), r = [];
236
- for (let { plugin: e, migration: i } of t) {
237
- let t = Oe(e.name, i.id), a = Date.now();
238
- if (n.has(t)) {
239
- r.push({
240
- pluginName: e.name,
241
- migrationId: i.id,
242
- status: "skipped",
243
- durationMs: 0
244
- });
245
- continue;
246
- }
247
- let o = yield* m.SqlClient;
248
- try {
249
- yield* i.up(o).pipe(c.mapError((e) => e)), yield* Ae({
250
- key: t,
251
- pluginName: e.name,
252
- migration: i
253
- }), r.push({
254
- pluginName: e.name,
255
- migrationId: i.id,
256
- status: "applied",
257
- durationMs: Date.now() - a
258
- });
259
- } catch (t) {
260
- return r.push({
261
- pluginName: e.name,
262
- migrationId: i.id,
263
- status: "failed",
264
- durationMs: Date.now() - a,
265
- error: t
266
- }), yield* c.fail(/* @__PURE__ */ Error(`Plugin migration failed: ${e.name} ${i.id} — ${t instanceof Error ? t.message : String(t)}`));
267
- }
268
- }
269
- return r;
270
- }), Me = (e) => e.filter((e) => e.extendSchema && (e.extendSchema.tables?.length ?? 0) + (e.extendSchema.migrations?.length ?? 0) > 0).map((e) => ({
271
- pluginName: e.name,
272
- pluginAlias: R(e.name),
273
- tables: e.extendSchema.tables?.length ?? 0,
274
- migrations: e.extendSchema.migrations?.length ?? 0
275
- })), Ne = (e) => e.flatMap((e) => e.extendSchema?.tables ?? []), V = /(?<!\.server)\.agent\.tsx?$/, Pe = /\.agent\.server\.tsx?$/, H = /\.tool\.tsx?$/, Fe = async (t, n) => {
276
- let r = 0;
277
- for (let i of t) if (H.test(i)) try {
278
- let t = await e(i);
279
- r += x(t);
280
- } catch (e) {
281
- n.warn("tool: failed to import — handler not wired", { file: i }, e);
282
- }
283
- return r;
284
- }, Ie = (e) => e.replace(/\.agent\.(tsx?)$/, ".agent.server.$1"), Le = async (t, n) => {
285
- let r = [], i = /* @__PURE__ */ new Set();
286
- for (let a of t) {
287
- if (!V.test(a)) continue;
288
- let t;
289
- try {
290
- t = await e(a);
291
- } catch (e) {
292
- n.warn("agent: failed to import descriptor", { file: a }, e);
293
- continue;
294
- }
295
- let o = Object.values(t).find(y);
296
- if (o === void 0) {
297
- n.warn("agent: no defineAgent() descriptor export found", { file: a });
298
- continue;
299
- }
300
- if (i.has(o.name)) {
301
- n.warn("agent: duplicate name — skipping", {
302
- file: a,
303
- name: o.name
304
- });
305
- continue;
306
- }
307
- let s = Ie(a), c;
308
- try {
309
- c = await e(s);
310
- } catch (e) {
311
- n.warn("agent: no executor — expected a `*.agent.server.tsx` default-exporting defineAgentExecutor()", {
312
- descriptor: a,
313
- expected: s,
314
- name: o.name
315
- }, e);
316
- continue;
317
- }
318
- let l = c.default;
319
- if (!b(l)) {
320
- n.warn("agent: executor file must default-export defineAgentExecutor(descriptor, {...})", {
321
- file: s,
322
- name: o.name
323
- });
324
- continue;
325
- }
326
- i.add(o.name), r.push({
327
- file: a,
328
- serverFile: s,
329
- descriptor: o,
330
- executor: l
331
- });
332
- }
333
- return { agents: r };
334
- }, U = /\.connection\.tsx?$/, Re = (e) => e.replace(U, ""), ze = async (t, n) => {
335
- let r = [], i = /* @__PURE__ */ new Map();
336
- for (let a of t) {
337
- let t;
338
- try {
339
- t = await e(a);
340
- } catch (e) {
341
- n.warn("connections: failed to import", { file: a }, e);
342
- continue;
343
- }
344
- let o = t.default;
345
- if (o === void 0 || typeof o != "object" || !o) {
346
- n.warn("connections: missing or non-object default export — expected `defineConnection({...})`", { file: a });
347
- continue;
348
- }
349
- let s = o;
350
- if (typeof s.id != "string" || s.id.length === 0) {
351
- n.warn("connections: invalid `id` field", { file: a });
352
- continue;
353
- }
354
- if (s.kind !== "oauth2" && s.kind !== "pat") {
355
- n.warn("connections: `kind` must be \"oauth2\" or \"pat\"", {
356
- file: a,
357
- kind: String(s.kind)
358
- });
359
- continue;
360
- }
361
- let c = i.get(s.id);
362
- if (c !== void 0) {
363
- n.error("connections: DUPLICATE id — only the first is registered", {
364
- id: s.id,
365
- registered: c,
366
- ignored: a
367
- });
368
- continue;
369
- }
370
- i.set(s.id, a), r.push({
371
- file: a,
372
- definition: s
373
- });
374
- }
375
- return r.length > 0 && n.info("discovered connections", {
376
- connections: r.map((e) => `${e.definition.id} (${e.definition.kind})`),
377
- files: r.map((e) => Re(a(e.file)))
378
- }), r;
379
- }, W = (e) => typeof e.attributes["framework.kind"] == "string" && e.attributes["framework.kind"].startsWith("subscription."), G = (e) => {
380
- if (e.name.includes("_voltro_traces")) return !0;
381
- for (let t in e.attributes) {
382
- let n = e.attributes[t];
383
- if (typeof n == "string" && n.includes("_voltro_traces")) return !0;
384
- }
385
- return !1;
386
- }, Be = (e) => typeof e.attributes["framework.kind"] == "string" && e.attributes["framework.kind"].startsWith("subscription"), Ve = 1e3, He = 500, Ue = 50, K = class {
387
- capacity;
388
- buffer = [];
389
- constructor(e = Ve) {
390
- this.capacity = e;
391
- }
392
- append(e) {
393
- this.buffer.push(e), this.buffer.length > this.capacity && this.buffer.shift();
394
- }
395
- query(e = {}) {
396
- let t = e.since ?? 0, n = e.until ?? Date.now(), r = Math.min(e.max ?? He, this.capacity), i = e.traceId, a = e.minDurationMs, o = e.status, s = e.name?.toLowerCase(), c = [];
397
- for (let e = this.buffer.length - 1; e >= 0 && c.length < r; e--) {
398
- let r = this.buffer[e];
399
- r.startMs < t || r.startMs > n || i !== void 0 && r.traceId !== i || a !== void 0 && r.durationMs < a || o !== void 0 && r.status !== o || s !== void 0 && !r.name.toLowerCase().includes(s) || c.push(r);
400
- }
401
- return c.reverse();
402
- }
403
- queryGrouped(e = {}) {
404
- let t = e.since ?? 0, n = e.maxTraces ?? Ue, r = e.onlyErrors ?? !1, i = /* @__PURE__ */ new Map();
405
- for (let e of this.buffer) {
406
- if (e.startMs < t) continue;
407
- let n = i.get(e.traceId);
408
- n ? n.push(e) : i.set(e.traceId, [e]);
409
- }
410
- let a = [];
411
- for (let [e, t] of i) {
412
- t.sort((e, t) => e.startMs - t.startMs);
413
- let n = t.some((e) => e.status === "error");
414
- if (r && !n) continue;
415
- let i = t[0].startMs, o = t.reduce((e, t) => t.endMs > e ? t.endMs : e, i), s = t.filter(W), c = s.length > 0 || t.some(Be), l = s.reduce((e, t) => e === void 0 || t.startMs > e.startMs ? t : e, void 0);
416
- a.push({
417
- traceId: e,
418
- rootName: t[0].name,
419
- startMs: i,
420
- durationMs: o - i,
421
- spanCount: t.length,
422
- hasError: n,
423
- kind: c ? "subscription" : "request",
424
- ...l === void 0 ? {} : { lastDeliveryMs: l.durationMs },
425
- ...s.length > 0 ? { deliveryCount: s.length } : {},
426
- spans: t
427
- });
428
- }
429
- return a.sort((e, t) => t.startMs - e.startMs), a.slice(0, n);
430
- }
431
- size() {
432
- return this.buffer.length;
433
- }
434
- capacityHint() {
435
- return this.capacity;
436
- }
437
- clear() {
438
- this.buffer = [];
439
- }
440
- }, q = null, We = () => (q === null && (q = new K()), q), Ge = /* @__PURE__ */ new Set([
441
- "off",
442
- "errors",
443
- "interesting",
444
- "all"
445
- ]), J = (e, t, n, r) => {
446
- let i = Number(e);
447
- return Number.isFinite(i) ? Math.min(r, Math.max(n, i)) : t;
448
- }, Ke = (e) => e !== void 0 && [
449
- "1",
450
- "true",
451
- "yes",
452
- "on"
453
- ].includes(e.toLowerCase()), qe = (e) => {
454
- let t = Number(e);
455
- return Number.isFinite(t) && t > 0 ? t : 24;
456
- }, Y = (e = process.env) => {
457
- let t = (e.VOLTRO_TRACING_BUFFER ?? "").toLowerCase() === "off", n = J(e.VOLTRO_TRACING_SAMPLE, 1, 0, 1), r = (e.VOLTRO_TRACING_PERSIST ?? "").toLowerCase(), i = e.NODE_ENV === "production" ? "off" : "interesting";
458
- return {
459
- mode: Ge.has(r) ? r : n <= 0 ? "off" : i,
460
- sampleRate: n,
461
- slowMs: J(e.VOLTRO_TRACING_SLOW_MS, 500, 0, 2 ** 53 - 1),
462
- ttlHours: qe(e.VOLTRO_TRACING_TTL_HOURS),
463
- persistDelivery: Ke(e.VOLTRO_TRACING_PERSIST_DELIVERY),
464
- bufferDisabled: t
465
- };
466
- }, X = (e = process.env) => {
467
- let t = Y(e);
468
- return !t.bufferDisabled && t.mode !== "off";
469
- }, Je = (e, t) => {
470
- if (t >= 1) return !0;
471
- if (t <= 0) return !1;
472
- let n = 2166136261;
473
- for (let t = 0; t < e.length; t++) n ^= e.charCodeAt(t), n = Math.imul(n, 16777619);
474
- return (n >>> 0) % 1e3 < t * 1e3;
475
- }, Ye = (e, t) => {
476
- if (t.mode === "off" || G(e) || W(e) && !t.persistDelivery) return !1;
477
- let n = e.status === "error";
478
- if (t.mode === "errors") return n;
479
- if (n) return !0;
480
- if (!Je(e.traceId, t.sampleRate)) return !1;
481
- if (t.mode === "all") return !0;
482
- let r = e.parentSpanId === null || e.parentSpanId === void 0 || e.parentSpanId === "", i = typeof e.durationMs == "number" && e.durationMs >= t.slowMs;
483
- return r || i;
484
- }, Xe = (e) => {
485
- if (e.bufferDisabled) return "durable traces: OFF (VOLTRO_TRACING_BUFFER=off)";
486
- if (e.mode === "off") return "durable traces: OFF — _voltro_traces not created (prod default; set VOLTRO_TRACING_PERSIST=interesting to enable, or use OTLP)";
487
- let t = e.mode === "interesting" ? ` (errors + slow≥${e.slowMs}ms + roots)` : e.mode === "errors" ? " (errors only)" : "";
488
- return `durable traces: mode=${e.mode}${t}` + (e.sampleRate < 1 ? ` · sample=${e.sampleRate}` : "") + (e.persistDelivery ? " · +delivery" : "") + ` · ttl=${e.ttlHours}h`;
489
- }, Ze = (e = 30 * 6e4) => {
490
- let t = /* @__PURE__ */ new Map();
491
- return (n, r) => {
492
- let i = t.get(n);
493
- return i !== void 0 && r - i < e ? !1 : (t.set(n, r), !0);
494
- };
495
- }, Qe = (e) => {
496
- let { store: t, log: n } = e, r = e.policy ?? Y();
497
- n.info(Xe(r));
498
- let i = Ze(), a = [], o = () => {};
499
- if (r.mode !== "off") {
500
- let e = [], s = 0;
501
- o = (t) => {
502
- Ye(t, r) && (e.length >= 5e3 && (e.shift(), s += 1, i("flush-drop", Date.now()) && (n.warn(`trace flush queue saturated — dropping durable spans (${s}+ since last warning). Durable inflow exceeds write throughput; reduce it with VOLTRO_TRACING_PERSIST=errors|interesting or VOLTRO_TRACING_SAMPLE<1.`), s = 0)), e.push(t));
503
- };
504
- let c = async () => {
505
- if (e.length === 0) return;
506
- let n = e.splice(0, 200);
507
- for (let e of n) try {
508
- await t.insert("_voltro_traces", {
509
- id: `${e.traceId}:${e.spanId}`,
510
- traceId: e.traceId,
511
- spanId: e.spanId,
512
- parentSpanId: e.parentSpanId,
513
- name: e.name,
514
- kind: e.kind,
515
- status: e.status,
516
- statusMessage: e.statusMessage ?? null,
517
- startedAt: new Date(e.startMs),
518
- endedAt: new Date(e.endMs),
519
- durationMs: Math.round(e.durationMs),
520
- attributes: e.attributes,
521
- events: e.events ?? null
522
- });
523
- } catch {}
524
- }, l = setInterval(() => {
525
- c();
526
- }, 1e3);
527
- l.unref?.(), a.push(l);
528
- }
529
- let s = r.ttlHours, c = 2e4, l = t.raw?.bind(t), u = async () => {
530
- try {
531
- let e = /* @__PURE__ */ new Date(Date.now() - s * 36e5), r = 0;
532
- if (l) for (;;) {
533
- let t = await l({
534
- _tag: "RawSqlFragment",
535
- strings: ["DELETE FROM \"_voltro_traces\" WHERE \"id\" IN (SELECT \"id\" FROM \"_voltro_traces\" WHERE \"startedAt\" < ", ` LIMIT ${c}) RETURNING "id"`],
536
- values: [e]
537
- });
538
- if (r += t.length, t.length < c) break;
539
- }
540
- else for (;;) {
541
- let n = await t.query({
542
- table: "_voltro_traces",
543
- order: [],
544
- predicate: A("startedAt", e),
545
- projection: ["id"],
546
- skip: void 0,
547
- take: c
548
- });
549
- if (n.length === 0) break;
550
- for (let e of n) try {
551
- await t.delete("_voltro_traces", e.id);
552
- } catch {}
553
- if (r += n.length, n.length < c) break;
554
- }
555
- r >= c && i("gc-volume", Date.now()) && n.warn(`trace GC pruned ${r} spans past the ${s}h TTL in one pass — high durable-trace volume. If _voltro_traces stays large, cut the inflow (VOLTRO_TRACING_PERSIST=errors|interesting, VOLTRO_TRACING_SAMPLE<1) or shorten VOLTRO_TRACING_TTL_HOURS.`);
556
- } catch (e) {
557
- i("gc-error", Date.now()) && n.warn(`trace GC pass failed — _voltro_traces may grow until this clears: ${e instanceof Error ? e.message : String(e)}`);
558
- }
559
- }, d = setInterval(() => {
560
- u();
561
- }, 5 * 6e4);
562
- return d.unref?.(), a.push(d), {
563
- persistTraceSpan: (e) => o(e),
564
- stop: () => {
565
- for (let e of a) clearInterval(e);
566
- }
567
- };
568
- }, Z = async (e) => {
569
- let a = !1, s = !1, c = !1, l = !1, d = !1, f = async (e) => {
570
- let p = await u.readdir(e, { withFileTypes: !0 }).catch(() => []);
571
- for (let u of p) if (u.isDirectory()) {
572
- if (u.name === "node_modules" || u.name === "dist" || u.name === ".framework" || u.name.startsWith(".")) continue;
573
- await f(o(e, u.name));
574
- } else {
575
- let e = u.name;
576
- (r.test(e) || t.test(e)) && (a = !0), n.test(e) && (s = !0), i.test(e) && (c = !0), V.test(e) && (l = !0), U.test(e) && (d = !0);
577
- }
578
- };
579
- return await f(e), {
580
- workflows: a,
581
- schedules: s,
582
- webhooks: c,
583
- agents: l,
584
- connections: d
585
- };
586
- }, $e = async (e) => {
587
- let t = o(e, "app.config.ts");
588
- if (!l(t)) return { plugins: [] };
589
- try {
590
- return { plugins: (await import(s(t).href)).default?.plugins ?? [] };
591
- } catch (e) {
592
- return {
593
- plugins: [],
594
- error: e
595
- };
596
- }
597
- }, Q = class extends Error {
598
- root;
599
- cause;
600
- constructor(e, t) {
601
- super(`app.config.ts could not be imported, so this app's plugin list is EMPTY and every plugin table is missing from the schema.
602
-
603
- This is refused rather than continued: a plan computed without them does not merely omit them, it proposes DROPPING them, and the failure surfaces later as a pluginRef error naming an unrelated plugin.
604
-
605
- The import ran at config-evaluation time — anything your config imports, directly or transitively, that does work when the module is first evaluated will reach here.
606
-
607
- Cause: ${t instanceof Error ? t.message : String(t)}`), this.root = e, this.cause = t, this.name = "AppConfigLoadError";
608
- }
609
- }, $ = (e) => {
610
- let t = /* @__PURE__ */ new Map(), n = (e) => {
611
- e?.tableName && !t.has(e.tableName) && t.set(e.tableName, e);
612
- };
613
- for (let t of L({
614
- workflows: e.mix.workflows,
615
- schedules: e.mix.schedules,
616
- webhooks: e.mix.webhooks,
617
- traces: X(),
618
- cdc: e.cdc,
619
- ...e.cdcDialect ? { cdcDialect: e.cdcDialect } : {},
620
- undo: ce(),
621
- connections: e.mix.connections
622
- })) n(t);
623
- e.mix.agents && (n(h), n(_e), n(v), n(g)), e.mix.workflows && n(_);
624
- for (let t of Ne(e.plugins)) n(t);
625
- return [...t.values()];
626
- }, et = async (e) => {
627
- let t = await Z(e.root), { plugins: n, error: r } = await $e(e.root);
628
- if (r !== void 0) throw new Q(e.root, r);
629
- let i = (process.env.DB_DIALECT ?? "postgres").toLowerCase(), a = i === "mariadb" ? "mariadb" : i === "mssql" ? "mssql" : void 0;
630
- return $({
631
- mix: t,
632
- plugins: n,
633
- cdc: e.cdc ?? (a !== void 0 && (process.env.CDC ?? "1") !== "0"),
634
- ...a ? { cdcDialect: a } : {}
635
- });
636
- };
637
- //#endregion
638
- export { L as C, Se as S, je as _, Qe as a, Ee as b, We as c, ze as d, V as f, Fe as g, Le as h, Z as i, G as l, H as m, et as n, X as o, Pe as p, $ as r, K as s, Q as t, U as u, Me as v, R as x, De as y };
@@ -1,2 +0,0 @@
1
- import { n as e } from "./frameworkTableAssembly-BwIrO5nv.js";
2
- export { e as assembleFrameworkTables };
@@ -1,2 +0,0 @@
1
- import { r as e } from "./inspect-BUUjt773.js";
2
- export { e as buildCapabilityManifest };
@@ -1,2 +0,0 @@
1
- import { t as e } from "./manifestBuild-BLrVuSlM.js";
2
- export { e as buildRpcEntry };