@quickback-dev/cli 0.66.4 → 0.66.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/README.md +0 -1
  2. package/dist/index.js +1 -1
  3. package/dist/skill/SKILL.md +0 -2
  4. package/dist/skill/docs/api/openapi.md +1 -1
  5. package/dist/skill/docs/configure/auth.md +8 -8
  6. package/dist/skill/docs/configure/domains.md +1 -1
  7. package/dist/skill/docs/configure/index.md +4 -4
  8. package/dist/skill/docs/configure/security.md +3 -3
  9. package/dist/skill/docs/define/access.md +52 -9
  10. package/dist/skill/docs/define/actions/defining.md +2 -2
  11. package/dist/skill/docs/define/actions/record-and-standalone.md +1 -2
  12. package/dist/skill/docs/define/areas.md +14 -15
  13. package/dist/skill/docs/define/changesets.md +5 -0
  14. package/dist/skill/docs/define/diagnostics.md +2 -2
  15. package/dist/skill/docs/define/fga.md +1 -1
  16. package/dist/skill/docs/define/firewall.md +5 -5
  17. package/dist/skill/docs/define/guards.md +17 -11
  18. package/dist/skill/docs/define/masking.md +2 -2
  19. package/dist/skill/docs/define/relationships.md +8 -10
  20. package/dist/skill/docs/define/scopes.md +2 -1
  21. package/dist/skill/docs/index.md +0 -6
  22. package/dist/skill/docs/platform/auth/jwt-optimization.md +2 -2
  23. package/dist/skill/docs/platform/realtime/durable-objects.md +1 -1
  24. package/dist/skill/docs/platform/realtime/partyserver-rooms.md +4 -4
  25. package/dist/skill/docs/platform/webhooks/inbound.md +1 -1
  26. package/dist/skill/docs/tooling/claude-skill.md +0 -7
  27. package/dist/skill/docs/tooling/cloud-compiler/endpoints.md +1 -1
  28. package/dist/skill/docs/tooling/output.md +7 -6
  29. package/dist/skill/docs/ui/account/features/admin.md +1 -1
  30. package/dist/skill/docs/ui/account/features/organizations.md +1 -1
  31. package/dist/skill/docs/ui/admin/index.md +1 -1
  32. package/dist/skill/docs/ui/admin/owned-records.md +81 -0
  33. package/dist/skill/docs/ui/admin/schema-format.md +16 -0
  34. package/package.json +1 -1
  35. package/src/skill/SKILL.md +0 -2
  36. package/src/skill/docs/api/openapi.md +1 -1
  37. package/src/skill/docs/configure/auth.md +8 -8
  38. package/src/skill/docs/configure/domains.md +1 -1
  39. package/src/skill/docs/configure/index.md +4 -4
  40. package/src/skill/docs/configure/security.md +3 -3
  41. package/src/skill/docs/define/access.md +52 -9
  42. package/src/skill/docs/define/actions/defining.md +2 -2
  43. package/src/skill/docs/define/actions/record-and-standalone.md +1 -2
  44. package/src/skill/docs/define/areas.md +14 -15
  45. package/src/skill/docs/define/changesets.md +5 -0
  46. package/src/skill/docs/define/diagnostics.md +2 -2
  47. package/src/skill/docs/define/fga.md +1 -1
  48. package/src/skill/docs/define/firewall.md +5 -5
  49. package/src/skill/docs/define/guards.md +17 -11
  50. package/src/skill/docs/define/masking.md +2 -2
  51. package/src/skill/docs/define/relationships.md +8 -10
  52. package/src/skill/docs/define/scopes.md +2 -1
  53. package/src/skill/docs/index.md +0 -6
  54. package/src/skill/docs/platform/auth/jwt-optimization.md +2 -2
  55. package/src/skill/docs/platform/realtime/durable-objects.md +1 -1
  56. package/src/skill/docs/platform/realtime/partyserver-rooms.md +4 -4
  57. package/src/skill/docs/platform/webhooks/inbound.md +1 -1
  58. package/src/skill/docs/tooling/claude-skill.md +0 -7
  59. package/src/skill/docs/tooling/cloud-compiler/endpoints.md +1 -1
  60. package/src/skill/docs/tooling/output.md +7 -6
  61. package/src/skill/docs/ui/account/features/admin.md +1 -1
  62. package/src/skill/docs/ui/account/features/organizations.md +1 -1
  63. package/src/skill/docs/ui/admin/index.md +1 -1
  64. package/src/skill/docs/ui/admin/owned-records.md +81 -0
  65. package/src/skill/docs/ui/admin/schema-format.md +16 -0
  66. package/dist/skill/docs/changelog/index.md +0 -928
  67. package/dist/skill/docs/changelog/v0.1x.md +0 -1202
  68. package/dist/skill/docs/changelog/v0.2x.md +0 -589
  69. package/dist/skill/docs/changelog/v0.3x.md +0 -1152
  70. package/dist/skill/docs/changelog/v0.4x.md +0 -1108
  71. package/dist/skill/docs/changelog/v0.5x.md +0 -885
  72. package/src/skill/docs/changelog/index.md +0 -928
  73. package/src/skill/docs/changelog/v0.1x.md +0 -1202
  74. package/src/skill/docs/changelog/v0.2x.md +0 -589
  75. package/src/skill/docs/changelog/v0.3x.md +0 -1152
  76. package/src/skill/docs/changelog/v0.4x.md +0 -1108
  77. package/src/skill/docs/changelog/v0.5x.md +0 -885
