@voltro/cli 0.15.0 → 0.16.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 (55) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/dist/{apiBuild-CHItlwPO.js → apiBuild-BJtiqoOu.js} +1 -1
  3. package/dist/apiBuild-BOczx9-m.js +2 -0
  4. package/dist/bin.js +2 -2
  5. package/dist/{commands-CPQuQRXh.js → commands-8A5RU3MW.js} +17 -12
  6. package/dist/dbCommand-DNQ6l-su.js +2 -0
  7. package/dist/{dbCommand-B8F29zV0.js → dbCommand-OPMtO0sX.js} +223 -209
  8. package/dist/{dev-C2lCUhYI.js → dev-DGjEvvkV.js} +807 -806
  9. package/dist/{dev-BHLM3RPX.js → dev-HdG7JdSk.js} +1 -1
  10. package/dist/index.js +1 -1
  11. package/dist/{serveCommand-DBzQcCuv.js → serveCommand-C3lq3mFd.js} +4 -2
  12. package/dist/serveEntry.js +1 -1
  13. package/package.json +17 -17
  14. package/templates/AGENTS.md +1 -1
  15. package/templates/agent-docs/_index.md +1 -1
  16. package/templates/agent-docs/data.md +9 -1
  17. package/templates/agent-docs/plugins.md +1 -1
  18. package/templates/agent-docs/whats-new.md +66 -224
  19. package/templates/apps/api-ai/package.json +7 -7
  20. package/templates/apps/api-auth/package.json +8 -8
  21. package/templates/apps/api-backend/package.json +7 -7
  22. package/templates/apps/api-backend-deactivation/package.json +7 -7
  23. package/templates/apps/api-backend-mail/package.json +8 -8
  24. package/templates/apps/api-backend-mariadb/package.json +9 -9
  25. package/templates/apps/api-backend-storage/package.json +8 -8
  26. package/templates/apps/api-data-advanced/package.json +8 -8
  27. package/templates/apps/api-durable/package.json +8 -8
  28. package/templates/apps/api-feature-flags/package.json +9 -9
  29. package/templates/apps/api-governance/package.json +8 -8
  30. package/templates/apps/api-kv/package.json +8 -8
  31. package/templates/apps/api-moderation/package.json +8 -8
  32. package/templates/apps/api-observability/package.json +8 -8
  33. package/templates/apps/api-ratelimit/package.json +8 -8
  34. package/templates/apps/api-rbac/package.json +8 -8
  35. package/templates/apps/api-rest/package.json +7 -7
  36. package/templates/apps/api-saas/package.json +11 -11
  37. package/templates/apps/api-search/package.json +8 -8
  38. package/templates/apps/api-versioning/package.json +8 -8
  39. package/templates/apps/api-webhooks/package.json +9 -9
  40. package/templates/apps/changelog/package.json +6 -6
  41. package/templates/apps/edge-functions/package.json +2 -2
  42. package/templates/apps/frontend-admin/package.json +8 -8
  43. package/templates/apps/frontend-app/package.json +8 -8
  44. package/templates/apps/frontend-blank/package.json +7 -7
  45. package/templates/apps/frontend-contact/package.json +7 -7
  46. package/templates/apps/frontend-dashboard/package.json +7 -7
  47. package/templates/apps/frontend-docs/package.json +7 -7
  48. package/templates/apps/frontend-i18n/package.json +6 -6
  49. package/templates/apps/frontend-landing/package.json +7 -7
  50. package/templates/apps/frontend-spa/package.json +7 -7
  51. package/templates/apps/frontend-ssr/package.json +7 -7
  52. package/templates/apps/frontend-ssr-api/package.json +8 -8
  53. package/templates/apps/frontend-static-blog/package.json +6 -6
  54. package/dist/apiBuild-D8juhYsS.js +0 -2
  55. package/dist/dbCommand-Dt7BtdMd.js +0 -2
@@ -1,3 +1,3 @@
1
1
  import "./seedRunner-D6eu-u5U.js";
2
- import { c as e, f as t, s as n } from "./dev-C2lCUhYI.js";
2
+ import { c as e, f as t, s as n } from "./dev-DGjEvvkV.js";
3
3
  export { n as loadApiConfig, e as loadDiscovered, t as walk };
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-CPQuQRXh.js";
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "./commands-8A5RU3MW.js";
2
2
  //#region src/index.ts
3
3
  var o = "framework";
4
4
  //#endregion
@@ -3,8 +3,8 @@ import { s as n } from "./seedRunner-D6eu-u5U.js";
3
3
  import { r, t as i } from "./appModuleLoader-C9r9mxZt.js";
4
4
  import { f as a, m as o, n as s, p as c, u as l } from "./frameworkTableAssembly-BA2bAmYN.js";
5
5
  import { l as u } from "./fileConventions-Cu0tM-Bl.js";
