@quickback-dev/cli 0.16.5 → 0.18.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 (127) hide show
  1. package/README.md +7 -3
  2. package/dist/commands/compile.d.ts.map +1 -1
  3. package/dist/commands/compile.js +12 -48
  4. package/dist/commands/compile.js.map +1 -1
  5. package/dist/commands/create.d.ts +20 -0
  6. package/dist/commands/create.d.ts.map +1 -1
  7. package/dist/commands/create.js +216 -151
  8. package/dist/commands/create.js.map +1 -1
  9. package/dist/commands/login.d.ts +4 -2
  10. package/dist/commands/login.d.ts.map +1 -1
  11. package/dist/commands/login.js +25 -17
  12. package/dist/commands/login.js.map +1 -1
  13. package/dist/commands/start.d.ts +20 -0
  14. package/dist/commands/start.d.ts.map +1 -0
  15. package/dist/commands/start.js +163 -0
  16. package/dist/commands/start.js.map +1 -0
  17. package/dist/commands/whoami.d.ts.map +1 -1
  18. package/dist/commands/whoami.js +5 -4
  19. package/dist/commands/whoami.js.map +1 -1
  20. package/dist/docs/content.js +42 -42
  21. package/dist/docs/content.js.map +1 -1
  22. package/dist/index.js +27 -10
  23. package/dist/index.js.map +1 -1
  24. package/dist/lib/api-client.js +1 -1
  25. package/dist/lib/api-client.js.map +1 -1
  26. package/dist/lib/api-client.test.js +15 -0
  27. package/dist/lib/api-client.test.js.map +1 -1
  28. package/dist/lib/auth.d.ts +39 -3
  29. package/dist/lib/auth.d.ts.map +1 -1
  30. package/dist/lib/auth.js +57 -3
  31. package/dist/lib/auth.js.map +1 -1
  32. package/dist/lib/drizzle-meta-routing.test.js +16 -3
  33. package/dist/lib/drizzle-meta-routing.test.js.map +1 -1
  34. package/dist/lib/file-loader.d.ts +6 -4
  35. package/dist/lib/file-loader.d.ts.map +1 -1
  36. package/dist/lib/file-loader.js +30 -27
  37. package/dist/lib/file-loader.js.map +1 -1
  38. package/dist/lib/file-loader.test.js +16 -7
  39. package/dist/lib/file-loader.test.js.map +1 -1
  40. package/dist/skill/docs/changelog.md +429 -1100
  41. package/dist/skill/docs/compiler/cloud-compiler/cli.md +54 -33
  42. package/dist/skill/docs/compiler/cloud-compiler/index.md +9 -9
  43. package/dist/skill/docs/compiler/config/providers.md +87 -0
  44. package/dist/skill/docs/compiler/config/single-tenant.md +5 -11
  45. package/dist/skill/docs/compiler/definitions/access.md +43 -57
  46. package/dist/skill/docs/compiler/definitions/feature.md +7 -11
  47. package/dist/skill/docs/compiler/definitions/firewall.md +2 -4
  48. package/dist/skill/docs/compiler/definitions/guards.md +16 -18
  49. package/dist/skill/docs/compiler/definitions/index.md +10 -14
  50. package/dist/skill/docs/compiler/definitions/masking.md +6 -6
  51. package/dist/skill/docs/compiler/definitions/read.md +6 -11
  52. package/dist/skill/docs/compiler/definitions/schema.md +18 -18
  53. package/dist/skill/docs/compiler/definitions/views.md +3 -5
  54. package/dist/skill/docs/compiler/getting-started/full-example.md +6 -8
  55. package/dist/skill/docs/compiler/getting-started/hand-crafted.md +3 -5
  56. package/dist/skill/docs/compiler/getting-started/index.md +23 -20
  57. package/dist/skill/docs/compiler/getting-started/patterns.md +19 -31
  58. package/dist/skill/docs/compiler/getting-started/template-blog.md +6 -10
  59. package/dist/skill/docs/compiler/getting-started/template-cloudflare.md +49 -56
  60. package/dist/skill/docs/compiler/getting-started/template-empty.md +3 -5
  61. package/dist/skill/docs/compiler/getting-started/templates.md +58 -56
  62. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/batch-operations.md +29 -23
  63. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/crud.md +12 -14
  64. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/openapi.md +5 -2
  65. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/query-params.md +5 -7
  66. package/dist/skill/docs/compiler/troubleshooting.md +10 -0
  67. package/dist/skill/docs/index.md +9 -0
  68. package/dist/skill/docs/stack/auth/security.md +69 -0
  69. package/dist/skill/docs/stack/cms/actions.md +28 -0
  70. package/dist/skill/docs/stack/cms/connecting.md +2 -2
  71. package/dist/skill/docs/stack/cms/index.md +2 -2
  72. package/dist/skill/docs/stack/cms/record-layouts.md +19 -19
  73. package/dist/skill/docs/stack/cms/schema-format.md +33 -3
  74. package/dist/skill/docs/stack/cms/schema-registry.md +22 -2
  75. package/dist/skill/docs/stack/cms/security.md +10 -12
  76. package/dist/skill/docs/stack/cms/table-views.md +1 -1
  77. package/dist/skill/docs/stack/index.md +8 -4
  78. package/dist/skill/docs/stack/realtime/durable-objects.md +46 -5
  79. package/dist/skill/docs/stack/realtime/index.md +20 -3
  80. package/dist/skill/docs/stack/realtime/using-realtime.md +8 -6
  81. package/dist/skill/docs/stack/vector/embeddings.md +7 -6
  82. package/package.json +1 -1
  83. package/src/skill/docs/changelog.md +486 -1097
  84. package/src/skill/docs/compiler/cloud-compiler/cli.md +54 -33
  85. package/src/skill/docs/compiler/cloud-compiler/index.md +9 -9
  86. package/src/skill/docs/compiler/config/domains.md +44 -10
  87. package/src/skill/docs/compiler/config/output.md +1 -1
  88. package/src/skill/docs/compiler/config/providers.md +87 -0
  89. package/src/skill/docs/compiler/config/single-tenant.md +5 -11
  90. package/src/skill/docs/compiler/definitions/access.md +43 -57
  91. package/src/skill/docs/compiler/definitions/feature.md +7 -11
  92. package/src/skill/docs/compiler/definitions/firewall.md +2 -4
  93. package/src/skill/docs/compiler/definitions/guards.md +16 -18
  94. package/src/skill/docs/compiler/definitions/index.md +10 -14
  95. package/src/skill/docs/compiler/definitions/masking.md +6 -6
  96. package/src/skill/docs/compiler/definitions/read.md +6 -11
  97. package/src/skill/docs/compiler/definitions/schema.md +18 -18
  98. package/src/skill/docs/compiler/definitions/views.md +3 -5
  99. package/src/skill/docs/compiler/getting-started/full-example.md +6 -8
  100. package/src/skill/docs/compiler/getting-started/hand-crafted.md +3 -5
  101. package/src/skill/docs/compiler/getting-started/index.md +23 -20
  102. package/src/skill/docs/compiler/getting-started/patterns.md +19 -31
  103. package/src/skill/docs/compiler/getting-started/template-blog.md +6 -10
  104. package/src/skill/docs/compiler/getting-started/template-cloudflare.md +49 -56
  105. package/src/skill/docs/compiler/getting-started/template-empty.md +3 -5
  106. package/src/skill/docs/compiler/getting-started/templates.md +58 -56
  107. package/src/skill/docs/compiler/targets/hono-api/using-the-api/batch-operations.md +29 -23
  108. package/src/skill/docs/compiler/targets/hono-api/using-the-api/crud.md +12 -14
  109. package/src/skill/docs/compiler/targets/hono-api/using-the-api/openapi.md +5 -2
  110. package/src/skill/docs/compiler/targets/hono-api/using-the-api/query-params.md +5 -7
  111. package/src/skill/docs/compiler/troubleshooting.md +10 -0
  112. package/src/skill/docs/index.md +9 -0
  113. package/src/skill/docs/stack/auth/plugins/index.md +74 -0
  114. package/src/skill/docs/stack/auth/security.md +69 -0
  115. package/src/skill/docs/stack/cms/actions.md +28 -0
  116. package/src/skill/docs/stack/cms/connecting.md +2 -2
  117. package/src/skill/docs/stack/cms/index.md +2 -2
  118. package/src/skill/docs/stack/cms/record-layouts.md +19 -19
  119. package/src/skill/docs/stack/cms/schema-format.md +33 -3
  120. package/src/skill/docs/stack/cms/schema-registry.md +22 -2
  121. package/src/skill/docs/stack/cms/security.md +10 -12
  122. package/src/skill/docs/stack/cms/table-views.md +1 -1
  123. package/src/skill/docs/stack/index.md +8 -4
  124. package/src/skill/docs/stack/realtime/durable-objects.md +46 -5
  125. package/src/skill/docs/stack/realtime/index.md +20 -3
  126. package/src/skill/docs/stack/realtime/using-realtime.md +8 -6
  127. package/src/skill/docs/stack/vector/embeddings.md +7 -6
@@ -4,434 +4,410 @@ Release notes for the Quickback compiler, CLI, and platform.
4
4
 
5
5
  ---
6
6
 
7
- ## v0.16.4 — May 12, 2026
7
+ ## v0.17.1 — May 14, 2026
8
8
 
9
- ### Compile didn't emit a migration — v0.16.3 corrupted drizzle snapshots, fixed + self-heal
9
+ ### `quickback start` — interactive onboarding
10
10
 
11
- The v0.16.3 release stamped a `$$__quickback_warning__$$` key onto every drizzle metadata JSON file under `quickback/drizzle/<dialect>/meta/` — both `_journal.json` and each `<n>_snapshot.json`. The original change description noted that drizzle-kit "ignores unknown top-level fields when reading journals/snapshots" — but that's only true for journals. Snapshots are parsed by a strict Zod schema that rejects extras, so on every compile after the upgrade, drizzle-kit logged each `<n>_snapshot.json` as `"data is malformed"`, lost its diff base, and silently emitted no migration on schema changes. Users hand-wrote migrations (e.g. `0033`) to compensate. Reproduced against `examples/recruitment` by adding a column to `candidates` — the recruit tree's 8 snapshots all came back malformed and zero migrations were generated.
11
+ ```bash
12
+ mkdir my-app && cd my-app
13
+ npx @quickback-dev/cli start
14
+ ```
12
15
 
13
- The fix narrows `DRIZZLE_META_JSON_RE` to a journal-only matcher (`DRIZZLE_JOURNAL_JSON_RE`) so the warning is stamped only where it's safe. A new `stripJsonHeader()` helper runs over `existingFiles` when the staging step encounters a `<n>_snapshot.json`, so projects whose tree was already corrupted by v0.16.3 self-heal on the next compile: the bad header is stripped on the way into the staging dir, drizzle-kit's diff resolves correctly, and the emitted snapshot writes back without the offending key. No manual snapshot surgery required after upgrading — the next `quickback compile` quietly cleans up the prior corruption.
16
+ `start` walks new users through template selection, scaffolds the project on disk, and only prompts for an account when it's ready to compile. Cancelling at the login prompt leaves the scaffold intact — sign in and run `quickback compile` whenever you're ready.
14
17
 
15
- Pinned by `drizzle-meta-header.test.ts`: journals receive the warning key at position 0; snapshots are byte-identical input/output (no warning key); `stripJsonHeader` strips a present warning, no-ops on absent, and tolerates unparseable / array-shaped JSON.
18
+ The same deferred-auth flow applies to `quickback create`. Scaffolding and (optional) Cloudflare D1 setup run before authentication, so you can preview the project on disk before committing to an account.
16
19
 
17
- ### `account.auth.*` now drives the server, not just the UI — closes a signup-disabled bypass
20
+ ### Named views on the free tier
18
21
 
19
- A 2026-05-11 external pentest of a production Loop deployment confirmed that `account.auth.signup: false` only hid the SPA's signup screen while leaving `POST /auth/v1/sign-up/email` wide open. A new account could be created against the server, and because `account.auth.emailVerification: false` was the only emit point (it never set the server's `requireEmailVerification`), the freshly issued session was immediately usable. The same shape applied to `password`, `passkey`, and `emailOTP` — every "friendly" `account.auth.*` flag was a SPA build flag with no server counterpart. The Account UI promised "signup is off"; the server cheerfully accepted the registration.
22
+ The `todos` template now ships a `dashboard` named view, exposing a projected response at `GET /api/v1/todos/views/dashboard`. Named views support per-view access rules and per-view field selection while inheriting the table's firewall and masking — the canonical way to ship list-view payloads that are cheaper to fetch and easier to cache than a full collection read.
20
23
 
21
- `apps/compiler/src/providers/auth/providers/better-auth/normalize-from-account.ts` introduces a one-way normalizer that runs in `parseCompilerInput` before any generator reads `providers.auth`. It maps `account.auth.*` into the Better Auth server config — `signup → emailAndPassword.disableSignUp` (inverted), `password → emailAndPassword.enabled`, `emailVerification → emailAndPassword.requireEmailVerification`, `passkey`/`emailOTP` → plugin additions — only when the user hasn't already set the BA field explicitly. Setting both sides incompatibly (e.g. `account.auth.signup: false` AND `emailAndPassword.disableSignUp: false`) throws at compile time with a precise multi-line error rather than picking a silent winner; the silent precedence is what created the bug in the first place.
24
+ ### `quickback init` removed
22
25
 
23
- The Account SPA's `VITE_ENABLE_*` flags are now derived from the same canonicalized BA config via a new `resolveAuthFeatureFlags()` helper in `generators/spa-builder.ts`, so the SPA bundle and the server cannot drift. The helper self-normalizes (idempotent) for direct callers and unit tests. Two new SPA flags ride along: `VITE_ENABLE_API_KEYS` (driven by the `apiKey` plugin) and `VITE_ENABLE_MAGIC_LINK` (driven by the `magicLink` plugin), so the existing api-keys route in `packages/account` can self-gate the same way passkey/emailOTP already do.
26
+ Folded into `start` and `create`. The legacy command name prints a deprecation notice pointing at its replacements.
24
27
 
25
- **Breaking** for anyone who was implicitly relying on the open signup endpoint: projects that set `account.auth.signup: false` but actually wanted server signup to remain open must now explicitly set `providers.auth.config.emailAndPassword.disableSignUp: false` (and accept the risk). Same migration path for `emailVerification` (now actually enforced server-side when set) and the plugin flags. Loop's existing config requires no change — the next recompile + deploy starts returning `403` on `POST /auth/v1/sign-up/email`, which is exactly what the config has been claiming since the field was added.
28
+ ### Minor
26
29
 
27
- Pinned by `account-auth-normalize.test.ts` (19 unit tests covering the normalizer + flag resolver + contradiction detection on both array- and object-form plugins) and `loop-pentest-regression.test.ts` (compiles a trimmed Loop config and asserts the generated `auth.ts` carries `disableSignUp: true`).
30
+ - `quickback whoami` reads the stored tier from your credentials.
31
+ - Pro upsell copy in `quickback login` is shown only when the server returns an explicit free-tier subscription.
32
+ - Bare scaffolds (`cloudflare`, `empty`) report accurately when there are no features to generate migrations for.
28
33
 
29
34
  ---
30
35
 
31
- ## v0.16.3 — May 9, 2026
36
+ ## v0.16.10 — May 14, 2026
32
37
 
33
- ### Standalone action mount order — literal paths no longer get swallowed by sibling CRUD `/:id` routes
38
+ ### D1-specific safety pass on generated migrations
34
39
 
35
- When a feature exposed both CRUD routes and a standalone action at the same mount prefix, Hono could register the CRUD router first. A literal standalone path like `GET /api/v1/records/today-bundle` would then hit the CRUD router's `GET /:id`, treat `"today-bundle"` as a record id, and fail in the firewall layer as a fake record lookup instead of ever reaching the standalone handler.
40
+ The `cloudflare-d1` provider now runs a post-generation pass over every Drizzle migration directory (auth, features, webhooks, audit) before the compile finishes. Better Auth cleanup for retired managed tables is stripped from raw `DROP TABLE` statements. Drop-only cleanup migrations are reordered child-first when foreign-key dependencies require it. Every generated D1 migration directory is replayed against SQLite during compile, so a D1-breaking migration fails at compile time rather than at `wrangler d1 migrations apply`.
36
41
 
37
- The compiler now attaches an explicit registration priority to generated route mounts. Feature-level standalone action routers register before sibling CRUD routers when both mount at the exact same prefix, so literal paths win and `/:id` remains the fallback. The regression is pinned in `standalone-route-mount-order.test.ts`, which asserts both emitted routes and the final mount order in `src/index.ts`.
42
+ ---
38
43
 
39
- This is a routing-correctness fix, not a public API redesign. No user code changes are required, and existing standalone action paths do not need to be renamed. Recompile and shared-prefix standalone routes resolve correctly.
44
+ ## v0.16.9 — May 13, 2026
40
45
 
41
- ---
46
+ ### Resource-scoped realtime tickets
42
47
 
43
- ## v0.16.1 — May 9, 2026
48
+ `providers.database.config.realtime` accepts an object form for projects whose WebSocket subscribers aren't org members:
44
49
 
45
- ### Cloudflare ASSETS canonicalization — worker SPA emits no longer 307-loop
50
+ ```ts
51
+ realtime: {
52
+ wsTicket: {
53
+ role: "attendee",
54
+ requestField: "eventId",
55
+ scopeTable: "events",
56
+ },
57
+ }
58
+ ```
46
59
 
47
- Cloudflare's static-assets binding canonicalizes any request for `/<dir>/index.html` into a 307 redirect to `/<dir>/` (the default `html_handling=auto-trailing-slash`). When a worker subrequest issues `c.env.ASSETS.fetch(new Request(new URL('/<dir>/index.html', …)))`, the binding returns the 307; the worker forwards it; the browser re-requests `/<dir>/`; the same SPA-fallback handler (or hostname middleware) catches the directory request and re-fetches `/<dir>/index.html`. Infinite loop. Caught by AttendVIP writing custom `/admin/` and `/m/` host-routing patches on the deployed worker — the fix in their patches was switching to `/admin/` (trailing slash, no `index.html`), which Cloudflare resolves to the directory's `index.html` content with a 200.
60
+ The generated `/broadcast/v1/ws-ticket` route authenticates the caller, evaluates the declared relationship role against the request, and mints a short-lived WebSocket ticket scoped to the resolved resource. `realtime: true` continues to enable the org-scoped broadcaster.
48
61
 
49
- The compiler had the same bug baked into every emit point. `cloudflare.ts` now fetches `/<dir>/` everywhere it previously asked for `/<dir>/index.html`: CMS hostname middleware, `/cms/*` SPA catchall, apex `/` handler, account/admin hostname middleware, `/account/*` SPA catchall, and the multi-domain catchall. Eight regression tests in `cf-assets-canonicalization-spa-fallback.test.ts` pin every emit so a future copy/paste can't sneak the literal back in.
62
+ ### Unified broadcast targeting
50
63
 
51
- ### `account.customLogin` — drop a project-branded sign-in page in front of the SPA
64
+ The realtime helper and Broadcaster now route by `scopeKey || organizationId || userId`. String targets remain shorthand for `organizationId`; explicit targets can scope a broadcast to a resource or a single user:
52
65
 
53
- A new `account: { customLogin: true }` flag emits an explicit `app.get('/account/login', …)` route that serves a project-supplied static page instead of letting the bundled Account SPA's client router handle the path. Drop the page at `quickback/public/account/login/index.html` (a *directory*, not a bare `login.html` — see the canonicalization note above) and the existing `quickback/public/` passthrough copies it into the asset binding. The route is registered before the `/account/*` SPA catch-all so the static handler wins; everything else under `/account/...` (profile, organizations, devices, …) keeps going through the React SPA. Same surface AttendVIP was hand-patching post-compile — promoting the flag means the next compile no longer wipes their override. Default `false`.
66
+ ```ts
67
+ await realtime.broadcast("event-page-updated", payload, { scopeKey: "events:evt_123" });
68
+ await realtime.broadcast("dm", payload, { userId: recipientId });
69
+ ```
54
70
 
55
- ### Project-level realtime auto-broadcasts every resource by default
71
+ WebSocket tickets are Quickback-minted (signed with `BETTER_AUTH_SECRET`), not Better Auth tokens — Better Auth remains the front-door auth check; Quickback signs the upgrade ticket after authorization succeeds.
56
72
 
57
- `dbConfig.realtime: true` now treats every resource as realtime-enabled unless its `realtime` block explicitly opts out. The previous behavior set `effectiveResourceRealtime` to `undefined` when a resource didn't declare its own block — so a project that flipped the project-level flag still had to add per-table `realtime: { enabled: true }` everywhere to actually get auto-broadcasts. Caught against AttendVIP after the v0.15.x auto-broadcast wiring landed but didn't fire. New default: project-level on with no per-resource override = `{ enabled: true }`. Per-resource `realtime: { enabled: false }` still wins.
73
+ ---
58
74
 
59
- ### Drizzle metadata gets a DO NOT EDIT header + journal drift warning
75
+ ## v0.16.8 — May 13, 2026
60
76
 
61
- Two changes that protect the drizzle plumbing from quiet corruption.
77
+ ### One auth transport per request
62
78
 
63
- `compile-runner.ts:addJsonHeader` now stamps drizzle's generated JSON (`_journal.json`, `<n>_snapshot.json`) with a `$__quickback_warning__$` key explaining the file is regenerated by the compiler and should not be edited by hand. The disclaimer matches the one already on `.ts` outputs — the journal had been the one drizzle file users felt entitled to "tidy up" because nothing in it said otherwise.
79
+ Generated middleware treats `Cookie`, `Authorization: Bearer`, and `x-api-key` as distinct auth methods and rejects mixed requests with `400 AUTH_METHOD_CONFLICT`. Query-string API keys (`?api_key=` / `?key=`) are no longer accepted. Machine-to-machine auth is explicit; precedence rules between transports are gone.
64
80
 
65
- A new check in the same module compares the journal entry count against the snapshot file count. drizzle-kit only produces one snapshot per `generate` run, so `journal.entries.length > snapshots + 1` means the journal claims migrations the snapshot side has lost (typical cause: a manual delete of an `<n>_snapshot.json` that left the journal entry behind). The compiler logs a warning and lists the orphan entries. Detected directly out of AttendVIP's `Travel 500` triage — drizzle-kit was diffing against a stale `0002_snapshot.json` and emitting bogus full `CREATE TABLE` migrations for tables that had been added in subsequent (now-orphaned) journal entries.
81
+ ### Cookie-backed CSRF gate
66
82
 
67
- ### Two new compile-time validators (LOUD failures over silent traps)
83
+ Generated apps now block cross-site `POST` / `PUT` / `PATCH` / `DELETE` requests from cookie-relying callers. The middleware skips explicit `Authorization` clients, requires a trusted `Origin` or `Referer`, and blocks `Sec-Fetch-Site: cross-site`. This matters most for cross-subdomain session setups where `SameSite=None` is intentional.
68
84
 
69
- **`AUTHENTICATED` + tenant-scoped firewall now refuses to compile.** `pseudo-role-validator.ts` rejects any access tree that admits `AUTHENTICATED` on a resource whose firewall scopes by `organizationId`. The combination is the silent-empty trap: a sign-in-only caller with no active org passes the role gate, the firewall WHERE clause filters every row out, and the API returns `[]` with a 200. The error message names three valid resolutions — drop the org scope (`firewall: { exception: true }`), tighten the role to `USER` or a role with implied org membership, or split the route into a token-auth branch and an org-membership branch.
85
+ ### First-class Wrangler observability
70
86
 
71
- **`createRealtime` imports without `dbConfig.realtime: true` now throw.** Project lib + action + feature-lib files are scanned at compile time for `import { createRealtime }` (and the equivalent named binding). When the project hasn't enabled realtime, the compile fails with the offending file paths and remediation: either enable `dbConfig.realtime: true` so the runtime helper exists, or remove the import. Caught against AttendVIP — three handler files (`broadcastAnnouncement.ts`, `declineActivityForGuest.ts`, `applyRsvp.ts`) imported `createRealtime` after the v0.15 auto-broadcast wiring landed, but their config never set `realtime: true`. The Worker compiled, deployed, and 500'd at first call. The user's framing was "config should be the source of truth" — this validator enforces that. Five regression tests in `realtime-import-without-config-rejected.test.ts`.
87
+ `providers.runtime.config.observability` now supports nested `logs` / `traces` blocks for `headSamplingRate`, `destinations`, `persist`, and `logs.invocationLogs`, emitting matching `[observability]`, `[observability.logs]`, and `[observability.traces]` TOML.
72
88
 
73
- ### Fixes
89
+ ---
74
90
 
75
- **1. `SYSADMIN` was missing from the per-feature standalone gate's `allowsWithoutOrg` set.** The standalone-action wrapper skips its `if (!ctx.activeOrgId)` gate for any access tree referencing a pseudo-role (`PUBLIC`, `AUTHENTICATED`, `USER`, `ADMIN`) — but `SYSADMIN`, the v0.15.0 fifth marker, was missing from the matcher. Sysadmin actions on `cms.sysadmin: true` projects were 403'ing on cross-tenant calls (sysadmins have no member rows, so `ctx.activeOrgId` is unset by design). The matcher now includes `SYSADMIN`.
91
+ ## v0.16.7 — May 12, 2026
76
92
 