@@ -1,928 +0,0 @@
1
- # Changelog
2
-
3
- The current release series. Older entries are archived by version range:
4
-
5
- - [v0.50 – v0.54](/changelog/v0.5x)
6
- - [v0.40 – v0.48](/changelog/v0.4x)
7
- - [v0.32 – v0.39](/changelog/v0.3x)
8
- - [v0.20 – v0.29](/changelog/v0.2x)
9
- - [v0.18 and earlier](/changelog/v0.1x)
10
-
11
- ## Unreleased — tenant binding and credential hygiene
12
-
13
- Fixes from the attend-vip API security review. All are compiler changes;
14
- recompile to pick them up.
15
-
16
- - **Namespaces / scopes are tenant-bound** ([#391](https://github.com/paulstenhouse/quickback-compiler/issues/391)). A `{ roles }` / `{ team }` bulk-grant lane only applies when the hydrated instance belongs to `ctx.activeOrgId`; otherwise the caller falls through to the relationship lanes with no org roles. Inside an `any` firewall group with an org arm, scope / `via:` / permission arms are tenant-bound. Every mint (`/scope/v1/enter`, namespace `mintScope`, `/api/v1/token`) signs `orgId` only beside a membership `role`, the verifier ignores an unpaired `orgId`, and `POST /api/v1/token { dropOrg: true }` is a native privilege drop. See [scopes](/define/scopes#the-bulk-grant-lane-is-tenant-bound).
17
- - **Admin plugin honours the declared roles** ([#199](https://github.com/paulstenhouse/quickback-compiler/issues/199)). `plugins.admin.adminRoles` and `roles` are emitted verbatim; a narrowed `appmanager` stays narrowed, and an un-honourable declaration is a compile error.
18
- - **Better Auth rate limiting is durable on Workers** ([#404](https://github.com/paulstenhouse/quickback-compiler/issues/404)). `rateLimit.storage` defaults to `"database"` on Cloudflare (a `rateLimit` table is added — expect one migration), and every credential door (sign-up, password reset, email / phone OTP, magic link, two-factor, device flow) ships with a per-route rule; `customRules` merge on top. See [auth security](/platform/auth/security#rate-limiting).
19
- - **Presigned uploads enforce `maxFileSize` / `allowedTypes`** ([#405](https://github.com/paulstenhouse/quickback-compiler/issues/405)). `storage.signPutUrl` now requires `contentLength`; size and type are signed headers (`Content-Length`, `Content-Type`) the PUT must replay, and the declared limits are checked before a URL is minted. **Breaking for authored presign actions:** pass `contentLength`. See [using R2](/platform/storage/using-r2#presigned-uploads-with-ctxstorage).
20
- - **Auth catch blocks are generic in production** ([#406](https://github.com/paulstenhouse/quickback-compiler/issues/406)). `/auth/v1/*` and `/api/v1/token` 500s carry the underlying message only under `EXPOSE_ERROR_STACK`; the error-body redaction list now includes the compiler's own credential fields (`sessionToken`, `eventSessionToken`, `scopeJwt`, `wsTicket`, …).
21
- - **`openapi.publish` defaults to `'authenticated'` and gates every discovery surface** ([#407](https://github.com/paulstenhouse/quickback-compiler/issues/407)). `/openapi.json`, `/asyncapi.json`, `/docs`, `/llms.txt`, and `/.well-known/api-catalog` share one gate. **Breaking:** a project that relied on the anonymous default must set `publish: 'public'`. See [OpenAPI](/api/openapi#the-publish-gate).
22
- - **No shared `'default'` realtime room** ([#408](https://github.com/paulstenhouse/quickback-compiler/issues/408)). Org-less callers get a ticket bound to their own user room; org-less emits are skipped; a target naming no room is refused.
23
- - **`contract.redirects`** ([#409](https://github.com/paulstenhouse/quickback-compiler/issues/409)). Declarative same-origin path redirects (`/api/v2/*` → `/api/v1/*`, 308 by default), emitted right after the CORS mount so they survive every compile. See [API contract](/platform/api-contract#redirects--keep-answering-an-old-prefix).
24
-
25
- ## Unreleased — the standard API shape
26
-
27
- ### BREAKING: `contract.version` is retired
28
-
29
- There is one standard API shape, so there is nothing to select. Pinning
30
- `contract.version` is now a **compile error** on either value.
31
-
32
- **Delete that one line and keep `contract.routes` if you have it.** `routes`
33
- is the surviving axis and is what decides whether your URLs read `/api/v1` or
34
- `/api/v2` — removing it would move them.
35
-
36
- {/* doc-compile: skip — config fragment, not a compilable project */}
37
- ```typescript
38
- contract: { version: "v2", routes: "v1" } // before
39
- contract: { routes: "v1" } // after — same URLs, same behavior
40
- ```
41
-
42
- Deleting `version: "v2"` changes **no** behavior: it selected what is now
43
- simply the standard shape. Deleting `version: "v1"` is a real migration — see
44
- [the contract page](/platform/api-contract#contractversion-is-retired) for the
45
- four behaviors that pin opted out of, all now unconditional.
46
-
47
- ### BREAKING: CloudEvents `type` is reverse-DNS prefixed
48
-
49
- Realtime `postgres_changes` and `view_changes` frames now carry a
50
- `dev.quickback.` prefix on the CloudEvents `type`:
51
-
52
- ```
53
- myapp.registrations.insert → dev.quickback.myapp.registrations.insert
54
- myapp.view.agendaBoard.changed → dev.quickback.myapp.view.agendaBoard.changed
55
- ```
56
-
57
- **`qbframe` is the supported discriminator — do not match on `type`.** Its
58
- shape is not a stable contract; `qbframe` (`"broadcast"` / `"postgres_changes"`
59
- / `"view_changes"`) is. A client switching on `type` breaks here.
60
-
61
- **Author-supplied broadcast event names are unchanged.** A named-invalidation
62
- frame's `type` is still your `wireName` verbatim — that vocabulary is yours,
63
- not ours to prefix.
64
-
65
- `/asyncapi.json` documents the new `type` patterns, and its `info.version` is
66
- now the event-document version rather than a contract version.
67
-
68
- ### BREAKING: outbound webhooks are Standard Webhooks only
69
-
70
- The legacy `X-Webhook-Signature` / `X-Webhook-Event` / `X-Webhook-Delivery`
71
- headers and the Stripe-format `signPayload` / `verifySignature` pair are gone
72
- from the generated project — including from the public webhooks module's
73
- exports. Receivers must verify with `webhook-signature`. This is the one
74
- change a **receiver** absorbs without any config change of its own, so tell
75
- your endpoint partners.
76
-
77
- ### BREAKING: `include` and `fields[...]` are reserved query params
78
-
79
- `?include=` is always available now (where allowlisted), which makes `include`
80
- a reserved parameter and any `fields[`-prefixed key reserved too. **A column
81
- literally named `include` is no longer filterable** via `?include=…`. Unknown
82
- `?fields=` and `fields[<fk>]=` names return **400** instead of being dropped.
83
-
84
- ### Fixed: scoped projects without `auth.jwt` could not admit their own scope tokens
85
-
86
- Scope admission used to be emitted only inside the JWT credential lane, so a
87
- project with `authz.scopes` and no `auth.jwt` minted scope tokens that no
88
- generated code could accept — 401 on every presentation, with no diagnostic.
89
- Live since v0.64.0, when that lane stopped being on by default.
90
-
91
- Admission is now emitted whenever the project declares scopes, independent of
92
- `auth.jwt`. **No config change is needed** — and declaring scopes does not
93
- open the credential surface: no `POST /token` route, no identity fast-path,
94
- no bearer fast-path unless you separately declare `auth.jwt`.
95
-
96
- This covers **sessionless** scope tokens (`ctx.mintScope`). A token minted
97
- from a session — `POST /scope/v1/enter`, or a namespace with
98
- `mintScope: true` — carries user claims rather than the scope-only marker, so
99
- without `auth.jwt` it still cannot be admitted: 200 from the mint, 401 on
100
- presentation. The compiler now warns instead of failing silently. Declare
101
- `auth: { jwt: {} }` if you use those routes.
102
-
103
- ### CMS and Account consume CloudEvents frames as-is
104
-
105
- The bundled SPAs no longer invert realtime frames back into a private
106
- `{ type, table, event }` shape, and they no longer sniff `/api/v2` to pick
107
- the broadcast URL. They match on `qbframe`, read `data` / `qbseq`, and take
108
- `/broadcast/v1` or `/broadcast/v2` from the injected runtime config — the
109
- same prefixes the worker actually mounts.
110
-
111
- ### `allowClientIds` — optional client-supplied ids on create
112
-
113
- `providers.database.config.allowClientIds: true` lets `POST /` and
114
- `POST /batch` carry an **optional** `id`, built for optimistic updates: the
115
- client mints the id up front (`crypto.randomUUID()` under
116
- `generateId: 'uuid'`), renders immediately, and the server inserts that id —
117
- or mints one when it is omitted, exactly as before. The id is shape-locked at
118
- the Zod boundary to the active `generateId` strategy's format (400 on
119
- mismatch, 409 on collision), guards stay on (the id is compiler-managed and
120
- exempt from `createable`), and OpenAPI `<R>Create` schemas plus the client
121
- `Insert` types advertise it as optional. A no-op under `generateId: false`
122
- (ids stay client-supplied and **required**) and `'serial'` / numeric PKs.
123
- See [Client-supplied IDs](/api/crud#client-supplied-ids-optimistic-updates).
124
-
125
- ## v0.65.x — August 16, 2026
126
-
127
- ### Passkeys no longer silently degrade to `rpID: 'localhost'`
128
-
129
- The generated passkey plugin (and the SEALED reveal step-up, which must verify
130
- against the same relying party) now bakes a compile-time fallback derived from
131
- your configured domain — `account.domain` when set, else the unified host.
132
- `ACCOUNT_URL` remains a runtime override, and its **bare origin** is now used
133
- for WebAuthn even when the value carries a path (`https://host/account`), so
134
- one variable serves both the email link base and the relying-party origin.
135
- The rpID derivation also stops stripping two-label hostnames to a bare TLD
136
- (`example.com` no longer became rpID `com`). `localhost` now applies only to
137
- projects with no configured domain at all.
138
-
139
- ### `APP_URL` — per-deploy override for `account.appUrl`
140
-
141
- `account.appUrl` is baked at compile time into the Account SPA runtime config
142
- and the "Go To App" email CTAs, which pointed preview/dev deploys at
143
- production. Set `APP_URL` on the deploy target to override both at serve
144
- time — same one-bundle-several-hostnames pattern as `EXTRA_APP_HOSTS` and
145
- `BETTER_AUTH_URL`.
146
-
147
- ### Account SPA keeps its `/account` basepath through login redirects
148
-
149
- On path-mounted deployments, a post-login redirect could navigate to a bare
150
- path (`/dashboard` instead of `/account/dashboard`) and fall through to a
151
- tenant route. The callback sanitizer now re-applies the basepath to
152
- same-origin paths, covering every sign-in flow (password, passkey, email OTP,
153
- signup) and social-link callbacks.
154
-
155
- ### Fix: Start deploys of R2 apps failed to resolve `aws4fetch`
156
-
157
- Package-mode compiles (Start's **Deploy to Cloudflare**) bundle against the
158
- compiler image's `/deps/node_modules`, not a generated `npm install`. R2
159
- apps import `aws4fetch` from `src/storage/presign.ts`, but it was only
160
- declared on the generated `package.json` — CLI deploys worked, Start died
161
- with `Could not resolve "aws4fetch"`. The compiler image now ships the same
162
- pin the generator writes.
163
-
164
- ### Start: seeded admin uses your Quickback email
165
-
166
- A browser deploy writes the first `sysadmin` with the **verified email on
167
- your Quickback account**, not a synthetic `owner@<app>.invalid` address.
168
- Reset admin password still rotates the hash only — the broker never
169
- `UPDATE`s that email afterwards. See [Owner access](/start/deploy-owner-access).
170
-
171
- ## v0.65.0 — August 16, 2026
172
-
173
- ### All Quickback auth plugins are now bundled — zero `@quickback-dev/*` npm dependencies
174
-
175
- The compiler now vendors the AWS SES, AWS SNS, combo-auth, and
176
- upgrade-anonymous plugin sources into generated projects at
177
- `src/plugins/<name>/`, completing what the subscriptions plugin started in
178
- v0.64: **no generated project installs a `@quickback-dev/*` package from npm.**
179
- The plugin code ships with the compiler that wires it, so the emitted callers
180
- (`getSESConfig`, OTP callbacks, `upgradeAnonymous()` calls) can never skew from
181
- the plugin version they were generated against — and upgrades arrive by
182
- recompiling, not by `npm update`.
183
-
184
- Recompile and the dependencies disappear from `package.json`; no config
185
- changes needed. The `@quickback-dev/better-auth-*` npm packages are being
186
- retired from the registry — the vendored source in your project is the
187
- supported copy.
188
-
189
- ## v0.64.0 — August 15, 2026
190
-
191
- ### `contract.version` defaults to v2 — and no longer moves your URLs
192
-
193
- **Semantics and routes are now independent axes.**
194
-
195
- | Key | Controls | Default |
196
- |---|---|---|
197
- | `version` | Framing, strictness, the auth lane | `'v2'` |
198
- | `routes` | The URL prefix, nothing else | `'v1'` |
199
-
200
- A project with no `contract` block runs the **v2 contract on `/api/v1`**. You
201
- inherit the flagship semantics; your clients keep calling the address they
202
- already call.
203
-
204
- Previously these were one knob: `version: 'v2'` moved `/api`, `/auth`, and
205
- `/broadcast` to `/v2` as a side effect of selecting v2 behavior. That coupling
206
- made the better contract expensive to adopt for the wrong reason — a URL
207
- migration nobody asked for.
208
-
209
- **Breaking — action required if you pinned `version: 'v2'` for the URLs.**
210
- Add `routes: 'v2'` to keep serving `/api/v2`:
211
-
212
- ```typescript
213
- contract: { version: "v2", routes: "v2" }
214
- ```
215
-
216
- Without it, a previously-v2 project moves back to `/api/v1` on its next
217
- compile. Semantics are unaffected either way.
218
-
219
- ### What the v2 default changes on the wire
220
-
221
- URLs do not move. These do:
222
-
223
- - Realtime frames become CloudEvents 1.0 envelopes. The largest change — every
224
- subscriber re-parses. Routing info moves to `type`, payload to `data`.
225
- - Outbound webhooks are signed Standard-Webhooks-only; the legacy
226
- `X-Webhook-*` headers stop being sent. v1 already sent **both** sets, so
227
- consumers can migrate to `webhook-signature` before upgrading and the flip
228
- becomes a no-op for them.
229
- - Unknown `?fields=` names return `400` instead of being silently dropped.
230
- - The Quickback HMAC-JWT lane is off unless `auth.jwt` is declared.
231
- - `?include=`, aggregate changesets (`owns`), and delegated principals become
232
- available without a pin.
233
-
234
- Pin `contract: { version: "v1" }` to opt out. A pre-v0.64 project that leaves
235
- `contract.version` unset gets a one-time notice naming what changed — the
236
- generated `wrangler.toml` header records the resolved version in a
237
- `# quickback:contract` stamp, so new projects and projects that have already
238
- compiled on v2 stay warning-free without restating the default.
239
-
240
- ### Action-schema harvest no longer keys on contract version
241
-
242
- `assertCompleteActionInputSchemas` fired whenever the contract was v2 and any
243
- harvested schema was absent. With v2 as the default that would have failed
244
- every [Start](https://start.quickback.dev) project containing an action —
245
- `rawFiles` callers post project source and never execute action code, so they
246
- cannot harvest at all.
247
-
248
- The gate now fires only on a **partial** payload: some schemas supplied,
249
- others missing. Callers that supply none get the coverage warning instead. The
250
- CLI has failed closed on its own since v0.63.0, with the local per-action
251
- reason the compiler cannot know.
252
-
253
- ### Fixes
254
-
255
- - CloudEvents framing was derived from `broadcastBase.endsWith('/v2')`. Once
256
- routes and semantics decoupled, that silently reverted every default project
257
- to raw v1 frames. Framing is now passed explicitly.
258
- - The bundled CMS/Account SPAs gated their base-path override on *semantics*
259
- when it is a *routes* concern, emitting a redundant `/api/v1` override for
260
- every new project.
261
-
262
- ## v0.63.0 — August 14, 2026
263
-
264
- ### Action input schemas now fail the compile instead of degrading
265
-
266
- **Affects every project with actions, on every contract version.**
267
-
268
- The CLI harvests each action's `input` locally with `z.toJSONSchema`. When an
269
- action failed to harvest, the compiler fell back to a static parser that reads
270
- Zod as text — and that parser cannot emit `required` or `additionalProperties`.
271
- The resulting operation kept its `properties` and looked fully typed in
272
- `openapi.json` and the MCP tool list while enforcing nothing: generated clients
273
- treated required fields as optional and unknown keys passed. Constructs the
274
- parser could not read at all degraded further, to a bare `{}`.
275
-
276
- None of it was visible in a diff. One project shipped ~346 unenforced request
277
- schemas this way; the change read as reformatting.
278
-
279
- A failed harvest is now a compile error naming each action, whether bundling or
280
- evaluation failed, and the underlying local error. This was previously the
281
- behavior of `contract.version: 'v2'` only.
282
-
283
- `quickback compile --allow-degraded-schemas` restores degrade-and-continue for a
284
- single compile. It prints every action that fell back and why. (Removed in
285
- 0.66.2 — it worked on a total harvest failure but still threw on a partial one,
286
- the case it existed for.)
287
-
288
- The compiler also warns when a caller supplies no schemas at all — `rawFiles`
289
- callers such as the Start app cannot harvest — naming how many actions of the
290
- total lost `required`, with sampled paths.
291
-
292
- ### `contract.version` default flips to v2 in v0.64.0
293
-
294
- An unset `contract.version` resolves to `'v1'` today. That default becomes
295
- `'v2'` in **v0.64.0**. See the
296
- [contract matrix](/platform/api-contract#contractversion-is-retired).
297
-
298
- > v0.64.0 shipped this **without** moving any URLs — semantics and routes became
299
- > independent axes, so `/api/v1` stays put. This entry originally said the flip
300
- > would move `/api/v1` → `/api/v2`; that is not what happened.
301
-
302
-
303
- Every compile that leaves `contract.version` unset now warns. Pin
304
- `contract: { version: "v1" }` to keep the current wire, or set `"v2"` to migrate
305
- now.
306
-
307
- **Pinning your CLI version does not pin the contract.** The default lives in the
308
- compiler, which is a hosted service, so an older CLI inherits the flip too. The
309
- config key is the only pin.
310
-
311
- ### MCP tool grouping no longer assumes a `v1` path segment
312
-
313
- Internal. Group derivation matched the literal segment `v1`, so a contract-v2
314
- path would have fallen through and grouped under `api`. Operation tags take
315
- precedence and every generated operation carries one, so no shipped tool list
316
- was affected — the fallback is now correct for any `/api/v<n>/` prefix ahead of
317
- the v0.64.0 default flip.
318
-
319
- ## v0.62.0 — August 13, 2026
320
-
321
- ### Security: `record:` access arms on `GET /:id` were never evaluated
322
-
323
- **Affects any resource whose `read.access` contains a `record:` arm.**
324
-
325
- A code rewrite corrupted `"$ctx.userId"` into `"$effectiveCtx.userId"` inside the
326
- serialized access tree, and only the `$ctx.` prefix is recognised at runtime. The
327
- arm therefore compared a column against the literal string and was permanently
328
- false: a caller the config named was denied with 403 on the single-record read,
329
- while the same tree admitted them everywhere else.
330
-
331
- Those arms now evaluate. **Callers your config grants access to will start
332
- receiving 200 where they previously received 403.** That is the documented
333
- behavior being restored, not a widening — no caller is admitted whom the tree
334
- does not name. Durable Object room gates already behaved correctly, so this also
335
- removes a divergence where a room admitted a caller that `GET /:id` refused.
336
-
337
- ### Security: revocation is per scope kind, not per token
338
-
339
- **Affects projects using `authz.scopes`.**
340
-
341
- A token carried one proof timestamp for a claim map whose kinds were proven at
342
- different moments, so re-proving one kind restamped the others. A revoked kind
343
- survived indefinitely as long as the caller kept re-proving any sibling.
344
-
345
- Each entry now carries its own proof time, and both readers use it: the
346
- revocation check, and the carry-forward cap. **The cap matters more** — it
347
- applies on the default configuration, where `revocationCheck` is unset and no
348
- KV marker is ever read, so it was the only bound on a carried claim.
349
-
350
- Tokens minted before this release have no per-entry stamp and fall back to the
351
- token-level proof time, conservatively. `authz.scopes[].roles[].subKeys` may no
352
- longer declare `id`, `roles`, `subjectId`, or `sctMs` — those are server-minted,
353
- and a row value overwriting one would forge a proof time. Compile fails naming
354
- the path.
355
-
356
- ### Generated projects with in-worker Durable Objects can install again
357
-
358
- `npm install` failed with `ERESOLVE` immediately after a successful compile:
359
- `hono-party` requires `@cloudflare/workers-types@^4`, and Quickback pins `^5`.
360
- Unsatisfiable at any version — no `hono-party` release accepts 5.x.
361
-
362
- Generated `package.json` now carries a scoped override so the peer resolves to
363
- the project's own pin. Nothing outside `hono-party` is relaxed. Only projects
364
- declaring an in-worker Durable Object receive it.
365
-
366
- ### Fixed: two configurations that emitted uncompilable projects
367
-
368
- - `plugins: { apiKey: false }` emitted a `problemJson(...)` call without its
369
- import, so the generated project failed `tsc`.
370
- - `organization: { allowUserToCreateOrganization: … }` in object form emitted the
371
- key twice in one object literal (`TS1117`). `organizationHooks` had the same
372
- collision and is now stripped from the merged options — the compiler owns it.
373
-
374
- ### `defineEmail` — inbound mail, provider-agnostic execute
375
-
376
- Declare an inbound handler in `services/email/*.ts`. The compiler emits a shared `deliverInboundEmail()` dispatcher plus a Cloudflare Worker `email()` adapter. **Execute sees a portable `InboundEmailMessage`** (`from`, `to`, `headers`, `raw: ArrayBuffer`) — the same body runs for Cloudflare Email Routing and Amazon SES (Receipt → S3 → SNS calling `deliverInboundEmail`). Optional `to` matches the envelope recipient. Unmatched messages log a warning and are **not** rejected. Audit actor is `system:email-<name>`. See [Email](/platform/email).
377
-
378
- ## v0.61.0 — August 12, 2026
379
-
380
- ### Security: JWT revocation now fails closed when KV is unreachable
381
-
382
- **Affects projects using `auth.jwt.revocationCheck: 'kv'`** — including every
383
- project with a `.sealed()` column, which force-enables it.
384
-
385
- Setting `revocationCheck: 'kv'` asks the verifier to consult current security
386
- state before trusting a signed bearer. It did the opposite under failure: a
387
- missing `KV` binding, a failed read, or a corrupt entry all returned "not
388
- revoked," so a token was accepted during exactly the outage that hid its
389
- revocation. A banned user's bearer kept working for the rest of its TTL, and
390
- the one signal that would have caught it was the thing that had broken.
391
-
392
- The check now returns `active` / `revoked` / `unavailable`, and only `active`
393
- authenticates the bearer. A corrupt stamp is `unavailable` too — it used to
394
- parse as `NaN` and compare as "not revoked."
395
-
396
- **What changes operationally.** A bearer whose revocation state can't be read
397
- gets a retryable `503 AUTH_REVOCATION_UNAVAILABLE` ([RFC 9457](/api/errors))
398
- instead of being let through. Recovery is a separate cookie-only request: a
399
- request carrying `Authorization` has its cookie stripped before session auth,
400
- so during a KV outage every JWT-bearer request gets the 503 until the client
401
- retries on its session cookie. One reason-only log line per occurrence carries
402
- the cause (`missing-binding` / `read-error`) with no token, claim, or KV key in
403
- it — **alert on it.**
404
-
405
- This ties bearer-token availability to KV. That is the trade the opt-in now
406
- makes honestly, and it is the right way round: a revocation check that gives
407
- up under load is worth nothing. If you want the TTL bound *without* the
408
- coupling, leave `revocationCheck` at `'none'` and set `expiresIn: 30`.
409
-
410
- Because the binding is now load-bearing, a project with named `environments`
411
- must declare `bindings.kv` on **every** target — a compile error naming the
412
- environment, rather than a 503 discovered after deploy.
413
-
414
- `revocationCheck: 'none'` output is byte-identical. See
415
- [`revocationCheck`](/configure/auth#revocationcheck-none--kv--token-revocation-strategy).
416
-
417
- ### Security: revocation was off by one second
418
-
419
- **Also affects projects using `auth.jwt.revocationCheck: 'kv'`.**
420
-
421
- Revocation markers and token mint timestamps were both whole seconds, and the
422
- check rejected only a token stamped *strictly before* the marker. A token
423
- minted earlier in the same second as the revocation therefore compared **equal**
424
- and survived — a sub-second hole in a mechanism whose whole promise is
425
- "revoked within seconds." Whether an attacker landed in it was a coin flip on
426
- clock alignment, not on anything defensible.
427
-
428
- Markers are now epoch milliseconds, tokens carry millisecond companions
429
- (`iatMs`, and `sctMs` for the relationship-scope proof), and the comparison
430
- denies a tie. A token minted milliseconds before the revocation is rejected; one
431
- legitimately re-minted *after* it in that same second is still accepted, which
432
- is why simply flipping `<` to `<=` on seconds was not the fix.
433
-
434
- `iat` and `sct` remain standards-compatible unix **seconds** for external
435
- tooling — the millisecond claims are internal ordering metadata, set by the
436
- signer from the same clock sample and never accepted from a caller.
437
-
438
- **Rollout is conservative, not clever.** Marker format is read from an explicit
439
- version marker, never guessed from magnitude. Where one side is from v0.60.4 or
440
- earlier — an old token against a new marker, or any token against an old marker
441
- — there is no sub-second information to compare, so the **entire marker second**
442
- is revoked. That over-revocation is bounded (old tokens expire within their TTL,
443
- old markers within the entry lifetime), and it costs the caller a `401` and a
444
- re-authentication, exactly as any other rejected token does. No action is needed
445
- upgrading forward.
446
-
447
- **Do not straddle this release, though.** A worker from before v0.61.0 reads a
448
- millisecond marker as `NaN` and concludes *not revoked* — it does not recognise
449
- it as corrupt, so the fail-closed path added above never fires. Rolling back
450
- across this release, or running two differently-versioned deploy targets against
451
- one shared KV namespace, means every revocation written by the new version is
452
- **silently unenforced** by the old one until the entry expires (~19 minutes at
453
- default settings). Upgrade targets that share a namespace together. If you must
454
- roll back, treat outstanding bearers as unrevoked for that window: lower
455
- `expiresIn`, or purge the `qbrev:` keys and re-stamp from the old version.
456
-
457
- ## v0.60.4 — August 4, 2026
458
-
459
- ### Fix: retired-path cleanup was inert in v0.60.1–v0.60.3
460
-
461
- The stale-file cleanup shipped in v0.60.1 never ran. Both ends were correct —
462
- the compiler resolved the retired paths, the CLI was ready to delete them — but
463
- the v2 compile stream's `done` event didn't carry the field, so it arrived
464
- `undefined` and the CLI dutifully deleted nothing.
465
-
466
- The event is a hand-maintained projection of the compiler's output, and nothing
467
- type-checks that it stays complete: a field added on both sides but missed
468
- there is dropped in transit with no error anywhere. The only symptom was an
469
- absent side effect.
470
-
471
- The underlying duplication is gone rather than patched: the event is now
472
- derived from the compiler's output by omitting `files`, instead of three
473
- separate hand-maintained lists (the server builder, the CLI's type, the CLI's
474
- reconstruction) that all had to agree. A new field reaches the CLI for free. A
475
- test still asserts the contract so the intent stays visible.
476
-
477
- If you compiled on any of v0.60.1–v0.60.3, the stale root `openapi.json` /
478
- `asyncapi.json` / `schema-registry.json` are still on disk. Recompile on
479
- v0.60.4 and they are removed.
480
-
481
- ## v0.60.1 — August 3, 2026
482
-
483
- ### Fix: moved files no longer leave orphans behind
484
-
485
- Upgrading to v0.60 left the old `openapi.json`, `asyncapi.json`, and
486
- `schema-registry.json` sitting at your project root. The compiler wrote the new
487
- copies under `src/apps/__quickback/spec/`, but nothing removed the old ones —
488
- on a real project that was **6.7 MB of stale specs**, still committed, that
489
- tooling pointed at the old path kept reading in place of the live ones.
490
-
491
- That is worse than a clean break: a stale spec drifts from your API silently,
492
- where a missing file fails immediately.
493
-
494
- The root cause was structural, not a one-off. The compiler's output is a
495
- manifest of files to **write**, with no way to express "and drop what you wrote
496
- last time at a path I no longer use." The CLI's pre-write wipe covers `src/`
497
- only, so any path that relocates outside `src/` leaves an orphan forever.
498
-
499
- The compiler now also returns **retired paths**, and the CLI deletes them on
500
- your next compile. See [Retired paths](/tooling/output#retired-paths).
501
-
502
- Every filter errs toward keeping a file, because a wrong deletion is
503
- unrecoverable while a missed one is only untidy — a moved path is removed only
504
- once its replacement is actually emitted, a path the current compile still
505
- writes is never removed, and nothing may escape the output directory.
506
-
507
- No action needed: recompile and the stale files go.
508
-
509
- ## v0.60.0 — August 3, 2026
510
-
511
- ### Spec blobs move out of the Worker bundle
512
-
513
- `openapi.json`, `asyncapi.json`, and `schema-registry.json` are no longer
514
- imported by the Worker. They are emitted into `src/apps/__quickback/spec/` and
515
- served through the Cloudflare [ASSETS
516
- binding](https://developers.cloudflare.com/workers/static-assets/).
517
-
518
- Previously the specs shipped as text imports parsed lazily on first request.
519
- That kept their object graphs out of the isolate startup window, but the *bytes*
520
- still sat in the script V8 has to parse on every cold start. On a large API
521
- that is measured in megabytes, spent to serve discovery routes most callers
522
- never request. As assets they leave the bundle entirely.
523
-
524
- Measured on a 40-feature production API (paired runs, alternating, same
525
- machine):
526
-
527
- | | Before | After | |
528
- |---|---|---|---|
529
- | Bundle (raw) | 23,610 KiB | 17,218 KiB | **−6,392 KiB (−27%)** |
530
- | Bundle (gzip) | 3,027 KiB | 2,762 KiB | −266 KiB (−8.8%) |
531
- | Startup CPU (median) | 258 ms | 232 ms | −26 ms (−10%) |
532
- | of which GC | 77 ms | 70 ms | −7 ms |
533
-
534
- The bundle numbers are exact. The CPU figure is a local `wrangler check
535
- startup` median whose run-to-run ranges overlap, so treat −10% as the shape of
536
- the win rather than a precise constant — and note it scales with spec size: a
537
- project with a small spec will see little.
538
-
539
- Two consequences worth knowing:
540
-
541
- - Projects now get an `[assets]` block even with **no** CMS, Account, or custom
542
- app configured.
543
- - `run_worker_first = true` in that block is **security-load-bearing**, not a
544
- performance setting. It routes every request through your Worker first, so an
545
- asset is served only when the Worker fetches it — which is what keeps
546
- `__quickback/spec/` reachable exclusively through the gated spec routes. A
547
- `publish: 'admin'` spec is not a public URL. Do not relax it.
548
-
549
- The `[[rules]] type = "Text"` block added in v0.59 is gone; nothing imports the
550
- specs now.
551
-
552
- Routes and payloads are unchanged: `GET /openapi.json` returns the same spec
553
- under the same `openapi.publish` gate. See [Output
554
- structure](/tooling/output#spec-blobs-are-assets-not-bundle).
555
-
556
- > **BREAKING — `openapi.json` is no longer written to the project root.**
557
- > Tooling that read it (`npx openapi-typescript openapi.json`, CI steps, lint
558
- > rules) must point at `src/apps/__quickback/spec/openapi.json`.
559
- >
560
- > `api-types.gen.ts` is **unaffected** — the compiler still generates it at the
561
- > project root, which is why most projects never invoke `openapi-typescript`
562
- > directly and need no change at all.
563
- >
564
- > On your first compile after upgrading, the CLI deletes the now-orphaned root
565
- > copies. It only does so for blobs it just re-emitted under the new path, so an
566
- > older compiler that still writes to the root is never second-guessed.
567
-
568
-
569
- ## v0.59.1 — July 29, 2026
570
-
571
- ### Fix: auth and features D1 bindings could collapse onto one name
572
-
573
- A project whose database config carried a single `binding` (e.g.
574
- `binding: 'DB'`) emitted **two** `[[d1_databases]]` entries bound to the same
575
- name, while the generated code still called `env.AUTH_DB`. Half the runtime
576
- therefore reached a database with no auth tables.
577
-
578
- In split mode — the default for `cloudflare-d1` — `binding` names the
579
- **features** database only; auth is a separate D1 with its own `authBinding`.
580
- The service resolver was letting auth fall back to the generic `binding`, so one
581
- value drove both.
582
-
583
- It went unnoticed because three places resolved the auth binding independently
584
- and only one carried that extra fallback, so the reserved-name validator
585
- computed `AUTH_DB`/`DB`, saw no clash, and passed while the wrangler emit
586
- computed `DB`/`DB`. All three now agree.
587
-
588
- A binding collision in split mode is also a **compile error** now rather than a
589
- silently broken deploy, naming `authBinding` / `featuresBinding` and the
590
- `splitDatabases: false` single-database alternative as the fixes.
591
-
592
- Not introduced by v0.59.0 — the same behaviour is present in v0.58.3 and
593
- earlier. If you hit it, set `authBinding` explicitly or upgrade.
594
-
595
- ## v0.59.0 — July 29, 2026
596
-
597
- ### BREAKING · Masking: sensitive columns now require an explicit decision
598
-
599
- **The compiler no longer decides whether to mask a column. It refuses to
600
- compile until you do.**
601
-
602
- Quickback has always detected sensitive column names (`email`, `ssn`, `apiKey`,
603
- `stripeSecret`, `refreshToken`, …) and silently attached a default mask rule
604
- plus a warning. That was wrong in both directions: it broke list views nobody
605
- asked it to break, and it created a false sense of protection. Worse, only
606
- *some* surfaces read the auto-detected set — through v0.58.3 the HTTP response
607
- path applied **declared-only** masking while realtime and live views applied
608
- detected-plus-declared, so an auto-detected secret was redacted over WebSocket
609
- and returned in **plaintext** on `GET /:id`, list, `POST` and `PATCH`, and
610
- stayed freely filterable and sortable. Making detection non-silent removes that
611
- whole bug class by construction: the set of masked columns is now exactly the
612
- set you declared, so no two surfaces can disagree about it.
613
-
614
- Every detected column must now carry an explicit decision in `masking`:
615
-
616
- ```typescript
617
- masking: {
618
- apiKey: { type: 'redact', show: { roles: ['admin'] } }, // yes, mask it
619
- email: false, // no, reviewed
620
- }
621
- ```
622
-
623
- `false` is a new first-class answer meaning **reviewed — not sensitive here**:
624
- the value is returned in full and the column stays freely `?filter=`-able,
625
- `?sort=`-able and `?search=`-able. An omitted key is not a decision.
626
-
627
- #### Migrating
628
-
629
- Compile the project. For each error, you get the resource name, every undecided
630
- column, its suggested rule, and a paste-ready `masking` block with both answers
631
- per column — delete the wrong line from each pair:
632
-
633
- ```
634
- customers: 2 columns match Quickback's sensitive-column patterns but carry no masking decision.
635
- ...
636
- masking: {
637
- email: { type: 'email', show: { or: 'owner', roles: ['admin'] } }, // mask it
638
- // email: false, // …or this instead: reviewed, not sensitive here
639
- },
640
- ```
641
-
642
- Two ways to resolve each column:
643
-
644
- 1. **Mask it** — keep the suggested rule (or write your own). The value is
645
- redacted for callers outside `show.roles`, and only those roles may
646
- filter/sort/search it. Widen the query surface independently with
647
- `query: { roles: [...] }`; drop `or: 'owner'` if the table has no owner
648
- column.
649
- 2. **Don't mask it** — `column: false`. Nothing changes about how the column
650
- behaves; you've recorded that somebody looked.
651
-
652
- A false positive (`cc` on an accounting table, `webhook` on a config row) costs
653
- one line. That is the intended trade: the compiler asks about everything it
654
- recognises rather than guessing.
655
-
656
- Detection itself is unchanged — same keyword table, same suffix matching, and
657
- the suggested rule is still `show: { or: 'owner', roles: ['admin'] }`. It is
658
- now a suggestion in an error message rather than a default that applies on its
659
- own. See [Masking](/define/masking).
660
-
661
- ### Security fix: live views and realtime subscribe now evaluate `read.access`
662
-
663
- The live-view materialize route (`GET /api/v1/views/:view/:rootId`) and the
664
- view-subscribe ws-ticket lane applied the firewall and masking but **never the
665
- role gate**. A firewall is a tenant filter, not a role gate, so a same-org
666
- member who was correctly `403`'d on `GET /<table>/:id` received the full row —
667
- and every included child row — through the view, and could subscribe to its
668
- live deltas.
669
-
670
- Every table on a [live view](/platform/realtime/live-views#security) surface (the
671
- root *and* each included child) is now gated by its own `read: { access }`,
672
- **deny-on-any**: a root denial is a `403`, an included-table denial collapses to
673
- `404` with the firewall miss. Both entry points enforce it, and the gate lives
674
- inside the materializer so resync inherits it too.
675
-
676
- Shapes the view path cannot decide now **fail closed at compile time** instead
677
- of silently passing: function-form access, `relationship:`/`fga:` arms, and a
678
- `record:` condition on an *included* table. A `record:` condition on the root
679
- is evaluated post-fetch against the materialized row, the same two-phase gate
680
- `GET /:id` uses.
681
-
682
- ### Security fix: a team-only firewall no longer opens every tenant
683
-
684
- A resource whose **only** tenant predicate was team-scoped emitted no `WHERE`
685
- filter at all when `ctx.activeTeamId` was absent, so every authenticated caller
686
- could read, update and delete every tenant's rows.
687
-
688
- The team predicate is rendered drop-when-absent — correct while an org arm still
689
- bounds the query (the teamless rest-of-org slice), but with team as the sole arm
690
- "drop the team filter" meant "drop the entire tenant boundary". The claim is
691
- genuinely absent in ordinary setups: the Better Auth teams sub-plugin is opt-in,
692
- and the external auth provider never supplies it. Auto-detection also derives
693
- team-only isolation for any table carrying a `teamId` and no `organizationId`,
694
- with no explicit `firewall` block.
695
-
696
- An absent claim now **denies** when team is the sole tenant arm. Soft-delete and
697
- literal predicates are row filters, not tenant boundaries, so they don't count as
698
- a co-existing arm. Team alongside org is unchanged.
699
-
700
- Paired with a compile-time gate: a team-only firewall on a project without the
701
- teams sub-plugin is now a build error rather than a resource that denies every
702
- request, since that claim can never be populated. See
703
- [Firewall](/define/firewall).
704
-
705
- ### Security fixes: managed file storage
706
-
707
- Three scope-expansion holes in the managed file subsystem (`managed: true`):
708
-
709
- - **Removed organization members kept reading private files.** The files worker
710
- read `activeOrgId` straight off the session row; a session outlives
711
- membership, and a bucket with no `readRoles` had no second gate. Membership is
712
- now re-checked per request and a missing member row clears the organization
713
- before any org-scoped check.
714
- - **JWT claims were trusted as current.** The worker's JWT fast path took `orgId`
715
- and `role` from the signed token — a mint-time snapshot. Both are now
716
- re-derived from the database. The lookup only runs when a request carries an
717
- org claim, so user-scoped and public reads stay lookup-free.
718
- - **`writeScope: "user"` buckets bound nothing to the owner.** Keys come from a
719
- client-supplied path and the R2 write landed *before* the unique-key metadata
720
- insert could reject it, so a member who knew a peer's key overwrote their
721
- object — with no undo. Presigned uploads were worse: they signed a `PUT` URL
722
- and deleted the victim's metadata row. Both paths now check ownership first,
723
- and for presign that check runs *before signing*, since the URL is itself the
724
- write capability. The metadata row is also reserved before the R2 write, so a
725
- failed insert can no longer leave an overwrite behind.
726
-
727
- See [File storage](/platform/storage/r2).
728
-
729
- ## v0.58.1–v0.58.3 — July 28, 2026
730
-
731
- > No changelog entries were written for these three patch releases. Reconstructed
732
- > from git: compilation and generated-output hardening (`fc7d54fb`) and a
733
- > string-keyed batch FK visibility set that removes spurious `fkNotFound`
734
- > (`96f764ed`) in `0.58.1`; a CI deploy-serialization fix in `0.58.2`
735
- > (`2bf00e9c`). `0.58.3` was published from CI and has no bump commit in this
736
- > repository — its contents are not reconstructible from git history here.
737
-
738
- ## v0.58.0 — July 28, 2026
739
-
740
- ### `?include=<ownsRelation>` — the aggregate reader lands
741
-
742
- `read.include` now accepts **owns relation names** alongside FK columns:
743
- `?include=reactions` on a changeset root embeds the aggregate's owned child
744
- rows (pivot on the root PK, match the child's declared `fk`), landing in the
745
- same top-level `included` map keyed by include token, then row PK. The child's
746
- full security surface applies exactly as for FK embeds — pre-record-evaluable
747
- `read.access` (compile-enforced), firewall ANDed into the fetch on the
748
- caller-claims handle, masking, and `fields[<token>]` sparse projection. The
749
- `?fields=` pivot guard follows the direction: an owns embed requires the
750
- **source PK** in the projection (an FK embed still requires the FK column).
751
- This closes the changeset design's phase-2 reader — write the aggregate with
752
- the changeset media type, read it back with `?include=`.
753
-
754
- ### `afterCommit.reindex` + `afterCommit.notify` — the 06 fast-follows land
755
-
756
- The two deliveries deferred out of afterCommit v1 now ship, riding the same
757
- post-commit dispatch seam (best-effort, `waitUntil`, never rolling back the
758
- committed changeset):
759
-
760
- - **`reindex: true`** re-enqueues the committed **root row** for embedding
761
- regeneration on the same at-least-once `EMBEDDINGS_QUEUE` lane the plain
762
- routes use — after the tx commits, so a rolled-back changeset produces no
763
- orphan jobs. Fail-closed: requires the root's `embeddings` block; honors
764
- `onInsert`/`onUpdate: false`; a field-watch array means "always" on the
765
- aggregate lane. The owns validator's embeddings warning now clears for a
766
- reindex-declaring root (owned children still warn — root row only).
767
- - **`notify`** sends a device push via the web-push provider (compile error
768
- without `push: { provider: 'web-push' }`). The audience is a
769
- `defineRealtimeDelivery` profile resolved with the **same disclosure
770
- gates as `broadcast`** — masked columns, `q.stamp` proven identity, and
771
- child-id enumeration are shared code, not a parallel set. Title/body/url/
772
- tag are `{key}` templates over a gate-checked payload map; an unmapped
773
- placeholder is a compile error, a null value at runtime pushes to nobody.
774
- Scope-keyed deliveries fan to `scope:<room>` subscription tags; user
775
- deliveries to the user's devices; roles AND-compose.
776
-
777
- A reindex- or notify-only `afterCommit` no longer requires realtime
778
- infrastructure — the ws-infra gate now applies only to `broadcast`/`realtime`
779
- lanes.
780
-
781
- ## v0.57.1 — July 28, 2026
782
-
783
- > No changelog entry was written for this release. Reconstructed from git: a
784
- > polish pass over `0.57.0` — `q.table` column initializers that cannot be
785
- > resolved now throw instead of dropping silently (`ace6cf17`), the scope-grant
786
- > gate distinguishes "permission arm present" from "no arm at all"
787
- > (`1b7a5773`), tenant-scope arrow endpoints and object-thunk references parse
788
- > again so authz analysis is restored (`ad53b924`), and the anchored fallback
789
- > fails closed (`48c70370`).
790
-
791
- ## v0.57.0 — July 28, 2026
792
-
793
- ### Typed scoped `db` on every Neon mode + write-side audit forbids
794
-
795
- The action `db` is now schema-aware on **all** Neon connection modes, not just
796
- Hyperdrive: http mode gets the same insert relaxation and typed reads with
797
- `.transaction` **blocked at the type level** (the neon-http driver throws at
798
- runtime — the type now says so instead of a 500), websocket mode gets the full
799
- interactive-tx flavor. With D1 already typed, every supported provider's action
800
- `db` now carries the schema — including the `SealedValue` brand on `.sealed()`
801
- columns, so string-processing a sealed value is a compile error everywhere.
802
-
803
- On every typed provider, the compiler-managed audit keys are now `?: never` in
804
- `.insert().values()` **and** the newly-typed `.update().set()`: the audit
805
- wrapper hard-stamps them from the verified caller, so a supplied value was
806
- always discarded — now it's a compile error instead of a silent lie.
807
- `.set({ deletedAt })` stays allowed (the soft-delete signal).
808
-
809
- ### Hard-stamp unification — one audit-actor contract
810
-
811
- The scoped db's dead "fill-if-absent" actor lane is gone: on every wrapped
812
- handle, `createdBy`/`modifiedBy` come from the verified principal, period (the
813
- raw client remains the documented escape for system writes that own their
814
- provenance). Three attribution gaps closed with it: cron schedules' and queue
815
- handlers' `withInternalContext` now hand out an **audit-wrapped** db, so
816
- `system:cron-<name>` / `system:queue-<name>` actually land on audit columns;
817
- upserts into encrypted/sealed tables now stamp `modifiedAt`/`modifiedBy` on the
818
- `onConflictDoUpdate` conflict branch like every other write; and an org-scoped
819
- child table whose source can't accept the injected `organizationId` column now
820
- fails the compile instead of silently shipping without its tenant column.
821
-
822
- ### Visible audit columns — `...q.audit()` / `...q.softDelete()` + canon validator
823
-
824
- The compiler-managed audit quartet and soft-delete pair can now be **declared visibly**
825
- in authored feature files: q-DSL tables spread `...q.audit()` / `...q.softDelete()` into
826
- the columns object (types flow through — `$infer` shows `createdAt`/`modifiedBy`/… on the
827
- author's own table object), raw Drizzle tables declare the canonical lines literally.
828
- `quickback migrate visible-columns` codemods an existing project in one shot; emitted
829
- output is unchanged either way (the spreads expand to the exact injector lines).
830
-
831
- With visibility comes validation, **on by default**: every feature table must declare its
832
- managed columns visibly (`...q.audit()` / `...q.softDelete()` or the canonical literal
833
- lines — one `quickback migrate visible-columns` run), and every managed column that appears
834
- in authored source is checked against the canonical spec — insert-time default chains on
835
- `createdAt`/`modifiedAt` (+`$onUpdate`), nullable no-default actor columns, nullable
836
- no-default `deletedAt`, canonical SQL names, never `.encrypted()`/`.sealed()`. Divergence
837
- (silently accepted before) and missing declarations **fail the build**, with soft-delete
838
- presence pinned to `crud.delete.mode`. Opt out with
839
- `compiler.features.visibleAuditColumns: false`, which downgrades divergence to warnings and
840
- restores invisible injection. Unknown spreads in a q-DSL columns object are now a compile
841
- error instead of being silently dropped.
842
-
843
- Also in this line: `q.table`'s `$insert` type is honest (required vs defaulted/stamped
844
- columns; audit keys are `?: never` — the wrapper hard-stamps them), `$infer` includes the
845
- audit columns, and the canonical column definitions collapsed into one shared spec
846
- (`constants/managed-columns.ts`) consumed by the injectors, meta augmentation, request
847
- validation, spread expansion, and the new validator.
848
-
849
- ## v0.56.0–v0.56.11 — July 21–27, 2026
850
-
851
- > No changelog entries were written for the v0.56 line (twelve releases).
852
- > Reconstructed from git: feature-area follow-through — generated CRUD/changeset
853
- > routes claimed by an area prefix (`d33262e8`), feature-area transition route
854
- > adapters (`05d57940`), a fail-closed guard for generated routes under an area
855
- > prefix (`23f1f58d`), and a run of cross-feature resolution fixes
856
- > (`b6984a22`, `747dfad4`, `fb0cfb41`, `26bc569f`, `ae76e3e8`) — plus
857
- > relationship-proven `SESSION` parity for `q.stamp` (`b11fabfe`), an RLS
858
- > serial-sequence sweep with an audit-schema latch and `fga_tuples` backstop
859
- > (`299c93ee`), changeset trigger parity and `define-action` typing fixes
860
- > (`4c64edab`), and R2 files-migration scheduling gated on managed files
861
- > (`29b908f2`).
862
-
863
- ## v0.55.1 — July 21, 2026
864
-
865
- ### Feature areas — hierarchical authz grouping (`_area.ts`)
866
-
867
- A folder under `features/` carrying an `_area.ts` (`export default defineArea({...})`) is now
868
- an **area**: it declares a route prefix + admission lanes (the same shape as a project
869
- namespace, incl. `mintScope`/`acceptScope`) and an authz vocabulary — relationships, composed
870
- roles, named gates, tenant anchors, scope kinds — that every feature inside the folder
871
- references by bare name. The vocabulary is visible to the area's subtree ONLY: the compiler
872
- checks every reference channel (access roles/gates/scoped aliases, action `access`/`anchor`,
873
- firewall `via`/`{ rule }`/`{ tenant }` arms, `ctx.scope.<kind>` accessors, auth-view tenant
874
- includes, realtime handshake roles, table-level namespace lanes, and other `_area.ts` nodes)
875
- and fails the build on any outside reference. Root `authz` stays the global level, and root
876
- bodies may reference root-declared names only (no laundering an area name project-wide).
877
-
878
- Fail-closed rules shipped with it: re-declaring an inherited name is a compile error (no
879
- overrides in v1); a descendant action whose path opts out of the area prefix must carry an
880
- explicit `route: 'self'` marker; relative `path: './…'` resolves against the area prefix with
881
- dot segments rejected; foreign features can't claim paths (or table-level namespace prefixes)
882
- under an area's prefix; nested areas may add vocabulary but not mount a second prefix under a
883
- mounted ancestor (unlinked parent/child admission never compiles); and area-tree projects
884
- must declare `requires: ['feature-areas']` — the marker reaches the compiler through ANY CLI
885
- version, so an area-unaware toolchain is rejected instead of silently dropping nested
886
- features. Area projects also emit a reviewed audit artifact, `quickback/authz-manifest.json`
887
- (area tree, declared names, member features, area-gated vs self-gated actions, root-config
888
- namespace consumers), and the generated `AGENTS.md` gains a feature-areas section.
889
-
890
- Byte-parity guarantee: a flat root-authz project re-expressed as an area tree compiles to
891
- byte-identical output (the emit-site key-order determinism pass from v2 step 0 makes the fold
892
- order provably irrelevant). See [Feature areas](/define/areas).
893
-
894
- One cosmetic side effect of that determinism pass: the first recompile of an existing project
895
- on this release may reorder generated relationship-table **import lines** (they are now
896
- emitted in sorted order instead of authz-map insertion order). The reordering is a one-time,
897
- behavior-free diff.
898
-
899
- ### Access rules: named gates (`authz.rules`) and tenant anchors (`authz.tenants`)
900
-
901
- Two new root-`authz` blocks let you declare a row/role rule once and stamp it by name instead
902
- of copying predicates across files. A **named gate** in `authz.rules` bundles up to three
903
- arms — `who` (roles), `record:` (record-aware predicates), and `firewall` lanes — under one
904
- name, referenced by bare name in any `access: { roles: [...] }` array (applies who + record)
905
- and as `{ rule: '<name>' }` in a resource's `firewall:` (splices the lanes into the top-level
906
- AND array — a reference can only *narrow* row admission, never widen it). A **tenant anchor**
907
- in `authz.tenants` names the tenant predicate (`{ column, equals }`, claim side locked to
908
- verified ctx claims) and is written `{ tenant: 'org' }` in firewalls — with an optional
909
- per-site column override — and `tenant: 'org'` in auth-view includes. Expansion happens at
910
- compile time; emitted SQL is byte-identical to the inline spelling.
911
-
912
- Everything fails closed: gate/role/scoped-role/`+`/`:` name collisions, `+` hierarchy sugar
913
- inside rule bodies, `{ rule }` inside `all`/`any` groups, firewall-less gates referenced from
914
- `firewall:`, firewall-bearing gates on actions or in `masking.show`, and an access-side
915
- reference to a firewall-bearing gate whose lanes the resource doesn't also stamp are all
916
- compile errors. Gates in `realtime.requiredRoles` lower to static who-roles at the handshake;
917
- a declared non-empty list that lowers to nothing is a compile error, never a silent `[]`. A
918
- new `AUTHZ_UNKNOWN_ROLE_NAME` warning flags reference-shaped names that resolve to nothing.
919
- See [named gates](/define/authz-roles#named-gates-authzrules) ·
920
- [`{ tenant }`](/define/firewall#named-tenant-anchors-tenant) ·
921
- [`{ rule }`](/define/firewall#named-gate-references-rule).
922
-
923
- ## v0.55.0 — July 17, 2026
924
-
925
- ### Generated projects ship an `AGENTS.md`
926
-
927
- Every compiled project now emits an `AGENTS.md` at its root — the file coding agents read first — weaving Quickback's security model and a *"when to use what"* decision guide into the output. An agent editing the features is steered to the right primitive: a **view** for a filtered read, a **transition** for a guarded state change, an **action** for custom logic, **guards**/**masking** for field-level control, **named invalidations** for realtime refresh — each with a `docs.quickback.dev` link. It also documents the access tiers (incl. `SESSION`/`SCOPED`), the `WHERE column = value` firewall model with the org-OR-scope `{ any: [...] }` pattern for non-org callers, and the fail-closed coherence guardrail (with the *"never `exception: true` as a workaround"* rule). Regenerated on every compile.
928
-