6
- import { $ as d, A as ee, B as f, C as te, D as ne, E as re, F as p, H as ie, I as m, J as h, K as ae, L as oe, M as g, N as _, O as se, P as v, Q as y, S as ce, T as le, V as ue, X as de, Y as b, Z as x, _ as fe, a as S, b as C, c as pe, et as me, f as w, g as he, h as ge, j as _e, k as ve, n as ye, p as T, q as be, r as xe, s as Se, v as Ce, w as we, x as Te, y as E, z as Ee } from "./dev-C2lCUhYI.js";
7
- import { c as D, r as De } from "./apiBuild-CHItlwPO.js";
6
+ import { $ as d, A as ee, B as f, C as te, D as ne, E as re, F as p, H as ie, I as m, J as h, K as ae, L as oe, M as g, N as _, O as se, P as v, Q as y, S as ce, T as le, V as ue, X as de, Y as b, Z as x, _ as fe, a as S, b as C, c as pe, et as me, f as w, g as he, h as ge, j as _e, k as ve, n as ye, p as T, q as be, r as xe, s as Se, v as Ce, w as we, x as Te, y as E, z as Ee } from "./dev-DGjEvvkV.js";
7
+ import { c as D, r as De } from "./apiBuild-BJtiqoOu.js";
8
8
  import { t as Oe } from "./bootTiming-BdyP9nYw.js";
9
9
  import { n as ke } from "./cliArgs-qdZSElM3.js";
10
10
  import { join as Ae } from "node:path";
@@ -750,6 +750,7 @@ var rn = "/_voltro/admin/import", an = "/_voltro/admin/export", Q = (e, t) => ({
750
750
  ...Qe ? { ping: Qe } : {}
751
751
  },
752
752
  ...Ee.length > 0 ? { httpRoutes: Ee } : {},
753
+ ...e.getStore === void 0 ? {} : { getStore: e.getStore },
753
754
  ...oe.size > 0 ? { webhookRoutes: oe } : {}
754
755
  });