77
- **2. Apex `/` and `/account/login` get fallback redirects when neither CMS nor Account SPA is bundled.** Projects that opt out of both bundled SPAs still receive traffic at `/` (no apex handler, 404) and `/account/login` (no Account fallback, 404). Setting `auth.loginUrl` to an external sign-in host now activates two compiler-emitted redirects so those natural inbound URLs land somewhere useful: `/account/login → loginUrl?redirect=…` (preserves the bounce param) and `/ → loginUrl` (or `/account` when the Account SPA is bundled). Both opt in via `auth.loginUrl !== '/account/login'` so projects using the built-in `/account/login` keep the existing SPA-fallback behavior unchanged.
93
+ ### Bearer wins over cookie
78
94
 
79
- **3. Record-based action URLs are now kebab-case to match OpenAPI.** `record-based.ts` was emitting URL paths from the camelCase action name (e.g. `/api/v1/widgets/:id/sendInvite`) while OpenAPI emit produced `/widgets/:id/send-invite`. Admin tooling and SDK consumers reading the OpenAPI spec hit 404s on every multi-word action. URL paths and OpenAPI emit now share a `urlPath = toKebabCase(urlSegment)` helper. Identifiers in audit `actionName`, error messages, and console logs stay camel — those are programmatic surfaces and breaking them would churn audit logs. Same fix shape as the v0.15.0 standalone-action URL casing.
95
+ A request carrying both `Authorization` and a session `Cookie` resolves entirely from the bearer; the cookie is dropped before `getSession()` runs. All three Bearer flavors (API key, JWT, session-token) now behave consistently — no more silent cookie precedence on session-token bearers.
80
96
 
81
- ### Notes
97
+ ### Bearer plugin defaults to `requireSignature: true`
82
98
 
83
- Test coverage: 1175 → 1183 (+8 across the canonicalization, customLogin, and createRealtime regression files). Verified end-to-end against AttendVIP — `quickback compile` produces a worker whose `/account/login`, hostname-routed account/admin SPAs, and apex / handler all return 200 with the right SPA shell on the deployed Cloudflare worker, no 307 loops.
99
+ Better Auth's `bearer` plugin defaults to unsigned tokens; Quickback now emits `bearer({ requireSignature: true })`. Tokens emitted in the CORS-exposed `set-auth-token` header are server-signed with `BETTER_AUTH_SECRET` and verified on every request. Projects that genuinely need unsigned bearers can override via `providers.auth.config.plugins.bearer`.
84
100
 
