@quickback-dev/cli 0.17.1 → 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.
- package/dist/docs/content.js +7 -7
- package/dist/docs/content.js.map +1 -1
- package/dist/skill/docs/changelog.md +398 -1214
- package/dist/skill/docs/compiler/cloud-compiler/cli.md +54 -33
- package/dist/skill/docs/compiler/cloud-compiler/index.md +9 -9
- package/dist/skill/docs/compiler/getting-started/template-cloudflare.md +49 -54
- package/dist/skill/docs/compiler/getting-started/templates.md +58 -56
- package/dist/skill/docs/index.md +9 -0
- package/dist/skill/docs/stack/index.md +8 -4
- package/package.json +1 -1
- package/src/skill/docs/changelog.md +459 -1215
- package/src/skill/docs/compiler/cloud-compiler/cli.md +54 -33
- package/src/skill/docs/compiler/cloud-compiler/index.md +9 -9
- package/src/skill/docs/compiler/config/domains.md +44 -10
- package/src/skill/docs/compiler/config/output.md +1 -1
- package/src/skill/docs/compiler/getting-started/template-cloudflare.md +49 -54
- package/src/skill/docs/compiler/getting-started/templates.md +58 -56
- package/src/skill/docs/index.md +9 -0
- package/src/skill/docs/stack/auth/plugins/index.md +74 -0
- package/src/skill/docs/stack/index.md +8 -4
|
@@ -1,108 +1,172 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## v0.18.0 — May 17, 2026
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
### `config.apps` — mount user-authored SPAs on dedicated hostnames
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The compiler now generates per-hostname Worker middleware for arbitrary user SPAs alongside the built-in CMS and Account UIs. Previously the only way to host a product app next to a Quickback API was a second Worker; `config.apps` brings the full stack — API, account, and product UI — onto one deployment with same-origin auth.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
apps: {
|
|
11
|
+
www: {
|
|
12
|
+
domain: "www.example.com",
|
|
13
|
+
aliasDomains: ["example.com"], // apex serves the same SPA
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
```
|
|
8
17
|
|
|
9
|
-
|
|
18
|
+
Each entry binds one or more hostnames to a directory under `src/apps/<name>/` and inherits the Account-domain pass-through behavior — `/api/`, `/auth/`, `/admin/`, `/storage/`, and `/health` route to Hono so the SPA fetches its API without CORS. The compiler:
|
|
10
19
|
|
|
11
|
-
|
|
20
|
+
- emits a `custom_domain = true` route in `wrangler.toml` for the primary hostname and every alias
|
|
21
|
+
- adds each hostname to Better Auth's `TRUSTED_ORIGINS` (when `trustedOrigins` is left unset)
|
|
22
|
+
- widens the CSP `connect-src` to cover the SPA-baked origins
|
|
23
|
+
- folds the new hostnames into shared-parent detection for `crossSubDomainCookies`
|
|
12
24
|
|
|
13
|
-
|
|
25
|
+
Drop the prebuilt SPA bundle at `quickback/apps/<name>/` — the existing source-apps passthrough copies it byte-for-byte into `src/apps/<name>/`. The compiler doesn't build the SPA; it only emits routing for whatever's already there. The names `cms`, `account`, and `public` are reserved; hostname collisions with `cms.domain` / `account.domain` / `account.adminDomain` or between two `apps[*]` entries fail at compile time.
|
|
14
26
|
|
|
15
|
-
-
|
|
16
|
-
- **Drop-only cleanup migrations** are reordered child-first when foreign-key dependencies require it.
|
|
17
|
-
- **Every generated D1 migration directory** is replayed against SQLite during compile, so a D1-breaking migration fails before `wrangler d1 migrations apply`.
|
|
27
|
+
When `cms` and `account` are both configured, the multi-domain catchall now explicitly skips app hostnames — an API miss on an app host returns the standard 404 JSON via `app.notFound` instead of stray-serving a sibling SPA's HTML shell.
|
|
18
28
|
|
|
19
|
-
|
|
29
|
+
### Cross-subdomain cookie inference handles apex aliases
|
|
20
30
|
|
|
21
|
-
|
|
31
|
+
The shared-parent detection that drives `advanced.crossSubDomainCookies` previously reduced any hostname by stripping the leftmost label — `'example.com'` collapsed to `'com'`, which broke equality against sibling subdomains. Apex hostnames (exactly two dot-segments) are now treated as already being the parent, so apex aliases (`example.com` listed alongside `www.example.com`) coexist cleanly with `auth.example.com` / `cms.example.com` and the compiler still emits `crossSubDomainCookies: { enabled: true, domain: '.example.com' }`.
|
|
22
32
|
|
|
23
33
|
---
|
|
24
34
|
|
|
25
|
-
## v0.
|
|
35
|
+
## v0.17.2 — May 15, 2026
|
|
26
36
|
|
|
27
|
-
###
|
|
37
|
+
### `customPlugins` escape hatch on `defineAuth("better-auth", …)`
|
|
28
38
|
|
|
29
|
-
|
|
39
|
+
The Better Auth provider now accepts `customPlugins` alongside the named-plugin registry — a path to ship third-party plugins (`@better-auth-kit/audit`, …), unregistered built-ins, or one-off project-local plugins without forking the compiler.
|
|
30
40
|
|
|
31
|
-
|
|
41
|
+
Each entry is an explicit import descriptor:
|
|
32
42
|
|
|
33
43
|
```ts
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
44
|
+
auth: defineAuth("better-auth", {
|
|
45
|
+
emailAndPassword: { enabled: true },
|
|
46
|
+
plugins: { passkey: true, organization: true },
|
|
47
|
+
customPlugins: [
|
|
48
|
+
// (1) Project-local plugin file at quickback/plugins/long-session.ts
|
|
49
|
+
{ from: "./plugins/long-session", export: "longSessionPlugin" },
|
|
50
|
+
// (2) Third-party npm package
|
|
51
|
+
{
|
|
52
|
+
from: "@better-auth-kit/audit",
|
|
53
|
+
export: "auditPlugin",
|
|
54
|
+
args: { events: ["sign-in"] },
|
|
55
|
+
dependencies: { "@better-auth-kit/audit": "^1.0.0" },
|
|
42
56
|
},
|
|
43
|
-
|
|
44
|
-
}
|
|
57
|
+
],
|
|
58
|
+
}),
|
|
45
59
|
```
|
|
46
60
|
|
|
47
|
-
|
|
61
|
+
`from` is either a relative path under `./plugins/` (the CLI auto-uploads matching files from `quickback/plugins/`; the compiler copies them into `src/plugins/<name>.ts` and rewrites the emitted import) or a bare npm specifier (emitted verbatim; declare `dependencies` so the package lands in the generated `package.json`). Omit `args` to emit the symbol uncalled (plugin instance); provide `args` to emit a JSON-serialized factory call.
|
|
48
62
|
|
|
49
|
-
|
|
63
|
+
The descriptor is validated with Zod — typos in `from`/`export`, paths that escape `./plugins/`, and references to files the CLI didn't ship all fail at compile time with a targeted message.
|
|
50
64
|
|
|
51
|
-
|
|
52
|
-
await realtime.broadcast("event-page-updated", payload, {
|
|
53
|
-
scopeKey: "events:evt_123",
|
|
54
|
-
});
|
|
65
|
+
---
|
|
55
66
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
67
|
+
## v0.17.1 — May 14, 2026
|
|
68
|
+
|
|
69
|
+
### `quickback start` — interactive onboarding
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
mkdir my-app && cd my-app
|
|
73
|
+
npx @quickback-dev/cli start
|
|
59
74
|
```
|
|
60
75
|
|
|
61
|
-
|
|
76
|
+
`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.
|
|
77
|
+
|
|
78
|
+
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.
|
|
79
|
+
|
|
80
|
+
### Named views on the free tier
|
|
81
|
+
|
|
82
|
+
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.
|
|
83
|
+
|
|
84
|
+
### `quickback init` removed
|
|
62
85
|
|
|
63
|
-
|
|
86
|
+
Folded into `start` and `create`. The legacy command name prints a deprecation notice pointing at its replacements.
|
|
87
|
+
|
|
88
|
+
### Minor
|
|
89
|
+
|
|
90
|
+
- `quickback whoami` reads the stored tier from your credentials.
|
|
91
|
+
- Pro upsell copy in `quickback login` is shown only when the server returns an explicit free-tier subscription.
|
|
92
|
+
- Bare scaffolds (`cloudflare`, `empty`) report accurately when there are no features to generate migrations for.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## v0.16.10 — May 14, 2026
|
|
97
|
+
|
|
98
|
+
### D1-specific safety pass on generated migrations
|
|
99
|
+
|
|
100
|
+
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`.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## v0.16.9 — May 13, 2026
|
|
105
|
+
|
|
106
|
+
### Resource-scoped realtime tickets
|
|
107
|
+
|
|
108
|
+
`providers.database.config.realtime` accepts an object form for projects whose WebSocket subscribers aren't org members:
|
|
109
|
+
|
|
110
|
+
```ts
|
|
111
|
+
realtime: {
|
|
112
|
+
wsTicket: {
|
|
113
|
+
role: "attendee",
|
|
114
|
+
requestField: "eventId",
|
|
115
|
+
scopeTable: "events",
|
|
116
|
+
},
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
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.
|
|
121
|
+
|
|
122
|
+
### Unified broadcast targeting
|
|
123
|
+
|
|
124
|
+
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:
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
await realtime.broadcast("event-page-updated", payload, { scopeKey: "events:evt_123" });
|
|
128
|
+
await realtime.broadcast("dm", payload, { userId: recipientId });
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
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.
|
|
64
132
|
|
|
65
133
|
---
|
|
66
134
|
|
|
67
135
|
## v0.16.8 — May 13, 2026
|
|
68
136
|
|
|
69
|
-
###
|
|
137
|
+
### One auth transport per request
|
|
70
138
|
|
|
71
|
-
|
|
139
|
+
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.
|
|
72
140
|
|
|
73
|
-
|
|
141
|
+
### Cookie-backed CSRF gate
|
|
74
142
|
|
|
75
|
-
|
|
143
|
+
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.
|
|
76
144
|
|
|
77
|
-
|
|
145
|
+
### First-class Wrangler observability
|
|
78
146
|
|
|
79
|
-
|
|
147
|
+
`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.
|
|
80
148
|
|
|
81
149
|
---
|
|
82
150
|
|
|
83
151
|
## v0.16.7 — May 12, 2026
|
|
84
152
|
|
|
85
|
-
### Bearer wins over cookie
|
|
86
|
-
|
|
87
|
-
Two hardenings to the auth middleware closing a mixed-credential ambiguity and a session-token replay path.
|
|
153
|
+
### Bearer wins over cookie
|
|
88
154
|
|
|
89
|
-
|
|
155
|
+
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.
|
|
90
156
|
|
|
91
|
-
|
|
157
|
+
### Bearer plugin defaults to `requireSignature: true`
|
|
92
158
|
|
|
93
|
-
|
|
159
|
+
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`.
|
|
94
160
|
|
|
95
|
-
|
|
161
|
+
See [Authentication Security → Bearer Tokens and Cookie Precedence](/stack/auth/security#bearer-tokens-and-cookie-precedence).
|
|
96
162
|
|
|
97
163
|
---
|
|
98
164
|
|
|
99
165
|
## v0.16.5 — May 12, 2026
|
|
100
166
|
|
|
101
|
-
### Flat write DSL
|
|
167
|
+
### Flat write DSL
|
|
102
168
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
The preferred authored surface is now flat at the table level:
|
|
169
|
+
Resource write operations are now declared at the table level alongside `read`, replacing the nested `crud` block:
|
|
106
170
|
|
|
107
171
|
```ts
|
|
108
172
|
defineTable(customers, {
|
|
@@ -115,468 +179,295 @@ defineTable(customers, {
|
|
|
115
179
|
});
|
|
116
180
|
```
|
|
117
181
|
|
|
118
|
-
`crud` and top-level `put` still compile
|
|
119
|
-
|
|
120
|
-
### CMS standalone actions now have an explicit placement model for multi-table features
|
|
182
|
+
`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.
|
|
121
183
|
|
|
122
|
-
|
|
184
|
+
### CMS placement for multi-table feature actions
|
|
123
185
|
|
|
124
|
-
|
|
186
|
+
Standalone actions on multi-table features have an explicit placement model:
|
|
125
187
|
|
|
126
|
-
- `cms.placement: "feature"` shows the
|
|
127
|
-
- `cms.placement: "tables"` with `cms.tables`
|
|
188
|
+
- `cms.placement: "feature"` shows the action on every table toolbar in the feature
|
|
189
|
+
- `cms.placement: "tables"` with `cms.tables` scopes it to specific tables
|
|
128
190
|
- `cms.hidden: true` keeps it API-only
|
|
129
191
|
|
|
130
|
-
|
|
192
|
+
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.
|
|
131
193
|
|
|
132
|
-
### `openapi.types`
|
|
194
|
+
### `openapi.types` accepts a string array
|
|
133
195
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
`openapi.types` now accepts a string array as well as `true`, `false`, or a single custom path. One compile can write the same generated types file to multiple locations, for example:
|
|
196
|
+
One compile can write the generated types file to multiple locations, keeping colocated SPA clients in sync:
|
|
137
197
|
|
|
138
198
|
```ts
|
|
139
|
-
openapi: {
|
|
140
|
-
types: ['api-types.gen.ts', 'apps/web/src/lib/api-types.gen.ts'],
|
|
141
|
-
}
|
|
199
|
+
openapi: { types: ['api-types.gen.ts', 'apps/web/src/lib/api-types.gen.ts'] }
|
|
142
200
|
```
|
|
143
201
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
### Generated route files and `schema-registry.json` are now emitted in a stable order
|
|
202
|
+
### Stable artifact ordering
|
|
147
203
|
|
|
148
|
-
|
|
204
|
+
Generated route files and `schema-registry.json` are emitted in a stable order across runs. Identical logical input produces identical artifacts.
|
|
149
205
|
|
|
150
|
-
|
|
206
|
+
---
|
|
151
207
|
|
|
152
208
|
## v0.16.4 — May 12, 2026
|
|
153
209
|
|
|
154
|
-
###
|
|
155
|
-
|
|
156
|
-
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.
|
|
157
|
-
|
|
158
|
-
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.
|
|
210
|
+
### Drizzle snapshot integrity
|
|
159
211
|
|
|
160
|
-
|
|
212
|
+
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.
|
|
161
213
|
|
|
162
|
-
### `account.auth.*`
|
|
214
|
+
### `account.auth.*` drives the server, not just the SPA
|
|
163
215
|
|
|
164
|
-
|
|
216
|
+
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:
|
|
165
217
|
|
|
166
|
-
|
|
218
|
+
- `signup → emailAndPassword.disableSignUp` (inverted)
|
|
219
|
+
- `password → emailAndPassword.enabled`
|
|
220
|
+
- `emailVerification → emailAndPassword.requireEmailVerification`
|
|
221
|
+
- `passkey` / `emailOTP` → plugin additions
|
|
167
222
|
|
|
168
|
-
The
|
|
223
|
+
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`.
|
|
169
224
|
|
|
170
|
-
**Breaking** for
|
|
171
|
-
|
|
172
|
-
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`).
|
|
225
|
+
**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.
|
|
173
226
|
|
|
174
227
|
---
|
|
175
228
|
|
|
176
229
|
## v0.16.3 — May 9, 2026
|
|
177
230
|
|
|
178
|
-
### Standalone action mount order
|
|
179
|
-
|
|
180
|
-
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.
|
|
181
|
-
|
|
182
|
-
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`.
|
|
231
|
+
### Standalone action mount order
|
|
183
232
|
|
|
184
|
-
|
|
233
|
+
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.
|
|
185
234
|
|
|
186
235
|
---
|
|
187
236
|
|
|
188
237
|
## v0.16.1 — May 9, 2026
|
|
189
238
|
|
|
190
|
-
### Cloudflare ASSETS canonicalization
|
|
239
|
+
### Cloudflare ASSETS canonicalization
|
|
191
240
|
|
|
192
|
-
|
|
241
|
+
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.
|
|
193
242
|
|
|
194
|
-
|
|
243
|
+
### `account.customLogin`
|
|
195
244
|
|
|
196
|
-
|
|
245
|
+
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.
|
|
197
246
|
|
|
198
|
-
|
|
247
|
+
### Project-level realtime defaults
|
|
199
248
|
|
|
200
|
-
|
|
249
|
+
`providers.database.config.realtime: true` now treats every resource as realtime-enabled by default. Per-resource `realtime: { enabled: false }` still wins.
|
|
201
250
|
|
|
202
|
-
|
|
251
|
+
### Compile-time validators
|
|
203
252
|
|
|
204
|
-
|
|
253
|
+
Two new compile-time errors over silent runtime failures:
|
|
205
254
|
|
|
206
|
-
|
|
255
|
+
- `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).
|
|
256
|
+
- `createRealtime` imports without `realtime: true` enabled in the config are rejected at compile.
|
|
207
257
|
|
|
208
|
-
|
|
258
|
+
### Drizzle metadata hardening
|
|
209
259
|
|
|
210
|
-
|
|
260
|
+
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).
|
|
211
261
|
|
|
212
|
-
###
|
|
262
|
+
### Minor
|
|
213
263
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
### Fixes
|
|
219
|
-
|
|
220
|
-
**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`.
|
|
221
|
-
|
|
222
|
-
**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.
|
|
223
|
-
|
|
224
|
-
**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.
|
|
225
|
-
|
|
226
|
-
### Notes
|
|
227
|
-
|
|
228
|
-
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.
|
|
229
|
-
|
|
230
|
-
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.
|
|
264
|
+
- `SYSADMIN` is now recognised by the standalone-action org gate's pseudo-role matcher.
|
|
265
|
+
- Apex `/` and `/account/login` get fallback redirects to `auth.loginUrl` when neither bundled SPA is enabled.
|
|
266
|
+
- Record-based action URLs are kebab-case to match the OpenAPI spec (e.g. `/api/v1/widgets/:id/send-invite`).
|
|
231
267
|
|
|
232
268
|
---
|
|
233
269
|
|
|
234
270
|
## v0.16.0 — May 9, 2026
|
|
235
271
|
|
|
236
|
-
### Agent Auth Protocol
|
|
237
|
-
|
|
238
|
-
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`.
|
|
272
|
+
### Agent Auth Protocol
|
|
239
273
|
|
|
240
|
-
|
|
274
|
+
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.
|
|
241
275
|
|
|
242
|
-
The proxy `onExecute` makes a self-fetch
|
|
243
|
-
|
|
244
|
-
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.
|
|
276
|
+
**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.
|
|
245
277
|
|
|
246
278
|
### Bearer-only on `/mcp` and the agent-auth surface
|
|
247
279
|
|
|
248
|
-
`/mcp`
|
|
249
|
-
|
|
250
|
-
- Better Auth session token via the official `bearer` plugin
|
|
251
|
-
- OAuth access token via the OAuth Provider plugin
|
|
252
|
-
- Agent JWT via `@better-auth/agent-auth`
|
|
253
|
-
|
|
254
|
-
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)".
|
|
280
|
+
`/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`).
|
|
255
281
|
|
|
256
|
-
### Auth DSL
|
|
282
|
+
### Auth DSL gains first-class plugin entries
|
|
257
283
|
|
|
258
|
-
|
|
284
|
+
`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.
|
|
259
285
|
|
|
260
|
-
Auto-enable rule
|
|
286
|
+
Auto-enable rule: turning on `agentAuth` force-adds `bearer` + `oauthProvider`. No useful agent-auth deployment ships without those two.
|
|
261
287
|
|
|
262
|
-
### `queue-consumer.ts`
|
|
288
|
+
### `queue-consumer.ts` gating
|
|
263
289
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
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`.
|
|
267
|
-
|
|
268
|
-
### Fixes
|
|
269
|
-
|
|
270
|
-
**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.
|
|
271
|
-
|
|
272
|
-
**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)".
|
|
273
|
-
|
|
274
|
-
**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.
|
|
275
|
-
|
|
276
|
-
**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.
|
|
277
|
-
|
|
278
|
-
### Notes
|
|
279
|
-
|
|
280
|
-
`@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.
|
|
281
|
-
|
|
282
|
-
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`).
|
|
290
|
+
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.
|
|
283
291
|
|
|
284
292
|
---
|
|
285
293
|
|
|
286
294
|
## v0.15.0 — May 7, 2026
|
|
287
295
|
|
|
288
|
-
### Sysadmin tier
|
|
289
|
-
|
|
290
|
-
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.
|
|
291
|
-
|
|
292
|
-
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.
|
|
293
|
-
|
|
294
|
-
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.
|
|
295
|
-
|
|
296
|
-
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.
|
|
296
|
+
### Sysadmin tier for the CMS
|
|
297
297
|
|
|
298
|
-
|
|
298
|
+
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.
|
|
299
299
|
|
|
300
|
-
|
|
300
|
+
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.
|
|
301
301
|
|
|
302
|
-
The
|
|
302
|
+
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.
|
|
303
303
|
|
|
304
|
-
###
|
|
304
|
+
### Durable Object `[[migrations]]` order is preserved
|
|
305
305
|
|
|
306
|
-
|
|
306
|
+
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.
|
|
307
307
|
|
|
308
|
-
###
|
|
308
|
+
### `quickback/public/` — static-asset passthrough
|
|
309
309
|
|
|
310
|
-
|
|
310
|
+
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.
|
|
311
311
|
|
|
312
|
-
|
|
312
|
+
- Optional. Missing folder is a no-op.
|
|
313
|
+
- Stale-cleaned. Files removed from `quickback/public/` disappear on the next compile.
|
|
314
|
+
- Hidden entries (`.DS_Store`, dotfiles) are skipped.
|
|
315
|
+
- Collisions with compiler-emitted manifest paths fail the compile loudly.
|
|
313
316
|
|
|
314
|
-
|
|
317
|
+
### Minor
|
|
315
318
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
Rules:
|
|
319
|
-
|
|
320
|
-
- **Optional.** If the folder doesn't exist, the step is a no-op.
|
|
321
|
-
- **Stale-cleaned.** `src/` is wiped and rewritten each compile, so files removed from `quickback/public/` disappear from `src/apps/` automatically on the next run.
|
|
322
|
-
- **Hidden entries skipped.** `.DS_Store`, `.git/`, dotfiles — none of these were intentional drops; including them would break worker asset bindings.
|
|
323
|
-
- **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.
|
|
324
|
-
|
|
325
|
-
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.
|
|
319
|
+
- Standalone-action wrapper skips the org gate when the access tree references any pseudo-role.
|
|
320
|
+
- Queue handler emit no longer drops the `queue` export when there are no embeddings.
|
|
326
321
|
|
|
327
322
|
---
|
|
328
323
|
|
|
329
324
|
## v0.14.7 — May 7, 2026
|
|
330
325
|
|
|
331
|
-
###
|
|
332
|
-
|
|
333
|
-
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).
|
|
334
|
-
|
|
335
|
-
**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).
|
|
336
|
-
|
|
337
|
-
**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.
|
|
338
|
-
|
|
339
|
-
**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.
|
|
340
|
-
|
|
341
|
-
**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.
|
|
342
|
-
|
|
343
|
-
**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.
|
|
344
|
-
|
|
345
|
-
### Account auth: emailOtp on AWS SES drops the magic-link companion (OTP-only)
|
|
346
|
-
|
|
347
|
-
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.
|
|
326
|
+
### Codegen fixes for projects with non-`id` primary keys and DO-only features
|
|
348
327
|
|
|
349
|
-
|
|
328
|
+
Four surgical fixes to the generated output:
|
|
350
329
|
|
|
351
|
-
|
|
352
|
-
|
|
330
|
+
- Duplicate table imports in relationship-role routes are deduplicated.
|
|
331
|
+
- `db` references in single-record and bulk action handlers now resolve correctly during pre-fetch.
|
|
332
|
+
- PartyServer auth gates pass the in-scope `db` handle into firewall calls.
|
|
333
|
+
- Durable-object-only features keep their `lib/` files in the output.
|
|
353
334
|
|
|
354
|
-
|
|
335
|
+
### `emailOtp` + AWS SES is OTP-only
|
|
355
336
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
### Coming next — `id` field auto-injection (v0.14.8)
|
|
359
|
-
|
|
360
|
-
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.
|
|
361
|
-
|
|
362
|
-
**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.
|
|
363
|
-
|
|
364
|
-
No user code changes required for the four fixes shipping in v0.14.7. Recompile and the affected features typecheck.
|
|
337
|
+
`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.
|
|
365
338
|
|
|
366
339
|
---
|
|
367
340
|
|
|
368
341
|
## v0.14.6 — May 7, 2026
|
|
369
342
|
|
|
370
|
-
###
|
|
371
|
-
|
|
372
|
-
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.
|
|
373
|
-
|
|
374
|
-
**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/`.
|
|
375
|
-
|
|
376
|
-
**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.
|
|
343
|
+
### MCP transport correctness
|
|
377
344
|
|
|
378
|
-
|
|
345
|
+
Four fixes to the MCP-over-HTTP path:
|
|
379
346
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
```bash
|
|
385
|
-
curl -fs -X POST https://attend.vip/mcp \
|
|
386
|
-
-H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
|
|
387
|
-
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"listEvents","arguments":{}}}' \
|
|
388
|
-
| jq '.result.content[0].text | fromjson | .data | length' # > 0
|
|
389
|
-
```
|
|
390
|
-
|
|
391
|
-
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.
|
|
347
|
+
- `tools/call` URLs are no longer double-prefixed for action tools.
|
|
348
|
+
- Auth middleware accepts API keys via `Authorization: Bearer` in addition to `x-api-key` and query parameters — the channel MCP clients use exclusively.
|
|
349
|
+
- `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.
|
|
350
|
+
- Team-scoped firewall predicates degrade gracefully when no team is active (org scoping continues to apply; team scoping is optional).
|
|
392
351
|
|
|
393
352
|
---
|
|
394
353
|
|
|
395
354
|
## v0.14.5 — May 7, 2026
|
|
396
355
|
|
|
397
|
-
### MCP
|
|
398
|
-
|
|
399
|
-
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.
|
|
356
|
+
### MCP environment threading
|
|
400
357
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
No user code changes required. Recompile against v0.14.5 and the MCP endpoint dispatches actions correctly against all bindings.
|
|
358
|
+
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.
|
|
404
359
|
|
|
405
360
|
---
|
|
406
361
|
|
|
407
362
|
## v0.14.4 — May 7, 2026
|
|
408
363
|
|
|
409
|
-
### `via:` firewall predicates
|
|
410
|
-
|
|
411
|
-
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.
|
|
412
|
-
|
|
413
|
-
Two fixes:
|
|
364
|
+
### `via:` firewall predicates pull required imports
|
|
414
365
|
|
|
415
|
-
|
|
416
|
-
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.
|
|
417
|
-
|
|
418
|
-
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.
|
|
419
|
-
|
|
420
|
-
No user code changes required — recompile and `via:` predicates work end-to-end.
|
|
366
|
+
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.
|
|
421
367
|
|
|
422
368
|
---
|
|
423
369
|
|
|
424
370
|
## v0.14.3 — May 7, 2026
|
|
425
371
|
|
|
426
|
-
### Relationship-role
|
|
427
|
-
|
|
428
|
-
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.
|
|
372
|
+
### Relationship-role table re-exports
|
|
429
373
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
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.
|
|
433
|
-
|
|
434
|
-
```ts
|
|
435
|
-
// generated <table>.resource.ts (after fix)
|
|
436
|
-
import { event_guests } from './schema';
|
|
437
|
-
export { event_guests }; // ← was missing
|
|
438
|
-
```
|
|
439
|
-
|
|
440
|
-
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.
|
|
374
|
+
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.
|
|
441
375
|
|
|
442
376
|
---
|
|
443
377
|
|
|
444
378
|
## v0.14.2 — May 7, 2026
|
|
445
379
|
|
|
446
|
-
###
|
|
447
|
-
|
|
448
|
-
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.
|
|
380
|
+
### Historical DO `[[migrations]]` are preserved
|
|
449
381
|
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
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.
|
|
382
|
+
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:
|
|
453
383
|
|
|
454
384
|
```ts
|
|
455
|
-
// quickback.config.ts
|
|
456
385
|
bindings: {
|
|
457
|
-
durableObjects: [
|
|
458
|
-
{ name: 'NOTEPAD', className: 'Notepad', from: 'lib/Notepad' },
|
|
459
|
-
],
|
|
386
|
+
durableObjects: [{ name: 'NOTEPAD', className: 'Notepad', from: 'lib/Notepad' }],
|
|
460
387
|
durableObjectMigrations: [
|
|
461
|
-
|
|
462
|
-
{
|
|
463
|
-
tag: 'qb-do-deleted-legacy-notes-2026-05-05',
|
|
464
|
-
deletedClasses: ['LegacyNotes'],
|
|
465
|
-
},
|
|
388
|
+
{ tag: 'qb-do-deleted-legacy-notes-2026-05-05', deletedClasses: ['LegacyNotes'] },
|
|
466
389
|
],
|
|
467
390
|
}
|
|
468
391
|
```
|
|
469
392
|
|
|
470
|
-
All four lifecycle shapes are supported
|
|
471
|
-
|
|
472
|
-
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.
|
|
473
|
-
|
|
474
|
-
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.
|
|
393
|
+
All four lifecycle shapes are supported. User-declared entries can override auto-emit by reusing the same tag.
|
|
475
394
|
|
|
476
395
|
---
|
|
477
396
|
|
|
478
397
|
## v0.14.1 — May 7, 2026
|
|
479
398
|
|
|
480
|
-
### Bulk action variants
|
|
481
|
-
|
|
482
|
-
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.
|
|
399
|
+
### Bulk action variants in `openapi.json`
|
|
483
400
|
|
|
484
|
-
|
|
401
|
+
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.
|
|
485
402
|
|
|
486
|
-
|
|
403
|
+
### Cross-tenant "my events" patterns
|
|
487
404
|
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
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.
|
|
491
|
-
|
|
492
|
-
See [Access → Cross-tenant "my events" dashboards](/compiler/definitions/access#cross-tenant-my-events-dashboards-are-not-this).
|
|
405
|
+
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).
|
|
493
406
|
|
|
494
407
|
---
|
|
495
408
|
|
|
496
409
|
## v0.14.0 — May 7, 2026
|
|
497
410
|
|
|
498
|
-
### Relationship-based authorization
|
|
499
|
-
|
|
500
|
-
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.
|
|
411
|
+
### Relationship-based authorization
|
|
501
412
|
|
|
502
|
-
Declare the relationship once
|
|
413
|
+
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:`:
|
|
503
414
|
|
|
504
415
|
```ts
|
|
505
|
-
// quickback.config.ts
|
|
506
416
|
authz: {
|
|
507
417
|
relationships: {
|
|
508
418
|
guestOf: {
|
|
509
|
-
from: 'event_guests',
|
|
510
|
-
subject: { column: 'userId', equals: 'ctx.userId' },
|
|
511
|
-
resource: { column: 'eventId' },
|
|
512
|
-
where: { status: 'confirmed' },
|
|
419
|
+
from: 'event_guests',
|
|
420
|
+
subject: { column: 'userId', equals: 'ctx.userId' },
|
|
421
|
+
resource: { column: 'eventId' },
|
|
422
|
+
where: { status: 'confirmed' },
|
|
513
423
|
},
|
|
514
424
|
},
|
|
515
425
|
roles: {
|
|
516
426
|
guest: { via: 'guestOf' },
|
|
517
|
-
eventStaff: {
|
|
518
|
-
or: [{ via: 'guestOf' }, { roles: ['admin', 'owner'] }],
|
|
519
|
-
},
|
|
427
|
+
eventStaff: { or: [{ via: 'guestOf' }, { roles: ['admin', 'owner'] }] },
|
|
520
428
|
},
|
|
521
429
|
}
|
|
522
430
|
|
|
523
431
|
// features/sessions/sessions.ts
|
|
524
432
|
firewall: [
|
|
525
433
|
{ field: 'organizationId', equals: 'ctx.activeOrgId' },
|
|
526
|
-
{ field: 'eventId', via: 'guestOf' },
|
|
434
|
+
{ field: 'eventId', via: 'guestOf' },
|
|
527
435
|
],
|
|
528
|
-
read: { access: { roles: ['admin', 'member', 'guest'] } },
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
update: { access: { roles: ['admin'] } },
|
|
532
|
-
}
|
|
436
|
+
read: { access: { roles: ['admin', 'member', 'guest'] } },
|
|
437
|
+
create: { access: { roles: ['admin', 'guest'] } },
|
|
438
|
+
update: { access: { roles: ['admin'] } },
|
|
533
439
|
```
|
|
534
440
|
|
|
535
|
-
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
|
|
441
|
+
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.
|
|
536
442
|
|
|
537
|
-
|
|
443
|
+
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).
|
|
538
444
|
|
|
539
|
-
|
|
540
|
-
|---|---|
|
|
541
|
-
| `firewall: [{ field, via }]` row-level scoping | Full |
|
|
542
|
-
| `crud.<op>.access` `roles: ['guest']` (inline emission) | Full |
|
|
543
|
-
| `read.access` and `read.views.*.access` | Full |
|
|
544
|
-
| `masking.<f>.show` `roles: ['guest']` | Compile-refused (workaround pointer) |
|
|
545
|
-
| `actions.<n>.access` `roles: ['guest']` | Compile-refused (workaround pointer) |
|
|
546
|
-
|
|
547
|
-
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).
|
|
548
|
-
|
|
549
|
-
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).
|
|
445
|
+
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.
|
|
550
446
|
|
|
551
|
-
|
|
447
|
+
See [Firewall → Relationship-based scoping](/compiler/definitions/firewall#relationship-based-scoping-via) and [Access → Relationship-based authorization](/compiler/definitions/access#relationship-based-authorization).
|
|
552
448
|
|
|
553
|
-
|
|
449
|
+
### Bulk variants on record-based actions
|
|
554
450
|
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
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.
|
|
451
|
+
`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:
|
|
558
452
|
|
|
559
453
|
```ts
|
|
560
|
-
// features/applications/actions/advance.ts
|
|
561
454
|
export default defineAction({
|
|
562
455
|
description: "Move an application forward in the pipeline.",
|
|
563
456
|
input: z.object({ nextStatus: z.enum(["screening", "interview", "offer"]) }),
|
|
564
457
|
access: { roles: ["owner", "admin"] },
|
|
565
|
-
bulkVariant: true,
|
|
458
|
+
bulkVariant: true,
|
|
566
459
|
transition: { field: "status", via: "nextStatus", fromTo: { /* ... */ } },
|
|
567
460
|
async execute({ db, record, input, whereTransition }) {
|
|
568
|
-
// exact same body
|
|
461
|
+
// exact same body — runs once per id
|
|
569
462
|
},
|
|
570
463
|
});
|
|
571
464
|
```
|
|
572
465
|
|
|
573
|
-
Per-record outcomes return as 207 Multi-Status
|
|
574
|
-
|
|
575
|
-
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).
|
|
466
|
+
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.
|
|
576
467
|
|
|
577
468
|
### Aggregations on read views
|
|
578
469
|
|
|
579
|
-
Read views can
|
|
470
|
+
Read views can declare pre-computed metrics that surface alongside the row payload:
|
|
580
471
|
|
|
581
472
|
```ts
|
|
582
473
|
read: {
|
|
@@ -592,51 +483,29 @@ read: {
|
|
|
592
483
|
}
|
|
593
484
|
```
|
|
594
485
|
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
```json
|
|
598
|
-
{
|
|
599
|
-
"data": [/* paginated rows */],
|
|
600
|
-
"view": "pipeline",
|
|
601
|
-
"pagination": { "count": 50, "page": 1, "pageSize": 50, "hasMore": true },
|
|
602
|
-
"aggregations": {
|
|
603
|
-
"totalApplications": 173,
|
|
604
|
-
"byStatus": { "applied": 102, "screening": 41, "interview": 18, "offer": 7, "rejected": 5 }
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
```
|
|
608
|
-
|
|
609
|
-
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)"`).
|
|
610
|
-
|
|
611
|
-
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).
|
|
486
|
+
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).
|
|
612
487
|
|
|
613
488
|
---
|
|
614
489
|
|
|
615
490
|
## v0.13.5 — May 6, 2026
|
|
616
491
|
|
|
617
|
-
### Object-form `auth.plugins`
|
|
618
|
-
|
|
619
|
-
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.
|
|
620
|
-
|
|
621
|
-
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.
|
|
492
|
+
### Object-form `auth.plugins` config is honored
|
|
622
493
|
|
|
623
|
-
|
|
494
|
+
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.
|
|
624
495
|
|
|
625
|
-
### `roles: ["PUBLIC"]`
|
|
496
|
+
### `roles: ["PUBLIC"]` allowed on writes and actions
|
|
626
497
|
|
|
627
|
-
|
|
498
|
+
`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.
|
|
628
499
|
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
`USER` and `ADMIN` keep their compile-time prerequisites (firewall must scope by `userId` / admin plugin must be enabled).
|
|
500
|
+
Common pattern: pair `roles: ["PUBLIC"]` with `firewall: { exception: true }` on the resource so the row predicate doesn't reject every unauthenticated caller.
|
|
632
501
|
|
|
633
502
|
---
|
|
634
503
|
|
|
635
504
|
## v0.12.0 — May 5, 2026
|
|
636
505
|
|
|
637
|
-
### Per-room authorization for PartyServer
|
|
506
|
+
### Per-room authorization for PartyServer
|
|
638
507
|
|
|
639
|
-
`bindings.durableObjects[].access`
|
|
508
|
+
`bindings.durableObjects[].access` declares a path-scoped gate that runs the declared resource's firewall and `read.access` pipeline before the WebSocket upgrade:
|
|
640
509
|
|
|
641
510
|
```ts
|
|
642
511
|
durableObjects: [
|
|
@@ -655,119 +524,70 @@ durableObjects: [
|
|
|
655
524
|
},
|
|
656
525
|
} },
|
|
657
526
|
|
|
658
|
-
// Anonymous
|
|
527
|
+
// Anonymous lobbies / public pads: explicit opt-out.
|
|
659
528
|
{ name: 'PublicLobby', className: 'PublicLobby', from: 'lib/PublicLobby',
|
|
660
529
|
access: 'public' },
|
|
661
|
-
]
|
|
530
|
+
]
|
|
662
531
|
```
|
|
663
532
|
|
|
664
|
-
The gate 401s unauthenticated callers, 403s when the firewall hides the row, 404s when the row is missing
|
|
533
|
+
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).
|
|
665
534
|
|
|
666
535
|
---
|
|
667
536
|
|
|
668
537
|
## v0.11.1 — May 5, 2026
|
|
669
538
|
|
|
670
|
-
### PartyServer auto-mount is
|
|
671
|
-
|
|
672
|
-
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.
|
|
539
|
+
### PartyServer auto-mount is secure by default
|
|
673
540
|
|
|
674
|
-
The auto-mount now wraps `partyserverMiddleware` in an auth check
|
|
675
|
-
|
|
676
|
-
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.
|
|
677
|
-
|
|
678
|
-
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.
|
|
541
|
+
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`.
|
|
679
542
|
|
|
680
543
|
---
|
|
681
544
|
|
|
682
545
|
## v0.11.0 — May 5, 2026
|
|
683
546
|
|
|
684
|
-
### OAuth Provider
|
|
685
|
-
|
|
686
|
-
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.
|
|
547
|
+
### OAuth Provider (MCP-ready)
|
|
687
548
|
|
|
688
|
-
|
|
549
|
+
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.
|
|
689
550
|
|
|
690
|
-
|
|
551
|
+
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).
|
|
691
552
|
|
|
692
|
-
|
|
553
|
+
### API keys via query parameter
|
|
693
554
|
|
|
694
|
-
The
|
|
555
|
+
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.
|
|
695
556
|
|
|
696
|
-
### PartyServer rooms + realtime URL split
|
|
557
|
+
### PartyServer rooms + realtime URL split
|
|
697
558
|
|
|
698
|
-
The realtime URL space is reorganized so
|
|
559
|
+
The realtime URL space is reorganized so names match what each primitive does:
|
|
699
560
|
|
|
700
|
-
- **`/realtime/v1/*` → `/broadcast/v1/*`** — the
|
|
701
|
-
- **`/realtime/<binding>/<room-id
|
|
561
|
+
- **`/realtime/v1/*` → `/broadcast/v1/*`** — the org-wide Broadcaster moves to its semantically accurate prefix.
|
|
562
|
+
- **`/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.
|
|
702
563
|
|
|
703
|
-
**Breaking
|
|
564
|
+
**Breaking** — recompile + redeploy required:
|
|
704
565
|
|
|
705
|
-
-
|
|
706
|
-
-
|
|
707
|
-
-
|
|
566
|
+
- `REALTIME_URL` env var renamed to `BROADCAST_URL`.
|
|
567
|
+
- SPA helpers `getRealtimeWsUrl()` / `getRealtimeTicketUrl()` renamed to `getBroadcastWsUrl()` / `getBroadcastTicketUrl()`.
|
|
568
|
+
- `appConfig.routes.api.realtime` renamed to `appConfig.routes.api.broadcast`.
|
|
708
569
|
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
**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.
|
|
570
|
+
`partyserver`, `partysocket`, and `hono-party` are pre-installed in the compiler image; collab projects compile without an extra `npm install` step.
|
|
712
571
|
|
|
713
572
|
---
|
|
714
573
|
|
|
715
574
|
## v0.10.20 — May 4, 2026
|
|
716
575
|
|
|
717
|
-
### In-worker Durable Objects
|
|
718
|
-
|
|
719
|
-
`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.
|
|
576
|
+
### In-worker Durable Objects
|
|
720
577
|
|
|
721
|
-
|
|
578
|
+
`bindings.durableObjects[].from` flips a DO binding into in-worker mode and emits the export, the `[[migrations]]` block, and the `CloudflareBindings` type all together:
|
|
722
579
|
|
|
723
580
|
```ts
|
|
724
|
-
durableObjects: [
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
},
|
|
730
|
-
]
|
|
731
|
-
```
|
|
732
|
-
|
|
733
|
-
Generates:
|
|
734
|
-
- `src/index.ts`: `export { ItemStream } from './features/loops/lib/ItemStream';` — wrangler resolves the binding by class export.
|
|
735
|
-
- `wrangler.toml`: a `[[migrations]]` block with `tag = "qb-do-ItemStream"` and `new_sqlite_classes = ["ItemStream"]`.
|
|
736
|
-
- `CloudflareBindings`: `ITEM_STREAM: DurableObjectNamespace` so `c.env.ITEM_STREAM.idFromName(...)` typechecks.
|
|
737
|
-
|
|
738
|
-
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.
|
|
739
|
-
|
|
740
|
-
`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.
|
|
741
|
-
|
|
742
|
-
`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.
|
|
743
|
-
|
|
744
|
-
See [Bindings → Durable Objects](/compiler/config/bindings#durableobjects) for the full reference.
|
|
745
|
-
|
|
746
|
-
---
|
|
747
|
-
|
|
748
|
-
## v0.10.19 — May 4, 2026
|
|
749
|
-
|
|
750
|
-
### Fix: bundled-SPA auth survives `wrangler dev` on custom_domain projects
|
|
751
|
-
|
|
752
|
-
`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:
|
|
753
|
-
|
|
754
|
-
```
|
|
755
|
-
# Compiled (correct)
|
|
756
|
-
connect-src 'self' https://api.example.com …
|
|
757
|
-
|
|
758
|
-
# Served by wrangler dev (mangled)
|
|
759
|
-
connect-src 'self' https://localhost:8787 …
|
|
581
|
+
durableObjects: [{
|
|
582
|
+
name: "ITEM_STREAM",
|
|
583
|
+
className: "ItemStream",
|
|
584
|
+
from: "features/loops/lib/ItemStream",
|
|
585
|
+
}]
|
|
760
586
|
```
|
|
761
587
|
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
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.
|
|
765
|
-
|
|
766
|
-
`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.
|
|
767
|
-
|
|
768
|
-
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.
|
|
588
|
+
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.
|
|
769
589
|
|
|
770
|
-
|
|
590
|
+
`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).
|
|
771
591
|
|
|
772
592
|
---
|
|
773
593
|
|
|
@@ -775,93 +595,45 @@ If wrangler ships a fix for the response-header rewrite, the case-shifted source
|
|
|
775
595
|
|
|
776
596
|
### `experimentalRemote` — share deployed D1 with `wrangler dev`
|
|
777
597
|
|
|
778
|
-
Per-binding `experimental_remote = true`
|
|
598
|
+
Per-binding `experimental_remote = true` lets `wrangler dev` read/write deployed D1 for selected bindings:
|
|
779
599
|
|
|
780
600
|
```ts
|
|
781
601
|
providers: {
|
|
782
602
|
database: defineDatabase("cloudflare-d1", {
|
|
783
603
|
splitDatabases: true,
|
|
784
|
-
experimentalRemote: {
|
|
785
|
-
auth: true, // wrangler dev reads/writes deployed AUTH_DB
|
|
786
|
-
features: false, // (default) features stays local
|
|
787
|
-
audit: false,
|
|
788
|
-
webhooks: false,
|
|
789
|
-
files: false,
|
|
790
|
-
},
|
|
604
|
+
experimentalRemote: { auth: true, features: false },
|
|
791
605
|
}),
|
|
792
606
|
}
|
|
793
607
|
```
|
|
794
608
|
|
|
795
|
-
|
|
609
|
+
Useful for "share prod auth in dev, keep feature writes sandboxed." Off by default.
|
|
796
610
|
|
|
797
611
|
### Google OAuth + signup ToS
|
|
798
612
|
|
|
799
|
-
The Account SPA
|
|
800
|
-
|
|
801
|
-
Signup flow gains a Terms-of-Service checkbox gate (configurable via the Account SPA's branding config).
|
|
802
|
-
|
|
803
|
-
### CLI compile auth gate + device-auth redirect fix
|
|
613
|
+
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).
|
|
804
614
|
|
|
805
|
-
|
|
806
|
-
- 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.
|
|
615
|
+
### CLI compile auth gate
|
|
807
616
|
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
The bundled Claude Code skill was reorganized for clarity:
|
|
811
|
-
|
|
812
|
-
- `SKILL.md` is now a thin orientation pointer, not a 600-line dump
|
|
813
|
-
- Reference docs split into `Compiler` and `Stack` sections
|
|
814
|
-
- 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
|
|
815
|
-
- Tightened against audit gaps surfaced by red-team review
|
|
816
|
-
|
|
817
|
-
Run `quickback claude install` to pick up the new skill layout.
|
|
617
|
+
`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.
|
|
818
618
|
|
|
819
619
|
---
|
|
820
620
|
|
|
821
|
-
## v0.10.17 — May 2, 2026
|
|
822
|
-
|
|
823
|
-
### Security fix: CSP auto-config no longer widens `default-src`
|
|
824
|
-
|
|
825
|
-
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`.
|
|
826
|
-
|
|
827
|
-
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.
|
|
828
|
-
|
|
829
|
-
Before (0.10.16):
|
|
830
|
-
```
|
|
831
|
-
default-src 'self' https://fonts.googleapis.com https://fonts.gstatic.com @trustedOrigins https://api.example.com
|
|
832
|
-
```
|
|
833
|
-
|
|
834
|
-
After (0.10.17):
|
|
835
|
-
```
|
|
836
|
-
default-src 'self'
|
|
837
|
-
style-src 'self' 'unsafe-inline' https://fonts.googleapis.com
|
|
838
|
-
font-src 'self' https://fonts.gstatic.com
|
|
839
|
-
connect-src 'self' @trustedOrigins https://api.example.com
|
|
840
|
-
```
|
|
841
|
-
|
|
842
|
-
**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.
|
|
843
|
-
|
|
844
|
-
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.
|
|
845
|
-
|
|
846
|
-
---
|
|
847
|
-
|
|
848
|
-
## v0.10.16 — May 2, 2026
|
|
849
|
-
|
|
850
|
-
### CSP auto-config now covers SPA-baked-in API origins
|
|
621
|
+
## v0.10.15–v0.10.17 — May 2, 2026
|
|
851
622
|
|
|
852
|
-
|
|
623
|
+
### CSP auto-config
|
|
853
624
|
|
|
854
|
-
|
|
625
|
+
When `security.csp` is set, the compiler widens directives additively based on the project's enabled features:
|
|
855
626
|
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
627
|
+
| Trigger | Auto-added | Directive |
|
|
628
|
+
|---|---|---|
|
|
629
|
+
| `cms: true` OR `account: true` | `'unsafe-inline'`, `https://fonts.googleapis.com` | `styleSrc` |
|
|
630
|
+
| `cms: true` OR `account: true` | `https://fonts.gstatic.com` | `fontSrc` |
|
|
631
|
+
| `csp` set (always) | `@trustedOrigins` | `connectSrc` |
|
|
632
|
+
| Bundled SPA enabled | SPA-baked API origin (`config.domain`, `quickback.{baseDomain}`, `cms.domain`, `account.domain`) | `connectSrc` |
|
|
861
633
|
|
|
862
|
-
|
|
634
|
+
Anything you already wrote stays — auto-config never removes or overrides. Each applied addition is logged to stderr. Opt out with `security: { cspAutoConfig: false }`.
|
|
863
635
|
|
|
864
|
-
|
|
636
|
+
Most projects can write the minimal:
|
|
865
637
|
|
|
866
638
|
```ts
|
|
867
639
|
security: {
|
|
@@ -874,286 +646,107 @@ security: {
|
|
|
874
646
|
}
|
|
875
647
|
```
|
|
876
648
|
|
|
877
|
-
…and the compiler fills in
|
|
878
|
-
|
|
879
|
-
---
|
|
880
|
-
|
|
881
|
-
## v0.10.15 — May 2, 2026
|
|
882
|
-
|
|
883
|
-
### CSP auto-config — bundled-SPA origins added automatically
|
|
884
|
-
|
|
885
|
-
When `security.csp` is set, the compiler now widens directives **additively** based on the project's enabled features. The four rules:
|
|
886
|
-
|
|
887
|
-
| Trigger | Auto-added | Directive |
|
|
888
|
-
|---|---|---|
|
|
889
|
-
| `cms: true` OR `account: true` | `'unsafe-inline'`, `https://fonts.googleapis.com` | `styleSrc` |
|
|
890
|
-
| `cms: true` OR `account: true` | `https://fonts.gstatic.com` | `fontSrc` |
|
|
891
|
-
| `csp` set (always) | `@trustedOrigins` | `connectSrc` |
|
|
892
|
-
|
|
893
|
-
Anything you already wrote stays — auto-config never removes or overrides. Every applied addition prints to stderr at compile so the magic is visible:
|
|
894
|
-
|
|
895
|
-
```
|
|
896
|
-
[security] auto-added 'unsafe-inline' to csp.styleSrc — account: true → bundled Account SPA → inline style attributes from Tailwind / TanStack Router
|
|
897
|
-
[security] auto-added @trustedOrigins to csp.connectSrc — CORS-trusted origins must be reachable from XHR/fetch (matches cors() allowlist)
|
|
898
|
-
```
|
|
899
|
-
|
|
900
|
-
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.
|
|
901
|
-
|
|
902
|
-
**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.
|
|
903
|
-
|
|
904
|
-
**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.
|
|
649
|
+
…and the compiler fills in font hosts, trusted origins, and SPA-baked URLs.
|
|
905
650
|
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
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.
|
|
909
|
-
|
|
910
|
-
### Out of scope (deferred)
|
|
911
|
-
|
|
912
|
-
- **Per-request CSP nonces** (`@nonce` sentinel implementation) — Phase 2 / 0.10.16. Sentinel still errors at compile in 0.10.15.
|
|
913
|
-
- **`revocationCheck: 'kv'` for `auth.jwt`** — schema accepts it, runtime still errors at compile. Slipped from 0.10.15 to 0.10.16.
|
|
914
|
-
- **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.
|
|
651
|
+
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`.
|
|
915
652
|
|
|
916
653
|
---
|
|
917
654
|
|
|
918
655
|
## v0.10.14 — May 1, 2026
|
|
919
656
|
|
|
920
|
-
### `auth.jwt`
|
|
657
|
+
### `auth.jwt` config
|
|
921
658
|
|
|
922
|
-
|
|
659
|
+
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):
|
|
923
660
|
|
|
924
661
|
```ts
|
|
925
662
|
auth: {
|
|
926
663
|
jwt: {
|
|
927
|
-
expiresIn: 30,
|
|
928
|
-
issuer: 'my-api',
|
|
929
|
-
audience: 'partner-svc',
|
|
930
|
-
secretEnv: 'CUSTOM_JWT_SECRET',
|
|
664
|
+
expiresIn: 30,
|
|
665
|
+
issuer: 'my-api',
|
|
666
|
+
audience: 'partner-svc',
|
|
667
|
+
secretEnv: 'CUSTOM_JWT_SECRET',
|
|
931
668
|
},
|
|
932
669
|
}
|
|
933
670
|
```
|
|
934
671
|
|
|
935
|
-
|
|
672
|
+
### Admin MCP endpoints filtered
|
|
936
673
|
|
|
937
|
-
|
|
674
|
+
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.
|
|
938
675
|
|
|
939
|
-
###
|
|
676
|
+
### Declarative `security` config
|
|
940
677
|
|
|
941
|
-
|
|
678
|
+
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.
|
|
942
679
|
|
|
943
|
-
|
|
680
|
+
The compiler lints the resolved config for known footguns: `@unsafe-inline` in `script-src`, wildcard sources, missing `default-src`, HSTS preload-list misconfiguration.
|
|
944
681
|
|
|
945
|
-
|
|
682
|
+
### HSTS skipped on localhost
|
|
946
683
|
|
|
947
|
-
|
|
948
|
-
security: {
|
|
949
|
-
csp: {
|
|
950
|
-
defaultSrc: ['@self'],
|
|
951
|
-
scriptSrc: ['@self'],
|
|
952
|
-
styleSrc: ['@self', '@unsafe-inline'],
|
|
953
|
-
frameAncestors: ['@none'],
|
|
954
|
-
objectSrc: ['@none'],
|
|
955
|
-
upgradeInsecureRequests: true,
|
|
956
|
-
},
|
|
957
|
-
coop: 'same-origin',
|
|
958
|
-
}
|
|
959
|
-
```
|
|
960
|
-
|
|
961
|
-
`@`-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.
|
|
962
|
-
|
|
963
|
-
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.
|
|
964
|
-
|
|
965
|
-
Defaults preserve 0.10.13 behaviour byte-for-byte — adding the block without setting any field is a no-op.
|
|
966
|
-
|
|
967
|
-
See [the docs page](/compiler/config/security) for the full reference.
|
|
968
|
-
|
|
969
|
-
### HSTS no longer pins `localhost` to HTTPS
|
|
970
|
-
|
|
971
|
-
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.
|
|
972
|
-
|
|
973
|
-
### Out of scope (deferred)
|
|
974
|
-
|
|
975
|
-
- **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.
|
|
976
|
-
- **Asset-hash CSP** for inline `<style>` and `<script>` blocks emitted by the bundled SPAs — Phase 3.
|
|
977
|
-
- **Per-route CSP overrides** (e.g. one looser policy for `/admin`) — single global CSP for now.
|
|
684
|
+
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.
|
|
978
685
|
|
|
979
686
|
---
|
|
980
687
|
|
|
981
688
|
## v0.10.13 — May 1, 2026
|
|
982
689
|
|
|
983
|
-
### Clickjacking
|
|
984
|
-
|
|
985
|
-
Every Worker now emits two clickjacking-defence headers on every
|
|
986
|
-
response:
|
|
987
|
-
|
|
988
|
-
- `Content-Security-Policy: frame-ancestors 'self' <TRUSTED_ORIGINS…>`
|
|
989
|
-
- `X-Frame-Options: SAMEORIGIN`
|
|
990
|
-
|
|
991
|
-
The CSP allowlist is sourced from the same `TRUSTED_ORIGINS` constant
|
|
992
|
-
that gates CORS, so users configure their domains in one place
|
|
993
|
-
(`auth.trustedOrigins` / `auth.trustedOriginDefaults` in
|
|
994
|
-
`quickback.config.ts`) and both CORS and frame-ancestors stay in
|
|
995
|
-
lockstep. `'self'` is always allowed so an app's own SPAs can frame
|
|
996
|
-
their own routes (e.g. an account login popover hosted on the same
|
|
997
|
-
origin).
|
|
998
|
-
|
|
999
|
-
Modern browsers obey `frame-ancestors` and ignore `X-Frame-Options`
|
|
1000
|
-
when both are set; the legacy header is included for clients that
|
|
1001
|
-
don't speak CSP3. The CSP intentionally only sets `frame-ancestors` —
|
|
1002
|
-
adding `script-src` / `default-src` would need a much wider audit
|
|
1003
|
-
across SPA assets, inline scripts, and third-party embeds, so that's
|
|
1004
|
-
left as a follow-up.
|
|
690
|
+
### Clickjacking defence on every Worker
|
|
1005
691
|
|
|
1006
|
-
|
|
1007
|
-
config change needed unless you want to allow extra cross-origin
|
|
1008
|
-
iframe embeds, in which case add them to `auth.trustedOrigins`.
|
|
1009
|
-
|
|
1010
|
-
---
|
|
1011
|
-
|
|
1012
|
-
## v0.10.12 — May 1, 2026
|
|
1013
|
-
|
|
1014
|
-
### Bundled-docs sync for the MCP recon fix
|
|
1015
|
-
|
|
1016
|
-
Patch release that re-bundles the CLI's offline docs (consulted by the
|
|
1017
|
-
Claude Code skill, Cursor rules, and other AI assistants) so they
|
|
1018
|
-
reflect the corrected `tools/list` access-filter behavior and CORS
|
|
1019
|
-
posture shipped in v0.10.11. The `compiler/config/agents.mdx` page
|
|
1020
|
-
itself was already corrected on the docs site immediately after the
|
|
1021
|
-
0.10.11 release; this bump propagates that text into the bundle inside
|
|
1022
|
-
`@quickback-dev/cli`.
|
|
1023
|
-
|
|
1024
|
-
No runtime or compiler behavior change — re-running `quickback compile`
|
|
1025
|
-
against this version produces the same output as v0.10.11.
|
|
692
|
+
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.
|
|
1026
693
|
|
|
1027
694
|
---
|
|
1028
695
|
|
|
1029
696
|
## v0.10.11 — May 1, 2026
|
|
1030
697
|
|
|
1031
|
-
### MCP `tools/list` is
|
|
1032
|
-
|
|
1033
|
-
The generated MCP-over-HTTP server (`src/routes/mcp.ts`) had three holes
|
|
1034
|
-
that turned a standard pentest into trivial recon:
|
|
1035
|
-
|
|
1036
|
-
1. `tools/list` returned the entire tool catalogue to anyone — including
|
|
1037
|
-
admin-only endpoints — without checking auth or roles. Tool
|
|
1038
|
-
descriptions also leaked sentences like `[UNSAFE] bypasses tenant
|
|
1039
|
-
scoping and requires elevated access` verbatim.
|
|
1040
|
-
2. The endpoint set `Access-Control-Allow-Origin: *` so any origin could
|
|
1041
|
-
pull the catalogue from a browser.
|
|
1042
|
-
3. Unauthenticated `GET /mcp` enumerated every tool name in its
|
|
1043
|
-
discovery payload.
|
|
1044
|
-
|
|
1045
|
-
Fix:
|
|
1046
|
-
|
|
1047
|
-
- Each tool now carries sanitised access metadata (`_access` covering
|
|
1048
|
-
`roles` / `userRole` / `or` / `and`, plus `_public` for `PUBLIC`
|
|
1049
|
-
pseudo-role or empty `security`). `tools/list` filters against the
|
|
1050
|
-
caller's `ctx` — unauth callers see only `_public` tools, authed
|
|
1051
|
-
callers see only role-gated tools they pass. Record predicates and
|
|
1052
|
-
function-form access (opaque at list time) are dropped.
|
|
1053
|
-
- Wildcard CORS removed entirely. The parent app's `cors()` middleware
|
|
1054
|
-
(origin allowlist via `TRUSTED_ORIGINS` + `BETTER_AUTH_URL`) now
|
|
1055
|
-
applies uniformly to `/mcp`, same as every other route.
|
|
1056
|
-
- `[UNSAFE] ... bypasses tenant scoping ...` flavour text is gone.
|
|
1057
|
-
`annotations.destructiveHint` and `_unsafe` remain — those are the
|
|
1058
|
-
spec-correct signals for clients to warn users.
|
|
1059
|
-
- Unauthenticated `GET /mcp` no longer lists tool names. Inventory is
|
|
1060
|
-
only available via the access-filtered `tools/list`.
|
|
1061
|
-
|
|
1062
|
-
This filter is recon-mitigation, not a security boundary: `tools/call`
|
|
1063
|
-
still re-enters the Hono app and runs every middleware (auth, firewall,
|
|
1064
|
-
access, guards, masking), so hiding a tool from list never weakens the
|
|
1065
|
-
underlying gate.
|
|
1066
|
-
|
|
1067
|
-
Known follow-up: Better Auth admin endpoints (`ban-user`, `create-user`,
|
|
1068
|
-
`impersonate-user`, etc.) don't yet emit `x-access` in the OpenAPI spec,
|
|
1069
|
-
so any logged-in user still sees them in `tools/list` (the actual call
|
|
1070
|
-
is still gated by the admin plugin). Tracked separately.
|
|
698
|
+
### MCP `tools/list` is access-filtered
|
|
1071
699
|
|
|
1072
|
-
|
|
700
|
+
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.
|
|
1073
701
|
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
`access.record` is a flat field map evaluated as implicit AND between
|
|
1079
|
-
entries — keys must be column names. Putting `and: [...]` (or `or` /
|
|
1080
|
-
`roles` / `userRole`) inside `record` was a real-world footgun: the
|
|
1081
|
-
runtime treated the literal string `"and"` as a column lookup, the
|
|
1082
|
-
predicate failed on every row, and the caller got a silent `403` /
|
|
1083
|
-
empty list with nothing pointing at the misuse. The TypeScript type
|
|
1084
|
-
couldn't catch this — `RecordConditions` is an open-ended index
|
|
1085
|
-
signature, so any key parses.
|
|
702
|
+
- Wildcard CORS removed from the MCP endpoint.
|
|
703
|
+
- Unauthenticated `GET /mcp` no longer enumerates tool names.
|
|
704
|
+
- Internal flavor text is removed; `annotations.destructiveHint` and `_unsafe` remain — those are the spec-correct signals for clients.
|
|
1086
705
|
|
|
1087
|
-
|
|
1088
|
-
ops, `read.access`, view access, masking `show` / `query`, action
|
|
1089
|
-
access) and throws a clear migration error when `record` contains a
|
|
1090
|
-
reserved key:
|
|
1091
|
-
|
|
1092
|
-
- `and` / `or` inside `record` → use the top-level `and` / `or`
|
|
1093
|
-
sibling: `{ and: [{ record: { ... } }, { record: { ... } }] }`
|
|
1094
|
-
- `roles` / `userRole` inside `record` → put them at the access node
|
|
1095
|
-
alongside `record`: `{ roles: [...], record: { ... } }`
|
|
1096
|
-
|
|
1097
|
-
The error names the exact origin (`crud.update.access`,
|
|
1098
|
-
`actions.focus.access.or[1]`, etc.) so the fix lands in the right place.
|
|
706
|
+
`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.
|
|
1099
707
|
|
|
1100
708
|
---
|
|
1101
709
|
|
|
1102
|
-
## v0.10.
|
|
1103
|
-
|
|
1104
|
-
### Role hierarchy now expands in record-based action access
|
|
1105
|
-
|
|
1106
|
-
`auth.roleHierarchy: ['member', 'admin', 'owner']` plus
|
|
1107
|
-
`access: { roles: ['member+'] }` on a record-based action used to
|
|
1108
|
-
silently 403 valid callers. The standalone-action route generator
|
|
1109
|
-
inlined the expanded role list as a JSON literal, but the
|
|
1110
|
-
record-based generator read the access config back through the
|
|
1111
|
-
runtime `actions['name'].access` import — the user's source, where
|
|
1112
|
-
the unexpanded `'member+'` shorthand still lived. The runtime did
|
|
1113
|
-
literal string matching against `ctx.roles`, so an `owner` calling
|
|
1114
|
-
the action got `['member+'] !== 'owner'` and was rejected.
|
|
710
|
+
## v0.10.10 — April 29, 2026
|
|
1115
711
|
|
|
1116
|
-
|
|
1117
|
-
same way standalone routes do. `input` and `execute` still flow
|
|
1118
|
-
through the runtime import (closures aren't serializable); only the
|
|
1119
|
-
access config is lifted to a JSON literal so the compile-time
|
|
1120
|
-
expansion actually reaches the matcher.
|
|
712
|
+
### Reserved keys in `access.record` are rejected
|
|
1121
713
|
|
|
1122
|
-
|
|
1123
|
-
behavior in — it asserts that `member+` never reaches the route
|
|
1124
|
-
output and that the access config is no longer read from
|
|
1125
|
-
`actions[name].access` at runtime.
|
|
714
|
+
`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).
|
|
1126
715
|
|
|
1127
716
|
---
|
|
1128
717
|
|
|
1129
718
|
## v0.10.8 — April 29, 2026
|
|
1130
719
|
|
|
1131
|
-
### Audit
|
|
720
|
+
### Audit logging on Postgres targets
|
|
721
|
+
|
|
722
|
+
`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.
|
|
1132
723
|
|
|
1133
|
-
|
|
724
|
+
### `auditDatabaseId` is a compile-time requirement
|
|
1134
725
|
|
|
1135
|
-
|
|
726
|
+
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.
|
|
1136
727
|
|
|
1137
|
-
###
|
|
728
|
+
### Action input → OpenAPI / MCP
|
|
1138
729
|
|
|
1139
|
-
|
|
730
|
+
`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.
|
|
1140
731
|
|
|
1141
|
-
|
|
1142
|
-
- Response schemas now emit `required[]` for every non-nullable column, so generated SDKs treat them as guaranteed-present rather than optional.
|
|
1143
|
-
- `text(_, { enum: [...] })` columns emit as closed `{ type: "string", enum: [...] }`, narrowing to literal unions.
|
|
1144
|
-
- `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.
|
|
732
|
+
### OpenAPI fidelity
|
|
1145
733
|
|
|
1146
|
-
|
|
734
|
+
- Response schemas emit `required[]` for every non-nullable column.
|
|
735
|
+
- `text(_, { enum: [...] })` columns emit as closed `{ type: "string", enum: [...] }`.
|
|
736
|
+
- `id` claims `format: "uuid"` only when the project's `generateId` actually produces UUIDs. cuid2 / prefixed / nanoid / serial generators emit plain `{ type: "string" }`.
|
|
1147
737
|
|
|
1148
|
-
|
|
738
|
+
### Minor
|
|
1149
739
|
|
|
1150
|
-
|
|
740
|
+
- Auto-mask predicate verifies the resolved owner column exists before emitting an `or: 'owner'` clause; falls back to roles-only with a warning otherwise.
|
|
741
|
+
- 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).
|
|
1151
742
|
|
|
1152
743
|
---
|
|
1153
744
|
|
|
1154
|
-
##
|
|
745
|
+
## DSL: one file per action, multi-table per feature
|
|
1155
746
|
|
|
1156
|
-
|
|
747
|
+
### One file per action
|
|
748
|
+
|
|
749
|
+
Action authoring is one file per action under `<feature>/actions/<name>.ts`. The filename is the action name and the URL segment:
|
|
1157
750
|
|
|
1158
751
|
```typescript
|
|
1159
752
|
// features/applications/actions/advance.ts
|
|
@@ -1174,65 +767,37 @@ export default defineAction({
|
|
|
1174
767
|
});
|
|
1175
768
|
```
|
|
1176
769
|
|
|
1177
|
-
`defineAction` is imported from a generated per-feature helper at `<feature>/.quickback/define-action.ts` —
|
|
770
|
+
`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.
|
|
1178
771
|
|
|
1179
772
|
**Discovery rules:**
|
|
1180
|
-
- `actions/<name>.ts` binds to the feature's primary table
|
|
1181
|
-
- `actions/<table>/<name>.ts` binds to the sibling table file
|
|
1182
|
-
- Setting `path:` makes the action standalone (custom URL, no record fetch
|
|
1183
|
-
- Tableless features
|
|
1184
|
-
- 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)`.
|
|
1185
|
-
- 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).
|
|
1186
|
-
|
|
1187
|
-
**Retired** (rejected at load time with migration guidance):
|
|
1188
|
-
|
|
1189
|
-
- `actions.ts` (bundled multi-action file)
|
|
1190
|
-
- `_feature.ts` (shared preamble + tableless actions)
|
|
1191
|
-
- `handlers/` directory + `handler:` string ref
|
|
1192
|
-
- `defineActions(table, {…})` and `defineActions(null, {…})`
|
|
1193
|
-
- `export default { actions: {…} }`
|
|
1194
|
-
- Colocated `defineActions` inside table files
|
|
1195
|
-
- `standalone: true` flag (presence of `path:` is the new signal)
|
|
1196
|
-
- `*-actions.ts` / `*.actions.ts` filename patterns
|
|
1197
|
-
|
|
1198
|
-
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.
|
|
1199
|
-
|
|
1200
|
-
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.
|
|
1201
|
-
|
|
1202
|
-
See the [Actions docs](/compiler/definitions/actions) for the full reference.
|
|
1203
|
-
|
|
1204
|
-
---
|
|
1205
|
-
|
|
1206
|
-
## Multi-table actions per feature
|
|
773
|
+
- `actions/<name>.ts` binds to the feature's primary table.
|
|
774
|
+
- `actions/<table>/<name>.ts` binds to the sibling table file.
|
|
775
|
+
- Setting `path:` makes the action standalone (custom URL, no record fetch).
|
|
776
|
+
- Tableless features require every action to be standalone.
|
|
1207
777
|
|
|
1208
|
-
|
|
778
|
+
**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.
|
|
1209
779
|
|
|
1210
|
-
|
|
1211
|
-
- **`actions.ts`** (existing) — single primary-table actions file at feature root. Unchanged behaviour.
|
|
1212
|
-
- **`actions/<table>.ts`** — per-table action files for teams that want strict schema/behavior separation or need to break an import cycle.
|
|
780
|
+
See [Actions docs](/compiler/definitions/actions).
|
|
1213
781
|
|
|
1214
|
-
|
|
782
|
+
### Multi-table actions per feature
|
|
1215
783
|
|
|
1216
|
-
|
|
784
|
+
One feature directory can own actions on multiple tables. Three discovery modes:
|
|
1217
785
|
|
|
1218
|
-
|
|
786
|
+
- **Colocated** (canonical) — `<table>.ts` containing both `defineTable` and `defineActions(<table>, …)`. One file per entity.
|
|
787
|
+
- **`actions.ts`** — single primary-table actions file at feature root.
|
|
788
|
+
- **`actions/<table>.ts`** — per-table action files for strict schema/behavior separation.
|
|
1219
789
|
|
|
1220
|
-
|
|
790
|
+
Plus a universal `_feature.ts` slot for non-table-bound feature-level actions and shared Zod schemas.
|
|
1221
791
|
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
`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.
|
|
1225
|
-
|
|
1226
|
-
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`.
|
|
792
|
+
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.
|
|
1227
793
|
|
|
1228
794
|
---
|
|
1229
795
|
|
|
1230
|
-
## Firewall: named-scope shape
|
|
796
|
+
## Firewall: named-scope shape
|
|
1231
797
|
|
|
1232
|
-
The named-scope firewall shape
|
|
798
|
+
The named-scope firewall shape is a co-equal user-facing input alongside the predicate array:
|
|
1233
799
|
|
|
1234
800
|
```typescript
|
|
1235
|
-
// All three are now valid; all compile to the same predicate array internally.
|
|
1236
801
|
firewall: { organization: { column: 'tenant_id' } } // named-scope (compact)
|
|
1237
802
|
firewall: { owner: { column: 'account_user_id' } }
|
|
1238
803
|
firewall: { exception: true }
|
|
@@ -1244,27 +809,17 @@ firewall: [
|
|
|
1244
809
|
|
|
1245
810
|
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.
|
|
1246
811
|
|
|
1247
|
-
**Auto-detection synonyms
|
|
812
|
+
**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`.
|
|
1248
813
|
|
|
1249
|
-
**`ownerId` is
|
|
1250
|
-
|
|
1251
|
-
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.
|
|
814
|
+
**`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.
|
|
1252
815
|
|
|
1253
816
|
---
|
|
1254
817
|
|
|
1255
818
|
## v0.10.0 — April 26, 2026
|
|
1256
819
|
|
|
1257
|
-
### `q.scope()`
|
|
1258
|
-
|
|
1259
|
-
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).
|
|
820
|
+
### `q.scope()` — single-declaration tenant scoping
|
|
1260
821
|
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
1. Auto-derive the firewall predicate (`{ field: 'organizationId', equals: 'ctx.activeOrgId' }`) so the explicit `firewall:` block can be omitted entirely.
|
|
1264
|
-
2. Add the column to `GUARDS_CONFIG.systemManaged` so client input is rejected at the guard layer.
|
|
1265
|
-
3. Auto-populate from `ctx` on create / upsert.
|
|
1266
|
-
|
|
1267
|
-
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.
|
|
822
|
+
`q.scope(kind)` replaces the three-place pattern (column declaration + firewall predicate + ownership-guard) with one column:
|
|
1268
823
|
|
|
1269
824
|
```typescript
|
|
1270
825
|
columns: {
|
|
@@ -1274,304 +829,148 @@ columns: {
|
|
|
1274
829
|
}
|
|
1275
830
|
```
|
|
1276
831
|
|
|
1277
|
-
|
|
832
|
+
`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.
|
|
833
|
+
|
|
834
|
+
See [`q.scope()`](/compiler/definitions/schema#qscope--tenant-scope-columns).
|
|
1278
835
|
|
|
1279
|
-
|
|
836
|
+
### `masking[col].query.roles` — unified filter / sort / search gate
|
|
837
|
+
|
|
838
|
+
The three legacy per-capability flags (`filterable`, `searchable`, `sortable`) are replaced by a single `query.roles` allowlist:
|
|
1280
839
|
|
|
1281
840
|
```typescript
|
|
1282
841
|
masking: {
|
|
1283
842
|
email: {
|
|
1284
843
|
type: 'email',
|
|
1285
844
|
show: { roles: ['admin'] },
|
|
1286
|
-
query: { roles: ['admin'] }, //
|
|
845
|
+
query: { roles: ['admin'] }, // defaults to show.roles when omitted
|
|
1287
846
|
},
|
|
1288
847
|
}
|
|
1289
848
|
```
|
|
1290
849
|
|
|
1291
|
-
|
|
850
|
+
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.
|
|
1292
851
|
|
|
1293
|
-
**Breaking:**
|
|
852
|
+
**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`).
|
|
1294
853
|
|
|
1295
854
|
---
|
|
1296
855
|
|
|
1297
856
|
## v0.9.0 — April 25, 2026
|
|
1298
857
|
|
|
1299
|
-
###
|
|
858
|
+
### Unified `read:` pipeline
|
|
1300
859
|
|
|
1301
|
-
|
|
1302
|
-
side of every resource now has its own block — `read:` — that owns the
|
|
1303
|
-
collection-level `GET /` endpoint, single-record `GET /:id`, and named view
|
|
1304
|
-
projections. The legacy `crud.list` and `crud.get` shapes are rejected at
|
|
1305
|
-
compile time. See the new [Read pipeline](/compiler/definitions/read) page
|
|
1306
|
-
for the full reference and migration table.
|
|
860
|
+
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.
|
|
1307
861
|
|
|
1308
862
|
**Breaking changes** (compile-time errors with migration hints):
|
|
1309
863
|
|
|
1310
|
-
- `crud.list` →
|
|
1311
|
-
- `crud.get` → `read.access` (single-record GET inherits automatically
|
|
1312
|
-
- Top-level `views: {...}` →
|
|
864
|
+
- `crud.list` → `read.access` (plus `read.pageSize` / `read.maxPageSize`)
|
|
865
|
+
- `crud.get` → `read.access` (single-record GET inherits automatically)
|
|
866
|
+
- Top-level `views: {...}` → `read.views: {...}`
|
|
1313
867
|
- `crud.list.fields` / `crud.get.fields` → declare a named view under `read.views` and call `/views/{name}`
|
|
1314
868
|
|
|
1315
|
-
|
|
1316
|
-
access check **before** the firewall query, so a caller without a matching
|
|
1317
|
-
role gets 403 before the database is touched. This closes the 404-vs-403
|
|
1318
|
-
ID-probe channel — an unauthorized caller can no longer distinguish "row
|
|
1319
|
-
exists in another tenant" from "row doesn't exist." See
|
|
1320
|
-
[Access evaluation order](/compiler/definitions/access#evaluation-order).
|
|
1321
|
-
|
|
1322
|
-
**Transactional batch operations**: batch endpoints now expose a
|
|
1323
|
-
`failFast` option (replacing the old `atomic` naming) and a
|
|
1324
|
-
`meta.transactional` response field. On tx-supporting providers
|
|
1325
|
-
(postgres, supabase, neon, libsql, better-sqlite3, bun-sqlite), `failFast: true`
|
|
1326
|
-
wraps the per-record loop in `db.transaction(...)` so any failure rolls
|
|
1327
|
-
back the entire batch. On Cloudflare D1 (no `db.transaction`), `failFast: true`
|
|
1328
|
-
still stops on the first error but prior writes stay committed; inspect
|
|
1329
|
-
`meta.transactional` to know which guarantee you got. Embedding queue
|
|
1330
|
-
messages and realtime broadcasts are emitted **after** the transaction
|
|
1331
|
-
commits, so a rolled-back batch produces no orphan jobs. See
|
|
1332
|
-
[Batch Operations: Transactional semantics](/compiler/targets/hono-api/using-the-api/batch-operations#transactional-semantics).
|
|
1333
|
-
|
|
1334
|
-
**`firewallErrorMode` lifted off the firewall block**: the field that
|
|
1335
|
-
controls 403-vs-404 on firewall misses now lives at the resource top level
|
|
1336
|
-
(sibling to `firewall:`), since the firewall config is now a predicate
|
|
1337
|
-
array and this is a presentation-layer choice. Existing `firewall.errorMode`
|
|
1338
|
-
values should be lifted to `firewallErrorMode` at the resource level.
|
|
1339
|
-
|
|
1340
|
-
**Read-only resources**: an empty `crud: {}` block (or omitting `crud:`
|
|
1341
|
-
entirely) is valid for read-only resources. `read:` alone is enough to
|
|
1342
|
-
expose `GET /` and `GET /:id`.
|
|
1343
|
-
|
|
1344
|
-
**Strict-mode top-level keys**: the strict allow-list now includes `dev` so
|
|
1345
|
-
`defineConfig({ dev: { ... } })` is accepted at the top level.
|
|
1346
|
-
|
|
1347
|
-
---
|
|
1348
|
-
|
|
1349
|
-
## v0.8.7 — April 17, 2026
|
|
1350
|
-
|
|
1351
|
-
### Security: Hono CVE cluster fix
|
|
869
|
+
### Pre-record access ordering
|
|
1352
870
|
|
|
1353
|
-
|
|
871
|
+
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).
|
|
1354
872
|
|
|
1355
|
-
###
|
|
873
|
+
### Transactional batch operations
|
|
1356
874
|
|
|
1357
|
-
|
|
875
|
+
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.
|
|
1358
876
|
|
|
1359
|
-
|
|
877
|
+
Embedding queue messages and realtime broadcasts emit after the transaction commits — rolled-back batches produce no orphan jobs.
|
|
1360
878
|
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
- `wrangler@^4.83.0`
|
|
1364
|
-
- `drizzle-orm@^0.45.2`, `drizzle-kit@^0.31.10`
|
|
1365
|
-
- `zod@^4.3.6`
|
|
1366
|
-
- `@cloudflare/workers-types@^4.20260417.1` (also deduped — was accidentally declared in both `dependencies` and `devDependencies` in some paths)
|
|
1367
|
-
- `@tanstack/react-query@^5.99.0` (Account app)
|
|
879
|
+
See [Batch Operations → Transactional semantics](/compiler/targets/hono-api/using-the-api/batch-operations#transactional-semantics).
|
|
1368
880
|
|
|
1369
881
|
---
|
|
1370
882
|
|
|
1371
|
-
## v0.8.
|
|
1372
|
-
|
|
1373
|
-
### Fix: Better Auth 1.5 and `@cloudflare/workers-types` Compatibility
|
|
883
|
+
## v0.8.7 — April 17, 2026
|
|
1374
884
|
|
|
1375
|
-
|
|
885
|
+
### Hono CVE bump
|
|
1376
886
|
|
|
1377
|
-
|
|
1378
|
-
- **`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).
|
|
1379
|
-
- **`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.
|
|
1380
|
-
- **`crypto.subtle.sign` / `verify`** no longer accept `Uint8Array<ArrayBufferLike>` directly. Generated `jwt.ts` casts encoded payloads to `BufferSource`.
|
|
887
|
+
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`.
|
|
1381
888
|
|
|
1382
|
-
|
|
889
|
+
### Cloudflare Email Sending in public beta
|
|
1383
890
|
|
|
1384
|
-
|
|
891
|
+
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).
|
|
1385
892
|
|
|
1386
|
-
|
|
893
|
+
### Dependency sweep
|
|
1387
894
|
|
|
1388
|
-
|
|
895
|
+
`wrangler@^4.83.0`, `drizzle-orm@^0.45.2`, `drizzle-kit@^0.31.10`, `zod@^4.3.6`, `@cloudflare/workers-types@^4.20260417.1`.
|
|
1389
896
|
|
|
1390
|
-
|
|
1391
|
-
- **`/api/v1/schema`** — returns `403` to non-admins.
|
|
1392
|
-
- **`custom_view` CRUD** — now gated on the new `userRole: ["admin"]` primitive rather than org membership.
|
|
1393
|
-
- **In-SPA gate** — unchanged; defense in depth behind the server-side gates.
|
|
897
|
+
---
|
|
1394
898
|
|
|
1395
|
-
|
|
899
|
+
## v0.8.5 — April 15, 2026
|
|
1396
900
|
|
|
1397
|
-
###
|
|
901
|
+
### `userRole` access primitive
|
|
1398
902
|
|
|
1399
|
-
|
|
903
|
+
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).
|
|
1400
904
|
|
|
1401
905
|
```typescript
|
|
1402
|
-
//
|
|
1403
|
-
access: { roles: ['admin'] }
|
|
1404
|
-
|
|
1405
|
-
// New: explicitly require user.role === 'admin' regardless of org membership
|
|
1406
|
-
access: { userRole: ['admin'] }
|
|
1407
|
-
|
|
1408
|
-
// "Org owner OR platform admin"
|
|
906
|
+
// Org owner OR platform admin
|
|
1409
907
|
access: { or: [{ roles: ['owner'] }, { userRole: ['admin'] }] }
|
|
1410
908
|
|
|
1411
909
|
// Platform admins see SSNs across every org
|
|
1412
910
|
masking: { ssn: { type: 'ssn', show: { userRole: ['admin'] } } }
|
|
1413
911
|
```
|
|
1414
912
|
|
|
1415
|
-
`userRole` works everywhere `Access` is accepted — CRUD, actions, views, masking, and inside `or
|
|
1416
|
-
|
|
1417
|
-
### Fix: `ReferenceError: customAlphabet is not defined` in generated POST handlers
|
|
1418
|
-
|
|
1419
|
-
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.
|
|
1420
|
-
|
|
1421
|
-
The compiler now emits the correct import alongside the ID expression for all three modes: `nanoid`, `customAlphabet`, and `createId` from `@paralleldrive/cuid2`.
|
|
1422
|
-
|
|
1423
|
-
No config changes required — recompile to pick up the fix.
|
|
913
|
+
`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).
|
|
1424
914
|
|
|
1425
|
-
###
|
|
915
|
+
### CMS admin gate enforced server-side
|
|
1426
916
|
|
|
1427
|
-
|
|
917
|
+
`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.
|
|
1428
918
|
|
|
1429
|
-
|
|
919
|
+
### Better Auth 1.5 + `@cloudflare/workers-types` compatibility
|
|
1430
920
|
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
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.
|
|
1434
|
-
|
|
1435
|
-
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.
|
|
1436
|
-
|
|
1437
|
-
No config changes required — recompile and redeploy the files worker.
|
|
1438
|
-
|
|
1439
|
-
---
|
|
1440
|
-
|
|
1441
|
-
## v0.8.6 — April 16, 2026
|
|
1442
|
-
|
|
1443
|
-
### Fix: Audit columns silently dropped from tables with a same-line index callback
|
|
1444
|
-
|
|
1445
|
-
Tables authored with the composite-index shape Drizzle / prettier produces —
|
|
1446
|
-
|
|
1447
|
-
```ts
|
|
1448
|
-
export const episodeTags = sqliteTable("episode_tags", {
|
|
1449
|
-
id: text("id").primaryKey(),
|
|
1450
|
-
episodeId: text("episode_id").notNull(),
|
|
1451
|
-
tagId: text("tag_id").notNull(),
|
|
1452
|
-
}, (t) => [ // <-- "}, (t) =>" on one line
|
|
1453
|
-
uniqueIndex("episode_tag_unique").on(t.episodeId, t.tagId),
|
|
1454
|
-
]);
|
|
1455
|
-
```
|
|
1456
|
-
|
|
1457
|
-
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`.
|
|
1458
|
-
|
|
1459
|
-
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.
|
|
1460
|
-
|
|
1461
|
-
**Recovery path:**
|
|
1462
|
-
|
|
1463
|
-
- 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.
|
|
1464
|
-
- 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.
|
|
1465
|
-
|
|
1466
|
-
### Fix: `firewall.exception` generated `isNull(<table>.deletedAt)` against a missing column
|
|
1467
|
-
|
|
1468
|
-
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`.
|
|
1469
|
-
|
|
1470
|
-
The three concerns are now fully independent:
|
|
1471
|
-
|
|
1472
|
-
- **`firewall.exception: true`** — only disables tenant scoping (org/user/team `WHERE` clauses). It does not gate audit fields or soft-delete.
|
|
1473
|
-
- **Audit fields** — always injected unless globally opted out. Unchanged.
|
|
1474
|
-
- **Soft-delete filter** — emitted only when the schema actually has `deletedAt` *or* the user explicitly set `firewall.softDelete`.
|
|
1475
|
-
|
|
1476
|
-
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.
|
|
1477
|
-
|
|
1478
|
-
No config changes required — recompile to pick up the fix.
|
|
921
|
+
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.
|
|
1479
922
|
|
|
1480
923
|
---
|
|
1481
924
|
|
|
1482
925
|
## v0.8.4 — April 14, 2026
|
|
1483
926
|
|
|
1484
|
-
###
|
|
927
|
+
### `generateId: "short"` strategy
|
|
1485
928
|
|
|
1486
|
-
|
|
929
|
+
A compact ID option for tables where short, shareable codes matter more than collision resistance at scale:
|
|
1487
930
|
|
|
1488
931
|
```typescript
|
|
1489
932
|
providers: {
|
|
1490
|
-
database: defineDatabase("cloudflare-d1", {
|
|
1491
|
-
generateId: "short",
|
|
1492
|
-
}),
|
|
933
|
+
database: defineDatabase("cloudflare-d1", { generateId: "short" }),
|
|
1493
934
|
}
|
|
1494
935
|
```
|
|
1495
936
|
|
|
1496
|
-
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
|
|
1497
|
-
|
|
1498
|
-
**When to use:** room codes, invite links, share URLs, ephemeral records — anywhere the ID appears in a URL or needs to be human-typeable.
|
|
1499
|
-
|
|
1500
|
-
**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"`.
|
|
937
|
+
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.
|
|
1501
938
|
|
|
1502
|
-
|
|
939
|
+
**When to use:** room codes, invite links, share URLs, ephemeral records.
|
|
1503
940
|
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
## v0.8.3 — April 14, 2026
|
|
1507
|
-
|
|
1508
|
-
### Fix: `wrangler.toml` Route Placement and Binding IDs
|
|
1509
|
-
|
|
1510
|
-
Two bugs in the generated `wrangler.toml` that blocked production deployment without manual edits:
|
|
1511
|
-
|
|
1512
|
-
**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.
|
|
1513
|
-
|
|
1514
|
-
**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:
|
|
1515
|
-
|
|
1516
|
-
| Binding | Config sources checked (in order) |
|
|
1517
|
-
|---------|-----------------------------------|
|
|
1518
|
-
| `AUTH_DB` | `database.config.authDatabaseId` |
|
|
1519
|
-
| `DB` | `database.config.featuresDatabaseId`, `database.config.databaseId` |
|
|
1520
|
-
| `FILES_DB` | `fileStorage.config.filesDatabaseId`, `database.config.filesDatabaseId` |
|
|
1521
|
-
| `KV` | `database.config.kvNamespaceId`, `storage.config.namespaceId`, `auth.config.kvId` |
|
|
1522
|
-
|
|
1523
|
-
See [Providers - Database Options](/compiler/config/providers#database-options) for the full list of supported ID properties.
|
|
1524
|
-
|
|
1525
|
-
### Fix: Account SPA Post-Login Redirect on Unified Domain
|
|
1526
|
-
|
|
1527
|
-
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.
|
|
1528
|
-
|
|
1529
|
-
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.
|
|
1530
|
-
|
|
1531
|
-
No config changes required — recompile to pick up the fix.
|
|
941
|
+
**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).
|
|
1532
942
|
|
|
1533
943
|
---
|
|
1534
944
|
|
|
1535
945
|
## v0.8.2 — April 11, 2026
|
|
1536
946
|
|
|
1537
|
-
### Catch-
|
|
947
|
+
### Catch-all `VITE_QUICKBACK_URL`
|
|
1538
948
|
|
|
1539
|
-
|
|
949
|
+
A single Quickback origin can be set in place of four separate URL env vars:
|
|
1540
950
|
|
|
1541
951
|
```bash
|
|
1542
|
-
# One variable — done.
|
|
1543
952
|
VITE_QUICKBACK_URL=https://secure.example.com
|
|
1544
953
|
```
|
|
1545
954
|
|
|
1546
|
-
When set, it's used as a fallback for the individual URLs:
|
|
1547
|
-
|
|
1548
955
|
| Individual var (explicit) | Fallback when unset |
|
|
1549
956
|
|---|---|
|
|
1550
957
|
| `VITE_QUICKBACK_API_URL` | `${VITE_QUICKBACK_URL}` |
|
|
1551
958
|
| `VITE_QUICKBACK_ACCOUNT_URL` | `${VITE_QUICKBACK_URL}/account` |
|
|
1552
959
|
| `VITE_QUICKBACK_CMS_URL` | `${VITE_QUICKBACK_URL}/cms` |
|
|
1553
960
|
|
|
1554
|
-
`VITE_QUICKBACK_APP_URL` stays independent — it points at the tenant's own frontend
|
|
1555
|
-
|
|
1556
|
-
**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.
|
|
1557
|
-
|
|
1558
|
-
See [Environment Variables](/stack/account-ui/environment-variables) for the full reference.
|
|
961
|
+
`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).
|
|
1559
962
|
|
|
1560
963
|
---
|
|
1561
964
|
|
|
1562
965
|
## v0.8.1 — April 9, 2026
|
|
1563
966
|
|
|
1564
|
-
### Role
|
|
967
|
+
### Role hierarchy with `+` suffix
|
|
1565
968
|
|
|
1566
|
-
|
|
969
|
+
Define a hierarchy and use `+` to mean "this role and above":
|
|
1567
970
|
|
|
1568
971
|
```typescript
|
|
1569
|
-
|
|
1570
|
-
auth: {
|
|
1571
|
-
roleHierarchy: ['member', 'admin', 'owner'],
|
|
1572
|
-
}
|
|
972
|
+
auth: { roleHierarchy: ['member', 'admin', 'owner'] }
|
|
1573
973
|
|
|
1574
|
-
// In resource definitions
|
|
1575
974
|
crud: {
|
|
1576
975
|
list: { access: { roles: ["member+"] } }, // member, admin, owner
|
|
1577
976
|
create: { access: { roles: ["admin+"] } }, // admin, owner
|
|
@@ -1579,15 +978,15 @@ crud: {
|
|
|
1579
978
|
}
|
|
1580
979
|
```
|
|
1581
980
|
|
|
1582
|
-
Roles are expanded at compile time. No `+` = exact match. See [Access
|
|
981
|
+
Roles are expanded at compile time. No `+` = exact match. See [Access → Role Hierarchy](/compiler/definitions/access#role-hierarchy).
|
|
1583
982
|
|
|
1584
983
|
---
|
|
1585
984
|
|
|
1586
985
|
## v0.8.0 — April 9, 2026
|
|
1587
986
|
|
|
1588
|
-
### Breaking: VITE URL
|
|
987
|
+
### Breaking: VITE URL environment variables namespaced
|
|
1589
988
|
|
|
1590
|
-
All Quickback-generated URL environment variables are
|
|
989
|
+
All Quickback-generated URL environment variables are namespaced under `VITE_QUICKBACK_*` to avoid collisions with other Vite projects.
|
|
1591
990
|
|
|
1592
991
|
| Old | New |
|
|
1593
992
|
|-----|-----|
|
|
@@ -1596,129 +995,58 @@ All Quickback-generated URL environment variables are now namespaced under `VITE
|
|
|
1596
995
|
| `VITE_APP_URL` | `VITE_QUICKBACK_APP_URL` |
|
|
1597
996
|
| `VITE_CMS_URL` | `VITE_QUICKBACK_CMS_URL` |
|
|
1598
997
|
|
|
1599
|
-
|
|
998
|
+
Non-URL variables are unchanged (`VITE_ENABLE_*`, branding vars, `VITE_STRIPE_PUBLISHABLE_KEY`).
|
|
1600
999
|
|
|
1601
1000
|
**Action required:**
|
|
1602
|
-
-
|
|
1603
|
-
-
|
|
1604
|
-
-
|
|
1605
|
-
|
|
1606
|
-
See [Environment Variables](/stack/account-ui/environment-variables) for the full reference.
|
|
1607
|
-
|
|
1608
|
-
### CMS Access Control
|
|
1609
|
-
|
|
1610
|
-
The `cms.access` config option now enforces access at the CMS level, not just link visibility in Account UI.
|
|
1611
|
-
|
|
1612
|
-
```typescript
|
|
1613
|
-
cms: { access: "admin" }
|
|
1614
|
-
```
|
|
1615
|
-
|
|
1616
|
-
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.
|
|
1617
|
-
|
|
1618
|
-
See [CMS Connecting](/stack/cms/connecting) and [Compiler Config](/compiler/config) for details.
|
|
1001
|
+
- Compiled projects: re-run `quickback compile`.
|
|
1002
|
+
- Standalone deploys: update `.env`, `.env.production`, and `wrangler.toml` files manually.
|
|
1003
|
+
- Library users: `__QUICKBACK_API_URL__` / `__QUICKBACK_APP_URL__` globals are unchanged.
|
|
1619
1004
|
|
|
1620
|
-
###
|
|
1005
|
+
### CMS access control
|
|
1621
1006
|
|
|
1622
|
-
|
|
1007
|
+
`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.
|
|
1623
1008
|
|
|
1624
1009
|
---
|
|
1625
1010
|
|
|
1626
1011
|
## v0.5.11 — February 24, 2026
|
|
1627
1012
|
|
|
1628
|
-
###
|
|
1013
|
+
### Mandatory unsafe action audit trail
|
|
1629
1014
|
|
|
1630
|
-
|
|
1631
|
-
- Removed deprecated `/internal/validate` endpoint — use standard Better Auth session validation instead
|
|
1632
|
-
- Auth is now required for all API routes when running locally (previously some routes were unprotected in dev)
|
|
1015
|
+
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.
|
|
1633
1016
|
|
|
1634
|
-
|
|
1017
|
+
Compile-time raw SQL guard for actions and handlers (`allowRawSql: true` required per action).
|
|
1635
1018
|
|
|
1636
|
-
|
|
1637
|
-
- The CLI now properly detects and reports this with a clear error message pointing to the fix
|
|
1019
|
+
### Security contract report artifacts
|
|
1638
1020
|
|
|
1639
|
-
|
|
1021
|
+
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.
|
|
1640
1022
|
|
|
1641
|
-
|
|
1642
|
-
- Compile errors now include explicit rename key paths and fail fast on malformed rename config keys
|
|
1643
|
-
- See [Configuration](/compiler/config) for details
|
|
1023
|
+
### Headless Drizzle rename hints
|
|
1644
1024
|
|
|
1645
|
-
|
|
1025
|
+
`compiler.migrations.renames` configuration for CI/CD environments where Drizzle's interactive rename prompts block compilation. See [Configuration](/compiler/config).
|
|
1646
1026
|
|
|
1647
|
-
|
|
1648
|
-
- `reports/security-contracts.report.json`
|
|
1649
|
-
- `reports/security-contracts.report.sig.json`
|
|
1650
|
-
- Added config-driven signing controls:
|
|
1651
|
-
- `compiler.securityContracts.report.signature.enabled`
|
|
1652
|
-
- `compiler.securityContracts.report.signature.required`
|
|
1653
|
-
- `compiler.securityContracts.report.signature.key` / `keyEnv` / `keyId`
|
|
1654
|
-
- Missing required signing keys now fail loudly with explicit remediation guidance
|
|
1655
|
-
- Added strict config validation for report/signature paths and signing options
|
|
1027
|
+
### Minor
|
|
1656
1028
|
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
-
|
|
1660
|
-
- Cross-tenant unsafe actions now require Better Auth authentication plus platform admin role (`ctx.userRole === "admin"`)
|
|
1661
|
-
- Added mandatory audit logging for unsafe cross-tenant actions (success, denial, and error paths)
|
|
1662
|
-
- Cloudflare output now includes optional `AUDIT_DB` wiring, `drizzle.audit.config.ts`, and `db:migrate:audit:*` scripts when unsafe actions are present
|
|
1663
|
-
- Added compile-time raw SQL guard for actions and handlers (`allowRawSql: true` required per action)
|
|
1664
|
-
|
|
1665
|
-
---
|
|
1666
|
-
|
|
1667
|
-
## v0.5.10 — February 19, 2026
|
|
1668
|
-
|
|
1669
|
-
### Compiler Page Parsing & CLI Output
|
|
1670
|
-
|
|
1671
|
-
- Improved compiler page parsing for `definePage()` definitions
|
|
1672
|
-
- Better CLI output formatting during compilation
|
|
1673
|
-
- Added `apiPath` to schema registry for CMS integration
|
|
1674
|
-
|
|
1675
|
-
### Bug Fixes
|
|
1676
|
-
|
|
1677
|
-
- Fixed hyphenated action names not being properly quoted in generated code (e.g., `mark-complete` now generates valid JavaScript)
|
|
1678
|
-
- API key authentication (`x-api-key` header) is now handled separately from session tokens (`Bearer` header)
|
|
1679
|
-
|
|
1680
|
-
---
|
|
1681
|
-
|
|
1682
|
-
## v0.5.9 — February 16, 2026
|
|
1683
|
-
|
|
1684
|
-
### CMS Pages & CLI Page Support
|
|
1685
|
-
|
|
1686
|
-
- Added `definePage()` support for CMS-managed pages
|
|
1687
|
-
- Auth middleware improvements for page routes
|
|
1688
|
-
- CLI now supports page definitions alongside table and action definitions
|
|
1029
|
+
- Email OTP magic links work correctly.
|
|
1030
|
+
- Auth is required for all API routes when running locally.
|
|
1031
|
+
- Single-file multi-table exports alongside `defineTable()` produce a clear error.
|
|
1689
1032
|
|
|
1690
1033
|
---
|
|
1691
1034
|
|
|
1692
1035
|
## v0.5.8 — February 14, 2026
|
|
1693
1036
|
|
|
1694
|
-
### CMS
|
|
1037
|
+
### Quickback CMS
|
|
1695
1038
|
|
|
1696
|
-
|
|
1697
|
-
- CMS namespace added to actions for admin-specific operations
|
|
1698
|
-
- Fixed `guard` → `access` naming inconsistency in CMS action definitions
|
|
1699
|
-
|
|
1700
|
-
### Schema Registry & Firewall Improvements
|
|
1701
|
-
|
|
1702
|
-
- Added schema registry generator — the compiler now outputs a JSON schema registry used by the CMS
|
|
1703
|
-
- Firewall error modes: choose between `reveal` (403 with details) and `hide` (opaque 404) for security-sensitive deployments
|
|
1704
|
-
|
|
1705
|
-
### Bug Fixes
|
|
1706
|
-
|
|
1707
|
-
- Fixed anonymous user email format generation
|
|
1708
|
-
- Organization selector improvements in Account UI
|
|
1709
|
-
- Config validation now catches more errors at compile time
|
|
1710
|
-
- Better CRUD error handling with structured error responses
|
|
1711
|
-
- Fixed masking to use representative star counts instead of fixed formatting
|
|
1039
|
+
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.
|
|
1712
1040
|
|
|
1713
1041
|
---
|
|
1714
1042
|
|
|
1715
1043
|
## v0.5.7 — February 12, 2026
|
|
1716
1044
|
|
|
1717
|
-
### Scoped
|
|
1045
|
+
### Scoped database for actions
|
|
1718
1046
|
|
|
1719
|
-
Actions
|
|
1047
|
+
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.
|
|
1720
1048
|
|
|
1721
|
-
|
|
1049
|
+
Duck-typed column detection at runtime:
|
|
1722
1050
|
|
|
1723
1051
|
| Column Detected | SELECT / UPDATE / DELETE | INSERT |
|
|
1724
1052
|
|---|---|---|
|
|
@@ -1726,24 +1054,9 @@ The scoped DB uses duck-typed column detection at runtime:
|
|
|
1726
1054
|
| `ownerId` | Adds `WHERE ownerId = ?` | Auto-injects `ownerId` from context |
|
|
1727
1055
|
| `deletedAt` | Adds `WHERE deletedAt IS NULL` | — |
|
|
1728
1056
|
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
```typescript
|
|
1732
|
-
defineActions(todos, {
|
|
1733
|
-
complete: {
|
|
1734
|
-
type: "record",
|
|
1735
|
-
execute: async ({ db, ctx, record, input }) => {
|
|
1736
|
-
// db is scoped — only sees records in user's org, excludes soft-deleted
|
|
1737
|
-
const siblings = await db.select().from(todos);
|
|
1738
|
-
// ↑ automatically filtered to ctx.activeOrgId + deletedAt IS NULL
|
|
1739
|
-
},
|
|
1740
|
-
},
|
|
1741
|
-
});
|
|
1742
|
-
```
|
|
1743
|
-
|
|
1744
|
-
#### Unsafe Mode
|
|
1057
|
+
Every action is secure by default — no manual `WHERE` clauses needed.
|
|
1745
1058
|
|
|
1746
|
-
Actions that intentionally need to bypass security (admin reports, cross-org queries, migrations) can declare `unsafe: true` to receive a raw, unscoped database handle
|
|
1059
|
+
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`:
|
|
1747
1060
|
|
|
1748
1061
|
```typescript
|
|
1749
1062
|
defineActions(analytics, {
|
|
@@ -1758,108 +1071,45 @@ defineActions(analytics, {
|
|
|
1758
1071
|
});
|
|
1759
1072
|
```
|
|
1760
1073
|
|
|
1761
|
-
Without `unsafe: true`, `rawDb` is `undefined`.
|
|
1762
|
-
|
|
1763
|
-
**Related docs:** [Actions](/compiler/definitions/actions), [Actions API](/compiler/targets/hono-api/using-the-api/actions-api)
|
|
1074
|
+
Without `unsafe: true`, `rawDb` is `undefined`. See [Actions](/compiler/definitions/actions).
|
|
1764
1075
|
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
### Cascading Soft Delete
|
|
1076
|
+
### Cascading soft delete
|
|
1768
1077
|
|
|
1769
|
-
Soft-deleting a parent record
|
|
1770
|
-
|
|
1771
|
-
```
|
|
1772
|
-
DELETE /api/v1/projects/:id
|
|
1773
|
-
```
|
|
1774
|
-
|
|
1775
|
-
Generated behavior:
|
|
1776
|
-
```typescript
|
|
1777
|
-
// 1. Soft delete the parent
|
|
1778
|
-
await db.update(projects)
|
|
1779
|
-
.set({ deletedAt: now, deletedBy: userId })
|
|
1780
|
-
.where(eq(projects.id, id));
|
|
1781
|
-
|
|
1782
|
-
// 2. Auto-cascade to children (compiler-generated)
|
|
1783
|
-
await db.update(projectMembers)
|
|
1784
|
-
.set({ deletedAt: now, deletedBy: userId })
|
|
1785
|
-
.where(eq(projectMembers.projectId, id));
|
|
1786
|
-
|
|
1787
|
-
await db.update(projectTasks)
|
|
1788
|
-
.set({ deletedAt: now, deletedBy: userId })
|
|
1789
|
-
.where(eq(projectTasks.projectId, id));
|
|
1790
|
-
```
|
|
1078
|
+
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.
|
|
1791
1079
|
|
|
1792
1080
|
Rules:
|
|
1793
|
-
-
|
|
1794
|
-
-
|
|
1795
|
-
- Child tables must have `deletedAt` / `deletedBy` columns (auto-added by the compiler
|
|
1796
|
-
|
|
1797
|
-
**Related docs:** [Actions API — Cascading Soft Delete](/compiler/targets/hono-api/using-the-api/actions-api#cascading-soft-delete)
|
|
1081
|
+
- Applies to soft delete only. Hard delete relies on database-level `ON DELETE CASCADE`.
|
|
1082
|
+
- Cascades within the same feature only — cross-feature references are not affected.
|
|
1083
|
+
- Child tables must have `deletedAt` / `deletedBy` columns (auto-added by the compiler).
|
|
1798
1084
|
|
|
1799
|
-
|
|
1085
|
+
See [Actions API → Cascading Soft Delete](/compiler/targets/hono-api/using-the-api/actions-api#cascading-soft-delete).
|
|
1800
1086
|
|
|
1801
|
-
### Advanced
|
|
1087
|
+
### Advanced query parameters
|
|
1802
1088
|
|
|
1803
|
-
New
|
|
1089
|
+
New capabilities for all list endpoints:
|
|
1804
1090
|
|
|
1805
|
-
- **Field selection** — `?fields=id,name,status`
|
|
1806
|
-
- **Multi-sort** — `?sort=status:asc,createdAt:desc`
|
|
1807
|
-
- **Total count** — `?count=true` returns total matching records in
|
|
1091
|
+
- **Field selection** — `?fields=id,name,status`
|
|
1092
|
+
- **Multi-sort** — `?sort=status:asc,createdAt:desc`
|
|
1093
|
+
- **Total count** — `?count=true` returns total matching records in `X-Total-Count`
|
|
1808
1094
|
- **Full-text search** — `?search=keyword` searches across all text columns
|
|
1809
1095
|
|
|
1810
|
-
|
|
1811
|
-
# Get only names and statuses, sorted by status then date, with total count
|
|
1812
|
-
GET /api/v1/todos?fields=id,name,status&sort=status:asc,createdAt:desc&count=true
|
|
1813
|
-
|
|
1814
|
-
# Search across all text fields
|
|
1815
|
-
GET /api/v1/todos?search=urgent
|
|
1816
|
-
```
|
|
1817
|
-
|
|
1818
|
-
**Related docs:** [Query Parameters](/compiler/targets/hono-api/using-the-api/query-params)
|
|
1819
|
-
|
|
1820
|
-
---
|
|
1821
|
-
|
|
1822
|
-
### Audit Field Improvements
|
|
1823
|
-
|
|
1824
|
-
- `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
|
|
1825
|
-
- All audit fields (`createdAt`, `createdBy`, `modifiedAt`, `modifiedBy`, `deletedAt`, `deletedBy`) are auto-managed
|
|
1826
|
-
|
|
1827
|
-
---
|
|
1828
|
-
|
|
1829
|
-
## v0.5.6 — February 8, 2026
|
|
1830
|
-
|
|
1831
|
-
### Database Naming Conventions
|
|
1832
|
-
|
|
1833
|
-
- Default table and column naming changed to **snake_case** with `usePlurals: false`
|
|
1834
|
-
- Table names derived from generated Better Auth schema for consistency
|
|
1835
|
-
- Removed legacy single-database mode — split databases (auth + features) is now the standard
|
|
1836
|
-
|
|
1837
|
-
### Auth Variable Shadowing Fix
|
|
1838
|
-
|
|
1839
|
-
- Fixed `member` variable in auth middleware that shadowed the Drizzle `member` table import
|
|
1840
|
-
- Renamed to `sessionMember` to avoid conflicts in generated routes
|
|
1096
|
+
See [Query Parameters](/compiler/targets/hono-api/using-the-api/query-params).
|
|
1841
1097
|
|
|
1842
1098
|
---
|
|
1843
1099
|
|
|
1844
1100
|
## v0.5.5 — February 5, 2026
|
|
1845
1101
|
|
|
1846
|
-
###
|
|
1102
|
+
### OpenAPI spec generation
|
|
1847
1103
|
|
|
1848
|
-
|
|
1849
|
-
- Published `@quickback-dev/better-auth-combo-auth` — combined email + password + OTP authentication
|
|
1850
|
-
- Published `@quickback-dev/better-auth-aws-ses` — AWS SES email provider for Better Auth
|
|
1104
|
+
Generated APIs include a full OpenAPI specification at `/openapi.json`. Better Auth endpoints are included in the spec.
|
|
1851
1105
|
|
|
1852
|
-
###
|
|
1106
|
+
### Better Auth plugins
|
|
1853
1107
|
|
|
1854
|
-
-
|
|
1855
|
-
- Better Auth endpoints included in the spec
|
|
1856
|
-
- Runtime route: `GET /openapi.json`
|
|
1108
|
+
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).
|
|
1857
1109
|
|
|
1858
|
-
### Security
|
|
1110
|
+
### Security headers
|
|
1859
1111
|
|
|
1860
|
-
|
|
1861
|
-
- Security headers middleware (CSP, HSTS, X-Frame-Options, X-Content-Type-Options)
|
|
1862
|
-
- `BETTER_AUTH_SECRET` properly passed to generated config
|
|
1112
|
+
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.
|
|
1863
1113
|
|
|
1864
1114
|
---
|
|
1865
1115
|
|
|
@@ -1867,34 +1117,28 @@ GET /api/v1/todos?search=urgent
|
|
|
1867
1117
|
|
|
1868
1118
|
### Account UI
|
|
1869
1119
|
|
|
1870
|
-
|
|
1871
|
-
- Features: sessions, organizations, passkeys, passwordless, admin panel, API keys
|
|
1872
|
-
- Dual-mode: standalone (degit template) or embedded with Quickback projects
|
|
1120
|
+
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.
|
|
1873
1121
|
|
|
1874
|
-
### Webhook
|
|
1122
|
+
### Webhook system
|
|
1875
1123
|
|
|
1876
|
-
|
|
1877
|
-
- Outbound webhooks via Cloudflare Queues with automatic retries
|
|
1878
|
-
- Configurable per-feature webhook events
|
|
1124
|
+
Inbound webhook endpoints with signature verification. Outbound webhooks via Cloudflare Queues with automatic retries. Configurable per-feature webhook events.
|
|
1879
1125
|
|
|
1880
|
-
### Realtime &
|
|
1126
|
+
### Realtime & vector search
|
|
1881
1127
|
|
|
1882
|
-
|
|
1883
|
-
- Vector embeddings via Cloudflare Vectorize
|
|
1884
|
-
- KV and R2 storage integrations
|
|
1128
|
+
Durable Objects + WebSocket realtime subscriptions. Vector embeddings via Cloudflare Vectorize. KV and R2 storage integrations.
|
|
1885
1129
|
|
|
1886
1130
|
---
|
|
1887
1131
|
|
|
1888
1132
|
## v0.5.0 — January 2026
|
|
1889
1133
|
|
|
1890
|
-
### Initial
|
|
1891
|
-
|
|
1892
|
-
- **Quickback Compiler** — TypeScript-first backend compiler
|
|
1893
|
-
- **Four
|
|
1894
|
-
- **`defineTable()`** —
|
|
1895
|
-
- **Templates** — Cloudflare Workers,
|
|
1896
|
-
- **Cloud
|
|
1897
|
-
- **CLI** — `quickback create`, `quickback compile
|
|
1898
|
-
- **Better Auth
|
|
1899
|
-
- **Drizzle ORM** —
|
|
1900
|
-
- **Cloudflare D1** —
|
|
1134
|
+
### Initial release
|
|
1135
|
+
|
|
1136
|
+
- **Quickback Compiler** — TypeScript-first backend compiler.
|
|
1137
|
+
- **Four security pillars** — Firewall, Access, Guards, Masking.
|
|
1138
|
+
- **`defineTable()`** — schema + security configuration in a single file.
|
|
1139
|
+
- **Templates** — Cloudflare Workers, B2B SaaS.
|
|
1140
|
+
- **Cloud compiler** — remote compilation via `compiler.quickback.dev`.
|
|
1141
|
+
- **CLI** — `quickback create`, `quickback compile`.
|
|
1142
|
+
- **Better Auth integration** — organizations, roles, sessions.
|
|
1143
|
+
- **Drizzle ORM** — schema-first with automatic migrations.
|
|
1144
|
+
- **Cloudflare D1** — split database support (auth + features).
|