755
756
  if (await Re(at), (e.discovered.schedules?.length ?? 0) > 0) {
@@ -1082,6 +1083,7 @@ var rn = "/_voltro/admin/import", an = "/_voltro/admin/export", Q = (e, t) => ({
1082
1083
  clientId: t
1083
1084
  }),
1084
1085
  httpRoutes: [...I.flatMap((e) => e.httpRoutes ?? []), ...yt],
1086
+ getStore: () => N,
1085
1087
  ...V ? { baseLayer: V } : {},
1086
1088
  ...G === void 0 ? {} : { workflowEngineLayer: G },
1087
1089
  scheduleDefaultTrigger: H,
@@ -1,5 +1,5 @@
1
1
  import { $ as e } from "./inspectMetrics-CYDSO3za.js";
2
2
  import { c as t } from "./seedRunner-D6eu-u5U.js";
3
3
  import { r as n } from "./appModuleLoader-C9r9mxZt.js";
4
- import { t as r } from "./serveCommand-DBzQcCuv.js";
4
+ import { t as r } from "./serveCommand-C3lq3mFd.js";
5
5
  export { e as loadDotEnv, n as registerAppModules, t as registerDriver, r as runServe };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltro/cli",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "The `voltro` CLI — dev server, codegen, migrations, project scaffolding, agent-docs seeding, and production serve.",
5
5
  "keywords": [
6
6
  "voltro",
@@ -62,22 +62,22 @@
62
62
  "@effect/platform-node": "^0.107.0",
63
63
  "@effect/sql": "^0.51.1",
64
64
  "@effect/workflow": "^0.18.2",
65
- "@voltro/ai": "0.15.0",
66
- "@voltro/cache": "0.15.0",
67
- "@voltro/data-transfer": "0.15.0",
68
- "@voltro/database": "0.15.0",
69
- "@voltro/env": "0.15.0",
70
- "@voltro/kv": "0.15.0",
71
- "@voltro/logger": "0.15.0",
72
- "@voltro/plugin-auth": "0.15.0",
73
- "@voltro/plugin-broadcast": "0.15.0",
74
- "@voltro/plugin-mail": "0.15.0",
75
- "@voltro/plugin-storage": "0.15.0",
76
- "@voltro/plugin-webhooks": "0.15.0",
77
- "@voltro/protocol": "0.15.0",
78
- "@voltro/runtime": "0.15.0",
79
- "@voltro/serverless": "0.15.0",
80
- "@voltro/workflow": "0.15.0",
65
+ "@voltro/ai": "0.16.0",
66
+ "@voltro/cache": "0.16.0",
67
+ "@voltro/data-transfer": "0.16.0",
68
+ "@voltro/database": "0.16.0",
69
+ "@voltro/env": "0.16.0",
70
+ "@voltro/kv": "0.16.0",
71
+ "@voltro/logger": "0.16.0",
72
+ "@voltro/plugin-auth": "0.16.0",
73
+ "@voltro/plugin-broadcast": "0.16.0",
74
+ "@voltro/plugin-mail": "0.16.0",
75
+ "@voltro/plugin-storage": "0.16.0",
76
+ "@voltro/plugin-webhooks": "0.16.0",
77
+ "@voltro/protocol": "0.16.0",
78
+ "@voltro/runtime": "0.16.0",
79
+ "@voltro/serverless": "0.16.0",
80
+ "@voltro/workflow": "0.16.0",
81
81
  "chokidar": "^5.0.0",
82
82
  "ioredis": "^5.11.1",
83
83
  "tinyglobby": "^0.2.17",
@@ -526,7 +526,7 @@ each plugin's own README.
526
526
 
527
527
  | Topic | Open | Summary |
528
528
  |---|---|---|
529
- | **What's new in 0.14.0** | `node_modules/@voltro/cli/templates/agent-docs/whats-new.md` | Everything that changed in this version. Read it before hand-rolling something the framework may now ship. |
529
+ | **What's new in 0.15.0** | `node_modules/@voltro/cli/templates/agent-docs/whats-new.md` | Everything that changed in this version. Read it before hand-rolling something the framework may now ship. |
530
530
  | AI | `node_modules/@voltro/cli/templates/agent-docs/ai.md` | How Voltro treats AI — agents, tools, streaming, RAG — all primitives over the same WebSocket as the rest of the framework. |
531
531
  | Authentication | `node_modules/@voltro/cli/templates/agent-docs/authentication.md` | How @voltro/plugin-auth wires password + session-cookie auth across api + web, plus the pluggable identity-strategy protocol. |
532
532
  | Caching | `node_modules/@voltro/cli/templates/agent-docs/caching.md` | Voltro's caching layer (@voltro/cache) — an always-on memory default, swappable Redis-compatible backends, a low-level wrap primitive, and automatic query-result invalidation. |
@@ -9,7 +9,7 @@ each plugin's own README.
9
9
 
10
10
  | Topic | Open | Summary |
11
11
  |---|---|---|
12
- | **What's new in 0.14.0** | `node_modules/@voltro/cli/templates/agent-docs/whats-new.md` | Everything that changed in this version. Read it before hand-rolling something the framework may now ship. |
12
+ | **What's new in 0.15.0** | `node_modules/@voltro/cli/templates/agent-docs/whats-new.md` | Everything that changed in this version. Read it before hand-rolling something the framework may now ship. |
13
13
  | AI | `node_modules/@voltro/cli/templates/agent-docs/ai.md` | How Voltro treats AI — agents, tools, streaming, RAG — all primitives over the same WebSocket as the rest of the framework. |
14
14
  | Authentication | `node_modules/@voltro/cli/templates/agent-docs/authentication.md` | How @voltro/plugin-auth wires password + session-cookie auth across api + web, plus the pluggable identity-strategy protocol. |
15
15
  | Caching | `node_modules/@voltro/cli/templates/agent-docs/caching.md` | Voltro's caching layer (@voltro/cache) — an always-on memory default, swappable Redis-compatible backends, a low-level wrap primitive, and automatic query-result invalidation. |
@@ -927,7 +927,15 @@ try {
927
927
 
928
928
  **Trace id for debugging.** An error caught from `useMutation` / `useAction` carries a **non-enumerable `__voltroTraceId`** — the bridge to the server logs for that exact call:
929
929
 
930
- ```ts
930
+ ```
931
+ `errorTag` lives in `@voltro/protocol` rather than in the client for a reason
932
+ worth knowing before you decide where your own error handling goes: **`_tag` is a
933
+ wire concept, and protocol owns the wire.** So a shared error handler in a package
934
+ that has no business depending on `@voltro/client` — a UI kit, an i18n layer —
935
+ can read a tag without taking that dependency. `instanceof` is the thing that
936
+ does NOT survive the wire: what arrives in the browser was decoded from JSON and
937
+ never constructed, so match on the tag, not on the class.
938
+ ts
931
939
  const traceId = (err as { __voltroTraceId?: string }).__voltroTraceId
932
940
  // → `voltro logs --trace <traceId>` to see the server-side span
933
941
  ```
@@ -126,7 +126,7 @@ Order matters: the framework composes outer→inner, so the rate-limit intercept
126
126
  | `extendSchema` | Contribute tables + custom SQL migrations (tracked in `_voltro_plugin_migrations`). |
127
127
  | `services` | Provide an Effect `Layer` whose Tags every handler can `yield*` (e.g. `MailService`, `StorageService`). |
128
128
  | `routes` | Register plugin-owned rpc queries / mutations / actions (alias-prefixed tags). |
129
- | `httpRoutes` | Serve public raw-HTTP endpoints on the framework listener (e.g. `GET /_voltro/storage/:id`). |
129
+ | `httpRoutes` | Serve public raw-HTTP endpoints on the framework listener (e.g. `GET /_voltro/storage/:id`). The request carries `store` — the app's DataStore — for a route that must read or write (a login endpoint minting a session row cannot be an rpc mutation). Not tenant-scoped: raw HTTP has no resolved Subject, so scope it yourself. |
130
130
  | `inspectEndpoints` | Mount tooling under `/_voltro/inspect/plugins/<alias>/…`. |
131
131
  | `onScheduleFire` / `onWorkflowStep` / `onHttpRequest` | Wrap every cron firing, every workflow `step()`, every pre-auth HTTP request. |
132
132
  | `onInstall` / `onActivate` / `onDeactivate` / `onUninstall` | Lifecycle hooks at first-install, boot, shutdown, and removal. |