85
- The bundled docs (`packages/claude-skill/docs/changelog.md`, `packages/cli/src/skill/docs/changelog.md`) and the CLI's `packages/cli/src/docs/content.ts` are regenerated by `scripts/bundle-docs.ts` — run that before publishing the CLI bump.
101
+ See [Authentication Security → Bearer Tokens and Cookie Precedence](/stack/auth/security#bearer-tokens-and-cookie-precedence).
86
102
 
87
103
  ---
88
104
 
89
- ## v0.16.0 — May 9, 2026
90
-
91
- ### Agent Auth Protocol — first-class agent identity for AI callers
105
+ ## v0.16.5 — May 12, 2026
92
106
 
93
- Quickback now ships a server implementation of the [Agent Auth Protocol](https://agentauthprotocol.com) by way of `@better-auth/agent-auth`. Opt in with `auth.plugins.agentAuth: true` (or the array form `plugins: ["agentAuth"]`). When enabled, the compiler emits a complete agent-auth surface: discovery at `/.well-known/agent-configuration`, capability projection from the project's OpenAPI spec, a device-authorization approval page in the Account SPA at `/agents/approve`, and the four agent-auth tables (`agent`, `agentHost`, `agentCapabilityGrant`, `approvalRequest`) added to the auth schema automatically by `auth generate`.
107
+ ### Flat write DSL
94
108
 
95
- **OpenAPI capability projection runs by default.** The compiler emits `src/lib/openapi-spec.ts` (the project's full OpenAPI spec inlined as a const) and wires `createFromOpenAPI(openapiSpec, { ... })` into the `agentAuth(...)` call. Every operation with an `operationId` becomes an agent capability. Default `approvalStrength` map: `GET → "session"`, `POST/PUT/PATCH/DELETE → "webauthn"`. Default `defaultHostCapabilities`: `["GET", "HEAD"]`.
109
+ Resource write operations are now declared at the table level alongside `read`, replacing the nested `crud` block:
96
110
 
97
- The proxy `onExecute` makes a self-fetch to the worker's own URL with a Better Auth JWT minted for `agentSession.user.id`, so the inner request hits the existing JWT fast-path, populates `ctx`, and the full firewall + access + masking pipeline runs on the proxied call. No new middleware code, no parallel security path — agent capability calls go through the same gates as regular REST traffic. The cost is one Cloudflare subrequest per capability call (~50ms); fine for typical agent traffic. Opt out of OpenAPI projection with `agentAuth: { fromOpenAPI: false }` and wire `capabilities` + `onExecute` by hand.
111
+ ```ts
112
+ defineTable(customers, {
113
+ read: { ... },
114
+ create: { access: { roles: ["admin"] } },
115
+ update: { access: { roles: ["admin"] } },
116
+ delete: { access: { roles: ["admin"] }, mode: "soft" },
117
+ upsert: { access: { roles: ["admin"] } },
118
+ guards: { ... },
119
+ });
120
+ ```
98
121
 
99
- The Account SPA gains `/agents/approve` (`packages/account/app/routes/agents.approve.tsx`) — modeled on the existing `/cli/authorize` device-code page. Pastes the user code, fetches the pending request, lists the requested capabilities with a "Step-up" badge on any capability whose `approvalStrength` is `"webauthn"`, then approves or denies. WebAuthn step-up itself is a placeholder for v0.16.0 — the upstream agent-auth API for the escalation call is still settling, so capabilities tagged `"webauthn"` will fail server-side until that lands. The badge tells the user what's coming.
122
+ `crud` and top-level `put` still compile as deprecated compatibility aliases. Mixed usage on the same resource is rejected. `schema-registry.json` emits both shapes during the transition.
100
123
 
101
- ### Bearer-only on `/mcp` and the agent-auth surface
124
+ ### CMS placement for multi-table feature actions
102
125
 
103
- `/mcp` now forwards **only** `Authorization: Bearer …` into the inner `app.request()` re-entry. Cookie + `x-api-key` forwarding has been removed. The MCP surface is server-to-server by nature — there are no browser callers, no CSRF surface to defend, and no benefit to fragmenting the auth model across three header conventions. Three Bearer flavors all land on the same header, resolved by the inner Hono middleware chain:
126
+ Standalone actions on multi-table features have an explicit placement model:
104
127
 
105
- - Better Auth session token via the official `bearer` plugin
106
- - OAuth access token via the OAuth Provider plugin
107
- - Agent JWT via `@better-auth/agent-auth`
128
+ - `cms.placement: "feature"` shows the action on every table toolbar in the feature
129
+ - `cms.placement: "tables"` with `cms.tables` scopes it to specific tables
130
+ - `cms.hidden: true` keeps it API-only
108
131
 
109
- If a project still wants API-key auth here, configure the `apiKey` plugin to accept its key via `Authorization: Bearer` so everything stays one channel. The existing `mcp-server.test.ts` regression seal flips from "forwards Cookie + x-api-key" to "forwards only Authorization (bearer-only surface)".
132
+ Feature-root standalone actions are emitted under a new `featureActions` bucket in `schema-registry.json`. Ambiguous multi-table standalone actions without placement compile with a warning.
110
133
 
111
- ### Auth DSL: `bearer`, `oauthProvider`, `agentAuth` are now first-class plugin entries
134
+ ### `openapi.types` accepts a string array
112
135
 
113
- Both the array-form union and the `BetterAuthPlugins` interface in `apps/compiler/src/define/auth.ts` gain `"bearer"`, `"oauthProvider"`, and `"agentAuth"`. `bearer` was previously in the runtime registry but missing from the TS type, so callsites had to use `as any` or `// @ts-expect-error` to set it. Both are gone now. New typed options interfaces — `OAuthProviderOptions` (audience, login/consent paths, dynamic registration) and `AgentAuthOptions` (providerName, providerDescription, modes, fromOpenAPI, approvalStrength, defaultHostCapabilities) — let users override defaults through the object form.
136
+ One compile can write the generated types file to multiple locations, keeping colocated SPA clients in sync:
114
137
 
115
- Auto-enable rule lives in the canonical `computeAutoAddedPlugins` (`generators/auth.ts`): turning on `agentAuth` force-adds `bearer` + `oauthProvider`. There is no useful agent-auth deployment without those two — surfacing it as auto-add rather than a confusing "missing dependency" runtime error matches the existing pattern (`oauthProvider` already auto-adds `jwt`).
138
+ ```ts
139
+ openapi: { types: ['api-types.gen.ts', 'apps/web/src/lib/api-types.gen.ts'] }
140
+ ```
116
141
 
117
- ### `queue-consumer.ts` now emitted for `additionalQueues` too
142
+ ### Stable artifact ordering
118
143
 
119
- Prior to this release, the queue consumer emit gated on `embeddingFeatures.length > 0 || queueHandlers.length > 0`. Projects that declared queue infrastructure via `dbConfig.additionalQueues` but had no embeddings + no `services/queues/*` handlers shipped a `wrangler.toml` with `[[queues.consumers]]` entries pointing at a missing worker `queue` export. The CLI's archive-restore step kept a stale `queue-consumer.ts` around, so the file appeared "stuck" across compiles — same class of bug as the v0.15.0 services/queues/* regression caught against AttendVIP, just one source removed.
144
+ Generated route files and `schema-registry.json` are emitted in a stable order across runs. Identical logical input produces identical artifacts.
120
145
 
121
- The gate is now a three-way OR: `hasEmbeddings || hasQueueHandlers || hasAdditionalQueues`. When only `additionalQueues` is set, the compiler emits a stub `queue-consumer.ts` whose `queue` export acks every message with a warning — Cloudflare needs an export for every consumer binding, and a noisy-but-correct stub beats a silent deploy break. `MainAppOptions` and `CloudflareMainAppOptions` gain `hasAdditionalQueues`; `generateQueueImport` and `generateCloudflareExport` mirror the new gate. Regression test: `src/__tests__/queue-additional-queues-gate.test.ts`.
146
+ ---
122
147
 
123
- ### Fixes
148
+ ## v0.16.4 — May 12, 2026
124
149
 
125
- **1. `bearer` was missing from the `BetterAuthPlugins` TypeScript interface.** The runtime plugin registry has had `bearer` since the pre-1.0 cuts, but `apps/compiler/src/define/auth.ts` never declared it on the typed shape — so any `quickback.config.ts` using `plugins: { bearer: true }` had to `as any`-cast or sit behind a `@ts-expect-error`. Both `bearer` and `oauthProvider` (same gap, same workaround) are now first-class typed entries; `agentAuth` joins them. The array-form union also gains all three. No behavior change at runtime; existing casts can come out.
150
+ ### Drizzle snapshot integrity
126
151
 
127
- **2. MCP `buildInternalRequest` no longer forwards Cookie or `x-api-key`.** The MCP surface is server-to-server — there are no browser callers, no CSRF surface to defend, and no benefit to fragmenting the auth model across three header conventions. The inner `app.request()` re-entry now forwards only `Authorization: Bearer …`. Three Bearer flavors all land on the same header (BA session token via the `bearer` plugin, OAuth access token via OAuth Provider, agent JWT via `@better-auth/agent-auth`). Existing `mcp-server.test.ts` regression flipped from "forwards Cookie + x-api-key" to "forwards only Authorization (bearer-only surface)".
152
+ Drizzle metadata files (`<n>_snapshot.json`) are no longer stamped with a Quickback warning key. The warning is now journal-only. Projects whose snapshots were corrupted by an earlier release self-heal on the next compile — the stripped header is removed during staging and the rewritten snapshot is clean.
128
153
 
129
- **3. `agentAuth` now auto-enables `bearer` + `oauthProvider`.** There is no useful agent-auth deployment without those two — the agent surface is bearer-only and MCP clients need OAuth to register. Auto-enable lives in the canonical `computeAutoAddedPlugins` (`generators/auth.ts`), so it propagates to every consumer (better-auth generator, schema generation, package-deps emission). Same pattern as the existing `oauthProvider` → `jwt` rule. Surfaced in `agent-auth.test.ts` with a regression seal that asserts both plugins land in the merged plugin list whether the user wrote the array form or the object form.
154
+ ### `account.auth.*` drives the server, not just the SPA
130
155
 
131
- **4. `OpenAPISpec` literal type rejected by tsc on inlined spec.** Quickback's OpenAPI emit produces `$ref`-style parameter entries (`{ "$ref": "#/components/parameters/X" }`) that the agent-auth plugin's stricter `OpenAPIParameter` type doesn't model — `tsc` fails the generated project with "Type … is not assignable to OpenAPIParameter". The plugin handles refs correctly at runtime; only the structural narrowing on the TS literal needed help. The generated `agentAuth({ ...createFromOpenAPI(openapiSpec as any, { ... }) })` call now carries an `as any` cast on the spec with an inline comment explaining why. Drop when upstream models `$ref` parameters.
156
+ The Account UI's auth flags (`signup`, `password`, `passkey`, `emailOTP`, `emailVerification`) now configure the Better Auth server alongside the SPA bundle. A normalizer maps them into the server config:
132
157
 
133
- ### Notes
158
+ - `signup → emailAndPassword.disableSignUp` (inverted)
159
+ - `password → emailAndPassword.enabled`
160
+ - `emailVerification → emailAndPassword.requireEmailVerification`
161
+ - `passkey` / `emailOTP` → plugin additions
134
162
 
135
- `@better-auth/agent-auth` 0.4.5 ships ESM-only exports without a `require` condition, so the Better Auth CLI's `auth generate` step (jiti / CJS resolver) bails with `ERR_PACKAGE_PATH_NOT_EXPORTED`. The compiler image patches the package's `package.json` at install time to add a matching `require` condition pointing at the same dist file (Node 22+ supports `require(esm)`). Remove the patch in `apps/compiler/Dockerfile` when upstream ships proper exports.
163
+ The SPA's `VITE_ENABLE_*` flags are derived from the same canonicalized server config, so the bundle and the server cannot drift. Two new flags ride along: `VITE_ENABLE_API_KEYS` and `VITE_ENABLE_MAGIC_LINK`.
136
164
 
137
- Test coverage: 1136 → 1152 (+11 `agent-auth.test.ts`, +5 `queue-additional-queues-gate.test.ts`). Verified end-to-end against `examples/recruitment` with `agentAuth` enabled — `quickback compile` produces a project whose `npm run build` typechecks clean and whose generated schema includes all four agent-auth tables (`agent`, `agentHost`, `agentCapabilityGrant`, `approvalRequest`).
165
+ **Breaking** for projects that implicitly relied on the SPA-only behaviour: `account.auth.signup: false` now actually disables `POST /auth/v1/sign-up/email` on the server. Set `providers.auth.config.emailAndPassword.disableSignUp: false` explicitly to keep server signup open while hiding the SPA screen.
138
166
 
139
167
  ---
140
168
 
141
- ## v0.15.0 — May 7, 2026
142
-
143
- ### Sysadmin tier — cross-tenant DB-admin role for the CMS
169
+ ## v0.16.3 — May 9, 2026
144
170
 
145
- A new opt-in `cms: { sysadmin: true }` flag turns the CMS into a Supabase-style cross-tenant DB-admin tool gated by `user.role === 'sysadmin'`. Distinct from `'admin'` so Better Auth admin-plugin powers (user management, impersonation) and DB-admin powers stay decoupled. Off by default — projects without the feature get zero behavior change.
171
+ ### Standalone action mount order
146
172
 
147
- When enabled, the compiler emits a `SYSADMIN` pseudo-role (fifth marker alongside `PUBLIC` / `AUTHENTICATED` / `USER` / `ADMIN`); a firewall escape hatch in every `buildFirewallConditions` that drops tenant scopes for `ctx.userRole === 'sysadmin'` while preserving soft-delete; a true cross-tenant `/admin/v1/sysadmin/organizations` endpoint that selects directly from the auth-schema `organization` table; and a relaxed cross-tenant guard that skips the `ORG_REQUIRED` 400 for sysadmins on list routes — that's how the SPA's "All organizations" sentinel reaches the firewall escape end-to-end.
173
+ Feature-level standalone action routers now register before sibling CRUD routers when both mount at the exact same prefix. A literal path like `GET /api/v1/records/today-bundle` resolves to the standalone handler instead of falling through to `GET /:id` and treating `"today-bundle"` as a record ID.
148
174
 
149
- The CMS SPA gains a two-mode design: org admins keep the existing membership-based switcher (Better Auth's `setActiveOrganization`); sysadmins get a `SysadminOrgSelector` that loads from the cross-tenant endpoint, defaults to "All organizations" (omits the org filter on reads), and pins selected tenants via `?organizationId=` on every API call (sysadmins have no member rows, so `setActive` would 403). A new `OrgGate` component handles no-active-org cases for org users — auto-pick when there's exactly one membership, full-frame picker for multiple, empty state for zero — so sessions that lost their active org don't dead-end.
175
+ ---
150
176
 
151
- Refusing to compile `roles: ["SYSADMIN"]` without `cms.sysadmin: true` keeps the role from sitting as dead code. RLS providers (Neon, Supabase) emit `false` for `SYSADMIN` today; per-table RLS policy emit is a follow-up.
177
+ ## v0.16.1 — May 9, 2026
152
178
 
153
- ### Durable Object `[[migrations]]` order is now preserved across recompiles
179
+ ### Cloudflare ASSETS canonicalization
154
180
 
155
- Cloudflare's migration system is append-only — every deploy must include previously-deployed migration tags in their original order, with new ones appended last. CF rejects deploys with `code: 10061` when the order shifts. The compiler used to iterate `bindings.durableObjects` in config order at emit time, so a user inserting a new DO into the middle of the array bumped every later auto-migration into the wrong slot, breaking deploys for projects with multiple DOs (caught by AttendVIP).
181
+ Worker SPA fallbacks now request `/<dir>/` instead of `/<dir>/index.html`. Cloudflare's static-assets binding rewrites `/index.html` requests as 307 redirects to the trailing-slash path under the default `html_handling=auto-trailing-slash`, which previously caused redirect loops in SPA fallback handlers. Affects CMS, Account, admin, and the multi-domain catchall.
156
182
 
157
- The CLI now sends the project's existing `wrangler.toml` (when present) in `existingFiles` alongside the drizzle meta. The compiler parses migration tags from it via `parseExistingMigrationTags`, then emits auto-generated DO `[[migrations]]` blocks in two phases: deployed entries first (preserving the existing wrangler.toml order), net-new entries appended last in `bindings.durableObjects` config order. Reordering DOs in the config array no longer reshuffles deployed migrations; inserting a new DO anywhere in the array always appends its migration block last. First compiles (no existing wrangler.toml) keep the current config-order behavior — no behavior change for new projects. User-declared `bindings.durableObjectMigrations` (historical entries) are unaffected; they continue to emit first.
183
+ ### `account.customLogin`
158
184
 
159
- ### Standalone-action wrapper no longer 403s `AUTHENTICATED`-only routes on org-scoped projects
185
+ Set `account: { customLogin: true }` to drop a project-branded sign-in page in front of the bundled SPA. Place the page at `quickback/public/account/login/index.html` (as a directory) and the existing public passthrough serves it. The route registers before the `/account/*` SPA catch-all so the static handler wins; everything else under `/account/` continues to route through the bundled SPA.
160
186
 
161
- Standalone actions (`standalone: true`) on org-scoped projects emitted an unconditional `if (!ctx.activeOrgId) return 403 ACCESS_NO_ORG` gate before role checking. For an action declared `access: { roles: ["AUTHENTICATED"] }`, this contradicted the access rule itself: a signed-in user with no active org (e.g. just signed up but not yet joined an organization, or a token-auth caller) was the exact caller `AUTHENTICATED` was supposed to admit. Found by AttendVIP — every recompile re-introduced the bug because the fix lived in handler-side patches, not the generator. The standalone wrapper now skips the org gate when the access tree references any pseudo-role anywhere, including under `or:`/`and:` arms.
187
+ ### Project-level realtime defaults
162
188
 
163
- ### Queue handler emit no longer drops the `queue` export when there are no embeddings
189
+ `providers.database.config.realtime: true` now treats every resource as realtime-enabled by default. Per-resource `realtime: { enabled: false }` still wins.
164
190
 
165
- `compiler.ts` emits `src/queue-consumer.ts` whenever `embeddingFeatures.length > 0 || queueHandlers.length > 0`, but the worker entry only checked `hasEmbeddings`. Projects with custom queue handlers under `services/queues/*` and no embeddings got the consumer file generated and then no entry-point wiring — wrangler bound the queue to a missing handler at deploy time. Caught against AttendVIP's `sendCancelEmail` queue handler. `MainAppOptions` and `CloudflareMainAppOptions` gain a `hasQueueHandlers` flag; `generateQueueImport` and `generateCloudflareExport` now gate on `hasEmbeddings || hasQueueHandlers`.
191
+ ### Compile-time validators
166
192
 
167
- ### `quickback/public/` — static-asset passthrough into `src/apps/`
193
+ Two new compile-time errors over silent runtime failures:
168
194
 
169
- A new opt-in folder. Anything you drop under `quickback/public/` is copied verbatim into `src/apps/` on every compile, where the wrangler `[assets]` binding (`directory = "src/apps"`) already serves it. So `quickback/public/robots.txt` becomes reachable at `https://your-domain/robots.txt`, `quickback/public/og/og-image.png` at `/og/og-image.png`, and so on. Favicons, `robots.txt`, OG images, marketing PDFs, sitemap fragments, `.well-known/` files — anything you'd previously have had to post-process into `src/apps/` after each compile.
195
+ - `AUTHENTICATED` + org-scoped firewall is rejected. The combination silently returned empty lists to sign-in-only callers who lacked an active org; the validator names three valid resolutions (drop the org scope, use `USER`, or split the route).
196
+ - `createRealtime` imports without `realtime: true` enabled in the config are rejected at compile.
170
197
 
171
- The compiler does **not** parse, template, or otherwise touch these files. They ride past it as bytes — the CLI does the copy after `writeFilesWithMerge`, using `fs.copyFile` so binaries (PNGs, fonts, PDFs) stay byte-perfect rather than being corrupted by the utf-8 string channel the compiler manifest uses for source files. The compiler API contract is unchanged; nothing round-trips through `compile.quickback.dev`.
198
+ ### Drizzle metadata hardening
172
199
 
173
- Rules:
200
+ Drizzle journal files carry a "do not edit" header. The compiler warns when the journal entry count exceeds the snapshot file count (typically the trace of a hand-deleted snapshot).
174
201
 
175
- - **Optional.** If the folder doesn't exist, the step is a no-op.
176
- - **Stale-cleaned.** `src/` is wiped and rewritten each compile, so files removed from `quickback/public/` disappear from `src/apps/` automatically on the next run.
177
- - **Hidden entries skipped.** `.DS_Store`, `.git/`, dotfiles — none of these were intentional drops; including them would break worker asset bindings.
178
- - **Collisions fail loud.** A file in `quickback/public/` whose path would shadow a compiler-emitted manifest entry — e.g. `quickback/public/cms/index.html` against the SPA shell — fails the compile with the offending paths listed, rather than silently overwriting and producing a confused-looking SPA build. Move or rename the offending file.
202
+ ### Minor
179
203
 
180
- The change is contained to the CLI: `packages/cli/src/lib/copy-public-assets.ts` (helper + `PublicAssetCollisionError`) and one block in `packages/cli/src/commands/compile.ts`. Test coverage in `copy-public-assets.test.ts` walks the missing-folder, single-file, nested-tree, binary-preservation, hidden-entry, single-collision, multi-collision, empty-folder, and split-output cases — nine tests, byte-level assertions on the binary path.
204
+ - `SYSADMIN` is now recognised by the standalone-action org gate's pseudo-role matcher.
205
+ - Apex `/` and `/account/login` get fallback redirects to `auth.loginUrl` when neither bundled SPA is enabled.
206
+ - Record-based action URLs are kebab-case to match the OpenAPI spec (e.g. `/api/v1/widgets/:id/send-invite`).
181
207
 
182
208
  ---
183
209
 
184
- ## v0.14.7 — May 7, 2026
210
+ ## v0.16.0 — May 9, 2026
185
211
 
186
- ### Four more codegen bugs caught by AttendVIP — generated output now typechecks for projects with non-`id` PKs and DO-only features
212
+ ### Agent Auth Protocol
187
213
 
188
- Filed after AttendVIP's `tsc` reported 230 errors against the generated `src/`. Triage split them into six patterns; four are surgical and ship here. The other two (TS2769 ×156 + TS2339 ×~50) trace to a deeper assumption — every queryable table has a string-typed `id` column — and are deferred to v0.14.8 along with the agreed `id` auto-inject design (see *Coming next* below).
214
+ Quickback ships a server implementation of the [Agent Auth Protocol](https://agentauthprotocol.com) via `@better-auth/agent-auth`. Enable with `auth.plugins.agentAuth: true` and the compiler emits the full agent-auth surface: discovery at `/.well-known/agent-configuration`, capability projection from the project's OpenAPI spec, a device-authorization approval page in the Account SPA at `/agents/approve`, and the four agent-auth tables added to the auth schema automatically.
189
215
 
190
- **1. Duplicate `guests` import in routes that use relationship-roles (`TS2300`).** The relationship-import injector (`generators/feature-generator.ts`) added `import { <table>, buildFirewallConditions as build<Table>FirewallConditions } from './<table>.resource'` whenever it detected a relationship-table reference in the routes file — without checking that the table binding was already imported from `./schema` upstream. So `guests.routes.ts` ended up with `guests` declared twice. Fix: scan the existing import block, only add identifiers that aren't already in scope (drop the binding from the new import line, or skip the line entirely if both binding and alias are imported).
216
+ **OpenAPI capability projection runs by default.** Every operation with an `operationId` becomes an agent capability. Default `approvalStrength` map: `GET → "session"`, `POST/PUT/PATCH/DELETE → "webauthn"`. The proxy `onExecute` makes a self-fetch with a Better Auth JWT minted for the agent session, so the inner request hits the existing JWT fast-path and runs the full firewall + access + masking pipeline. Opt out of OpenAPI projection with `agentAuth: { fromOpenAPI: false }` and wire `capabilities` + `onExecute` by hand.
191
217
 
192
- **2. `db` referenced before declaration in single-record + bulk action handlers (`TS2448` / `TS2304`).** `record-based.ts:195,541` baked `firewallClause = ...buildFirewallConditions(ctx, db)...` and used the same string in two places: (a) the outer pre-fetch `await unsafeDb.select().from(table).where(firewallClause)` — where `db` doesn't exist yet (`db = createScopedDb(unsafeDb, ctx)` is declared later for handler scope), and (b) inside `processBatch` where `db` is created from the tx/handle param. The outer use threw at typecheck (`'db' is used before its declaration`); at runtime it would have been a `ReferenceError`. Fix: pass `unsafeDb` (the in-scope handle) to `buildFirewallConditions` in both `firewallClause` definitions. The helper only uses its `db` arg for relationship-role subqueries (when `via:` is in play); either handle is a valid Drizzle client for that lookup.
218
+ ### Bearer-only on `/mcp` and the agent-auth surface
193
219
 
194
- **3. PartyServer realtime gates passed 1 arg to a 2-arg `buildFirewall_X` (`TS2554`).** `optional-routes.ts` emitted `buildFirewall_<feature>(ctx as any)` in the WebSocket-upgrade gate for every Durable Object that declared `access: { resource }`. After v0.14.4 made `buildFirewallConditions(ctx, db)` 2-arg whenever the resource has any `via:` predicate, this gate stopped compiling for any DO whose target feature uses relationship-roles. AttendVIP's `event-pages` DO sits on `event_pages` (admin via `guestOf`), which is exactly that case. Fix: the gate already constructs `db = drizzle(c.env.<binding>)` for its own `db.select(...).limit(1)` — pass that same `db` into the firewall call. Mirrored in both the single-resource and multi-resource gate branches.
220
+ `/mcp` forwards only `Authorization: Bearer …` into the inner request. Cookie and `x-api-key` forwarding are removed. Three Bearer flavors land on the same header — Better Auth session token (via the `bearer` plugin), OAuth access token (via OAuth Provider), and agent JWT (via `@better-auth/agent-auth`).
195
221
 
196
- **4. Durable-object-only features dropped their `lib/` files from output (`TS2307`).** `compiler.ts:546` only ran the feature-walker (and copied `featureLibFiles` to output) when the feature had at least one action file. AttendVIP's `user-profiles/` declares a single DO source under `lib/UserGateway.ts` and zero `actions/` — perfectly valid (per-user realtime gateway, the Slack/Linear pattern), but the walker skipped the feature entirely. The compile finished without error, then `index.ts` tried to import `./features/user-profiles/lib/UserGateway` and `tsc` 404'd the module. `event-pages/PageRoom.ts` worked only because that feature happens to also have `actions/`. Fix: run the discovery + lib-copy path whenever the feature has either actions OR lib files. Copying `lib/` files when the feature has at least one of either is the safe reading of the original intent.
222
+ ### Auth DSL gains first-class plugin entries
197
223
 
198
- **Drops ~20 of the 230 attendvip errors** (TS2300 ×2, TS2448 ×11, TS2304 ×6, TS2554 ×2 from the realtime gate, TS2307 ×1 — depending on cache state). The remaining 210 are TS2769 (numeric-ID arrays where the column is `integer`, not `text`) and TS2339 (`.id` referenced on tables that have a non-`id` PK or a compound PK) — both downstream of the same root: `id` is currently *not* auto-injected, only audit columns are.
224
+ `bearer`, `oauthProvider`, and `agentAuth` are now typed entries in both the array-form union and the `BetterAuthPlugins` interface, with their own options shapes (`OAuthProviderOptions`, `AgentAuthOptions`). Existing `as any` casts can come out.
199
225
 
200
- ### Account auth: emailOtp on AWS SES drops the magic-link companion (OTP-only)
226
+ Auto-enable rule: turning on `agentAuth` force-adds `bearer` + `oauthProvider`. No useful agent-auth deployment ships without those two.
201
227
 
202
- The compiler used to auto-wire `createComboAuthSendVerificationOTP` from `@quickback-dev/better-auth-combo-auth` whenever a project used `emailOtp` with the `aws-ses` email provider — sign-in / sign-up / verify emails carried *both* a 6-digit OTP and a clickable magic link, with `useComboAuthEmail: true` in the SES config. This was on by default for every account-app project that picked AWS SES.
228
+ ### `queue-consumer.ts` gating
203
229
 
204
- Two reasons to drop the magic-link half:
230
+ The queue consumer is emitted when any of the following are true: embeddings are configured, queue handlers exist under `services/queues/*`, or `additionalQueues` is declared. Previously the third case left projects with a wrangler binding pointing at a missing handler.
205
231
 
206
- 1. **Mail-client URL prefetching can burn the OTP before the human sees the email.** Outlook Safe Links, Gmail mobile, corporate proxies, and security scanners all eagerly fetch URLs in incoming mail; the magic link's `?data=...` payload includes the OTP server-side, so the first GET completes the sign-in (consuming the one-time code) and the user clicking through 30 seconds later gets a "code already used" failure.
207
- 2. **Two sign-in surfaces are harder to support.** The account SPA's `/welcome` and `/email-otp` routes only render the OTP form; the magic-link arm bypasses that UI entirely. One canonical entry point (enter the code) keeps the account flow legible.
232
+ ---
208
233
 
209
- The compiler now emits a plain `sendVerificationOTP` callback that calls `sendEmailWithSES` with `emailTemplates.emailOTP` directly — no combo wrapper, no magic-link URL. `useComboAuthEmail` is hardcoded to `false`. The `@quickback-dev/better-auth-combo-auth` package and the `magicLink` plugin are still available for users who explicitly opt in via a custom `sendVerificationOTP` in their config; the change here is just the auto-wired default.
234
+ ## v0.15.0 — May 7, 2026
210
235
 
211
- Test coverage: `auth-email-wiring.test.ts` was updated to assert the new shape — generated auth files for `emailOtp + aws-ses` now contain `emailTemplates.emailOTP` and `useComboAuthEmail: false`, and explicitly do not contain `createComboAuthSendVerificationOTP` or `better-auth-combo-auth`.
236
+ ### Sysadmin tier for the CMS
212
237
 
213
- ### Coming next — `id` field auto-injection (v0.14.8)
238
+ A new opt-in `cms: { sysadmin: true }` flag turns the CMS into a cross-tenant DB-admin tool gated by `user.role === 'sysadmin'`. Distinct from the Better Auth `'admin'` plugin role, so user-management powers and DB-admin powers stay decoupled. Off by default.
214
239
 
215
- The compiler treats `id` as load-bearing across CRUD/action route generators, FK probing, access checks, OpenAPI emission, and CMS — but doesn't add it for you the way it adds `createdAt`/`modifiedAt`/`createdBy`/`modifiedBy` (or `organizationId` in org-scoped features, or `deletedAt`/`deletedBy` for soft-delete tables). At the time of v0.14.7, tables that omitted `id` (or used a non-`id` single PK like `userId.primaryKey()`, or a compound `primaryKey({ columns: [...] })` constraint) were not yet supported by the generated route and OpenAPI pipeline.
240
+ When enabled, the compiler emits a `SYSADMIN` pseudo-role (a fifth marker alongside `PUBLIC` / `AUTHENTICATED` / `USER` / `ADMIN`), a firewall escape hatch that drops tenant scopes for sysadmins while preserving soft-delete, a true cross-tenant `/admin/v1/sysadmin/organizations` endpoint, and a relaxed cross-tenant guard for list routes.
216
241
 
217
- **Agreed direction:** mirror `injectAuditFields` with a new `injectIdField` that runs unconditionally — including on junction tables. Tables with no PK or a non-`id` PK get an `id` column auto-injected; existing column-level `.primaryKey()` on a non-`id` column gets demoted to `.notNull()`; `primaryKey({ columns: [...] })` constraints get rewritten to `uniqueIndex().on(...)`. The cost (one extra column per junction row) is minimal and closes the asymmetry — every table participating in routes gets a single string-typed `id`, just like every table gets `createdAt`. Migration tail (existing D1 databases need an ADD COLUMN + index rewrite per affected table) is generated alongside.
242
+ The CMS SPA gains a two-mode design: org admins keep the existing membership-based switcher, sysadmins get an "All organizations" selector that pins tenants via `?organizationId=` on every API call.
218
243
 
219
- No user code changes required for the four fixes shipping in v0.14.7. Recompile and the affected features typecheck.
244
+ ### Durable Object `[[migrations]]` order is preserved
220
245
 
221
- ---
246
+ Cloudflare's migration list is append-only. The compiler now reads your existing `wrangler.toml` (when present) and emits auto-generated DO `[[migrations]]` blocks in two phases: deployed entries first (preserving order), net-new entries appended last. Reordering DOs in the config array no longer reshuffles deployed migrations.
222
247
 
223
- ## v0.14.6 — May 7, 2026
248
+ ### `quickback/public/` — static-asset passthrough
224
249
 
225
- ### Four more v0.14 compiler bugs caught by AttendVIP's MCP rollout
250
+ Anything dropped under `quickback/public/` is copied verbatim into `src/apps/` on every compile and served by the wrangler `[assets]` binding. Use for favicons, `robots.txt`, OG images, `.well-known/` files, marketing PDFs — anything that needs to ride past the compiler as bytes.
226
251
 
227
- Filed in `research/attendvip-v014-mcp-and-firewall-gaps.md` after AttendVIP patched these locally and asked us to upstream them. All four ride a single MCP `tools/call` against a team-scoped resource over a Bearer api-key — fix any one and the next bug surfaces. We're shipping them as one patch release with end-to-end coverage of the chain.
252
+ - Optional. Missing folder is a no-op.
253
+ - Stale-cleaned. Files removed from `quickback/public/` disappear on the next compile.
254
+ - Hidden entries (`.DS_Store`, dotfiles) are skipped.
255
+ - Collisions with compiler-emitted manifest paths fail the compile loudly.
228
256
 
229
- **1. MCP `tools/call` URL is double-prefixed for action tools.** The OpenAPI spec emits action paths as `/api/v1/<action>` already-absolute, but the MCP request builder did `'/api/v1' + tool._path` unconditionally — so action tool calls hit `/api/v1/api/v1/<action>` and 404'd. CRUD tools (bare `_path: '/customers'`) were unaffected. Fix: prefix only when `_path` doesn't already start with `/api/v1/`.
257
+ ### Minor
230
258
 
231
- **2. Auth middleware ignored `Authorization: Bearer <api-key>`.** MCP clients (claude.ai, etc.) only set `Authorization: Bearer ...`. The api-key block read from `x-api-key` header / `?api_key=` / `?key=` query but not from `Authorization`; the JWT fast-path narrowly gated on `bearerToken.startsWith('eyJ')`. Non-JWT bearers fell through to BA session auth, which doesn't recognise api-keys, so the request authenticated as anonymous and `tools/list` returned only PUBLIC tools. Fix: api-key extraction now also accepts a non-JWT `Authorization: Bearer <token>` as the key candidate. Three transports for one credential — header / query / Bearer.
259
+ - Standalone-action wrapper skips the org gate when the access tree references any pseudo-role.
260
+ - Queue handler emit no longer drops the `queue` export when there are no embeddings.
232
261
 
233
- **3. `auth.roleHierarchy` was silently inert for runtime role checks.** A user configured `auth.roleHierarchy: ['owner', 'admin', 'member']` and expected an `owner` to satisfy any check requiring `admin` or `member`. But the api-key + JWT fast-paths populated `ctx.roles` with the single org-member role, and the access checker did strict intersection — `owner ∩ {admin, member} = ∅` → 403. Fix: at the api-key, JWT fast-path, AND BA session paths, expand the user's role via `auth.roleHierarchy` so a higher role inherits all lower-role privileges. The hierarchy is auto-normalized — users who write the array reversed (`['owner', 'admin', 'member']` instead of the documented `['member', 'admin', 'owner']`) now get the same correct expansion.
262
+ ---
234
263
 
235
- **4. Team-firewall predicate hardcoded `eq(table.teamId, ctx.activeTeamId!)` even when no team was active.** The `!` non-null assertion lied at runtime — api-keys, JWTs, and sessions without an active team carry `undefined`. The resulting SQL was `team_id = NULL` which matches nothing, so api-key callers saw zero rows on team-scoped resources. Fix: emit the team predicate as `(ctx.activeTeamId ? eq(...) : undefined)` — drizzle's `and(...)` drops `undefined`, so the WHERE collapses to the org scope only. Org and owner predicates are deliberately NOT softened the same way (those are security boundaries, not optional scopes).
264
+ ## v0.14.7 — May 7, 2026
236
265
 
237
- After upstreaming, the AttendVIP one-shot verification passes:
266
+ ### Codegen fixes for projects with non-`id` primary keys and DO-only features
238
267
 
239
- ```bash
240
- curl -fs -X POST https://attend.vip/mcp \
241
- -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
242
- -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"listEvents","arguments":{}}}' \
243
- | jq '.result.content[0].text | fromjson | .data | length' # > 0
244
- ```
268
+ Four surgical fixes to the generated output:
245
269
 
246
- No user code changes required for any of the four. Recompile and the MCP path works end-to-end against team-scoped, role-gated resources via Bearer api-key.
270
+ - Duplicate table imports in relationship-role routes are deduplicated.
271
+ - `db` references in single-record and bulk action handlers now resolve correctly during pre-fetch.
272
+ - PartyServer auth gates pass the in-scope `db` handle into firewall calls.
273
+ - Durable-object-only features keep their `lib/` files in the output.
247
274
 
248
- ---
275
+ ### `emailOtp` + AWS SES is OTP-only
249
276
 
250
- ## v0.14.5 — May 7, 2026
277
+ `auth.emailOtp` with the AWS SES email provider no longer auto-wires the magic-link companion. Mail-client URL prefetching can burn the one-time code before the human sees it; the Account SPA's `/email-otp` route is the single canonical entry point. Projects that explicitly want the magic-link arm can wire `sendVerificationOTP` directly.
278
+
279
+ ---
251
280
 
252
- ### MCP `tools/call` no longer crashes with `undefined (reading 'AUTH_DB')`
281
+ ## v0.14.6 — May 7, 2026
253
282
 
254
- The generated MCP server's `tools/call` dispatch re-enters the same Hono app via `app.request(internalReq)` so every tool invocation runs through the full middleware chain (auth, firewall, access, guards, masking). But the call passed only the request — not `env` or `executionCtx` — so the sub-request handler ran with `c.env === undefined`. Any tool whose route touched a Cloudflare binding (e.g. the `AUTH_DB` D1, KV, R2, Queues) crashed with `Cannot read properties of undefined (reading 'AUTH_DB')`. Found by AttendVIP — every action that hit auth-side data (acceptInvite, etc.) failed.
283
+ ### MCP transport correctness
255
284
 
256
- **Fix:** `mountMcp` now threads `c.env` and `c.executionCtx` through to `handle → handleRpc → callTool → app.request(internalReq, undefined, env, executionCtx)`. Hono's `request()` 3rd/4th args set the bindings + execution context for the sub-request, so the action handler sees the same env the outer worker received. Tools/list was unaffected — it reads ctx in-process and never re-enters the app.
285
+ Four fixes to the MCP-over-HTTP path:
257
286
 
258
- No user code changes required. Recompile against v0.14.5 and the MCP endpoint dispatches actions correctly against all bindings.
287
+ - `tools/call` URLs are no longer double-prefixed for action tools.
288
+ - Auth middleware accepts API keys via `Authorization: Bearer` in addition to `x-api-key` and query parameters — the channel MCP clients use exclusively.
289
+ - `auth.roleHierarchy` is expanded for runtime role checks across api-key, JWT, and session auth paths. A higher role inherits the privileges of every lower role.
290
+ - Team-scoped firewall predicates degrade gracefully when no team is active (org scoping continues to apply; team scoping is optional).
259
291
 
260
292
  ---
261
293
 
262
- ## v0.14.4 — May 7, 2026
294
+ ## v0.14.5 — May 7, 2026
263
295
 
264
- ### `via:` firewall predicates no longer crash with `ReferenceError: db is not defined`
296
+ ### MCP environment threading
265
297
 
266
- The relationship-role generator (v0.14.0) emits a `buildFirewallConditions` body that references `db`, `inArray`, and `sql` at function scope when any predicate has `via:` — but the resource-file imports it generated only pulled in `eq, and, isNull, type SQL`. So every endpoint guarded by `firewall: [{ field, via }]` threw `ReferenceError: db is not defined` at the very first request, and the catch-all returned 500 before the firewall query ever ran. Found by AttendVIP on `/api/v1/event-pages` against v0.14.3 — none of the v0.14.0 → v0.14.3 unit tests exercised emitted-import resolution, so the bug rode through three patch releases.
298
+ The generated MCP server's `tools/call` dispatch threads `env` and `executionCtx` into the inner request, so action tools that touch Cloudflare bindings (D1, KV, R2, Queues) no longer crash with `undefined` env access.
267
299
 
268
- Two fixes:
300
+ ---
269
301
 
270
- 1. **Imports in the generated resource file now include `inArray, sql`** when the firewall has any `via:` predicate. Hidden behind a flag so a no-via resource still gets the minimal import surface.
271
- 2. **`buildFirewallConditions` now takes `(ctx, db)`** and the wrapper template (`WITH_FIREWALL_HELPER`) pulls `const db = c.get('db' as never) as any;` from the Hono context before invoking it. Every CRUD/action call site (single-record + batch + record-based-action) was updated to pass `db` through.
302
+ ## v0.14.4 — May 7, 2026
272
303
 
273
- Regression test added (`firewall-via-imports.test.ts`) that parses the generated resource file's top-level imports and asserts every free identifier referenced in `buildFirewallConditions` resolves to either an import or a function parameter — so a future generator change that introduces a new free identifier (`exists`, `not`, etc.) without importing it fails the unit suite instead of leaking to a real project.
304
+ ### `via:` firewall predicates pull required imports
274
305
 
275
- No user code changes required — recompile and `via:` predicates work end-to-end.
306
+ The relationship-role generator emits `inArray` and `sql` imports when the firewall has any `via:` predicate, and `buildFirewallConditions` accepts `(ctx, db)` so the relationship subquery has a Drizzle client to evaluate against. Every CRUD and action call site passes `db` through automatically.
276
307
 
277
308
  ---
278
309
 
279
310
  ## v0.14.3 — May 7, 2026
280
311
 
281
- ### Relationship-role consumers now resolve the relationship-table binding at runtime
282
-
283
- Pre-fix, the v0.14.0 relationship-role generator emitted imports like `import { eventGuests, buildFirewallConditions as buildEventGuestsFirewallConditions } from '../event-guests/event-guests.resource'` on every consuming resource — but the relationship-table's own `.resource.ts` file imported `event_guests` from `./schema` for its own use without re-exporting it. So the consuming file got `undefined` at runtime, every relationship subquery failed with `Cannot read properties of undefined`, and the whole authz layer was unreachable on real projects.
284
-
285
- Found by AttendVIP within minutes of recompiling against v0.14.2: the moment they hit any endpoint guarded by `firewall: [{ field, via }]` or `crud.<op>.access roles: ['guest']`, the request errored before the firewall query ran.
312
+ ### Relationship-role table re-exports
286
313
 
287
- The fix is one line in `generateTableResourceHelpers` — re-export the Drizzle table binding from the `.resource` file alongside the existing import. The `.resource` file is the public surface of the table; the schema is an implementation detail. This decision was implicit in the relationship-import resolver's path choice but not enforced on the producer side.
288
-
289
- ```ts
290
- // generated <table>.resource.ts (after fix)
291
- import { event_guests } from './schema';
292
- export { event_guests }; // ← was missing
293
- ```
294
-
295
- Regression test added (`authz-end-to-end.test.ts`) that asserts every `.resource` file re-exports its Drizzle binding, so this can't drift again. No user code changes required — recompile and the cross-feature relationship subqueries resolve correctly.
314
+ Generated `<table>.resource.ts` files now re-export their Drizzle table binding. Cross-feature relationship subqueries that import the binding from the resource file (rather than the schema) resolve correctly.
296
315
 
297
316
  ---
298
317
 
299
318
  ## v0.14.2 — May 7, 2026
300
319
 
301
- ### Wrangler `[[migrations]]` no longer drops historical Durable Object lifecycle entries
302
-
303
- Cloudflare requires the `[[migrations]]` list in `wrangler.toml` to be **append-only**: once a tag has been deployed, removing it on a subsequent compile causes the next deploy to fail with `Cannot apply <new|deleted|renamed|transferred>-class migration to class <X>` — CF replays the full migrations log on every push and notices the tag is gone.
320
+ ### Historical DO `[[migrations]]` are preserved
304
321
 
305
- Pre-fix, the compiler regenerated the `[[migrations]]` blocks from scratch on every compile, emitting only entries for the *current* `durableObjects` bindings. Any historical lifecycle events the user had hand-maintained — `deleted_classes`, `renamed_classes`, `transferred_classes` — were silently dropped and the deploy then broke. AttendVIP hit this first: a `qb-do-deleted-legacy-notes-2026-05-05` deletion entry got dropped, and the next deploy tried to re-apply `qb-do-Notepad`'s `new_sqlite_classes` against the existing class.
306
-
307
- The fix adds a new config slot — `bindings.durableObjectMigrations` — for historical entries that survive recompiles. Declared entries are emitted FIRST in the generated `wrangler.toml`'s migrations list (preserving chronological order), then the auto-generated current-class creation entries follow, deduplicated by tag so an explicit user entry wins over the auto-emit.
322
+ A new `bindings.durableObjectMigrations` config slot carries forward `deleted_classes`, `renamed_classes`, and `transferred_classes` lifecycle entries across recompiles. Cloudflare's migration list is append-only; entries declared here are emitted first in `wrangler.toml`, then auto-generated current-class entries follow:
308
323
 
309
324
  ```ts
310
- // quickback.config.ts
311
325
  bindings: {
312
- durableObjects: [
313
- { name: 'NOTEPAD', className: 'Notepad', from: 'lib/Notepad' },
314
- ],
326
+ durableObjects: [{ name: 'NOTEPAD', className: 'Notepad', from: 'lib/Notepad' }],
315
327
  durableObjectMigrations: [
316
- // Carry forward across recompiles — Cloudflare's migration list is append-only.
317
- {
318
- tag: 'qb-do-deleted-legacy-notes-2026-05-05',
319
- deletedClasses: ['LegacyNotes'],
320
- },
328
+ { tag: 'qb-do-deleted-legacy-notes-2026-05-05', deletedClasses: ['LegacyNotes'] },
321
329
  ],
322
330
  }
323
331
  ```
324
332
 
325
- All four lifecycle shapes are supported: `newClasses` / `newSqliteClasses` (creations), `deletedClasses` (removals), `renamedClasses` (`{ from, to }` inline-table-array), `transferredClasses` (`{ from, from_script, to }` for moves between workers). The user-declared entry can also override the auto-emit by reusing the same tag — useful when a DO started life as KV-backed before SQLite-DOs existed.
326
-
327
- This is a config-side fix, not a wrangler.toml-merging one — Quickback doesn't read your existing `wrangler.toml`. The discipline is the same as for any append-only log: declare lifecycle events as you make them. Auto-detection of removed classes from the schema diff is on the roadmap; for now the compiler trusts your declaration.
328
-
329
- 7 new tests covering deletion, rename, transfer, multi-entry ordering, override-via-same-tag, no-history bit-identical output, and the historical-only-no-current-DOs edge case.
333
+ All four lifecycle shapes are supported. User-declared entries can override auto-emit by reusing the same tag.
330
334
 
331
335
  ---
332
336
 
333
337
  ## v0.14.1 — May 7, 2026
334
338
 
335
- ### Bulk action variants now appear in `openapi.json`
339
+ ### Bulk action variants in `openapi.json`
336
340
 
337
- Record-based actions with `bulkVariant: true` (introduced in v0.14.0) generate a working `POST /<base>/batch/<actionName>` route at runtime, but the OpenAPI generator wasn't aware of them — so the bulk endpoints were invisible to typed-client codegen (`api-types.gen.ts`) and to MCP-driven agents discovering operations from the spec. AttendVIP's v0.14.0 rollout (seven actions with `bulkVariant: true`: `approve`, `checkIn`, `checkOut`, `setVisibility`, `cancelInvite`, `sendInvite`, `sessionApprove`) found this within hours of shipping.
341
+ Record-based actions with `bulkVariant: true` are now emitted as sibling operations in the OpenAPI spec, with the documented `{ ids, input, failFast? }` request shape, 200/207/400 responses, and a separate `<Resource><Action>Bulk` `operationId` so typed-client codegen distinguishes single from bulk.
338
342
 
339
- The OpenAPI generator now emits each bulk variant as a sibling operation to its per-record action, with the documented request shape (`{ ids: string[], input, failFast? }`), correct 200 / 207 / 400 responses, an `x-bulk-variant: true` marker, and a separate `<resource><Action>Bulk` `operationId` so client codegen can distinguish single from bulk. The fix also threads `bulkVariant` through `getAllActions` so any other downstream consumer of the action registry sees the flag — previously the parser captured it but the spec-emit path silently dropped it.
343
+ ### Cross-tenant "my events" patterns
340
344
 
341
- No changes required in user code. Re-running `quickback compile` regenerates `openapi.json` with both routes per `bulkVariant: true` action; downstream `api-types.gen.ts` builds pick up the new operations on the next codegen run.
342
-
343
- ### Cross-tenant "my events" pattern documented with a worked example
344
-
345
- The v0.14.0 docs noted that relationship-roles do **not** solve cross-tenant aggregation ("a guest's view of events across all tenants they were invited to") and pointed at function-form access as the workaround, but didn't show what that looked like in practice. The access docs now carry a full standalone-action example for `GET /my-events` — the canonical attendee-dashboard pattern — including the two security guardrails (always filter by `ctx.userId`; the action takes responsibility for soft-delete and other invariants the firewall would otherwise apply). Standalone actions are already mandatorily audit-logged in the runtime, so the cross-tenant traversal is recorded automatically.
346
-
347
- See [Access → Cross-tenant "my events" dashboards](/compiler/definitions/access#cross-tenant-my-events-dashboards-are-not-this).
345
+ The access docs now include a worked example for the cross-tenant aggregation pattern (e.g. `GET /my-events` returning resources across all tenants a caller is invited to). See [Access → Cross-tenant dashboards](/compiler/definitions/access#cross-tenant-my-events-dashboards-are-not-this).
348
346
 
349
347
  ---
350
348
 
351
349
  ## v0.14.0 — May 7, 2026
352
350
 
353
- ### Relationship-based authorization roles
351
+ ### Relationship-based authorization
354
352
 
355
- Quickback's role system now supports a third kind of role beyond Better Auth org membership and the four pseudo-roles (`PUBLIC`/`AUTHENTICATED`/`USER`/`ADMIN`): **relationship-roles** that bind to a domain-table membership ("user is a confirmed guest of this event") rather than an org/admin gate. The original ask was a B2B event-management app where logged-in users who aren't team members but ARE confirmed guests of an event need to see that event's sessions, pages, and tracks — same data, different access lane. The old workarounds (function-form access, hand-written actions, `firewall: { exception: true }`) all gave up some combination of OpenAPI/MCP visibility, CRUD code generation, or tenant safety.
356
-
357
- Declare the relationship once in `quickback.config.ts`, then reference it from `firewall:` or `access.roles:`:
353
+ Roles can now be bound to a domain-table membership ("user is a confirmed guest of this event") rather than an org membership or a pseudo-role. Declare the relationship once and reference it from `firewall:` or `access.roles:`:
358
354
 
359
355
  ```ts
360
- // quickback.config.ts
361
356
  authz: {
362
357
  relationships: {
363
358
  guestOf: {
364
- from: 'event_guests', // relationship table
365
- subject: { column: 'userId', equals: 'ctx.userId' }, // caller side
366
- resource: { column: 'eventId' }, // resource side
367
- where: { status: 'confirmed' }, // optional row filter
359
+ from: 'event_guests',
360
+ subject: { column: 'userId', equals: 'ctx.userId' },
361
+ resource: { column: 'eventId' },
362
+ where: { status: 'confirmed' },
368
363
  },
369
364
  },
370
365
  roles: {
371
366
  guest: { via: 'guestOf' },
372
- eventStaff: {
373
- or: [{ via: 'guestOf' }, { roles: ['admin', 'owner'] }],
374
- },
367
+ eventStaff: { or: [{ via: 'guestOf' }, { roles: ['admin', 'owner'] }] },
375
368
  },
376
369
  }
377
370
 
378
371
  // features/sessions/sessions.ts
379
372
  firewall: [
380
373
  { field: 'organizationId', equals: 'ctx.activeOrgId' },
381
- { field: 'eventId', via: 'guestOf' }, // ← row scoping
374
+ { field: 'eventId', via: 'guestOf' },
382
375
  ],
383
- read: { access: { roles: ['admin', 'member', 'guest'] } }, // ← OR-composed
384
- crud: {
385
- create: { access: { roles: ['admin', 'guest'] } }, // inline async lookup
386
- update: { access: { roles: ['admin'] } },
387
- }
376
+ read: { access: { roles: ['admin', 'member', 'guest'] } },
377
+ create: { access: { roles: ['admin', 'guest'] } },
378
+ update: { access: { roles: ['admin'] } },
388
379
  ```
389
380
 
390
- The compiler emits an inline Drizzle subquery against the relationship table and AND-composes it as the outermost firewall clause. The relationship table's own `buildFirewallConditions(ctx)` is called inside the subquery so soft-delete and tenant scope on the relationship row are always honored — soft-deleting an `event_guests` row revokes access immediately. Anonymous callers fail closed (the subquery short-circuits to `WHERE 1 = 0` when `ctx.userId` is null). Cross-tenant grants are impossible because the resource's tenant filter sits as the outermost AND, never folded into a role OR. See [Firewall → Relationship-based scoping](/compiler/definitions/firewall#relationship-based-scoping-via) and [Access → Relationship-based authorization](/compiler/definitions/access#relationship-based-authorization).
391
-
392
- What works in v0.14.0:
393
-
394
- | Surface | Status |
395
- |---|---|
396
- | `firewall: [{ field, via }]` row-level scoping | Full |
397
- | `crud.<op>.access` `roles: ['guest']` (inline emission) | Full |
398
- | `read.access` and `read.views.*.access` | Full |
399
- | `masking.<f>.show` `roles: ['guest']` | Compile-refused (workaround pointer) |
400
- | `actions.<n>.access` `roles: ['guest']` | Compile-refused (workaround pointer) |
401
-
402
- The runtime evaluator fails closed on relationship arms regardless of which surface you hit, so silent grants are impossible everywhere. The two refused surfaces have clear compile-time errors pointing to the working pattern (gate the row at the firewall layer with `via:`, gate the role at the access layer with BA roles).
381
+ The compiler emits an inline Drizzle subquery against the relationship table and AND-composes it as the outermost firewall clause. The relationship table's own firewall (tenant scope, soft-delete) is honored inside the subquery; cross-tenant grants are impossible because the resource's tenant filter sits outermost.
403
382
 
404
- Compile-time refusals also catch: unknown `via:` reference, cycles in role composition (`a → b → a`), reserved role-name shadowing (auth-provider-derived only — `guest`/`speaker`/`attendee` are free; `admin`/`owner`/`member` are reserved when the BA org plugin is on), unknown relationship `from` table, resource missing the `resource.column`, relationship table with `firewall: { exception: true }` (would let cross-tenant grants slip through), `lowering: 'session'` (reserved for v2 — staleness/invalidation ergonomics not yet shipped), and `+` hierarchy on relationship-roles (terminal, like pseudo-roles).
383
+ Supported surfaces: row-level scoping via `firewall: [{ field, via }]`, role gates on writes and reads, view access. Masking and action access reject relationship-roles at compile time with pointers to the working pattern (gate the row at the firewall layer, gate the role at the access layer).
405
384
 
406
- Cross-tenant "my events" dashboards (a logged-in user wants `GET /my-events` returning events they're a guest of *across all tenants*) are **not** solved by relationship-roles — the tenant firewall stays the outermost AND. For that pattern, use a user-scoped firewall (`firewall: { owner: { column: 'userId' } }`) or function-form access on a dedicated route. Documented prominently in [access.mdx](/compiler/definitions/access#cross-tenant-my-events-dashboards-are-not-this) so users don't reach for relationship-roles first and get confused.
385
+ Cross-tenant aggregation dashboards aren't solved by relationship-roles — the tenant firewall remains the outermost AND. For that pattern, use a user-scoped firewall or function-form access on a dedicated route.
407
386
 
408
- Roadmap: `lowering: 'session'` ergonomics, inline relationship emission for `actions.access` (needs `relationshipBindings` design), async/batched mask functions for `masking.show`. The schema slots are reserved so v2 lands non-breaking.
387
+ See [Firewall → Relationship-based scoping](/compiler/definitions/firewall#relationship-based-scoping-via) and [Access → Relationship-based authorization](/compiler/definitions/access#relationship-based-authorization).
409
388
 
410
- ### Bulk variants of record-based actions
389
+ ### Bulk variants on record-based actions
411
390
 
412
- Record-based actions can now opt into an auto-generated bulk route alongside the per-record route. Set `bulkVariant: true` on a `defineAction({...})` and the compiler emits `POST /:resource/batch/{action}` that loops the same access + transition + execute pipeline over a `{ ids: [...], input, failFast? }` body. The original ask was an event-management UX where every domain bulk operation (approve N guests, rescind N invites, advance N applications) became a hand-written standalone action that re-implemented a per-record action's transition + execute logic in a `for` loop — `PATCH /:resource/batch` couldn't do it because state lives on a protected field, which is the right call for safety.
391
+ `defineAction({ bulkVariant: true })` emits `POST /:resource/batch/{action}` alongside the per-record route. The bulk handler loops the same access + transition + execute pipeline over a `{ ids, input, failFast? }` body:
413
392
 
414
393
  ```ts
415
- // features/applications/actions/advance.ts
416
394
  export default defineAction({
417
395
  description: "Move an application forward in the pipeline.",
418
396
  input: z.object({ nextStatus: z.enum(["screening", "interview", "offer"]) }),
419
397
  access: { roles: ["owner", "admin"] },
420
- bulkVariant: true, // ← opt-in
398
+ bulkVariant: true,
421
399
  transition: { field: "status", via: "nextStatus", fromTo: { /* ... */ } },
422
400
  async execute({ db, record, input, whereTransition }) {
423
- // exact same body as before — runs once per id
401
+ // exact same body — runs once per id
424
402
  },
425
403
  });
426
404
  ```
427
405
 
428
- Per-record outcomes return as 207 Multi-Status with the same `{ success, errors, meta }` shape as `PATCH /batch`. Each id flows through the firewall fetch, the per-record `evaluateAccessReason` split (403 role / 409 record-precondition), the transition pre-check, and the same `whereTransition` factory the single-record route uses — so a stale-state record fails for that id alone, not the whole batch. `failFast: true` aborts on the first failure and (on Postgres / Supabase / Neon / libsql / sqlite drivers) wraps the loop in `db.transaction()` so prior writes roll back; D1 is documented as fail-fast-without-rollback because it has no `db.transaction`.
429
-
430
- Compile-time refusals: `bulkVariant: true` is rejected on standalone actions (no record context to loop over) and on actions that declare `unsafe` (cross-tenant per-record audit not yet wired). Method is forced to POST regardless of the action's `method` setting — the one-row-to-many-rows asymmetry makes inheriting GET/DELETE confusing. Max batch size is 100 ids per request, mirroring the CRUD batch endpoints. See [Actions → Bulk variant](/compiler/definitions/actions#bulk-variant).
406
+ Per-record outcomes return as 207 Multi-Status. `failFast: true` aborts on the first failure and wraps the loop in `db.transaction()` on tx-supporting providers; D1 fails fast without rollback. Max 100 IDs per request. Rejected on standalone actions and `unsafe` actions.
431
407
 
432
408
  ### Aggregations on read views
433
409
 
434
- Read views can now declare pre-computed metrics that surface on the response next to the row payload, without a custom standalone action. Every dashboard tile that previously turned into a standalone action just for "count of X grouped by Y" now lives in the same view config that drives the rows.
410
+ Read views can declare pre-computed metrics that surface alongside the row payload:
435
411
 
436
412
  ```ts
437
413
  read: {
@@ -447,51 +423,29 @@ read: {
447
423
  }
448
424
  ```
449
425
 
450
- Response carries `aggregations: { ... }` alongside `data`:
451
-
452
- ```json
453
- {
454
- "data": [/* paginated rows */],
455
- "view": "pipeline",
456
- "pagination": { "count": 50, "page": 1, "pageSize": 50, "hasMore": true },
457
- "aggregations": {
458
- "totalApplications": 173,
459
- "byStatus": { "applied": 102, "screening": 41, "interview": 18, "offer": 7, "rejected": 5 }
460
- }
461
- }
462
- ```
463
-
464
- Aggregations always run over the **same firewalled, filtered set** as the row query — pagination is intentionally ignored, so `?status=applied&limit=10` returns the 10 paged rows AND the count over every applied row. Supported `fn`s: `sum`, `avg`, `min`, `max`, `count` (with or without `field` — `COUNT(*)` vs `COUNT(field)`), `count_distinct`, and `groupBy` (returns `{ value: count }`, NULLs bucket as `"(none)"`).
465
-
466
- Compile-time validation: `field` must reference a real column; `sum`/`avg` require numeric column types; the same masking opt-out gate that governs `query.{filterable, sortable, searchable}` applies to aggregations (a `sum(salary)` leaks structure even when the row payload is redacted); aggregation names cannot collide with the reserved response fields `data`, `pagination`, `view`. No raw SQL `expr:` form in v1 — column references only. See [Views → Aggregations](/compiler/definitions/views#aggregations).
426
+ Aggregations run over the same firewalled, filtered set as the row query; pagination is intentionally ignored. Supported functions: `sum`, `avg`, `min`, `max`, `count`, `count_distinct`, `groupBy`. See [Views → Aggregations](/compiler/definitions/views#aggregations).
467
427
 
468
428
  ---
469
429
 
470
430
  ## v0.13.5 — May 6, 2026
471
431
 
472
- ### Object-form `auth.plugins` no longer crashes the compiler
473
-
474
- The documented object form for per-plugin config — `plugins: { oauthProvider: {...} }`, `plugins: { organization: { teams: { enabled: true } } }`, etc. (see [Better Auth Plugins → Custom configuration](/stack/auth/plugins#oauth-provider-mcp-ready)) — was rejected by the compiler with `plugins.includes is not a function`. `hasCliAuthRoutes` called `.includes()` directly on `auth.config.plugins` to detect `deviceAuthorization`, and `generateAuthFiles` flattened plugins to a string array before handing them to the better-auth generator, silently dropping every per-plugin user option on the way through.
475
-
476
- Both paths now run through a shared resolver that preserves the user's input format (object in → object out, array in → array out) and only adds the compiler's auto-included plugins (`organization`, `admin`, `apiKey`, plus `bearer` when `deviceAuthorization` is present) as `true` entries that don't clobber user config. Per-plugin options like `oauthProvider: { scopes: [...] }`, `organization: { teams: { enabled: true } }`, and `deviceAuthorization: { verificationUri: '...' }` now reach the generated `auth.ts` as written.
432
+ ### Object-form `auth.plugins` config is honored
477
433
 
478
- Better Auth's `ac` / `roles` access-control objects (the result of `createAccessControl(...)`) still require a custom `auth.ts` override — they're live runtime values that can't survive the JSON config trip from CLI → compiler. A declarative escape hatch for that is on the roadmap.
434
+ The documented `plugins: { oauthProvider: {...} }`, `plugins: { organization: { teams: { enabled: true } } }` shapes now flow through the compiler unchanged. Per-plugin options reach the generated `auth.ts` as written.
479
435
 
480
- ### `roles: ["PUBLIC"]` is allowed on writes and actions again
436
+ ### `roles: ["PUBLIC"]` allowed on writes and actions
481
437
 
482
- v0.10.17 added a compile-time block that rejected `roles: ["PUBLIC"]` on `crud.create` / `crud.update` / `crud.delete` and on every action. The intent — "anonymous mutations are usually a misconfiguration" — collided with the legitimate use cases the rest of Quickback was built around: Gmail one-click RSVP confirms, public RSVP forms, magic-link redemption, List-Unsubscribe-Post handlers, webhook ingest, captcha-gated contact forms. None of those carry a session, so `AUTHENTICATED` 401s the caller before the handler can validate its own token, and the suggested escape hatch ("custom action that does its own auth + `firewall: { exception: true }`") was itself blocked by the same validator.
438
+ `PUBLIC` is the explicit, uppercase opt-in for unauthenticated access on every access node — reads, writes, views, and actions. The runtime trusts the marker; row-level safety comes from firewall, masking, and the action's own validation. `PUBLIC` actions continue to receive mandatory audit logging.
483
439
 
484
- The block is removed. `PUBLIC` is the explicit, uppercase opt-in for unauthenticated access on every access node — reads, CRUD writes, views, and actions. The compiler trusts the marker; row-level safety comes from firewall, masking, and the action's own token validation. `PUBLIC` actions continue to receive **mandatory audit logging** (IP, input, result, timing) in the runtime regardless. `crud.create`/`update`/`delete` typically pair `roles: ["PUBLIC"]` with `firewall: { exception: true }` on the resource so the row predicate doesn't reject every unauthenticated caller.
485
-
486
- `USER` and `ADMIN` keep their compile-time prerequisites (firewall must scope by `userId` / admin plugin must be enabled).
440
+ Common pattern: pair `roles: ["PUBLIC"]` with `firewall: { exception: true }` on the resource so the row predicate doesn't reject every unauthenticated caller.
487
441
 
488
442
  ---
489
443
 
490
444
  ## v0.12.0 — May 5, 2026
491
445
 
492
- ### Per-room authorization for PartyServer rooms
446
+ ### Per-room authorization for PartyServer
493
447
 
494
- `bindings.durableObjects[].access` lets the compiler emit a path-scoped gate that runs the declared resource's existing firewall + `read.access` pipeline before the WebSocket upgrade — same pillars `GET /api/v1/<resource>/:id` enforces, zero hand-written auth code.
448
+ `bindings.durableObjects[].access` declares a path-scoped gate that runs the declared resource's firewall and `read.access` pipeline before the WebSocket upgrade:
495
449
 
496
450
  ```ts
497
451
  durableObjects: [
@@ -510,119 +464,70 @@ durableObjects: [
510
464
  },
511
465
  } },
512
466
 
513
- // Anonymous game lobbies / public pads: explicit opt-out.
467
+ // Anonymous lobbies / public pads: explicit opt-out.
514
468
  { name: 'PublicLobby', className: 'PublicLobby', from: 'lib/PublicLobby',
515
469
  access: 'public' },
516
- ],
470
+ ]
517
471
  ```
518
472
 
519
- The gate 401s unauthenticated callers, 403s when the firewall hides the row, 404s when the row is missing, and lets the upgrade proceed otherwise. DOs without an `access` declaration keep the v0.11.1 catchall (just `ctx.authenticated`). Resource references are validated against feature names at compile time so typos break the build, not the first WebSocket upgrade. See [PartyServer Rooms → Per-room authorization via access](/stack/realtime/partyserver-rooms#per-room-authorization-via-access-v012).
473
+ The gate 401s unauthenticated callers, 403s when the firewall hides the row, 404s when the row is missing. Resource references are validated against feature names at compile time. See [PartyServer Rooms → Per-room authorization](/stack/realtime/partyserver-rooms#per-room-authorization-via-access-v012).
520
474
 
521
475
  ---
522
476
 
523
477
  ## v0.11.1 — May 5, 2026
524
478
 
525
- ### PartyServer auto-mount is now secure by default
526
-
527
- The `/realtime/*` auto-mount shipped in v0.11.0 didn't gate WebSocket upgrades — anyone who knew a room ID (CUID2, hard to guess but not a security boundary) could open a connection. `authMiddleware` populated the request context but `partyserverMiddleware` doesn't 401 anonymous upgrades on its own.
528
-
529
- The auto-mount now wraps `partyserverMiddleware` in an auth check: `401 Unauthorized` if the caller has no resolved auth context, otherwise the upgrade proceeds. The four auth mechanisms the rest of the worker honors (session cookie, JWT bearer, `x-api-key` header, `?api_key=` / `?key=` query) all unlock connections automatically.
479
+ ### PartyServer auto-mount is secure by default
530
480
 
531
- Per-room access (e.g., "is this user a member of the org that owns this room?") is still your `Server` class's responsibility in `onConnect` — the auto-mount only enforces "are you authenticated at all." Hand-written mounts with custom `onBeforeConnect` continue to work unchanged; declare them at `/realtime/*` before the auto-mount runs to opt out of the default gate.
532
-
533
- No code changes required — `quickback compile` regenerates the gated mount automatically. Single-tenant alphas weren't exploitable in practice (room IDs aren't logged or surfaced); multi-tenant projects should redeploy to pick this up.
481
+ The `/realtime/*` auto-mount now wraps `partyserverMiddleware` in an auth check. Unauthenticated upgrades return 401; the four auth mechanisms (session cookie, JWT bearer, `x-api-key` header, query parameter) all unlock connections. Per-room access remains the `Server` class's responsibility in `onConnect`.
534
482
 
535
483
  ---
536
484
 
537
485
  ## v0.11.0 — May 5, 2026
538
486
 
539
- ### OAuth Provider plugin (MCP-ready)
540
-
541
- Quickback can now act as a standards-compliant OAuth 2.1 + OIDC authorization server via [`@better-auth/oauth-provider`](https://better-auth.com/docs/plugins/oauth-provider). Enable it with `plugins: ["oauthProvider"]` in your auth config — the compiler auto-includes Better Auth's `jwt` plugin (the OAuth provider delegates access-token signing to it) and the Account SPA gains a `/consent` page for the standard authorization-code flow.
542
-
543
- This replaces Better Auth's deprecated `mcp` plugin and gives every future MCP client (Cursor, Claude Desktop, claude.ai connectors, custom tooling) RFC 7591 dynamic client registration + the well-known discovery documents they need to bootstrap themselves. See [Auth Plugins → OAuth Provider](/stack/auth/plugins#oauth-provider-mcp-ready).
487
+ ### OAuth Provider (MCP-ready)
544
488
 
545
- ### API key auth via query parameter
489
+ Quickback can act as a standards-compliant OAuth 2.1 + OIDC authorization server via [`@better-auth/oauth-provider`](https://better-auth.com/docs/plugins/oauth-provider). Enable with `plugins: ["oauthProvider"]`. The compiler auto-includes Better Auth's `jwt` plugin and the Account SPA gains a `/consent` page for the standard authorization-code flow.
546
490
 
547
- The auth middleware now accepts API keys as `?api_key=...` or `?key=...` query parameters in addition to the `x-api-key` header. The header takes precedence when both are sent. This unblocks clients that can't inject custom headers — most notably claude.ai's MCP connector, which previously returned zero tools because every list/call attempt was unauthenticated.
491
+ This replaces Better Auth's deprecated `mcp` plugin and gives every MCP client (Cursor, Claude Desktop, claude.ai connectors, custom tooling) RFC 7591 dynamic client registration plus the discovery documents they need to bootstrap. See [Auth Plugins → OAuth Provider](/stack/auth/plugins#oauth-provider-mcp-ready).
548
492
 
549
- The query-param form lands in access logs and `Referer` headers; prefer the header whenever the client supports it. See [Auth Plugins → API Keys](/stack/auth/plugins#api-keys).
493
+ ### API keys via query parameter
550
494
 
551
- ### PartyServer rooms + realtime URL split (breaking)
495
+ The auth middleware now accepts API keys as `?api_key=…` or `?key=…` query parameters. The `x-api-key` header takes precedence when both are sent. Prefer the header whenever the client supports it — query parameters land in access logs and `Referer` headers.
552
496
 
553
- The realtime URL space is reorganized so the names match what each primitive does:
497
+ ### PartyServer rooms + realtime URL split
554
498
 
555
- - **`/realtime/v1/*` → `/broadcast/v1/*`** — the existing org-wide Broadcaster (Postgres-changes fan-out, ws-ticket auth) moves to its semantically accurate prefix. Same code, same behavior, just a different mount point.
556
- - **`/realtime/<binding>/<room-id>` is the new mount for [PartyServer](/stack/realtime/partyserver-rooms) rooms** — bidirectional, per-room (per-document) Durable Objects with presence and lifecycle hooks. Auto-mounted via `hono-party` whenever a project declares any in-worker DO via `bindings.durableObjects[].from`. Use these for collaborative editing, live cursors, and per-room state.
499
+ The realtime URL space is reorganized so names match what each primitive does:
557
500
 
558
- **Breaking changes** — recompile + redeploy required:
501
+ - **`/realtime/v1/*` → `/broadcast/v1/*`** — the org-wide Broadcaster moves to its semantically accurate prefix.
502
+ - **`/realtime/<binding>/<room-id>`** — new mount for [PartyServer](/stack/realtime/partyserver-rooms) rooms. Per-room Durable Objects with presence and lifecycle hooks. Auto-mounted whenever a project declares any in-worker DO.
559
503
 
560
- - The `REALTIME_URL` runtime env var is renamed to `BROADCAST_URL` (used by the org member-update broadcast hook in separate-mode realtime). If you set this via `wrangler secret put REALTIME_URL`, re-set it as `BROADCAST_URL`.
561
- - The auth-ui SPA helpers `getRealtimeWsUrl()` / `getRealtimeTicketUrl()` are renamed to `getBroadcastWsUrl()` / `getBroadcastTicketUrl()`. The `appConfig.routes.api.realtime` field is renamed to `appConfig.routes.api.broadcast`.
562
- - WebSocket subscribers that hardcoded `/realtime/v1/websocket` or `/realtime/v1/ws-ticket` need to be updated to `/broadcast/v1/...`. The bundled CMS and Account SPAs handle this automatically; custom clients need a one-line change.
504
+ **Breaking** — recompile + redeploy required:
563
505
 
564
- **Pre-installed deps in the compiler image:** `partyserver`, `partysocket`, and `hono-party` are now cached in `/deps/node_modules` so opt-in collab projects compile without an extra `npm install` step. `Y-PartyServer` (Yjs CRDT support) stays opt-in.
506
+ - `REALTIME_URL` env var renamed to `BROADCAST_URL`.
507
+ - SPA helpers `getRealtimeWsUrl()` / `getRealtimeTicketUrl()` renamed to `getBroadcastWsUrl()` / `getBroadcastTicketUrl()`.
508
+ - `appConfig.routes.api.realtime` renamed to `appConfig.routes.api.broadcast`.
565
509
 
566
- **Recipe:** see the new [PartyServer Rooms](/stack/realtime/partyserver-rooms) doc page and the `examples/recruitment` interview-room demo for an end-to-end example with presence and live notes.
510
+ `partyserver`, `partysocket`, and `hono-party` are pre-installed in the compiler image; collab projects compile without an extra `npm install` step.
567
511
 
568
512
  ---
569
513
 
570
514
  ## v0.10.20 — May 4, 2026
571
515
 
572
- ### In-worker Durable Objects via `bindings.durableObjects[].from`
516
+ ### In-worker Durable Objects
573
517
 
574
- `bindings.durableObjects` previously only emitted the binding declaration — useful for cross-worker DOs (`scriptName: "other-worker"`), but not enough for app-owned classes that live in this worker's source. Authors had to hand-edit `src/index.ts` (to add `export { ItemStream } from './...'`) and `wrangler.toml` (to add the `[[migrations]]` block) on every compile.
575
-
576
- Adding `from` flips the entry into in-worker mode and the compiler does both:
518
+ `bindings.durableObjects[].from` flips a DO binding into in-worker mode and emits the export, the `[[migrations]]` block, and the `CloudflareBindings` type all together:
577
519
 
578
520
  ```ts
579
- durableObjects: [
580
- {
581
- name: "ITEM_STREAM",
582
- className: "ItemStream",
583
- from: "features/loops/lib/ItemStream", // module path under src/
584
- },
585
- ]
586
- ```
587
-
588
- Generates:
589
- - `src/index.ts`: `export { ItemStream } from './features/loops/lib/ItemStream';` — wrangler resolves the binding by class export.
590
- - `wrangler.toml`: a `[[migrations]]` block with `tag = "qb-do-ItemStream"` and `new_sqlite_classes = ["ItemStream"]`.
591
- - `CloudflareBindings`: `ITEM_STREAM: DurableObjectNamespace` so `c.env.ITEM_STREAM.idFromName(...)` typechecks.
592
-
593
- Where the class file lives: in-worker DO classes go under `quickback/lib/` or `quickback/features/<feature>/lib/` — both copy verbatim into the generated `src/` tree on every compile (the rest of `src/` is wiped). The `from` value is the resulting `src/`-relative path with no `./` prefix and no `.ts` suffix.
594
-
595
- `from` and `scriptName` are mutually exclusive — the compiler rejects entries that set both. Cross-worker entries (`scriptName` set) skip the re-export and the migration block; the exporting worker owns its own migration table.
596
-
597
- `migrationTag` (default `qb-do-${className}`) is stable across regenerations and **must never be removed or renamed once deployed** — wrangler tracks applied tags and will reject deploys that try to walk them back. `useSqlite` defaults to `true`; set to `false` for legacy KV-backed DOs.
598
-
599
- See [Bindings → Durable Objects](/compiler/config/bindings#durableobjects) for the full reference.
600
-
601
- ---
602
-
603
- ## v0.10.19 — May 4, 2026
604
-
605
- ### Fix: bundled-SPA auth survives `wrangler dev` on custom_domain projects
606
-
607
- `wrangler dev` rewrites the configured `custom_domain` host in **every** response header value (Location, Content-Security-Policy, X-…) to the local hostname, with a case-sensitive substring matcher. That mangles the CSP `connect-src` for projects with `domain: "api.example.com"` + bundled CMS / Account SPAs:
608
-
609
- ```
610
- # Compiled (correct)
611
- connect-src 'self' https://api.example.com …
612
-
613
- # Served by wrangler dev (mangled)
614
- connect-src 'self' https://localhost:8787 …
521
+ durableObjects: [{
522
+ name: "ITEM_STREAM",
523
+ className: "ItemStream",
524
+ from: "features/loops/lib/ItemStream",
525
+ }]
615
526
  ```
616
527
 
617
- Result: the bundled SPA's hardcoded `VITE_QUICKBACK_API_URL` fetches get blocked in dev because the CSP only allows localhost. Reported by Loop on the 0.10.18 thread; verified end-to-end with a minimal `wrangler@4.85.0 dev --local` repro.
618
-
619
- The compiler now emits the SPA-baked-origin literal in `connect-src` with the host's first letter capitalised (`https://Api.example.com`). CSP host-source matching is ASCII case-insensitive per CSP3, so browsers accept it for connections to `https://api.example.com`; wrangler's case-sensitive matcher misses it. The case-shift is applied at compile time and only to URLs whose host matches the configured `custom_domain` — other origins (localhost, third-party hosts) are unchanged.
620
-
621
- `TRUSTED_ORIGINS` keeps its lowercase prod entries: it's consumed by the CORS `isTrustedOrigin` check via `Array.includes()` against the browser-supplied Origin header (always lowercase). The CSP fix only needs to land on the SPA-baked literal — that's the entry the SPA's hardcoded fetch needs covered.
622
-
623
- If wrangler ships a fix for the response-header rewrite, the case-shifted source remains a valid CSP entry that browsers match identically — no follow-up needed in user code.
528
+ DO class files live under `quickback/lib/` or `quickback/features/<feature>/lib/` — both copy verbatim into the generated `src/` tree on every compile. `from` and `scriptName` are mutually exclusive; cross-worker DOs (`scriptName` set) skip the re-export and migration block.
624
529
 
625
- **Action required:** none. Recompile (`quickback compile`) to pick up the fix.
530
+ `migrationTag` (default `qb-do-${className}`) is stable across regenerations and must never be removed or renamed once deployed. `useSqlite` defaults to `true`. See [Bindings → Durable Objects](/compiler/config/bindings#durableobjects).
626
531
 
627
532
  ---
628
533
 
@@ -630,93 +535,45 @@ If wrangler ships a fix for the response-header rewrite, the case-shifted source
630
535
 
631
536
  ### `experimentalRemote` — share deployed D1 with `wrangler dev`
632
537
 
633
- Per-binding `experimental_remote = true` flag emitted into the generated `wrangler.toml`. Useful for "share prod auth in dev, keep feature writes sandboxed":
538
+ Per-binding `experimental_remote = true` lets `wrangler dev` read/write deployed D1 for selected bindings:
634
539
 
635
540
  ```ts
636
541
  providers: {
637
542
  database: defineDatabase("cloudflare-d1", {
638
543
  splitDatabases: true,
639
- experimentalRemote: {
640
- auth: true, // wrangler dev reads/writes deployed AUTH_DB
641
- features: false, // (default) features stays local
642
- audit: false,
643
- webhooks: false,
644
- files: false,
645
- },
544
+ experimentalRemote: { auth: true, features: false },
646
545
  }),
647
546
  }
648
547
  ```
649
548
 
650
- Keys are logical binding names — `auth` flips the flag on the `AUTH_DB` binding, `features` flips it on `DB` (or the legacy single-DB binding), `audit` / `webhooks` / `files` follow the same pattern. Off by default; only enable for databases you intend to share.
549
+ Useful for "share prod auth in dev, keep feature writes sandboxed." Off by default.
651
550
 
652
551
  ### Google OAuth + signup ToS
653
552
 
654
- The Account SPA now wires Google OAuth end-to-end when `auth.providers.auth.config.socialProviders.google.enabled: true`. The compiler bakes the right `VITE_ENABLE_GOOGLE_OAUTH` flag into the SPA's `.env` so the social-login button renders only when the provider is enabled — no more dead buttons.
655
-
656
- Signup flow gains a Terms-of-Service checkbox gate (configurable via the Account SPA's branding config).
657
-
658
- ### CLI compile auth gate + device-auth redirect fix
659
-
660
- - `quickback compile` now requires authentication for cloud-compiler runs (closes the unauth public-compile path).
661
- - The device-flow `/cli/authorize` page was sending `?returnTo=` to login, but `signup.tsx` and the `_authenticated` middleware only read `?redirect=` — so a user who clicked "Create one" from `/login` lost the return URL. Standardized on `?redirect=` everywhere.
662
-
663
- ### Skill restructure (Claude Code skill)
553
+ The Account SPA wires Google OAuth end-to-end when configured under `auth.config.socialProviders.google.enabled`. The signup flow gains a Terms-of-Service checkbox gate (configurable via the Account SPA branding).
664
554
 
665
- The bundled Claude Code skill was reorganized for clarity:
555
+ ### CLI compile auth gate
666
556
 
667
- - `SKILL.md` is now a thin orientation pointer, not a 600-line dump
668
- - Reference docs split into `Compiler` and `Stack` sections
669
- - Docs bundled as **files** the model navigates with `Read` / `Glob` rather than via `quickback docs <topic>` shell calls — same content, fewer tool calls per lookup
670
- - Tightened against audit gaps surfaced by red-team review
671
-
672
- Run `quickback claude install` to pick up the new skill layout.
557
+ `quickback compile` now requires authentication for cloud-compiler runs. Device-flow `?redirect=` parameters are standardized across the login + signup pages so a user clicking "Create one" no longer loses their return URL.
673
558
 
674
559
  ---
675
560
 
676
- ## v0.10.17 — May 2, 2026
677
-
678
- ### Security fix: CSP auto-config no longer widens `default-src`
679
-
680
- When 0.10.15's auto-config was asked to add a value to a directive the user hadn't declared (e.g. `https://fonts.googleapis.com` → `style-src` when only `default-src` was set), it incorrectly pushed the value into `default-src` itself. Because CSP3 fall-back semantics make `default-src` the fallback for `script-src`, `img-src`, `media-src`, and others, this widened the attack surface to every directive that fell back to it — a `style-src`-only host became reachable from `script-src`.
681
-
682
- 0.10.17 fixes the logic: missing target directives are now **scaffolded** with the user's `default-src` values as baseline, then extended with the auto-config addition. `default-src` stays clean. The new directive (e.g. `style-src`) covers exactly the styles the SPA needs and nothing else.
683
-
684
- Before (0.10.16):
685
- ```
686
- default-src 'self' https://fonts.googleapis.com https://fonts.gstatic.com @trustedOrigins https://api.example.com
687
- ```
688
-
689
- After (0.10.17):
690
- ```
691
- default-src 'self'
692
- style-src 'self' 'unsafe-inline' https://fonts.googleapis.com
693
- font-src 'self' https://fonts.gstatic.com
694
- connect-src 'self' @trustedOrigins https://api.example.com
695
- ```
561
+ ## v0.10.15–v0.10.17 — May 2, 2026
696
562
 
697
- **Action required:** recompile (`quickback compile`) to regenerate the security middleware with the corrected scaffolding. Configs that already declared each `*-src` directive explicitly were unaffected by the bug — the regression only surfaced when users wrote `defaultSrc: ['@self']` and let auto-config fill in the rest.
563
+ ### CSP auto-config
698
564
 
699
- The user-side workaround from 0.10.16 (declaring each directive with `['@self']` to force scaffold) is no longer needed in 0.10.17 — the compiler does the right thing automatically.
565
+ When `security.csp` is set, the compiler widens directives additively based on the project's enabled features:
700
566
 
701
- ---
702
-
703
- ## v0.10.16 — May 2, 2026
704
-
705
- ### CSP auto-config now covers SPA-baked-in API origins
706
-
707
- When the bundled CMS or Account SPA is enabled, the compiler already inlines the API URL into the SPA bundle as a string literal at build time (`VITE_QUICKBACK_API_URL=https://${unifiedDomain}`). That hardcoded URL is what the SPA actually fetches — regardless of which origin is currently serving the page. CSP `connect-src` must allow it explicitly.
708
-
709
- 0.10.16's auto-config picks up every domain the compiler already knows about — `config.domain`, the inferred `quickback.{baseDomain}`, `cms.domain`, `account.domain`, the admin domain — and adds `https://${each}` to `connectSrc` whenever a bundled SPA is enabled.
710
-
711
- The motivating case: running the SPA on `localhost:5173` while it's still baked against `https://quickback.your-app.com`. Pre-0.10.16 the localhost CSP's `'self'` blocked the prod URL; users were patching it manually. Now it just works.
712
-
713
- ```
714
- [security] auto-added https://quickback.loop.kardoe.com to csp.connectSrc — account: true → bundled Account SPA → SPA bundle hardcodes https://quickback.loop.kardoe.com as VITE_QUICKBACK_API_URL / etc.
715
- ```
567
+ | Trigger | Auto-added | Directive |
568
+ |---|---|---|
569
+ | `cms: true` OR `account: true` | `'unsafe-inline'`, `https://fonts.googleapis.com` | `styleSrc` |
570
+ | `cms: true` OR `account: true` | `https://fonts.gstatic.com` | `fontSrc` |
571
+ | `csp` set (always) | `@trustedOrigins` | `connectSrc` |
572
+ | Bundled SPA enabled | SPA-baked API origin (`config.domain`, `quickback.{baseDomain}`, `cms.domain`, `account.domain`) | `connectSrc` |
716
573
 
717
- `@trustedOrigins` (the CORS allowlist) is unchanged — it still gets added independently. The two cover different things: `@trustedOrigins` permits CORS-allowed sibling subdomains; the new SPA-baked addition permits the exact URL the SPA's compiled bundle hardcodes.
574
+ Anything you already wrote stays — auto-config never removes or overrides. Each applied addition is logged to stderr. Opt out with `security: { cspAutoConfig: false }`.
718
575
 
719
- Combined with 0.10.15's bundled-SPA defaults, most projects can now write the minimal:
576
+ Most projects can write the minimal:
720
577
 
721
578
  ```ts
722
579
  security: {
@@ -729,286 +586,107 @@ security: {
729
586
  }
730
587
  ```
731
588
 
732
- …and the compiler fills in styleSrc font hosts, fontSrc gstatic, connectSrc trusted origins, and connectSrc SPA-baked URLs.
733
-
734
- ---
735
-
736
- ## v0.10.15 — May 2, 2026
737
-
738
- ### CSP auto-config — bundled-SPA origins added automatically
589
+ …and the compiler fills in font hosts, trusted origins, and SPA-baked URLs.
739
590
 
740
- When `security.csp` is set, the compiler now widens directives **additively** based on the project's enabled features. The four rules:
741
-
742
- | Trigger | Auto-added | Directive |
743
- |---|---|---|
744
- | `cms: true` OR `account: true` | `'unsafe-inline'`, `https://fonts.googleapis.com` | `styleSrc` |
745
- | `cms: true` OR `account: true` | `https://fonts.gstatic.com` | `fontSrc` |
746
- | `csp` set (always) | `@trustedOrigins` | `connectSrc` |
747
-
748
- Anything you already wrote stays — auto-config never removes or overrides. Every applied addition prints to stderr at compile so the magic is visible:
749
-
750
- ```
751
- [security] auto-added 'unsafe-inline' to csp.styleSrc — account: true → bundled Account SPA → inline style attributes from Tailwind / TanStack Router
752
- [security] auto-added @trustedOrigins to csp.connectSrc — CORS-trusted origins must be reachable from XHR/fetch (matches cors() allowlist)
753
- ```
754
-
755
- The recipe in [the security docs](/compiler/config/security#example-paste-in-csp-for-a-quickback-spa-project) becomes ~5 lines shorter — most projects no longer need to list `fonts.googleapis.com` / `fonts.gstatic.com` / `@trustedOrigins` themselves. **Loop's CSP shrinks dramatically** after recompiling against this version.
756
-
757
- **Opt-out:** `security: { cspAutoConfig: false, csp: { ... } }` for projects fronted by a CDN that injects its own CSP, or teams that want strict from-scratch control.
758
-
759
- **Smart fallback:** if you set `defaultSrc` but omit the target directive (e.g. `defaultSrc: ['@self']` and nothing for `connectSrc`), the addition lands in `defaultSrc` rather than creating a sibling directive — CSP fall-back semantics mean a sibling would *narrow* your intent, so we preserve the broader fallback.
760
-
761
- ### Troubleshooting table for CSP violations
762
-
763
- The security docs page now includes a [Troubleshooting CSP violations](/compiler/config/security#troubleshooting-csp-violations) table mapping browser console errors back to the directive that needs widening. Useful when auto-config is disabled or the project has a non-bundled SPA hitting third-party origins.
764
-
765
- ### Out of scope (deferred)
766
-
767
- - **Per-request CSP nonces** (`@nonce` sentinel implementation) — Phase 2 / 0.10.16. Sentinel still errors at compile in 0.10.15.
768
- - **`revocationCheck: 'kv'` for `auth.jwt`** — schema accepts it, runtime still errors at compile. Slipped from 0.10.15 to 0.10.16.
769
- - **Public R2 host auto-add to `imgSrc`** — most R2 access today goes through the worker so the SPA fetches from `'@self'`. Will revisit once we have a clean way to discover public-bucket hosts at compile.
591
+ When a target directive is missing, auto-config scaffolds it from `default-src` baseline rather than widening `default-src` itself — CSP3 fall-back semantics would otherwise leak the addition to every directive that falls back to `default-src`.
770
592
 
771
593
  ---
772
594
 
773
595
  ## v0.10.14 — May 1, 2026
774
596
 
775
- ### `auth.jwt` — JWT bearer-token fast-path config
597
+ ### `auth.jwt` config
776
598
 
777
- Quickback's bearer-token JWT (the one minted by the auth middleware and consumed by the fast-path on every subsequent request) is now configurable. The most-tuned knob is `expiresIn` — drop it to bound the post-revocation replay window without affecting browser SPAs, which auto-refresh via `set-auth-token` on every authed call:
599
+ The bearer-token JWT used by the auth fast-path is configurable. Tune `expiresIn` to bound the post-revocation replay window without affecting browser SPAs (which auto-refresh on every authed call):
778
600
 
779
601
  ```ts
780
602
  auth: {
781
603
  jwt: {
782
- expiresIn: 30, // 30s post-revocation replay window
783
- issuer: 'my-api', // iss claim (verified on the way back in)
784
- audience: 'partner-svc', // aud claim
785
- secretEnv: 'CUSTOM_JWT_SECRET', // override BETTER_AUTH_SECRET if you need the JWT secret rotated independently
604
+ expiresIn: 30,
605
+ issuer: 'my-api',
606
+ audience: 'partner-svc',
607
+ secretEnv: 'CUSTOM_JWT_SECRET',
786
608
  },
787
609
  }
788
610
  ```
789
611
 
790
- `revocationCheck: 'kv'` (KV-denylist consult on every fast-path verify, ~5-15ms edge-cached, no D1 hit) is reserved in the schema today but **deferred to 0.10.15** — setting it errors at compile so the migration path is explicit. `'none'` (today's behaviour, 0 cost, replay bound by TTL) stays the default.
612
+ ### Admin MCP endpoints filtered
791
613
 
792
- See [the docs page](/compiler/config/auth) for the full knob list and tuning recommendations.
614
+ Better Auth admin endpoints (`/admin/list-users`, `/admin/ban-user`, etc.) now carry `x-access: { userRole: ['admin'] }` in the generated OpenAPI spec. The MCP `tools/list` access-filter drops them for non-admin callers.
793
615
 
794
- ### MCP admin endpoints hidden from non-admin `tools/list`
616
+ ### Declarative `security` config
795
617
 
796
- Better Auth admin endpoints (`/admin/list-users`, `/admin/ban-user`, `/admin/impersonate-user`, etc. — 9 in total) now carry `x-access: { userRole: ['admin'] }` in the generated OpenAPI spec, which means the MCP server's existing access-filter automatically drops them from `tools/list` for callers without an admin token. Anonymous and member-role callers no longer see admin tooling enumerated through MCP; admin endpoints still exist on the HTTP surface (Better Auth gates them server-side regardless).
618
+ Every security response header (`Content-Security-Policy`, COOP, COEP, CORP, HSTS, `X-Frame-Options`, `Referrer-Policy`, `Permissions-Policy`) is configurable from `quickback.config.ts`. `@`-prefixed sentinels (`@self`, `@none`, `@unsafe-inline`, `@trustedOrigins`, etc.) replace awkward `"'self'"` quoting.
797
619
 
798
- ### Declarative `security` config block
620
+ The compiler lints the resolved config for known footguns: `@unsafe-inline` in `script-src`, wildcard sources, missing `default-src`, HSTS preload-list misconfiguration.
799
621
 
800
- Every security response-header (`Content-Security-Policy`, `Cross-Origin-Opener-Policy`, `Cross-Origin-Embedder-Policy`, `Cross-Origin-Resource-Policy`, `X-Frame-Options`, `Strict-Transport-Security`, `Referrer-Policy`, `Permissions-Policy`) is now configurable from `quickback.config.ts`. Loop's `postcompile-patch.mjs` (which re-injected a fuller CSP and COOP after every `quickback compile`) can now be deleted in favour of:
622
+ ### HSTS skipped on localhost
801
623
 
802
- ```ts
803
- security: {
804
- csp: {
805
- defaultSrc: ['@self'],
806
- scriptSrc: ['@self'],
807
- styleSrc: ['@self', '@unsafe-inline'],
808
- frameAncestors: ['@none'],
809
- objectSrc: ['@none'],
810
- upgradeInsecureRequests: true,
811
- },
812
- coop: 'same-origin',
813
- }
814
- ```
815
-
816
- `@`-prefixed sentinels (`@self`, `@none`, `@unsafe-inline`, `@unsafe-eval`, `@trustedOrigins`, `@nonce`) save users from awkward `"'self'"` quoting and let `@trustedOrigins` resolve to the same allowlist `cors()` uses. Unknown sentinels throw at compile rather than silently stringify into the wire CSP.
817
-
818
- The compiler runs lint rules over the resolved config — errors for `@nonce` (deferred to 0.10.15), `@unsafe-inline + @nonce` (silently broken), and sentinel-only directives that would resolve to nothing at runtime; warnings for `@unsafe-inline` in `script-src`, wildcard sources, missing `default-src`, HSTS preload-list misconfiguration, etc.
819
-
820
- Defaults preserve 0.10.13 behaviour byte-for-byte — adding the block without setting any field is a no-op.
821
-
822
- See [the docs page](/compiler/config/security) for the full reference.
823
-
824
- ### HSTS no longer pins `localhost` to HTTPS
825
-
826
- The generated middleware now skips `Strict-Transport-Security` when the request hostname is `localhost`, `127.0.0.1`, or `*.localhost`. Without this gate, `wrangler dev` would pin the developer's browser to HTTPS for `max-age` seconds — observable across every project on that machine since HSTS keys on hostname, not port. Affects every project running locally.
827
-
828
- ### Out of scope (deferred)
829
-
830
- - **Per-request CSP nonces** — Phase 2 / 0.10.15. Sentinel exists at config-validation level so users can author their final CSP today knowing it'll start working when nonces ship.
831
- - **Asset-hash CSP** for inline `<style>` and `<script>` blocks emitted by the bundled SPAs — Phase 3.
832
- - **Per-route CSP overrides** (e.g. one looser policy for `/admin`) — single global CSP for now.
624
+ Generated middleware skips `Strict-Transport-Security` when the request hostname is `localhost`, `127.0.0.1`, or `*.localhost`. Without this gate, `wrangler dev` would pin a developer's browser to HTTPS across every project on that machine.
833
625
 
834
626
  ---
835
627
 
836
628
  ## v0.10.13 — May 1, 2026
837
629
 
838
- ### Clickjacking protection on every generated Worker
839
-
840
- Every Worker now emits two clickjacking-defence headers on every
841
- response:
842
-
843
- - `Content-Security-Policy: frame-ancestors 'self' <TRUSTED_ORIGINS…>`
844
- - `X-Frame-Options: SAMEORIGIN`
845
-
846
- The CSP allowlist is sourced from the same `TRUSTED_ORIGINS` constant
847
- that gates CORS, so users configure their domains in one place
848
- (`auth.trustedOrigins` / `auth.trustedOriginDefaults` in
849
- `quickback.config.ts`) and both CORS and frame-ancestors stay in
850
- lockstep. `'self'` is always allowed so an app's own SPAs can frame
851
- their own routes (e.g. an account login popover hosted on the same
852
- origin).
853
-
854
- Modern browsers obey `frame-ancestors` and ignore `X-Frame-Options`
855
- when both are set; the legacy header is included for clients that
856
- don't speak CSP3. The CSP intentionally only sets `frame-ancestors` —
857
- adding `script-src` / `default-src` would need a much wider audit
858
- across SPA assets, inline scripts, and third-party embeds, so that's
859
- left as a follow-up.
860
-
861
- Recompile (`quickback compile`) and redeploy to pick this up — no
862
- config change needed unless you want to allow extra cross-origin
863
- iframe embeds, in which case add them to `auth.trustedOrigins`.
864
-
865
- ---
866
-
867
- ## v0.10.12 — May 1, 2026
868
-
869
- ### Bundled-docs sync for the MCP recon fix
630
+ ### Clickjacking defence on every Worker
870
631
 
871
- Patch release that re-bundles the CLI's offline docs (consulted by the
872
- Claude Code skill, Cursor rules, and other AI assistants) so they
873
- reflect the corrected `tools/list` access-filter behavior and CORS
874
- posture shipped in v0.10.11. The `compiler/config/agents.mdx` page
875
- itself was already corrected on the docs site immediately after the
876
- 0.10.11 release; this bump propagates that text into the bundle inside
877
- `@quickback-dev/cli`.
878
-
879
- No runtime or compiler behavior change — re-running `quickback compile`
880
- against this version produces the same output as v0.10.11.
632
+ Every Worker emits `Content-Security-Policy: frame-ancestors 'self' <TRUSTED_ORIGINS…>` and `X-Frame-Options: SAMEORIGIN` on every response. The CSP allowlist is sourced from the same `TRUSTED_ORIGINS` constant that gates CORS.
881
633
 
882
634
  ---
883
635
 
884
636
  ## v0.10.11 — May 1, 2026
885
637
 
886
- ### MCP `tools/list` is now access-filtered + recon-tightened
887
-
888
- The generated MCP-over-HTTP server (`src/routes/mcp.ts`) had three holes
889
- that turned a standard pentest into trivial recon:
890
-
891
- 1. `tools/list` returned the entire tool catalogue to anyone — including
892
- admin-only endpoints — without checking auth or roles. Tool
893
- descriptions also leaked sentences like `[UNSAFE] bypasses tenant
894
- scoping and requires elevated access` verbatim.
895
- 2. The endpoint set `Access-Control-Allow-Origin: *` so any origin could
896
- pull the catalogue from a browser.
897
- 3. Unauthenticated `GET /mcp` enumerated every tool name in its
898
- discovery payload.
899
-
900
- Fix:
901
-
902
- - Each tool now carries sanitised access metadata (`_access` covering
903
- `roles` / `userRole` / `or` / `and`, plus `_public` for `PUBLIC`
904
- pseudo-role or empty `security`). `tools/list` filters against the
905
- caller's `ctx` — unauth callers see only `_public` tools, authed
906
- callers see only role-gated tools they pass. Record predicates and
907
- function-form access (opaque at list time) are dropped.
908
- - Wildcard CORS removed entirely. The parent app's `cors()` middleware
909
- (origin allowlist via `TRUSTED_ORIGINS` + `BETTER_AUTH_URL`) now
910
- applies uniformly to `/mcp`, same as every other route.
911
- - `[UNSAFE] ... bypasses tenant scoping ...` flavour text is gone.
912
- `annotations.destructiveHint` and `_unsafe` remain — those are the
913
- spec-correct signals for clients to warn users.
914
- - Unauthenticated `GET /mcp` no longer lists tool names. Inventory is
915
- only available via the access-filtered `tools/list`.
916
-
917
- This filter is recon-mitigation, not a security boundary: `tools/call`
918
- still re-enters the Hono app and runs every middleware (auth, firewall,
919
- access, guards, masking), so hiding a tool from list never weakens the
920
- underlying gate.
921
-
922
- Known follow-up: Better Auth admin endpoints (`ban-user`, `create-user`,
923
- `impersonate-user`, etc.) don't yet emit `x-access` in the OpenAPI spec,
924
- so any logged-in user still sees them in `tools/list` (the actual call
925
- is still gated by the admin plugin). Tracked separately.
926
-
927
- ---
928
-
929
- ## v0.10.10 — April 29, 2026
930
-
931
- ### Reject reserved keys inside `access.record` at compile time
638
+ ### MCP `tools/list` is access-filtered
932
639
 
933
- `access.record` is a flat field map evaluated as implicit AND between
934
- entries — keys must be column names. Putting `and: [...]` (or `or` /
935
- `roles` / `userRole`) inside `record` was a real-world footgun: the
936
- runtime treated the literal string `"and"` as a column lookup, the
937
- predicate failed on every row, and the caller got a silent `403` /
938
- empty list with nothing pointing at the misuse. The TypeScript type
939
- couldn't catch this — `RecordConditions` is an open-ended index
940
- signature, so any key parses.
640
+ Each MCP tool now carries sanitised access metadata. `tools/list` filters against the caller's `ctx`: unauthenticated callers see only `PUBLIC` tools, authenticated callers see only role-gated tools they pass.
941
641
 
942
- The compiler now walks every access node attached to a resource (CRUD
943
- ops, `read.access`, view access, masking `show` / `query`, action
944
- access) and throws a clear migration error when `record` contains a
945
- reserved key:
642
+ - Wildcard CORS removed from the MCP endpoint.
643
+ - Unauthenticated `GET /mcp` no longer enumerates tool names.
644
+ - Internal flavor text is removed; `annotations.destructiveHint` and `_unsafe` remain — those are the spec-correct signals for clients.
946
645
 
947
- - `and` / `or` inside `record` → use the top-level `and` / `or`
948
- sibling: `{ and: [{ record: { ... } }, { record: { ... } }] }`
949
- - `roles` / `userRole` inside `record` → put them at the access node
950
- alongside `record`: `{ roles: [...], record: { ... } }`
951
-
952
- The error names the exact origin (`crud.update.access`,
953
- `actions.focus.access.or[1]`, etc.) so the fix lands in the right place.
646
+ `tools/call` continues to re-enter the Hono app and run every middleware (auth, firewall, access, guards, masking), so hiding a tool from list never weakens the underlying gate.
954
647
 
955
648
  ---
956
649
 
957
- ## v0.10.9 — April 29, 2026
958
-
959
- ### Role hierarchy now expands in record-based action access
960
-
961
- `auth.roleHierarchy: ['member', 'admin', 'owner']` plus
962
- `access: { roles: ['member+'] }` on a record-based action used to
963
- silently 403 valid callers. The standalone-action route generator
964
- inlined the expanded role list as a JSON literal, but the
965
- record-based generator read the access config back through the
966
- runtime `actions['name'].access` import — the user's source, where
967
- the unexpanded `'member+'` shorthand still lived. The runtime did
968
- literal string matching against `ctx.roles`, so an `owner` calling
969
- the action got `['member+'] !== 'owner'` and was rejected.
650
+ ## v0.10.10 — April 29, 2026
970
651
 
971
- Fixed: record-based action routes now inline the expanded list the
972
- same way standalone routes do. `input` and `execute` still flow
973
- through the runtime import (closures aren't serializable); only the
974
- access config is lifted to a JSON literal so the compile-time
975
- expansion actually reaches the matcher.
652
+ ### Reserved keys in `access.record` are rejected
976
653
 
977
- A regression test (`role-hierarchy-action-routes.test.ts`) locks the
978
- behavior in — it asserts that `member+` never reaches the route
979
- output and that the access config is no longer read from
980
- `actions[name].access` at runtime.
654
+ `access.record` is a flat field map evaluated as implicit AND between entries — keys must be column names. The compiler now rejects reserved keys (`and`, `or`, `roles`, `userRole`) inside `record` with migration guidance pointing at the working pattern (top-level siblings with their own `record:` blocks).
981
655
 
982
656
  ---
983
657
 
984
658
  ## v0.10.8 — April 29, 2026
985
659
 
986
- ### Audit support on postgres targets, plus a generated-API quality pass
660
+ ### Audit logging on Postgres targets
661
+
662
+ `audit_events` previously only existed on `cloudflare-d1`. The audit table now lives in a dedicated `audit` schema (`drizzle.pgSchema('audit')`) on Postgres targets. The `hasSecurityAudit` gate accepts D1 or any PG dialect; `auditDatabaseId` remains a D1-only requirement.
987
663
 
988
- **Audit on PG.** Until this release, `audit_events` only existed on cloudflare-d1 — projects on Neon (or any postgres target) silently skipped audit logging on `unsafe:` and `PUBLIC`-role actions, and hard delete was hard-blocked. Postgres has no equivalent of D1's separate-database binding model, but it has native schemas — so the audit table now lives in a dedicated `audit` schema in the same database as features (`drizzle.pgSchema('audit')`). The `hasSecurityAudit` gate accepts D1 OR any PG dialect; the `auditDatabaseId` requirement only fires for D1 (which still uses the separate-binding model). The recruitment example wires `auditDatabaseId` so the recompile path stays green.
664
+ ### `auditDatabaseId` is a compile-time requirement
989
665
 
990
- **`auditDatabaseId` is now a compile-time requirement** (D1 only). Previously, projects with unsafe/PUBLIC actions but no audit id silently produced a `database_id = "local-audit"` placeholder in production `wrangler.toml`; Cloudflare's worker upload step then rejected it with code 10021 *after* assets and migrations had already run. The compile-time error names the exact `wrangler d1 create <project>-audit` command and the `auditDatabaseId` config key where the returned id goes.
666
+ Projects with unsafe or `PUBLIC` actions that previously produced a placeholder `database_id = "local-audit"` in production now fail at compile time with the exact `wrangler d1 create <project>-audit` command and the config key where the returned ID goes.
991
667
 
992
- ### Five fixes from a Loop integration ticket pass
668
+ ### Action input → OpenAPI / MCP
993
669
 
994
- **Action input → OpenAPI / MCP.** `defineAction({ input: z.object({...}) })` schemas now flow into `requestBody` on the OpenAPI operation and `inputSchema.properties` / `_bodyFields` on the MCP tool list. Simple `z.object` shapes are extracted at compile time; for discriminated unions, refinements, recursive schemas, and bare-identifier references (`input: createPersonInput`), the compiler runs your action file through Zod 4's native `z.toJSONSchema()` during compilation — full-fidelity output with no static translator to maintain. Pre-fix, every action came out as a no-arg endpoint, which gutted typed SDK generation and made MCP useless for actions that take parameters.
670
+ `defineAction({ input: z.object({...}) })` schemas flow into the OpenAPI `requestBody` and the MCP tool's `inputSchema.properties`. Simple `z.object` shapes are extracted at compile time; discriminated unions, refinements, recursive schemas, and bare-identifier references run through Zod's native `z.toJSONSchema()` for full-fidelity output.
995
671
 
996
- **OpenAPI fidelity.** Three surgical fixes that strict validators (zod, openapi-typescript, openapi-fetch) had been complaining about:
997
- - Response schemas now emit `required[]` for every non-nullable column, so generated SDKs treat them as guaranteed-present rather than optional.
998
- - `text(_, { enum: [...] })` columns emit as closed `{ type: "string", enum: [...] }`, narrowing to literal unions.
999
- - `id` only claims `format: "uuid"` when the project's `generateId` actually produces UUIDs. cuid2 / prefixed / nanoid / serial generators get plain `{ type: "string" }` — strict validators stop rejecting responses against their own spec.
672
+ ### OpenAPI fidelity
1000
673
 
1001
- **Mask auto-detector now checks the column exists.** The auto-mask predicate used to be unconditionally `show: { or: 'owner', roles: ['admin'] }` — including for tables with no owner column at all (no `userId` / `ownerId` and no `q.scope('owner')`). The generated mask function would reference a non-existent column and fail under TypeScript checks. The auto-detector now verifies the resolved owner column exists in the parsed schema before emitting the `or` clause; when it doesn't, the rule falls back to roles-only and the compiler emits a warning so the behavior is transparent.
674
+ - Response schemas emit `required[]` for every non-nullable column.
675
+ - `text(_, { enum: [...] })` columns emit as closed `{ type: "string", enum: [...] }`.
676
+ - `id` claims `format: "uuid"` only when the project's `generateId` actually produces UUIDs. cuid2 / prefixed / nanoid / serial generators emit plain `{ type: "string" }`.
1002
677
 
1003
- **Error code consistency.** The generated CRUD layer was emitting raw codes (`'UNAUTHORIZED'`, `'NOT_NULL_VIOLATION'`, `'UNIQUE_VIOLATION'`, `'INSERT_FAILED'`, `'UPDATE_FAILED'`) that were never in the `QuickbackErrorCode` enum, so consumers couldn't switch exhaustively on `code`. New `database` layer + `DB_NOT_NULL_VIOLATION` / `DB_UNIQUE_VIOLATION` / `DB_INSERT_FAILED` / `DB_UPDATE_FAILED` / `NOT_FOUND` codes are now in the enum, the routes use `AuthErrors.missing()` / `DatabaseErrors.*()` helpers throughout, and the OpenAPI `Error` component emits `code` as a closed enum sourced from the canonical `QUICKBACK_ERROR_CODES` list. Generated SDKs can now `switch` on `code` without a default branch swallowing unknown values. See [API errors](/compiler/targets/hono-api/using-the-api/errors#database).
678
+ ### Minor
1004
679
 
1005
- **Dropped dead `auditFields` preamble from action route generators.** The audit wrapper's `Proxy` already hard-stamps `createdAt` / `createdBy` / `modifiedAt` / `modifiedBy` on every INSERT and `modifiedAt` / `modifiedBy` on every UPDATE — the `auditFields` const the route preamble built was never read. Dropped from `standalone.ts` / `record-based.ts` and from the `ActionExecutorParams` JSDoc. Migrated 7 example handlers (drop `modifiedAt: auditFields!.modifiedAt` from `.set` payloads — the wrapper handles it). Note: `.onConflictDoUpdate({ set })` is *not* intercepted by the wrapper, so `upsertBatch`-style handlers keep an explicit `modifiedAt: now`.
680
+ - Auto-mask predicate verifies the resolved owner column exists before emitting an `or: 'owner'` clause; falls back to roles-only with a warning otherwise.
681
+ - Generated CRUD errors emit canonical `QuickbackErrorCode` enum values (`DB_NOT_NULL_VIOLATION`, `DB_UNIQUE_VIOLATION`, etc.) so generated SDKs can exhaustively switch on `code`. See [API errors](/compiler/targets/hono-api/using-the-api/errors#database).
1006
682
 
1007
683
  ---
1008
684
 
1009
- ## One file per action: greenfield action authoring
685
+ ## DSL: one file per action, multi-table per feature
1010
686
 
1011
- Action authoring collapses to a single shape. Each action is its own file under `<feature>/actions/<name>.ts` using `defineAction({...})`. The filename is the action name AND the URL segment.
687
+ ### One file per action
688
+
689
+ Action authoring is one file per action under `<feature>/actions/<name>.ts`. The filename is the action name and the URL segment:
1012
690
 
1013
691
  ```typescript
1014
692
  // features/applications/actions/advance.ts
@@ -1029,65 +707,37 @@ export default defineAction({
1029
707
  });
1030
708
  ```
1031
709
 
1032
- `defineAction` is imported from a generated per-feature helper at `<feature>/.quickback/define-action.ts` — types `record`, `input`, and audit fields without manual annotations. The directory says what `:id` mounts to; the imports say what the body reads or writes.
710
+ `defineAction` is imported from a generated per-feature helper at `<feature>/.quickback/define-action.ts` — `record`, `input`, and audit fields are typed without manual annotations.
1033
711
 
1034
712
  **Discovery rules:**
1035
- - `actions/<name>.ts` binds to the feature's primary table (the `<feature>.ts` file at the feature root).
1036
- - `actions/<table>/<name>.ts` binds to the sibling table file `<table>.ts` — for multi-table features.
1037
- - Setting `path:` makes the action standalone (custom URL, no record fetch, no firewall preload).
1038
- - Tableless features (no top-level `*.ts` files) require every action to be standalone.
1039
- - Action names are unique per `(bindTable, name)` pair — sibling-bound actions on different tables may share a verb (e.g. `actions/episodes/publish.ts` + `actions/shows/publish.ts` mount at `/episodes/:id/publish` and `/shows/:id/publish` and don't collide). Standalone actions are unique per `(method, path)`.
1040
- - Files under `<feature>/lib/` are copied verbatim for feature-local helpers; `quickback/lib/` is exposed via the `~/lib/*` alias for cross-feature shared code (with a one-way import rule enforced at compile time).
1041
-
1042
- **Retired** (rejected at load time with migration guidance):
1043
-
1044
- - `actions.ts` (bundled multi-action file)
1045
- - `_feature.ts` (shared preamble + tableless actions)
1046
- - `handlers/` directory + `handler:` string ref
1047
- - `defineActions(table, {…})` and `defineActions(null, {…})`
1048
- - `export default { actions: {…} }`
1049
- - Colocated `defineActions` inside table files
1050
- - `standalone: true` flag (presence of `path:` is the new signal)
1051
- - `*-actions.ts` / `*.actions.ts` filename patterns
1052
-
1053
- The phantom-`unsafe` regex bug that flattened nested `unsafe: { … }` blocks into a fake top-level action is gone — the parser now reads action files as real TS modules with real imports, so type inference, jump-to-definition, and rename refactoring all work end-to-end.
1054
-
1055
- The CLI loader rejects retired primitives at load time with batched migration errors. Existing projects need to be migrated by hand to the new shape before recompiling.
1056
-
1057
- See the [Actions docs](/compiler/definitions/actions) for the full reference.
1058
-
1059
- ---
1060
-
1061
- ## Multi-table actions per feature
1062
-
1063
- Features used to support exactly one `defineActions(table, …)` call via `actions.ts`, which forced unnatural feature splits whenever multiple tables in the same feature needed actions (a podcast feature with `episodes`, `shows`, `seasons`, `collections`, etc.). One feature directory can now own actions on multiple tables across three discovery modes:
713
+ - `actions/<name>.ts` binds to the feature's primary table.
714
+ - `actions/<table>/<name>.ts` binds to the sibling table file.
715
+ - Setting `path:` makes the action standalone (custom URL, no record fetch).
716
+ - Tableless features require every action to be standalone.
1064
717
 
1065
- - **Colocated** (canonical) — `<table>.ts` containing both `defineTable` and `defineActions(<table>, …)`. One file per entity. Default for new features.
1066
- - **`actions.ts`** (existing) — single primary-table actions file at feature root. Unchanged behaviour.
1067
- - **`actions/<table>.ts`** — per-table action files for teams that want strict schema/behavior separation or need to break an import cycle.
718
+ **Retired** (rejected at load time with migration guidance): `actions.ts` (bundled multi-action file), `_feature.ts`, `handlers/` directory + `handler:` string ref, `defineActions(table, {…})`, colocated `defineActions` inside table files, `standalone: true` flag, `*-actions.ts` / `*.actions.ts` filename patterns.
1068
719
 
1069
- Plus the universal `_feature.ts` slot (at feature root) for **non-table-bound feature-level actions** (`export default { actions: { … } }` shape) and **shared Zod schemas** that get prepended once to the merged actions module so every sibling action sees them. Allowed in any of the three modes — orthogonal to table binding.
720
+ See [Actions docs](/compiler/definitions/actions).
1070
721
 
1071
- The decision flowchart: *one table with actions → colocate. Multiple tables with actions → colocate each. Hit a cycle or want strict separation → `actions/<table>.ts`. Want schema/actions split for a single-table feature → `actions.ts`. Non-table actions → always `_feature.ts`.*
722
+ ### Multi-table actions per feature
1072
723
 
1073
- Conflicts are batched and printed once before the compiler aborts — no "fix one, recompile, fix the next" loop. The CLI hard-errors when a feature mixes `actions.ts` with table-bound mode, when the same table has its `defineActions` declared in two places, when an `actions/<x>.ts` first-arg doesn't match the basename, or when `_feature.ts` contains `defineActions(table, …)`. Legacy `*-actions.ts` / `*.actions.ts` filenames in a feature dir trigger a soft warning naming the offending paths.
724
+ One feature directory can own actions on multiple tables. Three discovery modes:
1074
725
 
1075
- Within the legacy bundled `actions.ts` DSL, action names had to be unique within a feature — the runtime module merged every source into one keyspace, so colliding `publish` actions on `episodes` and `shows` would have silently overwritten each other. The retired `actions.ts` shape is no longer accepted, so this constraint is gone: the current one-file-per-action layout keys uniqueness per `(bindTable, name)` pair, and the codegen aggregator mangles the JS map key per bind-table while keeping the URL segment bare. Sibling-bound `actions/episodes/publish.ts` and `actions/shows/publish.ts` mount at `/episodes/:id/publish` and `/shows/:id/publish` and compile cleanly.
726
+ - **Colocated** (canonical) — `<table>.ts` containing both `defineTable` and `defineActions(<table>, …)`. One file per entity.
727
+ - **`actions.ts`** — single primary-table actions file at feature root.
728
+ - **`actions/<table>.ts`** — per-table action files for strict schema/behavior separation.
1076
729
 
1077
- Inline `execute:` bodies must be arrow functions (`execute: async (ctx) => { … }`). `async function` and plain `function` shapes were silently misparsed by the route emitter — they now hard-error at parse time pointing at the canonical arrow form, with a suggestion to use `handler:` for callers who genuinely need a named function declaration.
730
+ Plus a universal `_feature.ts` slot for non-table-bound feature-level actions and shared Zod schemas.
1078
731
 
1079
- `handlers/` walks recursively now — `handlers/<table>/<action>.ts` is the canonical layout. A new `lib/` directory under each feature gets copied verbatim into the output for feature-local helpers.
1080
-
1081
- Migration: existing `actions.ts` projects compile bit-identically — the legacy single-table path is unchanged. Legacy `*-actions.ts` filenames produce a soft warning and silently aren't picked up; rename to `<table>.ts` (colocated), `actions/<table>.ts`, or single `actions.ts`.
732
+ Action names are unique per `(bindTable, name)` pair. Sibling-bound `actions/episodes/publish.ts` and `actions/shows/publish.ts` mount at `/episodes/:id/publish` and `/shows/:id/publish` and compile cleanly.
1082
733
 
1083
734
  ---
1084
735
 
1085
- ## Firewall: named-scope shape restored, auto-detection synonyms widened
736
+ ## Firewall: named-scope shape
1086
737
 
1087
- The named-scope firewall shape (`firewall: { organization: { column: 'tenant_id' } }`) is back as a co-equal user-facing input alongside the predicate array. DSL v2 step 8 had walled it off, but the internal architecture still kept named-scope around for the route + scoped-db generators — so re-accepting it at the input boundary is a thin coercion layer, not an architectural change.
738
+ The named-scope firewall shape is a co-equal user-facing input alongside the predicate array:
1088
739
 
1089
740
  ```typescript
1090
- // All three are now valid; all compile to the same predicate array internally.
1091
741
  firewall: { organization: { column: 'tenant_id' } } // named-scope (compact)
1092
742
  firewall: { owner: { column: 'account_user_id' } }
1093
743
  firewall: { exception: true }
@@ -1099,27 +749,17 @@ firewall: [
1099
749
 
1100
750
  Pick the form that reads better — named-scope for the common one-line case, predicate array when you need custom `in`-lists or non-scope predicates.
1101
751
 
1102
- **Auto-detection synonyms expanded.** When `firewall:` is omitted entirely, the compiler scans the schema for an isolation column. The org-scope list now accepts `organizationId`, `organisationId`, `orgId`, `organization`, `organisation`, `org` (American + British). User-scope still accepts `userId` only.
1103
-
1104
- **`ownerId` is now a targeted error signal.** When a table carries `ownerId` but no isolation column AND no explicit `firewall:`, the compiler raises a specific error: `\`ownerId\` is business-logic ownership, not access control — Quickback won't auto-derive a firewall from it. Either rename to \`userId\` if this column controls access, add a separate \`userId\` / \`organizationId\` column, or specify \`firewall:\` explicitly.` This replaces the generic "missing isolation column" error in the `ownerId`-only case and preserves the documented distinction between RLS-style access control (`userId`) and business-logic ownership (`ownerId`).
752
+ **Auto-detection synonyms.** When `firewall:` is omitted, the compiler scans the schema for an isolation column. The org-scope list accepts `organizationId`, `organisationId`, `orgId`, `organization`, `organisation`, `org` (American + British). User-scope accepts `userId`.
1105
753
 
1106
- Migration: nothing breaks. Projects on the predicate-array shape compile bit-identically. Projects on the named-scope shape — including any test fixtures or example projects that were left on the legacy form — now compile cleanly again.
754
+ **`ownerId` is a targeted error signal.** When a table carries `ownerId` but no isolation column and no explicit `firewall:`, the compiler raises a specific error — `ownerId` is business-logic ownership, not access control. Use `userId` for access control, declare an explicit `firewall:`, or add a separate isolation column.
1107
755
 
1108
756
  ---
1109
757
 
1110
758
  ## v0.10.0 — April 26, 2026
1111
759
 
1112
- ### `q.scope()` column DSL + unified `masking.query` gate
1113
-
1114
- Two related DSL consolidations land. The `q.scope()` half is purely additive; the `masking.query` half rejects three legacy per-capability flags at compile time (migration is mechanical — see below).
760
+ ### `q.scope()` — single-declaration tenant scoping
1115
761
 
1116
- **`q.scope(kind)` — single-declaration tenant scoping.** Replaces the three-place pattern (column declaration + firewall predicate + implicit ownership-guard) with one column. `q.scope('organization')` compiles to `text(...).notNull()` and tells the compiler:
1117
-
1118
- 1. Auto-derive the firewall predicate (`{ field: 'organizationId', equals: 'ctx.activeOrgId' }`) so the explicit `firewall:` block can be omitted entirely.
1119
- 2. Add the column to `GUARDS_CONFIG.systemManaged` so client input is rejected at the guard layer.
1120
- 3. Auto-populate from `ctx` on create / upsert.
1121
-
1122
- The systemManaged extension generalises beyond `q.scope()`: any firewall predicate whose `equals` references `ctx.*` adds its `field` to the systemManaged set. So a hand-rolled `firewall: [{ field: 'tenantId', equals: 'ctx.activeOrgId' }]` gets the same treatment.
762
+ `q.scope(kind)` replaces the three-place pattern (column declaration + firewall predicate + ownership-guard) with one column:
1123
763
 
1124
764
  ```typescript
1125
765
  columns: {
@@ -1129,304 +769,148 @@ columns: {
1129
769
  }
1130
770
  ```
1131
771
 
1132
- The auto-derived firewall also includes the soft-delete predicate (`{ field: 'deletedAt', isNull: true }`) when audit-field injection is on (the default). See [`q.scope()` in the schema docs](/compiler/definitions/schema#qscope--tenant-scope-columns).
772
+ `q.scope()` columns auto-derive the firewall predicate, register with the guards layer as `systemManaged` (client input rejected), and auto-populate from `ctx` on create / upsert. The systemManaged extension generalises beyond `q.scope()`: any firewall predicate whose `equals` references `ctx.*` registers its `field` automatically.
773
+
774
+ See [`q.scope()`](/compiler/definitions/schema#qscope--tenant-scope-columns).
1133
775
 
1134
- **`masking[col].query.roles` — unified role gate for filter / sort / search.** The three legacy per-capability flags (`filterable`, `searchable`, `sortable`) are replaced by a single allowlist that says "these roles can query the column."
776
+ ### `masking[col].query.roles` — unified filter / sort / search gate
777
+
778
+ The three legacy per-capability flags (`filterable`, `searchable`, `sortable`) are replaced by a single `query.roles` allowlist:
1135
779
 
1136
780
  ```typescript
1137
781
  masking: {
1138
782
  email: {
1139
783
  type: 'email',
1140
784
  show: { roles: ['admin'] },
1141
- query: { roles: ['admin'] }, // optional — defaults to show.roles
785
+ query: { roles: ['admin'] }, // defaults to show.roles when omitted
1142
786
  },
1143
787
  }
1144
788
  ```
1145
789
 
1146
- When omitted, `query` inherits from `show.roles` ("if you can see it, you can query it") which is the right shape for almost all PII. A view's own `query.{filterable,searchable,sortable}` allowlist is the opt-in for higher-privileged roles; the existing intersection validator gates it at compile time. See [Masking query gate](/compiler/definitions/masking#query-gate-filter--sort--search).
790
+ A view's own `query.{filterable,searchable,sortable}` allowlist is the opt-in for higher-privileged roles; the existing intersection validator gates it at compile time.
1147
791
 
1148
- **Breaking:** Setting `masking[col].filterable / .searchable / .sortable` is rejected at compile time with a migration hint. Replace with `query.roles` (or just delete the flags — `query` defaults to `show.roles`).
792
+ **Breaking:** `masking[col].filterable / .searchable / .sortable` is rejected at compile time with a migration hint. Replace with `query.roles` (or delete the flags — `query` defaults to `show.roles`).
1149
793
 
1150
794
  ---
1151
795
 
1152
796
  ## v0.9.0 — April 25, 2026
1153
797
 
1154
- ### DSL v2: unified `read:` pipeline, transactional batches, ID-probe defense
798
+ ### Unified `read:` pipeline
1155
799
 
1156
- Step 8 of the DSL v2 refactor lands. The headline shift is that the read
1157
- side of every resource now has its own block — `read:` — that owns the
1158
- collection-level `GET /` endpoint, single-record `GET /:id`, and named view
1159
- projections. The legacy `crud.list` and `crud.get` shapes are rejected at
1160
- compile time. See the new [Read pipeline](/compiler/definitions/read) page
1161
- for the full reference and migration table.
800
+ The read side of every resource has its own block — `read:` — that owns the collection-level `GET /` endpoint, single-record `GET /:id`, and named view projections.
1162
801
 
1163
802
  **Breaking changes** (compile-time errors with migration hints):
1164
803
 
1165
- - `crud.list` → [`read.access`](/compiler/definitions/read) (plus `read.pageSize` / `read.maxPageSize`)
1166
- - `crud.get` → `read.access` (single-record GET inherits automatically; use record-level conditions on `read.access` for differentiated single-record gates)
1167
- - Top-level `views: {...}` → [`read.views: {...}`](/compiler/definitions/read#views-under-read-views)
804
+ - `crud.list` → `read.access` (plus `read.pageSize` / `read.maxPageSize`)
805
+ - `crud.get` → `read.access` (single-record GET inherits automatically)
806
+ - Top-level `views: {...}` → `read.views: {...}`
1168
807
  - `crud.list.fields` / `crud.get.fields` → declare a named view under `read.views` and call `/views/{name}`
1169
808
 
1170
- **Pre-record access ordering on `/:id`**: handlers now run a role-only
1171
- access check **before** the firewall query, so a caller without a matching
1172
- role gets 403 before the database is touched. This closes the 404-vs-403
1173
- ID-probe channel — an unauthorized caller can no longer distinguish "row
1174
- exists in another tenant" from "row doesn't exist." See
1175
- [Access evaluation order](/compiler/definitions/access#evaluation-order).
1176
-
1177
- **Transactional batch operations**: batch endpoints now expose a
1178
- `failFast` option (replacing the old `atomic` naming) and a
1179
- `meta.transactional` response field. On tx-supporting providers
1180
- (postgres, supabase, neon, libsql, better-sqlite3, bun-sqlite), `failFast: true`
1181
- wraps the per-record loop in `db.transaction(...)` so any failure rolls
1182
- back the entire batch. On Cloudflare D1 (no `db.transaction`), `failFast: true`
1183
- still stops on the first error but prior writes stay committed; inspect
1184
- `meta.transactional` to know which guarantee you got. Embedding queue
1185
- messages and realtime broadcasts are emitted **after** the transaction
1186
- commits, so a rolled-back batch produces no orphan jobs. See
1187
- [Batch Operations: Transactional semantics](/compiler/targets/hono-api/using-the-api/batch-operations#transactional-semantics).
1188
-
1189
- **`firewallErrorMode` lifted off the firewall block**: the field that
1190
- controls 403-vs-404 on firewall misses now lives at the resource top level
1191
- (sibling to `firewall:`), since the firewall config is now a predicate
1192
- array and this is a presentation-layer choice. Existing `firewall.errorMode`
1193
- values should be lifted to `firewallErrorMode` at the resource level.
1194
-
1195
- **Read-only resources**: an empty `crud: {}` block (or omitting `crud:`
1196
- entirely) is valid for read-only resources. `read:` alone is enough to
1197
- expose `GET /` and `GET /:id`.
1198
-
1199
- **Strict-mode top-level keys**: the strict allow-list now includes `dev` so
1200
- `defineConfig({ dev: { ... } })` is accepted at the top level.
1201
-
1202
- ---
1203
-
1204
- ## v0.8.7 — April 17, 2026
809
+ ### Pre-record access ordering
1205
810
 
1206
- ### Security: Hono CVE cluster fix
811
+ Handlers on `/:id` run a role-only access check before the firewall query. A caller without a matching role gets 403 before the database is touched. This closes the 404-vs-403 ID-probe channel — an unauthorized caller can no longer distinguish "row exists in another tenant" from "row doesn't exist." See [Access evaluation order](/compiler/definitions/access#evaluation-order).
1207
812
 
1208
- Hono is bumped to `^4.12.14` across the monorepo, the compiler Docker image's pre-installed deps, and every generator path that emits Hono into compiled projects. Older ranges (`^4.0.0` / `^4.5.0` / `^4.6.0` / `^4.7.11`) covered the vulnerable window. Recompile to pick up the fix in your generated project's `package.json`.
813
+ ### Transactional batch operations
1209
814
 
1210
- ### Cloudflare Email Sending is now in public beta
815
+ Batch endpoints expose `failFast` and a `meta.transactional` response field. On tx-supporting providers (postgres, supabase, neon, libsql, better-sqlite3, bun-sqlite), `failFast: true` wraps the per-record loop in `db.transaction(...)` so any failure rolls back the entire batch. On Cloudflare D1 (no `db.transaction`), `failFast: true` stops on the first error but prior writes stay committed.
1211
816
 
1212
- Quickback already defaults to the Workers `send_email` binding for Cloudflare deploys, and Cloudflare Email Sending has now graduated to public beta — production-ready with zero-config, no API keys, no third-party accounts. No action needed; recompiling any existing project continues to wire the default Cloudflare transport. AWS SES remains a fully supported opt-in (`email.provider: 'aws-ses'`) for non-Cloudflare runtimes or existing SES setups. See [Email Configuration](/compiler/config#email-configuration).
817
+ Embedding queue messages and realtime broadcasts emit after the transaction commits — rolled-back batches produce no orphan jobs.
1213
818
 
1214
- ### Minor/patch dep sweep
1215
-
1216
- Aligned the whole dep surface — monorepo, compiler Docker image, and generator emissions into compiled projects — so new compiles and existing recompiles converge on the same versions:
1217
-
1218
- - `wrangler@^4.83.0`
1219
- - `drizzle-orm@^0.45.2`, `drizzle-kit@^0.31.10`
1220
- - `zod@^4.3.6`
1221
- - `@cloudflare/workers-types@^4.20260417.1` (also deduped — was accidentally declared in both `dependencies` and `devDependencies` in some paths)
1222
- - `@tanstack/react-query@^5.99.0` (Account app)
819
+ See [Batch Operations → Transactional semantics](/compiler/targets/hono-api/using-the-api/batch-operations#transactional-semantics).
1223
820
 
1224
821
  ---
1225
822
 
1226
- ## v0.8.5 — April 15, 2026
1227
-
1228
- ### Fix: Better Auth 1.5 and `@cloudflare/workers-types` Compatibility
823
+ ## v0.8.7 — April 17, 2026
1229
824
 
1230
- Generated API code failed to typecheck after Better Auth bumped to 1.5 and `@cloudflare/workers-types` tightened `BufferSource` to `ArrayBufferView<ArrayBuffer>`. Four unrelated surfaces broke:
825
+ ### Hono CVE bump
1231
826
 
1232
- - **`databaseHooks.member.update.after` was removed** in Better Auth 1.5. The compiler now emits the member role-change broadcast hook as `organizationHooks.afterUpdateMemberRole` inside the `organization()` plugin call, which is the current supported shape.
1233
- - **`REALTIME_URL` and `ACCESS_TOKEN`** are always emitted as optional `CloudflareBindings` fields when the organization plugin is active, so the broadcast hook typechecks even when `realtimeMode` is `"inline"` (or realtime isn't configured at all).
1234
- - **`auth.api.listOrganizations` / `getFullOrganization` / `session.session.activeOrganizationId`** — third-party Better Auth plugins narrow the inferred `auth.api` type and hide organization-plugin endpoints. The generated middleware and `/admin/v1/organizations` route now cast through `any` for these calls.
1235
- - **`crypto.subtle.sign` / `verify`** no longer accept `Uint8Array<ArrayBufferLike>` directly. Generated `jwt.ts` casts encoded payloads to `BufferSource`.
827
+ Hono is bumped to `^4.12.14` across the monorepo, the compiler Docker image's pre-installed deps, and every generator path that emits Hono into compiled projects. Older ranges covered the vulnerable window. Recompile to pick up the fix in your generated project's `package.json`.
1236
828
 
1237
- No config changes required — recompile to pick up the fixes.
829
+ ### Cloudflare Email Sending in public beta
1238
830
 
1239
- ### CMS Admin Gate Now Enforced Server-Side
831
+ Quickback defaults to the Workers `send_email` binding for Cloudflare deploys. Cloudflare Email Sending has graduated to public beta — production-ready with zero-config. AWS SES remains a fully supported opt-in (`email.provider: 'aws-ses'`) for non-Cloudflare runtimes. See [Email Configuration](/compiler/config#email-configuration).
1240
832
 
1241
- `cms: { access: "admin" }` previously only hid the CMS link in Account UI and rendered an "Access Denied" screen inside the SPA — the static assets, `/api/v1/schema`, and `/api/v1/custom_view` CRUD were reachable by any authenticated user. A non-admin with an API token or cookie could bypass the UI and read schema metadata or saved CMS views directly.
833
+ ### Dependency sweep
1242
834
 
1243
- This release adds server-side enforcement at every CMS-facing surface:
835
+ `wrangler@^4.83.0`, `drizzle-orm@^0.45.2`, `drizzle-kit@^0.31.10`, `zod@^4.3.6`, `@cloudflare/workers-types@^4.20260417.1`.
1244
836
 
1245
- - **CMS SPA shell** — the Worker checks `ctx.userRole === "admin"` before serving `index.html`. Unauthenticated requests redirect to login; authenticated non-admins get `403 Admin access required`. Static bundles (JS/CSS) remain reachable so browser caches aren't invalidated.
1246
- - **`/api/v1/schema`** — returns `403` to non-admins.
1247
- - **`custom_view` CRUD** — now gated on the new `userRole: ["admin"]` primitive rather than org membership.
1248
- - **In-SPA gate** — unchanged; defense in depth behind the server-side gates.
837
+ ---
1249
838
 
1250
- Your resource CRUD endpoints are unaffected — they keep their per-resource `crud.access.roles`.
839
+ ## v0.8.5 — April 15, 2026
1251
840
 
1252
- ### New `userRole` Access Primitive
841
+ ### `userRole` access primitive
1253
842
 
1254
- Added `userRole?: string[]` to the declarative `Access` config, evaluated against `ctx.userRole` (the Better Auth admin-plugin `user.role` column). This is distinct from `roles`, which matches `ctx.roles` (org membership).
843
+ A new `userRole?: string[]` field in the declarative `Access` config evaluates against `ctx.userRole` (the Better Auth admin-plugin `user.role` column). Distinct from `roles`, which matches `ctx.roles` (org membership).
1255
844
 
1256
845
  ```typescript
1257
- // Old: in multi-tenant this meant org-admin, not platform-admin
1258
- access: { roles: ['admin'] }
1259
-
1260
- // New: explicitly require user.role === 'admin' regardless of org membership
1261
- access: { userRole: ['admin'] }
1262
-
1263
- // "Org owner OR platform admin"
846
+ // Org owner OR platform admin
1264
847
  access: { or: [{ roles: ['owner'] }, { userRole: ['admin'] }] }
1265
848
 
1266
849
  // Platform admins see SSNs across every org
1267
850
  masking: { ssn: { type: 'ssn', show: { userRole: ['admin'] } } }
1268
851
  ```
1269
852
 
1270
- `userRole` works everywhere `Access` is accepted — CRUD, actions, views, masking, and inside `or`/`and` combinators. See [Access - userRole vs roles](/compiler/definitions/access#userrole-vs-roles).
1271
-
1272
- ### Fix: `ReferenceError: customAlphabet is not defined` in generated POST handlers
1273
-
1274
- Projects with `providers.database.config.generateId: "short"` (or `"nanoid"` / `"cuid"`) compiled routes that called the ID helper but never imported it. Every generated `src/features/**/*.routes.ts` had `customAlphabet('0123...', 6)()` in its POST body but no matching `import { customAlphabet } from 'nanoid';` at the top of the file. Every `POST /api/v1/<resource>` and batch-create returned `500` with `ReferenceError: customAlphabet is not defined` on the first write.
1275
-
1276
- The compiler now emits the correct import alongside the ID expression for all three modes: `nanoid`, `customAlphabet`, and `createId` from `@paralleldrive/cuid2`.
1277
-
1278
- No config changes required — recompile to pick up the fix.
1279
-
1280
- ### Fix: Dangling `export const` in generated `actions.ts` breaks `tsc`
1281
-
1282
- When a feature authored actions as `export const xActions = defineActions(...)` (instead of `export default defineActions(...)`), the compiler's preamble extractor leaked the assignment's left-hand side into the generated `src/features/<feature>/actions.ts`. The output contained a dangling `export const xActions =` with no right-hand side, and `tsc --noEmit` failed with `TS1109: Expression expected`. Runtime happened to work because the unused placeholder was never evaluated, but typecheck was red.
1283
-
1284
- The preamble extractor now anchors its boundary to the start of the top-level statement containing `defineActions(...)`, covering `export default`, `export const X =`, `const X =`, and bare call forms. Local Zod helper declarations above the call continue to be preserved.
1285
-
1286
- ### Fix: Files worker `database_id` reverted to `"local-files"` on every compile
1287
-
1288
- Projects using the two-worker R2 architecture had their files worker's `wrangler.toml` (`apps/backend/cloudflare-workers/files/wrangler.toml`) rewritten with `database_id = "local-files"` on every `quickback compile`, even when `providers.database.config.filesDatabaseId` was set to a real D1 UUID. The main worker's binding was correct — only the files worker fell through. Remote deploys of the files worker bound to a non-existent D1, so file serving and access-control reads failed with a binding error.
1289
-
1290
- The files-worker wrangler generator now reads `filesDatabaseId` (and `filesDatabaseName`) from `providers.database.config` as a fallback when they aren't set on `providers.fileStorage.config`, matching the precedence chain already used by the main worker. Local dev is unaffected — `wrangler dev --local` uses `.wrangler/state/` regardless of the configured ID.
1291
-
1292
- No config changes required — recompile and redeploy the files worker.
1293
-
1294
- ---
1295
-
1296
- ## v0.8.6 — April 16, 2026
1297
-
1298
- ### Fix: Audit columns silently dropped from tables with a same-line index callback
1299
-
1300
- Tables authored with the composite-index shape Drizzle / prettier produces —
1301
-
1302
- ```ts
1303
- export const episodeTags = sqliteTable("episode_tags", {
1304
- id: text("id").primaryKey(),
1305
- episodeId: text("episode_id").notNull(),
1306
- tagId: text("tag_id").notNull(),
1307
- }, (t) => [ // <-- "}, (t) =>" on one line
1308
- uniqueIndex("episode_tag_unique").on(t.episodeId, t.tagId),
1309
- ]);
1310
- ```
1311
-
1312
- never received audit field injection. A regex in `injectAuditFields` required a literal `\n` between the columns-object `},` and the `(t) =>` index callback, so same-line closers were silently skipped and the function returned the source unchanged. drizzle-kit then diffed the audit-less schema against the previous snapshot and emitted `ALTER TABLE ... DROP COLUMN created_at/modified_at/deleted_at/created_by/modified_by/deleted_by` for every affected table. Any project that applied those migrations had production CRUD return `500` because the generated firewall helper still referenced `deletedAt`.
1313
-
1314
- The regex is now whitespace-flexible and the identifier class accepts any valid JS identifier (`t`, `table`, `_t`, `tbl2`). A defensive guard throws at compile time if all three terminator patterns fail on a recognizable Drizzle table — no more silent drops.
853
+ `userRole` works everywhere `Access` is accepted — CRUD, actions, views, masking, and inside `or` / `and` combinators. See [Access → userRole vs roles](/compiler/definitions/access#userrole-vs-roles).
1315
854
 
1316
- **Recovery path:**
855
+ ### CMS admin gate enforced server-side
1317
856
 
1318
- - Most projects: recompile. drizzle-kit will detect the audit columns are missing from the DB snapshot and emit an `ADD COLUMN` migration to restore them. Apply it.
1319
- - Projects that already hand-patched their schema and ran a manual `ADD COLUMN` migration (like the `podcast-app` workaround in commit `98d8758`): the next compile will regenerate a matching `ADD COLUMN` migration that will fail with "duplicate column name" against a DB that already has the columns. Mark the new migration as applied without running it (e.g. `INSERT INTO __drizzle_migrations` in the features DB) or hand-edit the generated SQL to a no-op, then continue normally.
857
+ `cms: { access: "admin" }` previously only hid the CMS link in Account UI and rendered an "Access Denied" screen inside the SPA. Server-side enforcement now applies at every CMS-facing surface: the SPA shell, `/api/v1/schema`, and `custom_view` CRUD.
1320
858
 
1321
- ### Fix: `firewall.exception` generated `isNull(<table>.deletedAt)` against a missing column
859
+ ### Better Auth 1.5 + `@cloudflare/workers-types` compatibility
1322
860
 
1323
- Resources with `firewall: { exception: true }` always emitted `return isNull(<table>.deletedAt);` inside `buildFirewallConditions()`, regardless of whether the table actually had a `deletedAt` column. Projects that disabled audit injection globally (`compiler.features.auditFields: false`) or authored a schema without `deletedAt` ended up with Drizzle resolving `<table>.deletedAt` to `undefined` at query time — every `GET /api/v1/<resource>` returned `500`.
1324
-
1325
- The three concerns are now fully independent:
1326
-
1327
- - **`firewall.exception: true`** — only disables tenant scoping (org/user/team `WHERE` clauses). It does not gate audit fields or soft-delete.
1328
- - **Audit fields** — always injected unless globally opted out. Unchanged.
1329
- - **Soft-delete filter** — emitted only when the schema actually has `deletedAt` *or* the user explicitly set `firewall.softDelete`.
1330
-
1331
- In the default configuration (audit injection on), behavior is unchanged: exception resources still filter `deletedAt IS NULL`. Only the broken case changes — exception resources on a schema without `deletedAt` now return `undefined` (no firewall), matching the column reality.
1332
-
1333
- No config changes required — recompile to pick up the fix.
861
+ Generated API code typechecks against the new versions. The org-member role-change broadcast hook is emitted via `organizationHooks.afterUpdateMemberRole` (the supported shape after the 1.5 deprecation of `databaseHooks.member.update.after`). `REALTIME_URL` and `ACCESS_TOKEN` are always emitted as optional bindings when the organization plugin is active.
1334
862
 
1335
863
  ---
1336
864
 
1337
865
  ## v0.8.4 — April 14, 2026
1338
866
 
1339
- ### New `generateId: "short"` Strategy
867
+ ### `generateId: "short"` strategy
1340
868
 
1341
- Added a compact ID option for tables where short, shareable codes matter more than collision resistance at scale:
869
+ A compact ID option for tables where short, shareable codes matter more than collision resistance at scale:
1342
870
 
1343
871
  ```typescript
1344
872
  providers: {
1345
- database: defineDatabase("cloudflare-d1", {
1346
- generateId: "short",
1347
- }),
873
+ database: defineDatabase("cloudflare-d1", { generateId: "short" }),
1348
874
  }
1349
875
  ```
1350
876
 
1351
- Generates 6-character alphanumeric IDs (e.g. `a3F9xK`) using nanoid's `customAlphabet` with the full 62-char alphabet (`0-9A-Za-z`). Requires the `nanoid` package in your project (same as the existing `"nanoid"` strategy).
877
+ Generates 6-character alphanumeric IDs (e.g. `a3F9xK`) using nanoid's `customAlphabet` with the full 62-char alphabet (`0-9A-Za-z`). Requires the `nanoid` package.
1352
878
 
1353
- **When to use:** room codes, invite links, share URLs, ephemeral records — anywhere the ID appears in a URL or needs to be human-typeable.
879
+ **When to use:** room codes, invite links, share URLs, ephemeral records.
1354
880
 
1355
- **When not to use:** high-volume tables. 62^6 ≈ 56.8B combinations means ~238K rows before a 50% collision probability (birthday bound). For large tables stick with `"uuid"`, `"cuid"`, or `"prefixed"`.
1356
-
1357
- See [Providers - ID Generation Options](/compiler/config/providers#id-generation-options) for the full list of strategies.
1358
-
1359
- ---
1360
-
1361
- ## v0.8.3 — April 14, 2026
1362
-
1363
- ### Fix: `wrangler.toml` Route Placement and Binding IDs
1364
-
1365
- Two bugs in the generated `wrangler.toml` that blocked production deployment without manual edits:
1366
-
1367
- **Routes were nested under `[dev]`.** The `routes = [...]` array was emitted after the `[dev]` section header, so TOML parsed it as `dev.routes` and wrangler ignored the custom domain (warning: `Unexpected fields found in dev field: "routes"`). Routes now emit as a top-level key.
1368
-
1369
- **D1 and KV bindings used placeholder IDs.** Despite `databaseId`, `filesDatabaseId`, and `kvId` being set in the quickback config, the generated `wrangler.toml` wrote `"local-features"`, `"local-files"`, and `"local"` instead of the real UUIDs. The compiler now resolves IDs from multiple config sources:
1370
-
1371
- | Binding | Config sources checked (in order) |
1372
- |---------|-----------------------------------|
1373
- | `AUTH_DB` | `database.config.authDatabaseId` |
1374
- | `DB` | `database.config.featuresDatabaseId`, `database.config.databaseId` |
1375
- | `FILES_DB` | `fileStorage.config.filesDatabaseId`, `database.config.filesDatabaseId` |
1376
- | `KV` | `database.config.kvNamespaceId`, `storage.config.namespaceId`, `auth.config.kvId` |
1377
-
1378
- See [Providers - Database Options](/compiler/config/providers#database-options) for the full list of supported ID properties.
1379
-
1380
- ### Fix: Account SPA Post-Login Redirect on Unified Domain
1381
-
1382
- When the Account SPA was served at `/account/` on the unified quickback domain (e.g. `secure.example.com/account/`), post-login redirects dropped the basepath and sent users to `/dashboard` instead of `/account/dashboard`. Sign-out redirects had the same issue.
1383
-
1384
- The SPA now shares a basepath module across the router and all raw `window.location.href` assignments, so login, signup, email OTP, welcome, and sign-out flows all stay under the correct path prefix regardless of whether the SPA is on the unified domain or its own dedicated auth subdomain.
1385
-
1386
- No config changes required — recompile to pick up the fix.
881
+ **When not to use:** high-volume tables. 62^6 ≈ 56.8B combinations means ~238K rows before a 50% collision probability. For large tables stick with `"uuid"`, `"cuid"`, or `"prefixed"`. See [Providers → ID Generation Options](/compiler/config/providers#id-generation-options).
1387
882
 
1388
883
  ---
1389
884
 
1390
885
  ## v0.8.2 — April 11, 2026
1391
886
 
1392
- ### Catch-All `VITE_QUICKBACK_URL` Environment Variable
887
+ ### Catch-all `VITE_QUICKBACK_URL`
1393
888
 
1394
- Instead of setting four separate URL env vars, you can now point at a single Quickback origin:
889
+ A single Quickback origin can be set in place of four separate URL env vars:
1395
890
 
1396
891
  ```bash
1397
- # One variable — done.
1398
892
  VITE_QUICKBACK_URL=https://secure.example.com
1399
893
  ```
1400
894
 
1401
- When set, it's used as a fallback for the individual URLs:
1402
-
1403
895
  | Individual var (explicit) | Fallback when unset |
1404
896
  |---|---|
1405
897
  | `VITE_QUICKBACK_API_URL` | `${VITE_QUICKBACK_URL}` |
1406
898
  | `VITE_QUICKBACK_ACCOUNT_URL` | `${VITE_QUICKBACK_URL}/account` |
1407
899
  | `VITE_QUICKBACK_CMS_URL` | `${VITE_QUICKBACK_URL}/cms` |
1408
900
 
1409
- `VITE_QUICKBACK_APP_URL` stays independent — it points at the tenant's own frontend, not the Quickback server.
1410
-
1411
- **Non-breaking.** Individual vars still take precedence when set, so existing configurations work unchanged. The compiler now also emits `VITE_QUICKBACK_URL` into the generated SPA `.env` files, and library users can set `__QUICKBACK_URL__` on `globalThis` for the same effect.
1412
-
1413
- See [Environment Variables](/stack/account-ui/environment-variables) for the full reference.
901
+ `VITE_QUICKBACK_APP_URL` stays independent — it points at the tenant's own frontend. Non-breaking; individual vars take precedence when set. Library users can set `__QUICKBACK_URL__` on `globalThis`. See [Environment Variables](/stack/account-ui/environment-variables).
1414
902
 
1415
903
  ---
1416
904
 
1417
905
  ## v0.8.1 — April 9, 2026
1418
906
 
1419
- ### Role Hierarchy with `+` Suffix
907
+ ### Role hierarchy with `+` suffix
1420
908
 
1421
- You can now define a role hierarchy in your config and use the `+` suffix in access rules to mean "this role and above":
909
+ Define a hierarchy and use `+` to mean "this role and above":
1422
910
 
1423
911
  ```typescript
1424
- // quickback.config.ts
1425
- auth: {
1426
- roleHierarchy: ['member', 'admin', 'owner'],
1427
- }
912
+ auth: { roleHierarchy: ['member', 'admin', 'owner'] }
1428
913
 
1429
- // In resource definitions
1430
914
  crud: {
1431
915
  list: { access: { roles: ["member+"] } }, // member, admin, owner
1432
916
  create: { access: { roles: ["admin+"] } }, // admin, owner
@@ -1434,15 +918,15 @@ crud: {
1434
918
  }
1435
919
  ```
1436
920
 
1437
- Roles are expanded at compile time. No `+` = exact match. See [Access - Role Hierarchy](/compiler/definitions/access#role-hierarchy) for details.
921
+ Roles are expanded at compile time. No `+` = exact match. See [Access → Role Hierarchy](/compiler/definitions/access#role-hierarchy).
1438
922
 
1439
923
  ---
1440
924
 
1441
925
  ## v0.8.0 — April 9, 2026
1442
926
 
1443
- ### Breaking: VITE URL Environment Variables Renamed
927
+ ### Breaking: VITE URL environment variables namespaced
1444
928
 
1445
- All Quickback-generated URL environment variables are now namespaced under `VITE_QUICKBACK_*` to avoid collisions with other Vite projects.
929
+ All Quickback-generated URL environment variables are namespaced under `VITE_QUICKBACK_*` to avoid collisions with other Vite projects.
1446
930
 
1447
931
  | Old | New |
1448
932
  |-----|-----|
@@ -1451,129 +935,58 @@ All Quickback-generated URL environment variables are now namespaced under `VITE
1451
935
  | `VITE_APP_URL` | `VITE_QUICKBACK_APP_URL` |
1452
936
  | `VITE_CMS_URL` | `VITE_QUICKBACK_CMS_URL` |
1453
937
 
1454
- **Non-URL variables are unchanged:** `VITE_ENABLE_*` feature flags, branding vars (`VITE_APP_NAME`, etc.), and `VITE_STRIPE_PUBLISHABLE_KEY` stay as-is.
938
+ Non-URL variables are unchanged (`VITE_ENABLE_*`, branding vars, `VITE_STRIPE_PUBLISHABLE_KEY`).
1455
939
 
1456
940
  **Action required:**
1457
- - **Compiled projects** — re-run `quickback compile`. The compiler generates the new names automatically.
1458
- - **Standalone deploys** — update `.env`, `.env.production`, and `wrangler.toml` files manually.
1459
- - **Library users** — the `__QUICKBACK_API_URL__` / `__QUICKBACK_APP_URL__` globalThis names are unchanged, but if you pipe Vite env vars into them, update the var names.
1460
-
1461
- See [Environment Variables](/stack/account-ui/environment-variables) for the full reference.
1462
-
1463
- ### CMS Access Control
1464
-
1465
- The `cms.access` config option now enforces access at the CMS level, not just link visibility in Account UI.
1466
-
1467
- ```typescript
1468
- cms: { access: "admin" }
1469
- ```
1470
-
1471
- When set to `"admin"`, non-admin users (`user.role !== "admin"`) see an "Access Denied" screen with a sign-out button instead of the CMS. When set to `"user"` (the default), any authenticated user can access the CMS.
941
+ - Compiled projects: re-run `quickback compile`.
942
+ - Standalone deploys: update `.env`, `.env.production`, and `wrangler.toml` files manually.
943
+ - Library users: `__QUICKBACK_API_URL__` / `__QUICKBACK_APP_URL__` globals are unchanged.
1472
944
 
1473
- See [CMS Connecting](/stack/cms/connecting) and [Compiler Config](/compiler/config) for details.
945
+ ### CMS access control
1474
946
 
1475
- ### SPA Sub-Route Fix
1476
-
1477
- Fixed a bug where hard-refreshing or directly navigating to SPA sub-routes (e.g., `/account/profile`, `/cms/tables/users`) returned a blank white screen. The Worker now correctly serves `index.html` for all SPA paths, allowing the client-side router to handle routing.
947
+ `cms.access: "admin"` enforces access at the CMS level, not just link visibility. Non-admin users (`user.role !== "admin"`) see an "Access Denied" screen with a sign-out button.
1478
948
 
1479
949
  ---
1480
950
 
1481
951
  ## v0.5.11 — February 24, 2026
1482
952
 
1483
- ### Email OTP & Auth Fixes
1484
-
1485
- - Fixed email-OTP magic links not working correctly
1486
- - Removed deprecated `/internal/validate` endpoint — use standard Better Auth session validation instead
1487
- - Auth is now required for all API routes when running locally (previously some routes were unprotected in dev)
1488
-
1489
- ### Multiple Table Exports Fix
1490
-
1491
- - Fixed a compiler error when a single file exports multiple Drizzle tables alongside a `defineTable()` default export
1492
- - The CLI now properly detects and reports this with a clear error message pointing to the fix
1493
-
1494
- ### Headless Drizzle Rename Hints
953
+ ### Mandatory unsafe action audit trail
1495
954
 
1496
- - Added `compiler.migrations.renames` configuration for CI/CD environments where Drizzle's interactive rename prompts would block compilation
1497
- - Compile errors now include explicit rename key paths and fail fast on malformed rename config keys
1498
- - See [Configuration](/compiler/config) for details
955
+ Structured `unsafe` config (`unsafe: { reason, adminOnly, crossTenant, targetScope }`). Cross-tenant unsafe actions require Better Auth authentication plus platform admin role (`ctx.userRole === "admin"`). Mandatory audit logging on success, denial, and error paths. Cloudflare output includes `AUDIT_DB` wiring, `drizzle.audit.config.ts`, and `db:migrate:audit:*` scripts when unsafe actions are present.
1499
956
 
1500
- ### Security Contract Report Artifacts
957
+ Compile-time raw SQL guard for actions and handlers (`allowRawSql: true` required per action).
1501
958
 
1502
- - Added generated security contract artifacts to compiler output:
1503
- - `reports/security-contracts.report.json`
1504
- - `reports/security-contracts.report.sig.json`
1505
- - Added config-driven signing controls:
1506
- - `compiler.securityContracts.report.signature.enabled`
1507
- - `compiler.securityContracts.report.signature.required`
1508
- - `compiler.securityContracts.report.signature.key` / `keyEnv` / `keyId`
1509
- - Missing required signing keys now fail loudly with explicit remediation guidance
1510
- - Added strict config validation for report/signature paths and signing options
959
+ ### Security contract report artifacts
1511
960
 
1512
- ### Mandatory Unsafe Action Audit Trail
961
+ Generated security contract artifacts: `reports/security-contracts.report.json`, `reports/security-contracts.report.sig.json`. Config-driven signing controls (`compiler.securityContracts.report.signature.*`). Missing required signing keys fail loudly with explicit remediation.
1513
962
 
1514
- - Added structured unsafe action config (`unsafe: { reason, adminOnly, crossTenant, targetScope }`)
1515
- - Cross-tenant unsafe actions now require Better Auth authentication plus platform admin role (`ctx.userRole === "admin"`)
1516
- - Added mandatory audit logging for unsafe cross-tenant actions (success, denial, and error paths)
1517
- - Cloudflare output now includes optional `AUDIT_DB` wiring, `drizzle.audit.config.ts`, and `db:migrate:audit:*` scripts when unsafe actions are present
1518
- - Added compile-time raw SQL guard for actions and handlers (`allowRawSql: true` required per action)
963
+ ### Headless Drizzle rename hints
1519
964
 
1520
- ---
1521
-
1522
- ## v0.5.10 — February 19, 2026
1523
-
1524
- ### Compiler Page Parsing & CLI Output
965
+ `compiler.migrations.renames` configuration for CI/CD environments where Drizzle's interactive rename prompts block compilation. See [Configuration](/compiler/config).
1525
966
 
1526
- - Improved compiler page parsing for `definePage()` definitions
1527
- - Better CLI output formatting during compilation
1528
- - Added `apiPath` to schema registry for CMS integration
967
+ ### Minor
1529
968
 
1530
- ### Bug Fixes
1531
-
1532
- - Fixed hyphenated action names not being properly quoted in generated code (e.g., `mark-complete` now generates valid JavaScript)
1533
- - API key authentication (`x-api-key` header) is now handled separately from session tokens (`Bearer` header)
1534
-
1535
- ---
1536
-
1537
- ## v0.5.9 — February 16, 2026
1538
-
1539
- ### CMS Pages & CLI Page Support
1540
-
1541
- - Added `definePage()` support for CMS-managed pages
1542
- - Auth middleware improvements for page routes
1543
- - CLI now supports page definitions alongside table and action definitions
969
+ - Email OTP magic links work correctly.
970
+ - Auth is required for all API routes when running locally.
971
+ - Single-file multi-table exports alongside `defineTable()` produce a clear error.
1544
972
 
1545
973
  ---
1546
974
 
1547
975
  ## v0.5.8 — February 14, 2026
1548
976
 
1549
- ### CMS App
1550
-
1551
- - Introduced the Quickback CMS — a schema-driven admin panel that connects to your generated API
1552
- - CMS namespace added to actions for admin-specific operations
1553
- - Fixed `guard` → `access` naming inconsistency in CMS action definitions
1554
-
1555
- ### Schema Registry & Firewall Improvements
977
+ ### Quickback CMS
1556
978
 
1557
- - Added schema registry generator — the compiler now outputs a JSON schema registry used by the CMS
1558
- - Firewall error modes: choose between `reveal` (403 with details) and `hide` (opaque 404) for security-sensitive deployments
1559
-
1560
- ### Bug Fixes
1561
-
1562
- - Fixed anonymous user email format generation
1563
- - Organization selector improvements in Account UI
1564
- - Config validation now catches more errors at compile time
1565
- - Better CRUD error handling with structured error responses
1566
- - Fixed masking to use representative star counts instead of fixed formatting
979
+ A schema-driven admin panel that connects to your generated API. The compiler now outputs a JSON schema registry consumed by the CMS at runtime. Firewall error modes (`reveal` for 403 with details, `hide` for opaque 404) are configurable per resource for security-sensitive deployments.
1567
980
 
1568
981
  ---
1569
982
 
1570
983
  ## v0.5.7 — February 12, 2026
1571
984
 
1572
- ### Scoped Database for Actions
985
+ ### Scoped database for actions
1573
986
 
1574
- Actions now receive a **security-scoped database** instead of a raw Drizzle instance. The compiler generates a proxy wrapper that automatically enforces org isolation, owner filtering, and soft-delete visibility — the same protections that CRUD routes have always had.
987
+ Actions receive a security-scoped database instead of a raw Drizzle instance. The compiler generates a proxy wrapper that automatically enforces org isolation, owner filtering, and soft-delete visibility — the same protections that CRUD routes have always had.
1575
988
 
1576
- The scoped DB uses duck-typed column detection at runtime:
989
+ Duck-typed column detection at runtime:
1577
990
 
1578
991
  | Column Detected | SELECT / UPDATE / DELETE | INSERT |
1579
992
  |---|---|---|
@@ -1581,24 +994,9 @@ The scoped DB uses duck-typed column detection at runtime:
1581
994
  | `ownerId` | Adds `WHERE ownerId = ?` | Auto-injects `ownerId` from context |
1582
995
  | `deletedAt` | Adds `WHERE deletedAt IS NULL` | — |
1583
996
 
1584
- This means **every action is secure by default** — no manual `WHERE` clauses needed.
997
+ Every action is secure by default — no manual `WHERE` clauses needed.
1585
998
 
1586
- ```typescript
1587
- defineActions(todos, {
1588
- complete: {
1589
- type: "record",
1590
- execute: async ({ db, ctx, record, input }) => {
1591
- // db is scoped — only sees records in user's org, excludes soft-deleted
1592
- const siblings = await db.select().from(todos);
1593
- // ↑ automatically filtered to ctx.activeOrgId + deletedAt IS NULL
1594
- },
1595
- },
1596
- });
1597
- ```
1598
-
1599
- #### Unsafe Mode
1600
-
1601
- Actions that intentionally need to bypass security (admin reports, cross-org queries, migrations) can declare `unsafe: true` to receive a raw, unscoped database handle:
999
+ Actions that intentionally need to bypass security (admin reports, cross-org queries, migrations) can declare `unsafe: true` to receive a raw, unscoped database handle via `rawDb`:
1602
1000
 
1603
1001
  ```typescript
1604
1002
  defineActions(analytics, {
@@ -1613,108 +1011,45 @@ defineActions(analytics, {
1613
1011
  });
1614
1012
  ```
1615
1013
 
1616
- Without `unsafe: true`, `rawDb` is `undefined`.
1617
-
1618
- **Related docs:** [Actions](/compiler/definitions/actions), [Actions API](/compiler/targets/hono-api/using-the-api/actions-api)
1014
+ Without `unsafe: true`, `rawDb` is `undefined`. See [Actions](/compiler/definitions/actions).
1619
1015
 
1620
- ---
1621
-
1622
- ### Cascading Soft Delete
1623
-
1624
- Soft-deleting a parent record now **automatically cascades** to child and junction tables within the same feature. The compiler detects foreign key references at build time and generates cascade UPDATE statements.
1016
+ ### Cascading soft delete
1625
1017
 
1626
- ```
1627
- DELETE /api/v1/projects/:id
1628
- ```
1629
-
1630
- Generated behavior:
1631
- ```typescript
1632
- // 1. Soft delete the parent
1633
- await db.update(projects)
1634
- .set({ deletedAt: now, deletedBy: userId })
1635
- .where(eq(projects.id, id));
1636
-
1637
- // 2. Auto-cascade to children (compiler-generated)
1638
- await db.update(projectMembers)
1639
- .set({ deletedAt: now, deletedBy: userId })
1640
- .where(eq(projectMembers.projectId, id));
1641
-
1642
- await db.update(projectTasks)
1643
- .set({ deletedAt: now, deletedBy: userId })
1644
- .where(eq(projectTasks.projectId, id));
1645
- ```
1018
+ Soft-deleting a parent record automatically cascades to child and junction tables within the same feature. The compiler detects foreign key references at build time and generates cascade `UPDATE` statements.
1646
1019
 
1647
1020
  Rules:
1648
- - Only applies to **soft delete** (the default). Hard delete relies on database-level `ON DELETE CASCADE`.
1649
- - Only cascades within the **same feature** — cross-feature references are not affected.
1650
- - Child tables must have `deletedAt` / `deletedBy` columns (auto-added by the compiler's audit fields).
1021
+ - Applies to soft delete only. Hard delete relies on database-level `ON DELETE CASCADE`.
1022
+ - Cascades within the same feature only — cross-feature references are not affected.
1023
+ - Child tables must have `deletedAt` / `deletedBy` columns (auto-added by the compiler).
1651
1024
 
1652
- **Related docs:** [Actions API — Cascading Soft Delete](/compiler/targets/hono-api/using-the-api/actions-api#cascading-soft-delete)
1653
-
1654
- ---
1025
+ See [Actions API → Cascading Soft Delete](/compiler/targets/hono-api/using-the-api/actions-api#cascading-soft-delete).
1655
1026
 
1656
- ### Advanced Query Parameters
1027
+ ### Advanced query parameters
1657
1028
 
1658
- New query parameter capabilities for all list endpoints:
1029
+ New capabilities for all list endpoints:
1659
1030
 
1660
- - **Field selection** — `?fields=id,name,status` returns only the columns you need
1661
- - **Multi-sort** — `?sort=status:asc,createdAt:desc` sorts by multiple fields
1662
- - **Total count** — `?count=true` returns total matching records in response headers (`X-Total-Count`)
1031
+ - **Field selection** — `?fields=id,name,status`
1032
+ - **Multi-sort** — `?sort=status:asc,createdAt:desc`
1033
+ - **Total count** — `?count=true` returns total matching records in `X-Total-Count`
1663
1034
  - **Full-text search** — `?search=keyword` searches across all text columns
1664
1035
 
1665
- ```bash
1666
- # Get only names and statuses, sorted by status then date, with total count
1667
- GET /api/v1/todos?fields=id,name,status&sort=status:asc,createdAt:desc&count=true
1668
-
1669
- # Search across all text fields
1670
- GET /api/v1/todos?search=urgent
1671
- ```
1672
-
1673
- **Related docs:** [Query Parameters](/compiler/targets/hono-api/using-the-api/query-params)
1674
-
1675
- ---
1676
-
1677
- ### Audit Field Improvements
1678
-
1679
- - `deletedAt` and `deletedBy` fields are now **always injected** by the compiler for tables with soft delete enabled — no need to define them in your schema
1680
- - All audit fields (`createdAt`, `createdBy`, `modifiedAt`, `modifiedBy`, `deletedAt`, `deletedBy`) are auto-managed
1681
-
1682
- ---
1683
-
1684
- ## v0.5.6 — February 8, 2026
1685
-
1686
- ### Database Naming Conventions
1687
-
1688
- - Default table and column naming changed to **snake_case** with `usePlurals: false`
1689
- - Table names derived from generated Better Auth schema for consistency
1690
- - Removed legacy single-database mode — split databases (auth + features) is now the standard
1691
-
1692
- ### Auth Variable Shadowing Fix
1693
-
1694
- - Fixed `member` variable in auth middleware that shadowed the Drizzle `member` table import
1695
- - Renamed to `sessionMember` to avoid conflicts in generated routes
1036
+ See [Query Parameters](/compiler/targets/hono-api/using-the-api/query-params).
1696
1037
 
1697
1038
  ---
1698
1039
 
1699
1040
  ## v0.5.5 — February 5, 2026
1700
1041
 
1701
- ### Better Auth Plugins
1042
+ ### OpenAPI spec generation
1702
1043
 
1703
- - Published `@quickback-dev/better-auth-upgrade-anonymous` v1.1.0 — post-passkey email collection flow
1704
- - Published `@quickback-dev/better-auth-combo-auth` — combined email + password + OTP authentication
1705
- - Published `@quickback-dev/better-auth-aws-ses` — AWS SES email provider for Better Auth
1044
+ Generated APIs include a full OpenAPI specification at `/openapi.json`. Better Auth endpoints are included in the spec.
1706
1045
 
1707
- ### OpenAPI Spec Generation
1046
+ ### Better Auth plugins
1708
1047
 
1709
- - Generated APIs now include a full OpenAPI specification at `/openapi.json`
1710
- - Better Auth endpoints included in the spec
1711
- - Runtime route: `GET /openapi.json`
1048
+ Published `@quickback-dev/better-auth-upgrade-anonymous` (post-passkey email collection flow), `@quickback-dev/better-auth-combo-auth` (combined email + password + OTP), and `@quickback-dev/better-auth-aws-ses` (AWS SES email provider).
1712
1049
 
1713
- ### Security Hardening
1050
+ ### Security headers
1714
1051
 
1715
- - Global error handler prevents leaking internal error details
1716
- - Security headers middleware (CSP, HSTS, X-Frame-Options, X-Content-Type-Options)
1717
- - `BETTER_AUTH_SECRET` properly passed to generated config
1052
+ Global error handler prevents leaking internal error details. Security headers middleware (CSP, HSTS, X-Frame-Options, X-Content-Type-Options). `BETTER_AUTH_SECRET` properly passed to generated config.
1718
1053
 
1719
1054
  ---
1720
1055
 
@@ -1722,34 +1057,28 @@ GET /api/v1/todos?search=urgent
1722
1057
 
1723
1058
  ### Account UI
1724
1059
 
1725
- - Pre-built authentication UI deployed as Cloudflare Workers
1726
- - Features: sessions, organizations, passkeys, passwordless, admin panel, API keys
1727
- - Dual-mode: standalone (degit template) or embedded with Quickback projects
1060
+ Pre-built authentication UI deployed as Cloudflare Workers. Sessions, organizations, passkeys, passwordless, admin panel, API keys. Dual-mode: standalone (degit template) or embedded with Quickback projects.
1728
1061
 
1729
- ### Webhook System
1062
+ ### Webhook system
1730
1063
 
1731
- - Inbound webhook endpoints with signature verification
1732
- - Outbound webhooks via Cloudflare Queues with automatic retries
1733
- - Configurable per-feature webhook events
1064
+ Inbound webhook endpoints with signature verification. Outbound webhooks via Cloudflare Queues with automatic retries. Configurable per-feature webhook events.
1734
1065
 
1735
- ### Realtime & Vector Search
1066
+ ### Realtime & vector search
1736
1067
 
1737
- - Durable Objects + WebSocket realtime subscriptions
1738
- - Vector embeddings via Cloudflare Vectorize
1739
- - KV and R2 storage integrations
1068
+ Durable Objects + WebSocket realtime subscriptions. Vector embeddings via Cloudflare Vectorize. KV and R2 storage integrations.
1740
1069
 
1741
1070
  ---
1742
1071
 
1743
1072
  ## v0.5.0 — January 2026
1744
1073
 
1745
- ### Initial Release
1746
-
1747
- - **Quickback Compiler** — TypeScript-first backend compiler
1748
- - **Four Security Pillars** — Firewall, Access, Guards, Masking
1749
- - **`defineTable()`** — Schema + security configuration in a single file
1750
- - **Templates** — Cloudflare Workers, Bun standalone, B2B SaaS
1751
- - **Cloud Compiler** — Remote compilation via `compiler.quickback.dev`
1752
- - **CLI** — `quickback create`, `quickback compile`, `quickback init`
1753
- - **Better Auth Integration** — Organizations, roles, sessions
1754
- - **Drizzle ORM** — Schema-first with automatic migrations
1755
- - **Cloudflare D1** — Split database support (auth + features)
1074
+ ### Initial release
1075
+
1076
+ - **Quickback Compiler** — TypeScript-first backend compiler.
1077
+ - **Four security pillars** — Firewall, Access, Guards, Masking.
1078
+ - **`defineTable()`** — schema + security configuration in a single file.
1079
+ - **Templates** — Cloudflare Workers, B2B SaaS.
1080
+ - **Cloud compiler** — remote compilation via `compiler.quickback.dev`.
1081
+ - **CLI** — `quickback create`, `quickback compile`.
1082
+ - **Better Auth integration** — organizations, roles, sessions.
1083
+ - **Drizzle ORM** — schema-first with automatic migrations.
1084
+ - **Cloudflare D1** — split database support (auth + features).